@module-federation/nextjs-mf 0.0.0-chore-bump-node-22-20260710161714

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 (110) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +5 -0
  3. package/dist/LICENSE +21 -0
  4. package/dist/_virtual/_rolldown/runtime.js +29 -0
  5. package/dist/_virtual/_rolldown/runtime.mjs +8 -0
  6. package/dist/client/UrlNode.js +92 -0
  7. package/dist/client/UrlNode.js.map +1 -0
  8. package/dist/client/UrlNode.mjs +91 -0
  9. package/dist/client/UrlNode.mjs.map +1 -0
  10. package/dist/src/federation-noop.d.mts +1 -0
  11. package/dist/src/federation-noop.d.ts +1 -0
  12. package/dist/src/federation-noop.js +17 -0
  13. package/dist/src/federation-noop.js.map +1 -0
  14. package/dist/src/federation-noop.mjs +23 -0
  15. package/dist/src/federation-noop.mjs.map +1 -0
  16. package/dist/src/index.d.mts +2 -0
  17. package/dist/src/index.d.ts +2 -0
  18. package/dist/src/index.js +14 -0
  19. package/dist/src/index.js.map +1 -0
  20. package/dist/src/index.mjs +8 -0
  21. package/dist/src/index.mjs.map +1 -0
  22. package/dist/src/internal.js +152 -0
  23. package/dist/src/internal.js.map +1 -0
  24. package/dist/src/internal.mjs +152 -0
  25. package/dist/src/internal.mjs.map +1 -0
  26. package/dist/src/loaders/fixImageLoader.d.mts +27 -0
  27. package/dist/src/loaders/fixImageLoader.d.ts +27 -0
  28. package/dist/src/loaders/fixImageLoader.js +104 -0
  29. package/dist/src/loaders/fixImageLoader.js.map +1 -0
  30. package/dist/src/loaders/fixImageLoader.mjs +101 -0
  31. package/dist/src/loaders/fixImageLoader.mjs.map +1 -0
  32. package/dist/src/loaders/fixUrlLoader.d.mts +16 -0
  33. package/dist/src/loaders/fixUrlLoader.d.ts +16 -0
  34. package/dist/src/loaders/fixUrlLoader.js +22 -0
  35. package/dist/src/loaders/fixUrlLoader.js.map +1 -0
  36. package/dist/src/loaders/fixUrlLoader.mjs +19 -0
  37. package/dist/src/loaders/fixUrlLoader.mjs.map +1 -0
  38. package/dist/src/loaders/helpers.js +82 -0
  39. package/dist/src/loaders/helpers.js.map +1 -0
  40. package/dist/src/loaders/helpers.mjs +79 -0
  41. package/dist/src/loaders/helpers.mjs.map +1 -0
  42. package/dist/src/loaders/nextPageMapLoader.d.mts +29 -0
  43. package/dist/src/loaders/nextPageMapLoader.d.ts +29 -0
  44. package/dist/src/loaders/nextPageMapLoader.js +148 -0
  45. package/dist/src/loaders/nextPageMapLoader.js.map +1 -0
  46. package/dist/src/loaders/nextPageMapLoader.mjs +143 -0
  47. package/dist/src/loaders/nextPageMapLoader.mjs.map +1 -0
  48. package/dist/src/logger.js +9 -0
  49. package/dist/src/logger.js.map +1 -0
  50. package/dist/src/logger.mjs +8 -0
  51. package/dist/src/logger.mjs.map +1 -0
  52. package/dist/src/plugins/CopyFederationPlugin.js +67 -0
  53. package/dist/src/plugins/CopyFederationPlugin.js.map +1 -0
  54. package/dist/src/plugins/CopyFederationPlugin.mjs +65 -0
  55. package/dist/src/plugins/CopyFederationPlugin.mjs.map +1 -0
  56. package/dist/src/plugins/NextFederationPlugin/apply-client-plugins.js +41 -0
  57. package/dist/src/plugins/NextFederationPlugin/apply-client-plugins.js.map +1 -0
  58. package/dist/src/plugins/NextFederationPlugin/apply-client-plugins.mjs +40 -0
  59. package/dist/src/plugins/NextFederationPlugin/apply-client-plugins.mjs.map +1 -0
  60. package/dist/src/plugins/NextFederationPlugin/apply-server-plugins.js +117 -0
  61. package/dist/src/plugins/NextFederationPlugin/apply-server-plugins.js.map +1 -0
  62. package/dist/src/plugins/NextFederationPlugin/apply-server-plugins.mjs +111 -0
  63. package/dist/src/plugins/NextFederationPlugin/apply-server-plugins.mjs.map +1 -0
  64. package/dist/src/plugins/NextFederationPlugin/index.d.mts +31 -0
  65. package/dist/src/plugins/NextFederationPlugin/index.d.ts +31 -0
  66. package/dist/src/plugins/NextFederationPlugin/index.js +156 -0
  67. package/dist/src/plugins/NextFederationPlugin/index.js.map +1 -0
  68. package/dist/src/plugins/NextFederationPlugin/index.mjs +153 -0
  69. package/dist/src/plugins/NextFederationPlugin/index.mjs.map +1 -0
  70. package/dist/src/plugins/NextFederationPlugin/next-fragments.d.mts +18 -0
  71. package/dist/src/plugins/NextFederationPlugin/next-fragments.d.ts +18 -0
  72. package/dist/src/plugins/NextFederationPlugin/next-fragments.js +65 -0
  73. package/dist/src/plugins/NextFederationPlugin/next-fragments.js.map +1 -0
  74. package/dist/src/plugins/NextFederationPlugin/next-fragments.mjs +63 -0
  75. package/dist/src/plugins/NextFederationPlugin/next-fragments.mjs.map +1 -0
  76. package/dist/src/plugins/NextFederationPlugin/set-options.js +20 -0
  77. package/dist/src/plugins/NextFederationPlugin/set-options.js.map +1 -0
  78. package/dist/src/plugins/NextFederationPlugin/set-options.mjs +19 -0
  79. package/dist/src/plugins/NextFederationPlugin/set-options.mjs.map +1 -0
  80. package/dist/src/plugins/NextFederationPlugin/validate-options.js +37 -0
  81. package/dist/src/plugins/NextFederationPlugin/validate-options.js.map +1 -0
  82. package/dist/src/plugins/NextFederationPlugin/validate-options.mjs +35 -0
  83. package/dist/src/plugins/NextFederationPlugin/validate-options.mjs.map +1 -0
  84. package/dist/src/plugins/container/InvertedContainerPlugin.js +26 -0
  85. package/dist/src/plugins/container/InvertedContainerPlugin.js.map +1 -0
  86. package/dist/src/plugins/container/InvertedContainerPlugin.mjs +27 -0
  87. package/dist/src/plugins/container/InvertedContainerPlugin.mjs.map +1 -0
  88. package/dist/src/plugins/container/InvertedContainerRuntimeModule.js +57 -0
  89. package/dist/src/plugins/container/InvertedContainerRuntimeModule.js.map +1 -0
  90. package/dist/src/plugins/container/InvertedContainerRuntimeModule.mjs +57 -0
  91. package/dist/src/plugins/container/InvertedContainerRuntimeModule.mjs.map +1 -0
  92. package/dist/src/plugins/container/runtimePlugin.d.mts +7 -0
  93. package/dist/src/plugins/container/runtimePlugin.d.ts +6 -0
  94. package/dist/src/plugins/container/runtimePlugin.js +168 -0
  95. package/dist/src/plugins/container/runtimePlugin.js.map +1 -0
  96. package/dist/src/plugins/container/runtimePlugin.mjs +167 -0
  97. package/dist/src/plugins/container/runtimePlugin.mjs.map +1 -0
  98. package/dist/utils/flushedChunks.d.mts +29 -0
  99. package/dist/utils/flushedChunks.d.ts +29 -0
  100. package/dist/utils/flushedChunks.js +37 -0
  101. package/dist/utils/flushedChunks.js.map +1 -0
  102. package/dist/utils/flushedChunks.mjs +35 -0
  103. package/dist/utils/flushedChunks.mjs.map +1 -0
  104. package/dist/utils/index.d.mts +14 -0
  105. package/dist/utils/index.d.ts +14 -0
  106. package/dist/utils/index.js +31 -0
  107. package/dist/utils/index.js.map +1 -0
  108. package/dist/utils/index.mjs +22 -0
  109. package/dist/utils/index.mjs.map +1 -0
  110. package/package.json +106 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2023-present zhanghang(2heal1)
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.
package/README.md ADDED
@@ -0,0 +1,5 @@
1
+ # Next.js Support is in maintenance mode
2
+
3
+ Read about it [here](https://github.com/module-federation/core/issues/3153)
4
+
5
+ Plugin Documentation: [here](https://module-federation.io/practice/frameworks/next/index.html)
package/dist/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2023-present zhanghang(2heal1)
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;
@@ -0,0 +1,8 @@
1
+ import { createRequire } from "node:module";
2
+
3
+ //#region \0rolldown/runtime.js
4
+ var __commonJSMin = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports);
5
+ var __require = /* @__PURE__ */ createRequire(import.meta.url);
6
+
7
+ //#endregion
8
+ export { __commonJSMin, __require };
@@ -0,0 +1,92 @@
1
+
2
+ //#region client/UrlNode.ts
3
+ /**
4
+ * This class provides a logic of sorting dynamic routes in NextJS.
5
+ *
6
+ * It was copied from
7
+ * @see https://github.com/vercel/next.js/blob/canary/packages/next/shared/lib/router/utils/sorted-routes.ts
8
+ */
9
+ var UrlNode = class UrlNode {
10
+ constructor() {
11
+ this.placeholder = true;
12
+ this.children = /* @__PURE__ */ new Map();
13
+ this.slugName = null;
14
+ this.restSlugName = null;
15
+ this.optionalRestSlugName = null;
16
+ }
17
+ insert(urlPath) {
18
+ this._insert(urlPath.split("/").filter(Boolean), [], false);
19
+ }
20
+ smoosh() {
21
+ return this._smoosh();
22
+ }
23
+ _smoosh(prefix = "/") {
24
+ const childrenPaths = [...this.children.keys()].sort();
25
+ if (this.slugName !== null) childrenPaths.splice(childrenPaths.indexOf("[]"), 1);
26
+ if (this.restSlugName !== null) childrenPaths.splice(childrenPaths.indexOf("[...]"), 1);
27
+ if (this.optionalRestSlugName !== null) childrenPaths.splice(childrenPaths.indexOf("[[...]]"), 1);
28
+ const routes = childrenPaths.map((c) => this.children.get(c)._smoosh(`${prefix}${c}/`)).reduce((prev, curr) => [...prev, ...curr], []);
29
+ if (this.slugName !== null) routes.push(...this.children.get("[]")._smoosh(`${prefix}[${this.slugName}]/`));
30
+ if (!this.placeholder) {
31
+ const r = prefix === "/" ? "/" : prefix.slice(0, -1);
32
+ if (this.optionalRestSlugName != null) throw new Error(`You cannot define a route with the same specificity as a optional catch-all route ("${r}" and "${r}[[...${this.optionalRestSlugName}]]").`);
33
+ routes.unshift(r);
34
+ }
35
+ if (this.restSlugName !== null) routes.push(...this.children.get("[...]")._smoosh(`${prefix}[...${this.restSlugName}]/`));
36
+ if (this.optionalRestSlugName !== null) routes.push(...this.children.get("[[...]]")._smoosh(`${prefix}[[...${this.optionalRestSlugName}]]/`));
37
+ return routes;
38
+ }
39
+ _insert(urlPaths, slugNames, isCatchAll) {
40
+ if (urlPaths.length === 0) {
41
+ this.placeholder = false;
42
+ return;
43
+ }
44
+ if (isCatchAll) throw new Error(`Catch-all must be the last part of the URL.`);
45
+ let nextSegment = urlPaths[0];
46
+ if (nextSegment.startsWith("[") && nextSegment.endsWith("]")) {
47
+ let segmentName = nextSegment.slice(1, -1);
48
+ let isOptional = false;
49
+ if (segmentName.startsWith("[") && segmentName.endsWith("]")) {
50
+ segmentName = segmentName.slice(1, -1);
51
+ isOptional = true;
52
+ }
53
+ if (segmentName.startsWith("...")) {
54
+ segmentName = segmentName.substring(3);
55
+ isCatchAll = true;
56
+ }
57
+ if (segmentName.startsWith("[") || segmentName.endsWith("]")) throw new Error(`Segment names may not start or end with extra brackets ('${segmentName}').`);
58
+ if (segmentName.startsWith(".")) throw new Error(`Segment names may not start with erroneous periods ('${segmentName}').`);
59
+ const handleSlug = function handleSlug(previousSlug, nextSlug) {
60
+ if (previousSlug !== null && previousSlug !== nextSlug) throw new Error(`You cannot use different slug names for the same dynamic path ('${previousSlug}' !== '${nextSlug}').`);
61
+ slugNames.forEach((slug) => {
62
+ if (slug === nextSlug) throw new Error(`You cannot have the same slug name "${nextSlug}" repeat within a single dynamic path`);
63
+ if (slug.replace(/\W/g, "") === nextSegment.replace(/\W/g, "")) throw new Error(`You cannot have the slug names "${slug}" and "${nextSlug}" differ only by non-word symbols within a single dynamic path`);
64
+ });
65
+ slugNames.push(nextSlug);
66
+ };
67
+ if (isCatchAll) if (isOptional) {
68
+ if (this.restSlugName != null) throw new Error(`You cannot use both an required and optional catch-all route at the same level ("[...${this.restSlugName}]" and "${urlPaths[0]}" ).`);
69
+ handleSlug(this.optionalRestSlugName, segmentName);
70
+ this.optionalRestSlugName = segmentName;
71
+ nextSegment = "[[...]]";
72
+ } else {
73
+ if (this.optionalRestSlugName != null) throw new Error(`You cannot use both an optional and required catch-all route at the same level ("[[...${this.optionalRestSlugName}]]" and "${urlPaths[0]}").`);
74
+ handleSlug(this.restSlugName, segmentName);
75
+ this.restSlugName = segmentName;
76
+ nextSegment = "[...]";
77
+ }
78
+ else {
79
+ if (isOptional) throw new Error(`Optional route parameters are not yet supported ("${urlPaths[0]}").`);
80
+ handleSlug(this.slugName, segmentName);
81
+ this.slugName = segmentName;
82
+ nextSegment = "[]";
83
+ }
84
+ }
85
+ if (!this.children.has(nextSegment)) this.children.set(nextSegment, new UrlNode());
86
+ this.children.get(nextSegment)._insert(urlPaths.slice(1), slugNames, isCatchAll);
87
+ }
88
+ };
89
+
90
+ //#endregion
91
+ exports.UrlNode = UrlNode;
92
+ //# sourceMappingURL=UrlNode.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"UrlNode.js","names":[],"sources":["../../client/UrlNode.ts"],"sourcesContent":["// TODO: fix the no-non-null assertion errors\n/* eslint-disable @typescript-eslint/no-non-null-assertion */\n/**\n * This class provides a logic of sorting dynamic routes in NextJS.\n *\n * It was copied from\n * @see https://github.com/vercel/next.js/blob/canary/packages/next/shared/lib/router/utils/sorted-routes.ts\n */\nexport class UrlNode {\n placeholder = true;\n children: Map<string, UrlNode> = new Map();\n slugName: string | null = null;\n restSlugName: string | null = null;\n optionalRestSlugName: string | null = null;\n\n insert(urlPath: string): void {\n this._insert(urlPath.split('/').filter(Boolean), [], false);\n }\n\n smoosh(): string[] {\n return this._smoosh();\n }\n\n private _smoosh(prefix = '/'): string[] {\n const childrenPaths = [...this.children.keys()].sort();\n if (this.slugName !== null) {\n childrenPaths.splice(childrenPaths.indexOf('[]'), 1);\n }\n if (this.restSlugName !== null) {\n childrenPaths.splice(childrenPaths.indexOf('[...]'), 1);\n }\n if (this.optionalRestSlugName !== null) {\n childrenPaths.splice(childrenPaths.indexOf('[[...]]'), 1);\n }\n\n const routes = childrenPaths\n .map((c) => this.children.get(c)!._smoosh(`${prefix}${c}/`))\n .reduce((prev, curr) => [...prev, ...curr], []);\n\n if (this.slugName !== null) {\n routes.push(\n ...this.children.get('[]')!._smoosh(`${prefix}[${this.slugName}]/`),\n );\n }\n\n if (!this.placeholder) {\n const r = prefix === '/' ? '/' : prefix.slice(0, -1);\n if (this.optionalRestSlugName != null) {\n throw new Error(\n `You cannot define a route with the same specificity as a optional catch-all route (\"${r}\" and \"${r}[[...${this.optionalRestSlugName}]]\").`,\n );\n }\n\n routes.unshift(r);\n }\n\n if (this.restSlugName !== null) {\n routes.push(\n ...this.children\n .get('[...]')!\n ._smoosh(`${prefix}[...${this.restSlugName}]/`),\n );\n }\n\n if (this.optionalRestSlugName !== null) {\n routes.push(\n ...this.children\n .get('[[...]]')!\n ._smoosh(`${prefix}[[...${this.optionalRestSlugName}]]/`),\n );\n }\n\n return routes;\n }\n\n private _insert(\n urlPaths: string[],\n slugNames: string[],\n isCatchAll: boolean,\n ): void {\n if (urlPaths.length === 0) {\n this.placeholder = false;\n return;\n }\n\n if (isCatchAll) {\n throw new Error(`Catch-all must be the last part of the URL.`);\n }\n\n // The next segment in the urlPaths list\n let nextSegment = urlPaths[0];\n\n // Check if the segment matches `[something]`\n if (nextSegment.startsWith('[') && nextSegment.endsWith(']')) {\n // Strip `[` and `]`, leaving only `something`\n let segmentName = nextSegment.slice(1, -1);\n\n let isOptional = false;\n if (segmentName.startsWith('[') && segmentName.endsWith(']')) {\n // Strip optional `[` and `]`, leaving only `something`\n segmentName = segmentName.slice(1, -1);\n isOptional = true;\n }\n\n if (segmentName.startsWith('...')) {\n // Strip `...`, leaving only `something`\n segmentName = segmentName.substring(3);\n isCatchAll = true;\n }\n\n if (segmentName.startsWith('[') || segmentName.endsWith(']')) {\n throw new Error(\n `Segment names may not start or end with extra brackets ('${segmentName}').`,\n );\n }\n\n if (segmentName.startsWith('.')) {\n throw new Error(\n `Segment names may not start with erroneous periods ('${segmentName}').`,\n );\n }\n\n const handleSlug = function handleSlug(\n previousSlug: string | null,\n nextSlug: string,\n ) {\n if (previousSlug !== null && previousSlug !== nextSlug) {\n throw new Error(\n `You cannot use different slug names for the same dynamic path ('${previousSlug}' !== '${nextSlug}').`,\n );\n }\n\n slugNames.forEach((slug) => {\n if (slug === nextSlug) {\n throw new Error(\n `You cannot have the same slug name \"${nextSlug}\" repeat within a single dynamic path`,\n );\n }\n\n if (slug.replace(/\\W/g, '') === nextSegment.replace(/\\W/g, '')) {\n throw new Error(\n `You cannot have the slug names \"${slug}\" and \"${nextSlug}\" differ only by non-word symbols within a single dynamic path`,\n );\n }\n });\n\n slugNames.push(nextSlug);\n };\n\n if (isCatchAll) {\n if (isOptional) {\n if (this.restSlugName != null) {\n throw new Error(\n `You cannot use both an required and optional catch-all route at the same level (\"[...${this.restSlugName}]\" and \"${urlPaths[0]}\" ).`,\n );\n }\n\n handleSlug(this.optionalRestSlugName, segmentName);\n // slugName is kept as it can only be one particular slugName\n this.optionalRestSlugName = segmentName;\n // nextSegment is overwritten to [[...]] so that it can later be sorted specifically\n nextSegment = '[[...]]';\n } else {\n if (this.optionalRestSlugName != null) {\n throw new Error(\n `You cannot use both an optional and required catch-all route at the same level (\"[[...${this.optionalRestSlugName}]]\" and \"${urlPaths[0]}\").`,\n );\n }\n\n handleSlug(this.restSlugName, segmentName);\n // slugName is kept as it can only be one particular slugName\n this.restSlugName = segmentName;\n // nextSegment is overwritten to [...] so that it can later be sorted specifically\n nextSegment = '[...]';\n }\n } else {\n if (isOptional) {\n throw new Error(\n `Optional route parameters are not yet supported (\"${urlPaths[0]}\").`,\n );\n }\n handleSlug(this.slugName, segmentName);\n // slugName is kept as it can only be one particular slugName\n this.slugName = segmentName;\n // nextSegment is overwritten to [] so that it can later be sorted specifically\n nextSegment = '[]';\n }\n }\n\n // If this UrlNode doesn't have the nextSegment yet we create a new child UrlNode\n if (!this.children.has(nextSegment)) {\n this.children.set(nextSegment, new UrlNode());\n }\n\n this.children\n .get(nextSegment)!\n ._insert(urlPaths.slice(1), slugNames, isCatchAll);\n }\n}\n"],"mappings":";;;;;;;;AAQA,IAAa,UAAb,MAAa,QAAQ;;qBACL;kCACmB,IAAI,KAAK;kBAChB;sBACI;8BACQ;;CAEtC,OAAO,SAAuB;AAC5B,OAAK,QAAQ,QAAQ,MAAM,IAAI,CAAC,OAAO,QAAQ,EAAE,EAAE,EAAE,MAAM;;CAG7D,SAAmB;AACjB,SAAO,KAAK,SAAS;;CAGvB,AAAQ,QAAQ,SAAS,KAAe;EACtC,MAAM,gBAAgB,CAAC,GAAG,KAAK,SAAS,MAAM,CAAC,CAAC,MAAM;AACtD,MAAI,KAAK,aAAa,KACpB,eAAc,OAAO,cAAc,QAAQ,KAAK,EAAE,EAAE;AAEtD,MAAI,KAAK,iBAAiB,KACxB,eAAc,OAAO,cAAc,QAAQ,QAAQ,EAAE,EAAE;AAEzD,MAAI,KAAK,yBAAyB,KAChC,eAAc,OAAO,cAAc,QAAQ,UAAU,EAAE,EAAE;EAG3D,MAAM,SAAS,cACZ,KAAK,MAAM,KAAK,SAAS,IAAI,EAAE,CAAE,QAAQ,GAAG,SAAS,EAAE,GAAG,CAAC,CAC3D,QAAQ,MAAM,SAAS,CAAC,GAA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;AAGH,OAAI,YAAY,WAAW,IAAI,CAC7B,OAAM,IAAI,MACR,wDAAwD,YAAY,KACrE;GAGH,MAAM,aAAa,SAAS,WAC1B,cACA,UACA;AACA,QAAI,iBAAiB,QAAQ,iBAAiB,SAC5C,OAAM,IAAI,MACR,mEAAmE,aAAa,SAAS,SAAS,KACnG;AAGH,cAAU,SAAS,SAAS;AAC1B,SAAI,SAAS,SACX,OAAM,IAAI,MACR,uCAAuC,SAAS,uCACjD;AAGH,SAAI,KAAK,QAAQ,OAAO,GAAG,KAAK,YAAY,QAAQ,OAAO,GAAG,CAC5D,OAAM,IAAI,MACR,mCAAmC,KAAK,SAAS,SAAS,gEAC3D;MAEH;AAEF,cAAU,KAAK,SAAS;;AAG1B,OAAI,WACF,KAAI,YAAY;AACd,QAAI,KAAK,gBAAgB,KACvB,OAAM,IAAI,MACR,wFAAwF,KAAK,aAAa,UAAU,SAAS,GAAG,MACjI;AAGH,eAAW,KAAK,sBAAsB,YAAY;AAElD,SAAK,uBAAuB;AAE5B,kBAAc;UACT;AACL,QAAI,KAAK,wBAAwB,KAC/B,OAAM,IAAI,MACR,yFAAyF,KAAK,qBAAqB,WAAW,SAAS,GAAG,KAC3I;AAGH,eAAW,KAAK,cAAc,YAAY;AAE1C,SAAK,eAAe;AAEpB,kBAAc;;QAEX;AACL,QAAI,WACF,OAAM,IAAI,MACR,qDAAqD,SAAS,GAAG,KAClE;AAEH,eAAW,KAAK,UAAU,YAAY;AAEtC,SAAK,WAAW;AAEhB,kBAAc;;;AAKlB,MAAI,CAAC,KAAK,SAAS,IAAI,YAAY,CACjC,MAAK,SAAS,IAAI,aAAa,IAAI,SAAS,CAAC;AAG/C,OAAK,SACF,IAAI,YAAY,CAChB,QAAQ,SAAS,MAAM,EAAE,EAAE,WAAW,WAAW"}
@@ -0,0 +1,91 @@
1
+ //#region client/UrlNode.ts
2
+ /**
3
+ * This class provides a logic of sorting dynamic routes in NextJS.
4
+ *
5
+ * It was copied from
6
+ * @see https://github.com/vercel/next.js/blob/canary/packages/next/shared/lib/router/utils/sorted-routes.ts
7
+ */
8
+ var UrlNode = class UrlNode {
9
+ constructor() {
10
+ this.placeholder = true;
11
+ this.children = /* @__PURE__ */ new Map();
12
+ this.slugName = null;
13
+ this.restSlugName = null;
14
+ this.optionalRestSlugName = null;
15
+ }
16
+ insert(urlPath) {
17
+ this._insert(urlPath.split("/").filter(Boolean), [], false);
18
+ }
19
+ smoosh() {
20
+ return this._smoosh();
21
+ }
22
+ _smoosh(prefix = "/") {
23
+ const childrenPaths = [...this.children.keys()].sort();
24
+ if (this.slugName !== null) childrenPaths.splice(childrenPaths.indexOf("[]"), 1);
25
+ if (this.restSlugName !== null) childrenPaths.splice(childrenPaths.indexOf("[...]"), 1);
26
+ if (this.optionalRestSlugName !== null) childrenPaths.splice(childrenPaths.indexOf("[[...]]"), 1);
27
+ const routes = childrenPaths.map((c) => this.children.get(c)._smoosh(`${prefix}${c}/`)).reduce((prev, curr) => [...prev, ...curr], []);
28
+ if (this.slugName !== null) routes.push(...this.children.get("[]")._smoosh(`${prefix}[${this.slugName}]/`));
29
+ if (!this.placeholder) {
30
+ const r = prefix === "/" ? "/" : prefix.slice(0, -1);
31
+ if (this.optionalRestSlugName != null) throw new Error(`You cannot define a route with the same specificity as a optional catch-all route ("${r}" and "${r}[[...${this.optionalRestSlugName}]]").`);
32
+ routes.unshift(r);
33
+ }
34
+ if (this.restSlugName !== null) routes.push(...this.children.get("[...]")._smoosh(`${prefix}[...${this.restSlugName}]/`));
35
+ if (this.optionalRestSlugName !== null) routes.push(...this.children.get("[[...]]")._smoosh(`${prefix}[[...${this.optionalRestSlugName}]]/`));
36
+ return routes;
37
+ }
38
+ _insert(urlPaths, slugNames, isCatchAll) {
39
+ if (urlPaths.length === 0) {
40
+ this.placeholder = false;
41
+ return;
42
+ }
43
+ if (isCatchAll) throw new Error(`Catch-all must be the last part of the URL.`);
44
+ let nextSegment = urlPaths[0];
45
+ if (nextSegment.startsWith("[") && nextSegment.endsWith("]")) {
46
+ let segmentName = nextSegment.slice(1, -1);
47
+ let isOptional = false;
48
+ if (segmentName.startsWith("[") && segmentName.endsWith("]")) {
49
+ segmentName = segmentName.slice(1, -1);
50
+ isOptional = true;
51
+ }
52
+ if (segmentName.startsWith("...")) {
53
+ segmentName = segmentName.substring(3);
54
+ isCatchAll = true;
55
+ }
56
+ if (segmentName.startsWith("[") || segmentName.endsWith("]")) throw new Error(`Segment names may not start or end with extra brackets ('${segmentName}').`);
57
+ if (segmentName.startsWith(".")) throw new Error(`Segment names may not start with erroneous periods ('${segmentName}').`);
58
+ const handleSlug = function handleSlug(previousSlug, nextSlug) {
59
+ if (previousSlug !== null && previousSlug !== nextSlug) throw new Error(`You cannot use different slug names for the same dynamic path ('${previousSlug}' !== '${nextSlug}').`);
60
+ slugNames.forEach((slug) => {
61
+ if (slug === nextSlug) throw new Error(`You cannot have the same slug name "${nextSlug}" repeat within a single dynamic path`);
62
+ if (slug.replace(/\W/g, "") === nextSegment.replace(/\W/g, "")) throw new Error(`You cannot have the slug names "${slug}" and "${nextSlug}" differ only by non-word symbols within a single dynamic path`);
63
+ });
64
+ slugNames.push(nextSlug);
65
+ };
66
+ if (isCatchAll) if (isOptional) {
67
+ if (this.restSlugName != null) throw new Error(`You cannot use both an required and optional catch-all route at the same level ("[...${this.restSlugName}]" and "${urlPaths[0]}" ).`);
68
+ handleSlug(this.optionalRestSlugName, segmentName);
69
+ this.optionalRestSlugName = segmentName;
70
+ nextSegment = "[[...]]";
71
+ } else {
72
+ if (this.optionalRestSlugName != null) throw new Error(`You cannot use both an optional and required catch-all route at the same level ("[[...${this.optionalRestSlugName}]]" and "${urlPaths[0]}").`);
73
+ handleSlug(this.restSlugName, segmentName);
74
+ this.restSlugName = segmentName;
75
+ nextSegment = "[...]";
76
+ }
77
+ else {
78
+ if (isOptional) throw new Error(`Optional route parameters are not yet supported ("${urlPaths[0]}").`);
79
+ handleSlug(this.slugName, segmentName);
80
+ this.slugName = segmentName;
81
+ nextSegment = "[]";
82
+ }
83
+ }
84
+ if (!this.children.has(nextSegment)) this.children.set(nextSegment, new UrlNode());
85
+ this.children.get(nextSegment)._insert(urlPaths.slice(1), slugNames, isCatchAll);
86
+ }
87
+ };
88
+
89
+ //#endregion
90
+ export { UrlNode };
91
+ //# sourceMappingURL=UrlNode.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"UrlNode.mjs","names":[],"sources":["../../client/UrlNode.ts"],"sourcesContent":["// TODO: fix the no-non-null assertion errors\n/* eslint-disable @typescript-eslint/no-non-null-assertion */\n/**\n * This class provides a logic of sorting dynamic routes in NextJS.\n *\n * It was copied from\n * @see https://github.com/vercel/next.js/blob/canary/packages/next/shared/lib/router/utils/sorted-routes.ts\n */\nexport class UrlNode {\n placeholder = true;\n children: Map<string, UrlNode> = new Map();\n slugName: string | null = null;\n restSlugName: string | null = null;\n optionalRestSlugName: string | null = null;\n\n insert(urlPath: string): void {\n this._insert(urlPath.split('/').filter(Boolean), [], false);\n }\n\n smoosh(): string[] {\n return this._smoosh();\n }\n\n private _smoosh(prefix = '/'): string[] {\n const childrenPaths = [...this.children.keys()].sort();\n if (this.slugName !== null) {\n childrenPaths.splice(childrenPaths.indexOf('[]'), 1);\n }\n if (this.restSlugName !== null) {\n childrenPaths.splice(childrenPaths.indexOf('[...]'), 1);\n }\n if (this.optionalRestSlugName !== null) {\n childrenPaths.splice(childrenPaths.indexOf('[[...]]'), 1);\n }\n\n const routes = childrenPaths\n .map((c) => this.children.get(c)!._smoosh(`${prefix}${c}/`))\n .reduce((prev, curr) => [...prev, ...curr], []);\n\n if (this.slugName !== null) {\n routes.push(\n ...this.children.get('[]')!._smoosh(`${prefix}[${this.slugName}]/`),\n );\n }\n\n if (!this.placeholder) {\n const r = prefix === '/' ? '/' : prefix.slice(0, -1);\n if (this.optionalRestSlugName != null) {\n throw new Error(\n `You cannot define a route with the same specificity as a optional catch-all route (\"${r}\" and \"${r}[[...${this.optionalRestSlugName}]]\").`,\n );\n }\n\n routes.unshift(r);\n }\n\n if (this.restSlugName !== null) {\n routes.push(\n ...this.children\n .get('[...]')!\n ._smoosh(`${prefix}[...${this.restSlugName}]/`),\n );\n }\n\n if (this.optionalRestSlugName !== null) {\n routes.push(\n ...this.children\n .get('[[...]]')!\n ._smoosh(`${prefix}[[...${this.optionalRestSlugName}]]/`),\n );\n }\n\n return routes;\n }\n\n private _insert(\n urlPaths: string[],\n slugNames: string[],\n isCatchAll: boolean,\n ): void {\n if (urlPaths.length === 0) {\n this.placeholder = false;\n return;\n }\n\n if (isCatchAll) {\n throw new Error(`Catch-all must be the last part of the URL.`);\n }\n\n // The next segment in the urlPaths list\n let nextSegment = urlPaths[0];\n\n // Check if the segment matches `[something]`\n if (nextSegment.startsWith('[') && nextSegment.endsWith(']')) {\n // Strip `[` and `]`, leaving only `something`\n let segmentName = nextSegment.slice(1, -1);\n\n let isOptional = false;\n if (segmentName.startsWith('[') && segmentName.endsWith(']')) {\n // Strip optional `[` and `]`, leaving only `something`\n segmentName = segmentName.slice(1, -1);\n isOptional = true;\n }\n\n if (segmentName.startsWith('...')) {\n // Strip `...`, leaving only `something`\n segmentName = segmentName.substring(3);\n isCatchAll = true;\n }\n\n if (segmentName.startsWith('[') || segmentName.endsWith(']')) {\n throw new Error(\n `Segment names may not start or end with extra brackets ('${segmentName}').`,\n );\n }\n\n if (segmentName.startsWith('.')) {\n throw new Error(\n `Segment names may not start with erroneous periods ('${segmentName}').`,\n );\n }\n\n const handleSlug = function handleSlug(\n previousSlug: string | null,\n nextSlug: string,\n ) {\n if (previousSlug !== null && previousSlug !== nextSlug) {\n throw new Error(\n `You cannot use different slug names for the same dynamic path ('${previousSlug}' !== '${nextSlug}').`,\n );\n }\n\n slugNames.forEach((slug) => {\n if (slug === nextSlug) {\n throw new Error(\n `You cannot have the same slug name \"${nextSlug}\" repeat within a single dynamic path`,\n );\n }\n\n if (slug.replace(/\\W/g, '') === nextSegment.replace(/\\W/g, '')) {\n throw new Error(\n `You cannot have the slug names \"${slug}\" and \"${nextSlug}\" differ only by non-word symbols within a single dynamic path`,\n );\n }\n });\n\n slugNames.push(nextSlug);\n };\n\n if (isCatchAll) {\n if (isOptional) {\n if (this.restSlugName != null) {\n throw new Error(\n `You cannot use both an required and optional catch-all route at the same level (\"[...${this.restSlugName}]\" and \"${urlPaths[0]}\" ).`,\n );\n }\n\n handleSlug(this.optionalRestSlugName, segmentName);\n // slugName is kept as it can only be one particular slugName\n this.optionalRestSlugName = segmentName;\n // nextSegment is overwritten to [[...]] so that it can later be sorted specifically\n nextSegment = '[[...]]';\n } else {\n if (this.optionalRestSlugName != null) {\n throw new Error(\n `You cannot use both an optional and required catch-all route at the same level (\"[[...${this.optionalRestSlugName}]]\" and \"${urlPaths[0]}\").`,\n );\n }\n\n handleSlug(this.restSlugName, segmentName);\n // slugName is kept as it can only be one particular slugName\n this.restSlugName = segmentName;\n // nextSegment is overwritten to [...] so that it can later be sorted specifically\n nextSegment = '[...]';\n }\n } else {\n if (isOptional) {\n throw new Error(\n `Optional route parameters are not yet supported (\"${urlPaths[0]}\").`,\n );\n }\n handleSlug(this.slugName, segmentName);\n // slugName is kept as it can only be one particular slugName\n this.slugName = segmentName;\n // nextSegment is overwritten to [] so that it can later be sorted specifically\n nextSegment = '[]';\n }\n }\n\n // If this UrlNode doesn't have the nextSegment yet we create a new child UrlNode\n if (!this.children.has(nextSegment)) {\n this.children.set(nextSegment, new UrlNode());\n }\n\n this.children\n .get(nextSegment)!\n ._insert(urlPaths.slice(1), slugNames, isCatchAll);\n }\n}\n"],"mappings":";;;;;;;AAQA,IAAa,UAAb,MAAa,QAAQ;;qBACL;kCACmB,IAAI,KAAK;kBAChB;sBACI;8BACQ;;CAEtC,OAAO,SAAuB;AAC5B,OAAK,QAAQ,QAAQ,MAAM,IAAI,CAAC,OAAO,QAAQ,EAAE,EAAE,EAAE,MAAM;;CAG7D,SAAmB;AACjB,SAAO,KAAK,SAAS;;CAGvB,AAAQ,QAAQ,SAAS,KAA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Ae;AAEpB,kBAAc;;QAEX;AACL,QAAI,WACF,OAAM,IAAI,MACR,qDAAqD,SAAS,GAAG,KAClE;AAEH,eAAW,KAAK,UAAU,YAAY;AAEtC,SAAK,WAAW;AAEhB,kBAAc;;;AAKlB,MAAI,CAAC,KAAK,SAAS,IAAI,YAAY,CACjC,MAAK,SAAS,IAAI,aAAa,IAAI,SAAS,CAAC;AAG/C,OAAK,SACF,IAAI,YAAY,CAChB,QAAQ,SAAS,MAAM,EAAE,EAAE,WAAW,WAAW"}
@@ -0,0 +1 @@
1
+ export { };
@@ -0,0 +1 @@
1
+ export { };
@@ -0,0 +1,17 @@
1
+
2
+ //#region src/federation-noop.ts
3
+ require("next/head");
4
+ require("next/router");
5
+ require("next/link");
6
+ require("next/script");
7
+ require("next/image");
8
+ require("next/dynamic");
9
+ require("next/error");
10
+ require("next/amp");
11
+ require("styled-jsx");
12
+ require("styled-jsx/style");
13
+ require("next/image");
14
+ require("react/jsx-runtime");
15
+
16
+ //#endregion
17
+ //# sourceMappingURL=federation-noop.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"federation-noop.js","names":[],"sources":["../../src/federation-noop.ts"],"sourcesContent":["require('next/head');\nrequire('next/router');\nrequire('next/link');\nrequire('next/script');\nrequire('next/image');\nrequire('next/dynamic');\nrequire('next/error');\nrequire('next/amp');\nrequire('styled-jsx');\nrequire('styled-jsx/style');\nrequire('next/image');\n// require('react/jsx-dev-runtime');\nrequire('react/jsx-runtime');\n"],"mappings":";;AAAA,QAAQ,YAAY;AACpB,QAAQ,cAAc;AACtB,QAAQ,YAAY;AACpB,QAAQ,cAAc;AACtB,QAAQ,aAAa;AACrB,QAAQ,eAAe;AACvB,QAAQ,aAAa;AACrB,QAAQ,WAAW;AACnB,QAAQ,aAAa;AACrB,QAAQ,mBAAmB;AAC3B,QAAQ,aAAa;AAErB,QAAQ,oBAAoB"}
@@ -0,0 +1,23 @@
1
+ import { __commonJSMin, __require } from "../_virtual/_rolldown/runtime.mjs";
2
+
3
+ //#region src/federation-noop.ts
4
+ var require_federation_noop = /* @__PURE__ */ __commonJSMin((() => {
5
+ __require("next/head");
6
+ __require("next/router");
7
+ __require("next/link");
8
+ __require("next/script");
9
+ __require("next/image");
10
+ __require("next/dynamic");
11
+ __require("next/error");
12
+ __require("next/amp");
13
+ __require("styled-jsx");
14
+ __require("styled-jsx/style");
15
+ __require("next/image");
16
+ __require("react/jsx-runtime");
17
+ }));
18
+
19
+ //#endregion
20
+ export default require_federation_noop();
21
+
22
+ export { };
23
+ //# sourceMappingURL=federation-noop.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"federation-noop.mjs","names":[],"sources":["../../src/federation-noop.ts"],"sourcesContent":["require('next/head');\nrequire('next/router');\nrequire('next/link');\nrequire('next/script');\nrequire('next/image');\nrequire('next/dynamic');\nrequire('next/error');\nrequire('next/amp');\nrequire('styled-jsx');\nrequire('styled-jsx/style');\nrequire('next/image');\n// require('react/jsx-dev-runtime');\nrequire('react/jsx-runtime');\n"],"mappings":";;;;AAAA,WAAQ,YAAY;AACpB,WAAQ,cAAc;AACtB,WAAQ,YAAY;AACpB,WAAQ,cAAc;AACtB,WAAQ,aAAa;AACrB,WAAQ,eAAe;AACvB,WAAQ,aAAa;AACrB,WAAQ,WAAW;AACnB,WAAQ,aAAa;AACrB,WAAQ,mBAAmB;AAC3B,WAAQ,aAAa;AAErB,WAAQ,oBAAoB"}
@@ -0,0 +1,2 @@
1
+ import { NextFederationPlugin } from "./plugins/NextFederationPlugin/index.mjs";
2
+ export { NextFederationPlugin, NextFederationPlugin as default };
@@ -0,0 +1,2 @@
1
+ import { NextFederationPlugin } from "./plugins/NextFederationPlugin/index.js";
2
+ export { NextFederationPlugin, NextFederationPlugin as default };
@@ -0,0 +1,14 @@
1
+ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: 'Module' } });
2
+ const require_index = require('./plugins/NextFederationPlugin/index.js');
3
+
4
+ //#region src/index.ts
5
+ var src_default = require_index.default;
6
+ if (typeof module !== "undefined" && typeof module.exports !== "undefined") {
7
+ module.exports = require_index.default;
8
+ module.exports.NextFederationPlugin = require_index.default;
9
+ }
10
+
11
+ //#endregion
12
+ exports.NextFederationPlugin = require_index;
13
+ exports.default = src_default;
14
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","names":["NextFederationPlugin"],"sources":["../../src/index.ts"],"sourcesContent":["import NextFederationPlugin from './plugins/NextFederationPlugin';\n\nexport { NextFederationPlugin };\nexport default NextFederationPlugin;\n\nif (\n process.env.IS_ESM_BUILD !== 'true' &&\n typeof module !== 'undefined' &&\n typeof module.exports !== 'undefined'\n) {\n module.exports = NextFederationPlugin;\n module.exports.NextFederationPlugin = NextFederationPlugin;\n}\n"],"mappings":";;;;AAGA,kBAAeA;AAEf,IAEE,OAAO,WAAW,eAClB,OAAO,OAAO,YAAY,aAC1B;AACA,QAAO,UAAUA;AACjB,QAAO,QAAQ,uBAAuBA"}
@@ -0,0 +1,8 @@
1
+ import NextFederationPlugin from "./plugins/NextFederationPlugin/index.mjs";
2
+
3
+ //#region src/index.ts
4
+ var src_default = NextFederationPlugin;
5
+
6
+ //#endregion
7
+ export { NextFederationPlugin, src_default as default };
8
+ //# sourceMappingURL=index.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.mjs","names":[],"sources":["../../src/index.ts"],"sourcesContent":["import NextFederationPlugin from './plugins/NextFederationPlugin';\n\nexport { NextFederationPlugin };\nexport default NextFederationPlugin;\n\nif (\n process.env.IS_ESM_BUILD !== 'true' &&\n typeof module !== 'undefined' &&\n typeof module.exports !== 'undefined'\n) {\n module.exports = NextFederationPlugin;\n module.exports.NextFederationPlugin = NextFederationPlugin;\n}\n"],"mappings":";;;AAGA,kBAAe"}
@@ -0,0 +1,152 @@
1
+
2
+ //#region src/internal.ts
3
+ const WEBPACK_LAYERS_NAMES = {
4
+ shared: "shared",
5
+ reactServerComponents: "rsc",
6
+ serverSideRendering: "ssr",
7
+ actionBrowser: "action-browser",
8
+ api: "api",
9
+ middleware: "middleware",
10
+ instrument: "instrument",
11
+ edgeAsset: "edge-asset",
12
+ appPagesBrowser: "app-pages-browser"
13
+ };
14
+ const createSharedConfig = (name, layers, options = {}) => {
15
+ return layers.reduce((acc, layer) => {
16
+ const key = layer ? `${name}-${layer}` : name;
17
+ acc[key] = {
18
+ singleton: true,
19
+ requiredVersion: false,
20
+ import: layer ? void 0 : options.import ?? false,
21
+ shareKey: options.request ?? name,
22
+ request: options.request ?? name,
23
+ layer,
24
+ issuerLayer: layer
25
+ };
26
+ return acc;
27
+ }, {});
28
+ };
29
+ const defaultLayers = [
30
+ WEBPACK_LAYERS_NAMES.reactServerComponents,
31
+ WEBPACK_LAYERS_NAMES.serverSideRendering,
32
+ void 0
33
+ ];
34
+ const navigationLayers = [WEBPACK_LAYERS_NAMES.reactServerComponents, WEBPACK_LAYERS_NAMES.serverSideRendering];
35
+ createSharedConfig("react", defaultLayers);
36
+ createSharedConfig("react", defaultLayers, { request: "react-dom" });
37
+ createSharedConfig("react/", navigationLayers, {
38
+ request: "react/",
39
+ import: void 0
40
+ });
41
+ createSharedConfig("next-navigation", navigationLayers, { request: "next/navigation" });
42
+ /**
43
+ * @typedef SharedObject
44
+ * @type {object}
45
+ * @property {object} [key] - The key representing the shared object's package name.
46
+ * @property {boolean} key.singleton - Whether the shared object should be a singleton.
47
+ * @property {boolean} key.requiredVersion - Whether a specific version of the shared object is required.
48
+ * @property {boolean} key.eager - Whether the shared object should be eagerly loaded.
49
+ * @property {boolean} key.import - Whether the shared object should be imported or not.
50
+ * @property {string} key.layer - The webpack layer this shared module belongs to.
51
+ * @property {string|string[]} key.issuerLayer - The webpack layer that can import this shared module.
52
+ */
53
+ const DEFAULT_SHARE_SCOPE = {
54
+ "next/dynamic": {
55
+ requiredVersion: void 0,
56
+ singleton: true,
57
+ import: void 0
58
+ },
59
+ "next/head": {
60
+ requiredVersion: void 0,
61
+ singleton: true,
62
+ import: void 0
63
+ },
64
+ "next/link": {
65
+ requiredVersion: void 0,
66
+ singleton: true,
67
+ import: void 0
68
+ },
69
+ "next/router": {
70
+ requiredVersion: false,
71
+ singleton: true,
72
+ import: void 0
73
+ },
74
+ "next/image": {
75
+ requiredVersion: void 0,
76
+ singleton: true,
77
+ import: void 0
78
+ },
79
+ "next/script": {
80
+ requiredVersion: void 0,
81
+ singleton: true,
82
+ import: void 0
83
+ },
84
+ react: {
85
+ singleton: true,
86
+ requiredVersion: false,
87
+ import: false
88
+ },
89
+ "react/": {
90
+ singleton: true,
91
+ requiredVersion: false,
92
+ import: false
93
+ },
94
+ "react-dom/": {
95
+ singleton: true,
96
+ requiredVersion: false,
97
+ import: false
98
+ },
99
+ "react-dom": {
100
+ singleton: true,
101
+ requiredVersion: false,
102
+ import: false
103
+ },
104
+ "react/jsx-dev-runtime": {
105
+ singleton: true,
106
+ requiredVersion: false
107
+ },
108
+ "react/jsx-runtime": {
109
+ singleton: true,
110
+ requiredVersion: false
111
+ },
112
+ "styled-jsx": {
113
+ singleton: true,
114
+ import: void 0,
115
+ version: require("styled-jsx/package.json").version,
116
+ requiredVersion: "^" + require("styled-jsx/package.json").version
117
+ },
118
+ "styled-jsx/style": {
119
+ singleton: true,
120
+ import: false,
121
+ version: require("styled-jsx/package.json").version,
122
+ requiredVersion: "^" + require("styled-jsx/package.json").version
123
+ },
124
+ "styled-jsx/css": {
125
+ singleton: true,
126
+ import: void 0,
127
+ version: require("styled-jsx/package.json").version,
128
+ requiredVersion: "^" + require("styled-jsx/package.json").version
129
+ }
130
+ };
131
+ /**
132
+ * Defines a default share scope for the browser environment.
133
+ * This function takes the DEFAULT_SHARE_SCOPE and sets eager to undefined and import to undefined for all entries.
134
+ * For 'react', 'react-dom', 'next/router', and 'next/link', it sets eager to true.
135
+ * The module hoisting system relocates these modules into the right runtime and out of the remote.
136
+ *
137
+ * @type {SharedObject}
138
+ * @returns {SharedObject} - The modified share scope for the browser environment.
139
+ */
140
+ const DEFAULT_SHARE_SCOPE_BROWSER = Object.entries(DEFAULT_SHARE_SCOPE).reduce((acc, item) => {
141
+ const [key, value] = item;
142
+ acc[key] = {
143
+ ...value,
144
+ import: void 0
145
+ };
146
+ return acc;
147
+ }, {});
148
+
149
+ //#endregion
150
+ exports.DEFAULT_SHARE_SCOPE = DEFAULT_SHARE_SCOPE;
151
+ exports.DEFAULT_SHARE_SCOPE_BROWSER = DEFAULT_SHARE_SCOPE_BROWSER;
152
+ //# sourceMappingURL=internal.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"internal.js","names":[],"sources":["../../src/internal.ts"],"sourcesContent":["import type { moduleFederationPlugin } from '@module-federation/sdk';\n\n// Extend the SharedConfig type to include layer properties\ntype ExtendedSharedConfig = moduleFederationPlugin.SharedConfig & {\n layer?: string;\n issuerLayer?: string | string[];\n request?: string;\n shareKey?: string;\n};\n\nconst WEBPACK_LAYERS_NAMES = {\n /**\n * The layer for the shared code between the client and server bundles.\n */\n shared: 'shared',\n /**\n * The layer for server-only runtime and picking up `react-server` export conditions.\n * Including app router RSC pages and app router custom routes and metadata routes.\n */\n reactServerComponents: 'rsc',\n /**\n * Server Side Rendering layer for app (ssr).\n */\n serverSideRendering: 'ssr',\n /**\n * The browser client bundle layer for actions.\n */\n actionBrowser: 'action-browser',\n /**\n * The layer for the API routes.\n */\n api: 'api',\n /**\n * The layer for the middleware code.\n */\n middleware: 'middleware',\n /**\n * The layer for the instrumentation hooks.\n */\n instrument: 'instrument',\n /**\n * The layer for assets on the edge.\n */\n edgeAsset: 'edge-asset',\n /**\n * The browser client bundle layer for App directory.\n */\n appPagesBrowser: 'app-pages-browser',\n} as const;\n\nconst createSharedConfig = (\n name: string,\n layers: (string | undefined)[],\n options: { request?: string; import?: false | undefined } = {},\n) => {\n return layers.reduce(\n (acc, layer) => {\n const key = layer ? `${name}-${layer}` : name;\n acc[key] = {\n singleton: true,\n requiredVersion: false,\n import: layer ? undefined : (options.import ?? false),\n shareKey: options.request ?? name,\n request: options.request ?? name,\n layer,\n issuerLayer: layer,\n };\n return acc;\n },\n {} as Record<string, ExtendedSharedConfig>,\n );\n};\n\nconst defaultLayers = [\n WEBPACK_LAYERS_NAMES.reactServerComponents,\n WEBPACK_LAYERS_NAMES.serverSideRendering,\n undefined,\n];\n\nconst navigationLayers = [\n WEBPACK_LAYERS_NAMES.reactServerComponents,\n WEBPACK_LAYERS_NAMES.serverSideRendering,\n];\n\nconst reactShares = createSharedConfig('react', defaultLayers);\nconst reactDomShares = createSharedConfig('react', defaultLayers, {\n request: 'react-dom',\n});\nconst jsxRuntimeShares = createSharedConfig('react/', navigationLayers, {\n request: 'react/',\n import: undefined,\n});\nconst nextNavigationShares = createSharedConfig(\n 'next-navigation',\n navigationLayers,\n { request: 'next/navigation' },\n);\n\n/**\n * @typedef SharedObject\n * @type {object}\n * @property {object} [key] - The key representing the shared object's package name.\n * @property {boolean} key.singleton - Whether the shared object should be a singleton.\n * @property {boolean} key.requiredVersion - Whether a specific version of the shared object is required.\n * @property {boolean} key.eager - Whether the shared object should be eagerly loaded.\n * @property {boolean} key.import - Whether the shared object should be imported or not.\n * @property {string} key.layer - The webpack layer this shared module belongs to.\n * @property {string|string[]} key.issuerLayer - The webpack layer that can import this shared module.\n */\nexport const DEFAULT_SHARE_SCOPE: moduleFederationPlugin.SharedObject = {\n // ...reactShares,\n // ...reactDomShares,\n // ...nextNavigationShares,\n // ...jsxRuntimeShares,\n 'next/dynamic': {\n requiredVersion: undefined,\n singleton: true,\n import: undefined,\n },\n 'next/head': {\n requiredVersion: undefined,\n singleton: true,\n import: undefined,\n },\n 'next/link': {\n requiredVersion: undefined,\n singleton: true,\n import: undefined,\n },\n 'next/router': {\n requiredVersion: false,\n singleton: true,\n import: undefined,\n },\n 'next/image': {\n requiredVersion: undefined,\n singleton: true,\n import: undefined,\n },\n 'next/script': {\n requiredVersion: undefined,\n singleton: true,\n import: undefined,\n },\n react: {\n singleton: true,\n requiredVersion: false,\n import: false,\n },\n 'react/': {\n singleton: true,\n requiredVersion: false,\n import: false,\n },\n 'react-dom/': {\n singleton: true,\n requiredVersion: false,\n import: false,\n },\n 'react-dom': {\n singleton: true,\n requiredVersion: false,\n import: false,\n },\n 'react/jsx-dev-runtime': {\n singleton: true,\n requiredVersion: false,\n },\n 'react/jsx-runtime': {\n singleton: true,\n requiredVersion: false,\n },\n 'styled-jsx': {\n singleton: true,\n import: undefined,\n version: require('styled-jsx/package.json').version,\n requiredVersion: '^' + require('styled-jsx/package.json').version,\n },\n 'styled-jsx/style': {\n singleton: true,\n import: false,\n version: require('styled-jsx/package.json').version,\n requiredVersion: '^' + require('styled-jsx/package.json').version,\n },\n 'styled-jsx/css': {\n singleton: true,\n import: undefined,\n version: require('styled-jsx/package.json').version,\n requiredVersion: '^' + require('styled-jsx/package.json').version,\n },\n};\n\n/**\n * Defines a default share scope for the browser environment.\n * This function takes the DEFAULT_SHARE_SCOPE and sets eager to undefined and import to undefined for all entries.\n * For 'react', 'react-dom', 'next/router', and 'next/link', it sets eager to true.\n * The module hoisting system relocates these modules into the right runtime and out of the remote.\n *\n * @type {SharedObject}\n * @returns {SharedObject} - The modified share scope for the browser environment.\n */\n\nexport const DEFAULT_SHARE_SCOPE_BROWSER: moduleFederationPlugin.SharedObject =\n Object.entries(DEFAULT_SHARE_SCOPE).reduce((acc, item) => {\n const [key, value] = item as [string, moduleFederationPlugin.SharedConfig];\n\n // Set eager and import to undefined for all entries, except for the ones specified above\n acc[key] = { ...value, import: undefined };\n\n return acc;\n }, {} as moduleFederationPlugin.SharedObject);\n\n/**\n * Checks if the remote value is an internal or promise delegate module reference.\n *\n * @param {string} value - The remote value to check.\n * @returns {boolean} - True if the value is an internal or promise delegate module reference, false otherwise.\n */\nconst isInternalOrPromise = (value: string): boolean =>\n ['internal ', 'promise '].some((prefix) => value.startsWith(prefix));\n\n/**\n * Parses the remotes object and checks if they are using a custom promise template or not.\n * If it's a custom promise template, the remote syntax is parsed to get the module name and version number.\n * If the remote value is using the standard remote syntax, a delegated module is created.\n *\n * @param {Record<string, any>} remotes - The remotes object to be parsed.\n * @returns {Record<string, string>} - The parsed remotes object with either the original value,\n * the value for internal or promise delegate module reference, or the created delegated module.\n */\nexport const parseRemotes = (\n remotes: Record<string, any>,\n): Record<string, string> => {\n return Object.entries(remotes).reduce(\n (acc, [key, value]) => {\n if (isInternalOrPromise(value)) {\n // If the value is an internal or promise delegate module reference, keep the original value\n return { ...acc, [key]: value };\n }\n\n return { ...acc, [key]: value };\n },\n {} as Record<string, string>,\n );\n};\n/**\n * Checks if the remote value is an internal delegate module reference.\n * An internal delegate module reference starts with the string 'internal '.\n *\n * @param {string} value - The remote value to check.\n * @returns {boolean} - Returns true if the value is an internal delegate module reference, otherwise returns false.\n */\nconst isInternalDelegate = (value: string): boolean => {\n return value.startsWith('internal ');\n};\n/**\n * Extracts the delegate modules from the provided remotes object.\n * This function iterates over the remotes object and checks if each remote value is an internal delegate module reference.\n * If it is, the function adds it to the returned object.\n *\n * @param {Record<string, any>} remotes - The remotes object containing delegate module references.\n * @returns {Record<string, string>} - An object containing only the delegate modules from the remotes object.\n */\nexport const getDelegates = (\n remotes: Record<string, any>,\n): Record<string, string> =>\n Object.entries(remotes).reduce(\n (acc, [key, value]) =>\n isInternalDelegate(value) ? { ...acc, [key]: value } : acc,\n {},\n );\n\n/**\n * Takes an error object and formats it into a displayable string.\n * If the error object contains a stack trace, it is appended to the error message.\n *\n * @param {Error} error - The error object to be formatted.\n * @returns {string} - The formatted error message string. If a stack trace is present in the error object, it is appended to the error message.\n */\nconst formatError = (error: Error): string => {\n let { message } = error;\n if (error.stack) {\n message += `\\n${error.stack}`;\n }\n return message;\n};\n\n/**\n * Transforms an array of Error objects into a single string. Each error message is formatted using the 'formatError' function.\n * The resulting error messages are then joined together, separated by newline characters.\n *\n * @param {Error[]} err - An array of Error objects that need to be formatted and combined.\n * @returns {string} - A single string containing all the formatted error messages, separated by newline characters.\n */\nexport const toDisplayErrors = (err: Error[]): string => {\n return err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