@module-federation/bridge-vue3 0.8.8 → 0.8.10

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.es.js CHANGED
@@ -50,8 +50,8 @@ function getLabel(r, t, n) {
50
50
  let o = [""];
51
51
  if ("label" in t)
52
52
  if (o = [(r !== "log" ? n[r] : void 0) || t.label || ""], t.color) {
53
- const a = t.color(o[0]);
54
- Array.isArray(a) && a.length === 2 ? o = bold([a[0], a[1]]) : o = bold(a[0] || "");
53
+ const l = t.color(o[0]);
54
+ Array.isArray(l) && l.length === 2 ? o = bold([l[0], l[1]]) : o = bold(l[0] || "");
55
55
  } else
56
56
  o = bold(o[0]);
57
57
  return o = o.filter(Boolean), o;
@@ -74,15 +74,15 @@ function validateOptions(r) {
74
74
  throw new Error("Level must be a string");
75
75
  return t;
76
76
  }
77
- var createLogger$1 = (r = {}, { getLabel: t, handleError: n, finalLog: o, greet: s, LOG_TYPES: a }) => {
78
- const l = validateOptions(r);
79
- let i = l.level || "log", c = l.labels || {}, u = (d, m, ...y) => {
80
- if (LOG_LEVEL[a[d].level] > LOG_LEVEL[i])
77
+ var createLogger$1 = (r = {}, { getLabel: t, handleError: n, finalLog: o, greet: s, LOG_TYPES: l }) => {
78
+ const a = validateOptions(r);
79
+ let i = a.level || "log", c = a.labels || {}, u = (p, m, ...y) => {
80
+ if (LOG_LEVEL[l[p].level] > LOG_LEVEL[i])
81
81
  return;
82
82
  if (m == null)
83
83
  return console.log();
84
- let _ = a[d], E = "";
85
- const g = t(d, _, c);
84
+ let _ = l[p], E = "";
85
+ const g = t(p, _, c);
86
86
  if (m instanceof Error)
87
87
  if (m.stack) {
88
88
  let [b, ...S] = m.stack.split(`
@@ -97,25 +97,25 @@ ${n(S.join(`
97
97
  `).map((S) => isErrorStackMessage(S) ? n(S) : S).join(`
98
98
  `) : E = `${m}`;
99
99
  o(g, E, y, m);
100
- }, p = {
100
+ }, d = {
101
101
  // greet
102
- greet: (d) => u("log", s(d))
102
+ greet: (p) => u("log", s(p))
103
103
  };
104
- return Object.keys(a).forEach((d) => {
105
- p[d] = (...m) => u(d, ...m);
106
- }), Object.defineProperty(p, "level", {
104
+ return Object.keys(l).forEach((p) => {
105
+ d[p] = (...m) => u(p, ...m);
106
+ }), Object.defineProperty(d, "level", {
107
107
  get: () => i,
108
- set(d) {
109
- i = d;
108
+ set(p) {
109
+ i = p;
110
110
  }
111
- }), Object.defineProperty(p, "labels", {
111
+ }), Object.defineProperty(d, "labels", {
112
112
  get: () => c,
113
- set(d) {
114
- c = d;
113
+ set(p) {
114
+ c = p;
115
115
  }
116
- }), p.override = (d) => {
117
- Object.assign(p, d);
118
- }, p;
116
+ }), d.override = (p) => {
117
+ Object.assign(d, p);
118
+ }, d;
119
119
  }, startColor = [189, 255, 243], endColor = [74, 194, 154], isWord = (r) => !/[\s\n]/.test(r);
120
120
  function gradient(r) {
121
121
  if (!supportColor())
@@ -123,14 +123,14 @@ function gradient(r) {
123
123
  const t = [...r], n = t.filter(isWord), o = n.length - 1;
124
124
  if (o === 0)
125
125
  return console.log(`%c${r}`, `color: rgb(${startColor.join(",")}); font-weight: bold;`), [r];
126
- let s = "", a = [];
127
- return t.forEach((l) => {
128
- if (isWord(l)) {
129
- const i = n.indexOf(l) / o, c = Math.round(startColor[0] + (endColor[0] - startColor[0]) * i), u = Math.round(startColor[1] + (endColor[1] - startColor[1]) * i), p = Math.round(startColor[2] + (endColor[2] - startColor[2]) * i);
130
- s += `%c${l}`, a.push(`color: rgb(${c},${u},${p}); font-weight: bold;`);
126
+ let s = "", l = [];
127
+ return t.forEach((a) => {
128
+ if (isWord(a)) {
129
+ const i = n.indexOf(a) / o, c = Math.round(startColor[0] + (endColor[0] - startColor[0]) * i), u = Math.round(startColor[1] + (endColor[1] - startColor[1]) * i), d = Math.round(startColor[2] + (endColor[2] - startColor[2]) * i);
130
+ s += `%c${a}`, l.push(`color: rgb(${c},${u},${d}); font-weight: bold;`);
131
131
  } else
132
- s += l;
133
- }), [s, ...a];
132
+ s += a;
133
+ }), [s, ...l];
134
134
  }
135
135
  var LOG_TYPES = {
136
136
  // Level error
@@ -269,8 +269,8 @@ const simpleJoinRemoteEntry = (r, t) => {
269
269
  if (s.startsWith("./"))
270
270
  return s.replace("./", "");
271
271
  if (s.startsWith("/")) {
272
- const a = s.slice(1);
273
- return a.endsWith("/") ? a.slice(0, -1) : a;
272
+ const l = s.slice(1);
273
+ return l.endsWith("/") ? l.slice(0, -1) : l;
274
274
  }
275
275
  return s;
276
276
  })(r);
@@ -281,27 +281,27 @@ function inferAutoPublicPath(r) {
281
281
  }
282
282
  function generateSnapshotFromManifest(r, t = {}) {
283
283
  var n, o;
284
- const { remotes: s = {}, overrides: a = {}, version: l } = t;
284
+ const { remotes: s = {}, overrides: l = {}, version: a } = t;
285
285
  let i;
286
- const c = () => "publicPath" in r.metaData ? r.metaData.publicPath === "auto" && l ? inferAutoPublicPath(l) : r.metaData.publicPath : r.metaData.getPublicPath, u = Object.keys(a);
287
- let p = {};
286
+ const c = () => "publicPath" in r.metaData ? r.metaData.publicPath === "auto" && a ? inferAutoPublicPath(a) : r.metaData.publicPath : r.metaData.getPublicPath, u = Object.keys(l);
287
+ let d = {};
288
288
  if (!Object.keys(s).length) {
289
- var d;
290
- p = ((d = r.remotes) == null ? void 0 : d.reduce((R, $) => {
289
+ var p;
290
+ d = ((p = r.remotes) == null ? void 0 : p.reduce((R, $) => {
291
291
  let w;
292
292
  const O = $.federationContainerName;
293
- return u.includes(O) ? w = a[O] : "version" in $ ? w = $.version : w = $.entry, R[O] = {
293
+ return u.includes(O) ? w = l[O] : "version" in $ ? w = $.version : w = $.entry, R[O] = {
294
294
  matchedVersion: w
295
295
  }, R;
296
296
  }, {})) || {};
297
297
  }
298
- Object.keys(s).forEach((R) => p[R] = {
298
+ Object.keys(s).forEach((R) => d[R] = {
299
299
  // overrides will override dependencies
300
- matchedVersion: u.includes(R) ? a[R] : s[R]
300
+ matchedVersion: u.includes(R) ? l[R] : s[R]
301
301
  });
302
302
  const { remoteEntry: { path: m, name: y, type: _ }, types: E, buildInfo: { buildVersion: g }, globalName: b, ssrRemoteEntry: S } = r.metaData, { exposes: v } = r;
303
303
  let I = {
304
- version: l || "",
304
+ version: a || "",
305
305
  buildVersion: g,
306
306
  globalName: b,
307
307
  remoteEntry: simpleJoinRemoteEntry(m, y),
@@ -309,7 +309,7 @@ function generateSnapshotFromManifest(r, t = {}) {
309
309
  remoteTypes: simpleJoinRemoteEntry(E.path, E.name),
310
310
  remoteTypesZip: E.zip || "",
311
311
  remoteTypesAPI: E.api || "",
312
- remotesInfo: p,
312
+ remotesInfo: d,
313
313
  shared: r == null ? void 0 : r.shared.map((R) => ({
314
314
  assets: R.assets,
315
315
  sharedName: R.name,
@@ -361,9 +361,9 @@ function isStaticResourcesEqual(r, t) {
361
361
  }
362
362
  function createScript(r) {
363
363
  let t = null, n = !0, o = 2e4, s;
364
- const a = document.getElementsByTagName("script");
365
- for (let i = 0; i < a.length; i++) {
366
- const c = a[i], u = c.getAttribute("src");
364
+ const l = document.getElementsByTagName("script");
365
+ for (let i = 0; i < l.length; i++) {
366
+ const c = l[i], u = c.getAttribute("src");
367
367
  if (u && isStaticResourcesEqual(u, r.url)) {
368
368
  t = c, n = !1;
369
369
  break;
@@ -377,26 +377,26 @@ function createScript(r) {
377
377
  t && (u === "async" || u === "defer" ? t[u] = i[u] : t.getAttribute(u) || t.setAttribute(u, i[u]));
378
378
  });
379
379
  }
380
- const l = async (i, c) => {
380
+ const a = async (i, c) => {
381
381
  clearTimeout(s);
382
382
  const u = () => {
383
383
  (c == null ? void 0 : c.type) === "error" ? r != null && r.onErrorCallback && (r == null || r.onErrorCallback(c)) : r != null && r.cb && (r == null || r.cb());
384
384
  };
385
385
  if (t && (t.onerror = null, t.onload = null, safeWrapper(() => {
386
- const { needDeleteScript: p = !0 } = r;
387
- p && t != null && t.parentNode && t.parentNode.removeChild(t);
386
+ const { needDeleteScript: d = !0 } = r;
387
+ d && t != null && t.parentNode && t.parentNode.removeChild(t);
388
388
  }), i && typeof i == "function")) {
389
- const p = i(c);
390
- if (p instanceof Promise) {
391
- const d = await p;
392
- return u(), d;
389
+ const d = i(c);
390
+ if (d instanceof Promise) {
391
+ const p = await d;
392
+ return u(), p;
393
393
  }
394
- return u(), p;
394
+ return u(), d;
395
395
  }
396
396
  u();
397
397
  };
398
- return t.onerror = l.bind(null, t.onerror), t.onload = l.bind(null, t.onload), s = setTimeout(() => {
399
- l(null, new Error(`Remote script "${r.url}" time-outed.`));
398
+ return t.onerror = a.bind(null, t.onerror), t.onload = a.bind(null, t.onload), s = setTimeout(() => {
399
+ a(null, new Error(`Remote script "${r.url}" time-outed.`));
400
400
  }, o), {
401
401
  script: t,
402
402
  needAttach: n
@@ -405,30 +405,30 @@ function createScript(r) {
405
405
  function createLink(r) {
406
406
  let t = null, n = !0;
407
407
  const o = document.getElementsByTagName("link");
408
- for (let a = 0; a < o.length; a++) {
409
- const l = o[a], i = l.getAttribute("href"), c = l.getAttribute("ref");
408
+ for (let l = 0; l < o.length; l++) {
409
+ const a = o[l], i = a.getAttribute("href"), c = a.getAttribute("ref");
410
410
  if (i && isStaticResourcesEqual(i, r.url) && c === r.attrs.ref) {
411
- t = l, n = !1;
411
+ t = a, n = !1;
412
412
  break;
413
413
  }
414
414
  }
415
415
  if (!t) {
416
416
  t = document.createElement("link"), t.setAttribute("href", r.url);
417
- let a;
418
- const l = r.attrs;
419
- r.createLinkHook && (a = r.createLinkHook(r.url, l), a instanceof HTMLLinkElement && (t = a)), l && !a && Object.keys(l).forEach((i) => {
420
- t && !t.getAttribute(i) && t.setAttribute(i, l[i]);
417
+ let l;
418
+ const a = r.attrs;
419
+ r.createLinkHook && (l = r.createLinkHook(r.url, a), l instanceof HTMLLinkElement && (t = l)), a && !l && Object.keys(a).forEach((i) => {
420
+ t && !t.getAttribute(i) && t.setAttribute(i, a[i]);
421
421
  });
422
422
  }
423
- const s = (a, l) => {
423
+ const s = (l, a) => {
424
424
  const i = () => {
425
- (l == null ? void 0 : l.type) === "error" ? r != null && r.onErrorCallback && (r == null || r.onErrorCallback(l)) : r != null && r.cb && (r == null || r.cb());
425
+ (a == null ? void 0 : a.type) === "error" ? r != null && r.onErrorCallback && (r == null || r.onErrorCallback(a)) : r != null && r.cb && (r == null || r.cb());
426
426
  };
427
427
  if (t && (t.onerror = null, t.onload = null, safeWrapper(() => {
428
428
  const { needDeleteLink: c = !0 } = r;
429
429
  c && t != null && t.parentNode && t.parentNode.removeChild(t);
430
- }), a)) {
431
- const c = a(l);
430
+ }), l)) {
431
+ const c = l(a);
432
432
  return i(), c;
433
433
  }
434
434
  i();
@@ -440,18 +440,18 @@ function createLink(r) {
440
440
  }
441
441
  function loadScript(r, t) {
442
442
  const { attrs: n = {}, createScriptHook: o } = t;
443
- return new Promise((s, a) => {
444
- const { script: l, needAttach: i } = createScript({
443
+ return new Promise((s, l) => {
444
+ const { script: a, needAttach: i } = createScript({
445
445
  url: r,
446
446
  cb: s,
447
- onErrorCallback: a,
447
+ onErrorCallback: l,
448
448
  attrs: _extends$2({
449
449
  fetchpriority: "high"
450
450
  }, n),
451
451
  createScriptHook: o,
452
452
  needDeleteScript: !0
453
453
  });
454
- i && document.head.appendChild(l);
454
+ i && document.head.appendChild(a);
455
455
  });
456
456
  }
457
457
  function importNodeModule(r) {
@@ -465,7 +465,7 @@ const loadNodeFetch = async () => {
465
465
  const r = await importNodeModule("node-fetch");
466
466
  return r.default || r;
467
467
  }, lazyLoaderHookFetch = async (r, t, n) => {
468
- const s = await ((a, l) => n.lifecycle.fetch.emit(a, l))(r, t || {});
468
+ const s = await ((l, a) => n.lifecycle.fetch.emit(l, a))(r, t || {});
469
469
  return !s || !(s instanceof Response) ? (typeof fetch > "u" ? await loadNodeFetch() : fetch)(r, t || {}) : s;
470
470
  };
471
471
  function createScriptNode(url, cb, attrs, loaderHook) {
@@ -527,29 +527,29 @@ function createScriptNode(url, cb, attrs, loaderHook) {
527
527
  }
528
528
  function loadScriptNode(r, t) {
529
529
  return new Promise((n, o) => {
530
- createScriptNode(r, (s, a) => {
530
+ createScriptNode(r, (s, l) => {
531
531
  if (s)
532
532
  o(s);
533
533
  else {
534
- var l, i;
535
- const c = (t == null || (l = t.attrs) == null ? void 0 : l.globalName) || `__FEDERATION_${t == null || (i = t.attrs) == null ? void 0 : i.name}:custom__`, u = globalThis[c] = a;
534
+ var a, i;
535
+ const c = (t == null || (a = t.attrs) == null ? void 0 : a.globalName) || `__FEDERATION_${t == null || (i = t.attrs) == null ? void 0 : i.name}:custom__`, u = globalThis[c] = l;
536
536
  n(u);
537
537
  }
538
538
  }, t.attrs, t.loaderHook);
539
539
  });
540
540
  }
541
541
  async function loadModule(r, t) {
542
- const { fetch: n, vm: o } = t, a = await (await n(r)).text(), l = new o.SourceTextModule(a, {
542
+ const { fetch: n, vm: o } = t, l = await (await n(r)).text(), a = new o.SourceTextModule(l, {
543
543
  // @ts-ignore
544
544
  importModuleDynamically: async (i, c) => {
545
545
  const u = new URL(i, r).href;
546
546
  return loadModule(u, t);
547
547
  }
548
548
  });
549
- return await l.link(async (i) => {
549
+ return await a.link(async (i) => {
550
550
  const c = new URL(i, r).href;
551
551
  return await loadModule(c, t);
552
- }), l;
552
+ }), a;
553
553
  }
554
554
  const LoggerInstance = createLogger("[ Module Federation Bridge Vue3 ]");
555
555
  function _extends$1() {
@@ -565,9 +565,9 @@ function _extends$1() {
565
565
  function _object_without_properties_loose(r, t) {
566
566
  if (r == null)
567
567
  return {};
568
- var n = {}, o = Object.keys(r), s, a;
569
- for (a = 0; a < o.length; a++)
570
- s = o[a], !(t.indexOf(s) >= 0) && (n[s] = r[s]);
568
+ var n = {}, o = Object.keys(r), s, l;
569
+ for (l = 0; l < o.length; l++)
570
+ s = o[l], !(t.indexOf(s) >= 0) && (n[s] = r[s]);
571
571
  return n;
572
572
  }
573
573
  const RUNTIME_001 = "RUNTIME-001", RUNTIME_002 = "RUNTIME-002", RUNTIME_003 = "RUNTIME-003", RUNTIME_004 = "RUNTIME-004", RUNTIME_005 = "RUNTIME-005", RUNTIME_006 = "RUNTIME-006", RUNTIME_007 = "RUNTIME-007", RUNTIME_008 = "RUNTIME-008", TYPE_001 = "TYPE-001", BUILD_001 = "BUILD-001", getDocsUrl = (r) => `https://module-federation.io/guide/troubleshooting/${r.split("-")[0].toLowerCase()}/${r}`, getShortErrorMsg = (r, t, n, o) => {
@@ -678,7 +678,7 @@ function includeOwnProperty(r, t) {
678
678
  includeOwnProperty(CurrentGlobal, "__GLOBAL_LOADING_REMOTE_ENTRY__") || definePropertyGlobalVal(CurrentGlobal, "__GLOBAL_LOADING_REMOTE_ENTRY__", {});
679
679
  const globalLoading = CurrentGlobal.__GLOBAL_LOADING_REMOTE_ENTRY__;
680
680
  function setGlobalDefaultVal(r) {
681
- var t, n, o, s, a, l;
681
+ var t, n, o, s, l, a;
682
682
  includeOwnProperty(r, "__VMOK__") && !includeOwnProperty(r, "__FEDERATION__") && definePropertyGlobalVal(r, "__FEDERATION__", r.__VMOK__), includeOwnProperty(r, "__FEDERATION__") || (definePropertyGlobalVal(r, "__FEDERATION__", {
683
683
  __GLOBAL_PLUGIN__: [],
684
684
  __INSTANCES__: [],
@@ -693,17 +693,17 @@ function setGlobalDefaultVal(r) {
693
693
  (c = (n = r.__FEDERATION__).__INSTANCES__) != null || (n.__INSTANCES__ = []);
694
694
  var u;
695
695
  (u = (o = r.__FEDERATION__).moduleInfo) != null || (o.moduleInfo = {});
696
- var p;
697
- (p = (s = r.__FEDERATION__).__SHARE__) != null || (s.__SHARE__ = {});
698
696
  var d;
699
- (d = (a = r.__FEDERATION__).__MANIFEST_LOADING__) != null || (a.__MANIFEST_LOADING__ = {});
697
+ (d = (s = r.__FEDERATION__).__SHARE__) != null || (s.__SHARE__ = {});
698
+ var p;
699
+ (p = (l = r.__FEDERATION__).__MANIFEST_LOADING__) != null || (l.__MANIFEST_LOADING__ = {});
700
700
  var m;
701
- (m = (l = r.__FEDERATION__).__PRELOADED_MAP__) != null || (l.__PRELOADED_MAP__ = /* @__PURE__ */ new Map());
701
+ (m = (a = r.__FEDERATION__).__PRELOADED_MAP__) != null || (a.__PRELOADED_MAP__ = /* @__PURE__ */ new Map());
702
702
  }
703
703
  setGlobalDefaultVal(CurrentGlobal);
704
704
  setGlobalDefaultVal(nativeGlobal);
705
705
  function setGlobalFederationConstructor(r, t = isDebugMode()) {
706
- t && (CurrentGlobal.__FEDERATION__.__DEBUG_CONSTRUCTOR__ = r, CurrentGlobal.__FEDERATION__.__DEBUG_CONSTRUCTOR_VERSION__ = "0.6.16");
706
+ t && (CurrentGlobal.__FEDERATION__.__DEBUG_CONSTRUCTOR__ = r, CurrentGlobal.__FEDERATION__.__DEBUG_CONSTRUCTOR_VERSION__ = "0.6.18");
707
707
  }
708
708
  function getInfoWithoutType(r, t) {
709
709
  if (typeof t == "string") {
@@ -715,7 +715,7 @@ function getInfoWithoutType(r, t) {
715
715
  {
716
716
  const o = Object.keys(r);
717
717
  for (const s of o) {
718
- const [a, l] = s.split(":"), i = `${a}:${t}`, c = r[i];
718
+ const [l, a] = s.split(":"), i = `${l}:${t}`, c = r[i];
719
719
  if (c)
720
720
  return {
721
721
  value: c,
@@ -735,9 +735,9 @@ const getGlobalSnapshot = () => nativeGlobal.__FEDERATION__.moduleInfo, getTarge
735
735
  if (o && !o.version && "version" in r && r.version && (o.version = r.version), o)
736
736
  return o;
737
737
  if ("version" in r && r.version) {
738
- const { version: s } = r, a = _object_without_properties_loose(r, [
738
+ const { version: s } = r, l = _object_without_properties_loose(r, [
739
739
  "version"
740
- ]), l = getFMId(a), i = getInfoWithoutType(nativeGlobal.__FEDERATION__.moduleInfo, l).value;
740
+ ]), a = getFMId(l), i = getInfoWithoutType(nativeGlobal.__FEDERATION__.moduleInfo, a).value;
741
741
  if ((i == null ? void 0 : i.version) === s)
742
742
  return i;
743
743
  }
@@ -772,7 +772,7 @@ function combineVersion(r, t, n, o) {
772
772
  return o ? `${s}-${o}` : s;
773
773
  }
774
774
  function parseHyphen(r) {
775
- return r.replace(parseRegex(hyphenRange), (t, n, o, s, a, l, i, c, u, p, d, m) => (isXVersion(o) ? n = "" : isXVersion(s) ? n = `>=${o}.0.0` : isXVersion(a) ? n = `>=${o}.${s}.0` : n = `>=${n}`, isXVersion(u) ? c = "" : isXVersion(p) ? c = `<${Number(u) + 1}.0.0-0` : isXVersion(d) ? c = `<${u}.${Number(p) + 1}.0-0` : m ? c = `<=${u}.${p}.${d}-${m}` : c = `<=${c}`, `${n} ${c}`.trim()));
775
+ return r.replace(parseRegex(hyphenRange), (t, n, o, s, l, a, i, c, u, d, p, m) => (isXVersion(o) ? n = "" : isXVersion(s) ? n = `>=${o}.0.0` : isXVersion(l) ? n = `>=${o}.${s}.0` : n = `>=${n}`, isXVersion(u) ? c = "" : isXVersion(d) ? c = `<${Number(u) + 1}.0.0-0` : isXVersion(p) ? c = `<${u}.${Number(d) + 1}.0-0` : m ? c = `<=${u}.${d}.${p}-${m}` : c = `<=${c}`, `${n} ${c}`.trim()));
776
776
  }
777
777
  function parseComparatorTrim(r) {
778
778
  return r.replace(parseRegex(comparatorTrim), "$1$2$3");
@@ -784,15 +784,15 @@ function parseCaretTrim(r) {
784
784
  return r.replace(parseRegex(caretTrim), "$1^");
785
785
  }
786
786
  function parseCarets(r) {
787
- return r.trim().split(/\s+/).map((t) => t.replace(parseRegex(caret), (n, o, s, a, l) => isXVersion(o) ? "" : isXVersion(s) ? `>=${o}.0.0 <${Number(o) + 1}.0.0-0` : isXVersion(a) ? o === "0" ? `>=${o}.${s}.0 <${o}.${Number(s) + 1}.0-0` : `>=${o}.${s}.0 <${Number(o) + 1}.0.0-0` : l ? o === "0" ? s === "0" ? `>=${o}.${s}.${a}-${l} <${o}.${s}.${Number(a) + 1}-0` : `>=${o}.${s}.${a}-${l} <${o}.${Number(s) + 1}.0-0` : `>=${o}.${s}.${a}-${l} <${Number(o) + 1}.0.0-0` : o === "0" ? s === "0" ? `>=${o}.${s}.${a} <${o}.${s}.${Number(a) + 1}-0` : `>=${o}.${s}.${a} <${o}.${Number(s) + 1}.0-0` : `>=${o}.${s}.${a} <${Number(o) + 1}.0.0-0`)).join(" ");
787
+ return r.trim().split(/\s+/).map((t) => t.replace(parseRegex(caret), (n, o, s, l, a) => isXVersion(o) ? "" : isXVersion(s) ? `>=${o}.0.0 <${Number(o) + 1}.0.0-0` : isXVersion(l) ? o === "0" ? `>=${o}.${s}.0 <${o}.${Number(s) + 1}.0-0` : `>=${o}.${s}.0 <${Number(o) + 1}.0.0-0` : a ? o === "0" ? s === "0" ? `>=${o}.${s}.${l}-${a} <${o}.${s}.${Number(l) + 1}-0` : `>=${o}.${s}.${l}-${a} <${o}.${Number(s) + 1}.0-0` : `>=${o}.${s}.${l}-${a} <${Number(o) + 1}.0.0-0` : o === "0" ? s === "0" ? `>=${o}.${s}.${l} <${o}.${s}.${Number(l) + 1}-0` : `>=${o}.${s}.${l} <${o}.${Number(s) + 1}.0-0` : `>=${o}.${s}.${l} <${Number(o) + 1}.0.0-0`)).join(" ");
788
788
  }
789
789
  function parseTildes(r) {
790
- return r.trim().split(/\s+/).map((t) => t.replace(parseRegex(tilde), (n, o, s, a, l) => isXVersion(o) ? "" : isXVersion(s) ? `>=${o}.0.0 <${Number(o) + 1}.0.0-0` : isXVersion(a) ? `>=${o}.${s}.0 <${o}.${Number(s) + 1}.0-0` : l ? `>=${o}.${s}.${a}-${l} <${o}.${Number(s) + 1}.0-0` : `>=${o}.${s}.${a} <${o}.${Number(s) + 1}.0-0`)).join(" ");
790
+ return r.trim().split(/\s+/).map((t) => t.replace(parseRegex(tilde), (n, o, s, l, a) => isXVersion(o) ? "" : isXVersion(s) ? `>=${o}.0.0 <${Number(o) + 1}.0.0-0` : isXVersion(l) ? `>=${o}.${s}.0 <${o}.${Number(s) + 1}.0-0` : a ? `>=${o}.${s}.${l}-${a} <${o}.${Number(s) + 1}.0-0` : `>=${o}.${s}.${l} <${o}.${Number(s) + 1}.0-0`)).join(" ");
791
791
  }
792
792
  function parseXRanges(r) {
793
- return r.split(/\s+/).map((t) => t.trim().replace(parseRegex(xRange), (n, o, s, a, l, i) => {
794
- const c = isXVersion(s), u = c || isXVersion(a), p = u || isXVersion(l);
795
- return o === "=" && p && (o = ""), i = "", c ? o === ">" || o === "<" ? "<0.0.0-0" : "*" : o && p ? (u && (a = 0), l = 0, o === ">" ? (o = ">=", u ? (s = Number(s) + 1, a = 0, l = 0) : (a = Number(a) + 1, l = 0)) : o === "<=" && (o = "<", u ? s = Number(s) + 1 : a = Number(a) + 1), o === "<" && (i = "-0"), `${o + s}.${a}.${l}${i}`) : u ? `>=${s}.0.0${i} <${Number(s) + 1}.0.0-0` : p ? `>=${s}.${a}.0${i} <${s}.${Number(a) + 1}.0-0` : n;
793
+ return r.split(/\s+/).map((t) => t.trim().replace(parseRegex(xRange), (n, o, s, l, a, i) => {
794
+ const c = isXVersion(s), u = c || isXVersion(l), d = u || isXVersion(a);
795
+ return o === "=" && d && (o = ""), i = "", c ? o === ">" || o === "<" ? "<0.0.0-0" : "*" : o && d ? (u && (l = 0), a = 0, o === ">" ? (o = ">=", u ? (s = Number(s) + 1, l = 0, a = 0) : (l = Number(l) + 1, a = 0)) : o === "<=" && (o = "<", u ? s = Number(s) + 1 : l = Number(l) + 1), o === "<" && (i = "-0"), `${o + s}.${l}.${a}${i}`) : u ? `>=${s}.0.0${i} <${Number(s) + 1}.0.0-0` : d ? `>=${s}.${l}.0${i} <${s}.${Number(l) + 1}.0-0` : n;
796
796
  })).join(" ");
797
797
  }
798
798
  function parseStar(r) {
@@ -812,10 +812,10 @@ function comparePreRelease(r, t) {
812
812
  return -1;
813
813
  if (n === void 0 && o === void 0)
814
814
  return 0;
815
- for (let s = 0, a = n.length; s <= a; s++) {
816
- const l = n[s], i = o[s];
817
- if (l !== i)
818
- return l === void 0 && i === void 0 ? 0 : l ? i ? compareAtom(l, i) : -1 : 1;
815
+ for (let s = 0, l = n.length; s <= l; s++) {
816
+ const a = n[s], i = o[s];
817
+ if (a !== i)
818
+ return a === void 0 && i === void 0 ? 0 : a ? i ? compareAtom(a, i) : -1 : 1;
819
819
  }
820
820
  return 0;
821
821
  }
@@ -885,16 +885,16 @@ function parseRange(r) {
885
885
  function satisfy(r, t) {
886
886
  if (!r)
887
887
  return !1;
888
- const s = parseRange(t).split(" ").map((m) => parseComparatorString(m)).join(" ").split(/\s+/).map((m) => parseGTE0(m)), a = extractComparator(r);
889
- if (!a)
888
+ const s = parseRange(t).split(" ").map((m) => parseComparatorString(m)).join(" ").split(/\s+/).map((m) => parseGTE0(m)), l = extractComparator(r);
889
+ if (!l)
890
890
  return !1;
891
- const [, l, , i, c, u, p] = a, d = {
892
- operator: l,
893
- version: combineVersion(i, c, u, p),
891
+ const [, a, , i, c, u, d] = l, p = {
892
+ operator: a,
893
+ version: combineVersion(i, c, u, d),
894
894
  major: i,
895
895
  minor: c,
896
896
  patch: u,
897
- preRelease: p == null ? void 0 : p.split(".")
897
+ preRelease: d == null ? void 0 : d.split(".")
898
898
  };
899
899
  for (const m of s) {
900
900
  const y = extractComparator(m);
@@ -908,7 +908,7 @@ function satisfy(r, t) {
908
908
  patch: b,
909
909
  preRelease: S == null ? void 0 : S.split(".")
910
910
  };
911
- if (!compare(v, d))
911
+ if (!compare(v, p))
912
912
  return !1;
913
913
  }
914
914
  return !0;
@@ -918,7 +918,7 @@ function formatShare(r, t, n, o) {
918
918
  "get" in r ? s = r.get : "lib" in r ? s = () => Promise.resolve(r.lib) : s = () => Promise.resolve(() => {
919
919
  throw new Error(`Can not get shared '${n}'!`);
920
920
  }), r.strategy && warn('"shared.strategy is deprecated, please set in initOptions.shareStrategy instead!"');
921
- var a, l, i;
921
+ var l, a, i;
922
922
  return _extends$1({
923
923
  deps: [],
924
924
  useIn: [],
@@ -933,37 +933,37 @@ function formatShare(r, t, n, o) {
933
933
  }, r.shareConfig),
934
934
  get: s,
935
935
  loaded: r != null && r.loaded || "lib" in r ? !0 : void 0,
936
- version: (a = r.version) != null ? a : "0",
936
+ version: (l = r.version) != null ? l : "0",
937
937
  scope: Array.isArray(r.scope) ? r.scope : [
938
- (l = r.scope) != null ? l : "default"
938
+ (a = r.scope) != null ? a : "default"
939
939
  ],
940
940
  strategy: ((i = r.strategy) != null ? i : o) || "version-first"
941
941
  });
942
942
  }
943
943
  function formatShareConfigs(r, t) {
944
- const n = t.shared || {}, o = t.name, s = Object.keys(n).reduce((l, i) => {
944
+ const n = t.shared || {}, o = t.name, s = Object.keys(n).reduce((a, i) => {
945
945
  const c = arrayOptions(n[i]);
946
- return l[i] = l[i] || [], c.forEach((u) => {
947
- l[i].push(formatShare(u, o, i, t.shareStrategy));
948
- }), l;
949
- }, {}), a = _extends$1({}, r.shared);
950
- return Object.keys(s).forEach((l) => {
951
- a[l] ? s[l].forEach((i) => {
952
- a[l].find((u) => u.version === i.version) || a[l].push(i);
953
- }) : a[l] = s[l];
946
+ return a[i] = a[i] || [], c.forEach((u) => {
947
+ a[i].push(formatShare(u, o, i, t.shareStrategy));
948
+ }), a;
949
+ }, {}), l = _extends$1({}, r.shared);
950
+ return Object.keys(s).forEach((a) => {
951
+ l[a] ? s[a].forEach((i) => {
952
+ l[a].find((u) => u.version === i.version) || l[a].push(i);
953
+ }) : l[a] = s[a];
954
954
  }), {
955
- shared: a,
955
+ shared: l,
956
956
  shareInfos: s
957
957
  };
958
958
  }
959
959
  function versionLt(r, t) {
960
960
  const n = (o) => {
961
961
  if (!Number.isNaN(Number(o))) {
962
- const a = o.split(".");
963
- let l = o;
964
- for (let i = 0; i < 3 - a.length; i++)
965
- l += ".0";
966
- return l;
962
+ const l = o.split(".");
963
+ let a = o;
964
+ for (let i = 0; i < 3 - l.length; i++)
965
+ a += ".0";
966
+ return a;
967
967
  }
968
968
  return o;
969
969
  };
@@ -976,15 +976,15 @@ const findVersion = (r, t) => {
976
976
  return Object.keys(r).reduce((o, s) => !o || n(o, s) || o === "0" ? s : o, 0);
977
977
  }, isLoaded = (r) => !!r.loaded || typeof r.lib == "function", isLoading = (r) => !!r.loading;
978
978
  function findSingletonVersionOrderByVersion(r, t, n) {
979
- const o = r[t][n], s = function(a, l) {
980
- return !isLoaded(o[a]) && versionLt(a, l);
979
+ const o = r[t][n], s = function(l, a) {
980
+ return !isLoaded(o[l]) && versionLt(l, a);
981
981
  };
982
982
  return findVersion(r[t][n], s);
983
983
  }
984
984
  function findSingletonVersionOrderByLoaded(r, t, n) {
985
- const o = r[t][n], s = function(a, l) {
985
+ const o = r[t][n], s = function(l, a) {
986
986
  const i = (c) => isLoaded(c) || isLoading(c);
987
- return i(o[l]) ? i(o[a]) ? !!versionLt(a, l) : !0 : i(o[a]) ? !1 : versionLt(a, l);
987
+ return i(o[a]) ? i(o[l]) ? !!versionLt(l, a) : !0 : i(o[l]) ? !1 : versionLt(l, a);
988
988
  };
989
989
  return findVersion(r[t][n], s);
990
990
  }
@@ -994,21 +994,21 @@ function getFindShareFunction(r) {
994
994
  function getRegisteredShare(r, t, n, o) {
995
995
  if (!r)
996
996
  return;
997
- const { shareConfig: s, scope: a = DEFAULT_SCOPE, strategy: l } = n, i = Array.isArray(a) ? a : [
998
- a
997
+ const { shareConfig: s, scope: l = DEFAULT_SCOPE, strategy: a } = n, i = Array.isArray(l) ? l : [
998
+ l
999
999
  ];
1000
1000
  for (const c of i)
1001
1001
  if (s && r[c] && r[c][t]) {
1002
- const { requiredVersion: u } = s, d = getFindShareFunction(l)(r, c, t), m = () => {
1002
+ const { requiredVersion: u } = s, p = getFindShareFunction(a)(r, c, t), m = () => {
1003
1003
  if (s.singleton) {
1004
- if (typeof u == "string" && !satisfy(d, u)) {
1005
- const E = `Version ${d} from ${d && r[c][t][d].from} of shared singleton module ${t} does not satisfy the requirement of ${n.from} which needs ${u})`;
1004
+ if (typeof u == "string" && !satisfy(p, u)) {
1005
+ const E = `Version ${p} from ${p && r[c][t][p].from} of shared singleton module ${t} does not satisfy the requirement of ${n.from} which needs ${u})`;
1006
1006
  s.strictVersion ? error(E) : warn(E);
1007
1007
  }
1008
- return r[c][t][d];
1008
+ return r[c][t][p];
1009
1009
  } else {
1010
- if (u === !1 || u === "*" || satisfy(d, u))
1011
- return r[c][t][d];
1010
+ if (u === !1 || u === "*" || satisfy(p, u))
1011
+ return r[c][t][p];
1012
1012
  for (const [E, g] of Object.entries(r[c][t]))
1013
1013
  if (satisfy(E, u))
1014
1014
  return g;
@@ -1017,7 +1017,7 @@ function getRegisteredShare(r, t, n, o) {
1017
1017
  shareScopeMap: r,
1018
1018
  scope: c,
1019
1019
  pkgName: t,
1020
- version: d,
1020
+ version: p,
1021
1021
  GlobalFederation: Global.__FEDERATION__,
1022
1022
  resolver: m
1023
1023
  };
@@ -1032,17 +1032,17 @@ function getTargetSharedOptions(r) {
1032
1032
  if (!i)
1033
1033
  return;
1034
1034
  const c = {};
1035
- i.forEach((d) => {
1036
- c[d.version] = d;
1035
+ i.forEach((p) => {
1036
+ c[p.version] = p;
1037
1037
  });
1038
- const p = findVersion(c, function(d, m) {
1039
- return !isLoaded(c[d]) && versionLt(d, m);
1038
+ const d = findVersion(c, function(p, m) {
1039
+ return !isLoaded(c[p]) && versionLt(p, m);
1040
1040
  });
1041
- return c[p];
1041
+ return c[d];
1042
1042
  };
1043
- var a;
1044
- const l = (a = n == null ? void 0 : n.resolver) != null ? a : s;
1045
- return Object.assign({}, l(o[t]), n == null ? void 0 : n.customShareInfo);
1043
+ var l;
1044
+ const a = (l = n == null ? void 0 : n.resolver) != null ? l : s;
1045
+ return Object.assign({}, a(o[t]), n == null ? void 0 : n.customShareInfo);
1046
1046
  }
1047
1047
  function getBuilderId() {
1048
1048
  return typeof FEDERATION_BUILD_IDENTIFIER < "u" ? FEDERATION_BUILD_IDENTIFIER : "";
@@ -1066,17 +1066,17 @@ function matchRemoteWithNameAndExpose(r, t) {
1066
1066
  remote: n
1067
1067
  };
1068
1068
  }
1069
- const a = n.alias && t.startsWith(n.alias);
1070
- let l = n.alias && t.replace(n.alias, "");
1071
- if (n.alias && a) {
1072
- if (l && l.startsWith("/")) {
1069
+ const l = n.alias && t.startsWith(n.alias);
1070
+ let a = n.alias && t.replace(n.alias, "");
1071
+ if (n.alias && l) {
1072
+ if (a && a.startsWith("/")) {
1073
1073
  const i = n.alias;
1074
- return l = `.${l}`, {
1074
+ return a = `.${a}`, {
1075
1075
  pkgNameOrAlias: i,
1076
- expose: l,
1076
+ expose: a,
1077
1077
  remote: n
1078
1078
  };
1079
- } else if (l === "")
1079
+ } else if (a === "")
1080
1080
  return {
1081
1081
  pkgNameOrAlias: n.alias,
1082
1082
  expose: ".",
@@ -1132,31 +1132,31 @@ async function loadEntryScript({ name: r, globalName: t, entry: n, loaderHook: o
1132
1132
  const { entryExports: s } = getRemoteEntryExports(r, t);
1133
1133
  return s || loadScript(n, {
1134
1134
  attrs: {},
1135
- createScriptHook: (a, l) => {
1135
+ createScriptHook: (l, a) => {
1136
1136
  const i = o.lifecycle.createScript.emit({
1137
- url: a,
1138
- attrs: l
1137
+ url: l,
1138
+ attrs: a
1139
1139
  });
1140
1140
  if (i && (i instanceof HTMLScriptElement || "script" in i || "timeout" in i))
1141
1141
  return i;
1142
1142
  }
1143
1143
  }).then(() => {
1144
- const { remoteEntryKey: a, entryExports: l } = getRemoteEntryExports(r, t);
1145
- return assert(l, getShortErrorMsg(RUNTIME_001, runtimeDescMap, {
1144
+ const { remoteEntryKey: l, entryExports: a } = getRemoteEntryExports(r, t);
1145
+ return assert(a, getShortErrorMsg(RUNTIME_001, runtimeDescMap, {
1146
1146
  remoteName: r,
1147
1147
  remoteEntryUrl: n,
1148
- remoteEntryKey: a
1149
- })), l;
1150
- }).catch((a) => {
1148
+ remoteEntryKey: l
1149
+ })), a;
1150
+ }).catch((l) => {
1151
1151
  throw assert(void 0, getShortErrorMsg(RUNTIME_008, runtimeDescMap, {
1152
1152
  remoteName: r,
1153
1153
  resourceUrl: n
1154
- })), a;
1154
+ })), l;
1155
1155
  });
1156
1156
  }
1157
1157
  async function loadEntryDom({ remoteInfo: r, remoteEntryExports: t, loaderHook: n }) {
1158
- const { entry: o, entryGlobalName: s, name: a, type: l } = r;
1159
- switch (l) {
1158
+ const { entry: o, entryGlobalName: s, name: l, type: a } = r;
1159
+ switch (a) {
1160
1160
  case "esm":
1161
1161
  case "module":
1162
1162
  return loadEsmEntry({
@@ -1172,18 +1172,18 @@ async function loadEntryDom({ remoteInfo: r, remoteEntryExports: t, loaderHook:
1172
1172
  return loadEntryScript({
1173
1173
  entry: o,
1174
1174
  globalName: s,
1175
- name: a,
1175
+ name: l,
1176
1176
  loaderHook: n
1177
1177
  });
1178
1178
  }
1179
1179
  }
1180
1180
  async function loadEntryNode({ remoteInfo: r, loaderHook: t }) {
1181
- const { entry: n, entryGlobalName: o, name: s, type: a } = r, { entryExports: l } = getRemoteEntryExports(s, o);
1182
- return l || loadScriptNode(n, {
1181
+ const { entry: n, entryGlobalName: o, name: s, type: l } = r, { entryExports: a } = getRemoteEntryExports(s, o);
1182
+ return a || loadScriptNode(n, {
1183
1183
  attrs: {
1184
1184
  name: s,
1185
1185
  globalName: o,
1186
- type: a
1186
+ type: l
1187
1187
  },
1188
1188
  loaderHook: {
1189
1189
  createScriptHook: (i, c = {}) => {
@@ -1215,18 +1215,18 @@ async function getRemoteEntry({ origin: r, remoteEntryExports: t, remoteInfo: n
1215
1215
  if (t)
1216
1216
  return t;
1217
1217
  if (!globalLoading[o]) {
1218
- const s = r.remoteHandler.hooks.lifecycle.loadEntry, a = r.loaderHook;
1218
+ const s = r.remoteHandler.hooks.lifecycle.loadEntry, l = r.loaderHook;
1219
1219
  globalLoading[o] = s.emit({
1220
- loaderHook: a,
1220
+ loaderHook: l,
1221
1221
  remoteInfo: n,
1222
1222
  remoteEntryExports: t
1223
- }).then((l) => l || (isBrowserEnv() ? loadEntryDom({
1223
+ }).then((a) => a || (isBrowserEnv() ? loadEntryDom({
1224
1224
  remoteInfo: n,
1225
1225
  remoteEntryExports: t,
1226
- loaderHook: a
1226
+ loaderHook: l
1227
1227
  }) : loadEntryNode({
1228
1228
  remoteInfo: n,
1229
- loaderHook: a
1229
+ loaderHook: l
1230
1230
  })));
1231
1231
  }
1232
1232
  return globalLoading[o];
@@ -1266,17 +1266,17 @@ let Module = class {
1266
1266
  }
1267
1267
  // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
1268
1268
  async get(t, n, o, s) {
1269
- const { loadFactory: a = !0 } = o || {
1269
+ const { loadFactory: l = !0 } = o || {
1270
1270
  loadFactory: !0
1271
- }, l = await this.getEntry();
1271
+ }, a = await this.getEntry();
1272
1272
  if (!this.inited) {
1273
- const d = this.host.shareScopeMap, m = this.remoteInfo.shareScope || "default";
1274
- d[m] || (d[m] = {});
1275
- const y = d[m], _ = [], E = {
1273
+ const p = this.host.shareScopeMap, m = this.remoteInfo.shareScope || "default";
1274
+ p[m] || (p[m] = {});
1275
+ const y = p[m], _ = [], E = {
1276
1276
  version: this.remoteInfo.version || ""
1277
1277
  };
1278
1278
  Object.defineProperty(E, "shareScopeMap", {
1279
- value: d,
1279
+ value: p,
1280
1280
  // remoteEntryInitOptions will be traversed and assigned during container init, ,so this attribute is not allowed to be traversed
1281
1281
  enumerable: !1
1282
1282
  });
@@ -1288,30 +1288,30 @@ let Module = class {
1288
1288
  remoteInfo: this.remoteInfo,
1289
1289
  origin: this.host
1290
1290
  });
1291
- typeof (l == null ? void 0 : l.init) > "u" && error(getShortErrorMsg(RUNTIME_002, runtimeDescMap, {
1291
+ typeof (a == null ? void 0 : a.init) > "u" && error(getShortErrorMsg(RUNTIME_002, runtimeDescMap, {
1292
1292
  remoteName: name,
1293
1293
  remoteEntryUrl: this.remoteInfo.entry,
1294
1294
  remoteEntryKey: this.remoteInfo.entryGlobalName
1295
- })), await l.init(g.shareScope, g.initScope, g.remoteEntryInitOptions), await this.host.hooks.lifecycle.initContainer.emit(_extends$1({}, g, {
1295
+ })), await a.init(g.shareScope, g.initScope, g.remoteEntryInitOptions), await this.host.hooks.lifecycle.initContainer.emit(_extends$1({}, g, {
1296
1296
  id: t,
1297
1297
  remoteSnapshot: s,
1298
- remoteEntryExports: l
1298
+ remoteEntryExports: a
1299
1299
  }));
1300
1300
  }
1301
- this.lib = l, this.inited = !0;
1301
+ this.lib = a, this.inited = !0;
1302
1302
  let i;
1303
1303
  i = await this.host.loaderHook.lifecycle.getModuleFactory.emit({
1304
- remoteEntryExports: l,
1304
+ remoteEntryExports: a,
1305
1305
  expose: n,
1306
1306
  moduleInfo: this.remoteInfo
1307
- }), i || (i = await l.get(n)), assert(i, `${getFMId(this.remoteInfo)} remote don't export ${n}.`);
1307
+ }), i || (i = await a.get(n)), assert(i, `${getFMId(this.remoteInfo)} remote don't export ${n}.`);
1308
1308
  const c = processModuleAlias(this.remoteInfo.name, n), u = this.wraperFactory(i, c);
1309
- return a ? await u() : u;
1309
+ return l ? await u() : u;
1310
1310
  }
1311
1311
  wraperFactory(t, n) {
1312
- function o(s, a) {
1312
+ function o(s, l) {
1313
1313
  s && typeof s == "object" && Object.isExtensible(s) && !Object.getOwnPropertyDescriptor(s, Symbol.for("mf_module_id")) && Object.defineProperty(s, Symbol.for("mf_module_id"), {
1314
- value: a,
1314
+ value: l,
1315
1315
  enumerable: !1
1316
1316
  });
1317
1317
  }
@@ -1359,8 +1359,8 @@ class AsyncHook extends SyncHook {
1359
1359
  const o = Array.from(this.listeners);
1360
1360
  if (o.length > 0) {
1361
1361
  let s = 0;
1362
- const a = (l) => l === !1 ? !1 : s < o.length ? Promise.resolve(o[s++].apply(null, t)).then(a) : l;
1363
- n = a();
1362
+ const l = (a) => a === !1 ? !1 : s < o.length ? Promise.resolve(o[s++].apply(null, t)).then(l) : a;
1363
+ n = l();
1364
1364
  }
1365
1365
  return Promise.resolve(n);
1366
1366
  }
@@ -1402,11 +1402,11 @@ class AsyncWaterfallHook extends SyncHook {
1402
1402
  const n = Array.from(this.listeners);
1403
1403
  if (n.length > 0) {
1404
1404
  let o = 0;
1405
- const s = (l) => (warn(l), this.onerror(l), t), a = (l) => {
1406
- if (checkReturnData(t, l)) {
1407
- if (t = l, o < n.length)
1405
+ const s = (a) => (warn(a), this.onerror(a), t), l = (a) => {
1406
+ if (checkReturnData(t, a)) {
1407
+ if (t = a, o < n.length)
1408
1408
  try {
1409
- return Promise.resolve(n[o++](t)).then(a, s);
1409
+ return Promise.resolve(n[o++](t)).then(l, s);
1410
1410
  } catch (i) {
1411
1411
  return s(i);
1412
1412
  }
@@ -1414,7 +1414,7 @@ class AsyncWaterfallHook extends SyncHook {
1414
1414
  this.onerror(`A plugin returned an incorrect value for the "${this.type}" type.`);
1415
1415
  return t;
1416
1416
  };
1417
- return Promise.resolve(a(t));
1417
+ return Promise.resolve(l(t));
1418
1418
  }
1419
1419
  return Promise.resolve(t);
1420
1420
  }
@@ -1474,9 +1474,9 @@ function normalizePreloadExposes(r) {
1474
1474
  return r ? r.map((t) => t === "." ? t : t.startsWith("./") ? t.replace("./", "") : t) : [];
1475
1475
  }
1476
1476
  function preloadAssets(r, t, n, o = !0) {
1477
- const { cssAssets: s, jsAssetsWithoutEntry: a, entryAssets: l } = n;
1477
+ const { cssAssets: s, jsAssetsWithoutEntry: l, entryAssets: a } = n;
1478
1478
  if (t.options.inBrowser) {
1479
- if (l.forEach((i) => {
1479
+ if (a.forEach((i) => {
1480
1480
  const { moduleInfo: c } = i, u = t.moduleCache.get(r.name);
1481
1481
  getRemoteEntry(u ? {
1482
1482
  origin: t,
@@ -1493,21 +1493,21 @@ function preloadAssets(r, t, n, o = !0) {
1493
1493
  as: "style"
1494
1494
  };
1495
1495
  s.forEach((c) => {
1496
- const { link: u, needAttach: p } = createLink({
1496
+ const { link: u, needAttach: d } = createLink({
1497
1497
  url: c,
1498
1498
  cb: () => {
1499
1499
  },
1500
1500
  attrs: i,
1501
- createLinkHook: (d, m) => {
1501
+ createLinkHook: (p, m) => {
1502
1502
  const y = t.loaderHook.lifecycle.createLink.emit({
1503
- url: d,
1503
+ url: p,
1504
1504
  attrs: m
1505
1505
  });
1506
1506
  if (y instanceof HTMLLinkElement)
1507
1507
  return y;
1508
1508
  }
1509
1509
  });
1510
- p && document.head.appendChild(u);
1510
+ d && document.head.appendChild(u);
1511
1511
  });
1512
1512
  } else {
1513
1513
  const i = {
@@ -1515,14 +1515,14 @@ function preloadAssets(r, t, n, o = !0) {
1515
1515
  type: "text/css"
1516
1516
  };
1517
1517
  s.forEach((c) => {
1518
- const { link: u, needAttach: p } = createLink({
1518
+ const { link: u, needAttach: d } = createLink({
1519
1519
  url: c,
1520
1520
  cb: () => {
1521
1521
  },
1522
1522
  attrs: i,
1523
- createLinkHook: (d, m) => {
1523
+ createLinkHook: (p, m) => {
1524
1524
  const y = t.loaderHook.lifecycle.createLink.emit({
1525
- url: d,
1525
+ url: p,
1526
1526
  attrs: m
1527
1527
  });
1528
1528
  if (y instanceof HTMLLinkElement)
@@ -1530,7 +1530,7 @@ function preloadAssets(r, t, n, o = !0) {
1530
1530
  },
1531
1531
  needDeleteLink: !1
1532
1532
  });
1533
- p && document.head.appendChild(u);
1533
+ d && document.head.appendChild(u);
1534
1534
  });
1535
1535
  }
1536
1536
  if (o) {
@@ -1538,37 +1538,37 @@ function preloadAssets(r, t, n, o = !0) {
1538
1538
  rel: "preload",
1539
1539
  as: "script"
1540
1540
  };
1541
- a.forEach((c) => {
1542
- const { link: u, needAttach: p } = createLink({
1541
+ l.forEach((c) => {
1542
+ const { link: u, needAttach: d } = createLink({
1543
1543
  url: c,
1544
1544
  cb: () => {
1545
1545
  },
1546
1546
  attrs: i,
1547
- createLinkHook: (d, m) => {
1547
+ createLinkHook: (p, m) => {
1548
1548
  const y = t.loaderHook.lifecycle.createLink.emit({
1549
- url: d,
1549
+ url: p,
1550
1550
  attrs: m
1551
1551
  });
1552
1552
  if (y instanceof HTMLLinkElement)
1553
1553
  return y;
1554
1554
  }
1555
1555
  });
1556
- p && document.head.appendChild(u);
1556
+ d && document.head.appendChild(u);
1557
1557
  });
1558
1558
  } else {
1559
1559
  const i = {
1560
1560
  fetchpriority: "high",
1561
1561
  type: (r == null ? void 0 : r.type) === "module" ? "module" : "text/javascript"
1562
1562
  };
1563
- a.forEach((c) => {
1564
- const { script: u, needAttach: p } = createScript({
1563
+ l.forEach((c) => {
1564
+ const { script: u, needAttach: d } = createScript({
1565
1565
  url: c,
1566
1566
  cb: () => {
1567
1567
  },
1568
1568
  attrs: i,
1569
- createScriptHook: (d, m) => {
1569
+ createScriptHook: (p, m) => {
1570
1570
  const y = t.loaderHook.lifecycle.createScript.emit({
1571
- url: d,
1571
+ url: p,
1572
1572
  attrs: m
1573
1573
  });
1574
1574
  if (y instanceof HTMLScriptElement)
@@ -1576,7 +1576,7 @@ function preloadAssets(r, t, n, o = !0) {
1576
1576
  },
1577
1577
  needDeleteScript: !0
1578
1578
  });
1579
- p && document.head.appendChild(u);
1579
+ d && document.head.appendChild(u);
1580
1580
  });
1581
1581
  }
1582
1582
  }
@@ -1591,10 +1591,10 @@ function snapshotPlugin() {
1591
1591
  return {
1592
1592
  name: "snapshot-plugin",
1593
1593
  async afterResolve(r) {
1594
- const { remote: t, pkgNameOrAlias: n, expose: o, origin: s, remoteInfo: a } = r;
1594
+ const { remote: t, pkgNameOrAlias: n, expose: o, origin: s, remoteInfo: l } = r;
1595
1595
  if (!isRemoteInfoWithEntry(t) || !isPureRemoteEntry(t)) {
1596
- const { remoteSnapshot: l, globalSnapshot: i } = await s.snapshotHandler.loadRemoteSnapshotInfo(t);
1597
- assignRemoteInfo(a, l);
1596
+ const { remoteSnapshot: a, globalSnapshot: i } = await s.snapshotHandler.loadRemoteSnapshotInfo(t);
1597
+ assignRemoteInfo(l, a);
1598
1598
  const c = {
1599
1599
  remote: t,
1600
1600
  preloadConfig: {
@@ -1609,13 +1609,13 @@ function snapshotPlugin() {
1609
1609
  }, u = await s.remoteHandler.hooks.lifecycle.generatePreloadAssets.emit({
1610
1610
  origin: s,
1611
1611
  preloadOptions: c,
1612
- remoteInfo: a,
1612
+ remoteInfo: l,
1613
1613
  remote: t,
1614
- remoteSnapshot: l,
1614
+ remoteSnapshot: a,
1615
1615
  globalSnapshot: i
1616
1616
  });
1617
- return u && preloadAssets(a, s, u, !1), _extends$1({}, r, {
1618
- remoteSnapshot: l
1617
+ return u && preloadAssets(l, s, u, !1), _extends$1({}, r, {
1618
+ remoteSnapshot: a
1619
1619
  });
1620
1620
  }
1621
1621
  return r;
@@ -1635,35 +1635,35 @@ function splitId(r) {
1635
1635
  version: t[2]
1636
1636
  };
1637
1637
  }
1638
- function traverseModuleInfo(r, t, n, o, s = {}, a) {
1639
- const l = getFMId(t), { value: i } = getInfoWithoutType(r, l), c = a || i;
1638
+ function traverseModuleInfo(r, t, n, o, s = {}, l) {
1639
+ const a = getFMId(t), { value: i } = getInfoWithoutType(r, a), c = l || i;
1640
1640
  if (c && !isManifestProvider(c) && (n(c, t, o), c.remotesInfo)) {
1641
1641
  const u = Object.keys(c.remotesInfo);
1642
- for (const p of u) {
1643
- if (s[p])
1642
+ for (const d of u) {
1643
+ if (s[d])
1644
1644
  continue;
1645
- s[p] = !0;
1646
- const d = splitId(p), m = c.remotesInfo[p];
1645
+ s[d] = !0;
1646
+ const p = splitId(d), m = c.remotesInfo[d];
1647
1647
  traverseModuleInfo(r, {
1648
- name: d.name,
1648
+ name: p.name,
1649
1649
  version: m.matchedVersion
1650
1650
  }, n, !1, s, void 0);
1651
1651
  }
1652
1652
  }
1653
1653
  }
1654
1654
  function generatePreloadAssets(r, t, n, o, s) {
1655
- const a = [], l = [], i = [], c = /* @__PURE__ */ new Set(), u = /* @__PURE__ */ new Set(), { options: p } = r, { preloadConfig: d } = t, { depsRemote: m } = d;
1655
+ const l = [], a = [], i = [], c = /* @__PURE__ */ new Set(), u = /* @__PURE__ */ new Set(), { options: d } = r, { preloadConfig: p } = t, { depsRemote: m } = p;
1656
1656
  if (traverseModuleInfo(o, n, (g, b, S) => {
1657
1657
  let v;
1658
1658
  if (S)
1659
- v = d;
1659
+ v = p;
1660
1660
  else if (Array.isArray(m)) {
1661
1661
  const T = m.find((A) => A.nameOrAlias === b.name || A.nameOrAlias === b.alias);
1662
1662
  if (!T)
1663
1663
  return;
1664
1664
  v = defaultPreloadArgs(T);
1665
1665
  } else if (m === !0)
1666
- v = d;
1666
+ v = p;
1667
1667
  else
1668
1668
  return;
1669
1669
  const I = getResourceUrl(g, getRemoteEntryInfoFromSnapshot(g).url);
@@ -1700,7 +1700,7 @@ function generatePreloadAssets(r, t, n, o, s) {
1700
1700
  preloadConfig: v,
1701
1701
  remote: b,
1702
1702
  origin: r
1703
- }), !getPreloaded(M) && (v.resourceCategory === "all" ? (a.push(...O(P.assets.css.async)), a.push(...O(P.assets.css.sync)), l.push(...O(P.assets.js.async)), l.push(...O(P.assets.js.sync))) : (v.resourceCategory = "sync") && (a.push(...O(P.assets.css.sync)), l.push(...O(P.assets.js.sync))), setPreloaded(M));
1703
+ }), !getPreloaded(M) && (v.resourceCategory === "all" ? (l.push(...O(P.assets.css.async)), l.push(...O(P.assets.css.sync)), a.push(...O(P.assets.js.async)), a.push(...O(P.assets.js.sync))) : (v.resourceCategory = "sync") && (l.push(...O(P.assets.css.sync)), a.push(...O(P.assets.js.sync))), setPreloaded(M));
1704
1704
  }
1705
1705
  }
1706
1706
  }, !0, {}, s), s.shared) {
@@ -1714,7 +1714,7 @@ function generatePreloadAssets(r, t, n, o, s) {
1714
1714
  };
1715
1715
  s.shared.forEach((b) => {
1716
1716
  var S;
1717
- const v = (S = p.shared) == null ? void 0 : S[b.sharedName];
1717
+ const v = (S = d.shared) == null ? void 0 : S[b.sharedName];
1718
1718
  if (!v)
1719
1719
  return;
1720
1720
  const I = b.version ? v.find(($) => $.version === b.version) : v;
@@ -1725,9 +1725,9 @@ function generatePreloadAssets(r, t, n, o, s) {
1725
1725
  });
1726
1726
  });
1727
1727
  }
1728
- const _ = l.filter((g) => !c.has(g));
1728
+ const _ = a.filter((g) => !c.has(g));
1729
1729
  return {
1730
- cssAssets: a.filter((g) => !u.has(g)),
1730
+ cssAssets: l.filter((g) => !u.has(g)),
1731
1731
  jsAssetsWithoutEntry: _,
1732
1732
  entryAssets: i
1733
1733
  };
@@ -1736,7 +1736,7 @@ const generatePreloadAssetsPlugin = function() {
1736
1736
  return {
1737
1737
  name: "generate-preload-assets-plugin",
1738
1738
  async generatePreloadAssets(r) {
1739
- const { origin: t, preloadOptions: n, remoteInfo: o, remote: s, globalSnapshot: a, remoteSnapshot: l } = r;
1739
+ const { origin: t, preloadOptions: n, remoteInfo: o, remote: s, globalSnapshot: l, remoteSnapshot: a } = r;
1740
1740
  return isRemoteInfoWithEntry(s) && isPureRemoteEntry(s) ? {
1741
1741
  cssAssets: [],
1742
1742
  jsAssetsWithoutEntry: [],
@@ -1753,7 +1753,7 @@ const generatePreloadAssetsPlugin = function() {
1753
1753
  }
1754
1754
  }
1755
1755
  ]
1756
- } : (assignRemoteInfo(o, l), generatePreloadAssets(t, n, o, a, l));
1756
+ } : (assignRemoteInfo(o, a), generatePreloadAssets(t, n, o, l, a));
1757
1757
  }
1758
1758
  };
1759
1759
  };
@@ -1780,15 +1780,15 @@ function getGlobalRemoteInfo(r, t) {
1780
1780
  }
1781
1781
  class SnapshotHandler {
1782
1782
  async loadSnapshot(t) {
1783
- const { options: n } = this.HostInstance, { hostGlobalSnapshot: o, remoteSnapshot: s, globalSnapshot: a } = this.getGlobalRemoteInfo(t), { remoteSnapshot: l, globalSnapshot: i } = await this.hooks.lifecycle.loadSnapshot.emit({
1783
+ const { options: n } = this.HostInstance, { hostGlobalSnapshot: o, remoteSnapshot: s, globalSnapshot: l } = this.getGlobalRemoteInfo(t), { remoteSnapshot: a, globalSnapshot: i } = await this.hooks.lifecycle.loadSnapshot.emit({
1784
1784
  options: n,
1785
1785
  moduleInfo: t,
1786
1786
  hostGlobalSnapshot: o,
1787
1787
  remoteSnapshot: s,
1788
- globalSnapshot: a
1788
+ globalSnapshot: l
1789
1789
  });
1790
1790
  return {
1791
- remoteSnapshot: l,
1791
+ remoteSnapshot: a,
1792
1792
  globalSnapshot: i
1793
1793
  };
1794
1794
  }
@@ -1814,39 +1814,39 @@ class SnapshotHandler {
1814
1814
  matchedVersion: "version" in t ? t.version : t.entry
1815
1815
  }
1816
1816
  }));
1817
- const { hostGlobalSnapshot: s, remoteSnapshot: a, globalSnapshot: l } = this.getGlobalRemoteInfo(t), { remoteSnapshot: i, globalSnapshot: c } = await this.hooks.lifecycle.loadSnapshot.emit({
1817
+ const { hostGlobalSnapshot: s, remoteSnapshot: l, globalSnapshot: a } = this.getGlobalRemoteInfo(t), { remoteSnapshot: i, globalSnapshot: c } = await this.hooks.lifecycle.loadSnapshot.emit({
1818
1818
  options: n,
1819
1819
  moduleInfo: t,
1820
1820
  hostGlobalSnapshot: s,
1821
- remoteSnapshot: a,
1822
- globalSnapshot: l
1821
+ remoteSnapshot: l,
1822
+ globalSnapshot: a
1823
1823
  });
1824
- let u, p;
1824
+ let u, d;
1825
1825
  if (i)
1826
1826
  if (isManifestProvider(i)) {
1827
- const d = isBrowserEnv() ? i.remoteEntry : i.ssrRemoteEntry || i.remoteEntry || "", m = await this.getManifestJson(d, t, {}), y = setGlobalSnapshotInfoByModuleInfo(_extends$1({}, t, {
1827
+ const p = isBrowserEnv() ? i.remoteEntry : i.ssrRemoteEntry || i.remoteEntry || "", m = await this.getManifestJson(p, t, {}), y = setGlobalSnapshotInfoByModuleInfo(_extends$1({}, t, {
1828
1828
  // The global remote may be overridden
1829
1829
  // Therefore, set the snapshot key to the global address of the actual request
1830
- entry: d
1830
+ entry: p
1831
1831
  }), m);
1832
- u = m, p = y;
1832
+ u = m, d = y;
1833
1833
  } else {
1834
- const { remoteSnapshot: d } = await this.hooks.lifecycle.loadRemoteSnapshot.emit({
1834
+ const { remoteSnapshot: p } = await this.hooks.lifecycle.loadRemoteSnapshot.emit({
1835
1835
  options: this.HostInstance.options,
1836
1836
  moduleInfo: t,
1837
1837
  remoteSnapshot: i,
1838
1838
  from: "global"
1839
1839
  });
1840
- u = d, p = c;
1840
+ u = p, d = c;
1841
1841
  }
1842
1842
  else if (isRemoteInfoWithEntry(t)) {
1843
- const d = await this.getManifestJson(t.entry, t, {}), m = setGlobalSnapshotInfoByModuleInfo(t, d), { remoteSnapshot: y } = await this.hooks.lifecycle.loadRemoteSnapshot.emit({
1843
+ const p = await this.getManifestJson(t.entry, t, {}), m = setGlobalSnapshotInfoByModuleInfo(t, p), { remoteSnapshot: y } = await this.hooks.lifecycle.loadRemoteSnapshot.emit({
1844
1844
  options: this.HostInstance.options,
1845
1845
  moduleInfo: t,
1846
- remoteSnapshot: d,
1846
+ remoteSnapshot: p,
1847
1847
  from: "global"
1848
1848
  });
1849
- u = y, p = m;
1849
+ u = y, d = m;
1850
1850
  } else
1851
1851
  error(getShortErrorMsg(RUNTIME_007, runtimeDescMap, {
1852
1852
  hostName: t.name,
@@ -1859,7 +1859,7 @@ class SnapshotHandler {
1859
1859
  remoteSnapshot: u
1860
1860
  }), {
1861
1861
  remoteSnapshot: u,
1862
- globalSnapshot: p
1862
+ globalSnapshot: d
1863
1863
  };
1864
1864
  }
1865
1865
  getGlobalRemoteInfo(t) {
@@ -1867,32 +1867,39 @@ class SnapshotHandler {
1867
1867
  }
1868
1868
  async getManifestJson(t, n, o) {
1869
1869
  const s = async () => {
1870
- let l = this.manifestCache.get(t);
1871
- if (l)
1872
- return l;
1870
+ let a = this.manifestCache.get(t);
1871
+ if (a)
1872
+ return a;
1873
1873
  try {
1874
1874
  let i = await this.loaderHook.lifecycle.fetch.emit(t, {});
1875
- return (!i || !(i instanceof Response)) && (i = await fetch(t, {})), l = await i.json(), assert(l.metaData && l.exposes && l.shared, `${t} is not a federation manifest`), this.manifestCache.set(t, l), l;
1875
+ (!i || !(i instanceof Response)) && (i = await fetch(t, {})), a = await i.json();
1876
1876
  } catch (i) {
1877
- delete this.manifestLoading[t], error(getShortErrorMsg(RUNTIME_003, runtimeDescMap, {
1877
+ a = await this.HostInstance.remoteHandler.hooks.lifecycle.errorLoadRemote.emit({
1878
+ id: t,
1879
+ error,
1880
+ from: "runtime",
1881
+ lifecycle: "afterResolve",
1882
+ origin: this.HostInstance
1883
+ }), a || (delete this.manifestLoading[t], error(getShortErrorMsg(RUNTIME_003, runtimeDescMap, {
1878
1884
  manifestUrl: t,
1879
1885
  moduleName: n.name
1880
- }, `${i}`));
1886
+ }, `${i}`)));
1881
1887
  }
1882
- }, a = async () => {
1883
- const l = await s(), i = generateSnapshotFromManifest(l, {
1888
+ return assert(a.metaData && a.exposes && a.shared, `${t} is not a federation manifest`), this.manifestCache.set(t, a), a;
1889
+ }, l = async () => {
1890
+ const a = await s(), i = generateSnapshotFromManifest(a, {
1884
1891
  version: t
1885
1892
  }), { remoteSnapshot: c } = await this.hooks.lifecycle.loadRemoteSnapshot.emit({
1886
1893
  options: this.HostInstance.options,
1887
1894
  moduleInfo: n,
1888
- manifestJson: l,
1895
+ manifestJson: a,
1889
1896
  remoteSnapshot: i,
1890
1897
  manifestUrl: t,
1891
1898
  from: "manifest"
1892
1899
  });
1893
1900
  return c;
1894
1901
  };
1895
- return this.manifestLoading[t] || (this.manifestLoading[t] = a().then((l) => l)), this.manifestLoading[t];
1902
+ return this.manifestLoading[t] || (this.manifestLoading[t] = l().then((a) => a)), this.manifestLoading[t];
1896
1903
  }
1897
1904
  constructor(t) {
1898
1905
  this.loadingHostSnapshot = null, this.manifestCache = /* @__PURE__ */ new Map(), this.hooks = new PluginSystem({
@@ -1907,10 +1914,10 @@ class SharedHandler {
1907
1914
  // register shared in shareScopeMap
1908
1915
  registerShared(t, n) {
1909
1916
  const { shareInfos: o, shared: s } = formatShareConfigs(t, n);
1910
- return Object.keys(o).forEach((l) => {
1911
- o[l].forEach((c) => {
1912
- !getRegisteredShare(this.shareScopeMap, l, c, this.hooks.lifecycle.resolveShare) && c && c.lib && this.setShared({
1913
- pkgName: l,
1917
+ return Object.keys(o).forEach((a) => {
1918
+ o[a].forEach((c) => {
1919
+ !getRegisteredShare(this.shareScopeMap, a, c, this.hooks.lifecycle.resolveShare) && c && c.lib && this.setShared({
1920
+ pkgName: a,
1914
1921
  lib: c.lib,
1915
1922
  get: c.get,
1916
1923
  loaded: !0,
@@ -1934,14 +1941,14 @@ class SharedHandler {
1934
1941
  strategy: s.strategy
1935
1942
  }));
1936
1943
  }));
1937
- const a = await this.hooks.lifecycle.beforeLoadShare.emit({
1944
+ const l = await this.hooks.lifecycle.beforeLoadShare.emit({
1938
1945
  pkgName: t,
1939
1946
  shareInfo: s,
1940
1947
  shared: o.options.shared,
1941
1948
  origin: o
1942
- }), { shareInfo: l } = a;
1943
- assert(l, `Cannot find ${t} Share in the ${o.options.name}. Please ensure that the ${t} Share parameters have been injected`);
1944
- const i = getRegisteredShare(this.shareScopeMap, t, l, this.hooks.lifecycle.resolveShare), c = (u) => {
1949
+ }), { shareInfo: a } = l;
1950
+ assert(a, `Cannot find ${t} Share in the ${o.options.name}. Please ensure that the ${t} Share parameters have been injected`);
1951
+ const i = getRegisteredShare(this.shareScopeMap, t, a, this.hooks.lifecycle.resolveShare), c = (u) => {
1945
1952
  u.useIn || (u.useIn = []), addUniqueItem(u.useIn, o.options.name);
1946
1953
  };
1947
1954
  if (i && i.lib)
@@ -1950,11 +1957,11 @@ class SharedHandler {
1950
1957
  const u = await i.loading;
1951
1958
  return i.loaded = !0, i.lib || (i.lib = u), c(i), u;
1952
1959
  } else if (i) {
1953
- const p = (async () => {
1954
- const d = await i.get();
1955
- l.lib = d, l.loaded = !0, c(l);
1956
- const m = getRegisteredShare(this.shareScopeMap, t, l, this.hooks.lifecycle.resolveShare);
1957
- return m && (m.lib = d, m.loaded = !0), d;
1960
+ const d = (async () => {
1961
+ const p = await i.get();
1962
+ a.lib = p, a.loaded = !0, c(a);
1963
+ const m = getRegisteredShare(this.shareScopeMap, t, a, this.hooks.lifecycle.resolveShare);
1964
+ return m && (m.lib = p, m.loaded = !0), p;
1958
1965
  })();
1959
1966
  return this.setShared({
1960
1967
  pkgName: t,
@@ -1962,25 +1969,25 @@ class SharedHandler {
1962
1969
  shared: i,
1963
1970
  from: o.options.name,
1964
1971
  lib: null,
1965
- loading: p
1966
- }), p;
1972
+ loading: d
1973
+ }), d;
1967
1974
  } else {
1968
1975
  if (n != null && n.customShareInfo)
1969
1976
  return !1;
1970
- const p = (async () => {
1971
- const d = await l.get();
1972
- l.lib = d, l.loaded = !0, c(l);
1973
- const m = getRegisteredShare(this.shareScopeMap, t, l, this.hooks.lifecycle.resolveShare);
1974
- return m && (m.lib = d, m.loaded = !0), d;
1977
+ const d = (async () => {
1978
+ const p = await a.get();
1979
+ a.lib = p, a.loaded = !0, c(a);
1980
+ const m = getRegisteredShare(this.shareScopeMap, t, a, this.hooks.lifecycle.resolveShare);
1981
+ return m && (m.lib = p, m.loaded = !0), p;
1975
1982
  })();
1976
1983
  return this.setShared({
1977
1984
  pkgName: t,
1978
1985
  loaded: !1,
1979
- shared: l,
1986
+ shared: a,
1980
1987
  from: o.options.name,
1981
1988
  lib: null,
1982
- loading: p
1983
- }), p;
1989
+ loading: d
1990
+ }), d;
1984
1991
  }
1985
1992
  }
1986
1993
  /**
@@ -1990,28 +1997,28 @@ class SharedHandler {
1990
1997
  */
1991
1998
  // eslint-disable-next-line @typescript-eslint/member-ordering
1992
1999
  initializeSharing(t = DEFAULT_SCOPE, n) {
1993
- const { host: o } = this, s = n == null ? void 0 : n.from, a = n == null ? void 0 : n.strategy;
1994
- let l = n == null ? void 0 : n.initScope;
2000
+ const { host: o } = this, s = n == null ? void 0 : n.from, l = n == null ? void 0 : n.strategy;
2001
+ let a = n == null ? void 0 : n.initScope;
1995
2002
  const i = [];
1996
2003
  if (s !== "build") {
1997
2004
  const { initTokens: _ } = this;
1998
- l || (l = []);
2005
+ a || (a = []);
1999
2006
  let E = _[t];
2000
2007
  if (E || (E = _[t] = {
2001
2008
  from: this.host.name
2002
- }), l.indexOf(E) >= 0)
2009
+ }), a.indexOf(E) >= 0)
2003
2010
  return i;
2004
- l.push(E);
2011
+ a.push(E);
2005
2012
  }
2006
2013
  const c = this.shareScopeMap, u = o.options.name;
2007
2014
  c[t] || (c[t] = {});
2008
- const p = c[t], d = (_, E) => {
2015
+ const d = c[t], p = (_, E) => {
2009
2016
  var g;
2010
2017
  const { version: b, eager: S } = E;
2011
- p[_] = p[_] || {};
2012
- const v = p[_], I = v[b], R = !!(I && (I.eager || (g = I.shareConfig) != null && g.eager));
2018
+ d[_] = d[_] || {};
2019
+ const v = d[_], I = v[b], R = !!(I && (I.eager || (g = I.shareConfig) != null && g.eager));
2013
2020
  (!I || I.strategy !== "loaded-first" && !I.loaded && (!S != !R ? S : u > I.from)) && (v[b] = E);
2014
- }, m = (_) => _ && _.init && _.init(c[t], l), y = async (_) => {
2021
+ }, m = (_) => _ && _.init && _.init(c[t], a), y = async (_) => {
2015
2022
  const { module: E } = await o.remoteHandler.getRemoteModuleAndOptions({
2016
2023
  id: _
2017
2024
  });
@@ -2033,9 +2040,9 @@ class SharedHandler {
2033
2040
  };
2034
2041
  return Object.keys(o.options.shared).forEach((_) => {
2035
2042
  o.options.shared[_].forEach((g) => {
2036
- g.scope.includes(t) && d(_, g);
2043
+ g.scope.includes(t) && p(_, g);
2037
2044
  });
2038
- }), (o.options.shareStrategy === "version-first" || a === "version-first") && o.options.remotes.forEach((_) => {
2045
+ }), (o.options.shareStrategy === "version-first" || l === "version-first") && o.options.remotes.forEach((_) => {
2039
2046
  _.shareScope === t && i.push(y(_.name));
2040
2047
  }), i;
2041
2048
  }
@@ -2054,21 +2061,21 @@ class SharedHandler {
2054
2061
  strategy: s.strategy
2055
2062
  });
2056
2063
  });
2057
- const a = getRegisteredShare(this.shareScopeMap, t, s, this.hooks.lifecycle.resolveShare), l = (i) => {
2064
+ const l = getRegisteredShare(this.shareScopeMap, t, s, this.hooks.lifecycle.resolveShare), a = (i) => {
2058
2065
  i.useIn || (i.useIn = []), addUniqueItem(i.useIn, o.options.name);
2059
2066
  };
2060
- if (a) {
2061
- if (typeof a.lib == "function")
2062
- return l(a), a.loaded || (a.loaded = !0, a.from === o.options.name && (s.loaded = !0)), a.lib;
2063
- if (typeof a.get == "function") {
2064
- const i = a.get();
2067
+ if (l) {
2068
+ if (typeof l.lib == "function")
2069
+ return a(l), l.loaded || (l.loaded = !0, l.from === o.options.name && (s.loaded = !0)), l.lib;
2070
+ if (typeof l.get == "function") {
2071
+ const i = l.get();
2065
2072
  if (!(i instanceof Promise))
2066
- return l(a), this.setShared({
2073
+ return a(l), this.setShared({
2067
2074
  pkgName: t,
2068
2075
  loaded: !0,
2069
2076
  from: o.options.name,
2070
2077
  lib: i,
2071
- shared: a
2078
+ shared: l
2072
2079
  }), i;
2073
2080
  }
2074
2081
  }
@@ -2106,8 +2113,8 @@ class SharedHandler {
2106
2113
  hostShareScopeMap: o.hostShareScopeMap
2107
2114
  });
2108
2115
  }
2109
- setShared({ pkgName: t, shared: n, from: o, lib: s, loading: a, loaded: l, get: i }) {
2110
- const { version: c, scope: u = "default" } = n, p = _object_without_properties_loose(n, [
2116
+ setShared({ pkgName: t, shared: n, from: o, lib: s, loading: l, loaded: a, get: i }) {
2117
+ const { version: c, scope: u = "default" } = n, d = _object_without_properties_loose(n, [
2111
2118
  "version",
2112
2119
  "scope"
2113
2120
  ]);
@@ -2120,15 +2127,15 @@ class SharedHandler {
2120
2127
  scope: [
2121
2128
  "default"
2122
2129
  ]
2123
- }, p, {
2130
+ }, d, {
2124
2131
  lib: s,
2125
- loaded: l,
2126
- loading: a
2132
+ loaded: a,
2133
+ loading: l
2127
2134
  }), i && (this.shareScopeMap[m][t][c].get = i);
2128
2135
  return;
2129
2136
  }
2130
2137
  const y = this.shareScopeMap[m][t][c];
2131
- a && !y.loading && (y.loading = a);
2138
+ l && !y.loading && (y.loading = l);
2132
2139
  });
2133
2140
  }
2134
2141
  _setGlobalShareScopeMap(t) {
@@ -2149,25 +2156,25 @@ class SharedHandler {
2149
2156
  }
2150
2157
  class RemoteHandler {
2151
2158
  formatAndRegisterRemote(t, n) {
2152
- return (n.remotes || []).reduce((s, a) => (this.registerRemote(a, s, {
2159
+ return (n.remotes || []).reduce((s, l) => (this.registerRemote(l, s, {
2153
2160
  force: !1
2154
2161
  }), s), t.remotes);
2155
2162
  }
2156
2163
  setIdToRemoteMap(t, n) {
2157
- const { remote: o, expose: s } = n, { name: a, alias: l } = o;
2164
+ const { remote: o, expose: s } = n, { name: l, alias: a } = o;
2158
2165
  if (this.idToRemoteMap[t] = {
2159
2166
  name: o.name,
2160
2167
  expose: s
2161
- }, l && t.startsWith(a)) {
2162
- const i = t.replace(a, l);
2168
+ }, a && t.startsWith(l)) {
2169
+ const i = t.replace(l, a);
2163
2170
  this.idToRemoteMap[i] = {
2164
2171
  name: o.name,
2165
2172
  expose: s
2166
2173
  };
2167
2174
  return;
2168
2175
  }
2169
- if (l && t.startsWith(l)) {
2170
- const i = t.replace(l, a);
2176
+ if (a && t.startsWith(a)) {
2177
+ const i = t.replace(a, l);
2171
2178
  this.idToRemoteMap[i] = {
2172
2179
  name: o.name,
2173
2180
  expose: s
@@ -2181,33 +2188,33 @@ class RemoteHandler {
2181
2188
  try {
2182
2189
  const { loadFactory: s = !0 } = n || {
2183
2190
  loadFactory: !0
2184
- }, { module: a, moduleOptions: l, remoteMatchInfo: i } = await this.getRemoteModuleAndOptions({
2191
+ }, { module: l, moduleOptions: a, remoteMatchInfo: i } = await this.getRemoteModuleAndOptions({
2185
2192
  id: t
2186
- }), { pkgNameOrAlias: c, remote: u, expose: p, id: d, remoteSnapshot: m } = i, y = await a.get(d, p, n, m), _ = await this.hooks.lifecycle.onLoad.emit({
2187
- id: d,
2193
+ }), { pkgNameOrAlias: c, remote: u, expose: d, id: p, remoteSnapshot: m } = i, y = await l.get(p, d, n, m), _ = await this.hooks.lifecycle.onLoad.emit({
2194
+ id: p,
2188
2195
  pkgNameOrAlias: c,
2189
- expose: p,
2196
+ expose: d,
2190
2197
  exposeModule: s ? y : void 0,
2191
2198
  exposeModuleFactory: s ? void 0 : y,
2192
2199
  remote: u,
2193
- options: l,
2194
- moduleInstance: a,
2200
+ options: a,
2201
+ moduleInstance: l,
2195
2202
  origin: o
2196
2203
  });
2197
2204
  return this.setIdToRemoteMap(t, i), typeof _ == "function" ? _ : y;
2198
2205
  } catch (s) {
2199
- const { from: a = "runtime" } = n || {
2206
+ const { from: l = "runtime" } = n || {
2200
2207
  from: "runtime"
2201
- }, l = await this.hooks.lifecycle.errorLoadRemote.emit({
2208
+ }, a = await this.hooks.lifecycle.errorLoadRemote.emit({
2202
2209
  id: t,
2203
2210
  error: s,
2204
- from: a,
2211
+ from: l,
2205
2212
  lifecycle: "onLoad",
2206
2213
  origin: o
2207
2214
  });
2208
- if (!l)
2215
+ if (!a)
2209
2216
  throw s;
2210
- return l;
2217
+ return a;
2211
2218
  }
2212
2219
  }
2213
2220
  // eslint-disable-next-line @typescript-eslint/member-ordering
@@ -2220,15 +2227,15 @@ class RemoteHandler {
2220
2227
  });
2221
2228
  const o = formatPreloadArgs(n.options.remotes, t);
2222
2229
  await Promise.all(o.map(async (s) => {
2223
- const { remote: a } = s, l = getRemoteInfo(a), { globalSnapshot: i, remoteSnapshot: c } = await n.snapshotHandler.loadRemoteSnapshotInfo(a), u = await this.hooks.lifecycle.generatePreloadAssets.emit({
2230
+ const { remote: l } = s, a = getRemoteInfo(l), { globalSnapshot: i, remoteSnapshot: c } = await n.snapshotHandler.loadRemoteSnapshotInfo(l), u = await this.hooks.lifecycle.generatePreloadAssets.emit({
2224
2231
  origin: n,
2225
2232
  preloadOptions: s,
2226
- remote: a,
2227
- remoteInfo: l,
2233
+ remote: l,
2234
+ remoteInfo: a,
2228
2235
  globalSnapshot: i,
2229
2236
  remoteSnapshot: c
2230
2237
  });
2231
- u && preloadAssets(l, n, u);
2238
+ u && preloadAssets(a, n, u);
2232
2239
  }));
2233
2240
  }
2234
2241
  registerRemotes(t, n) {
@@ -2259,32 +2266,32 @@ class RemoteHandler {
2259
2266
  }), !s)
2260
2267
  throw _;
2261
2268
  }
2262
- const { id: a } = s, l = matchRemoteWithNameAndExpose(n.options.remotes, a);
2263
- assert(l, getShortErrorMsg(RUNTIME_004, runtimeDescMap, {
2269
+ const { id: l } = s, a = matchRemoteWithNameAndExpose(n.options.remotes, l);
2270
+ assert(a, getShortErrorMsg(RUNTIME_004, runtimeDescMap, {
2264
2271
  hostName: n.options.name,
2265
- requestId: a
2272
+ requestId: l
2266
2273
  }));
2267
- const { remote: i } = l, c = getRemoteInfo(i), u = await n.sharedHandler.hooks.lifecycle.afterResolve.emit(_extends$1({
2268
- id: a
2269
- }, l, {
2274
+ const { remote: i } = a, c = getRemoteInfo(i), u = await n.sharedHandler.hooks.lifecycle.afterResolve.emit(_extends$1({
2275
+ id: l
2276
+ }, a, {
2270
2277
  options: n.options,
2271
2278
  origin: n,
2272
2279
  remoteInfo: c
2273
- })), { remote: p, expose: d } = u;
2274
- assert(p && d, `The 'beforeRequest' hook was executed, but it failed to return the correct 'remote' and 'expose' values while loading ${a}.`);
2275
- let m = n.moduleCache.get(p.name);
2280
+ })), { remote: d, expose: p } = u;
2281
+ assert(d && p, `The 'beforeRequest' hook was executed, but it failed to return the correct 'remote' and 'expose' values while loading ${l}.`);
2282
+ let m = n.moduleCache.get(d.name);
2276
2283
  const y = {
2277
2284
  host: n,
2278
2285
  remoteInfo: c
2279
2286
  };
2280
- return m || (m = new Module(y), n.moduleCache.set(p.name, m)), {
2287
+ return m || (m = new Module(y), n.moduleCache.set(d.name, m)), {
2281
2288
  module: m,
2282
2289
  moduleOptions: y,
2283
2290
  remoteMatchInfo: u
2284
2291
  };
2285
2292
  }
2286
2293
  registerRemote(t, n, o) {
2287
- const { host: s } = this, a = () => {
2294
+ const { host: s } = this, l = () => {
2288
2295
  if (t.alias) {
2289
2296
  const i = n.find((c) => {
2290
2297
  var u;
@@ -2298,9 +2305,9 @@ class RemoteHandler {
2298
2305
  remote: t,
2299
2306
  origin: s
2300
2307
  });
2301
- const l = n.find((i) => i.name === t.name);
2302
- if (!l)
2303
- a(), n.push(t), this.hooks.lifecycle.registerRemote.emit({
2308
+ const a = n.find((i) => i.name === t.name);
2309
+ if (!a)
2310
+ l(), n.push(t), this.hooks.lifecycle.registerRemote.emit({
2304
2311
  remote: t,
2305
2312
  origin: s
2306
2313
  });
@@ -2309,7 +2316,7 @@ class RemoteHandler {
2309
2316
  `The remote "${t.name}" is already registered.`,
2310
2317
  "Please note that overriding it may cause unexpected errors."
2311
2318
  ];
2312
- o != null && o.force && (this.removeRemote(l), a(), n.push(t), this.hooks.lifecycle.registerRemote.emit({
2319
+ o != null && o.force && (this.removeRemote(a), l(), n.push(t), this.hooks.lifecycle.registerRemote.emit({
2313
2320
  remote: t,
2314
2321
  origin: s
2315
2322
  }), warn$1(i.join(" ")));
@@ -2317,22 +2324,22 @@ class RemoteHandler {
2317
2324
  }
2318
2325
  removeRemote(t) {
2319
2326
  try {
2320
- const { host: o } = this, { name: s } = t, a = o.options.remotes.findIndex((i) => i.name === s);
2321
- a !== -1 && o.options.remotes.splice(a, 1);
2322
- const l = o.moduleCache.get(t.name);
2323
- if (l) {
2324
- const i = l.remoteInfo, c = i.entryGlobalName;
2327
+ const { host: o } = this, { name: s } = t, l = o.options.remotes.findIndex((i) => i.name === s);
2328
+ l !== -1 && o.options.remotes.splice(l, 1);
2329
+ const a = o.moduleCache.get(t.name);
2330
+ if (a) {
2331
+ const i = a.remoteInfo, c = i.entryGlobalName;
2325
2332
  if (CurrentGlobal[c]) {
2326
2333
  var n;
2327
2334
  (n = Object.getOwnPropertyDescriptor(CurrentGlobal, c)) != null && n.configurable ? delete CurrentGlobal[c] : CurrentGlobal[c] = void 0;
2328
2335
  }
2329
- const u = getRemoteEntryUniqueKey(l.remoteInfo);
2336
+ const u = getRemoteEntryUniqueKey(a.remoteInfo);
2330
2337
  globalLoading[u] && delete globalLoading[u], o.snapshotHandler.manifestCache.delete(i.entry);
2331
- let p = i.buildVersion ? composeKeyWithSeparator(i.name, i.buildVersion) : i.name;
2332
- const d = CurrentGlobal.__FEDERATION__.__INSTANCES__.findIndex((y) => i.buildVersion ? y.options.id === p : y.name === p);
2333
- if (d !== -1) {
2334
- const y = CurrentGlobal.__FEDERATION__.__INSTANCES__[d];
2335
- p = y.options.id || p;
2338
+ let d = i.buildVersion ? composeKeyWithSeparator(i.name, i.buildVersion) : i.name;
2339
+ const p = CurrentGlobal.__FEDERATION__.__INSTANCES__.findIndex((y) => i.buildVersion ? y.options.id === d : y.name === d);
2340
+ if (p !== -1) {
2341
+ const y = CurrentGlobal.__FEDERATION__.__INSTANCES__[p];
2342
+ d = y.options.id || d;
2336
2343
  const _ = getGlobalShareScope();
2337
2344
  let E = !0;
2338
2345
  const g = [];
@@ -2358,10 +2365,10 @@ class RemoteHandler {
2358
2365
  });
2359
2366
  });
2360
2367
  });
2361
- }), E && (y.shareScopeMap = {}, delete _[p]), g.forEach(([b, S, v, I]) => {
2368
+ }), E && (y.shareScopeMap = {}, delete _[d]), g.forEach(([b, S, v, I]) => {
2362
2369
  var R, $, w;
2363
2370
  (w = _[b]) == null || ($ = w[S]) == null || (R = $[v]) == null || delete R[I];
2364
- }), CurrentGlobal.__FEDERATION__.__INSTANCES__.splice(d, 1);
2371
+ }), CurrentGlobal.__FEDERATION__.__INSTANCES__.splice(p, 1);
2365
2372
  }
2366
2373
  const { hostGlobalSnapshot: m } = getGlobalRemoteInfo(t, o);
2367
2374
  if (m) {
@@ -2413,11 +2420,11 @@ class FederationHost {
2413
2420
  const s = getRemoteInfo({
2414
2421
  name: t,
2415
2422
  entry: n
2416
- }), a = new Module({
2423
+ }), l = new Module({
2417
2424
  host: this,
2418
2425
  remoteInfo: s
2419
2426
  });
2420
- return a.remoteEntryExports = o, this.moduleCache.set(t, a), a;
2427
+ return l.remoteEntryExports = o, this.moduleCache.set(t, l), l;
2421
2428
  }
2422
2429
  // eslint-disable-next-line max-lines-per-function
2423
2430
  // eslint-disable-next-line @typescript-eslint/member-ordering
@@ -2432,20 +2439,20 @@ class FederationHost {
2432
2439
  this.sharedHandler.initShareScopeMap(t, n, o);
2433
2440
  }
2434
2441
  formatOptions(t, n) {
2435
- const { shared: o } = formatShareConfigs(t, n), { userOptions: s, options: a } = this.hooks.lifecycle.beforeInit.emit({
2442
+ const { shared: o } = formatShareConfigs(t, n), { userOptions: s, options: l } = this.hooks.lifecycle.beforeInit.emit({
2436
2443
  origin: this,
2437
2444
  userOptions: n,
2438
2445
  options: t,
2439
2446
  shareInfo: o
2440
- }), l = this.remoteHandler.formatAndRegisterRemote(a, s), { shared: i } = this.sharedHandler.registerShared(a, s), c = [
2441
- ...a.plugins
2447
+ }), a = this.remoteHandler.formatAndRegisterRemote(l, s), { shared: i } = this.sharedHandler.registerShared(l, s), c = [
2448
+ ...l.plugins
2442
2449
  ];
2443
- s.plugins && s.plugins.forEach((p) => {
2444
- c.includes(p) || c.push(p);
2450
+ s.plugins && s.plugins.forEach((d) => {
2451
+ c.includes(d) || c.push(d);
2445
2452
  });
2446
2453
  const u = _extends$1({}, t, n, {
2447
2454
  plugins: c,
2448
- remotes: l,
2455
+ remotes: a,
2449
2456
  shared: i
2450
2457
  });
2451
2458
  return this.hooks.lifecycle.init.emit({
@@ -2462,7 +2469,7 @@ class FederationHost {
2462
2469
  this.loaderHook,
2463
2470
  this.bridgeHook
2464
2471
  ]);
2465
- this.options.plugins = this.options.plugins.reduce((o, s) => (s && o && !o.find((a) => a.name === s.name) && o.push(s), o), n || []);
2472
+ this.options.plugins = this.options.plugins.reduce((o, s) => (s && o && !o.find((l) => l.name === s.name) && o.push(s), o), n || []);
2466
2473
  }
2467
2474
  registerRemotes(t, n) {
2468
2475
  return this.remoteHandler.registerRemotes(t, n);
@@ -2475,7 +2482,7 @@ class FederationHost {
2475
2482
  beforeInitContainer: new AsyncWaterfallHook("beforeInitContainer"),
2476
2483
  // maybe will change, temporarily for internal use only
2477
2484
  initContainer: new AsyncWaterfallHook("initContainer")
2478
- }), this.version = "0.6.16", this.moduleCache = /* @__PURE__ */ new Map(), this.loaderHook = new PluginSystem({
2485
+ }), this.version = "0.6.18", this.moduleCache = /* @__PURE__ */ new Map(), this.loaderHook = new PluginSystem({
2479
2486
  // FIXME: may not be suitable , not open to the public yet
2480
2487
  getModuleInfo: new SyncHook(),
2481
2488
  createScript: new SyncHook(),
@@ -2514,30 +2521,31 @@ setGlobalFederationConstructor(FederationHost);
2514
2521
  function createBridgeComponent(r) {
2515
2522
  const t = /* @__PURE__ */ new Map(), n = getInstance();
2516
2523
  return () => ({
2517
- __APP_VERSION__: "0.8.8",
2524
+ __APP_VERSION__: "0.8.10",
2518
2525
  async render(o) {
2519
- var c, u, p;
2526
+ var y, _, E;
2520
2527
  LoggerInstance.debug("createBridgeComponent render Info", o);
2521
- const s = Vue.createApp(r.rootComponent);
2522
- t.set(o.dom, s);
2523
- const a = await ((p = (u = (c = n == null ? void 0 : n.bridgeHook) == null ? void 0 : c.lifecycle) == null ? void 0 : u.beforeBridgeRender) == null ? void 0 : p.emit(o)), l = a && typeof a == "object" && (a != null && a.extraProps) ? a == null ? void 0 : a.extraProps : {}, i = r.appOptions({
2524
- app: s,
2525
- basename: o.basename,
2526
- memoryRoute: o.memoryRoute,
2527
- ...l
2528
+ const { moduleName: s, dom: l, basename: a, memoryRoute: i, ...c } = o, u = Vue.createApp(r.rootComponent, c);
2529
+ t.set(o.dom, u);
2530
+ const d = await ((E = (_ = (y = n == null ? void 0 : n.bridgeHook) == null ? void 0 : y.lifecycle) == null ? void 0 : _.beforeBridgeRender) == null ? void 0 : E.emit(o)), p = d && typeof d == "object" && (d != null && d.extraProps) ? d == null ? void 0 : d.extraProps : {}, m = r.appOptions({
2531
+ app: u,
2532
+ basename: a,
2533
+ memoryRoute: i,
2534
+ ...c,
2535
+ ...p
2528
2536
  });
2529
- if (i != null && i.router) {
2530
- const d = o.memoryRoute ? VueRouter.createMemoryHistory(o.basename) : VueRouter.createWebHistory(o.basename), m = VueRouter.createRouter({
2531
- ...i.router.options,
2532
- history: d,
2533
- routes: i.router.getRoutes()
2537
+ if (m != null && m.router) {
2538
+ const g = o.memoryRoute ? VueRouter.createMemoryHistory(o.basename) : VueRouter.createWebHistory(o.basename), b = VueRouter.createRouter({
2539
+ ...m.router.options,
2540
+ history: g,
2541
+ routes: m.router.getRoutes()
2534
2542
  });
2535
2543
  LoggerInstance.log("createBridgeComponent render router info>>>", {
2536
2544
  name: o.moduleName,
2537
- router: m
2538
- }), o.memoryRoute && await m.push(o.memoryRoute.entryPath), s.use(m);
2545
+ router: b
2546
+ }), o.memoryRoute && await b.push(o.memoryRoute.entryPath), u.use(b);
2539
2547
  }
2540
- s.mount(o.dom);
2548
+ u.mount(o.dom);
2541
2549
  },
2542
2550
  destroy(o) {
2543
2551
  LoggerInstance.debug("createBridgeComponent destroy Info", o);
@@ -2559,9 +2567,9 @@ const RemoteApp = /* @__PURE__ */ defineComponent({
2559
2567
  providerInfo: Function
2560
2568
  },
2561
2569
  setup(r) {
2562
- const t = ref(null), n = ref(null), o = ref(""), s = useRoute(), a = () => {
2563
- var p;
2564
- const i = (p = r.providerInfo) == null ? void 0 : p.call(r);
2570
+ const t = ref(null), n = ref(null), o = ref(""), s = useRoute(), l = () => {
2571
+ var d;
2572
+ const i = (d = r.providerInfo) == null ? void 0 : d.call(r);
2565
2573
  n.value = i;
2566
2574
  let c = {
2567
2575
  name: r.moduleName,
@@ -2573,19 +2581,19 @@ const RemoteApp = /* @__PURE__ */ defineComponent({
2573
2581
  ...c,
2574
2582
  ...{}.extraProps
2575
2583
  }, i.render(c);
2576
- }, l = watch(() => s.path, (i) => {
2577
- i !== s.path && a(), o.value !== "" && o.value !== i && (LoggerInstance.debug("createRemoteComponent dispatchPopstateEnv >>>", {
2584
+ }, a = watch(() => s.path, (i) => {
2585
+ i !== s.path && l(), o.value !== "" && o.value !== i && (LoggerInstance.debug("createRemoteComponent dispatchPopstateEnv >>>", {
2578
2586
  ...r,
2579
2587
  pathname: s.path
2580
2588
  }), e()), o.value = i;
2581
2589
  });
2582
2590
  return onMounted(() => {
2583
- a();
2591
+ l();
2584
2592
  }), onBeforeUnmount(() => {
2585
2593
  var i;
2586
2594
  LoggerInstance.debug("createRemoteComponent LazyComponent destroy >>>", {
2587
2595
  ...r
2588
- }), l(), (i = n.value) == null || i.destroy({
2596
+ }), a(), (i = n.value) == null || i.destroy({
2589
2597
  dom: t.value
2590
2598
  });
2591
2599
  }), () => createVNode("div", {
@@ -2595,7 +2603,7 @@ const RemoteApp = /* @__PURE__ */ defineComponent({
2595
2603
  });
2596
2604
  function createRemoteComponent(r) {
2597
2605
  return defineAsyncComponent({
2598
- __APP_VERSION__: "0.8.8",
2606
+ __APP_VERSION__: "0.8.10",
2599
2607
  ...r.asyncComponentOptions,
2600
2608
  //@ts-ignore
2601
2609
  loader: async () => {
@@ -2609,15 +2617,15 @@ function createRemoteComponent(r) {
2609
2617
  basename: n,
2610
2618
  info: r
2611
2619
  });
2612
- const a = await r.loader(), l = a && a[Symbol.for("mf_module_id")], i = a[s];
2620
+ const l = await r.loader(), a = l && l[Symbol.for("mf_module_id")], i = l[s];
2613
2621
  if (LoggerInstance.debug(
2614
2622
  "createRemoteComponent LazyComponent loadRemote info >>>",
2615
- { name: l, module: a, exportName: s, basename: n, route: t }
2616
- ), s in a && typeof i == "function")
2623
+ { name: a, module: l, exportName: s, basename: n, route: t }
2624
+ ), s in l && typeof i == "function")
2617
2625
  return {
2618
2626
  render() {
2619
2627
  return h(RemoteApp, {
2620
- moduleName: l,
2628
+ moduleName: a,
2621
2629
  providerInfo: i,
2622
2630
  basename: n
2623
2631
  });