@module-federation/modern-js 0.0.0-next-20250627065248 → 0.0.0-next-20250627073929

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 (64) hide show
  1. package/dist/cjs/cli/configPlugin.js +1 -1
  2. package/dist/cjs/cli/configPlugin.spec.js +2 -2
  3. package/dist/cjs/cli/mfRuntimePlugins/auto-fetch-data.js +100 -0
  4. package/dist/cjs/cli/server/data-fetch-server-plugin.js +143 -2
  5. package/dist/cjs/cli/ssrPlugin.js +8 -8
  6. package/dist/cjs/constant.js +49 -2
  7. package/dist/cjs/interfaces/global.js +16 -0
  8. package/dist/cjs/runtime/AwaitDataFetch.js +144 -0
  9. package/dist/cjs/runtime/createRemoteComponent.js +327 -0
  10. package/dist/cjs/runtime/index.js +28 -0
  11. package/dist/cjs/runtime/wrapNoSSR.js +35 -0
  12. package/dist/cjs/ssr-runtime/devPlugin.js +2 -2
  13. package/dist/cjs/ssr-runtime/downgrade.js +114 -0
  14. package/dist/cjs/ssr-runtime/injectDataFetchFunctionPlugin.js +102 -6
  15. package/dist/cjs/utils/dataFetch.js +211 -0
  16. package/dist/cjs/utils/index.js +54 -0
  17. package/dist/esm/cli/configPlugin.js +1 -1
  18. package/dist/esm/cli/configPlugin.spec.js +2 -2
  19. package/dist/esm/cli/mfRuntimePlugins/auto-fetch-data.js +76 -0
  20. package/dist/esm/cli/server/data-fetch-server-plugin.js +219 -2
  21. package/dist/esm/cli/ssrPlugin.js +1 -1
  22. package/dist/esm/constant.js +37 -1
  23. package/dist/esm/interfaces/global.js +0 -0
  24. package/dist/esm/runtime/AwaitDataFetch.js +131 -0
  25. package/dist/esm/runtime/createRemoteComponent.js +417 -0
  26. package/dist/esm/runtime/index.js +21 -0
  27. package/dist/esm/runtime/wrapNoSSR.js +12 -0
  28. package/dist/esm/ssr-runtime/devPlugin.js +1 -1
  29. package/dist/esm/ssr-runtime/downgrade.js +150 -0
  30. package/dist/esm/ssr-runtime/injectDataFetchFunctionPlugin.js +147 -4
  31. package/dist/esm/utils/dataFetch.js +237 -0
  32. package/dist/esm/utils/index.js +28 -0
  33. package/dist/esm-node/cli/configPlugin.js +1 -1
  34. package/dist/esm-node/cli/configPlugin.spec.js +2 -2
  35. package/dist/esm-node/cli/mfRuntimePlugins/auto-fetch-data.js +70 -0
  36. package/dist/esm-node/cli/server/data-fetch-server-plugin.js +143 -2
  37. package/dist/esm-node/cli/ssrPlugin.js +1 -1
  38. package/dist/esm-node/constant.js +37 -1
  39. package/dist/esm-node/interfaces/global.js +0 -0
  40. package/dist/esm-node/runtime/AwaitDataFetch.js +109 -0
  41. package/dist/esm-node/runtime/createRemoteComponent.js +291 -0
  42. package/dist/esm-node/runtime/index.js +21 -0
  43. package/dist/esm-node/runtime/wrapNoSSR.js +11 -0
  44. package/dist/esm-node/ssr-runtime/devPlugin.js +1 -1
  45. package/dist/esm-node/ssr-runtime/downgrade.js +88 -0
  46. package/dist/esm-node/ssr-runtime/injectDataFetchFunctionPlugin.js +89 -4
  47. package/dist/esm-node/utils/dataFetch.js +166 -0
  48. package/dist/esm-node/utils/index.js +27 -0
  49. package/dist/types/cli/mfRuntimePlugins/auto-fetch-data.d.ts +3 -0
  50. package/dist/types/constant.d.ts +23 -0
  51. package/dist/types/interfaces/global.d.ts +27 -0
  52. package/dist/types/runtime/AwaitDataFetch.d.ts +19 -0
  53. package/dist/types/runtime/createRemoteComponent.d.ts +26 -0
  54. package/dist/types/runtime/index.d.ts +9 -0
  55. package/dist/types/runtime/wrapNoSSR.d.ts +9 -0
  56. package/dist/types/ssr-runtime/downgrade.d.ts +4 -0
  57. package/dist/types/ssr-runtime/injectDataFetchFunctionPlugin.d.ts +3 -0
  58. package/dist/types/utils/dataFetch.d.ts +26 -0
  59. package/dist/types/utils/index.d.ts +15 -0
  60. package/package.json +16 -16
  61. package/dist/cjs/react/index.js +0 -50
  62. package/dist/esm/react/index.js +0 -15
  63. package/dist/esm-node/react/index.js +0 -15
  64. package/dist/types/react/index.d.ts +0 -2
@@ -1,50 +0,0 @@
1
- "use strict";
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __export = (target, all) => {
7
- for (var name in all)
8
- __defProp(target, name, { get: all[name], enumerable: true });
9
- };
10
- var __copyProps = (to, from, except, desc) => {
11
- if (from && typeof from === "object" || typeof from === "function") {
12
- for (let key of __getOwnPropNames(from))
13
- if (!__hasOwnProp.call(to, key) && key !== except)
14
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
- }
16
- return to;
17
- };
18
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
- var react_exports = {};
20
- __export(react_exports, {
21
- CacheSize: () => import_bridge_react.CacheSize,
22
- CacheTime: () => import_bridge_react.CacheTime,
23
- ERROR_TYPE: () => import_bridge_react.ERROR_TYPE,
24
- cache: () => import_bridge_react.cache,
25
- clearStore: () => import_bridge_react.clearStore,
26
- collectSSRAssets: () => import_bridge_react.collectSSRAssets,
27
- configureCache: () => import_bridge_react.configureCache,
28
- createLazyComponent: () => import_bridge_react.createLazyComponent,
29
- generateKey: () => import_bridge_react.generateKey,
30
- prefetch: () => import_bridge_react.prefetch,
31
- revalidateTag: () => import_bridge_react.revalidateTag,
32
- wrapNoSSR: () => import_bridge_react.wrapNoSSR
33
- });
34
- module.exports = __toCommonJS(react_exports);
35
- var import_bridge_react = require("@module-federation/bridge-react");
36
- // Annotate the CommonJS export names for ESM import in node:
37
- 0 && (module.exports = {
38
- CacheSize,
39
- CacheTime,
40
- ERROR_TYPE,
41
- cache,
42
- clearStore,
43
- collectSSRAssets,
44
- configureCache,
45
- createLazyComponent,
46
- generateKey,
47
- prefetch,
48
- revalidateTag,
49
- wrapNoSSR
50
- });
@@ -1,15 +0,0 @@
1
- import { ERROR_TYPE, createLazyComponent, collectSSRAssets, wrapNoSSR, CacheSize, CacheTime, configureCache, generateKey, cache, revalidateTag, clearStore, prefetch } from "@module-federation/bridge-react";
2
- export {
3
- CacheSize,
4
- CacheTime,
5
- ERROR_TYPE,
6
- cache,
7
- clearStore,
8
- collectSSRAssets,
9
- configureCache,
10
- createLazyComponent,
11
- generateKey,
12
- prefetch,
13
- revalidateTag,
14
- wrapNoSSR
15
- };
@@ -1,15 +0,0 @@
1
- import { ERROR_TYPE, createLazyComponent, collectSSRAssets, wrapNoSSR, CacheSize, CacheTime, configureCache, generateKey, cache, revalidateTag, clearStore, prefetch } from "@module-federation/bridge-react";
2
- export {
3
- CacheSize,
4
- CacheTime,
5
- ERROR_TYPE,
6
- cache,
7
- clearStore,
8
- collectSSRAssets,
9
- configureCache,
10
- createLazyComponent,
11
- generateKey,
12
- prefetch,
13
- revalidateTag,
14
- wrapNoSSR
15
- };
@@ -1,2 +0,0 @@
1
- export { ERROR_TYPE, createLazyComponent, collectSSRAssets, wrapNoSSR, CacheSize, CacheTime, configureCache, generateKey, cache, revalidateTag, clearStore, prefetch, } from '@module-federation/bridge-react';
2
- export type { DataFetchParams, CacheStatus, CacheStatsInfo, } from '@module-federation/bridge-react';