@elliemae/pui-app-bridge 2.25.0 → 2.26.0-alpha.0
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/dist/cjs/appBridge.js +173 -26
- package/dist/cjs/config/app.js +8 -0
- package/dist/cjs/frame.html +0 -21
- package/dist/cjs/loaders/script.js +12 -12
- package/dist/cjs/tests/serverHandlers.js +0 -8
- package/dist/esm/appBridge.js +173 -26
- package/dist/esm/config/app.js +8 -0
- package/dist/esm/frame.html +0 -21
- package/dist/esm/loaders/script.js +12 -12
- package/dist/esm/tests/serverHandlers.js +0 -8
- package/dist/public/assets/{frame.671d9de68be598da64ca.html → frame.4cbbcfa9ded96b660559.html} +0 -21
- package/dist/public/e2e-host.html +1 -1
- package/dist/public/e2e-index.html +1 -1
- package/dist/public/frame.html +1 -1
- package/dist/public/index.html +1 -1
- package/dist/public/js/emuiAppBridge.dc4dbeb6feea171656da.js +17 -0
- package/dist/public/js/emuiAppBridge.dc4dbeb6feea171656da.js.br +0 -0
- package/dist/public/js/emuiAppBridge.dc4dbeb6feea171656da.js.gz +0 -0
- package/dist/public/js/emuiAppBridge.dc4dbeb6feea171656da.js.map +1 -0
- package/dist/types/lib/appBridge.d.ts +11 -2
- package/dist/types/lib/config/app.d.ts +6 -0
- package/dist/types/lib/loaders/script.d.ts +5 -3
- package/dist/types/lib/typings/host.d.ts +5 -0
- package/dist/types/lib/typings/window.d.ts +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/dist/umd/{671d9de68be598da64ca.html → 4cbbcfa9ded96b660559.html} +0 -21
- package/dist/umd/frame.html +1 -1
- package/dist/umd/index.js +7 -7
- package/dist/umd/index.js.br +0 -0
- package/dist/umd/index.js.gz +0 -0
- package/dist/umd/index.js.map +1 -1
- package/package.json +5 -5
- package/dist/public/js/emuiAppBridge.87b9f6d6c712609094fd.js +0 -17
- package/dist/public/js/emuiAppBridge.87b9f6d6c712609094fd.js.br +0 -0
- package/dist/public/js/emuiAppBridge.87b9f6d6c712609094fd.js.gz +0 -0
- package/dist/public/js/emuiAppBridge.87b9f6d6c712609094fd.js.map +0 -1
|
@@ -80,9 +80,11 @@ export declare class CAppBridge<AppObjects extends ScriptingObjects = Partial<Sc
|
|
|
80
80
|
*/
|
|
81
81
|
getApps: () => IMicroFEGuest<Partial<ScriptingObjectTypes>, Events>[];
|
|
82
82
|
/**
|
|
83
|
-
* Initialize appBridge
|
|
83
|
+
* Initialize appBridge.
|
|
84
|
+
* @param preloadedAppConfig - Already-parsed config object. When provided
|
|
85
|
+
* the bridge skips its own HTTP fetch of app.config.json.
|
|
84
86
|
*/
|
|
85
|
-
init: () => Promise<void>;
|
|
87
|
+
init: (preloadedAppConfig?: Record<string, unknown>) => Promise<void>;
|
|
86
88
|
/**
|
|
87
89
|
* Mount guest micro frontend application into DOM
|
|
88
90
|
* @param instanceId unique instance id of guest micro frontend application
|
|
@@ -109,6 +111,13 @@ export declare class CAppBridge<AppObjects extends ScriptingObjects = Partial<Sc
|
|
|
109
111
|
* @param guestId
|
|
110
112
|
*/
|
|
111
113
|
removeScriptingObject: (objectId: Extract<keyof AppObjects, string>, guestId?: string) => void;
|
|
114
|
+
/**
|
|
115
|
+
* Pre-fetch the manifest for a guest application so that a subsequent
|
|
116
|
+
* {@link openApp} call can skip the manifest network round-trip.
|
|
117
|
+
* Safe to call multiple times — results are cached.
|
|
118
|
+
* @param id application id as defined in app.config.json
|
|
119
|
+
*/
|
|
120
|
+
warmUp: (id: string) => void;
|
|
112
121
|
/**
|
|
113
122
|
* Unmount guest micro frontend application from DOM
|
|
114
123
|
* @param instanceId unique instance id of guest micro frontend application
|
|
@@ -164,6 +164,12 @@ export declare class CAppConfig {
|
|
|
164
164
|
* @returns true if key exists
|
|
165
165
|
*/
|
|
166
166
|
has: (key?: string) => boolean;
|
|
167
|
+
/**
|
|
168
|
+
* Accept an already-parsed config object, skipping the HTTP fetch.
|
|
169
|
+
* Useful when the caller (e.g. pui-app-sdk) has already loaded the config.
|
|
170
|
+
* @param config
|
|
171
|
+
*/
|
|
172
|
+
setPreloadedConfig: (config: Record<string, unknown>) => void;
|
|
167
173
|
/**
|
|
168
174
|
* load application configuration from the given asset path
|
|
169
175
|
* @param assetPath url path to load app config from
|
|
@@ -51,9 +51,11 @@ export declare class ScriptLoader {
|
|
|
51
51
|
* This method:
|
|
52
52
|
* - Partitions assets into CDN (HTTP/HTTPS) and non-CDN (relative) arrays in a single pass
|
|
53
53
|
* - Creates modulepreload links for all assets for performance optimization
|
|
54
|
-
* -
|
|
55
|
-
*
|
|
56
|
-
* -
|
|
54
|
+
* - Appends all script elements to the DOM synchronously so the browser
|
|
55
|
+
* can download them in parallel
|
|
56
|
+
* - Execution order is preserved by the spec: type="module" scripts
|
|
57
|
+
* execute in document order; dynamic async=false scripts execute in
|
|
58
|
+
* insertion order
|
|
57
59
|
* @example
|
|
58
60
|
* ```typescript
|
|
59
61
|
* const scriptIds = await scriptLoader.load(
|
|
@@ -49,6 +49,11 @@ export type OpenAppParams = {
|
|
|
49
49
|
* forwarded through cloned scripting objects.
|
|
50
50
|
*/
|
|
51
51
|
metadata?: Record<string, unknown>;
|
|
52
|
+
/**
|
|
53
|
+
* When true the guest drives its own lifecycle via initialize() and
|
|
54
|
+
* the bridge skips calling init() / mount() on the guest.
|
|
55
|
+
*/
|
|
56
|
+
selfInitialize?: boolean;
|
|
52
57
|
};
|
|
53
58
|
/**
|
|
54
59
|
* Interface to connect and communicate with parent host
|