@module-federation/dts-plugin 0.0.0-perf-devtools-20260107043700 → 0.0.0-perf-website-code-usage-20260914033703
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.
- package/dist/Action-CzhPMw2i.js +153 -0
- package/dist/Broker-C-uWF8l5.js +802 -0
- package/dist/CHANGELOG.md +297 -6
- package/dist/DtsWorker-SBLpkK-D.d.ts +178 -0
- package/dist/constant-C0QI9ddQ.d.ts +42 -0
- package/dist/consumeTypes-DhrUgkUW.js +241 -0
- package/dist/core.d.ts +3 -68
- package/dist/core.js +26 -2380
- package/dist/dynamic-remote-type-hints-plugin.d.ts +819 -3
- package/dist/dynamic-remote-type-hints-plugin.js +65 -187
- package/dist/esm/Action-DNNg2YDh.mjs +47 -0
- package/dist/esm/Broker-BfFUcTHm.mjs +738 -0
- package/dist/esm/consumeTypes-WKYNaS9i.mjs +208 -0
- package/dist/esm/core.mjs +5 -0
- package/dist/esm/dynamic-remote-type-hints-plugin.mjs +73 -0
- package/dist/esm/expose-rpc-B0rqtOKP.mjs +1593 -0
- package/dist/esm/fork-dev-worker.mjs +113 -0
- package/dist/esm/fork-generate-dts.mjs +14 -0
- package/dist/esm/index.mjs +509 -0
- package/dist/esm/start-broker.mjs +22 -0
- package/dist/esm/utils-CkPvDGOy.mjs +13 -0
- package/dist/expose-rpc-jaGpsAVL.js +1701 -0
- package/dist/fork-dev-worker.d.ts +10 -9
- package/dist/fork-dev-worker.js +110 -2869
- package/dist/fork-generate-dts.d.ts +4 -8
- package/dist/fork-generate-dts.js +11 -2040
- package/dist/iife/launch-web-client.iife.js +117 -0
- package/dist/index.d.ts +46 -50
- package/dist/index.js +493 -2978
- package/dist/start-broker.d.ts +41 -39
- package/dist/start-broker.js +17 -952
- package/dist/utils-7KqCZHbb.js +19 -0
- package/package.json +50 -30
- package/dist/DTSManager-b15Gfat3.d.ts +0 -53
- package/dist/DTSManagerOptions-QVchWb0x.d.ts +0 -32
- package/dist/DtsWorker-BrHsGz8C.d.ts +0 -56
- package/dist/core.d.mts +0 -68
- package/dist/dynamic-remote-type-hints-plugin.d.mts +0 -5
- package/dist/esm/chunk-647HGGGS.js +0 -241
- package/dist/esm/chunk-G65LOFTY.js +0 -24
- package/dist/esm/chunk-N7GTIQUA.js +0 -282
- package/dist/esm/chunk-RWXNVNFM.js +0 -1579
- package/dist/esm/chunk-WWV5RWOP.js +0 -902
- package/dist/esm/core.js +0 -44
- package/dist/esm/dynamic-remote-type-hints-plugin.js +0 -73
- package/dist/esm/fork-dev-worker.js +0 -145
- package/dist/esm/fork-generate-dts.js +0 -27
- package/dist/esm/index.js +0 -644
- package/dist/esm/start-broker.js +0 -36
- package/dist/fork-dev-worker.d.mts +0 -15
- package/dist/fork-generate-dts.d.mts +0 -10
- package/dist/iife/launch-web-client.js +0 -152
- package/dist/index.d.mts +0 -56
- package/dist/package.json +0 -87
- package/dist/start-broker.d.mts +0 -42
- package/dist/utils-DxGrqb9N.d.ts +0 -15
package/dist/CHANGELOG.md
CHANGED
|
@@ -1,13 +1,305 @@
|
|
|
1
1
|
# @module-federation/dts-plugin
|
|
2
2
|
|
|
3
|
-
## 0.0.0-perf-
|
|
3
|
+
## 0.0.0-perf-website-code-usage-20260914033703
|
|
4
4
|
|
|
5
5
|
### Patch Changes
|
|
6
6
|
|
|
7
|
-
-
|
|
8
|
-
- @module-federation/
|
|
9
|
-
- @module-federation/
|
|
10
|
-
- @module-federation/
|
|
7
|
+
- 796d6ad: Update ws to 8.21.3 to address CVE-2026-62389.
|
|
8
|
+
- @module-federation/sdk@0.0.0-perf-website-code-usage-20260914033703
|
|
9
|
+
- @module-federation/managers@0.0.0-perf-website-code-usage-20260914033703
|
|
10
|
+
- @module-federation/third-party-dts-extractor@0.0.0-perf-website-code-usage-20260914033703
|
|
11
|
+
- @module-federation/error-codes@0.0.0-perf-website-code-usage-20260914033703
|
|
12
|
+
|
|
13
|
+
## 2.9.0
|
|
14
|
+
|
|
15
|
+
### Patch Changes
|
|
16
|
+
|
|
17
|
+
- @module-federation/sdk@2.9.0
|
|
18
|
+
- @module-federation/managers@2.9.0
|
|
19
|
+
- @module-federation/third-party-dts-extractor@2.9.0
|
|
20
|
+
- @module-federation/error-codes@2.9.0
|
|
21
|
+
|
|
22
|
+
## 2.8.2
|
|
23
|
+
|
|
24
|
+
### Patch Changes
|
|
25
|
+
|
|
26
|
+
- @module-federation/sdk@2.8.2
|
|
27
|
+
- @module-federation/managers@2.8.2
|
|
28
|
+
- @module-federation/third-party-dts-extractor@2.8.2
|
|
29
|
+
- @module-federation/error-codes@2.8.2
|
|
30
|
+
|
|
31
|
+
## 2.8.1
|
|
32
|
+
|
|
33
|
+
### Patch Changes
|
|
34
|
+
|
|
35
|
+
- 641a0b6: chore(dts-plugin): upgrade adm-zip to 0.6.0 to prevent crafted remote type archives from exhausting process memory during extraction.
|
|
36
|
+
- Updated dependencies [d901e2c]
|
|
37
|
+
- @module-federation/sdk@2.8.1
|
|
38
|
+
- @module-federation/managers@2.8.1
|
|
39
|
+
- @module-federation/third-party-dts-extractor@2.8.1
|
|
40
|
+
- @module-federation/error-codes@2.8.1
|
|
41
|
+
|
|
42
|
+
## 2.8.0
|
|
43
|
+
|
|
44
|
+
### Minor Changes
|
|
45
|
+
|
|
46
|
+
- 681e5d2: feat(dts-plugin): support ts 7 for federated type generation while keeping existing ts versions supported
|
|
47
|
+
|
|
48
|
+
### Patch Changes
|
|
49
|
+
|
|
50
|
+
- 6ee67dc: Reduce installed and bundled size by replacing general-purpose cache, path, version, package lookup, scheduling, fetch, and error fallback dependencies with focused built-in utilities.
|
|
51
|
+
- Updated dependencies [ea490ae]
|
|
52
|
+
- Updated dependencies [6ee67dc]
|
|
53
|
+
- @module-federation/sdk@2.8.0
|
|
54
|
+
- @module-federation/managers@2.8.0
|
|
55
|
+
- @module-federation/third-party-dts-extractor@2.8.0
|
|
56
|
+
- @module-federation/error-codes@2.8.0
|
|
57
|
+
|
|
58
|
+
## 2.7.0
|
|
59
|
+
|
|
60
|
+
### Patch Changes
|
|
61
|
+
|
|
62
|
+
- a7351f3: chore(dts-plugin): drop `ansi-colors` dependency in favor of inline ANSI escape for the single red error message.
|
|
63
|
+
- Updated dependencies [dcc640b]
|
|
64
|
+
- Updated dependencies [2add9ef]
|
|
65
|
+
- Updated dependencies [9958086]
|
|
66
|
+
- Updated dependencies [a5f123a]
|
|
67
|
+
- Updated dependencies [8ec950c]
|
|
68
|
+
- @module-federation/sdk@2.7.0
|
|
69
|
+
- @module-federation/third-party-dts-extractor@2.7.0
|
|
70
|
+
- @module-federation/managers@2.7.0
|
|
71
|
+
- @module-federation/error-codes@2.7.0
|
|
72
|
+
|
|
73
|
+
## 2.6.0
|
|
74
|
+
|
|
75
|
+
### Patch Changes
|
|
76
|
+
|
|
77
|
+
- 2a7f724: Fix dts-plugin expose resolution for extensionless multi-dot paths like `foo.generated` so they correctly infer supported source files such as `.ts`, `.tsx`, `.vue`, `.js`, and `.jsx`, while preserving explicit extensions and directory `index` fallback behavior.
|
|
78
|
+
- @module-federation/sdk@2.6.0
|
|
79
|
+
- @module-federation/managers@2.6.0
|
|
80
|
+
- @module-federation/third-party-dts-extractor@2.6.0
|
|
81
|
+
- @module-federation/error-codes@2.6.0
|
|
82
|
+
|
|
83
|
+
## 2.5.1
|
|
84
|
+
|
|
85
|
+
### Patch Changes
|
|
86
|
+
|
|
87
|
+
- b79ba22: Update the dts plugin websocket dependency to a version that includes the CVE-2026-45736 fix.
|
|
88
|
+
- b553153: Fix `__dirname is not defined` ReferenceError when `@module-federation/dts-plugin` is consumed as ESM. `DevWorker`, `DevPlugin`, and `createBroker` now derive `__dirname` from `import.meta.url` (matching the existing `DtsWorker` shim) so the ESM build no longer emits bare `__dirname`.
|
|
89
|
+
- b9b3b8c: Fix Windows manifest type URL resolution in dts-plugin consumeTypes and allow the default IP family option to auto-select with `0`.
|
|
90
|
+
- Updated dependencies [b9b3b8c]
|
|
91
|
+
- @module-federation/sdk@2.5.1
|
|
92
|
+
- @module-federation/managers@2.5.1
|
|
93
|
+
- @module-federation/third-party-dts-extractor@2.5.1
|
|
94
|
+
- @module-federation/error-codes@2.5.1
|
|
95
|
+
|
|
96
|
+
## 2.5.0
|
|
97
|
+
|
|
98
|
+
### Patch Changes
|
|
99
|
+
|
|
100
|
+
- 13dce52: fix(dts-plugin): read manifest metadata when consuming DTS files from manifest remotes.
|
|
101
|
+
- Updated dependencies [5d4095d]
|
|
102
|
+
- Updated dependencies [0716c11]
|
|
103
|
+
- Updated dependencies [41281f4]
|
|
104
|
+
- @module-federation/sdk@2.5.0
|
|
105
|
+
- @module-federation/error-codes@2.5.0
|
|
106
|
+
- @module-federation/managers@2.5.0
|
|
107
|
+
- @module-federation/third-party-dts-extractor@2.5.0
|
|
108
|
+
|
|
109
|
+
## 2.4.0
|
|
110
|
+
|
|
111
|
+
### Patch Changes
|
|
112
|
+
|
|
113
|
+
- Updated dependencies [5eba770]
|
|
114
|
+
- Updated dependencies [13b1e84]
|
|
115
|
+
- @module-federation/sdk@2.4.0
|
|
116
|
+
- @module-federation/managers@2.4.0
|
|
117
|
+
- @module-federation/third-party-dts-extractor@2.4.0
|
|
118
|
+
- @module-federation/error-codes@2.4.0
|
|
119
|
+
|
|
120
|
+
## 2.3.3
|
|
121
|
+
|
|
122
|
+
### Patch Changes
|
|
123
|
+
|
|
124
|
+
- 6d33275: fix: override inherited declarationDir in tsconfig and add test for declarationDir handling
|
|
125
|
+
- @module-federation/sdk@2.3.3
|
|
126
|
+
- @module-federation/managers@2.3.3
|
|
127
|
+
- @module-federation/third-party-dts-extractor@2.3.3
|
|
128
|
+
- @module-federation/error-codes@2.3.3
|
|
129
|
+
|
|
130
|
+
## 2.3.2
|
|
131
|
+
|
|
132
|
+
### Patch Changes
|
|
133
|
+
|
|
134
|
+
- 1c02710: chore: lock deps
|
|
135
|
+
- @module-federation/sdk@2.3.2
|
|
136
|
+
- @module-federation/managers@2.3.2
|
|
137
|
+
- @module-federation/third-party-dts-extractor@2.3.2
|
|
138
|
+
- @module-federation/error-codes@2.3.2
|
|
139
|
+
|
|
140
|
+
## 2.3.1
|
|
141
|
+
|
|
142
|
+
### Patch Changes
|
|
143
|
+
|
|
144
|
+
- @module-federation/sdk@2.3.1
|
|
145
|
+
- @module-federation/managers@2.3.1
|
|
146
|
+
- @module-federation/third-party-dts-extractor@2.3.1
|
|
147
|
+
- @module-federation/error-codes@2.3.1
|
|
148
|
+
|
|
149
|
+
## 2.3.0
|
|
150
|
+
|
|
151
|
+
### Minor Changes
|
|
152
|
+
|
|
153
|
+
- eb26065: feat(dts-plugin): add `dts.generateTypes.afterGenerate` callback
|
|
154
|
+
|
|
155
|
+
Allows users to hook into the type generation lifecycle from
|
|
156
|
+
`dts.generateTypes`. The callback runs after each successful type generation in
|
|
157
|
+
both dev and prod modes, making it possible to do follow-up work with the
|
|
158
|
+
generated files.
|
|
159
|
+
|
|
160
|
+
```ts
|
|
161
|
+
new ModuleFederationPlugin({
|
|
162
|
+
dts: {
|
|
163
|
+
generateTypes: {
|
|
164
|
+
afterGenerate: async ({ zipTypesPath, apiTypesPath }) => {
|
|
165
|
+
await analyzeTypesAndGenerateJson({
|
|
166
|
+
zipTypesPath,
|
|
167
|
+
apiTypesPath,
|
|
168
|
+
});
|
|
169
|
+
},
|
|
170
|
+
},
|
|
171
|
+
},
|
|
172
|
+
});
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
### Patch Changes
|
|
176
|
+
|
|
177
|
+
- Updated dependencies [eb26065]
|
|
178
|
+
- Updated dependencies [f1d79b2]
|
|
179
|
+
- Updated dependencies [8f2ec9b]
|
|
180
|
+
- @module-federation/sdk@2.3.0
|
|
181
|
+
- @module-federation/error-codes@2.3.0
|
|
182
|
+
- @module-federation/managers@2.3.0
|
|
183
|
+
- @module-federation/third-party-dts-extractor@2.3.0
|
|
184
|
+
|
|
185
|
+
## 2.2.3
|
|
186
|
+
|
|
187
|
+
### Patch Changes
|
|
188
|
+
|
|
189
|
+
- @module-federation/sdk@2.2.3
|
|
190
|
+
- @module-federation/managers@2.2.3
|
|
191
|
+
- @module-federation/third-party-dts-extractor@2.2.3
|
|
192
|
+
- @module-federation/error-codes@2.2.3
|
|
193
|
+
|
|
194
|
+
## 2.2.2
|
|
195
|
+
|
|
196
|
+
### Patch Changes
|
|
197
|
+
|
|
198
|
+
- 95282ac: Infer root dir from "references" property for solution-style tsconfig
|
|
199
|
+
- @module-federation/sdk@2.2.2
|
|
200
|
+
- @module-federation/managers@2.2.2
|
|
201
|
+
- @module-federation/third-party-dts-extractor@2.2.2
|
|
202
|
+
- @module-federation/error-codes@2.2.2
|
|
203
|
+
|
|
204
|
+
## 2.2.1
|
|
205
|
+
|
|
206
|
+
### Patch Changes
|
|
207
|
+
|
|
208
|
+
- @module-federation/sdk@2.2.1
|
|
209
|
+
- @module-federation/managers@2.2.1
|
|
210
|
+
- @module-federation/third-party-dts-extractor@2.2.1
|
|
211
|
+
- @module-federation/error-codes@2.2.1
|
|
212
|
+
|
|
213
|
+
## 2.2.0
|
|
214
|
+
|
|
215
|
+
### Minor Changes
|
|
216
|
+
|
|
217
|
+
- 12240bb: feat(dts-plugin): support custom outputDir for DTS type emission
|
|
218
|
+
|
|
219
|
+
Expose the `outputDir` option in `DtsRemoteOptions` so users can configure where `@mf-types.zip` and `@mf-types.d.ts` are emitted. Fix `GenerateTypesPlugin` to use `path.relative()` for correct asset placement in subdirectories.
|
|
220
|
+
|
|
221
|
+
### Patch Changes
|
|
222
|
+
|
|
223
|
+
- 079aecd: fix(dts-plugin): use default import for fs-extra to fix ESM compatibility
|
|
224
|
+
- Updated dependencies [c856ec1]
|
|
225
|
+
- Updated dependencies [12240bb]
|
|
226
|
+
- Updated dependencies [e5dd6ef]
|
|
227
|
+
- @module-federation/sdk@2.2.0
|
|
228
|
+
- @module-federation/managers@2.2.0
|
|
229
|
+
- @module-federation/third-party-dts-extractor@2.2.0
|
|
230
|
+
- @module-federation/error-codes@2.2.0
|
|
231
|
+
|
|
232
|
+
## 2.1.0
|
|
233
|
+
|
|
234
|
+
### Patch Changes
|
|
235
|
+
|
|
236
|
+
- 6235711: Replace the Koa-based dev types server with a native Node HTTP server to reduce dependencies and keep type generation behavior unchanged.
|
|
237
|
+
- 5954fe7: Fix fork-dev-worker crashes in dts-plugin when consumeTypes is disabled
|
|
238
|
+
- Updated dependencies [918294f]
|
|
239
|
+
- Updated dependencies [24bf84d]
|
|
240
|
+
- Updated dependencies [918294f]
|
|
241
|
+
- Updated dependencies [918294f]
|
|
242
|
+
- @module-federation/error-codes@2.1.0
|
|
243
|
+
- @module-federation/managers@2.1.0
|
|
244
|
+
- @module-federation/sdk@2.1.0
|
|
245
|
+
- @module-federation/third-party-dts-extractor@2.1.0
|
|
246
|
+
|
|
247
|
+
## 2.0.1
|
|
248
|
+
|
|
249
|
+
### Patch Changes
|
|
250
|
+
|
|
251
|
+
- 28a2db4: Fix Windows TypeScript type generation by invoking the compiler with
|
|
252
|
+
`execFile` and properly quoted project paths.
|
|
253
|
+
- @module-federation/sdk@2.0.1
|
|
254
|
+
- @module-federation/managers@2.0.1
|
|
255
|
+
- @module-federation/third-party-dts-extractor@2.0.1
|
|
256
|
+
- @module-federation/error-codes@2.0.1
|
|
257
|
+
|
|
258
|
+
## 2.0.0
|
|
259
|
+
|
|
260
|
+
### Patch Changes
|
|
261
|
+
|
|
262
|
+
- @module-federation/sdk@2.0.0
|
|
263
|
+
- @module-federation/managers@2.0.0
|
|
264
|
+
- @module-federation/third-party-dts-extractor@2.0.0
|
|
265
|
+
- @module-federation/error-codes@2.0.0
|
|
266
|
+
|
|
267
|
+
## 0.24.1
|
|
268
|
+
|
|
269
|
+
### Patch Changes
|
|
270
|
+
|
|
271
|
+
- @module-federation/sdk@0.24.1
|
|
272
|
+
- @module-federation/managers@0.24.1
|
|
273
|
+
- @module-federation/third-party-dts-extractor@0.24.1
|
|
274
|
+
- @module-federation/error-codes@0.24.1
|
|
275
|
+
|
|
276
|
+
## 0.24.0
|
|
277
|
+
|
|
278
|
+
### Patch Changes
|
|
279
|
+
|
|
280
|
+
- @module-federation/sdk@0.24.0
|
|
281
|
+
- @module-federation/managers@0.24.0
|
|
282
|
+
- @module-federation/third-party-dts-extractor@0.24.0
|
|
283
|
+
- @module-federation/error-codes@0.24.0
|
|
284
|
+
|
|
285
|
+
## 0.23.0
|
|
286
|
+
|
|
287
|
+
### Patch Changes
|
|
288
|
+
|
|
289
|
+
- 9373882: fix(dts-plugin): add default mf config value
|
|
290
|
+
- @module-federation/sdk@0.23.0
|
|
291
|
+
- @module-federation/managers@0.23.0
|
|
292
|
+
- @module-federation/third-party-dts-extractor@0.23.0
|
|
293
|
+
- @module-federation/error-codes@0.23.0
|
|
294
|
+
|
|
295
|
+
## 0.22.1
|
|
296
|
+
|
|
297
|
+
### Patch Changes
|
|
298
|
+
|
|
299
|
+
- @module-federation/sdk@0.22.1
|
|
300
|
+
- @module-federation/managers@0.22.1
|
|
301
|
+
- @module-federation/third-party-dts-extractor@0.22.1
|
|
302
|
+
- @module-federation/error-codes@0.22.1
|
|
11
303
|
|
|
12
304
|
## 0.22.0
|
|
13
305
|
|
|
@@ -185,7 +477,6 @@
|
|
|
185
477
|
### Patch Changes
|
|
186
478
|
|
|
187
479
|
- a7cf276: chore: upgrade NX to 21.2.3, Storybook to 9.0.9, and TypeScript to 5.8.3
|
|
188
|
-
|
|
189
480
|
- Upgraded NX from 21.0.3 to 21.2.3 with workspace configuration updates
|
|
190
481
|
- Migrated Storybook from 8.3.5 to 9.0.9 with updated configurations and automigrations
|
|
191
482
|
- Upgraded TypeScript from 5.7.3 to 5.8.3 with compatibility fixes
|
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
import { moduleFederationPlugin } from "@module-federation/sdk";
|
|
2
|
+
import { ChildProcess } from "child_process";
|
|
3
|
+
|
|
4
|
+
//#region \0rolldown/runtime.js
|
|
5
|
+
//#endregion
|
|
6
|
+
//#region src/core/interfaces/RemoteOptions.d.ts
|
|
7
|
+
interface RemoteOptions extends moduleFederationPlugin.DtsRemoteOptions {
|
|
8
|
+
moduleFederationConfig: moduleFederationPlugin.ModuleFederationPluginOptions;
|
|
9
|
+
context?: string;
|
|
10
|
+
implementation?: string;
|
|
11
|
+
hostRemoteTypesFolder?: string;
|
|
12
|
+
outputDir?: string;
|
|
13
|
+
}
|
|
14
|
+
//#endregion
|
|
15
|
+
//#region src/core/interfaces/TsConfigJson.d.ts
|
|
16
|
+
type TsConfigCompilerOptions = Record<string, any> & {
|
|
17
|
+
rootDir?: string;
|
|
18
|
+
outDir?: string;
|
|
19
|
+
declarationDir?: string;
|
|
20
|
+
tsBuildInfoFile?: string;
|
|
21
|
+
incremental?: boolean;
|
|
22
|
+
paths?: Record<string, string[]>;
|
|
23
|
+
baseUrl?: string;
|
|
24
|
+
};
|
|
25
|
+
interface TsConfigJson {
|
|
26
|
+
extends?: string;
|
|
27
|
+
compilerOptions?: TsConfigCompilerOptions;
|
|
28
|
+
exclude?: string[];
|
|
29
|
+
include?: string[];
|
|
30
|
+
files?: string[];
|
|
31
|
+
references?: Array<{
|
|
32
|
+
path: string;
|
|
33
|
+
}>;
|
|
34
|
+
[key: string]: any;
|
|
35
|
+
}
|
|
36
|
+
//#endregion
|
|
37
|
+
//#region src/core/configurations/remotePlugin.d.ts
|
|
38
|
+
declare const retrieveRemoteConfig: (options: RemoteOptions) => {
|
|
39
|
+
tsConfig: TsConfigJson;
|
|
40
|
+
mapComponentsToExpose: any;
|
|
41
|
+
remoteOptions: Required<RemoteOptions>;
|
|
42
|
+
};
|
|
43
|
+
//#endregion
|
|
44
|
+
//#region src/core/interfaces/HostOptions.d.ts
|
|
45
|
+
interface HostOptions extends moduleFederationPlugin.DtsHostOptions {
|
|
46
|
+
moduleFederationConfig: moduleFederationPlugin.ModuleFederationPluginOptions;
|
|
47
|
+
context?: string;
|
|
48
|
+
implementation?: string;
|
|
49
|
+
runtimePkgs?: string[];
|
|
50
|
+
}
|
|
51
|
+
interface RemoteInfo {
|
|
52
|
+
name: string;
|
|
53
|
+
url: string;
|
|
54
|
+
alias: string;
|
|
55
|
+
zipUrl?: string;
|
|
56
|
+
apiTypeUrl?: string;
|
|
57
|
+
}
|
|
58
|
+
//#endregion
|
|
59
|
+
//#region src/core/interfaces/DTSManagerOptions.d.ts
|
|
60
|
+
interface DTSManagerOptions {
|
|
61
|
+
remote?: RemoteOptions;
|
|
62
|
+
host?: HostOptions;
|
|
63
|
+
extraOptions?: Record<string, any>;
|
|
64
|
+
displayErrorInTerminal?: moduleFederationPlugin.PluginDtsOptions['displayErrorInTerminal'];
|
|
65
|
+
}
|
|
66
|
+
//#endregion
|
|
67
|
+
//#region src/server/constant.d.ts
|
|
68
|
+
declare const enum UpdateMode {
|
|
69
|
+
POSITIVE = "POSITIVE",
|
|
70
|
+
PASSIVE = "PASSIVE"
|
|
71
|
+
}
|
|
72
|
+
//#endregion
|
|
73
|
+
//#region src/core/lib/DTSManager.d.ts
|
|
74
|
+
interface UpdateTypesOptions {
|
|
75
|
+
updateMode: UpdateMode;
|
|
76
|
+
remoteName?: string;
|
|
77
|
+
remoteTarPath?: string;
|
|
78
|
+
remoteInfo?: RemoteInfo;
|
|
79
|
+
once?: boolean;
|
|
80
|
+
}
|
|
81
|
+
declare class DTSManager {
|
|
82
|
+
options: DTSManagerOptions;
|
|
83
|
+
runtimePkgs: string[];
|
|
84
|
+
remoteAliasMap: Record<string, Required<RemoteInfo>>;
|
|
85
|
+
loadedRemoteAPIAlias: Set<string>;
|
|
86
|
+
extraOptions: Record<string, any>;
|
|
87
|
+
updatedRemoteInfos: Record<string, Required<RemoteInfo>>;
|
|
88
|
+
constructor(options: DTSManagerOptions);
|
|
89
|
+
generateAPITypes(mapComponentsToExpose: Record<string, string>): string;
|
|
90
|
+
extractRemoteTypes(options: ReturnType<typeof retrieveRemoteConfig>): Promise<void>;
|
|
91
|
+
generateTypes(): Promise<void>;
|
|
92
|
+
requestRemoteManifest(remoteInfo: RemoteInfo, hostOptions: Required<HostOptions>): Promise<Required<RemoteInfo>>;
|
|
93
|
+
consumeTargetRemotes(hostOptions: Required<HostOptions>, remoteInfo: Required<RemoteInfo>): Promise<[string, string] | undefined>;
|
|
94
|
+
downloadAPITypes(remoteInfo: Required<RemoteInfo>, destinationPath: string, hostOptions: Required<HostOptions>): Promise<boolean | undefined>;
|
|
95
|
+
consumeAPITypes(hostOptions: Required<HostOptions>): void;
|
|
96
|
+
consumeArchiveTypes(options: HostOptions): Promise<{
|
|
97
|
+
hostOptions: Required<HostOptions>;
|
|
98
|
+
downloadPromisesResult: PromiseSettledResult<[string, string] | undefined>[];
|
|
99
|
+
}>;
|
|
100
|
+
consumeTypes(): Promise<void>;
|
|
101
|
+
updateTypes(options: UpdateTypesOptions): Promise<void>;
|
|
102
|
+
}
|
|
103
|
+
//#endregion
|
|
104
|
+
//#region src/core/rpc/expose-rpc.d.ts
|
|
105
|
+
declare function exposeRpc(fn: (...args: any[]) => any): void;
|
|
106
|
+
//#endregion
|
|
107
|
+
//#region src/core/rpc/types.d.ts
|
|
108
|
+
declare enum RpcGMCallTypes {
|
|
109
|
+
CALL = "mf_call",
|
|
110
|
+
RESOLVE = "mf_resolve",
|
|
111
|
+
REJECT = "mf_reject",
|
|
112
|
+
EXIT = "mf_exit"
|
|
113
|
+
}
|
|
114
|
+
interface RpcCallMessage {
|
|
115
|
+
type: RpcGMCallTypes.CALL;
|
|
116
|
+
id: string;
|
|
117
|
+
args: unknown[];
|
|
118
|
+
}
|
|
119
|
+
interface RpcResolveMessage {
|
|
120
|
+
type: RpcGMCallTypes.RESOLVE;
|
|
121
|
+
id: string;
|
|
122
|
+
value: unknown;
|
|
123
|
+
}
|
|
124
|
+
interface RpcRejectMessage {
|
|
125
|
+
type: RpcGMCallTypes.REJECT;
|
|
126
|
+
id: string;
|
|
127
|
+
error: unknown;
|
|
128
|
+
}
|
|
129
|
+
interface RpcExitMessage {
|
|
130
|
+
type: RpcGMCallTypes.EXIT;
|
|
131
|
+
id: string;
|
|
132
|
+
}
|
|
133
|
+
type RpcMessage = RpcCallMessage | RpcResolveMessage | RpcRejectMessage | RpcExitMessage;
|
|
134
|
+
type RpcMethod = (...args: any[]) => any;
|
|
135
|
+
type RpcRemoteMethod<T extends RpcMethod> = T extends ((...args: infer A) => infer R) ? R extends Promise<any> ? (...args: A) => R : (...args: A) => Promise<R> : (...args: unknown[]) => Promise<unknown>;
|
|
136
|
+
//#endregion
|
|
137
|
+
//#region src/core/rpc/wrap-rpc.d.ts
|
|
138
|
+
interface WrapRpcOptions {
|
|
139
|
+
id: string;
|
|
140
|
+
once?: boolean;
|
|
141
|
+
}
|
|
142
|
+
declare function wrapRpc<T extends (...args: any[]) => any>(childProcess: ChildProcess, options: WrapRpcOptions): RpcRemoteMethod<T>;
|
|
143
|
+
//#endregion
|
|
144
|
+
//#region src/core/rpc/rpc-worker.d.ts
|
|
145
|
+
interface RpcWorkerBase {
|
|
146
|
+
connect(...args: unknown[]): any;
|
|
147
|
+
terminate(): void;
|
|
148
|
+
readonly connected: boolean;
|
|
149
|
+
readonly id: string;
|
|
150
|
+
readonly process: ChildProcess | undefined;
|
|
151
|
+
}
|
|
152
|
+
type RpcWorker<T extends RpcMethod = RpcMethod> = RpcWorkerBase & RpcRemoteMethod<T>;
|
|
153
|
+
declare function createRpcWorker<T extends RpcMethod>(modulePath: string, data: unknown, memoryLimit?: number, once?: boolean): RpcWorker<T>;
|
|
154
|
+
declare function getRpcWorkerData(): unknown;
|
|
155
|
+
//#endregion
|
|
156
|
+
//#region src/core/rpc/rpc-error.d.ts
|
|
157
|
+
declare class RpcExitError extends Error {
|
|
158
|
+
readonly code?: string | number | null | undefined;
|
|
159
|
+
readonly signal?: string | null | undefined;
|
|
160
|
+
constructor(message: string, code?: string | number | null | undefined, signal?: string | null | undefined);
|
|
161
|
+
}
|
|
162
|
+
declare namespace index_d_exports {
|
|
163
|
+
export { RpcCallMessage, RpcExitError, RpcGMCallTypes, RpcMessage, RpcMethod, RpcRejectMessage, RpcRemoteMethod, RpcResolveMessage, RpcWorker, createRpcWorker, exposeRpc, getRpcWorkerData, wrapRpc };
|
|
164
|
+
}
|
|
165
|
+
//#endregion
|
|
166
|
+
//#region src/core/lib/DtsWorker.d.ts
|
|
167
|
+
type DtsWorkerOptions = DTSManagerOptions;
|
|
168
|
+
declare class DtsWorker {
|
|
169
|
+
rpcWorker: RpcWorker<RpcMethod>;
|
|
170
|
+
private _options;
|
|
171
|
+
private _res;
|
|
172
|
+
constructor(options: DtsWorkerOptions);
|
|
173
|
+
removeUnSerializationOptions(): void;
|
|
174
|
+
get controlledPromise(): ReturnType<DTSManager['generateTypes']>;
|
|
175
|
+
exit(): void;
|
|
176
|
+
}
|
|
177
|
+
//#endregion
|
|
178
|
+
export { DTSManagerOptions as a, retrieveRemoteConfig as c, DTSManager as i, TsConfigJson as l, DtsWorkerOptions as n, HostOptions as o, index_d_exports as r, RemoteInfo as s, DtsWorker as t, RemoteOptions as u };
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { a as DTSManagerOptions, i as DTSManager, l as TsConfigJson, o as HostOptions, s as RemoteInfo, u as RemoteOptions } from "./DtsWorker-SBLpkK-D.js";
|
|
2
|
+
import { moduleFederationPlugin } from "@module-federation/sdk";
|
|
3
|
+
|
|
4
|
+
//#region src/core/configurations/hostPlugin.d.ts
|
|
5
|
+
declare const retrieveHostConfig: (options: HostOptions) => {
|
|
6
|
+
hostOptions: Required<HostOptions>;
|
|
7
|
+
mapRemotesToDownload: Record<string, RemoteInfo>;
|
|
8
|
+
};
|
|
9
|
+
//#endregion
|
|
10
|
+
//#region src/core/lib/utils.d.ts
|
|
11
|
+
declare function getDTSManagerConstructor(implementation?: string): typeof DTSManager;
|
|
12
|
+
declare const validateOptions: (options: HostOptions) => void;
|
|
13
|
+
declare function retrieveTypesAssetsInfo(options: RemoteOptions): {
|
|
14
|
+
apiTypesPath: string;
|
|
15
|
+
zipTypesPath: string;
|
|
16
|
+
zipName: string;
|
|
17
|
+
apiFileName: string;
|
|
18
|
+
};
|
|
19
|
+
declare const isTSProject: (dtsOptions: moduleFederationPlugin.ModuleFederationPluginOptions["dts"], context?: string) => boolean;
|
|
20
|
+
//#endregion
|
|
21
|
+
//#region src/core/lib/typeScriptCompiler.d.ts
|
|
22
|
+
declare const retrieveMfTypesPath: (tsConfig: TsConfigJson, remoteOptions: Required<RemoteOptions>) => string;
|
|
23
|
+
declare const retrieveOriginalOutDir: (tsConfig: TsConfigJson, remoteOptions: Required<RemoteOptions>) => string;
|
|
24
|
+
//#endregion
|
|
25
|
+
//#region src/core/lib/archiveHandler.d.ts
|
|
26
|
+
declare const retrieveTypesZipPath: (mfTypesPath: string, remoteOptions: Required<RemoteOptions>) => string;
|
|
27
|
+
//#endregion
|
|
28
|
+
//#region src/core/lib/generateTypes.d.ts
|
|
29
|
+
declare function generateTypes(options: DTSManagerOptions): Promise<void>;
|
|
30
|
+
//#endregion
|
|
31
|
+
//#region src/core/lib/generateTypesInChildProcess.d.ts
|
|
32
|
+
declare function generateTypesInChildProcess(options: DTSManagerOptions): Promise<void>;
|
|
33
|
+
//#endregion
|
|
34
|
+
//#region src/core/lib/consumeTypes.d.ts
|
|
35
|
+
declare function consumeTypes(options: DTSManagerOptions): Promise<void>;
|
|
36
|
+
//#endregion
|
|
37
|
+
//#region src/core/constant.d.ts
|
|
38
|
+
declare const REMOTE_ALIAS_IDENTIFIER = "REMOTE_ALIAS_IDENTIFIER";
|
|
39
|
+
declare const REMOTE_API_TYPES_FILE_NAME = "apis.d.ts";
|
|
40
|
+
declare const HOST_API_TYPES_FILE_NAME = "index.d.ts";
|
|
41
|
+
//#endregion
|
|
42
|
+
export { generateTypesInChildProcess as a, retrieveMfTypesPath as c, isTSProject as d, retrieveTypesAssetsInfo as f, consumeTypes as i, retrieveOriginalOutDir as l, retrieveHostConfig as m, REMOTE_ALIAS_IDENTIFIER as n, generateTypes as o, validateOptions as p, REMOTE_API_TYPES_FILE_NAME as r, retrieveTypesZipPath as s, HOST_API_TYPES_FILE_NAME as t, getDTSManagerConstructor as u };
|