chayns-api 2.6.0-beta.1 → 2.6.0-beta.2

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.
@@ -21,7 +21,7 @@ const System = ({
21
21
  var _system$scope, _moduleContext$_syste;
22
22
  const moduleContext = (0, _react.useContext)(_moduleContext.ModuleContext);
23
23
  (_moduleContext$_syste = moduleContext[_system$scope = system.scope]) !== null && _moduleContext$_syste !== void 0 ? _moduleContext$_syste : moduleContext[_system$scope] = {
24
- url: new URL('mf-manifest.json', system.url).toString(),
24
+ url: system.url,
25
25
  modules: new Set()
26
26
  };
27
27
  moduleContext[system.scope].modules.add(system.module);
@@ -27,7 +27,7 @@ const loadModule = (scope, module, url, preventSingleton = false) => {
27
27
  console.error(`[chayns-api] call registerRemote with force for scope ${scope}. url: ${url}`);
28
28
  }
29
29
  registerRemotes([{
30
- shareScope: url.endsWith('v2.remoteEntry.js') ? 'chayns-api' : 'default',
30
+ shareScope: url.endsWith('v2.remoteEntry.js') || url.endsWith('mf-manifest.json') ? 'chayns-api' : 'default',
31
31
  name: scope,
32
32
  entry: url,
33
33
  alias: scope
@@ -6,6 +6,9 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports.collectCssChunks = void 0;
7
7
  const remoteInfoCache = {};
8
8
  const loadRemoteInfo = async url => {
9
+ if (!url.endsWith('/mf-manifest.json')) {
10
+ return null;
11
+ }
9
12
  if (remoteInfoCache[url]) {
10
13
  return remoteInfoCache[url];
11
14
  }
@@ -13,7 +13,7 @@ const System = _ref => {
13
13
  var _system$scope, _moduleContext$_syste;
14
14
  const moduleContext = useContext(ModuleContext);
15
15
  (_moduleContext$_syste = moduleContext[_system$scope = system.scope]) !== null && _moduleContext$_syste !== void 0 ? _moduleContext$_syste : moduleContext[_system$scope] = {
16
- url: new URL('mf-manifest.json', system.url).toString(),
16
+ url: system.url,
17
17
  modules: new Set()
18
18
  };
19
19
  moduleContext[system.scope].modules.add(system.module);
@@ -21,7 +21,7 @@ export const loadModule = function (scope, module, url) {
21
21
  console.error(`[chayns-api] call registerRemote with force for scope ${scope}. url: ${url}`);
22
22
  }
23
23
  registerRemotes([{
24
- shareScope: url.endsWith('v2.remoteEntry.js') ? 'chayns-api' : 'default',
24
+ shareScope: url.endsWith('v2.remoteEntry.js') || url.endsWith('mf-manifest.json') ? 'chayns-api' : 'default',
25
25
  name: scope,
26
26
  entry: url,
27
27
  alias: scope
@@ -1,5 +1,8 @@
1
1
  const remoteInfoCache = {};
2
2
  const loadRemoteInfo = async url => {
3
+ if (!url.endsWith('/mf-manifest.json')) {
4
+ return null;
5
+ }
3
6
  if (remoteInfoCache[url]) {
4
7
  return remoteInfoCache[url];
5
8
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "chayns-api",
3
- "version": "2.6.0-beta.1",
3
+ "version": "2.6.0-beta.2",
4
4
  "description": "new chayns api",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/esm/index.js",