@module-federation/runtime-tools 2.0.0 → 2.1.0

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 (41) hide show
  1. package/dist/LICENSE +21 -0
  2. package/dist/_virtual/_rolldown/runtime.cjs +29 -0
  3. package/dist/index.cjs +11 -0
  4. package/dist/index.d.ts +3 -2
  5. package/dist/index.js +5 -0
  6. package/dist/runtime-core.cjs +9 -0
  7. package/dist/runtime-core.d.ts +1 -1
  8. package/dist/runtime-core.js +3 -0
  9. package/dist/runtime.cjs +9 -0
  10. package/dist/runtime.d.ts +1 -1
  11. package/dist/runtime.js +3 -0
  12. package/dist/webpack-bundler-runtime.cjs +10 -0
  13. package/dist/webpack-bundler-runtime.cjs.map +1 -0
  14. package/dist/webpack-bundler-runtime.d.ts +4 -2
  15. package/dist/webpack-bundler-runtime.js +8 -0
  16. package/dist/webpack-bundler-runtime.js.map +1 -0
  17. package/package.json +13 -13
  18. package/dist/index.cjs.cjs +0 -33
  19. package/dist/index.cjs.cjs.map +0 -1
  20. package/dist/index.cjs.d.ts +0 -2
  21. package/dist/index.esm.js +0 -4
  22. package/dist/index.esm.js.map +0 -1
  23. package/dist/runtime-core.cjs.cjs +0 -17
  24. package/dist/runtime-core.cjs.cjs.map +0 -1
  25. package/dist/runtime-core.cjs.d.ts +0 -1
  26. package/dist/runtime-core.esm.js +0 -2
  27. package/dist/runtime-core.esm.js.map +0 -1
  28. package/dist/runtime.cjs.cjs +0 -17
  29. package/dist/runtime.cjs.cjs.map +0 -1
  30. package/dist/runtime.cjs.d.ts +0 -1
  31. package/dist/runtime.esm.js +0 -2
  32. package/dist/runtime.esm.js.map +0 -1
  33. package/dist/src/index.d.ts +0 -3
  34. package/dist/src/runtime-core.d.ts +0 -1
  35. package/dist/src/runtime.d.ts +0 -1
  36. package/dist/src/webpack-bundler-runtime.d.ts +0 -1
  37. package/dist/webpack-bundler-runtime.cjs.cjs +0 -8
  38. package/dist/webpack-bundler-runtime.cjs.cjs.map +0 -1
  39. package/dist/webpack-bundler-runtime.cjs.d.ts +0 -2
  40. package/dist/webpack-bundler-runtime.esm.js +0 -2
  41. package/dist/webpack-bundler-runtime.esm.js.map +0 -1
package/dist/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2023-present zhouxiao(zhoushaw)
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,29 @@
1
+ //#region \0rolldown/runtime.js
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __copyProps = (to, from, except, desc) => {
9
+ if (from && typeof from === "object" || typeof from === "function") {
10
+ for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
11
+ key = keys[i];
12
+ if (!__hasOwnProp.call(to, key) && key !== except) {
13
+ __defProp(to, key, {
14
+ get: ((k) => from[k]).bind(null, key),
15
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
16
+ });
17
+ }
18
+ }
19
+ }
20
+ return to;
21
+ };
22
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
23
+ value: mod,
24
+ enumerable: true
25
+ }) : target, mod));
26
+
27
+ //#endregion
28
+
29
+ exports.__toESM = __toESM;
package/dist/index.cjs ADDED
@@ -0,0 +1,11 @@
1
+ const require_runtime = require('./_virtual/_rolldown/runtime.cjs');
2
+ let _module_federation_runtime = require("@module-federation/runtime");
3
+ _module_federation_runtime = require_runtime.__toESM(_module_federation_runtime);
4
+
5
+ module.exports = _module_federation_runtime;
6
+ Object.keys(_module_federation_runtime).forEach(function (k) {
7
+ if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
8
+ enumerable: true,
9
+ get: function () { return _module_federation_runtime[k]; }
10
+ });
11
+ });
package/dist/index.d.ts CHANGED
@@ -1,2 +1,3 @@
1
- export * from "./src/index";
2
- export { default } from "./src/index";
1
+ import * as runtime from "@module-federation/runtime";
2
+ export * from "@module-federation/runtime";
3
+ export = runtime;
package/dist/index.js ADDED
@@ -0,0 +1,5 @@
1
+ import * as runtime from "@module-federation/runtime";
2
+
3
+ export * from "@module-federation/runtime"
4
+
5
+ export { runtime as default };
@@ -0,0 +1,9 @@
1
+
2
+
3
+ var _module_federation_runtime_core = require("@module-federation/runtime/core");
4
+ Object.keys(_module_federation_runtime_core).forEach(function (k) {
5
+ if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
6
+ enumerable: true,
7
+ get: function () { return _module_federation_runtime_core[k]; }
8
+ });
9
+ });
@@ -1 +1 @@
1
- export * from "./src/runtime-core";
1
+ export * from "@module-federation/runtime/core";
@@ -0,0 +1,3 @@
1
+ export * from "@module-federation/runtime/core"
2
+
3
+ export { };
@@ -0,0 +1,9 @@
1
+
2
+
3
+ var _module_federation_runtime = require("@module-federation/runtime");
4
+ Object.keys(_module_federation_runtime).forEach(function (k) {
5
+ if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
6
+ enumerable: true,
7
+ get: function () { return _module_federation_runtime[k]; }
8
+ });
9
+ });
package/dist/runtime.d.ts CHANGED
@@ -1 +1 @@
1
- export * from "./src/runtime";
1
+ export * from "@module-federation/runtime";
@@ -0,0 +1,3 @@
1
+ export * from "@module-federation/runtime"
2
+
3
+ export { };
@@ -0,0 +1,10 @@
1
+ const require_runtime = require('./_virtual/_rolldown/runtime.cjs');
2
+ let _module_federation_webpack_bundler_runtime = require("@module-federation/webpack-bundler-runtime");
3
+ _module_federation_webpack_bundler_runtime = require_runtime.__toESM(_module_federation_webpack_bundler_runtime);
4
+
5
+ //#region src/webpack-bundler-runtime.ts
6
+ const normalizedWebpackBundlerRuntime = _module_federation_webpack_bundler_runtime.default.default ?? _module_federation_webpack_bundler_runtime.default;
7
+
8
+ //#endregion
9
+ module.exports = normalizedWebpackBundlerRuntime;
10
+ //# sourceMappingURL=webpack-bundler-runtime.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"webpack-bundler-runtime.cjs","names":["webpackBundlerRuntime"],"sources":["../src/webpack-bundler-runtime.ts"],"sourcesContent":["import webpackBundlerRuntime from '@module-federation/webpack-bundler-runtime';\n\nconst normalizedWebpackBundlerRuntime =\n // Support both CJS module.exports payload and transpiled default payload.\n (webpackBundlerRuntime as { default?: unknown }).default ??\n webpackBundlerRuntime;\n\nexport default normalizedWebpackBundlerRuntime;\n"],"mappings":";;;;;AAEA,MAAM,kCAEHA,mDAAgD,WACjDA"}
@@ -1,2 +1,4 @@
1
- export * from "./src/webpack-bundler-runtime";
2
- export { default } from "./src/webpack-bundler-runtime";
1
+ //#region src/webpack-bundler-runtime.d.ts
2
+ declare const normalizedWebpackBundlerRuntime: {};
3
+ export = normalizedWebpackBundlerRuntime;
4
+ //# sourceMappingURL=webpack-bundler-runtime.d.ts.map
@@ -0,0 +1,8 @@
1
+ import webpackBundlerRuntime from "@module-federation/webpack-bundler-runtime";
2
+
3
+ //#region src/webpack-bundler-runtime.ts
4
+ const normalizedWebpackBundlerRuntime = webpackBundlerRuntime.default ?? webpackBundlerRuntime;
5
+
6
+ //#endregion
7
+ export { normalizedWebpackBundlerRuntime as default };
8
+ //# sourceMappingURL=webpack-bundler-runtime.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"webpack-bundler-runtime.js","names":[],"sources":["../src/webpack-bundler-runtime.ts"],"sourcesContent":["import webpackBundlerRuntime from '@module-federation/webpack-bundler-runtime';\n\nconst normalizedWebpackBundlerRuntime =\n // Support both CJS module.exports payload and transpiled default payload.\n (webpackBundlerRuntime as { default?: unknown }).default ??\n webpackBundlerRuntime;\n\nexport default normalizedWebpackBundlerRuntime;\n"],"mappings":";;;AAEA,MAAM,kCAEH,sBAAgD,WACjD"}
package/package.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "@module-federation/runtime-tools",
3
- "version": "2.0.0",
3
+ "version": "2.1.0",
4
4
  "type": "module",
5
5
  "author": "zhanghang <hanric.zhang@gmail.com>",
6
- "main": "./dist/index.cjs.cjs",
7
- "module": "./dist/index.esm.js",
6
+ "main": "./dist/index.cjs",
7
+ "module": "./dist/index.js",
8
8
  "types": "./dist/index.d.ts",
9
9
  "license": "MIT",
10
10
  "repository": {
@@ -23,41 +23,41 @@
23
23
  ".": {
24
24
  "import": {
25
25
  "types": "./dist/index.d.ts",
26
- "default": "./dist/index.esm.js"
26
+ "default": "./dist/index.js"
27
27
  },
28
28
  "require": {
29
29
  "types": "./dist/index.d.ts",
30
- "default": "./dist/index.cjs.cjs"
30
+ "default": "./dist/index.cjs"
31
31
  }
32
32
  },
33
33
  "./runtime": {
34
34
  "import": {
35
35
  "types": "./dist/runtime.d.ts",
36
- "default": "./dist/runtime.esm.js"
36
+ "default": "./dist/runtime.js"
37
37
  },
38
38
  "require": {
39
39
  "types": "./dist/runtime.d.ts",
40
- "default": "./dist/runtime.cjs.cjs"
40
+ "default": "./dist/runtime.cjs"
41
41
  }
42
42
  },
43
43
  "./runtime-core": {
44
44
  "import": {
45
45
  "types": "./dist/runtime-core.d.ts",
46
- "default": "./dist/runtime-core.esm.js"
46
+ "default": "./dist/runtime-core.js"
47
47
  },
48
48
  "require": {
49
49
  "types": "./dist/runtime-core.d.ts",
50
- "default": "./dist/runtime-core.cjs.cjs"
50
+ "default": "./dist/runtime-core.cjs"
51
51
  }
52
52
  },
53
53
  "./webpack-bundler-runtime": {
54
54
  "import": {
55
55
  "types": "./dist/webpack-bundler-runtime.d.ts",
56
- "default": "./dist/webpack-bundler-runtime.esm.js"
56
+ "default": "./dist/webpack-bundler-runtime.js"
57
57
  },
58
58
  "require": {
59
59
  "types": "./dist/webpack-bundler-runtime.d.ts",
60
- "default": "./dist/webpack-bundler-runtime.cjs.cjs"
60
+ "default": "./dist/webpack-bundler-runtime.cjs"
61
61
  }
62
62
  },
63
63
  "./*": "./*"
@@ -79,7 +79,7 @@
79
79
  }
80
80
  },
81
81
  "dependencies": {
82
- "@module-federation/webpack-bundler-runtime": "2.0.0",
83
- "@module-federation/runtime": "2.0.0"
82
+ "@module-federation/runtime": "2.1.0",
83
+ "@module-federation/webpack-bundler-runtime": "2.1.0"
84
84
  }
85
85
  }
@@ -1,33 +0,0 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
- var runtime = require('@module-federation/runtime');
6
-
7
- function _interopNamespaceDefault(e) {
8
- var n = Object.create(null);
9
- if (e) {
10
- for (var k in e) {
11
- n[k] = e[k];
12
- }
13
- }
14
- n.default = e;
15
- return Object.freeze(n);
16
- }
17
-
18
- var runtime__namespace = /*#__PURE__*/_interopNamespaceDefault(runtime);
19
-
20
-
21
-
22
- exports.default = runtime__namespace;
23
- Object.prototype.hasOwnProperty.call(runtime, '__proto__') &&
24
- !Object.prototype.hasOwnProperty.call(exports, '__proto__') &&
25
- Object.defineProperty(exports, '__proto__', {
26
- enumerable: true,
27
- value: runtime['__proto__']
28
- });
29
-
30
- Object.keys(runtime).forEach(function (k) {
31
- if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) exports[k] = runtime[k];
32
- });
33
- //# sourceMappingURL=index.cjs.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.cjs.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1,2 +0,0 @@
1
- export * from "./src/index";
2
- export { default } from "./src/index";
package/dist/index.esm.js DELETED
@@ -1,4 +0,0 @@
1
- export * from '@module-federation/runtime';
2
- import * as runtime from '@module-federation/runtime';
3
- export { runtime as default };
4
- //# sourceMappingURL=index.esm.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;"}
@@ -1,17 +0,0 @@
1
- 'use strict';
2
-
3
- var core = require('@module-federation/runtime/core');
4
-
5
-
6
-
7
- Object.prototype.hasOwnProperty.call(core, '__proto__') &&
8
- !Object.prototype.hasOwnProperty.call(exports, '__proto__') &&
9
- Object.defineProperty(exports, '__proto__', {
10
- enumerable: true,
11
- value: core['__proto__']
12
- });
13
-
14
- Object.keys(core).forEach(function (k) {
15
- if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) exports[k] = core[k];
16
- });
17
- //# sourceMappingURL=runtime-core.cjs.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"runtime-core.cjs.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;"}
@@ -1 +0,0 @@
1
- export * from "./src/runtime-core";
@@ -1,2 +0,0 @@
1
- export * from '@module-federation/runtime/core';
2
- //# sourceMappingURL=runtime-core.esm.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"runtime-core.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -1,17 +0,0 @@
1
- 'use strict';
2
-
3
- var runtime = require('@module-federation/runtime');
4
-
5
-
6
-
7
- Object.prototype.hasOwnProperty.call(runtime, '__proto__') &&
8
- !Object.prototype.hasOwnProperty.call(exports, '__proto__') &&
9
- Object.defineProperty(exports, '__proto__', {
10
- enumerable: true,
11
- value: runtime['__proto__']
12
- });
13
-
14
- Object.keys(runtime).forEach(function (k) {
15
- if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) exports[k] = runtime[k];
16
- });
17
- //# sourceMappingURL=runtime.cjs.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"runtime.cjs.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;"}
@@ -1 +0,0 @@
1
- export * from "./src/runtime";
@@ -1,2 +0,0 @@
1
- export * from '@module-federation/runtime';
2
- //# sourceMappingURL=runtime.esm.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"runtime.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -1,3 +0,0 @@
1
- import * as runtime from '@module-federation/runtime';
2
- export { runtime as default };
3
- export * from '@module-federation/runtime';
@@ -1 +0,0 @@
1
- export * from '@module-federation/runtime/core';
@@ -1 +0,0 @@
1
- export * from '@module-federation/runtime';
@@ -1 +0,0 @@
1
- export { default } from '@module-federation/webpack-bundler-runtime';
@@ -1,8 +0,0 @@
1
- 'use strict';
2
-
3
- var webpackBundlerRuntime = require('@module-federation/webpack-bundler-runtime');
4
-
5
-
6
-
7
- module.exports = webpackBundlerRuntime;
8
- //# sourceMappingURL=webpack-bundler-runtime.cjs.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"webpack-bundler-runtime.cjs.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;"}
@@ -1,2 +0,0 @@
1
- export * from "./src/webpack-bundler-runtime";
2
- export { default } from "./src/webpack-bundler-runtime";
@@ -1,2 +0,0 @@
1
- export { default } from '@module-federation/webpack-bundler-runtime';
2
- //# sourceMappingURL=webpack-bundler-runtime.esm.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"webpack-bundler-runtime.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}