@ice/mf-runtime 0.0.8-beta.3 → 0.0.8-beta.4

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.
@@ -3,13 +3,13 @@ export function getCurrentModuleName() {
3
3
  return (_window___MF_GLOBAL_STORE__ = window.__MF_GLOBAL_STORE__) === null || _window___MF_GLOBAL_STORE__ === void 0 ? void 0 : _window___MF_GLOBAL_STORE__.currentModuleName;
4
4
  }
5
5
  export function getMicroMod(scope) {
6
- var _microMods;
6
+ var _store_microMods, _microMods;
7
7
  const store = window.__MF_GLOBAL_STORE__;
8
8
  const currentModuleName = getCurrentModuleName();
9
9
  if (!currentModuleName) {
10
10
  return undefined;
11
11
  }
12
- const microMods = store.microMods.get(currentModuleName);
12
+ const microMods = (_store_microMods = store.microMods) === null || _store_microMods === void 0 ? void 0 : _store_microMods.get(currentModuleName);
13
13
  return (_microMods = microMods) === null || _microMods === void 0 ? void 0 : _microMods.find((microMod)=>microMod.appName === scope);
14
14
  }
15
15
  export function initGlobalStore(options, microMods) {
@@ -29,11 +29,12 @@ export function initGlobalStore(options, microMods) {
29
29
  const store = window.__MF_GLOBAL_STORE__;
30
30
  if (!window.getCurrentIceMicroMods) {
31
31
  window.getCurrentIceMicroMods = ()=>{
32
+ var _store_microMods;
32
33
  const currentModuleName = getCurrentModuleName();
33
34
  if (!currentModuleName) {
34
35
  return [];
35
36
  }
36
- return store.microMods.get(currentModuleName) || [];
37
+ return ((_store_microMods = store.microMods) === null || _store_microMods === void 0 ? void 0 : _store_microMods.get(currentModuleName)) || [];
37
38
  };
38
39
  }
39
40
  // 获取或创建 hostInfo
@@ -4,13 +4,13 @@ export function getCurrentModuleName() {
4
4
  return (_window___MF_GLOBAL_STORE__ = window.__MF_GLOBAL_STORE__) === null || _window___MF_GLOBAL_STORE__ === void 0 ? void 0 : _window___MF_GLOBAL_STORE__.currentModuleName;
5
5
  }
6
6
  export function getMicroMod(scope) {
7
- var _microMods;
7
+ var _store_microMods, _microMods;
8
8
  var store = window.__MF_GLOBAL_STORE__;
9
9
  var currentModuleName = getCurrentModuleName();
10
10
  if (!currentModuleName) {
11
11
  return undefined;
12
12
  }
13
- var microMods = store.microMods.get(currentModuleName);
13
+ var microMods = (_store_microMods = store.microMods) === null || _store_microMods === void 0 ? void 0 : _store_microMods.get(currentModuleName);
14
14
  return (_microMods = microMods) === null || _microMods === void 0 ? void 0 : _microMods.find(function(microMod) {
15
15
  return microMod.appName === scope;
16
16
  });
@@ -32,11 +32,12 @@ export function initGlobalStore(options, microMods) {
32
32
  var store = window.__MF_GLOBAL_STORE__;
33
33
  if (!window.getCurrentIceMicroMods) {
34
34
  window.getCurrentIceMicroMods = function() {
35
+ var _store_microMods;
35
36
  var currentModuleName = getCurrentModuleName();
36
37
  if (!currentModuleName) {
37
38
  return [];
38
39
  }
39
- return store.microMods.get(currentModuleName) || [];
40
+ return ((_store_microMods = store.microMods) === null || _store_microMods === void 0 ? void 0 : _store_microMods.get(currentModuleName)) || [];
40
41
  };
41
42
  }
42
43
  // 获取或创建 hostInfo
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ice/mf-runtime",
3
- "version": "0.0.8-beta.3",
3
+ "version": "0.0.8-beta.4",
4
4
  "description": "ice mf runtime",
5
5
  "files": [
6
6
  "esm",