@module-federation/runtime-core 0.0.0-next-20250723075424 → 0.0.0-next-20250724110701
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.cjs +18 -9
- package/dist/index.esm.js +18 -9
- package/package.json +3 -3
package/dist/index.cjs.cjs
CHANGED
|
@@ -15,14 +15,20 @@ function assert(condition, msg) {
|
|
|
15
15
|
}
|
|
16
16
|
function error(msg) {
|
|
17
17
|
if (msg instanceof Error) {
|
|
18
|
-
|
|
18
|
+
// Check if the message already starts with the log category to avoid duplication
|
|
19
|
+
if (!msg.message.startsWith(LOG_CATEGORY)) {
|
|
20
|
+
msg.message = `${LOG_CATEGORY}: ${msg.message}`;
|
|
21
|
+
}
|
|
19
22
|
throw msg;
|
|
20
23
|
}
|
|
21
24
|
throw new Error(`${LOG_CATEGORY}: ${msg}`);
|
|
22
25
|
}
|
|
23
26
|
function warn(msg) {
|
|
24
27
|
if (msg instanceof Error) {
|
|
25
|
-
|
|
28
|
+
// Check if the message already starts with the log category to avoid duplication
|
|
29
|
+
if (!msg.message.startsWith(LOG_CATEGORY)) {
|
|
30
|
+
msg.message = `${LOG_CATEGORY}: ${msg.message}`;
|
|
31
|
+
}
|
|
26
32
|
logger.warn(msg);
|
|
27
33
|
} else {
|
|
28
34
|
logger.warn(msg);
|
|
@@ -1652,7 +1658,8 @@ class SyncWaterfallHook extends SyncHook {
|
|
|
1652
1658
|
return data;
|
|
1653
1659
|
}
|
|
1654
1660
|
constructor(type){
|
|
1655
|
-
super()
|
|
1661
|
+
super();
|
|
1662
|
+
this.onerror = error;
|
|
1656
1663
|
this.type = type;
|
|
1657
1664
|
}
|
|
1658
1665
|
}
|
|
@@ -1690,7 +1697,8 @@ class AsyncWaterfallHook extends SyncHook {
|
|
|
1690
1697
|
return Promise.resolve(data);
|
|
1691
1698
|
}
|
|
1692
1699
|
constructor(type){
|
|
1693
|
-
super()
|
|
1700
|
+
super();
|
|
1701
|
+
this.onerror = error;
|
|
1694
1702
|
this.type = type;
|
|
1695
1703
|
}
|
|
1696
1704
|
}
|
|
@@ -2290,6 +2298,7 @@ class SharedHandler {
|
|
|
2290
2298
|
if (gShared) {
|
|
2291
2299
|
gShared.lib = factory;
|
|
2292
2300
|
gShared.loaded = true;
|
|
2301
|
+
addUseIn(gShared);
|
|
2293
2302
|
}
|
|
2294
2303
|
return factory;
|
|
2295
2304
|
};
|
|
@@ -2332,10 +2341,10 @@ class SharedHandler {
|
|
|
2332
2341
|
}
|
|
2333
2342
|
}
|
|
2334
2343
|
/**
|
|
2335
|
-
|
|
2336
|
-
|
|
2337
|
-
|
|
2338
|
-
|
|
2344
|
+
* This function initializes the sharing sequence (executed only once per share scope).
|
|
2345
|
+
* It accepts one argument, the name of the share scope.
|
|
2346
|
+
* If the share scope does not exist, it creates one.
|
|
2347
|
+
*/ // eslint-disable-next-line @typescript-eslint/member-ordering
|
|
2339
2348
|
initializeSharing(shareScopeName = DEFAULT_SCOPE, extraOptions) {
|
|
2340
2349
|
const { host } = this;
|
|
2341
2350
|
const from = extraOptions == null ? void 0 : extraOptions.from;
|
|
@@ -3071,7 +3080,7 @@ class ModuleFederation {
|
|
|
3071
3080
|
}
|
|
3072
3081
|
|
|
3073
3082
|
var index = /*#__PURE__*/Object.freeze({
|
|
3074
|
-
|
|
3083
|
+
__proto__: null
|
|
3075
3084
|
});
|
|
3076
3085
|
|
|
3077
3086
|
exports.loadScript = sdk.loadScript;
|
package/dist/index.esm.js
CHANGED
|
@@ -14,14 +14,20 @@ function assert(condition, msg) {
|
|
|
14
14
|
}
|
|
15
15
|
function error(msg) {
|
|
16
16
|
if (msg instanceof Error) {
|
|
17
|
-
|
|
17
|
+
// Check if the message already starts with the log category to avoid duplication
|
|
18
|
+
if (!msg.message.startsWith(LOG_CATEGORY)) {
|
|
19
|
+
msg.message = `${LOG_CATEGORY}: ${msg.message}`;
|
|
20
|
+
}
|
|
18
21
|
throw msg;
|
|
19
22
|
}
|
|
20
23
|
throw new Error(`${LOG_CATEGORY}: ${msg}`);
|
|
21
24
|
}
|
|
22
25
|
function warn(msg) {
|
|
23
26
|
if (msg instanceof Error) {
|
|
24
|
-
|
|
27
|
+
// Check if the message already starts with the log category to avoid duplication
|
|
28
|
+
if (!msg.message.startsWith(LOG_CATEGORY)) {
|
|
29
|
+
msg.message = `${LOG_CATEGORY}: ${msg.message}`;
|
|
30
|
+
}
|
|
25
31
|
logger.warn(msg);
|
|
26
32
|
} else {
|
|
27
33
|
logger.warn(msg);
|
|
@@ -1651,7 +1657,8 @@ class SyncWaterfallHook extends SyncHook {
|
|
|
1651
1657
|
return data;
|
|
1652
1658
|
}
|
|
1653
1659
|
constructor(type){
|
|
1654
|
-
super()
|
|
1660
|
+
super();
|
|
1661
|
+
this.onerror = error;
|
|
1655
1662
|
this.type = type;
|
|
1656
1663
|
}
|
|
1657
1664
|
}
|
|
@@ -1689,7 +1696,8 @@ class AsyncWaterfallHook extends SyncHook {
|
|
|
1689
1696
|
return Promise.resolve(data);
|
|
1690
1697
|
}
|
|
1691
1698
|
constructor(type){
|
|
1692
|
-
super()
|
|
1699
|
+
super();
|
|
1700
|
+
this.onerror = error;
|
|
1693
1701
|
this.type = type;
|
|
1694
1702
|
}
|
|
1695
1703
|
}
|
|
@@ -2289,6 +2297,7 @@ class SharedHandler {
|
|
|
2289
2297
|
if (gShared) {
|
|
2290
2298
|
gShared.lib = factory;
|
|
2291
2299
|
gShared.loaded = true;
|
|
2300
|
+
addUseIn(gShared);
|
|
2292
2301
|
}
|
|
2293
2302
|
return factory;
|
|
2294
2303
|
};
|
|
@@ -2331,10 +2340,10 @@ class SharedHandler {
|
|
|
2331
2340
|
}
|
|
2332
2341
|
}
|
|
2333
2342
|
/**
|
|
2334
|
-
|
|
2335
|
-
|
|
2336
|
-
|
|
2337
|
-
|
|
2343
|
+
* This function initializes the sharing sequence (executed only once per share scope).
|
|
2344
|
+
* It accepts one argument, the name of the share scope.
|
|
2345
|
+
* If the share scope does not exist, it creates one.
|
|
2346
|
+
*/ // eslint-disable-next-line @typescript-eslint/member-ordering
|
|
2338
2347
|
initializeSharing(shareScopeName = DEFAULT_SCOPE, extraOptions) {
|
|
2339
2348
|
const { host } = this;
|
|
2340
2349
|
const from = extraOptions == null ? void 0 : extraOptions.from;
|
|
@@ -3070,7 +3079,7 @@ class ModuleFederation {
|
|
|
3070
3079
|
}
|
|
3071
3080
|
|
|
3072
3081
|
var index = /*#__PURE__*/Object.freeze({
|
|
3073
|
-
|
|
3082
|
+
__proto__: null
|
|
3074
3083
|
});
|
|
3075
3084
|
|
|
3076
3085
|
export { CurrentGlobal, Global, Module, ModuleFederation, addGlobalSnapshot, assert, getGlobalFederationConstructor, getGlobalSnapshot, getInfoWithoutType, getRegisteredShare, getRemoteEntry, getRemoteInfo, helpers, isStaticResourcesEqual, matchRemoteWithNameAndExpose, registerGlobalPlugins, resetFederationGlobalInfo, safeWrapper, satisfy, setGlobalFederationConstructor, setGlobalFederationInstance, index as types };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@module-federation/runtime-core",
|
|
3
|
-
"version": "0.0.0-next-
|
|
3
|
+
"version": "0.0.0-next-20250724110701",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"author": "zhouxiao <codingzx@gmail.com>",
|
|
6
6
|
"main": "./dist/index.cjs.cjs",
|
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
}
|
|
53
53
|
},
|
|
54
54
|
"dependencies": {
|
|
55
|
-
"@module-federation/sdk": "0.0.0-next-
|
|
56
|
-
"@module-federation/error-codes": "0.0.0-next-
|
|
55
|
+
"@module-federation/sdk": "0.0.0-next-20250724110701",
|
|
56
|
+
"@module-federation/error-codes": "0.0.0-next-20250724110701"
|
|
57
57
|
}
|
|
58
58
|
}
|