@module-federation/runtime 0.8.5 → 0.8.7

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.
Files changed (55) hide show
  1. package/dist/core.cjs.d.ts +2 -0
  2. package/dist/core.cjs.js +15 -0
  3. package/dist/core.esm.d.ts +2 -0
  4. package/dist/core.esm.mjs +3 -0
  5. package/dist/helpers.cjs.js +7 -27
  6. package/dist/helpers.esm.mjs +7 -27
  7. package/dist/index.cjs.js +34 -2086
  8. package/dist/index.esm.mjs +4 -2072
  9. package/dist/polyfills.cjs.js +0 -14
  10. package/dist/polyfills.esm.mjs +1 -14
  11. package/dist/src/core.d.ts +3 -114
  12. package/dist/src/embedded.d.ts +49 -49
  13. package/dist/src/helpers.d.ts +23 -29
  14. package/dist/src/index.d.ts +3 -9
  15. package/dist/src/types.d.ts +1 -1
  16. package/dist/src/utils.d.ts +3 -0
  17. package/dist/types.cjs.js +10 -0
  18. package/dist/types.esm.mjs +1 -1
  19. package/dist/utils.cjs.js +26 -0
  20. package/dist/utils.esm.mjs +24 -0
  21. package/package.json +12 -3
  22. package/dist/share.cjs.js +0 -937
  23. package/dist/share.esm.mjs +0 -896
  24. package/dist/src/constant.d.ts +0 -2
  25. package/dist/src/global.d.ts +0 -43
  26. package/dist/src/module/index.d.ts +0 -21
  27. package/dist/src/plugins/generate-preload-assets.d.ts +0 -8
  28. package/dist/src/plugins/snapshot/SnapshotHandler.d.ts +0 -58
  29. package/dist/src/plugins/snapshot/index.d.ts +0 -5
  30. package/dist/src/remote/index.d.ts +0 -109
  31. package/dist/src/shared/index.d.ts +0 -66
  32. package/dist/src/type/config.d.ts +0 -112
  33. package/dist/src/type/index.d.ts +0 -3
  34. package/dist/src/type/plugin.d.ts +0 -34
  35. package/dist/src/type/preload.d.ts +0 -26
  36. package/dist/src/utils/env.d.ts +0 -3
  37. package/dist/src/utils/hooks/asyncHook.d.ts +0 -6
  38. package/dist/src/utils/hooks/asyncWaterfallHooks.d.ts +0 -10
  39. package/dist/src/utils/hooks/index.d.ts +0 -6
  40. package/dist/src/utils/hooks/pluginSystem.d.ts +0 -15
  41. package/dist/src/utils/hooks/syncHook.d.ts +0 -12
  42. package/dist/src/utils/hooks/syncWaterfallHook.d.ts +0 -9
  43. package/dist/src/utils/index.d.ts +0 -6
  44. package/dist/src/utils/load.d.ts +0 -9
  45. package/dist/src/utils/logger.d.ts +0 -6
  46. package/dist/src/utils/manifest.d.ts +0 -7
  47. package/dist/src/utils/plugin.d.ts +0 -4
  48. package/dist/src/utils/preload.d.ts +0 -6
  49. package/dist/src/utils/semver/compare.d.ts +0 -9
  50. package/dist/src/utils/semver/constants.d.ts +0 -10
  51. package/dist/src/utils/semver/index.d.ts +0 -2
  52. package/dist/src/utils/semver/parser.d.ts +0 -9
  53. package/dist/src/utils/semver/utils.d.ts +0 -11
  54. package/dist/src/utils/share.d.ts +0 -27
  55. package/dist/src/utils/tool.d.ts +0 -18
@@ -0,0 +1,2 @@
1
+ export * from "./src/core";
2
+ export { default } from "./src/core";
@@ -0,0 +1,15 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var runtimeCore = require('@module-federation/runtime-core');
6
+
7
+
8
+
9
+ exports.default = runtimeCore;
10
+ Object.keys(runtimeCore).forEach(function (k) {
11
+ if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
12
+ enumerable: true,
13
+ get: function () { return runtimeCore[k]; }
14
+ });
15
+ });
@@ -0,0 +1,2 @@
1
+ export * from "./src/core";
2
+ export { default } from "./src/core";
@@ -0,0 +1,3 @@
1
+ import runtimeCore__default from '@module-federation/runtime-core';
2
+ export * from '@module-federation/runtime-core';
3
+ export { default } from '@module-federation/runtime-core';
@@ -1,34 +1,14 @@
1
1
  'use strict';
2
2
 
3
- var share = require('./share.cjs.js');
3
+ var polyfills = require('./polyfills.cjs.js');
4
+ var runtimeCore = require('@module-federation/runtime-core');
5
+ var utils = require('./utils.cjs.js');
4
6
 
5
- const ShareUtils = {
6
- getRegisteredShare: share.getRegisteredShare,
7
- getGlobalShareScope: share.getGlobalShareScope
8
- };
9
- const GlobalUtils = {
10
- Global: share.Global,
11
- nativeGlobal: share.nativeGlobal,
12
- resetFederationGlobalInfo: share.resetFederationGlobalInfo,
13
- getGlobalFederationInstance: share.getGlobalFederationInstance,
14
- setGlobalFederationInstance: share.setGlobalFederationInstance,
15
- getGlobalFederationConstructor: share.getGlobalFederationConstructor,
16
- setGlobalFederationConstructor: share.setGlobalFederationConstructor,
17
- getInfoWithoutType: share.getInfoWithoutType,
18
- getGlobalSnapshot: share.getGlobalSnapshot,
19
- getTargetSnapshotInfoByModuleInfo: share.getTargetSnapshotInfoByModuleInfo,
20
- getGlobalSnapshotInfoByModuleInfo: share.getGlobalSnapshotInfoByModuleInfo,
21
- setGlobalSnapshotInfoByModuleInfo: share.setGlobalSnapshotInfoByModuleInfo,
22
- addGlobalSnapshot: share.addGlobalSnapshot,
23
- getRemoteEntryExports: share.getRemoteEntryExports,
24
- registerGlobalPlugins: share.registerGlobalPlugins,
25
- getGlobalHostPlugins: share.getGlobalHostPlugins,
26
- getPreloaded: share.getPreloaded,
27
- setPreloaded: share.setPreloaded
28
- };
29
7
  var helpers = {
30
- global: GlobalUtils,
31
- share: ShareUtils
8
+ global: polyfills._extends({}, runtimeCore.helpers.global, {
9
+ getGlobalFederationInstance: utils.getGlobalFederationInstance
10
+ }),
11
+ share: runtimeCore.helpers.share
32
12
  };
33
13
 
34
14
  module.exports = helpers;
@@ -1,32 +1,12 @@
1
- import { g as getRegisteredShare, a as getGlobalShareScope, G as Global, n as nativeGlobal, r as resetFederationGlobalInfo, b as getGlobalFederationInstance, s as setGlobalFederationInstance, c as getGlobalFederationConstructor, d as setGlobalFederationConstructor, e as getInfoWithoutType, f as getGlobalSnapshot, h as getTargetSnapshotInfoByModuleInfo, i as getGlobalSnapshotInfoByModuleInfo, j as setGlobalSnapshotInfoByModuleInfo, k as addGlobalSnapshot, l as getRemoteEntryExports, m as registerGlobalPlugins, o as getGlobalHostPlugins, p as getPreloaded, q as setPreloaded } from './share.esm.mjs';
1
+ import { _ as _extends } from './polyfills.esm.mjs';
2
+ import { helpers as helpers$1 } from '@module-federation/runtime-core';
3
+ import { g as getGlobalFederationInstance } from './utils.esm.mjs';
2
4
 
3
- const ShareUtils = {
4
- getRegisteredShare,
5
- getGlobalShareScope
6
- };
7
- const GlobalUtils = {
8
- Global,
9
- nativeGlobal,
10
- resetFederationGlobalInfo,
11
- getGlobalFederationInstance,
12
- setGlobalFederationInstance,
13
- getGlobalFederationConstructor,
14
- setGlobalFederationConstructor,
15
- getInfoWithoutType,
16
- getGlobalSnapshot,
17
- getTargetSnapshotInfoByModuleInfo,
18
- getGlobalSnapshotInfoByModuleInfo,
19
- setGlobalSnapshotInfoByModuleInfo,
20
- addGlobalSnapshot,
21
- getRemoteEntryExports,
22
- registerGlobalPlugins,
23
- getGlobalHostPlugins,
24
- getPreloaded,
25
- setPreloaded
26
- };
27
5
  var helpers = {
28
- global: GlobalUtils,
29
- share: ShareUtils
6
+ global: _extends({}, helpers$1.global, {
7
+ getGlobalFederationInstance
8
+ }),
9
+ share: helpers$1.share
30
10
  };
31
11
 
32
12
  export { helpers as default };