sample-cross-fx 0.14.15-beta.3790 → 0.14.15

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.
@@ -131098,7 +131098,7 @@ function createInstance(config = {}) {
131098
131098
  const createApi = apiFactory(context, usedPlugins);
131099
131099
  const root = createApi({
131100
131100
  name: 'root',
131101
- version: "0.14.15-beta.3790" || 0,
131101
+ version: "0.14.15" || 0,
131102
131102
  spec: ''
131103
131103
  });
131104
131104
  const options = (0,_helpers__WEBPACK_IMPORTED_MODULE_6__.createPiletOptions)({
@@ -133476,19 +133476,32 @@ function installPiralDebug(options) {
133476
133476
  });
133477
133477
  };
133478
133478
 
133479
+ const activatePilet = pilet => {
133480
+ try {
133481
+ const {
133482
+ createApi
133483
+ } = options;
133484
+ const newApi = createApi(pilet);
133485
+ injectPilet(pilet);
133486
+ pilet.setup(newApi);
133487
+ } catch (error) {
133488
+ console.error(error);
133489
+ }
133490
+ };
133491
+
133479
133492
  const togglePilet = name => {
133480
133493
  const pilet = getPilets().find(m => m.name === name);
133481
133494
 
133482
- if (pilet.disabled) {
133483
- try {
133484
- const {
133485
- createApi
133486
- } = options;
133487
- const newApi = createApi(pilet);
133488
- injectPilet(pilet.original);
133489
- pilet.original.setup(newApi);
133490
- } catch (error) {
133491
- console.error(error);
133495
+ if (!pilet) {// nothing to do, obviously invalid call
133496
+ } else if (pilet.disabled) {
133497
+ if (pilet.original) {
133498
+ // everything is fine, let's use the cached version
133499
+ activatePilet(pilet.original);
133500
+ } else {
133501
+ // something fishy is going on - let's just try to activate the same pilet
133502
+ activatePilet(Object.assign(Object.assign({}, pilet), {
133503
+ disabled: false
133504
+ }));
133492
133505
  }
133493
133506
  } else {
133494
133507
  injectPilet({
@@ -133509,18 +133522,9 @@ function installPiralDebug(options) {
133509
133522
 
133510
133523
  const appendPilet = meta => {
133511
133524
  const {
133512
- createApi,
133513
133525
  loadPilet
133514
133526
  } = options;
133515
- loadPilet(meta).then(pilet => {
133516
- try {
133517
- const newApi = createApi(pilet);
133518
- injectPilet(pilet);
133519
- pilet.setup(newApi);
133520
- } catch (error) {
133521
- console.error(error);
133522
- }
133523
- });
133527
+ loadPilet(meta).then(activatePilet);
133524
133528
  };
133525
133529
 
133526
133530
  const toggleVisualize = () => {
@@ -133554,25 +133558,27 @@ function installPiralDebug(options) {
133554
133558
 
133555
133559
  System.constructor.prototype.resolve = function (...args) {
133556
133560
  const [url, parent] = args;
133561
+ const result = systemResolve.call(this, ...args);
133557
133562
 
133558
133563
  if (parent) {
133559
- depMap[parent] = depMap[parent] || {};
133560
- depMap[parent][url] = true;
133564
+ const deps = depMap[parent] || {};
133565
+ deps[url] = result;
133566
+ depMap[parent] = deps;
133561
133567
  }
133562
133568
 
133563
- return systemResolve.call(this, ...args);
133569
+ return result;
133564
133570
  };
133565
133571
 
133566
133572
  const debugApi = {
133567
133573
  debug: debugApiVersion,
133568
133574
  instance: {
133569
133575
  name: "sample-cross-fx",
133570
- version: "0.14.15-beta.3790",
133576
+ version: "0.14.15",
133571
133577
  dependencies: "@angular/common,@angular/compiler,@angular/core,@angular/platform-browser,@angular/platform-browser-dynamic,@webcomponents/webcomponentsjs,angular,aurelia-framework,aurelia-templating-binding,aurelia-templating-resources,aurelia-pal-browser,aurelia-event-aggregator,aurelia-history-browser,hyperapp,inferno,inferno-create-element,mithril,lit-element,solid-js,solid-js/dom,preact,riot,rxjs,vue,zone.js,react,react-dom,react-router,react-router-dom,history,tslib,path-to-regexp,@libre/atom,@dbeining/react-atom"
133572
133578
  },
133573
133579
  build: {
133574
- date: "2022-03-04T13:46:13.318Z",
133575
- cli: "0.14.14",
133580
+ date: "2022-03-05T09:05:30.679Z",
133581
+ cli: "0.14.15",
133576
133582
  compat: "0.14"
133577
133583
  },
133578
133584
  pilets: {
@@ -133624,9 +133630,18 @@ function installPiralDebug(options) {
133624
133630
  const dependencyMap = {};
133625
133631
 
133626
133632
  const addDeps = (pilet, dependencies) => {
133627
- const oldDeps = dependencyMap[pilet] || [];
133628
- const newDeps = Object.keys(dependencies).filter(depName => !oldDeps.includes(depName));
133629
- dependencyMap[pilet] = [...oldDeps, ...newDeps];
133633
+ const deps = dependencyMap[pilet] || [];
133634
+
133635
+ for (const depName of Object.keys(dependencies)) {
133636
+ if (!deps.some(m => m.demanded === depName)) {
133637
+ deps.push({
133638
+ demanded: depName,
133639
+ resolved: dependencies[depName]
133640
+ });
133641
+ }
133642
+ }
133643
+
133644
+ dependencyMap[pilet] = deps;
133630
133645
  };
133631
133646
 
133632
133647
  const pilets = getPilets().map(pilet => ({
@@ -255731,4 +255746,4 @@ const app = React.createElement(piral_core_1.Piral, {
255731
255746
 
255732
255747
  /******/ })()
255733
255748
  ;
255734
- //# sourceMappingURL=index.aca71d.js.map
255749
+ //# sourceMappingURL=index.bfba15.js.map