sample-cross-fx 0.14.10 → 0.14.11-beta.3686

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.
@@ -129074,6 +129074,18 @@ __webpack_require__.r(__webpack_exports__);
129074
129074
  /* harmony export */ });
129075
129075
  /* harmony import */ var _cleanup__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./cleanup */ "../../framework/piral-base/esm/cleanup.js");
129076
129076
 
129077
+
129078
+ function logError(name, e) {
129079
+ console.error(`Error while setting up ${name}.`, e);
129080
+ }
129081
+
129082
+ function withCatch(result, name) {
129083
+ if (result instanceof Promise) {
129084
+ return result.catch(e => logError(name, e));
129085
+ }
129086
+
129087
+ return result;
129088
+ }
129077
129089
  /**
129078
129090
  * Sets up the given single pilet by calling the exported `setup`
129079
129091
  * function on the pilet with the created API.
@@ -129081,6 +129093,7 @@ __webpack_require__.r(__webpack_exports__);
129081
129093
  * @param api The generated API for the pilet.
129082
129094
  */
129083
129095
 
129096
+
129084
129097
  function setupSinglePilet(app, api) {
129085
129098
  try {
129086
129099
  const result = app.setup(api);
@@ -129099,9 +129112,9 @@ function setupSinglePilet(app, api) {
129099
129112
  };
129100
129113
 
129101
129114
  api.on(evtName, handler);
129102
- return result;
129115
+ return withCatch(result, app === null || app === void 0 ? void 0 : app.name);
129103
129116
  } catch (e) {
129104
- console.error(`Error while setting up ${app === null || app === void 0 ? void 0 : app.name}.`, e);
129117
+ logError(app === null || app === void 0 ? void 0 : app.name, e);
129105
129118
  }
129106
129119
  }
129107
129120
  /**
@@ -129113,9 +129126,9 @@ function setupSinglePilet(app, api) {
129113
129126
 
129114
129127
  function setupMultiPilet(app, apiFactory) {
129115
129128
  try {
129116
- return app.setup(apiFactory);
129129
+ return withCatch(app.setup(apiFactory), app === null || app === void 0 ? void 0 : app.name);
129117
129130
  } catch (e) {
129118
- console.error(`Error while setting up ${app === null || app === void 0 ? void 0 : app.name}.`, e);
129131
+ logError(app === null || app === void 0 ? void 0 : app.name, e);
129119
129132
  }
129120
129133
  }
129121
129134
  /**
@@ -129533,13 +129546,13 @@ __webpack_require__.r(__webpack_exports__);
129533
129546
  /* harmony export */ "RootListener": () => (/* binding */ RootListener)
129534
129547
  /* harmony export */ });
129535
129548
  /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "../../../node_modules/react/index.js");
129536
- /* harmony import */ var ___WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! . */ "../../framework/piral-core/esm/hooks/globalState.js");
129549
+ /* harmony import */ var _hooks__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./hooks */ "../../framework/piral-core/esm/hooks/globalState.js");
129537
129550
  /* harmony import */ var _modules__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./modules */ "../../framework/piral-core/esm/modules/element.js");
129538
129551
 
129539
129552
 
129540
129553
 
129541
129554
  const RootListener = () => {
129542
- const context = (0,___WEBPACK_IMPORTED_MODULE_1__.useGlobalStateContext)();
129555
+ const context = (0,_hooks__WEBPACK_IMPORTED_MODULE_1__.useGlobalStateContext)();
129543
129556
  react__WEBPACK_IMPORTED_MODULE_0__.useLayoutEffect(() => {
129544
129557
  if (typeof document !== 'undefined') {
129545
129558
  const handler = ev => {
@@ -130020,9 +130033,11 @@ class ErrorBoundary extends react__WEBPACK_IMPORTED_MODULE_0__.Component {
130020
130033
  const rest = renderProps;
130021
130034
 
130022
130035
  if (error) {
130036
+ const pilet = piral.meta.name;
130023
130037
  return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(_components__WEBPACK_IMPORTED_MODULE_2__.PiralError, Object.assign({
130024
130038
  type: errorType,
130025
- error: error
130039
+ error: error,
130040
+ pilet: pilet
130026
130041
  }, rest));
130027
130042
  }
130028
130043
 
@@ -130998,7 +131013,7 @@ function createInstance(config = {}) {
130998
131013
  const createApi = apiFactory(context, usedPlugins);
130999
131014
  const root = createApi({
131000
131015
  name: 'root',
131001
- version: "0.14.10" || 0,
131016
+ version: "0.14.11-beta.3686" || 0,
131002
131017
  spec: ''
131003
131018
  });
131004
131019
  const options = (0,_helpers__WEBPACK_IMPORTED_MODULE_6__.createPiletOptions)({
@@ -133385,11 +133400,11 @@ function installPiralDebug(options) {
133385
133400
  debug: debugApiVersion,
133386
133401
  instance: {
133387
133402
  name: "sample-cross-fx",
133388
- version: "0.14.10",
133403
+ version: "0.14.11-beta.3686",
133389
133404
  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"
133390
133405
  },
133391
133406
  build: {
133392
- date: "2022-02-04T21:48:33.785Z",
133407
+ date: "2022-02-17T15:44:06.500Z",
133393
133408
  cli: "0.14.10",
133394
133409
  compat: "0.14"
133395
133410
  },
@@ -255467,4 +255482,4 @@ const app = React.createElement(piral_core_1.Piral, {
255467
255482
 
255468
255483
  /******/ })()
255469
255484
  ;
255470
- //# sourceMappingURL=index.3c085d.js.map
255485
+ //# sourceMappingURL=index.295539.js.map