@module-federation/runtime 0.0.0-next-20240308070801 → 0.0.0-next-20240309014600
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/index.cjs.js +6 -2
- package/dist/index.esm.js +6 -4
- package/dist/package.json +1 -1
- package/dist/share.cjs.js +1 -1
- package/dist/share.esm.js +2 -2
- package/dist/src/core.d.ts +2 -0
- package/dist/src/index.d.ts +1 -0
- package/dist/src/utils/index.d.ts +1 -0
- package/package.json +2 -2
package/dist/index.cjs.js
CHANGED
|
@@ -786,7 +786,9 @@ function generatePreloadAssets(origin, preloadOptions, remote, globalSnapshot, r
|
|
|
786
786
|
id: assetsInfo.moduleName === '.' ? remoteInfo.name : exposeFullPath,
|
|
787
787
|
name: remoteInfo.name,
|
|
788
788
|
remoteSnapshot: moduleInfoSnapshot,
|
|
789
|
-
preloadConfig
|
|
789
|
+
preloadConfig,
|
|
790
|
+
remote: remoteInfo,
|
|
791
|
+
origin
|
|
790
792
|
});
|
|
791
793
|
const preloaded = share.getPreloaded(exposeFullPath);
|
|
792
794
|
if (preloaded) {
|
|
@@ -1605,7 +1607,7 @@ class FederationHost {
|
|
|
1605
1607
|
// not used yet
|
|
1606
1608
|
afterPreloadRemote: new AsyncHook()
|
|
1607
1609
|
});
|
|
1608
|
-
this.version = "0.0.
|
|
1610
|
+
this.version = "0.0.15";
|
|
1609
1611
|
this.moduleCache = new Map();
|
|
1610
1612
|
this.loaderHook = new PluginSystem({
|
|
1611
1613
|
// FIXME: may not be suitable , not open to the public yet
|
|
@@ -1693,6 +1695,8 @@ Object.defineProperty(exports, 'loadScriptNode', {
|
|
|
1693
1695
|
get: function () { return sdk.loadScriptNode; }
|
|
1694
1696
|
});
|
|
1695
1697
|
exports.FederationHost = FederationHost;
|
|
1698
|
+
exports.getRemoteEntry = getRemoteEntry;
|
|
1699
|
+
exports.getRemoteInfo = getRemoteInfo;
|
|
1696
1700
|
exports.init = init;
|
|
1697
1701
|
exports.loadRemote = loadRemote;
|
|
1698
1702
|
exports.loadShare = loadShare;
|
package/dist/index.esm.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { g as getGlobalHostPlugins,
|
|
1
|
+
import { g as getGlobalHostPlugins, a as globalLoading, D as DEFAULT_REMOTE_TYPE, b as DEFAULT_SCOPE, c as getRemoteEntryExports, d as assert, s as safeToString, e as getFMId, i as isObject, f as error, w as warn, h as isPlainObject, j as isRemoteInfoWithEntry, k as isPureRemoteEntry, l as getRegisteredShare, m as getInfoWithoutType, n as getPreloaded, o as setPreloaded, p as getGlobalSnapshotInfoByModuleInfo, q as addGlobalSnapshot, r as setGlobalSnapshotInfoByModuleInfo, t as getGlobalSnapshot, G as Global, u as getGlobalShareScope, v as formatShareConfigs, x as isBrowserEnv, y as getBuilderId, z as addUniqueItem, A as setGlobalFederationConstructor, B as getGlobalFederationInstance, C as getGlobalFederationConstructor, E as setGlobalFederationInstance } from './share.esm.js';
|
|
2
2
|
export { F as registerGlobalPlugins } from './share.esm.js';
|
|
3
3
|
import { composeKeyWithSeparator, loadScriptNode, loadScript, createLink, getResourceUrl, isManifestProvider, generateSnapshotFromManifest } from '@module-federation/sdk';
|
|
4
4
|
export { loadScript, loadScriptNode } from '@module-federation/sdk';
|
|
@@ -784,7 +784,9 @@ function generatePreloadAssets(origin, preloadOptions, remote, globalSnapshot, r
|
|
|
784
784
|
id: assetsInfo.moduleName === '.' ? remoteInfo.name : exposeFullPath,
|
|
785
785
|
name: remoteInfo.name,
|
|
786
786
|
remoteSnapshot: moduleInfoSnapshot,
|
|
787
|
-
preloadConfig
|
|
787
|
+
preloadConfig,
|
|
788
|
+
remote: remoteInfo,
|
|
789
|
+
origin
|
|
788
790
|
});
|
|
789
791
|
const preloaded = getPreloaded(exposeFullPath);
|
|
790
792
|
if (preloaded) {
|
|
@@ -1603,7 +1605,7 @@ class FederationHost {
|
|
|
1603
1605
|
// not used yet
|
|
1604
1606
|
afterPreloadRemote: new AsyncHook()
|
|
1605
1607
|
});
|
|
1606
|
-
this.version = "0.0.
|
|
1608
|
+
this.version = "0.0.15";
|
|
1607
1609
|
this.moduleCache = new Map();
|
|
1608
1610
|
this.loaderHook = new PluginSystem({
|
|
1609
1611
|
// FIXME: may not be suitable , not open to the public yet
|
|
@@ -1681,4 +1683,4 @@ function preloadRemote(...args) {
|
|
|
1681
1683
|
// Inject for debug
|
|
1682
1684
|
setGlobalFederationConstructor(FederationHost);
|
|
1683
1685
|
|
|
1684
|
-
export { FederationHost, init, loadRemote, loadShare, loadShareSync, preloadRemote };
|
|
1686
|
+
export { FederationHost, getRemoteEntry, getRemoteInfo, init, loadRemote, loadShare, loadShareSync, preloadRemote };
|
package/dist/package.json
CHANGED
package/dist/share.cjs.js
CHANGED
|
@@ -185,7 +185,7 @@ function getGlobalFederationConstructor() {
|
|
|
185
185
|
function setGlobalFederationConstructor(FederationConstructor, isDebug = isDebugMode()) {
|
|
186
186
|
if (isDebug) {
|
|
187
187
|
globalThis.__FEDERATION__.__DEBUG_CONSTRUCTOR__ = FederationConstructor;
|
|
188
|
-
globalThis.__FEDERATION__.__DEBUG_CONSTRUCTOR_VERSION__ = "0.0.
|
|
188
|
+
globalThis.__FEDERATION__.__DEBUG_CONSTRUCTOR_VERSION__ = "0.0.15";
|
|
189
189
|
}
|
|
190
190
|
}
|
|
191
191
|
// eslint-disable-next-line @typescript-eslint/ban-types
|
package/dist/share.esm.js
CHANGED
|
@@ -183,7 +183,7 @@ function getGlobalFederationConstructor() {
|
|
|
183
183
|
function setGlobalFederationConstructor(FederationConstructor, isDebug = isDebugMode()) {
|
|
184
184
|
if (isDebug) {
|
|
185
185
|
globalThis.__FEDERATION__.__DEBUG_CONSTRUCTOR__ = FederationConstructor;
|
|
186
|
-
globalThis.__FEDERATION__.__DEBUG_CONSTRUCTOR_VERSION__ = "0.0.
|
|
186
|
+
globalThis.__FEDERATION__.__DEBUG_CONSTRUCTOR_VERSION__ = "0.0.15";
|
|
187
187
|
}
|
|
188
188
|
}
|
|
189
189
|
// eslint-disable-next-line @typescript-eslint/ban-types
|
|
@@ -803,4 +803,4 @@ function getGlobalShareScope() {
|
|
|
803
803
|
return Global.__FEDERATION__.__SHARE__;
|
|
804
804
|
}
|
|
805
805
|
|
|
806
|
-
export { setGlobalFederationConstructor as A, getGlobalFederationInstance as B, getGlobalFederationConstructor as C, DEFAULT_REMOTE_TYPE as D, setGlobalFederationInstance as E, registerGlobalPlugins as F, Global as G, nativeGlobal as H, resetFederationGlobalInfo as I, getTargetSnapshotInfoByModuleInfo as J,
|
|
806
|
+
export { setGlobalFederationConstructor as A, getGlobalFederationInstance as B, getGlobalFederationConstructor as C, DEFAULT_REMOTE_TYPE as D, setGlobalFederationInstance as E, registerGlobalPlugins as F, Global as G, nativeGlobal as H, resetFederationGlobalInfo as I, getTargetSnapshotInfoByModuleInfo as J, globalLoading as a, DEFAULT_SCOPE as b, getRemoteEntryExports as c, assert as d, getFMId as e, error as f, getGlobalHostPlugins as g, isPlainObject as h, isObject as i, isRemoteInfoWithEntry as j, isPureRemoteEntry as k, getRegisteredShare as l, getInfoWithoutType as m, getPreloaded as n, setPreloaded as o, getGlobalSnapshotInfoByModuleInfo as p, addGlobalSnapshot as q, setGlobalSnapshotInfoByModuleInfo as r, safeToString as s, getGlobalSnapshot as t, getGlobalShareScope as u, formatShareConfigs as v, warn as w, isBrowserEnv as x, getBuilderId as y, addUniqueItem as z };
|
package/dist/src/core.d.ts
CHANGED
|
@@ -67,8 +67,10 @@ export declare class FederationHost {
|
|
|
67
67
|
handlePreloadModule: SyncHook<{
|
|
68
68
|
id: string;
|
|
69
69
|
name: string;
|
|
70
|
+
remote: Remote;
|
|
70
71
|
remoteSnapshot: ModuleInfo;
|
|
71
72
|
preloadConfig: PreloadRemoteArgs;
|
|
73
|
+
origin: FederationHost;
|
|
72
74
|
}, void>;
|
|
73
75
|
errorLoadRemote: AsyncHook<[{
|
|
74
76
|
id: string;
|
package/dist/src/index.d.ts
CHANGED
|
@@ -2,6 +2,7 @@ import { FederationHost } from './core';
|
|
|
2
2
|
import { UserOptions, FederationRuntimePlugin } from './type';
|
|
3
3
|
export { FederationHost } from './core';
|
|
4
4
|
export { registerGlobalPlugins } from './global';
|
|
5
|
+
export { getRemoteEntry, getRemoteInfo } from './utils';
|
|
5
6
|
export { loadScript, loadScriptNode } from '@module-federation/sdk';
|
|
6
7
|
export type { Federation } from './global';
|
|
7
8
|
export type { FederationRuntimePlugin };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@module-federation/runtime",
|
|
3
|
-
"version": "0.0.0-next-
|
|
3
|
+
"version": "0.0.0-next-20240309014600",
|
|
4
4
|
"author": "zhouxiao <codingzx@gmail.com>",
|
|
5
5
|
"main": "./dist/index.cjs",
|
|
6
6
|
"module": "./dist/index.esm.js",
|
|
@@ -45,6 +45,6 @@
|
|
|
45
45
|
}
|
|
46
46
|
},
|
|
47
47
|
"dependencies": {
|
|
48
|
-
"@module-federation/sdk": "0.0.0-next-
|
|
48
|
+
"@module-federation/sdk": "0.0.0-next-20240309014600"
|
|
49
49
|
}
|
|
50
50
|
}
|