@module-federation/runtime 0.0.0-next-20241212065455 → 0.0.0-next-20241212123451

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
@@ -161,6 +161,10 @@ async function loadEntryScript({ name, globalName, entry, loaderHook }) {
161
161
  }));
162
162
  return entryExports;
163
163
  }).catch((e)=>{
164
+ share.assert(undefined, errorCodes.getShortErrorMsg(errorCodes.RUNTIME_008, errorCodes.runtimeDescMap, {
165
+ remoteName: name,
166
+ resourceUrl: entry
167
+ }));
164
168
  throw e;
165
169
  });
166
170
  }
@@ -2026,7 +2030,7 @@ class FederationHost {
2026
2030
  // maybe will change, temporarily for internal use only
2027
2031
  initContainer: new AsyncWaterfallHook('initContainer')
2028
2032
  });
2029
- this.version = "0.8.1";
2033
+ this.version = "0.8.2";
2030
2034
  this.moduleCache = new Map();
2031
2035
  this.loaderHook = new PluginSystem({
2032
2036
  // FIXME: may not be suitable , not open to the public yet
@@ -3,7 +3,7 @@ import { isBrowserEnv, loadScriptNode, composeKeyWithSeparator, loadScript, safe
3
3
  export { loadScript, loadScriptNode } from '@module-federation/sdk';
4
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 error, x as getFMId, y as processModuleAlias, z as isObject, A as warn, B as isPlainObject, C as isRemoteInfoWithEntry, E as isPureRemoteEntry, F as getRemoteEntryInfoFromSnapshot, e as getInfoWithoutType, p as getPreloaded, q as setPreloaded, g as getRegisteredShare, H as arrayOptions, i as getGlobalSnapshotInfoByModuleInfo, k as addGlobalSnapshot, j as setGlobalSnapshotInfoByModuleInfo, G as Global, f as getGlobalSnapshot, I as formatShareConfigs, J as getTargetSharedOptions, a as getGlobalShareScope, K as addUniqueItem, L as CurrentGlobal, M as logger, N as getBuilderId, d as setGlobalFederationConstructor, b as getGlobalFederationInstance, c as getGlobalFederationConstructor, s as setGlobalFederationInstance } from './share.esm.mjs';
5
5
  export { m as registerGlobalPlugins } from './share.esm.mjs';
6
- import { getShortErrorMsg, RUNTIME_001, runtimeDescMap, RUNTIME_002, RUNTIME_007, RUNTIME_003, RUNTIME_005, RUNTIME_006, RUNTIME_004 } from '@module-federation/error-codes';
6
+ import { getShortErrorMsg, RUNTIME_001, runtimeDescMap, RUNTIME_008, RUNTIME_002, RUNTIME_007, RUNTIME_003, RUNTIME_005, RUNTIME_006, RUNTIME_004 } from '@module-federation/error-codes';
7
7
 
8
8
  // Function to match a remote with its name and expose
9
9
  // id: pkgName(@federation/app1) + expose(button) = @federation/app1/button
@@ -161,6 +161,10 @@ async function loadEntryScript({ name, globalName, entry, loaderHook }) {
161
161
  }));
162
162
  return entryExports;
163
163
  }).catch((e)=>{
164
+ assert(undefined, getShortErrorMsg(RUNTIME_008, runtimeDescMap, {
165
+ remoteName: name,
166
+ resourceUrl: entry
167
+ }));
164
168
  throw e;
165
169
  });
166
170
  }
@@ -2026,7 +2030,7 @@ class FederationHost {
2026
2030
  // maybe will change, temporarily for internal use only
2027
2031
  initContainer: new AsyncWaterfallHook('initContainer')
2028
2032
  });
2029
- this.version = "0.8.1";
2033
+ this.version = "0.8.2";
2030
2034
  this.moduleCache = new Map();
2031
2035
  this.loaderHook = new PluginSystem({
2032
2036
  // FIXME: may not be suitable , not open to the public yet
package/dist/share.cjs.js CHANGED
@@ -197,7 +197,7 @@ function getGlobalFederationConstructor() {
197
197
  function setGlobalFederationConstructor(FederationConstructor, isDebug = sdk.isDebugMode()) {
198
198
  if (isDebug) {
199
199
  CurrentGlobal.__FEDERATION__.__DEBUG_CONSTRUCTOR__ = FederationConstructor;
200
- CurrentGlobal.__FEDERATION__.__DEBUG_CONSTRUCTOR_VERSION__ = "0.8.1";
200
+ CurrentGlobal.__FEDERATION__.__DEBUG_CONSTRUCTOR_VERSION__ = "0.8.2";
201
201
  }
202
202
  }
203
203
  // eslint-disable-next-line @typescript-eslint/ban-types
@@ -195,7 +195,7 @@ function getGlobalFederationConstructor() {
195
195
  function setGlobalFederationConstructor(FederationConstructor, isDebug = isDebugMode()) {
196
196
  if (isDebug) {
197
197
  CurrentGlobal.__FEDERATION__.__DEBUG_CONSTRUCTOR__ = FederationConstructor;
198
- CurrentGlobal.__FEDERATION__.__DEBUG_CONSTRUCTOR_VERSION__ = "0.8.1";
198
+ CurrentGlobal.__FEDERATION__.__DEBUG_CONSTRUCTOR_VERSION__ = "0.8.2";
199
199
  }
200
200
  }
201
201
  // eslint-disable-next-line @typescript-eslint/ban-types
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@module-federation/runtime",
3
- "version": "0.0.0-next-20241212065455",
3
+ "version": "0.0.0-next-20241212123451",
4
4
  "author": "zhouxiao <codingzx@gmail.com>",
5
5
  "main": "./dist/index.cjs.js",
6
6
  "module": "./dist/index.esm.mjs",
@@ -50,7 +50,7 @@
50
50
  }
51
51
  },
52
52
  "dependencies": {
53
- "@module-federation/sdk": "0.0.0-next-20241212065455",
54
- "@module-federation/error-codes": "0.0.0-next-20241212065455"
53
+ "@module-federation/sdk": "0.0.0-next-20241212123451",
54
+ "@module-federation/error-codes": "0.0.0-next-20241212123451"
55
55
  }
56
56
  }