@module-federation/runtime 0.0.0-next-20240119091713 → 0.0.0-next-20240122033350

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs.js CHANGED
@@ -773,7 +773,8 @@ function generatePreloadAssets(origin, preloadOptions, remote, globalSnapshot, r
773
773
  id: assetsInfo.moduleName === '.' ? remoteInfo.name : exposeFullPath,
774
774
  name: remoteInfo.name,
775
775
  remoteSnapshot: moduleInfoSnapshot,
776
- preloadConfig
776
+ preloadConfig,
777
+ origin
777
778
  });
778
779
  const preloaded = share.getPreloaded(exposeFullPath);
779
780
  if (preloaded) {
@@ -1719,6 +1720,8 @@ Object.defineProperty(exports, 'loadScript', {
1719
1720
  get: function () { return sdk.loadScript; }
1720
1721
  });
1721
1722
  exports.FederationHost = FederationHost;
1723
+ exports.getRemoteEntry = getRemoteEntry;
1724
+ exports.getRemoteInfo = getRemoteInfo;
1722
1725
  exports.init = init;
1723
1726
  exports.loadRemote = loadRemote;
1724
1727
  exports.loadShare = loadShare;
package/dist/index.esm.js CHANGED
@@ -1,4 +1,4 @@
1
- import { g as getGlobalHostPlugins, D as DEFAULT_REMOTE_TYPE, a as DEFAULT_SCOPE, b as globalLoading, c as getRemoteEntryExports, d as assert, s as safeToString, e as getFMId, i as isObject, f as error, w as warn, h as isPlainObject, j as isRemoteInfoWithEntry, k as isPureRemoteEntry, l as getRegisteredShare, m as getInfoWithoutType, n as getPreloaded, o as setPreloaded, p as getGlobalSnapshotInfoByModuleInfo, q as setGlobalSnapshotInfoByModuleInfo, r as getGlobalSnapshot, G as Global, t as getGlobalShareScope, u as formatShareConfigs, v as isBrowserEnv, x as getBuilderId, y as addUniqueItem, z as setGlobalFederationConstructor, A as getGlobalFederationInstance, B as getGlobalFederationConstructor, C as setGlobalFederationInstance } from './share.esm.js';
1
+ import { g as getGlobalHostPlugins, a as globalLoading, D as DEFAULT_REMOTE_TYPE, b as DEFAULT_SCOPE, c as getRemoteEntryExports, d as assert, s as safeToString, e as getFMId, i as isObject, f as error, w as warn, h as isPlainObject, j as isRemoteInfoWithEntry, k as isPureRemoteEntry, l as getRegisteredShare, m as getInfoWithoutType, n as getPreloaded, o as setPreloaded, p as getGlobalSnapshotInfoByModuleInfo, q as setGlobalSnapshotInfoByModuleInfo, r as getGlobalSnapshot, G as Global, t as getGlobalShareScope, u as formatShareConfigs, v as isBrowserEnv, x as getBuilderId, y as addUniqueItem, z as setGlobalFederationConstructor, A as getGlobalFederationInstance, B as getGlobalFederationConstructor, C as setGlobalFederationInstance } from './share.esm.js';
2
2
  export { E as registerGlobalPlugins } from './share.esm.js';
3
3
  import { composeKeyWithSeparator, loadScriptNode, loadScript, createScript, getResourceUrl, isManifestProvider, generateSnapshotFromManifest } from '@module-federation/sdk';
4
4
  export { loadScript } from '@module-federation/sdk';
@@ -771,7 +771,8 @@ function generatePreloadAssets(origin, preloadOptions, remote, globalSnapshot, r
771
771
  id: assetsInfo.moduleName === '.' ? remoteInfo.name : exposeFullPath,
772
772
  name: remoteInfo.name,
773
773
  remoteSnapshot: moduleInfoSnapshot,
774
- preloadConfig
774
+ preloadConfig,
775
+ origin
775
776
  });
776
777
  const preloaded = getPreloaded(exposeFullPath);
777
778
  if (preloaded) {
@@ -1711,4 +1712,4 @@ function preloadRemote(...args) {
1711
1712
  // Inject for debug
1712
1713
  setGlobalFederationConstructor(FederationHost);
1713
1714
 
1714
- export { FederationHost, init, loadRemote, loadShare, loadShareSync, preloadRemote };
1715
+ export { FederationHost, getRemoteEntry, getRemoteInfo, init, loadRemote, loadShare, loadShareSync, preloadRemote };
package/dist/share.esm.js CHANGED
@@ -770,4 +770,4 @@ function getGlobalShareScope() {
770
770
  return Global.__FEDERATION__.__SHARE__;
771
771
  }
772
772
 
773
- export { getGlobalFederationInstance as A, getGlobalFederationConstructor as B, setGlobalFederationInstance as C, DEFAULT_REMOTE_TYPE as D, registerGlobalPlugins as E, nativeGlobal as F, Global as G, resetFederationGlobalInfo as H, getTargetSnapshotInfoByModuleInfo as I, addGlobalSnapshot as J, DEFAULT_SCOPE as a, globalLoading 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, getRegisteredShare as l, getInfoWithoutType as m, getPreloaded as n, setPreloaded as o, getGlobalSnapshotInfoByModuleInfo as p, setGlobalSnapshotInfoByModuleInfo as q, getGlobalSnapshot as r, safeToString as s, getGlobalShareScope as t, formatShareConfigs as u, isBrowserEnv as v, warn as w, getBuilderId as x, addUniqueItem as y, setGlobalFederationConstructor as z };
773
+ export { getGlobalFederationInstance as A, getGlobalFederationConstructor as B, setGlobalFederationInstance as C, DEFAULT_REMOTE_TYPE as D, registerGlobalPlugins as E, nativeGlobal as F, Global as G, resetFederationGlobalInfo as H, getTargetSnapshotInfoByModuleInfo as I, addGlobalSnapshot as J, 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, getRegisteredShare as l, getInfoWithoutType as m, getPreloaded as n, setPreloaded as o, getGlobalSnapshotInfoByModuleInfo as p, setGlobalSnapshotInfoByModuleInfo as q, getGlobalSnapshot as r, safeToString as s, getGlobalShareScope as t, formatShareConfigs as u, isBrowserEnv as v, warn as w, getBuilderId as x, addUniqueItem as y, setGlobalFederationConstructor as z };
@@ -69,6 +69,7 @@ export declare class FederationHost {
69
69
  name: string;
70
70
  remoteSnapshot: ModuleInfo;
71
71
  preloadConfig: PreloadRemoteArgs;
72
+ origin: FederationHost;
72
73
  }, void>;
73
74
  errorLoadRemote: AsyncHook<[{
74
75
  id: string;
@@ -2,6 +2,7 @@ import { FederationHost } from './core';
2
2
  import { UserOptions, FederationRuntimePlugin } from './type';
3
3
  export { FederationHost } from './core';
4
4
  export { registerGlobalPlugins } from './global';
5
+ export { getRemoteEntry, getRemoteInfo } from './utils';
5
6
  export { loadScript } from '@module-federation/sdk';
6
7
  export type { Federation } from './global';
7
8
  export type { FederationRuntimePlugin };
@@ -3,3 +3,4 @@ export * from './tool';
3
3
  export * from './manifest';
4
4
  export * from './logger';
5
5
  export * from './plugin';
6
+ export * from './load';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@module-federation/runtime",
3
- "version": "0.0.0-next-20240119091713",
3
+ "version": "0.0.0-next-20240122033350",
4
4
  "author": "zhouxiao <codingzx@gmail.com>",
5
5
  "main": "./dist/index.cjs",
6
6
  "module": "./dist/index.esm.js",
@@ -45,6 +45,6 @@
45
45
  }
46
46
  },
47
47
  "dependencies": {
48
- "@module-federation/sdk": "0.0.0-next-20240119091713"
48
+ "@module-federation/sdk": "0.0.0-next-20240122033350"
49
49
  }
50
50
  }