@module-federation/runtime 0.6.7 → 0.6.8

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.
@@ -1,7 +1,5 @@
1
1
  'use strict';
2
2
 
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
3
  function getRuntime() {
6
4
  // @ts-ignore
7
5
  const runtime = __webpack_require__.federation.runtime;
@@ -0,0 +1 @@
1
+ export * from "./src/embedded";
@@ -0,0 +1,2 @@
1
+ export * from "./src/helpers";
2
+ export { default } from "./src/helpers";
@@ -1,4 +1,4 @@
1
- import { o as getRegisteredShare, y as getGlobalShareScope, G as Global, I as nativeGlobal, J as resetFederationGlobalInfo, C as getGlobalFederationInstance, F as setGlobalFederationInstance, E as getGlobalFederationConstructor, B as setGlobalFederationConstructor, m as getInfoWithoutType, u as getGlobalSnapshot, K as getTargetSnapshotInfoByModuleInfo, q as getGlobalSnapshotInfoByModuleInfo, t as setGlobalSnapshotInfoByModuleInfo, r as addGlobalSnapshot, c as getRemoteEntryExports, H as registerGlobalPlugins, g as getGlobalHostPlugins, n as getPreloaded, s as setPreloaded } from './share.esm.js';
1
+ import { g as getRegisteredShare, a as getGlobalShareScope, G as Global, n as nativeGlobal, r as resetFederationGlobalInfo, b as getGlobalFederationInstance, s as setGlobalFederationInstance, c as getGlobalFederationConstructor, d as setGlobalFederationConstructor, e as getInfoWithoutType, f as getGlobalSnapshot, h as getTargetSnapshotInfoByModuleInfo, i as getGlobalSnapshotInfoByModuleInfo, j as setGlobalSnapshotInfoByModuleInfo, k as addGlobalSnapshot, l as getRemoteEntryExports, m as registerGlobalPlugins, o as getGlobalHostPlugins, p as getPreloaded, q as setPreloaded } from './share.esm.js';
2
2
  import './polyfills.esm.js';
3
3
  import '@module-federation/sdk';
4
4
 
package/dist/index.cjs.js CHANGED
@@ -1,7 +1,5 @@
1
1
  'use strict';
2
2
 
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
3
  var polyfills = require('./polyfills.cjs.js');
6
4
  var sdk = require('@module-federation/sdk');
7
5
  var share = require('./share.cjs.js');
@@ -182,7 +180,7 @@ async function loadEntryDom({ remoteInfo, remoteEntryExports, createScriptHook }
182
180
  }
183
181
  }
184
182
  async function loadEntryNode({ remoteInfo, createScriptHook }) {
185
- const { entry, entryGlobalName: globalName, name } = remoteInfo;
183
+ const { entry, entryGlobalName: globalName, name, type } = remoteInfo;
186
184
  const { entryExports: remoteEntryExports } = share.getRemoteEntryExports(name, globalName);
187
185
  if (remoteEntryExports) {
188
186
  return remoteEntryExports;
@@ -190,7 +188,8 @@ async function loadEntryNode({ remoteInfo, createScriptHook }) {
190
188
  return sdk.loadScriptNode(entry, {
191
189
  attrs: {
192
190
  name,
193
- globalName
191
+ globalName,
192
+ type
194
193
  },
195
194
  createScriptHook: (url, attrs)=>{
196
195
  const res = createScriptHook.emit({
@@ -227,27 +226,24 @@ async function getRemoteEntry({ origin, remoteEntryExports, remoteInfo }) {
227
226
  }
228
227
  if (!share.globalLoading[uniqueKey]) {
229
228
  const loadEntryHook = origin.remoteHandler.hooks.lifecycle.loadEntry;
230
- if (loadEntryHook.listeners.size) {
231
- share.globalLoading[uniqueKey] = loadEntryHook.emit({
232
- createScriptHook: origin.loaderHook.lifecycle.createScript,
233
- remoteInfo,
234
- remoteEntryExports
235
- }).then((res)=>res || undefined);
236
- } else {
237
- const createScriptHook = origin.loaderHook.lifecycle.createScript;
238
- if (!sdk.isBrowserEnv()) {
239
- share.globalLoading[uniqueKey] = loadEntryNode({
240
- remoteInfo,
241
- createScriptHook
242
- });
243
- } else {
244
- share.globalLoading[uniqueKey] = loadEntryDom({
245
- remoteInfo,
246
- remoteEntryExports,
247
- createScriptHook
248
- });
229
+ const createScriptHook = origin.loaderHook.lifecycle.createScript;
230
+ share.globalLoading[uniqueKey] = loadEntryHook.emit({
231
+ createScriptHook,
232
+ remoteInfo,
233
+ remoteEntryExports
234
+ }).then((res)=>{
235
+ if (res) {
236
+ return res;
249
237
  }
250
- }
238
+ return sdk.isBrowserEnv() ? loadEntryDom({
239
+ remoteInfo,
240
+ remoteEntryExports,
241
+ createScriptHook
242
+ }) : loadEntryNode({
243
+ remoteInfo,
244
+ createScriptHook
245
+ });
246
+ });
251
247
  }
252
248
  return share.globalLoading[uniqueKey];
253
249
  }
@@ -959,7 +955,7 @@ const generatePreloadAssetsPlugin = function() {
959
955
  moduleInfo: {
960
956
  name: remoteInfo.name,
961
957
  entry: remote.entry,
962
- type: 'global',
958
+ type: remoteInfo.type || 'global',
963
959
  entryGlobalName: '',
964
960
  shareScope: ''
965
961
  }
@@ -1338,9 +1334,20 @@ class SharedHandler {
1338
1334
  id: key
1339
1335
  });
1340
1336
  if (module.getEntry) {
1341
- const entry = await module.getEntry();
1337
+ let remoteEntryExports;
1338
+ try {
1339
+ remoteEntryExports = await module.getEntry();
1340
+ } catch (error) {
1341
+ remoteEntryExports = await host.remoteHandler.hooks.lifecycle.errorLoadRemote.emit({
1342
+ id: key,
1343
+ error,
1344
+ from: 'runtime',
1345
+ lifecycle: 'beforeLoadShare',
1346
+ origin: host
1347
+ });
1348
+ }
1342
1349
  if (!module.inited) {
1343
- await initFn(entry);
1350
+ await initFn(remoteEntryExports);
1344
1351
  module.inited = true;
1345
1352
  }
1346
1353
  }
@@ -1980,7 +1987,7 @@ class FederationHost {
1980
1987
  // maybe will change, temporarily for internal use only
1981
1988
  initContainer: new AsyncWaterfallHook('initContainer')
1982
1989
  });
1983
- this.version = "0.6.7";
1990
+ this.version = "0.6.8";
1984
1991
  this.moduleCache = new Map();
1985
1992
  this.loaderHook = new PluginSystem({
1986
1993
  // FIXME: may not be suitable , not open to the public yet
@@ -2075,11 +2082,11 @@ function getInstance() {
2075
2082
  // Inject for debug
2076
2083
  share.setGlobalFederationConstructor(FederationHost);
2077
2084
 
2078
- Object.defineProperty(exports, 'loadScript', {
2085
+ Object.defineProperty(exports, "loadScript", {
2079
2086
  enumerable: true,
2080
2087
  get: function () { return sdk.loadScript; }
2081
2088
  });
2082
- Object.defineProperty(exports, 'loadScriptNode', {
2089
+ Object.defineProperty(exports, "loadScriptNode", {
2083
2090
  enumerable: true,
2084
2091
  get: function () { return sdk.loadScriptNode; }
2085
2092
  });
@@ -0,0 +1 @@
1
+ export * from "./src/index";
package/dist/index.esm.js CHANGED
@@ -1,8 +1,8 @@
1
- import { _ as _extends, a as _object_without_properties_loose } from './polyfills.esm.js';
1
+ import { a as _extends, _ as _object_without_properties_loose } from './polyfills.esm.js';
2
2
  import { isBrowserEnv, loadScriptNode, composeKeyWithSeparator, loadScript, safeToString, createLink, createScript, getResourceUrl, isManifestProvider, generateSnapshotFromManifest, warn as warn$1 } from '@module-federation/sdk';
3
3
  export { loadScript, loadScriptNode } from '@module-federation/sdk';
4
- import { g as getGlobalHostPlugins, a as globalLoading, D as DEFAULT_REMOTE_TYPE, b as DEFAULT_SCOPE, c as getRemoteEntryExports, d as assert, e as getFMId, i as isObject, f as error, w as warn, h as isPlainObject, j as isRemoteInfoWithEntry, k as isPureRemoteEntry, l as getRemoteEntryInfoFromSnapshot, m as getInfoWithoutType, n as getPreloaded, s as setPreloaded, o as getRegisteredShare, p as arrayOptions, q as getGlobalSnapshotInfoByModuleInfo, r as addGlobalSnapshot, t as setGlobalSnapshotInfoByModuleInfo, G as Global, u as getGlobalSnapshot, v as formatShareConfigs, x as getTargetSharedOptions, y as getGlobalShareScope, z as addUniqueItem, A as getBuilderId, B as setGlobalFederationConstructor, C as getGlobalFederationInstance, E as getGlobalFederationConstructor, F as setGlobalFederationInstance } from './share.esm.js';
5
- export { H as registerGlobalPlugins } from './share.esm.js';
4
+ import { o as getGlobalHostPlugins, t as globalLoading, D as DEFAULT_REMOTE_TYPE, u as DEFAULT_SCOPE, l as getRemoteEntryExports, v as assert, w as getFMId, x as isObject, y as error, z as warn, A as isPlainObject, B as isRemoteInfoWithEntry, C as isPureRemoteEntry, E as getRemoteEntryInfoFromSnapshot, e as getInfoWithoutType, p as getPreloaded, q as setPreloaded, g as getRegisteredShare, F as arrayOptions, i as getGlobalSnapshotInfoByModuleInfo, k as addGlobalSnapshot, j as setGlobalSnapshotInfoByModuleInfo, G as Global, f as getGlobalSnapshot, H as formatShareConfigs, I as getTargetSharedOptions, a as getGlobalShareScope, J as addUniqueItem, K as getBuilderId, d as setGlobalFederationConstructor, b as getGlobalFederationInstance, c as getGlobalFederationConstructor, s as setGlobalFederationInstance } from './share.esm.js';
5
+ export { m as registerGlobalPlugins } from './share.esm.js';
6
6
 
7
7
  // Function to match a remote with its name and expose
8
8
  // id: pkgName(@federation/app1) + expose(button) = @federation/app1/button
@@ -180,7 +180,7 @@ async function loadEntryDom({ remoteInfo, remoteEntryExports, createScriptHook }
180
180
  }
181
181
  }
182
182
  async function loadEntryNode({ remoteInfo, createScriptHook }) {
183
- const { entry, entryGlobalName: globalName, name } = remoteInfo;
183
+ const { entry, entryGlobalName: globalName, name, type } = remoteInfo;
184
184
  const { entryExports: remoteEntryExports } = getRemoteEntryExports(name, globalName);
185
185
  if (remoteEntryExports) {
186
186
  return remoteEntryExports;
@@ -188,7 +188,8 @@ async function loadEntryNode({ remoteInfo, createScriptHook }) {
188
188
  return loadScriptNode(entry, {
189
189
  attrs: {
190
190
  name,
191
- globalName
191
+ globalName,
192
+ type
192
193
  },
193
194
  createScriptHook: (url, attrs)=>{
194
195
  const res = createScriptHook.emit({
@@ -225,27 +226,24 @@ async function getRemoteEntry({ origin, remoteEntryExports, remoteInfo }) {
225
226
  }
226
227
  if (!globalLoading[uniqueKey]) {
227
228
  const loadEntryHook = origin.remoteHandler.hooks.lifecycle.loadEntry;
228
- if (loadEntryHook.listeners.size) {
229
- globalLoading[uniqueKey] = loadEntryHook.emit({
230
- createScriptHook: origin.loaderHook.lifecycle.createScript,
231
- remoteInfo,
232
- remoteEntryExports
233
- }).then((res)=>res || undefined);
234
- } else {
235
- const createScriptHook = origin.loaderHook.lifecycle.createScript;
236
- if (!isBrowserEnv()) {
237
- globalLoading[uniqueKey] = loadEntryNode({
238
- remoteInfo,
239
- createScriptHook
240
- });
241
- } else {
242
- globalLoading[uniqueKey] = loadEntryDom({
243
- remoteInfo,
244
- remoteEntryExports,
245
- createScriptHook
246
- });
229
+ const createScriptHook = origin.loaderHook.lifecycle.createScript;
230
+ globalLoading[uniqueKey] = loadEntryHook.emit({
231
+ createScriptHook,
232
+ remoteInfo,
233
+ remoteEntryExports
234
+ }).then((res)=>{
235
+ if (res) {
236
+ return res;
247
237
  }
248
- }
238
+ return isBrowserEnv() ? loadEntryDom({
239
+ remoteInfo,
240
+ remoteEntryExports,
241
+ createScriptHook
242
+ }) : loadEntryNode({
243
+ remoteInfo,
244
+ createScriptHook
245
+ });
246
+ });
249
247
  }
250
248
  return globalLoading[uniqueKey];
251
249
  }
@@ -957,7 +955,7 @@ const generatePreloadAssetsPlugin = function() {
957
955
  moduleInfo: {
958
956
  name: remoteInfo.name,
959
957
  entry: remote.entry,
960
- type: 'global',
958
+ type: remoteInfo.type || 'global',
961
959
  entryGlobalName: '',
962
960
  shareScope: ''
963
961
  }
@@ -1336,9 +1334,20 @@ class SharedHandler {
1336
1334
  id: key
1337
1335
  });
1338
1336
  if (module.getEntry) {
1339
- const entry = await module.getEntry();
1337
+ let remoteEntryExports;
1338
+ try {
1339
+ remoteEntryExports = await module.getEntry();
1340
+ } catch (error) {
1341
+ remoteEntryExports = await host.remoteHandler.hooks.lifecycle.errorLoadRemote.emit({
1342
+ id: key,
1343
+ error,
1344
+ from: 'runtime',
1345
+ lifecycle: 'beforeLoadShare',
1346
+ origin: host
1347
+ });
1348
+ }
1340
1349
  if (!module.inited) {
1341
- await initFn(entry);
1350
+ await initFn(remoteEntryExports);
1342
1351
  module.inited = true;
1343
1352
  }
1344
1353
  }
@@ -1978,7 +1987,7 @@ class FederationHost {
1978
1987
  // maybe will change, temporarily for internal use only
1979
1988
  initContainer: new AsyncWaterfallHook('initContainer')
1980
1989
  });
1981
- this.version = "0.6.7";
1990
+ this.version = "0.6.8";
1982
1991
  this.moduleCache = new Map();
1983
1992
  this.loaderHook = new PluginSystem({
1984
1993
  // FIXME: may not be suitable , not open to the public yet
package/dist/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@module-federation/runtime",
3
- "version": "0.6.7",
3
+ "version": "0.6.8",
4
4
  "author": "zhouxiao <codingzx@gmail.com>",
5
5
  "main": "./index.cjs.js",
6
6
  "module": "./index.esm.js",
@@ -52,4 +52,4 @@
52
52
  "dependencies": {
53
53
  "@module-federation/sdk": "workspace:*"
54
54
  }
55
- }
55
+ }
@@ -22,4 +22,4 @@ function _object_without_properties_loose(source, excluded) {
22
22
  return target;
23
23
  }
24
24
 
25
- export { _extends as _, _object_without_properties_loose as a };
25
+ export { _object_without_properties_loose as _, _extends as a };
package/dist/share.cjs.js CHANGED
@@ -175,7 +175,7 @@ function getGlobalFederationConstructor() {
175
175
  function setGlobalFederationConstructor(FederationConstructor, isDebug = sdk.isDebugMode()) {
176
176
  if (isDebug) {
177
177
  globalThis.__FEDERATION__.__DEBUG_CONSTRUCTOR__ = FederationConstructor;
178
- globalThis.__FEDERATION__.__DEBUG_CONSTRUCTOR_VERSION__ = "0.6.7";
178
+ globalThis.__FEDERATION__.__DEBUG_CONSTRUCTOR_VERSION__ = "0.6.8";
179
179
  }
180
180
  }
181
181
  // eslint-disable-next-line @typescript-eslint/ban-types
@@ -318,6 +318,13 @@ const comparator = `^${gtlt}\\s*(${fullPlain})$|^$`;
318
318
  const gte0 = '^\\s*>=\\s*0.0.0\\s*$';
319
319
 
320
320
  // fork from https://github.com/originjs/vite-plugin-federation/blob/v1.1.12/packages/lib/src/utils/semver/index.ts
321
+ // Copyright (c)
322
+ // vite-plugin-federation is licensed under Mulan PSL v2.
323
+ // You can use this software according to the terms and conditions of the Mulan PSL v2.
324
+ // You may obtain a copy of Mulan PSL v2 at:
325
+ // http://license.coscl.org.cn/MulanPSL2
326
+ // 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.
327
+ // See the Mulan PSL v2 for more details.
321
328
  function parseRegex(source) {
322
329
  return new RegExp(source);
323
330
  }
@@ -339,6 +346,13 @@ function combineVersion(major, minor, patch, preRelease) {
339
346
  }
340
347
 
341
348
  // fork from https://github.com/originjs/vite-plugin-federation/blob/v1.1.12/packages/lib/src/utils/semver/index.ts
349
+ // Copyright (c)
350
+ // vite-plugin-federation is licensed under Mulan PSL v2.
351
+ // You can use this software according to the terms and conditions of the Mulan PSL v2.
352
+ // You may obtain a copy of Mulan PSL v2 at:
353
+ // http://license.coscl.org.cn/MulanPSL2
354
+ // 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.
355
+ // See the Mulan PSL v2 for more details.
342
356
  function parseHyphen(range) {
343
357
  return range.replace(parseRegex(hyphenRange), (_range, from, fromMajor, fromMinor, fromPatch, _fromPreRelease, _fromBuild, to, toMajor, toMinor, toPatch, toPreRelease)=>{
344
358
  if (isXVersion(fromMajor)) {
@@ -565,6 +579,13 @@ function compare(rangeAtom, versionAtom) {
565
579
  }
566
580
 
567
581
  // fork from https://github.com/originjs/vite-plugin-federation/blob/v1.1.12/packages/lib/src/utils/semver/index.ts
582
+ // Copyright (c)
583
+ // vite-plugin-federation is licensed under Mulan PSL v2.
584
+ // You can use this software according to the terms and conditions of the Mulan PSL v2.
585
+ // You may obtain a copy of Mulan PSL v2 at:
586
+ // http://license.coscl.org.cn/MulanPSL2
587
+ // 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.
588
+ // See the Mulan PSL v2 for more details.
568
589
  function parseComparatorString(range) {
569
590
  return pipe(// handle caret
570
591
  // ^ --> * (any, kinda silly)
package/dist/share.esm.js CHANGED
@@ -1,4 +1,4 @@
1
- import { a as _object_without_properties_loose, _ as _extends } from './polyfills.esm.js';
1
+ import { _ as _object_without_properties_loose, a as _extends } from './polyfills.esm.js';
2
2
  import { isBrowserEnv, isDebugMode } from '@module-federation/sdk';
3
3
 
4
4
  function getBuilderId() {
@@ -173,7 +173,7 @@ function getGlobalFederationConstructor() {
173
173
  function setGlobalFederationConstructor(FederationConstructor, isDebug = isDebugMode()) {
174
174
  if (isDebug) {
175
175
  globalThis.__FEDERATION__.__DEBUG_CONSTRUCTOR__ = FederationConstructor;
176
- globalThis.__FEDERATION__.__DEBUG_CONSTRUCTOR_VERSION__ = "0.6.7";
176
+ globalThis.__FEDERATION__.__DEBUG_CONSTRUCTOR_VERSION__ = "0.6.8";
177
177
  }
178
178
  }
179
179
  // eslint-disable-next-line @typescript-eslint/ban-types
@@ -316,6 +316,13 @@ const comparator = `^${gtlt}\\s*(${fullPlain})$|^$`;
316
316
  const gte0 = '^\\s*>=\\s*0.0.0\\s*$';
317
317
 
318
318
  // fork from https://github.com/originjs/vite-plugin-federation/blob/v1.1.12/packages/lib/src/utils/semver/index.ts
319
+ // Copyright (c)
320
+ // vite-plugin-federation is licensed under Mulan PSL v2.
321
+ // You can use this software according to the terms and conditions of the Mulan PSL v2.
322
+ // You may obtain a copy of Mulan PSL v2 at:
323
+ // http://license.coscl.org.cn/MulanPSL2
324
+ // 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.
325
+ // See the Mulan PSL v2 for more details.
319
326
  function parseRegex(source) {
320
327
  return new RegExp(source);
321
328
  }
@@ -337,6 +344,13 @@ function combineVersion(major, minor, patch, preRelease) {
337
344
  }
338
345
 
339
346
  // fork from https://github.com/originjs/vite-plugin-federation/blob/v1.1.12/packages/lib/src/utils/semver/index.ts
347
+ // Copyright (c)
348
+ // vite-plugin-federation is licensed under Mulan PSL v2.
349
+ // You can use this software according to the terms and conditions of the Mulan PSL v2.
350
+ // You may obtain a copy of Mulan PSL v2 at:
351
+ // http://license.coscl.org.cn/MulanPSL2
352
+ // 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.
353
+ // See the Mulan PSL v2 for more details.
340
354
  function parseHyphen(range) {
341
355
  return range.replace(parseRegex(hyphenRange), (_range, from, fromMajor, fromMinor, fromPatch, _fromPreRelease, _fromBuild, to, toMajor, toMinor, toPatch, toPreRelease)=>{
342
356
  if (isXVersion(fromMajor)) {
@@ -563,6 +577,13 @@ function compare(rangeAtom, versionAtom) {
563
577
  }
564
578
 
565
579
  // fork from https://github.com/originjs/vite-plugin-federation/blob/v1.1.12/packages/lib/src/utils/semver/index.ts
580
+ // Copyright (c)
581
+ // vite-plugin-federation is licensed under Mulan PSL v2.
582
+ // You can use this software according to the terms and conditions of the Mulan PSL v2.
583
+ // You may obtain a copy of Mulan PSL v2 at:
584
+ // http://license.coscl.org.cn/MulanPSL2
585
+ // 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.
586
+ // See the Mulan PSL v2 for more details.
566
587
  function parseComparatorString(range) {
567
588
  return pipe(// handle caret
568
589
  // ^ --> * (any, kinda silly)
@@ -844,4 +865,4 @@ function getTargetSharedOptions(options) {
844
865
  return Object.assign({}, resolver(shareInfos[pkgName]), extraOptions == null ? void 0 : extraOptions.customShareInfo);
845
866
  }
846
867
 
847
- export { getBuilderId as A, setGlobalFederationConstructor as B, getGlobalFederationInstance as C, DEFAULT_REMOTE_TYPE as D, getGlobalFederationConstructor as E, setGlobalFederationInstance as F, Global as G, registerGlobalPlugins as H, nativeGlobal as I, resetFederationGlobalInfo as J, getTargetSnapshotInfoByModuleInfo as K, globalLoading as a, DEFAULT_SCOPE as b, getRemoteEntryExports as c, assert as d, getFMId as e, error as f, getGlobalHostPlugins as g, isPlainObject as h, isObject as i, isRemoteInfoWithEntry as j, isPureRemoteEntry as k, getRemoteEntryInfoFromSnapshot as l, getInfoWithoutType as m, getPreloaded as n, getRegisteredShare as o, arrayOptions as p, getGlobalSnapshotInfoByModuleInfo as q, addGlobalSnapshot as r, setPreloaded as s, setGlobalSnapshotInfoByModuleInfo as t, getGlobalSnapshot as u, formatShareConfigs as v, warn as w, getTargetSharedOptions as x, getGlobalShareScope as y, addUniqueItem as z };
868
+ export { isPlainObject as A, isRemoteInfoWithEntry as B, isPureRemoteEntry as C, DEFAULT_REMOTE_TYPE as D, getRemoteEntryInfoFromSnapshot as E, arrayOptions as F, Global as G, formatShareConfigs as H, getTargetSharedOptions as I, addUniqueItem as J, getBuilderId as K, getGlobalShareScope as a, getGlobalFederationInstance as b, getGlobalFederationConstructor as c, setGlobalFederationConstructor as d, getInfoWithoutType as e, getGlobalSnapshot as f, getRegisteredShare as g, getTargetSnapshotInfoByModuleInfo as h, getGlobalSnapshotInfoByModuleInfo as i, setGlobalSnapshotInfoByModuleInfo as j, addGlobalSnapshot as k, getRemoteEntryExports as l, registerGlobalPlugins as m, nativeGlobal as n, getGlobalHostPlugins as o, getPreloaded as p, setPreloaded as q, resetFederationGlobalInfo as r, setGlobalFederationInstance as s, globalLoading as t, DEFAULT_SCOPE as u, assert as v, getFMId as w, isObject as x, error as y, warn as z };
@@ -57,7 +57,7 @@ export declare class RemoteHandler {
57
57
  error: unknown;
58
58
  options?: any;
59
59
  from: CallFrom;
60
- lifecycle: "onLoad" | "beforeRequest";
60
+ lifecycle: "onLoad" | "beforeRequest" | "beforeLoadShare";
61
61
  origin: FederationHost;
62
62
  }], unknown>;
63
63
  beforePreloadRemote: AsyncHook<[{
@@ -0,0 +1 @@
1
+ export * from "./src/types";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@module-federation/runtime",
3
- "version": "0.6.7",
3
+ "version": "0.6.8",
4
4
  "author": "zhouxiao <codingzx@gmail.com>",
5
5
  "main": "./dist/index.cjs.js",
6
6
  "module": "./dist/index.esm.js",
@@ -50,6 +50,6 @@
50
50
  }
51
51
  },
52
52
  "dependencies": {
53
- "@module-federation/sdk": "0.6.7"
53
+ "@module-federation/sdk": "0.6.8"
54
54
  }
55
55
  }