Skip to content

Commit

Permalink
demo
Browse files Browse the repository at this point in the history
  • Loading branch information
tysonrm committed Aug 11, 2023
1 parent f92334d commit a9662d2
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 20 deletions.
14 changes: 5 additions & 9 deletions dist/829.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/829.js.map

Large diffs are not rendered by default.

14 changes: 5 additions & 9 deletions dist/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -6396,11 +6396,6 @@ function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input ==

// Models


/**
*
* @param {ModelSpecification} spec
*/
function validateSpec(spec) {
var missing = ['endpoint', 'factory'].filter(function (key) {
return !spec[key];
Expand All @@ -6414,11 +6409,12 @@ function validateSpec(spec) {
* @param {ModelSpecification} spec
* @param {*} dependencies - services injected
*/
function makeModel(spec) {
function makeModel(spec, modelName) {
validateSpec(spec);
var mixins = spec.mixins || [];
var dependencies = spec.dependencies || {};
return _objectSpread(_objectSpread({}, spec), {}, {
modelName: modelName.toUpperCase(),
mixins: mixins.concat(_util_mixins__WEBPACK_IMPORTED_MODULE_0__["default"]),
dependencies: _objectSpread(_objectSpread({}, dependencies), (0,_util_bind_adapters__WEBPACK_IMPORTED_MODULE_1__["default"])(spec.ports, _adapters__WEBPACK_IMPORTED_MODULE_3__, _services__WEBPACK_IMPORTED_MODULE_2__))
});
Expand All @@ -6427,9 +6423,9 @@ var models = Object.entries(_config__WEBPACK_IMPORTED_MODULE_5__).map(function (
var _ref2 = _slicedToArray(_ref, 2),
k = _ref2[0],
v = _ref2[1];
return makeModel(_objectSpread(_objectSpread({}, v), {}, {
modelName: k
}));
return _defineProperty({}, k.toUpperCase(), makeModel(v, k));
}).reduce(function (a, b) {
return _objectSpread(_objectSpread({}, a), b);
});

/***/ }),
Expand Down
2 changes: 1 addition & 1 deletion dist/main.js.map

Large diffs are not rendered by default.

0 comments on commit a9662d2

Please sign in to comment.