@module-federation/runtime
Advanced tools
Comparing version 0.0.0-next-20231229025030 to 0.0.0-next-20231229074949
@@ -94,10 +94,17 @@ 'use strict'; | ||
const Global = nativeGlobal; | ||
function definePropertyGlobalVal(target, key, val) { | ||
Object.defineProperty(target, key, { | ||
value: val, | ||
configurable: false, | ||
writable: true | ||
}); | ||
} | ||
function includeOwnProperty(target, key) { | ||
return Object.hasOwnProperty.call(target, key); | ||
} | ||
// This section is to prevent encapsulation by certain microfrontend frameworks. Due to reuse policies, sandbox escapes. | ||
// The sandbox in the microfrontend does not replicate the value of 'configurable'. | ||
// If there is no loading content on the global object, this section defines the loading object. | ||
if (!Object.hasOwnProperty.call(globalThis, '__GLOBAL_LOADING_REMOTE_ENTRY__')) { | ||
Object.defineProperty(globalThis, '__GLOBAL_LOADING_REMOTE_ENTRY__', { | ||
value: {}, | ||
configurable: false | ||
}); | ||
if (!includeOwnProperty(globalThis, '__GLOBAL_LOADING_REMOTE_ENTRY__')) { | ||
definePropertyGlobalVal(globalThis, '__GLOBAL_LOADING_REMOTE_ENTRY__', {}); | ||
} | ||
@@ -107,25 +114,18 @@ const globalLoading = globalThis.__GLOBAL_LOADING_REMOTE_ENTRY__; | ||
var _target___FEDERATION__, _target___FEDERATION__1, _target___FEDERATION__2, _target___FEDERATION__3, _target___FEDERATION__4, _target___FEDERATION__5, _target___FEDERATION__6; | ||
if (Object.hasOwnProperty.call(target, '__VMOK__')) { | ||
Object.defineProperty(target, '__FEDERATION__', { | ||
value: target.__VMOK__, | ||
configurable: false | ||
}); | ||
if (includeOwnProperty(target, '__VMOK__') && !includeOwnProperty(target, '__FEDERATION__')) { | ||
definePropertyGlobalVal(target, '__FEDERATION__', target.__VMOK__); | ||
} | ||
if (!Object.hasOwnProperty.call(target, '__FEDERATION__')) { | ||
Object.defineProperty(target, '__FEDERATION__', { | ||
value: { | ||
__GLOBAL_PLUGIN__: [], | ||
__INSTANCES__: [], | ||
moduleInfo: {}, | ||
__SHARE__: {}, | ||
__MANIFEST_LOADING__: {}, | ||
__SHARE_SCOPE_LOADING__: {}, | ||
__PRELOADED_MAP__: new Map() | ||
}, | ||
configurable: false | ||
if (!includeOwnProperty(target, '__FEDERATION__')) { | ||
definePropertyGlobalVal(target, '__FEDERATION__', { | ||
__GLOBAL_PLUGIN__: [], | ||
__INSTANCES__: [], | ||
moduleInfo: {}, | ||
__SHARE__: {}, | ||
__MANIFEST_LOADING__: {}, | ||
__SHARE_SCOPE_LOADING__: {}, | ||
__PRELOADED_MAP__: new Map() | ||
}); | ||
Object.defineProperty(target, '__VMOK__', { | ||
value: target.__FEDERATION__, | ||
configurable: false | ||
}); | ||
if (!includeOwnProperty(target, '__FEDERATION__')) { | ||
definePropertyGlobalVal(target, '__VMOK__', target.__FEDERATION__); | ||
} | ||
} | ||
@@ -132,0 +132,0 @@ var ___GLOBAL_PLUGIN__; |
@@ -92,10 +92,17 @@ function getBuilderId() { | ||
const Global = nativeGlobal; | ||
function definePropertyGlobalVal(target, key, val) { | ||
Object.defineProperty(target, key, { | ||
value: val, | ||
configurable: false, | ||
writable: true | ||
}); | ||
} | ||
function includeOwnProperty(target, key) { | ||
return Object.hasOwnProperty.call(target, key); | ||
} | ||
// This section is to prevent encapsulation by certain microfrontend frameworks. Due to reuse policies, sandbox escapes. | ||
// The sandbox in the microfrontend does not replicate the value of 'configurable'. | ||
// If there is no loading content on the global object, this section defines the loading object. | ||
if (!Object.hasOwnProperty.call(globalThis, '__GLOBAL_LOADING_REMOTE_ENTRY__')) { | ||
Object.defineProperty(globalThis, '__GLOBAL_LOADING_REMOTE_ENTRY__', { | ||
value: {}, | ||
configurable: false | ||
}); | ||
if (!includeOwnProperty(globalThis, '__GLOBAL_LOADING_REMOTE_ENTRY__')) { | ||
definePropertyGlobalVal(globalThis, '__GLOBAL_LOADING_REMOTE_ENTRY__', {}); | ||
} | ||
@@ -105,25 +112,18 @@ const globalLoading = globalThis.__GLOBAL_LOADING_REMOTE_ENTRY__; | ||
var _target___FEDERATION__, _target___FEDERATION__1, _target___FEDERATION__2, _target___FEDERATION__3, _target___FEDERATION__4, _target___FEDERATION__5, _target___FEDERATION__6; | ||
if (Object.hasOwnProperty.call(target, '__VMOK__')) { | ||
Object.defineProperty(target, '__FEDERATION__', { | ||
value: target.__VMOK__, | ||
configurable: false | ||
}); | ||
if (includeOwnProperty(target, '__VMOK__') && !includeOwnProperty(target, '__FEDERATION__')) { | ||
definePropertyGlobalVal(target, '__FEDERATION__', target.__VMOK__); | ||
} | ||
if (!Object.hasOwnProperty.call(target, '__FEDERATION__')) { | ||
Object.defineProperty(target, '__FEDERATION__', { | ||
value: { | ||
__GLOBAL_PLUGIN__: [], | ||
__INSTANCES__: [], | ||
moduleInfo: {}, | ||
__SHARE__: {}, | ||
__MANIFEST_LOADING__: {}, | ||
__SHARE_SCOPE_LOADING__: {}, | ||
__PRELOADED_MAP__: new Map() | ||
}, | ||
configurable: false | ||
if (!includeOwnProperty(target, '__FEDERATION__')) { | ||
definePropertyGlobalVal(target, '__FEDERATION__', { | ||
__GLOBAL_PLUGIN__: [], | ||
__INSTANCES__: [], | ||
moduleInfo: {}, | ||
__SHARE__: {}, | ||
__MANIFEST_LOADING__: {}, | ||
__SHARE_SCOPE_LOADING__: {}, | ||
__PRELOADED_MAP__: new Map() | ||
}); | ||
Object.defineProperty(target, '__VMOK__', { | ||
value: target.__FEDERATION__, | ||
configurable: false | ||
}); | ||
if (!includeOwnProperty(target, '__FEDERATION__')) { | ||
definePropertyGlobalVal(target, '__VMOK__', target.__FEDERATION__); | ||
} | ||
} | ||
@@ -130,0 +130,0 @@ var ___GLOBAL_PLUGIN__; |
{ | ||
"name": "@module-federation/runtime", | ||
"version": "0.0.0-next-20231229025030", | ||
"version": "0.0.0-next-20231229074949", | ||
"author": "zhouxiao <codingzx@gmail.com>", | ||
@@ -48,4 +48,4 @@ "main": "./dist/index.cjs", | ||
"dependencies": { | ||
"@module-federation/sdk": "0.0.0-next-20231229025030" | ||
"@module-federation/sdk": "0.0.0-next-20231229074949" | ||
} | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
238042
+ Added@module-federation/sdk@0.0.0-next-20231229074949(transitive)
- Removed@module-federation/sdk@0.0.0-next-20231229025030(transitive)