@module-federation/runtime 0.8.6 → 0.8.7

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.
Files changed (55) hide show
  1. package/dist/core.cjs.d.ts +2 -0
  2. package/dist/core.cjs.js +15 -0
  3. package/dist/core.esm.d.ts +2 -0
  4. package/dist/core.esm.mjs +3 -0
  5. package/dist/helpers.cjs.js +7 -27
  6. package/dist/helpers.esm.mjs +7 -27
  7. package/dist/index.cjs.js +34 -2086
  8. package/dist/index.esm.mjs +4 -2072
  9. package/dist/polyfills.cjs.js +0 -14
  10. package/dist/polyfills.esm.mjs +1 -14
  11. package/dist/src/core.d.ts +3 -114
  12. package/dist/src/embedded.d.ts +49 -49
  13. package/dist/src/helpers.d.ts +23 -29
  14. package/dist/src/index.d.ts +3 -9
  15. package/dist/src/types.d.ts +1 -1
  16. package/dist/src/utils.d.ts +3 -0
  17. package/dist/types.cjs.js +10 -0
  18. package/dist/types.esm.mjs +1 -1
  19. package/dist/utils.cjs.js +26 -0
  20. package/dist/utils.esm.mjs +24 -0
  21. package/package.json +12 -3
  22. package/dist/share.cjs.js +0 -937
  23. package/dist/share.esm.mjs +0 -896
  24. package/dist/src/constant.d.ts +0 -2
  25. package/dist/src/global.d.ts +0 -43
  26. package/dist/src/module/index.d.ts +0 -21
  27. package/dist/src/plugins/generate-preload-assets.d.ts +0 -8
  28. package/dist/src/plugins/snapshot/SnapshotHandler.d.ts +0 -58
  29. package/dist/src/plugins/snapshot/index.d.ts +0 -5
  30. package/dist/src/remote/index.d.ts +0 -109
  31. package/dist/src/shared/index.d.ts +0 -66
  32. package/dist/src/type/config.d.ts +0 -112
  33. package/dist/src/type/index.d.ts +0 -3
  34. package/dist/src/type/plugin.d.ts +0 -34
  35. package/dist/src/type/preload.d.ts +0 -26
  36. package/dist/src/utils/env.d.ts +0 -3
  37. package/dist/src/utils/hooks/asyncHook.d.ts +0 -6
  38. package/dist/src/utils/hooks/asyncWaterfallHooks.d.ts +0 -10
  39. package/dist/src/utils/hooks/index.d.ts +0 -6
  40. package/dist/src/utils/hooks/pluginSystem.d.ts +0 -15
  41. package/dist/src/utils/hooks/syncHook.d.ts +0 -12
  42. package/dist/src/utils/hooks/syncWaterfallHook.d.ts +0 -9
  43. package/dist/src/utils/index.d.ts +0 -6
  44. package/dist/src/utils/load.d.ts +0 -9
  45. package/dist/src/utils/logger.d.ts +0 -6
  46. package/dist/src/utils/manifest.d.ts +0 -7
  47. package/dist/src/utils/plugin.d.ts +0 -4
  48. package/dist/src/utils/preload.d.ts +0 -6
  49. package/dist/src/utils/semver/compare.d.ts +0 -9
  50. package/dist/src/utils/semver/constants.d.ts +0 -10
  51. package/dist/src/utils/semver/index.d.ts +0 -2
  52. package/dist/src/utils/semver/parser.d.ts +0 -9
  53. package/dist/src/utils/semver/utils.d.ts +0 -11
  54. package/dist/src/utils/share.d.ts +0 -27
  55. package/dist/src/utils/tool.d.ts +0 -18
package/dist/share.cjs.js DELETED
@@ -1,937 +0,0 @@
1
- 'use strict';
2
-
3
- var polyfills = require('./polyfills.cjs.js');
4
- var sdk = require('@module-federation/sdk');
5
-
6
- function getBuilderId() {
7
- //@ts-ignore
8
- return typeof FEDERATION_BUILD_IDENTIFIER !== 'undefined' ? FEDERATION_BUILD_IDENTIFIER : '';
9
- }
10
-
11
- const LOG_CATEGORY = '[ Federation Runtime ]';
12
- // FIXME: pre-bundle ?
13
- const logger = sdk.createLogger(LOG_CATEGORY);
14
- // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
15
- function assert(condition, msg) {
16
- if (!condition) {
17
- error(msg);
18
- }
19
- }
20
- function error(msg) {
21
- if (msg instanceof Error) {
22
- msg.message = `${LOG_CATEGORY}: ${msg.message}`;
23
- throw msg;
24
- }
25
- throw new Error(`${LOG_CATEGORY}: ${msg}`);
26
- }
27
- function warn(msg) {
28
- if (msg instanceof Error) {
29
- msg.message = `${LOG_CATEGORY}: ${msg.message}`;
30
- logger.warn(msg);
31
- } else {
32
- logger.warn(msg);
33
- }
34
- }
35
-
36
- function addUniqueItem(arr, item) {
37
- if (arr.findIndex((name)=>name === item) === -1) {
38
- arr.push(item);
39
- }
40
- return arr;
41
- }
42
- function getFMId(remoteInfo) {
43
- if ('version' in remoteInfo && remoteInfo.version) {
44
- return `${remoteInfo.name}:${remoteInfo.version}`;
45
- } else if ('entry' in remoteInfo && remoteInfo.entry) {
46
- return `${remoteInfo.name}:${remoteInfo.entry}`;
47
- } else {
48
- return `${remoteInfo.name}`;
49
- }
50
- }
51
- function isRemoteInfoWithEntry(remote) {
52
- return typeof remote.entry !== 'undefined';
53
- }
54
- function isPureRemoteEntry(remote) {
55
- return !remote.entry.includes('.json') && remote.entry.includes('.js');
56
- }
57
- function isObject(val) {
58
- return val && typeof val === 'object';
59
- }
60
- const objectToString = Object.prototype.toString;
61
- // eslint-disable-next-line @typescript-eslint/ban-types
62
- function isPlainObject(val) {
63
- return objectToString.call(val) === '[object Object]';
64
- }
65
- function arrayOptions(options) {
66
- return Array.isArray(options) ? options : [
67
- options
68
- ];
69
- }
70
- function getRemoteEntryInfoFromSnapshot(snapshot) {
71
- const defaultRemoteEntryInfo = {
72
- url: '',
73
- type: 'global',
74
- globalName: ''
75
- };
76
- if (sdk.isBrowserEnv()) {
77
- return 'remoteEntry' in snapshot ? {
78
- url: snapshot.remoteEntry,
79
- type: snapshot.remoteEntryType,
80
- globalName: snapshot.globalName
81
- } : defaultRemoteEntryInfo;
82
- }
83
- if ('ssrRemoteEntry' in snapshot) {
84
- return {
85
- url: snapshot.ssrRemoteEntry || defaultRemoteEntryInfo.url,
86
- type: snapshot.ssrRemoteEntryType || defaultRemoteEntryInfo.type,
87
- globalName: snapshot.globalName
88
- };
89
- }
90
- return defaultRemoteEntryInfo;
91
- }
92
- const processModuleAlias = (name, subPath)=>{
93
- // @host/ ./button -> @host/button
94
- let moduleName;
95
- if (name.endsWith('/')) {
96
- moduleName = name.slice(0, -1);
97
- } else {
98
- moduleName = name;
99
- }
100
- if (subPath.startsWith('.')) {
101
- subPath = subPath.slice(1);
102
- }
103
- moduleName = moduleName + subPath;
104
- return moduleName;
105
- };
106
-
107
- const CurrentGlobal = typeof globalThis === 'object' ? globalThis : window;
108
- const nativeGlobal = (()=>{
109
- try {
110
- // get real window (incase of sandbox)
111
- return document.defaultView;
112
- } catch (e) {
113
- // node env
114
- return CurrentGlobal;
115
- }
116
- })();
117
- const Global = nativeGlobal;
118
- function definePropertyGlobalVal(target, key, val) {
119
- Object.defineProperty(target, key, {
120
- value: val,
121
- configurable: false,
122
- writable: true
123
- });
124
- }
125
- function includeOwnProperty(target, key) {
126
- return Object.hasOwnProperty.call(target, key);
127
- }
128
- // This section is to prevent encapsulation by certain microfrontend frameworks. Due to reuse policies, sandbox escapes.
129
- // The sandbox in the microfrontend does not replicate the value of 'configurable'.
130
- // If there is no loading content on the global object, this section defines the loading object.
131
- if (!includeOwnProperty(CurrentGlobal, '__GLOBAL_LOADING_REMOTE_ENTRY__')) {
132
- definePropertyGlobalVal(CurrentGlobal, '__GLOBAL_LOADING_REMOTE_ENTRY__', {});
133
- }
134
- const globalLoading = CurrentGlobal.__GLOBAL_LOADING_REMOTE_ENTRY__;
135
- function setGlobalDefaultVal(target) {
136
- var _target___FEDERATION__, _target___FEDERATION__1, _target___FEDERATION__2, _target___FEDERATION__3, _target___FEDERATION__4, _target___FEDERATION__5;
137
- if (includeOwnProperty(target, '__VMOK__') && !includeOwnProperty(target, '__FEDERATION__')) {
138
- definePropertyGlobalVal(target, '__FEDERATION__', target.__VMOK__);
139
- }
140
- if (!includeOwnProperty(target, '__FEDERATION__')) {
141
- definePropertyGlobalVal(target, '__FEDERATION__', {
142
- __GLOBAL_PLUGIN__: [],
143
- __INSTANCES__: [],
144
- moduleInfo: {},
145
- __SHARE__: {},
146
- __MANIFEST_LOADING__: {},
147
- __PRELOADED_MAP__: new Map()
148
- });
149
- definePropertyGlobalVal(target, '__VMOK__', target.__FEDERATION__);
150
- }
151
- var ___GLOBAL_PLUGIN__;
152
- (___GLOBAL_PLUGIN__ = (_target___FEDERATION__ = target.__FEDERATION__).__GLOBAL_PLUGIN__) != null ? ___GLOBAL_PLUGIN__ : _target___FEDERATION__.__GLOBAL_PLUGIN__ = [];
153
- var ___INSTANCES__;
154
- (___INSTANCES__ = (_target___FEDERATION__1 = target.__FEDERATION__).__INSTANCES__) != null ? ___INSTANCES__ : _target___FEDERATION__1.__INSTANCES__ = [];
155
- var _moduleInfo;
156
- (_moduleInfo = (_target___FEDERATION__2 = target.__FEDERATION__).moduleInfo) != null ? _moduleInfo : _target___FEDERATION__2.moduleInfo = {};
157
- var ___SHARE__;
158
- (___SHARE__ = (_target___FEDERATION__3 = target.__FEDERATION__).__SHARE__) != null ? ___SHARE__ : _target___FEDERATION__3.__SHARE__ = {};
159
- var ___MANIFEST_LOADING__;
160
- (___MANIFEST_LOADING__ = (_target___FEDERATION__4 = target.__FEDERATION__).__MANIFEST_LOADING__) != null ? ___MANIFEST_LOADING__ : _target___FEDERATION__4.__MANIFEST_LOADING__ = {};
161
- var ___PRELOADED_MAP__;
162
- (___PRELOADED_MAP__ = (_target___FEDERATION__5 = target.__FEDERATION__).__PRELOADED_MAP__) != null ? ___PRELOADED_MAP__ : _target___FEDERATION__5.__PRELOADED_MAP__ = new Map();
163
- }
164
- setGlobalDefaultVal(CurrentGlobal);
165
- setGlobalDefaultVal(nativeGlobal);
166
- function resetFederationGlobalInfo() {
167
- CurrentGlobal.__FEDERATION__.__GLOBAL_PLUGIN__ = [];
168
- CurrentGlobal.__FEDERATION__.__INSTANCES__ = [];
169
- CurrentGlobal.__FEDERATION__.moduleInfo = {};
170
- CurrentGlobal.__FEDERATION__.__SHARE__ = {};
171
- CurrentGlobal.__FEDERATION__.__MANIFEST_LOADING__ = {};
172
- Object.keys(globalLoading).forEach((key)=>{
173
- delete globalLoading[key];
174
- });
175
- }
176
- function getGlobalFederationInstance(name, version) {
177
- const buildId = getBuilderId();
178
- return CurrentGlobal.__FEDERATION__.__INSTANCES__.find((GMInstance)=>{
179
- if (buildId && GMInstance.options.id === getBuilderId()) {
180
- return true;
181
- }
182
- if (GMInstance.options.name === name && !GMInstance.options.version && !version) {
183
- return true;
184
- }
185
- if (GMInstance.options.name === name && version && GMInstance.options.version === version) {
186
- return true;
187
- }
188
- return false;
189
- });
190
- }
191
- function setGlobalFederationInstance(FederationInstance) {
192
- CurrentGlobal.__FEDERATION__.__INSTANCES__.push(FederationInstance);
193
- }
194
- function getGlobalFederationConstructor() {
195
- return CurrentGlobal.__FEDERATION__.__DEBUG_CONSTRUCTOR__;
196
- }
197
- function setGlobalFederationConstructor(FederationConstructor, isDebug = sdk.isDebugMode()) {
198
- if (isDebug) {
199
- CurrentGlobal.__FEDERATION__.__DEBUG_CONSTRUCTOR__ = FederationConstructor;
200
- CurrentGlobal.__FEDERATION__.__DEBUG_CONSTRUCTOR_VERSION__ = "0.8.6";
201
- }
202
- }
203
- // eslint-disable-next-line @typescript-eslint/ban-types
204
- function getInfoWithoutType(target, key) {
205
- if (typeof key === 'string') {
206
- const keyRes = target[key];
207
- if (keyRes) {
208
- return {
209
- value: target[key],
210
- key: key
211
- };
212
- } else {
213
- const targetKeys = Object.keys(target);
214
- for (const targetKey of targetKeys){
215
- const [targetTypeOrName, _] = targetKey.split(':');
216
- const nKey = `${targetTypeOrName}:${key}`;
217
- const typeWithKeyRes = target[nKey];
218
- if (typeWithKeyRes) {
219
- return {
220
- value: typeWithKeyRes,
221
- key: nKey
222
- };
223
- }
224
- }
225
- return {
226
- value: undefined,
227
- key: key
228
- };
229
- }
230
- } else {
231
- throw new Error('key must be string');
232
- }
233
- }
234
- const getGlobalSnapshot = ()=>nativeGlobal.__FEDERATION__.moduleInfo;
235
- const getTargetSnapshotInfoByModuleInfo = (moduleInfo, snapshot)=>{
236
- // Check if the remote is included in the hostSnapshot
237
- const moduleKey = getFMId(moduleInfo);
238
- const getModuleInfo = getInfoWithoutType(snapshot, moduleKey).value;
239
- // The remoteSnapshot might not include a version
240
- if (getModuleInfo && !getModuleInfo.version && 'version' in moduleInfo && moduleInfo['version']) {
241
- getModuleInfo.version = moduleInfo['version'];
242
- }
243
- if (getModuleInfo) {
244
- return getModuleInfo;
245
- }
246
- // If the remote is not included in the hostSnapshot, deploy a micro app snapshot
247
- if ('version' in moduleInfo && moduleInfo['version']) {
248
- const { version } = moduleInfo, resModuleInfo = polyfills._object_without_properties_loose(moduleInfo, [
249
- "version"
250
- ]);
251
- const moduleKeyWithoutVersion = getFMId(resModuleInfo);
252
- const getModuleInfoWithoutVersion = getInfoWithoutType(nativeGlobal.__FEDERATION__.moduleInfo, moduleKeyWithoutVersion).value;
253
- if ((getModuleInfoWithoutVersion == null ? void 0 : getModuleInfoWithoutVersion.version) === version) {
254
- return getModuleInfoWithoutVersion;
255
- }
256
- }
257
- return;
258
- };
259
- const getGlobalSnapshotInfoByModuleInfo = (moduleInfo)=>getTargetSnapshotInfoByModuleInfo(moduleInfo, nativeGlobal.__FEDERATION__.moduleInfo);
260
- const setGlobalSnapshotInfoByModuleInfo = (remoteInfo, moduleDetailInfo)=>{
261
- const moduleKey = getFMId(remoteInfo);
262
- nativeGlobal.__FEDERATION__.moduleInfo[moduleKey] = moduleDetailInfo;
263
- return nativeGlobal.__FEDERATION__.moduleInfo;
264
- };
265
- const addGlobalSnapshot = (moduleInfos)=>{
266
- nativeGlobal.__FEDERATION__.moduleInfo = polyfills._extends({}, nativeGlobal.__FEDERATION__.moduleInfo, moduleInfos);
267
- return ()=>{
268
- const keys = Object.keys(moduleInfos);
269
- for (const key of keys){
270
- delete nativeGlobal.__FEDERATION__.moduleInfo[key];
271
- }
272
- };
273
- };
274
- const getRemoteEntryExports = (name, globalName)=>{
275
- const remoteEntryKey = globalName || `__FEDERATION_${name}:custom__`;
276
- const entryExports = CurrentGlobal[remoteEntryKey];
277
- return {
278
- remoteEntryKey,
279
- entryExports
280
- };
281
- };
282
- // This function is used to register global plugins.
283
- // It iterates over the provided plugins and checks if they are already registered.
284
- // If a plugin is not registered, it is added to the global plugins.
285
- // If a plugin is already registered, a warning message is logged.
286
- const registerGlobalPlugins = (plugins)=>{
287
- const { __GLOBAL_PLUGIN__ } = nativeGlobal.__FEDERATION__;
288
- plugins.forEach((plugin)=>{
289
- if (__GLOBAL_PLUGIN__.findIndex((p)=>p.name === plugin.name) === -1) {
290
- __GLOBAL_PLUGIN__.push(plugin);
291
- } else {
292
- warn(`The plugin ${plugin.name} has been registered.`);
293
- }
294
- });
295
- };
296
- const getGlobalHostPlugins = ()=>nativeGlobal.__FEDERATION__.__GLOBAL_PLUGIN__;
297
- const getPreloaded = (id)=>CurrentGlobal.__FEDERATION__.__PRELOADED_MAP__.get(id);
298
- const setPreloaded = (id)=>CurrentGlobal.__FEDERATION__.__PRELOADED_MAP__.set(id, true);
299
-
300
- const DEFAULT_SCOPE = 'default';
301
- const DEFAULT_REMOTE_TYPE = 'global';
302
-
303
- // fork from https://github.com/originjs/vite-plugin-federation/blob/v1.1.12/packages/lib/src/utils/semver/index.ts
304
- // those constants are based on https://www.rubydoc.info/gems/semantic_range/3.0.0/SemanticRange#BUILDIDENTIFIER-constant
305
- // Copyright (c)
306
- // vite-plugin-federation is licensed under Mulan PSL v2.
307
- // You can use this software according to the terms and conditions of the Mulan PSL v2.
308
- // You may obtain a copy of Mulan PSL v2 at:
309
- // http://license.coscl.org.cn/MulanPSL2
310
- // THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
311
- // See the Mulan PSL v2 for more details.
312
- const buildIdentifier = '[0-9A-Za-z-]+';
313
- const build = `(?:\\+(${buildIdentifier}(?:\\.${buildIdentifier})*))`;
314
- const numericIdentifier = '0|[1-9]\\d*';
315
- const numericIdentifierLoose = '[0-9]+';
316
- const nonNumericIdentifier = '\\d*[a-zA-Z-][a-zA-Z0-9-]*';
317
- const preReleaseIdentifierLoose = `(?:${numericIdentifierLoose}|${nonNumericIdentifier})`;
318
- const preReleaseLoose = `(?:-?(${preReleaseIdentifierLoose}(?:\\.${preReleaseIdentifierLoose})*))`;
319
- const preReleaseIdentifier = `(?:${numericIdentifier}|${nonNumericIdentifier})`;
320
- const preRelease = `(?:-(${preReleaseIdentifier}(?:\\.${preReleaseIdentifier})*))`;
321
- const xRangeIdentifier = `${numericIdentifier}|x|X|\\*`;
322
- const xRangePlain = `[v=\\s]*(${xRangeIdentifier})(?:\\.(${xRangeIdentifier})(?:\\.(${xRangeIdentifier})(?:${preRelease})?${build}?)?)?`;
323
- const hyphenRange = `^\\s*(${xRangePlain})\\s+-\\s+(${xRangePlain})\\s*$`;
324
- const mainVersionLoose = `(${numericIdentifierLoose})\\.(${numericIdentifierLoose})\\.(${numericIdentifierLoose})`;
325
- const loosePlain = `[v=\\s]*${mainVersionLoose}${preReleaseLoose}?${build}?`;
326
- const gtlt = '((?:<|>)?=?)';
327
- const comparatorTrim = `(\\s*)${gtlt}\\s*(${loosePlain}|${xRangePlain})`;
328
- const loneTilde = '(?:~>?)';
329
- const tildeTrim = `(\\s*)${loneTilde}\\s+`;
330
- const loneCaret = '(?:\\^)';
331
- const caretTrim = `(\\s*)${loneCaret}\\s+`;
332
- const star = '(<|>)?=?\\s*\\*';
333
- const caret = `^${loneCaret}${xRangePlain}$`;
334
- const mainVersion = `(${numericIdentifier})\\.(${numericIdentifier})\\.(${numericIdentifier})`;
335
- const fullPlain = `v?${mainVersion}${preRelease}?${build}?`;
336
- const tilde = `^${loneTilde}${xRangePlain}$`;
337
- const xRange = `^${gtlt}\\s*${xRangePlain}$`;
338
- const comparator = `^${gtlt}\\s*(${fullPlain})$|^$`;
339
- // copy from semver package
340
- const gte0 = '^\\s*>=\\s*0.0.0\\s*$';
341
-
342
- // fork from https://github.com/originjs/vite-plugin-federation/blob/v1.1.12/packages/lib/src/utils/semver/index.ts
343
- // Copyright (c)
344
- // vite-plugin-federation is licensed under Mulan PSL v2.
345
- // You can use this software according to the terms and conditions of the Mulan PSL v2.
346
- // You may obtain a copy of Mulan PSL v2 at:
347
- // http://license.coscl.org.cn/MulanPSL2
348
- // THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
349
- // See the Mulan PSL v2 for more details.
350
- function parseRegex(source) {
351
- return new RegExp(source);
352
- }
353
- function isXVersion(version) {
354
- return !version || version.toLowerCase() === 'x' || version === '*';
355
- }
356
- function pipe(...fns) {
357
- return (x)=>fns.reduce((v, f)=>f(v), x);
358
- }
359
- function extractComparator(comparatorString) {
360
- return comparatorString.match(parseRegex(comparator));
361
- }
362
- function combineVersion(major, minor, patch, preRelease) {
363
- const mainVersion = `${major}.${minor}.${patch}`;
364
- if (preRelease) {
365
- return `${mainVersion}-${preRelease}`;
366
- }
367
- return mainVersion;
368
- }
369
-
370
- // fork from https://github.com/originjs/vite-plugin-federation/blob/v1.1.12/packages/lib/src/utils/semver/index.ts
371
- // Copyright (c)
372
- // vite-plugin-federation is licensed under Mulan PSL v2.
373
- // You can use this software according to the terms and conditions of the Mulan PSL v2.
374
- // You may obtain a copy of Mulan PSL v2 at:
375
- // http://license.coscl.org.cn/MulanPSL2
376
- // THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
377
- // See the Mulan PSL v2 for more details.
378
- function parseHyphen(range) {
379
- return range.replace(parseRegex(hyphenRange), (_range, from, fromMajor, fromMinor, fromPatch, _fromPreRelease, _fromBuild, to, toMajor, toMinor, toPatch, toPreRelease)=>{
380
- if (isXVersion(fromMajor)) {
381
- from = '';
382
- } else if (isXVersion(fromMinor)) {
383
- from = `>=${fromMajor}.0.0`;
384
- } else if (isXVersion(fromPatch)) {
385
- from = `>=${fromMajor}.${fromMinor}.0`;
386
- } else {
387
- from = `>=${from}`;
388
- }
389
- if (isXVersion(toMajor)) {
390
- to = '';
391
- } else if (isXVersion(toMinor)) {
392
- to = `<${Number(toMajor) + 1}.0.0-0`;
393
- } else if (isXVersion(toPatch)) {
394
- to = `<${toMajor}.${Number(toMinor) + 1}.0-0`;
395
- } else if (toPreRelease) {
396
- to = `<=${toMajor}.${toMinor}.${toPatch}-${toPreRelease}`;
397
- } else {
398
- to = `<=${to}`;
399
- }
400
- return `${from} ${to}`.trim();
401
- });
402
- }
403
- function parseComparatorTrim(range) {
404
- return range.replace(parseRegex(comparatorTrim), '$1$2$3');
405
- }
406
- function parseTildeTrim(range) {
407
- return range.replace(parseRegex(tildeTrim), '$1~');
408
- }
409
- function parseCaretTrim(range) {
410
- return range.replace(parseRegex(caretTrim), '$1^');
411
- }
412
- function parseCarets(range) {
413
- return range.trim().split(/\s+/).map((rangeVersion)=>rangeVersion.replace(parseRegex(caret), (_, major, minor, patch, preRelease)=>{
414
- if (isXVersion(major)) {
415
- return '';
416
- } else if (isXVersion(minor)) {
417
- return `>=${major}.0.0 <${Number(major) + 1}.0.0-0`;
418
- } else if (isXVersion(patch)) {
419
- if (major === '0') {
420
- return `>=${major}.${minor}.0 <${major}.${Number(minor) + 1}.0-0`;
421
- } else {
422
- return `>=${major}.${minor}.0 <${Number(major) + 1}.0.0-0`;
423
- }
424
- } else if (preRelease) {
425
- if (major === '0') {
426
- if (minor === '0') {
427
- return `>=${major}.${minor}.${patch}-${preRelease} <${major}.${minor}.${Number(patch) + 1}-0`;
428
- } else {
429
- return `>=${major}.${minor}.${patch}-${preRelease} <${major}.${Number(minor) + 1}.0-0`;
430
- }
431
- } else {
432
- return `>=${major}.${minor}.${patch}-${preRelease} <${Number(major) + 1}.0.0-0`;
433
- }
434
- } else {
435
- if (major === '0') {
436
- if (minor === '0') {
437
- return `>=${major}.${minor}.${patch} <${major}.${minor}.${Number(patch) + 1}-0`;
438
- } else {
439
- return `>=${major}.${minor}.${patch} <${major}.${Number(minor) + 1}.0-0`;
440
- }
441
- }
442
- return `>=${major}.${minor}.${patch} <${Number(major) + 1}.0.0-0`;
443
- }
444
- })).join(' ');
445
- }
446
- function parseTildes(range) {
447
- return range.trim().split(/\s+/).map((rangeVersion)=>rangeVersion.replace(parseRegex(tilde), (_, major, minor, patch, preRelease)=>{
448
- if (isXVersion(major)) {
449
- return '';
450
- } else if (isXVersion(minor)) {
451
- return `>=${major}.0.0 <${Number(major) + 1}.0.0-0`;
452
- } else if (isXVersion(patch)) {
453
- return `>=${major}.${minor}.0 <${major}.${Number(minor) + 1}.0-0`;
454
- } else if (preRelease) {
455
- return `>=${major}.${minor}.${patch}-${preRelease} <${major}.${Number(minor) + 1}.0-0`;
456
- }
457
- return `>=${major}.${minor}.${patch} <${major}.${Number(minor) + 1}.0-0`;
458
- })).join(' ');
459
- }
460
- function parseXRanges(range) {
461
- return range.split(/\s+/).map((rangeVersion)=>rangeVersion.trim().replace(parseRegex(xRange), (ret, gtlt, major, minor, patch, preRelease)=>{
462
- const isXMajor = isXVersion(major);
463
- const isXMinor = isXMajor || isXVersion(minor);
464
- const isXPatch = isXMinor || isXVersion(patch);
465
- if (gtlt === '=' && isXPatch) {
466
- gtlt = '';
467
- }
468
- preRelease = '';
469
- if (isXMajor) {
470
- if (gtlt === '>' || gtlt === '<') {
471
- // nothing is allowed
472
- return '<0.0.0-0';
473
- } else {
474
- // nothing is forbidden
475
- return '*';
476
- }
477
- } else if (gtlt && isXPatch) {
478
- // replace X with 0
479
- if (isXMinor) {
480
- minor = 0;
481
- }
482
- patch = 0;
483
- if (gtlt === '>') {
484
- // >1 => >=2.0.0
485
- // >1.2 => >=1.3.0
486
- gtlt = '>=';
487
- if (isXMinor) {
488
- major = Number(major) + 1;
489
- minor = 0;
490
- patch = 0;
491
- } else {
492
- minor = Number(minor) + 1;
493
- patch = 0;
494
- }
495
- } else if (gtlt === '<=') {
496
- // <=0.7.x is actually <0.8.0, since any 0.7.x should pass
497
- // Similarly, <=7.x is actually <8.0.0, etc.
498
- gtlt = '<';
499
- if (isXMinor) {
500
- major = Number(major) + 1;
501
- } else {
502
- minor = Number(minor) + 1;
503
- }
504
- }
505
- if (gtlt === '<') {
506
- preRelease = '-0';
507
- }
508
- return `${gtlt + major}.${minor}.${patch}${preRelease}`;
509
- } else if (isXMinor) {
510
- return `>=${major}.0.0${preRelease} <${Number(major) + 1}.0.0-0`;
511
- } else if (isXPatch) {
512
- return `>=${major}.${minor}.0${preRelease} <${major}.${Number(minor) + 1}.0-0`;
513
- }
514
- return ret;
515
- })).join(' ');
516
- }
517
- function parseStar(range) {
518
- return range.trim().replace(parseRegex(star), '');
519
- }
520
- function parseGTE0(comparatorString) {
521
- return comparatorString.trim().replace(parseRegex(gte0), '');
522
- }
523
-
524
- // fork from https://github.com/originjs/vite-plugin-federation/blob/v1.1.12/packages/lib/src/utils/semver/index.ts
525
- // Copyright (c)
526
- // vite-plugin-federation is licensed under Mulan PSL v2.
527
- // You can use this software according to the terms and conditions of the Mulan PSL v2.
528
- // You may obtain a copy of Mulan PSL v2 at:
529
- // http://license.coscl.org.cn/MulanPSL2
530
- // THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
531
- // See the Mulan PSL v2 for more details.
532
- function compareAtom(rangeAtom, versionAtom) {
533
- rangeAtom = Number(rangeAtom) || rangeAtom;
534
- versionAtom = Number(versionAtom) || versionAtom;
535
- if (rangeAtom > versionAtom) {
536
- return 1;
537
- }
538
- if (rangeAtom === versionAtom) {
539
- return 0;
540
- }
541
- return -1;
542
- }
543
- function comparePreRelease(rangeAtom, versionAtom) {
544
- const { preRelease: rangePreRelease } = rangeAtom;
545
- const { preRelease: versionPreRelease } = versionAtom;
546
- if (rangePreRelease === undefined && Boolean(versionPreRelease)) {
547
- return 1;
548
- }
549
- if (Boolean(rangePreRelease) && versionPreRelease === undefined) {
550
- return -1;
551
- }
552
- if (rangePreRelease === undefined && versionPreRelease === undefined) {
553
- return 0;
554
- }
555
- for(let i = 0, n = rangePreRelease.length; i <= n; i++){
556
- const rangeElement = rangePreRelease[i];
557
- const versionElement = versionPreRelease[i];
558
- if (rangeElement === versionElement) {
559
- continue;
560
- }
561
- if (rangeElement === undefined && versionElement === undefined) {
562
- return 0;
563
- }
564
- if (!rangeElement) {
565
- return 1;
566
- }
567
- if (!versionElement) {
568
- return -1;
569
- }
570
- return compareAtom(rangeElement, versionElement);
571
- }
572
- return 0;
573
- }
574
- function compareVersion(rangeAtom, versionAtom) {
575
- return compareAtom(rangeAtom.major, versionAtom.major) || compareAtom(rangeAtom.minor, versionAtom.minor) || compareAtom(rangeAtom.patch, versionAtom.patch) || comparePreRelease(rangeAtom, versionAtom);
576
- }
577
- function eq(rangeAtom, versionAtom) {
578
- return rangeAtom.version === versionAtom.version;
579
- }
580
- function compare(rangeAtom, versionAtom) {
581
- switch(rangeAtom.operator){
582
- case '':
583
- case '=':
584
- return eq(rangeAtom, versionAtom);
585
- case '>':
586
- return compareVersion(rangeAtom, versionAtom) < 0;
587
- case '>=':
588
- return eq(rangeAtom, versionAtom) || compareVersion(rangeAtom, versionAtom) < 0;
589
- case '<':
590
- return compareVersion(rangeAtom, versionAtom) > 0;
591
- case '<=':
592
- return eq(rangeAtom, versionAtom) || compareVersion(rangeAtom, versionAtom) > 0;
593
- case undefined:
594
- {
595
- // mean * or x -> all versions
596
- return true;
597
- }
598
- default:
599
- return false;
600
- }
601
- }
602
-
603
- // fork from https://github.com/originjs/vite-plugin-federation/blob/v1.1.12/packages/lib/src/utils/semver/index.ts
604
- // Copyright (c)
605
- // vite-plugin-federation is licensed under Mulan PSL v2.
606
- // You can use this software according to the terms and conditions of the Mulan PSL v2.
607
- // You may obtain a copy of Mulan PSL v2 at:
608
- // http://license.coscl.org.cn/MulanPSL2
609
- // THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
610
- // See the Mulan PSL v2 for more details.
611
- function parseComparatorString(range) {
612
- return pipe(// handle caret
613
- // ^ --> * (any, kinda silly)
614
- // ^2, ^2.x, ^2.x.x --> >=2.0.0 <3.0.0-0
615
- // ^2.0, ^2.0.x --> >=2.0.0 <3.0.0-0
616
- // ^1.2, ^1.2.x --> >=1.2.0 <2.0.0-0
617
- // ^1.2.3 --> >=1.2.3 <2.0.0-0
618
- // ^1.2.0 --> >=1.2.0 <2.0.0-0
619
- parseCarets, // handle tilde
620
- // ~, ~> --> * (any, kinda silly)
621
- // ~2, ~2.x, ~2.x.x, ~>2, ~>2.x ~>2.x.x --> >=2.0.0 <3.0.0-0
622
- // ~2.0, ~2.0.x, ~>2.0, ~>2.0.x --> >=2.0.0 <2.1.0-0
623
- // ~1.2, ~1.2.x, ~>1.2, ~>1.2.x --> >=1.2.0 <1.3.0-0
624
- // ~1.2.3, ~>1.2.3 --> >=1.2.3 <1.3.0-0
625
- // ~1.2.0, ~>1.2.0 --> >=1.2.0 <1.3.0-0
626
- parseTildes, parseXRanges, parseStar)(range);
627
- }
628
- function parseRange(range) {
629
- return pipe(// handle hyphenRange
630
- // `1.2.3 - 1.2.4` => `>=1.2.3 <=1.2.4`
631
- parseHyphen, // handle trim comparator
632
- // `> 1.2.3 < 1.2.5` => `>1.2.3 <1.2.5`
633
- parseComparatorTrim, // handle trim tilde
634
- // `~ 1.2.3` => `~1.2.3`
635
- parseTildeTrim, // handle trim caret
636
- // `^ 1.2.3` => `^1.2.3`
637
- parseCaretTrim)(range.trim()).split(/\s+/).join(' ');
638
- }
639
- function satisfy(version, range) {
640
- if (!version) {
641
- return false;
642
- }
643
- const parsedRange = parseRange(range);
644
- const parsedComparator = parsedRange.split(' ').map((rangeVersion)=>parseComparatorString(rangeVersion)).join(' ');
645
- const comparators = parsedComparator.split(/\s+/).map((comparator)=>parseGTE0(comparator));
646
- const extractedVersion = extractComparator(version);
647
- if (!extractedVersion) {
648
- return false;
649
- }
650
- const [, versionOperator, , versionMajor, versionMinor, versionPatch, versionPreRelease] = extractedVersion;
651
- const versionAtom = {
652
- operator: versionOperator,
653
- version: combineVersion(versionMajor, versionMinor, versionPatch, versionPreRelease),
654
- major: versionMajor,
655
- minor: versionMinor,
656
- patch: versionPatch,
657
- preRelease: versionPreRelease == null ? void 0 : versionPreRelease.split('.')
658
- };
659
- for (const comparator of comparators){
660
- const extractedComparator = extractComparator(comparator);
661
- if (!extractedComparator) {
662
- return false;
663
- }
664
- const [, rangeOperator, , rangeMajor, rangeMinor, rangePatch, rangePreRelease] = extractedComparator;
665
- const rangeAtom = {
666
- operator: rangeOperator,
667
- version: combineVersion(rangeMajor, rangeMinor, rangePatch, rangePreRelease),
668
- major: rangeMajor,
669
- minor: rangeMinor,
670
- patch: rangePatch,
671
- preRelease: rangePreRelease == null ? void 0 : rangePreRelease.split('.')
672
- };
673
- if (!compare(rangeAtom, versionAtom)) {
674
- return false; // early return
675
- }
676
- }
677
- return true;
678
- }
679
-
680
- function formatShare(shareArgs, from, name, shareStrategy) {
681
- let get;
682
- if ('get' in shareArgs) {
683
- // eslint-disable-next-line prefer-destructuring
684
- get = shareArgs.get;
685
- } else if ('lib' in shareArgs) {
686
- get = ()=>Promise.resolve(shareArgs.lib);
687
- } else {
688
- get = ()=>Promise.resolve(()=>{
689
- throw new Error(`Can not get shared '${name}'!`);
690
- });
691
- }
692
- if (shareArgs.strategy) {
693
- warn(`"shared.strategy is deprecated, please set in initOptions.shareStrategy instead!"`);
694
- }
695
- var _shareArgs_version, _shareArgs_scope, _shareArgs_strategy;
696
- return polyfills._extends({
697
- deps: [],
698
- useIn: [],
699
- from,
700
- loading: null
701
- }, shareArgs, {
702
- shareConfig: polyfills._extends({
703
- requiredVersion: `^${shareArgs.version}`,
704
- singleton: false,
705
- eager: false,
706
- strictVersion: false
707
- }, shareArgs.shareConfig),
708
- get,
709
- loaded: (shareArgs == null ? void 0 : shareArgs.loaded) || 'lib' in shareArgs ? true : undefined,
710
- version: (_shareArgs_version = shareArgs.version) != null ? _shareArgs_version : '0',
711
- scope: Array.isArray(shareArgs.scope) ? shareArgs.scope : [
712
- (_shareArgs_scope = shareArgs.scope) != null ? _shareArgs_scope : 'default'
713
- ],
714
- strategy: ((_shareArgs_strategy = shareArgs.strategy) != null ? _shareArgs_strategy : shareStrategy) || 'version-first'
715
- });
716
- }
717
- function formatShareConfigs(globalOptions, userOptions) {
718
- const shareArgs = userOptions.shared || {};
719
- const from = userOptions.name;
720
- const shareInfos = Object.keys(shareArgs).reduce((res, pkgName)=>{
721
- const arrayShareArgs = arrayOptions(shareArgs[pkgName]);
722
- res[pkgName] = res[pkgName] || [];
723
- arrayShareArgs.forEach((shareConfig)=>{
724
- res[pkgName].push(formatShare(shareConfig, from, pkgName, userOptions.shareStrategy));
725
- });
726
- return res;
727
- }, {});
728
- const shared = polyfills._extends({}, globalOptions.shared);
729
- Object.keys(shareInfos).forEach((shareKey)=>{
730
- if (!shared[shareKey]) {
731
- shared[shareKey] = shareInfos[shareKey];
732
- } else {
733
- shareInfos[shareKey].forEach((newUserSharedOptions)=>{
734
- const isSameVersion = shared[shareKey].find((sharedVal)=>sharedVal.version === newUserSharedOptions.version);
735
- if (!isSameVersion) {
736
- shared[shareKey].push(newUserSharedOptions);
737
- }
738
- });
739
- }
740
- });
741
- return {
742
- shared,
743
- shareInfos
744
- };
745
- }
746
- function versionLt(a, b) {
747
- const transformInvalidVersion = (version)=>{
748
- const isNumberVersion = !Number.isNaN(Number(version));
749
- if (isNumberVersion) {
750
- const splitArr = version.split('.');
751
- let validVersion = version;
752
- for(let i = 0; i < 3 - splitArr.length; i++){
753
- validVersion += '.0';
754
- }
755
- return validVersion;
756
- }
757
- return version;
758
- };
759
- if (satisfy(transformInvalidVersion(a), `<=${transformInvalidVersion(b)}`)) {
760
- return true;
761
- } else {
762
- return false;
763
- }
764
- }
765
- const findVersion = (shareVersionMap, cb)=>{
766
- const callback = cb || function(prev, cur) {
767
- return versionLt(prev, cur);
768
- };
769
- return Object.keys(shareVersionMap).reduce((prev, cur)=>{
770
- if (!prev) {
771
- return cur;
772
- }
773
- if (callback(prev, cur)) {
774
- return cur;
775
- }
776
- // default version is '0' https://github.com/webpack/webpack/blob/main/lib/sharing/ProvideSharedModule.js#L136
777
- if (prev === '0') {
778
- return cur;
779
- }
780
- return prev;
781
- }, 0);
782
- };
783
- const isLoaded = (shared)=>{
784
- return Boolean(shared.loaded) || typeof shared.lib === 'function';
785
- };
786
- const isLoading = (shared)=>{
787
- return Boolean(shared.loading);
788
- };
789
- function findSingletonVersionOrderByVersion(shareScopeMap, scope, pkgName) {
790
- const versions = shareScopeMap[scope][pkgName];
791
- const callback = function(prev, cur) {
792
- return !isLoaded(versions[prev]) && versionLt(prev, cur);
793
- };
794
- return findVersion(shareScopeMap[scope][pkgName], callback);
795
- }
796
- function findSingletonVersionOrderByLoaded(shareScopeMap, scope, pkgName) {
797
- const versions = shareScopeMap[scope][pkgName];
798
- const callback = function(prev, cur) {
799
- const isLoadingOrLoaded = (shared)=>{
800
- return isLoaded(shared) || isLoading(shared);
801
- };
802
- if (isLoadingOrLoaded(versions[cur])) {
803
- if (isLoadingOrLoaded(versions[prev])) {
804
- return Boolean(versionLt(prev, cur));
805
- } else {
806
- return true;
807
- }
808
- }
809
- if (isLoadingOrLoaded(versions[prev])) {
810
- return false;
811
- }
812
- return versionLt(prev, cur);
813
- };
814
- return findVersion(shareScopeMap[scope][pkgName], callback);
815
- }
816
- function getFindShareFunction(strategy) {
817
- if (strategy === 'loaded-first') {
818
- return findSingletonVersionOrderByLoaded;
819
- }
820
- return findSingletonVersionOrderByVersion;
821
- }
822
- function getRegisteredShare(localShareScopeMap, pkgName, shareInfo, resolveShare) {
823
- if (!localShareScopeMap) {
824
- return;
825
- }
826
- const { shareConfig, scope = DEFAULT_SCOPE, strategy } = shareInfo;
827
- const scopes = Array.isArray(scope) ? scope : [
828
- scope
829
- ];
830
- for (const sc of scopes){
831
- if (shareConfig && localShareScopeMap[sc] && localShareScopeMap[sc][pkgName]) {
832
- const { requiredVersion } = shareConfig;
833
- const findShareFunction = getFindShareFunction(strategy);
834
- const maxOrSingletonVersion = findShareFunction(localShareScopeMap, sc, pkgName);
835
- //@ts-ignore
836
- const defaultResolver = ()=>{
837
- if (shareConfig.singleton) {
838
- if (typeof requiredVersion === 'string' && !satisfy(maxOrSingletonVersion, requiredVersion)) {
839
- const msg = `Version ${maxOrSingletonVersion} from ${maxOrSingletonVersion && localShareScopeMap[sc][pkgName][maxOrSingletonVersion].from} of shared singleton module ${pkgName} does not satisfy the requirement of ${shareInfo.from} which needs ${requiredVersion})`;
840
- if (shareConfig.strictVersion) {
841
- error(msg);
842
- } else {
843
- warn(msg);
844
- }
845
- }
846
- return localShareScopeMap[sc][pkgName][maxOrSingletonVersion];
847
- } else {
848
- if (requiredVersion === false || requiredVersion === '*') {
849
- return localShareScopeMap[sc][pkgName][maxOrSingletonVersion];
850
- }
851
- if (satisfy(maxOrSingletonVersion, requiredVersion)) {
852
- return localShareScopeMap[sc][pkgName][maxOrSingletonVersion];
853
- }
854
- for (const [versionKey, versionValue] of Object.entries(localShareScopeMap[sc][pkgName])){
855
- if (satisfy(versionKey, requiredVersion)) {
856
- return versionValue;
857
- }
858
- }
859
- }
860
- };
861
- const params = {
862
- shareScopeMap: localShareScopeMap,
863
- scope: sc,
864
- pkgName,
865
- version: maxOrSingletonVersion,
866
- GlobalFederation: Global.__FEDERATION__,
867
- resolver: defaultResolver
868
- };
869
- const resolveShared = resolveShare.emit(params) || params;
870
- return resolveShared.resolver();
871
- }
872
- }
873
- }
874
- function getGlobalShareScope() {
875
- return Global.__FEDERATION__.__SHARE__;
876
- }
877
- function getTargetSharedOptions(options) {
878
- const { pkgName, extraOptions, shareInfos } = options;
879
- const defaultResolver = (sharedOptions)=>{
880
- if (!sharedOptions) {
881
- return undefined;
882
- }
883
- const shareVersionMap = {};
884
- sharedOptions.forEach((shared)=>{
885
- shareVersionMap[shared.version] = shared;
886
- });
887
- const callback = function(prev, cur) {
888
- return !isLoaded(shareVersionMap[prev]) && versionLt(prev, cur);
889
- };
890
- const maxVersion = findVersion(shareVersionMap, callback);
891
- return shareVersionMap[maxVersion];
892
- };
893
- var _extraOptions_resolver;
894
- const resolver = (_extraOptions_resolver = extraOptions == null ? void 0 : extraOptions.resolver) != null ? _extraOptions_resolver : defaultResolver;
895
- return Object.assign({}, resolver(shareInfos[pkgName]), extraOptions == null ? void 0 : extraOptions.customShareInfo);
896
- }
897
-
898
- exports.CurrentGlobal = CurrentGlobal;
899
- exports.DEFAULT_REMOTE_TYPE = DEFAULT_REMOTE_TYPE;
900
- exports.DEFAULT_SCOPE = DEFAULT_SCOPE;
901
- exports.Global = Global;
902
- exports.addGlobalSnapshot = addGlobalSnapshot;
903
- exports.addUniqueItem = addUniqueItem;
904
- exports.arrayOptions = arrayOptions;
905
- exports.assert = assert;
906
- exports.error = error;
907
- exports.formatShareConfigs = formatShareConfigs;
908
- exports.getBuilderId = getBuilderId;
909
- exports.getFMId = getFMId;
910
- exports.getGlobalFederationConstructor = getGlobalFederationConstructor;
911
- exports.getGlobalFederationInstance = getGlobalFederationInstance;
912
- exports.getGlobalHostPlugins = getGlobalHostPlugins;
913
- exports.getGlobalShareScope = getGlobalShareScope;
914
- exports.getGlobalSnapshot = getGlobalSnapshot;
915
- exports.getGlobalSnapshotInfoByModuleInfo = getGlobalSnapshotInfoByModuleInfo;
916
- exports.getInfoWithoutType = getInfoWithoutType;
917
- exports.getPreloaded = getPreloaded;
918
- exports.getRegisteredShare = getRegisteredShare;
919
- exports.getRemoteEntryExports = getRemoteEntryExports;
920
- exports.getRemoteEntryInfoFromSnapshot = getRemoteEntryInfoFromSnapshot;
921
- exports.getTargetSharedOptions = getTargetSharedOptions;
922
- exports.getTargetSnapshotInfoByModuleInfo = getTargetSnapshotInfoByModuleInfo;
923
- exports.globalLoading = globalLoading;
924
- exports.isObject = isObject;
925
- exports.isPlainObject = isPlainObject;
926
- exports.isPureRemoteEntry = isPureRemoteEntry;
927
- exports.isRemoteInfoWithEntry = isRemoteInfoWithEntry;
928
- exports.logger = logger;
929
- exports.nativeGlobal = nativeGlobal;
930
- exports.processModuleAlias = processModuleAlias;
931
- exports.registerGlobalPlugins = registerGlobalPlugins;
932
- exports.resetFederationGlobalInfo = resetFederationGlobalInfo;
933
- exports.setGlobalFederationConstructor = setGlobalFederationConstructor;
934
- exports.setGlobalFederationInstance = setGlobalFederationInstance;
935
- exports.setGlobalSnapshotInfoByModuleInfo = setGlobalSnapshotInfoByModuleInfo;
936
- exports.setPreloaded = setPreloaded;
937
- exports.warn = warn;