piral-core 0.14.9 → 0.15.0-alpha.3549
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.
- package/debug-pilet.js +1 -0
- package/esm/helpers.d.ts +3 -2
- package/esm/helpers.js +2 -1
- package/esm/helpers.js.map +1 -1
- package/lib/helpers.d.ts +3 -2
- package/lib/helpers.js +2 -1
- package/lib/helpers.js.map +1 -1
- package/package.json +4 -4
- package/src/helpers.tsx +4 -0
package/debug-pilet.js
CHANGED
|
@@ -5,6 +5,7 @@ var piral_debug_utils_1 = require("piral-debug-utils");
|
|
|
5
5
|
function integrate(context, options) {
|
|
6
6
|
options.fetchPilets = (0, piral_debug_utils_1.withEmulatorPilets)(options.fetchPilets, {
|
|
7
7
|
injectPilet: context.injectPilet,
|
|
8
|
+
hooks: options.hooks,
|
|
8
9
|
createApi: options.createApi,
|
|
9
10
|
loadPilet: options.loadPilet
|
|
10
11
|
});
|
package/esm/helpers.d.ts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { PiletApiCreator, LoadPiletsOptions, CustomSpecLoaders, DefaultLoaderConfig, PiletLoader } from 'piral-base';
|
|
1
|
+
import { PiletApiCreator, LoadPiletsOptions, CustomSpecLoaders, DefaultLoaderConfig, PiletLoader, PiletLifecycleHooks } from 'piral-base';
|
|
2
2
|
import { DebuggerExtensionOptions } from 'piral-debug-utils';
|
|
3
3
|
import type { Pilet, PiletRequester, GlobalStateContext, PiletLoadingStrategy, DependencySelector } from './types';
|
|
4
4
|
export interface PiletOptionsConfig {
|
|
5
5
|
context: GlobalStateContext;
|
|
6
|
+
hooks?: PiletLifecycleHooks;
|
|
6
7
|
loaders?: CustomSpecLoaders;
|
|
7
8
|
loaderConfig?: DefaultLoaderConfig;
|
|
8
9
|
availablePilets: Array<Pilet>;
|
|
@@ -13,4 +14,4 @@ export interface PiletOptionsConfig {
|
|
|
13
14
|
shareDependencies: DependencySelector;
|
|
14
15
|
debug?: DebuggerExtensionOptions;
|
|
15
16
|
}
|
|
16
|
-
export declare function createPiletOptions({ context, loaders, loaderConfig, availablePilets, strategy, createApi, loadPilet, requestPilets, shareDependencies, debug, }: PiletOptionsConfig): LoadPiletsOptions;
|
|
17
|
+
export declare function createPiletOptions({ hooks, context, loaders, loaderConfig, availablePilets, strategy, createApi, loadPilet, requestPilets, shareDependencies, debug, }: PiletOptionsConfig): LoadPiletsOptions;
|
package/esm/helpers.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { getDefaultLoader, extendLoader, } from 'piral-base';
|
|
2
2
|
import { globalDependencies } from './modules';
|
|
3
|
-
export function createPiletOptions({ context, loaders, loaderConfig, availablePilets, strategy, createApi, loadPilet, requestPilets, shareDependencies, debug, }) {
|
|
3
|
+
export function createPiletOptions({ hooks, context, loaders, loaderConfig, availablePilets, strategy, createApi, loadPilet, requestPilets, shareDependencies, debug, }) {
|
|
4
4
|
const options = {
|
|
5
5
|
config: loaderConfig,
|
|
6
6
|
strategy,
|
|
@@ -8,6 +8,7 @@ export function createPiletOptions({ context, loaders, loaderConfig, availablePi
|
|
|
8
8
|
createApi,
|
|
9
9
|
pilets: availablePilets,
|
|
10
10
|
fetchPilets: requestPilets,
|
|
11
|
+
hooks,
|
|
11
12
|
dependencies: shareDependencies(globalDependencies),
|
|
12
13
|
};
|
|
13
14
|
// if we build the debug version of piral (debug and emulator build)
|
package/esm/helpers.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"helpers.js","sourceRoot":"","sources":["../src/helpers.tsx"],"names":[],"mappings":"AAAA,OAAO,EAKL,gBAAgB,EAChB,YAAY,
|
|
1
|
+
{"version":3,"file":"helpers.js","sourceRoot":"","sources":["../src/helpers.tsx"],"names":[],"mappings":"AAAA,OAAO,EAKL,gBAAgB,EAChB,YAAY,GAGb,MAAM,YAAY,CAAC;AAEpB,OAAO,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAC;AAiB/C,MAAM,UAAU,kBAAkB,CAAC,EACjC,KAAK,EACL,OAAO,EACP,OAAO,EACP,YAAY,EACZ,eAAe,EACf,QAAQ,EACR,SAAS,EACT,SAAS,EACT,aAAa,EACb,iBAAiB,EACjB,KAAK,GACc;IACnB,MAAM,OAAO,GAAsB;QACjC,MAAM,EAAE,YAAY;QACpB,QAAQ;QACR,SAAS,EAAE,YAAY,CAAC,SAAS,aAAT,SAAS,cAAT,SAAS,GAAI,gBAAgB,CAAC,YAAY,CAAC,EAAE,OAAO,CAAC;QAC7E,SAAS;QACT,MAAM,EAAE,eAAe;QACvB,WAAW,EAAE,aAAa;QAC1B,KAAK;QACL,YAAY,EAAE,iBAAiB,CAAC,kBAAkB,CAAC;KACpD,CAAC;IAEF,oEAAoE;IACpE,IAAI,OAAO,CAAC,GAAG,CAAC,WAAW,EAAE;QAC3B,MAAM,EAAE,SAAS,EAAE,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAAC;QAChD,SAAS,CAAC,OAAO,EAAE,OAAO,EAAE,KAAK,CAAC,CAAC;KACpC;IAED,gEAAgE;IAChE,IAAI,OAAO,CAAC,GAAG,CAAC,WAAW,EAAE;QAC3B,MAAM,EAAE,SAAS,EAAE,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAAC;QAChD,SAAS,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;KAC7B;IAED,OAAO,OAAO,CAAC;AACjB,CAAC"}
|
package/lib/helpers.d.ts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { PiletApiCreator, LoadPiletsOptions, CustomSpecLoaders, DefaultLoaderConfig, PiletLoader } from 'piral-base';
|
|
1
|
+
import { PiletApiCreator, LoadPiletsOptions, CustomSpecLoaders, DefaultLoaderConfig, PiletLoader, PiletLifecycleHooks } from 'piral-base';
|
|
2
2
|
import { DebuggerExtensionOptions } from 'piral-debug-utils';
|
|
3
3
|
import type { Pilet, PiletRequester, GlobalStateContext, PiletLoadingStrategy, DependencySelector } from './types';
|
|
4
4
|
export interface PiletOptionsConfig {
|
|
5
5
|
context: GlobalStateContext;
|
|
6
|
+
hooks?: PiletLifecycleHooks;
|
|
6
7
|
loaders?: CustomSpecLoaders;
|
|
7
8
|
loaderConfig?: DefaultLoaderConfig;
|
|
8
9
|
availablePilets: Array<Pilet>;
|
|
@@ -13,4 +14,4 @@ export interface PiletOptionsConfig {
|
|
|
13
14
|
shareDependencies: DependencySelector;
|
|
14
15
|
debug?: DebuggerExtensionOptions;
|
|
15
16
|
}
|
|
16
|
-
export declare function createPiletOptions({ context, loaders, loaderConfig, availablePilets, strategy, createApi, loadPilet, requestPilets, shareDependencies, debug, }: PiletOptionsConfig): LoadPiletsOptions;
|
|
17
|
+
export declare function createPiletOptions({ hooks, context, loaders, loaderConfig, availablePilets, strategy, createApi, loadPilet, requestPilets, shareDependencies, debug, }: PiletOptionsConfig): LoadPiletsOptions;
|
package/lib/helpers.js
CHANGED
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.createPiletOptions = void 0;
|
|
4
4
|
const piral_base_1 = require("piral-base");
|
|
5
5
|
const modules_1 = require("./modules");
|
|
6
|
-
function createPiletOptions({ context, loaders, loaderConfig, availablePilets, strategy, createApi, loadPilet, requestPilets, shareDependencies, debug, }) {
|
|
6
|
+
function createPiletOptions({ hooks, context, loaders, loaderConfig, availablePilets, strategy, createApi, loadPilet, requestPilets, shareDependencies, debug, }) {
|
|
7
7
|
const options = {
|
|
8
8
|
config: loaderConfig,
|
|
9
9
|
strategy,
|
|
@@ -11,6 +11,7 @@ function createPiletOptions({ context, loaders, loaderConfig, availablePilets, s
|
|
|
11
11
|
createApi,
|
|
12
12
|
pilets: availablePilets,
|
|
13
13
|
fetchPilets: requestPilets,
|
|
14
|
+
hooks,
|
|
14
15
|
dependencies: shareDependencies(modules_1.globalDependencies),
|
|
15
16
|
};
|
|
16
17
|
// if we build the debug version of piral (debug and emulator build)
|
package/lib/helpers.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"helpers.js","sourceRoot":"","sources":["../src/helpers.tsx"],"names":[],"mappings":";;;AAAA,
|
|
1
|
+
{"version":3,"file":"helpers.js","sourceRoot":"","sources":["../src/helpers.tsx"],"names":[],"mappings":";;;AAAA,2CASoB;AAEpB,uCAA+C;AAiB/C,SAAgB,kBAAkB,CAAC,EACjC,KAAK,EACL,OAAO,EACP,OAAO,EACP,YAAY,EACZ,eAAe,EACf,QAAQ,EACR,SAAS,EACT,SAAS,EACT,aAAa,EACb,iBAAiB,EACjB,KAAK,GACc;IACnB,MAAM,OAAO,GAAsB;QACjC,MAAM,EAAE,YAAY;QACpB,QAAQ;QACR,SAAS,EAAE,IAAA,yBAAY,EAAC,SAAS,aAAT,SAAS,cAAT,SAAS,GAAI,IAAA,6BAAgB,EAAC,YAAY,CAAC,EAAE,OAAO,CAAC;QAC7E,SAAS;QACT,MAAM,EAAE,eAAe;QACvB,WAAW,EAAE,aAAa;QAC1B,KAAK;QACL,YAAY,EAAE,iBAAiB,CAAC,4BAAkB,CAAC;KACpD,CAAC;IAEF,oEAAoE;IACpE,IAAI,OAAO,CAAC,GAAG,CAAC,WAAW,EAAE;QAC3B,MAAM,EAAE,SAAS,EAAE,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAAC;QAChD,SAAS,CAAC,OAAO,EAAE,OAAO,EAAE,KAAK,CAAC,CAAC;KACpC;IAED,gEAAgE;IAChE,IAAI,OAAO,CAAC,GAAG,CAAC,WAAW,EAAE;QAC3B,MAAM,EAAE,SAAS,EAAE,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAAC;QAChD,SAAS,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;KAC7B;IAED,OAAO,OAAO,CAAC;AACjB,CAAC;AArCD,gDAqCC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "piral-core",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.15.0-alpha.3549",
|
|
4
4
|
"description": "The core library for creating a Piral instance.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"portal",
|
|
@@ -50,8 +50,8 @@
|
|
|
50
50
|
},
|
|
51
51
|
"dependencies": {
|
|
52
52
|
"@dbeining/react-atom": "^4.0.0",
|
|
53
|
-
"piral-base": "
|
|
54
|
-
"piral-debug-utils": "
|
|
53
|
+
"piral-base": "0.15.0-alpha.3549",
|
|
54
|
+
"piral-debug-utils": "0.15.0-alpha.3549"
|
|
55
55
|
},
|
|
56
56
|
"peerDependencies": {
|
|
57
57
|
"react": ">=16.8.0",
|
|
@@ -78,5 +78,5 @@
|
|
|
78
78
|
"@libre/atom",
|
|
79
79
|
"@dbeining/react-atom"
|
|
80
80
|
],
|
|
81
|
-
"gitHead": "
|
|
81
|
+
"gitHead": "2edf7bbcee6a7e931348198d14139c7f958877e7"
|
|
82
82
|
}
|
package/src/helpers.tsx
CHANGED
|
@@ -6,6 +6,7 @@ import {
|
|
|
6
6
|
getDefaultLoader,
|
|
7
7
|
extendLoader,
|
|
8
8
|
PiletLoader,
|
|
9
|
+
PiletLifecycleHooks,
|
|
9
10
|
} from 'piral-base';
|
|
10
11
|
import { DebuggerExtensionOptions } from 'piral-debug-utils';
|
|
11
12
|
import { globalDependencies } from './modules';
|
|
@@ -13,6 +14,7 @@ import type { Pilet, PiletRequester, GlobalStateContext, PiletLoadingStrategy, D
|
|
|
13
14
|
|
|
14
15
|
export interface PiletOptionsConfig {
|
|
15
16
|
context: GlobalStateContext;
|
|
17
|
+
hooks?: PiletLifecycleHooks;
|
|
16
18
|
loaders?: CustomSpecLoaders;
|
|
17
19
|
loaderConfig?: DefaultLoaderConfig;
|
|
18
20
|
availablePilets: Array<Pilet>;
|
|
@@ -25,6 +27,7 @@ export interface PiletOptionsConfig {
|
|
|
25
27
|
}
|
|
26
28
|
|
|
27
29
|
export function createPiletOptions({
|
|
30
|
+
hooks,
|
|
28
31
|
context,
|
|
29
32
|
loaders,
|
|
30
33
|
loaderConfig,
|
|
@@ -43,6 +46,7 @@ export function createPiletOptions({
|
|
|
43
46
|
createApi,
|
|
44
47
|
pilets: availablePilets,
|
|
45
48
|
fetchPilets: requestPilets,
|
|
49
|
+
hooks,
|
|
46
50
|
dependencies: shareDependencies(globalDependencies),
|
|
47
51
|
};
|
|
48
52
|
|