sample-piral 0.14.12-beta.3703 → 0.14.13-beta.3733

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1628,8 +1628,6 @@ __webpack_require__.r(__webpack_exports__);
1628
1628
  /* harmony import */ var systemjs_dist_extras_named_register_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! systemjs/dist/extras/named-register.js */ "../../../node_modules/systemjs/dist/extras/named-register.js");
1629
1629
  /* harmony import */ var systemjs_dist_extras_named_register_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(systemjs_dist_extras_named_register_js__WEBPACK_IMPORTED_MODULE_1__);
1630
1630
  /* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./utils */ "../../framework/piral-base/esm/utils.js");
1631
- function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
1632
-
1633
1631
  function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
1634
1632
 
1635
1633
  function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
@@ -1642,14 +1640,59 @@ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Sy
1642
1640
 
1643
1641
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
1644
1642
 
1643
+ function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
1644
+
1645
+
1646
+
1647
+
1648
+
1649
+ function isPrimitiveExport(content) {
1650
+ var type = _typeof(content);
1651
+
1652
+ return type === 'function' || type === 'number' || type === 'boolean' || type === 'symbol' || type === 'string' || type === 'bigint' || Array.isArray(content);
1653
+ }
1654
+
1655
+ var systemRegister = System.constructor.prototype.register;
1656
+
1657
+ System.constructor.prototype.register = function () {
1658
+ for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
1659
+ args[_key] = arguments[_key];
1660
+ }
1661
+
1662
+ var getContent = args.pop();
1663
+ args.push(function (_export, ctx) {
1664
+ var exp = function exp() {
1665
+ if (arguments.length === 1) {
1666
+ var content = arguments.length <= 0 ? undefined : arguments[0];
1667
+
1668
+ if (content instanceof Promise) {
1669
+ return content.then(exp);
1670
+ } else if (isPrimitiveExport(content)) {
1671
+ _export('__esModule', true);
1645
1672
 
1673
+ _export('default', content);
1674
+ } else if (content) {
1675
+ _export(content);
1646
1676
 
1677
+ if (_typeof(content) === 'object' && !('default' in content)) {
1678
+ _export('default', content);
1679
+ }
1680
+ }
1681
+ } else {
1682
+ _export.apply(void 0, arguments);
1683
+ }
1684
+ };
1647
1685
 
1686
+ return getContent(exp, ctx);
1687
+ });
1688
+ return systemRegister.apply(this, args);
1689
+ };
1648
1690
  /**
1649
1691
  * Loads the provided SystemJS-powered pilet.
1650
1692
  * @param meta The pilet's metadata.
1651
1693
  */
1652
1694
 
1695
+
1653
1696
  function loadSystemPilet(meta) {
1654
1697
  var deps = meta.dependencies;
1655
1698
  var link = (0,_utils__WEBPACK_IMPORTED_MODULE_2__.setBasePath)(meta, meta.link);
@@ -1719,23 +1762,7 @@ function registerModule(name, resolve) {
1719
1762
  System.register(name, [], function (_exports) {
1720
1763
  return {
1721
1764
  execute: function execute() {
1722
- var content = resolve();
1723
-
1724
- if (content instanceof Promise) {
1725
- return content.then(_exports);
1726
- } else {
1727
- _exports(content);
1728
-
1729
- if (typeof content === 'function') {
1730
- _exports('__esModule', true);
1731
-
1732
- _exports('default', content);
1733
- } else if (_typeof(content) === 'object') {
1734
- if (content && !Array.isArray(content) && !('default' in content)) {
1735
- _exports('default', content);
1736
- }
1737
- }
1738
- }
1765
+ _exports(resolve());
1739
1766
  }
1740
1767
  };
1741
1768
  });
@@ -3528,7 +3555,7 @@ function createInstance() {
3528
3555
  var createApi = apiFactory(context, usedPlugins);
3529
3556
  var root = createApi({
3530
3557
  name: 'root',
3531
- version: "0.14.12-beta.3703" || 0,
3558
+ version: "0.14.13-beta.3733" || 0,
3532
3559
  spec: ''
3533
3560
  });
3534
3561
  var options = (0,_helpers__WEBPACK_IMPORTED_MODULE_6__.createPiletOptions)({
@@ -9281,16 +9308,35 @@ function installPiralDebug(options) {
9281
9308
  };
9282
9309
 
9283
9310
  var eventDispatcher = document.body.dispatchEvent;
9311
+ var systemResolve = System.constructor.prototype.resolve;
9312
+ var depMap = {};
9313
+
9314
+ System.constructor.prototype.resolve = function () {
9315
+ for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
9316
+ args[_key] = arguments[_key];
9317
+ }
9318
+
9319
+ var url = args[0],
9320
+ parent = args[1];
9321
+
9322
+ if (parent) {
9323
+ depMap[parent] = depMap[parent] || {};
9324
+ depMap[parent][url] = true;
9325
+ }
9326
+
9327
+ return systemResolve.call.apply(systemResolve, [this].concat(args));
9328
+ };
9329
+
9284
9330
  var debugApi = {
9285
9331
  debug: debugApiVersion,
9286
9332
  instance: {
9287
9333
  name: "sample-piral",
9288
- version: "0.14.12-beta.3703",
9334
+ version: "0.14.13-beta.3733",
9289
9335
  dependencies: "reactstrap,react,react-dom,react-router,react-router-dom,history,tslib,path-to-regexp,@libre/atom,@dbeining/react-atom"
9290
9336
  },
9291
9337
  build: {
9292
- date: "2022-02-20T19:35:08.876Z",
9293
- cli: "0.14.11",
9338
+ date: "2022-02-26T15:34:09.527Z",
9339
+ cli: "0.14.12",
9294
9340
  compat: "0.14"
9295
9341
  },
9296
9342
  pilets: {
@@ -9298,6 +9344,13 @@ function installPiralDebug(options) {
9298
9344
  createApi: createApi
9299
9345
  }
9300
9346
  };
9347
+ var details = {
9348
+ name: debugApi.instance.name,
9349
+ version: debugApi.instance.version,
9350
+ kind: debugApiVersion,
9351
+ mode: false ? 0 : 'development',
9352
+ capabilities: ['events', 'container', 'routes', 'pilets', 'settings', 'extensions', 'dependencies', 'dependency-map']
9353
+ };
9301
9354
 
9302
9355
  var start = function start() {
9303
9356
  var container = (0,_decycle__WEBPACK_IMPORTED_MODULE_1__.decycle)(getGlobalState());
@@ -9314,13 +9367,9 @@ function installPiralDebug(options) {
9314
9367
  disabled: pilet.disabled
9315
9368
  };
9316
9369
  });
9317
- sendMessage({
9318
- type: 'available',
9319
- name: debugApi.instance.name,
9320
- version: debugApi.instance.version,
9321
- kind: debugApiVersion,
9322
- mode: false ? 0 : 'development',
9323
- capabilities: ['events', 'container', 'routes', 'pilets', 'settings', 'extensions', 'dependencies'],
9370
+ sendMessage(Object.assign(Object.assign({
9371
+ type: 'available'
9372
+ }, details), {
9324
9373
  state: {
9325
9374
  routes: routes,
9326
9375
  pilets: pilets,
@@ -9330,6 +9379,38 @@ function installPiralDebug(options) {
9330
9379
  extensions: extensions,
9331
9380
  dependencies: dependencies
9332
9381
  }
9382
+ }));
9383
+ };
9384
+
9385
+ var check = function check() {
9386
+ sendMessage(Object.assign({
9387
+ type: 'info'
9388
+ }, details));
9389
+ };
9390
+
9391
+ var getDependencyMap = function getDependencyMap() {
9392
+ var dependencyMap = {};
9393
+ var pilets = getPilets().map(function (pilet) {
9394
+ return {
9395
+ name: pilet.name,
9396
+ link: pilet.link
9397
+ };
9398
+ }).filter(function (m) {
9399
+ return m.link;
9400
+ });
9401
+ Object.keys(depMap).forEach(function (url) {
9402
+ var dependencies = depMap[url];
9403
+ var pilet = pilets.find(function (p) {
9404
+ return p.link === url;
9405
+ });
9406
+
9407
+ if (pilet) {
9408
+ dependencyMap[pilet.name] = dependencies;
9409
+ }
9410
+ });
9411
+ sendMessage({
9412
+ type: 'dependency-map',
9413
+ dependencyMap: dependencyMap
9333
9414
  });
9334
9415
  };
9335
9416
 
@@ -9373,6 +9454,12 @@ function installPiralDebug(options) {
9373
9454
  case 'init':
9374
9455
  return start();
9375
9456
 
9457
+ case 'check-piral':
9458
+ return check();
9459
+
9460
+ case 'get-dependency-map':
9461
+ return getDependencyMap();
9462
+
9376
9463
  case 'update-settings':
9377
9464
  return updateSettings(content.settings);
9378
9465
 
@@ -9635,7 +9722,13 @@ function withEmulatorPilets(requestPilets, options) {
9635
9722
  return [];
9636
9723
  }).then(function (pilets) {
9637
9724
  return appendix.then(function (debugPilets) {
9638
- return [].concat(_toConsumableArray(pilets), _toConsumableArray(debugPilets));
9725
+ var debugPiletNames = debugPilets.map(function (m) {
9726
+ return m.name;
9727
+ });
9728
+ var feedPilets = pilets.filter(function (m) {
9729
+ return !debugPiletNames.includes(m.name);
9730
+ });
9731
+ return [].concat(_toConsumableArray(feedPilets), _toConsumableArray(debugPilets));
9639
9732
  });
9640
9733
  });
9641
9734
  };
@@ -80594,4 +80687,4 @@ var layout_1 = __webpack_require__(/*! ./layout */ "./src/layout.tsx");
80594
80687
 
80595
80688
  /******/ })()
80596
80689
  ;
80597
- //# sourceMappingURL=index.a03a4b.js.map
80690
+ //# sourceMappingURL=index.45cea4.js.map