sample-cross-fx 0.14.15-beta.3791 → 0.14.15-beta.3795

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.3791" || 0,
131101
+ version: "0.14.15-beta.3795" || 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 = () => {
@@ -133569,11 +133573,11 @@ function installPiralDebug(options) {
133569
133573
  debug: debugApiVersion,
133570
133574
  instance: {
133571
133575
  name: "sample-cross-fx",
133572
- version: "0.14.15-beta.3791",
133576
+ version: "0.14.15-beta.3795",
133573
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"
133574
133578
  },
133575
133579
  build: {
133576
- date: "2022-03-04T16:05:59.260Z",
133580
+ date: "2022-03-04T18:14:23.736Z",
133577
133581
  cli: "0.14.14",
133578
133582
  compat: "0.14"
133579
133583
  },
@@ -255742,4 +255746,4 @@ const app = React.createElement(piral_core_1.Piral, {
255742
255746
 
255743
255747
  /******/ })()
255744
255748
  ;
255745
- //# sourceMappingURL=index.b64adf.js.map
255749
+ //# sourceMappingURL=index.75ea39.js.map