sample-cross-fx 0.14.14-beta.3765 → 0.14.14-beta.3767

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.
@@ -131092,7 +131092,7 @@ function createInstance(config = {}) {
131092
131092
  const createApi = apiFactory(context, usedPlugins);
131093
131093
  const root = createApi({
131094
131094
  name: 'root',
131095
- version: "0.14.14-beta.3765" || 0,
131095
+ version: "0.14.14-beta.3767" || 0,
131096
131096
  spec: ''
131097
131097
  });
131098
131098
  const options = (0,_helpers__WEBPACK_IMPORTED_MODULE_6__.createPiletOptions)({
@@ -133561,11 +133561,11 @@ function installPiralDebug(options) {
133561
133561
  debug: debugApiVersion,
133562
133562
  instance: {
133563
133563
  name: "sample-cross-fx",
133564
- version: "0.14.14-beta.3765",
133564
+ version: "0.14.14-beta.3767",
133565
133565
  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"
133566
133566
  },
133567
133567
  build: {
133568
- date: "2022-03-02T17:59:14.109Z",
133568
+ date: "2022-03-02T21:12:58.402Z",
133569
133569
  cli: "0.14.13",
133570
133570
  compat: "0.14"
133571
133571
  },
@@ -133879,14 +133879,14 @@ function decycle(obj) {
133879
133879
  "use strict";
133880
133880
  __webpack_require__.r(__webpack_exports__);
133881
133881
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
133882
- /* harmony export */ "installPiletsEmulator": () => (/* binding */ installPiletsEmulator)
133882
+ /* harmony export */ "withEmulatorPilets": () => (/* binding */ withEmulatorPilets)
133883
133883
  /* harmony export */ });
133884
133884
  /* harmony import */ var piral_base__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! piral-base */ "../../framework/piral-base/esm/utils.js");
133885
133885
  /* harmony import */ var piral_base__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! piral-base */ "../../framework/piral-base/esm/setup.js");
133886
133886
  /* harmony import */ var _DebugRouteSwitch__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./DebugRouteSwitch */ "../../utilities/piral-debug-utils/esm/DebugRouteSwitch.js");
133887
133887
 
133888
133888
 
133889
- function installPiletsEmulator(requestPilets, options) {
133889
+ function withEmulatorPilets(requestPilets, options) {
133890
133890
  const {
133891
133891
  loadPilet,
133892
133892
  createApi,
@@ -133900,75 +133900,73 @@ function installPiletsEmulator(requestPilets, options) {
133900
133900
  const noPilets = () => Promise.resolve([]);
133901
133901
 
133902
133902
  const requester = loadPilets ? requestPilets : noPilets;
133903
- integrate({
133903
+ integrate === null || integrate === void 0 ? void 0 : integrate({
133904
133904
  components: {
133905
133905
  RouteSwitch: _DebugRouteSwitch__WEBPACK_IMPORTED_MODULE_0__.DebugRouteSwitch
133906
- },
133907
-
133908
- requester() {
133909
- const promise = requester(); // the window['dbg:pilet-api'] should point to an API address used as a proxy, fall back to '/$pilet-api' if unavailable
133906
+ }
133907
+ });
133908
+ return () => {
133909
+ const promise = requester(); // the window['dbg:pilet-api'] should point to an API address used as a proxy, fall back to '/$pilet-api' if unavailable
133910
133910
 
133911
- const piletApi = window['dbg:pilet-api'] || piletApiFallback; // either take a full URI or make it an absolute path relative to the current origin
133911
+ const piletApi = window['dbg:pilet-api'] || piletApiFallback; // either take a full URI or make it an absolute path relative to the current origin
133912
133912
 
133913
- const initialTarget = /^https?:/.test(piletApi) ? piletApi : `${location.origin}${piletApi[0] === '/' ? '' : '/'}${piletApi}`;
133914
- const updateTarget = initialTarget.replace('http', 'ws');
133915
- const ws = new WebSocket(updateTarget);
133916
- const timeoutCache = {};
133917
- const timeout = 150;
133918
- const appendix = fetch(initialTarget).then(res => res.json()).then(item => Array.isArray(item) ? item : [item]);
133913
+ const initialTarget = /^https?:/.test(piletApi) ? piletApi : `${location.origin}${piletApi[0] === '/' ? '' : '/'}${piletApi}`;
133914
+ const updateTarget = initialTarget.replace('http', 'ws');
133915
+ const ws = new WebSocket(updateTarget);
133916
+ const timeoutCache = {};
133917
+ const timeout = 150;
133918
+ const appendix = fetch(initialTarget).then(res => res.json()).then(item => Array.isArray(item) ? item : [item]);
133919
133919
 
133920
- ws.onmessage = ({
133921
- data
133922
- }) => {
133923
- const hardRefresh = sessionStorage.getItem('dbg:hard-refresh') === 'on';
133920
+ ws.onmessage = ({
133921
+ data
133922
+ }) => {
133923
+ const hardRefresh = sessionStorage.getItem('dbg:hard-refresh') === 'on';
133924
133924
 
133925
- if (!hardRefresh) {
133926
- // standard setting is to just perform an inject
133927
- const meta = JSON.parse(data);
133928
- const name = meta.name; // like a debounce; only one change of the current pilet should be actively processed
133925
+ if (!hardRefresh) {
133926
+ // standard setting is to just perform an inject
133927
+ const meta = JSON.parse(data);
133928
+ const name = meta.name; // like a debounce; only one change of the current pilet should be actively processed
133929
133929
 
133930
- clearTimeout(timeoutCache[name]); // some bundlers may have fired before writing to the disk
133931
- // so we give them a bit of time before actually loading the pilet
133930
+ clearTimeout(timeoutCache[name]); // some bundlers may have fired before writing to the disk
133931
+ // so we give them a bit of time before actually loading the pilet
133932
133932
 
133933
- timeoutCache[name] = setTimeout(() => {
133934
- // we should make sure to only refresh the page / router if pilets have been loaded
133935
- const unfreeze = (0,_DebugRouteSwitch__WEBPACK_IMPORTED_MODULE_0__.freezeRouteRefresh)(); // tear down pilet
133933
+ timeoutCache[name] = setTimeout(() => {
133934
+ // we should make sure to only refresh the page / router if pilets have been loaded
133935
+ const unfreeze = (0,_DebugRouteSwitch__WEBPACK_IMPORTED_MODULE_0__.freezeRouteRefresh)(); // tear down pilet
133936
133936
 
133937
- injectPilet({
133938
- name
133939
- }); // load and evaluate pilet
133937
+ injectPilet({
133938
+ name
133939
+ }); // load and evaluate pilet
133940
133940
 
133941
- loadPilet(meta).then(pilet => {
133942
- try {
133943
- if ((0,piral_base__WEBPACK_IMPORTED_MODULE_1__.isfunc)(injectPilet)) {
133944
- injectPilet(pilet);
133945
- } // setup actual pilet
133941
+ loadPilet(meta).then(pilet => {
133942
+ try {
133943
+ if ((0,piral_base__WEBPACK_IMPORTED_MODULE_1__.isfunc)(injectPilet)) {
133944
+ injectPilet(pilet);
133945
+ } // setup actual pilet
133946
133946
 
133947
133947
 
133948
- (0,piral_base__WEBPACK_IMPORTED_MODULE_2__.setupPilet)(pilet, createApi); // disable route cache, should be zero again and lead to route refresh
133948
+ (0,piral_base__WEBPACK_IMPORTED_MODULE_2__.setupPilet)(pilet, createApi); // disable route cache, should be zero again and lead to route refresh
133949
133949
 
133950
- unfreeze();
133951
- } catch (error) {
133952
- console.error(error);
133953
- }
133954
- });
133955
- }, timeout);
133956
- } else {
133957
- location.reload();
133958
- }
133959
- };
133960
-
133961
- return promise.catch(err => {
133962
- console.error(`Requesting the pilets failed. We'll continue loading without pilets (DEBUG only).`, err);
133963
- return [];
133964
- }).then(pilets => appendix.then(debugPilets => {
133965
- const debugPiletNames = debugPilets.map(m => m.name);
133966
- const feedPilets = pilets.filter(m => !debugPiletNames.includes(m.name));
133967
- return [...feedPilets, ...debugPilets];
133968
- }));
133969
- }
133950
+ unfreeze();
133951
+ } catch (error) {
133952
+ console.error(error);
133953
+ }
133954
+ });
133955
+ }, timeout);
133956
+ } else {
133957
+ location.reload();
133958
+ }
133959
+ };
133970
133960
 
133971
- });
133961
+ return promise.catch(err => {
133962
+ console.error(`Requesting the pilets failed. We'll continue loading without pilets (DEBUG only).`, err);
133963
+ return [];
133964
+ }).then(pilets => appendix.then(debugPilets => {
133965
+ const debugPiletNames = debugPilets.map(m => m.name);
133966
+ const feedPilets = pilets.filter(m => !debugPiletNames.includes(m.name));
133967
+ return [...feedPilets, ...debugPilets];
133968
+ }));
133969
+ };
133972
133970
  }
133973
133971
 
133974
133972
  /***/ }),
@@ -133983,7 +133981,7 @@ function installPiletsEmulator(requestPilets, options) {
133983
133981
  __webpack_require__.r(__webpack_exports__);
133984
133982
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
133985
133983
  /* harmony export */ "installPiralDebug": () => (/* reexport safe */ _debug__WEBPACK_IMPORTED_MODULE_0__.installPiralDebug),
133986
- /* harmony export */ "installPiletsEmulator": () => (/* reexport safe */ _emulator__WEBPACK_IMPORTED_MODULE_1__.installPiletsEmulator)
133984
+ /* harmony export */ "withEmulatorPilets": () => (/* reexport safe */ _emulator__WEBPACK_IMPORTED_MODULE_1__.withEmulatorPilets)
133987
133985
  /* harmony export */ });
133988
133986
  /* harmony import */ var _debug__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./debug */ "../../utilities/piral-debug-utils/esm/debug.js");
133989
133987
  /* harmony import */ var _emulator__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./emulator */ "../../utilities/piral-debug-utils/esm/emulator.js");
@@ -134089,7 +134087,7 @@ exports.integrate = void 0;
134089
134087
  const piral_debug_utils_1 = __webpack_require__(/*! piral-debug-utils */ "../../utilities/piral-debug-utils/esm/index.js");
134090
134088
 
134091
134089
  function integrate(context, options) {
134092
- (0, piral_debug_utils_1.installPiletsEmulator)(options.fetchPilets, {
134090
+ options.fetchPilets = (0, piral_debug_utils_1.withEmulatorPilets)(options.fetchPilets, {
134093
134091
  injectPilet: context.injectPilet,
134094
134092
  createApi: options.createApi,
134095
134093
  loadPilet: options.loadPilet,
@@ -134098,7 +134096,6 @@ function integrate(context, options) {
134098
134096
  context.dispatch(s => Object.assign(Object.assign({}, s), {
134099
134097
  components: Object.assign(Object.assign({}, s.components), emulator.components)
134100
134098
  }));
134101
- options.fetchPilets = emulator.requester;
134102
134099
  }
134103
134100
 
134104
134101
  });
@@ -255730,4 +255727,4 @@ const app = React.createElement(piral_core_1.Piral, {
255730
255727
 
255731
255728
  /******/ })()
255732
255729
  ;
255733
- //# sourceMappingURL=index.4fbb2d.js.map
255730
+ //# sourceMappingURL=index.38693d.js.map