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

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.
@@ -128654,8 +128654,9 @@ __webpack_require__.r(__webpack_exports__);
128654
128654
  /* harmony export */ "includeDependency": () => (/* binding */ includeDependency),
128655
128655
  /* harmony export */ "includeBundle": () => (/* binding */ includeBundle)
128656
128656
  /* harmony export */ });
128657
- function requireModule(name) {
128658
- const dependency = System.get(name);
128657
+ function requireModule(name, parent) {
128658
+ const moduleId = System.resolve(name, parent);
128659
+ const dependency = moduleId && System.get(moduleId);
128659
128660
 
128660
128661
  if (!dependency) {
128661
128662
  const error = new Error(`Cannot find module '${name}'`);
@@ -128701,7 +128702,11 @@ function evalDependency(name, content, link = '') {
128701
128702
  try {
128702
128703
  const sourceUrl = link && `\n//# sourceURL=${link}`;
128703
128704
  const importer = new Function('module', 'exports', 'require', content + sourceUrl);
128704
- importer(mod, mod.exports, requireModule);
128705
+ const parent = link || name;
128706
+
128707
+ const require = moduleId => requireModule(moduleId, parent);
128708
+
128709
+ importer(mod, mod.exports, require);
128705
128710
  } catch (e) {
128706
128711
  console.error(`Error while evaluating ${name}.`, e);
128707
128712
  }
@@ -128722,7 +128727,8 @@ function compileDependency(name, content, link = '') {
128722
128727
  }
128723
128728
 
128724
128729
  function includeScript(piletName, depName, link, integrity, crossOrigin) {
128725
- window[depName] = requireModule;
128730
+ window[depName] = moduleId => requireModule(moduleId, link);
128731
+
128726
128732
  return includeScriptDependency(link, integrity, crossOrigin).then(s => checkPiletAppAsync(piletName, s.app), () => checkPiletApp(piletName));
128727
128733
  }
128728
128734
  /**
@@ -131092,7 +131098,7 @@ function createInstance(config = {}) {
131092
131098
  const createApi = apiFactory(context, usedPlugins);
131093
131099
  const root = createApi({
131094
131100
  name: 'root',
131095
- version: "0.14.14-beta.3765" || 0,
131101
+ version: "0.14.15-beta.3790" || 0,
131096
131102
  spec: ''
131097
131103
  });
131098
131104
  const options = (0,_helpers__WEBPACK_IMPORTED_MODULE_6__.createPiletOptions)({
@@ -133561,12 +133567,12 @@ function installPiralDebug(options) {
133561
133567
  debug: debugApiVersion,
133562
133568
  instance: {
133563
133569
  name: "sample-cross-fx",
133564
- version: "0.14.14-beta.3765",
133570
+ version: "0.14.15-beta.3790",
133565
133571
  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
133572
  },
133567
133573
  build: {
133568
- date: "2022-03-02T17:59:14.109Z",
133569
- cli: "0.14.13",
133574
+ date: "2022-03-04T13:46:13.318Z",
133575
+ cli: "0.14.14",
133570
133576
  compat: "0.14"
133571
133577
  },
133572
133578
  pilets: {
@@ -133618,11 +133624,9 @@ function installPiralDebug(options) {
133618
133624
  const dependencyMap = {};
133619
133625
 
133620
133626
  const addDeps = (pilet, dependencies) => {
133621
- if (!(pilet in dependencyMap)) {
133622
- dependencyMap[pilet] = [];
133623
- }
133624
-
133625
- dependencyMap[pilet].push(...dependencies);
133627
+ const oldDeps = dependencyMap[pilet] || [];
133628
+ const newDeps = Object.keys(dependencies).filter(depName => !oldDeps.includes(depName));
133629
+ dependencyMap[pilet] = [...oldDeps, ...newDeps];
133626
133630
  };
133627
133631
 
133628
133632
  const pilets = getPilets().map(pilet => ({
@@ -133879,14 +133883,14 @@ function decycle(obj) {
133879
133883
  "use strict";
133880
133884
  __webpack_require__.r(__webpack_exports__);
133881
133885
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
133882
- /* harmony export */ "installPiletsEmulator": () => (/* binding */ installPiletsEmulator)
133886
+ /* harmony export */ "withEmulatorPilets": () => (/* binding */ withEmulatorPilets)
133883
133887
  /* harmony export */ });
133884
133888
  /* harmony import */ var piral_base__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! piral-base */ "../../framework/piral-base/esm/utils.js");
133885
133889
  /* harmony import */ var piral_base__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! piral-base */ "../../framework/piral-base/esm/setup.js");
133886
133890
  /* harmony import */ var _DebugRouteSwitch__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./DebugRouteSwitch */ "../../utilities/piral-debug-utils/esm/DebugRouteSwitch.js");
133887
133891
 
133888
133892
 
133889
- function installPiletsEmulator(requestPilets, options) {
133893
+ function withEmulatorPilets(requestPilets, options) {
133890
133894
  const {
133891
133895
  loadPilet,
133892
133896
  createApi,
@@ -133900,75 +133904,73 @@ function installPiletsEmulator(requestPilets, options) {
133900
133904
  const noPilets = () => Promise.resolve([]);
133901
133905
 
133902
133906
  const requester = loadPilets ? requestPilets : noPilets;
133903
- integrate({
133907
+ integrate === null || integrate === void 0 ? void 0 : integrate({
133904
133908
  components: {
133905
133909
  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
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
133910
+ }
133911
+ });
133912
+ return () => {
133913
+ 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
133912
133914
 
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]);
133915
+ const piletApi = window['dbg:pilet-api'] || piletApiFallback; // either take a full URI or make it an absolute path relative to the current origin
133919
133916
 
133920
- ws.onmessage = ({
133921
- data
133922
- }) => {
133923
- const hardRefresh = sessionStorage.getItem('dbg:hard-refresh') === 'on';
133917
+ const initialTarget = /^https?:/.test(piletApi) ? piletApi : `${location.origin}${piletApi[0] === '/' ? '' : '/'}${piletApi}`;
133918
+ const updateTarget = initialTarget.replace('http', 'ws');
133919
+ const ws = new WebSocket(updateTarget);
133920
+ const timeoutCache = {};
133921
+ const timeout = 150;
133922
+ const appendix = fetch(initialTarget).then(res => res.json()).then(item => Array.isArray(item) ? item : [item]);
133924
133923
 
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
133924
+ ws.onmessage = ({
133925
+ data
133926
+ }) => {
133927
+ const hardRefresh = sessionStorage.getItem('dbg:hard-refresh') === 'on';
133929
133928
 
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
133929
+ if (!hardRefresh) {
133930
+ // standard setting is to just perform an inject
133931
+ const meta = JSON.parse(data);
133932
+ const name = meta.name; // like a debounce; only one change of the current pilet should be actively processed
133932
133933
 
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
133934
+ clearTimeout(timeoutCache[name]); // some bundlers may have fired before writing to the disk
133935
+ // so we give them a bit of time before actually loading the pilet
133936
133936
 
133937
- injectPilet({
133938
- name
133939
- }); // load and evaluate pilet
133937
+ timeoutCache[name] = setTimeout(() => {
133938
+ // we should make sure to only refresh the page / router if pilets have been loaded
133939
+ const unfreeze = (0,_DebugRouteSwitch__WEBPACK_IMPORTED_MODULE_0__.freezeRouteRefresh)(); // tear down 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
+ injectPilet({
133942
+ name
133943
+ }); // load and evaluate pilet
133946
133944
 
133945
+ loadPilet(meta).then(pilet => {
133946
+ try {
133947
+ if ((0,piral_base__WEBPACK_IMPORTED_MODULE_1__.isfunc)(injectPilet)) {
133948
+ injectPilet(pilet);
133949
+ } // setup actual pilet
133947
133950
 
133948
- (0,piral_base__WEBPACK_IMPORTED_MODULE_2__.setupPilet)(pilet, createApi); // disable route cache, should be zero again and lead to route refresh
133949
133951
 
133950
- unfreeze();
133951
- } catch (error) {
133952
- console.error(error);
133953
- }
133954
- });
133955
- }, timeout);
133956
- } else {
133957
- location.reload();
133958
- }
133959
- };
133952
+ (0,piral_base__WEBPACK_IMPORTED_MODULE_2__.setupPilet)(pilet, createApi); // disable route cache, should be zero again and lead to route refresh
133960
133953
 
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
- }
133954
+ unfreeze();
133955
+ } catch (error) {
133956
+ console.error(error);
133957
+ }
133958
+ });
133959
+ }, timeout);
133960
+ } else {
133961
+ location.reload();
133962
+ }
133963
+ };
133970
133964
 
133971
- });
133965
+ return promise.catch(err => {
133966
+ console.error(`Requesting the pilets failed. We'll continue loading without pilets (DEBUG only).`, err);
133967
+ return [];
133968
+ }).then(pilets => appendix.then(debugPilets => {
133969
+ const debugPiletNames = debugPilets.map(m => m.name);
133970
+ const feedPilets = pilets.filter(m => !debugPiletNames.includes(m.name));
133971
+ return [...feedPilets, ...debugPilets];
133972
+ }));
133973
+ };
133972
133974
  }
133973
133975
 
133974
133976
  /***/ }),
@@ -133983,7 +133985,7 @@ function installPiletsEmulator(requestPilets, options) {
133983
133985
  __webpack_require__.r(__webpack_exports__);
133984
133986
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
133985
133987
  /* harmony export */ "installPiralDebug": () => (/* reexport safe */ _debug__WEBPACK_IMPORTED_MODULE_0__.installPiralDebug),
133986
- /* harmony export */ "installPiletsEmulator": () => (/* reexport safe */ _emulator__WEBPACK_IMPORTED_MODULE_1__.installPiletsEmulator)
133988
+ /* harmony export */ "withEmulatorPilets": () => (/* reexport safe */ _emulator__WEBPACK_IMPORTED_MODULE_1__.withEmulatorPilets)
133987
133989
  /* harmony export */ });
133988
133990
  /* harmony import */ var _debug__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./debug */ "../../utilities/piral-debug-utils/esm/debug.js");
133989
133991
  /* harmony import */ var _emulator__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./emulator */ "../../utilities/piral-debug-utils/esm/emulator.js");
@@ -134089,7 +134091,7 @@ exports.integrate = void 0;
134089
134091
  const piral_debug_utils_1 = __webpack_require__(/*! piral-debug-utils */ "../../utilities/piral-debug-utils/esm/index.js");
134090
134092
 
134091
134093
  function integrate(context, options) {
134092
- (0, piral_debug_utils_1.installPiletsEmulator)(options.fetchPilets, {
134094
+ options.fetchPilets = (0, piral_debug_utils_1.withEmulatorPilets)(options.fetchPilets, {
134093
134095
  injectPilet: context.injectPilet,
134094
134096
  createApi: options.createApi,
134095
134097
  loadPilet: options.loadPilet,
@@ -134098,7 +134100,6 @@ function integrate(context, options) {
134098
134100
  context.dispatch(s => Object.assign(Object.assign({}, s), {
134099
134101
  components: Object.assign(Object.assign({}, s.components), emulator.components)
134100
134102
  }));
134101
- options.fetchPilets = emulator.requester;
134102
134103
  }
134103
134104
 
134104
134105
  });
@@ -255730,4 +255731,4 @@ const app = React.createElement(piral_core_1.Piral, {
255730
255731
 
255731
255732
  /******/ })()
255732
255733
  ;
255733
- //# sourceMappingURL=index.4fbb2d.js.map
255734
+ //# sourceMappingURL=index.aca71d.js.map