@module-federation/runtime 0.0.0-next-20240305014149 → 0.0.0-next-20240306063912

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
@@ -136,6 +136,7 @@ async function loadEntryScript({ name, globalName, entry, createScriptHook }) {
136
136
  1. '${entry}' is not the correct URL, or the remoteEntry resource or name is incorrect.\n
137
137
  2. ${remoteEntryKey} cannot be used to get remoteEntry exports in the window object.
138
138
  `);
139
+ console.log(entryExports);
139
140
  return entryExports;
140
141
  }).catch((e)=>{
141
142
  return e;
@@ -1275,19 +1276,6 @@ class FederationHost {
1275
1276
  2. The ${pkgName} share was not registered with the 'lib' attribute.\n
1276
1277
  `);
1277
1278
  }
1278
- initRawContainer(name, url, container) {
1279
- const remoteInfo = getRemoteInfo({
1280
- name,
1281
- entry: url
1282
- });
1283
- const module = new Module({
1284
- host: this,
1285
- remoteInfo
1286
- });
1287
- module.remoteEntryExports = container;
1288
- this.moduleCache.set(name, module);
1289
- return module;
1290
- }
1291
1279
  async _getRemoteModuleAndOptions(id) {
1292
1280
  const loadRemoteArgs = await this.hooks.lifecycle.beforeRequest.emit({
1293
1281
  id,
@@ -1685,10 +1673,6 @@ Object.defineProperty(exports, 'loadScript', {
1685
1673
  enumerable: true,
1686
1674
  get: function () { return sdk.loadScript; }
1687
1675
  });
1688
- Object.defineProperty(exports, 'loadScriptNode', {
1689
- enumerable: true,
1690
- get: function () { return sdk.loadScriptNode; }
1691
- });
1692
1676
  exports.FederationHost = FederationHost;
1693
1677
  exports.init = init;
1694
1678
  exports.loadRemote = loadRemote;
package/dist/index.esm.js CHANGED
@@ -1,7 +1,7 @@
1
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 addGlobalSnapshot, r as setGlobalSnapshotInfoByModuleInfo, t as getGlobalSnapshot, G as Global, u as getGlobalShareScope, v as formatShareConfigs, x as isBrowserEnv, y as getBuilderId, z as addUniqueItem, A as setGlobalFederationConstructor, B as getGlobalFederationInstance, C as getGlobalFederationConstructor, E as setGlobalFederationInstance } from './share.esm.js';
2
2
  export { F as registerGlobalPlugins } from './share.esm.js';
3
3
  import { composeKeyWithSeparator, loadScriptNode, loadScript, createLink, getResourceUrl, isManifestProvider, generateSnapshotFromManifest } from '@module-federation/sdk';
4
- export { loadScript, loadScriptNode } from '@module-federation/sdk';
4
+ export { loadScript } from '@module-federation/sdk';
5
5
 
6
6
  // Function to match a remote with its name and expose
7
7
  // id: pkgName(@federation/app1) + expose(button) = @federation/app1/button
@@ -134,6 +134,7 @@ async function loadEntryScript({ name, globalName, entry, createScriptHook }) {
134
134
  1. '${entry}' is not the correct URL, or the remoteEntry resource or name is incorrect.\n
135
135
  2. ${remoteEntryKey} cannot be used to get remoteEntry exports in the window object.
136
136
  `);
137
+ console.log(entryExports);
137
138
  return entryExports;
138
139
  }).catch((e)=>{
139
140
  return e;
@@ -1273,19 +1274,6 @@ class FederationHost {
1273
1274
  2. The ${pkgName} share was not registered with the 'lib' attribute.\n
1274
1275
  `);
1275
1276
  }
1276
- initRawContainer(name, url, container) {
1277
- const remoteInfo = getRemoteInfo({
1278
- name,
1279
- entry: url
1280
- });
1281
- const module = new Module({
1282
- host: this,
1283
- remoteInfo
1284
- });
1285
- module.remoteEntryExports = container;
1286
- this.moduleCache.set(name, module);
1287
- return module;
1288
- }
1289
1277
  async _getRemoteModuleAndOptions(id) {
1290
1278
  const loadRemoteArgs = await this.hooks.lifecycle.beforeRequest.emit({
1291
1279
  id,
@@ -136,7 +136,6 @@ export declare class FederationHost {
136
136
  initOptions(userOptions: UserOptions): Options;
137
137
  loadShare<T>(pkgName: string, customShareInfo?: Partial<Shared>): Promise<false | (() => T | undefined)>;
138
138
  loadShareSync<T>(pkgName: string, customShareInfo?: Partial<Shared>): () => T | never;
139
- initRawContainer(name: string, url: string, container: RemoteEntryExports): Module;
140
139
  private _getRemoteModuleAndOptions;
141
140
  loadRemote<T>(id: string, options?: {
142
141
  loadFactory?: boolean;
@@ -2,7 +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 { loadScript, loadScriptNode } from '@module-federation/sdk';
5
+ export { loadScript } from '@module-federation/sdk';
6
6
  export type { Federation } from './global';
7
7
  export type { FederationRuntimePlugin };
8
8
  export declare function init(options: UserOptions): FederationHost;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@module-federation/runtime",
3
- "version": "0.0.0-next-20240305014149",
3
+ "version": "0.0.0-next-20240306063912",
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-20240305014149"
48
+ "@module-federation/sdk": "0.0.0-next-20240306063912"
49
49
  }
50
50
  }