@module-federation/dts-plugin 2.4.0 → 2.5.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.
- package/dist/CHANGELOG.md +13 -0
- package/dist/{consumeTypes-DxGMNavh.js → consumeTypes-CFK17Cck.js} +1 -1
- package/dist/core.js +2 -2
- package/dist/dynamic-remote-type-hints-plugin.d.ts +146 -15
- package/dist/esm/{consumeTypes-DYgYpZMQ.mjs → consumeTypes-DCGF9bG3.mjs} +1 -1
- package/dist/esm/core.mjs +2 -2
- package/dist/esm/{expose-rpc-B-zm7DmJ.mjs → expose-rpc-BgxOTFXQ.mjs} +7 -5
- package/dist/esm/fork-dev-worker.mjs +2 -2
- package/dist/esm/fork-generate-dts.mjs +1 -1
- package/dist/esm/index.mjs +2 -2
- package/dist/{expose-rpc-CQq6zYK-.js → expose-rpc-mEaCWCcd.js} +7 -5
- package/dist/fork-dev-worker.js +2 -2
- package/dist/fork-generate-dts.js +1 -1
- package/dist/index.js +2 -2
- package/package.json +6 -6
package/dist/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
# @module-federation/dts-plugin
|
|
2
2
|
|
|
3
|
+
## 2.5.0
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 13dce52: fix(dts-plugin): read manifest metadata when consuming DTS files from manifest remotes.
|
|
8
|
+
- Updated dependencies [5d4095d]
|
|
9
|
+
- Updated dependencies [0716c11]
|
|
10
|
+
- Updated dependencies [41281f4]
|
|
11
|
+
- @module-federation/sdk@2.5.0
|
|
12
|
+
- @module-federation/error-codes@2.5.0
|
|
13
|
+
- @module-federation/managers@2.5.0
|
|
14
|
+
- @module-federation/third-party-dts-extractor@2.5.0
|
|
15
|
+
|
|
3
16
|
## 2.4.0
|
|
4
17
|
|
|
5
18
|
### Patch Changes
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const require_Action = require('./Action-CzhPMw2i.js');
|
|
2
|
-
const require_expose_rpc = require('./expose-rpc-
|
|
2
|
+
const require_expose_rpc = require('./expose-rpc-mEaCWCcd.js');
|
|
3
3
|
let path = require("path");
|
|
4
4
|
path = require_Action.__toESM(path);
|
|
5
5
|
let crypto = require("crypto");
|
package/dist/core.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
2
|
require('./Broker-DRFgFvXI.js');
|
|
3
|
-
const require_expose_rpc = require('./expose-rpc-
|
|
4
|
-
const require_consumeTypes = require('./consumeTypes-
|
|
3
|
+
const require_expose_rpc = require('./expose-rpc-mEaCWCcd.js');
|
|
4
|
+
const require_consumeTypes = require('./consumeTypes-CFK17Cck.js');
|
|
5
5
|
|
|
6
6
|
exports.DTSManager = require_expose_rpc.DTSManager;
|
|
7
7
|
exports.DtsWorker = require_consumeTypes.DtsWorker;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CreateScriptHookReturn, GlobalModuleInfo, Manifest, Module, ModuleInfo, RemoteEntryType, RemoteWithEntry, RemoteWithVersion, TreeShakingStatus } from "@module-federation/sdk";
|
|
1
|
+
import { CreateLinkHookReturnDom, CreateScriptHookReturn, GlobalModuleInfo, Manifest, Module, ModuleInfo, RemoteEntryType, RemoteWithEntry, RemoteWithVersion, TreeShakingStatus } from "@module-federation/sdk";
|
|
2
2
|
|
|
3
3
|
//#region ../runtime-core/dist/utils/hooks/syncHook.d.ts
|
|
4
4
|
//#region src/utils/hooks/syncHook.d.ts
|
|
@@ -24,7 +24,7 @@ declare class AsyncHook<T, ExternalEmitReturnType = CallbackReturnType$1> extend
|
|
|
24
24
|
//#endregion
|
|
25
25
|
//#region ../runtime-core/dist/utils/hooks/syncWaterfallHook.d.ts
|
|
26
26
|
//#region src/utils/hooks/syncWaterfallHook.d.ts
|
|
27
|
-
declare class SyncWaterfallHook<T extends Record<string, any>> extends SyncHook<[T], T> {
|
|
27
|
+
declare class SyncWaterfallHook<T extends Record<string, any>> extends SyncHook<[T], T | void> {
|
|
28
28
|
onerror: (errMsg: string | Error | unknown) => void;
|
|
29
29
|
constructor(type: string);
|
|
30
30
|
emit(data: T): T;
|
|
@@ -32,8 +32,8 @@ declare class SyncWaterfallHook<T extends Record<string, any>> extends SyncHook<
|
|
|
32
32
|
//#endregion
|
|
33
33
|
//#region ../runtime-core/dist/utils/hooks/asyncWaterfallHooks.d.ts
|
|
34
34
|
//#region src/utils/hooks/asyncWaterfallHooks.d.ts
|
|
35
|
-
type CallbackReturnType<T> = T | Promise<T>;
|
|
36
|
-
declare class AsyncWaterfallHook<T extends
|
|
35
|
+
type CallbackReturnType<T> = T | void | Promise<T | void>;
|
|
36
|
+
declare class AsyncWaterfallHook<T extends object> extends SyncHook<[T], CallbackReturnType<T>> {
|
|
37
37
|
onerror: (errMsg: string | Error | unknown) => void;
|
|
38
38
|
constructor(type: string);
|
|
39
39
|
emit(data: T): Promise<T>;
|
|
@@ -183,6 +183,30 @@ type PreloadOptions = Array<{
|
|
|
183
183
|
remote: Remote;
|
|
184
184
|
preloadConfig: PreloadConfig;
|
|
185
185
|
}>;
|
|
186
|
+
type ResourceLoadInitiator = 'loadRemote' | 'preloadRemote';
|
|
187
|
+
type ResourceLoadType = 'manifest' | 'remoteEntry' | 'js' | 'css';
|
|
188
|
+
interface ResourceLoadContext {
|
|
189
|
+
initiator: ResourceLoadInitiator;
|
|
190
|
+
id: string;
|
|
191
|
+
resourceType: ResourceLoadType;
|
|
192
|
+
url?: string;
|
|
193
|
+
}
|
|
194
|
+
type PreloadAssetStatus = 'success' | 'error' | 'timeout' | 'cached';
|
|
195
|
+
interface PreloadAssetResult {
|
|
196
|
+
url: string;
|
|
197
|
+
status: PreloadAssetStatus;
|
|
198
|
+
resourceType: ResourceLoadType;
|
|
199
|
+
initiator: ResourceLoadInitiator;
|
|
200
|
+
id: string;
|
|
201
|
+
error?: unknown;
|
|
202
|
+
}
|
|
203
|
+
interface PreloadRemoteResult {
|
|
204
|
+
remote: Remote;
|
|
205
|
+
remoteInfo: RemoteInfo;
|
|
206
|
+
preloadConfig: PreloadConfig;
|
|
207
|
+
id: string;
|
|
208
|
+
results: PreloadAssetResult[];
|
|
209
|
+
}
|
|
186
210
|
type EntryAssets = {
|
|
187
211
|
name: string;
|
|
188
212
|
url: string;
|
|
@@ -226,6 +250,15 @@ declare class RemoteHandler {
|
|
|
226
250
|
options: Options;
|
|
227
251
|
origin: ModuleFederation;
|
|
228
252
|
}>;
|
|
253
|
+
afterMatchRemote: AsyncHook<[{
|
|
254
|
+
id: string;
|
|
255
|
+
options: Options;
|
|
256
|
+
remote?: Remote;
|
|
257
|
+
expose?: string;
|
|
258
|
+
remoteInfo?: RemoteInfo;
|
|
259
|
+
error?: unknown;
|
|
260
|
+
origin: ModuleFederation;
|
|
261
|
+
}], void>;
|
|
229
262
|
onLoad: AsyncHook<[{
|
|
230
263
|
id: string;
|
|
231
264
|
expose: string;
|
|
@@ -236,6 +269,18 @@ declare class RemoteHandler {
|
|
|
236
269
|
exposeModule: any;
|
|
237
270
|
exposeModuleFactory: any;
|
|
238
271
|
moduleInstance: Module$1;
|
|
272
|
+
}], unknown>;
|
|
273
|
+
afterLoadRemote: AsyncHook<[{
|
|
274
|
+
id: string;
|
|
275
|
+
expose?: string;
|
|
276
|
+
remote?: RemoteInfo;
|
|
277
|
+
options?: {
|
|
278
|
+
loadFactory?: boolean;
|
|
279
|
+
from?: CallFrom;
|
|
280
|
+
};
|
|
281
|
+
error?: unknown;
|
|
282
|
+
recovered?: boolean;
|
|
283
|
+
origin: ModuleFederation;
|
|
239
284
|
}], void>;
|
|
240
285
|
handlePreloadModule: SyncHook<[{
|
|
241
286
|
id: string;
|
|
@@ -251,6 +296,8 @@ declare class RemoteHandler {
|
|
|
251
296
|
options?: any;
|
|
252
297
|
from: CallFrom;
|
|
253
298
|
lifecycle: "beforeRequest" | "beforeLoadShare" | "afterResolve" | "onLoad";
|
|
299
|
+
remote?: RemoteInfo;
|
|
300
|
+
expose?: string;
|
|
254
301
|
origin: ModuleFederation;
|
|
255
302
|
}], unknown>;
|
|
256
303
|
beforePreloadRemote: AsyncHook<[{
|
|
@@ -266,16 +313,19 @@ declare class RemoteHandler {
|
|
|
266
313
|
remoteSnapshot: ModuleInfo;
|
|
267
314
|
globalSnapshot: GlobalModuleInfo;
|
|
268
315
|
}], Promise<PreloadAssets>>;
|
|
269
|
-
afterPreloadRemote: AsyncHook<{
|
|
316
|
+
afterPreloadRemote: AsyncHook<[{
|
|
270
317
|
preloadOps: Array<PreloadRemoteArgs>;
|
|
271
318
|
options: Options;
|
|
272
319
|
origin: ModuleFederation;
|
|
273
|
-
|
|
320
|
+
results: PreloadRemoteResult[];
|
|
321
|
+
error?: unknown;
|
|
322
|
+
}], false | void | Promise<false | void>>;
|
|
274
323
|
loadEntry: AsyncHook<[{
|
|
324
|
+
origin: ModuleFederation;
|
|
275
325
|
loaderHook: ModuleFederation["loaderHook"];
|
|
276
326
|
remoteInfo: RemoteInfo;
|
|
277
327
|
remoteEntryExports?: RemoteEntryExports;
|
|
278
|
-
}], Promise<RemoteEntryExports>>;
|
|
328
|
+
}], void | RemoteEntryExports | Promise<void | RemoteEntryExports>>;
|
|
279
329
|
}>;
|
|
280
330
|
constructor(host: ModuleFederation);
|
|
281
331
|
formatAndRegisterRemote(globalOptions: Options, userOptions: UserOptions): Remote[];
|
|
@@ -320,6 +370,25 @@ declare class SharedHandler {
|
|
|
320
370
|
origin: ModuleFederation;
|
|
321
371
|
}>;
|
|
322
372
|
loadShare: AsyncHook<[ModuleFederation, string, ShareInfos], false | void | Promise<false | void>>;
|
|
373
|
+
afterLoadShare: SyncHook<[{
|
|
374
|
+
pkgName: string;
|
|
375
|
+
shareInfo?: Partial<Shared>;
|
|
376
|
+
selectedShared?: Partial<Shared>;
|
|
377
|
+
shared: Options["shared"];
|
|
378
|
+
shareScopeMap: ShareScopeMap;
|
|
379
|
+
lifecycle: "loadShare" | "loadShareSync";
|
|
380
|
+
origin: ModuleFederation;
|
|
381
|
+
}], void>;
|
|
382
|
+
errorLoadShare: SyncHook<[{
|
|
383
|
+
pkgName: string;
|
|
384
|
+
shareInfo?: Partial<Shared>;
|
|
385
|
+
shared: Options["shared"];
|
|
386
|
+
shareScopeMap: ShareScopeMap;
|
|
387
|
+
lifecycle: "loadShare" | "loadShareSync";
|
|
388
|
+
origin: ModuleFederation;
|
|
389
|
+
error?: unknown;
|
|
390
|
+
recovered?: boolean;
|
|
391
|
+
}], void>;
|
|
323
392
|
resolveShare: SyncWaterfallHook<{
|
|
324
393
|
shareScopeMap: ShareScopeMap;
|
|
325
394
|
scope: string;
|
|
@@ -342,6 +411,8 @@ declare class SharedHandler {
|
|
|
342
411
|
}>;
|
|
343
412
|
initTokens: InitTokens;
|
|
344
413
|
constructor(host: ModuleFederation);
|
|
414
|
+
private emitAfterLoadShare;
|
|
415
|
+
private emitErrorLoadShare;
|
|
345
416
|
registerShared(globalOptions: Options, userOptions: UserOptions): {
|
|
346
417
|
newShareInfos: ShareInfos;
|
|
347
418
|
allShareInfos: {
|
|
@@ -421,6 +492,7 @@ declare class SnapshotHandler {
|
|
|
421
492
|
beforeLoadRemoteSnapshot: AsyncHook<[{
|
|
422
493
|
options: Options;
|
|
423
494
|
moduleInfo: Remote;
|
|
495
|
+
origin: ModuleFederation;
|
|
424
496
|
}], void>;
|
|
425
497
|
loadSnapshot: AsyncWaterfallHook<{
|
|
426
498
|
options: Options;
|
|
@@ -451,11 +523,11 @@ declare class SnapshotHandler {
|
|
|
451
523
|
loadRemoteSnapshotInfo({
|
|
452
524
|
moduleInfo,
|
|
453
525
|
id,
|
|
454
|
-
|
|
526
|
+
initiator
|
|
455
527
|
}: {
|
|
456
528
|
moduleInfo: Remote;
|
|
457
529
|
id?: string;
|
|
458
|
-
|
|
530
|
+
initiator?: ResourceLoadInitiator;
|
|
459
531
|
}): Promise<{
|
|
460
532
|
remoteSnapshot: ModuleInfo;
|
|
461
533
|
globalSnapshot: GlobalModuleInfo;
|
|
@@ -466,6 +538,7 @@ declare class SnapshotHandler {
|
|
|
466
538
|
remoteSnapshot: GlobalModuleInfo[string] | undefined;
|
|
467
539
|
};
|
|
468
540
|
private getManifestJson;
|
|
541
|
+
private loadManifestSnapshot;
|
|
469
542
|
} //#endregion
|
|
470
543
|
//#endregion
|
|
471
544
|
//#region ../runtime-core/dist/utils/load.d.ts
|
|
@@ -476,6 +549,7 @@ declare function getRemoteEntry(params: {
|
|
|
476
549
|
remoteEntryExports?: RemoteEntryExports | undefined;
|
|
477
550
|
getEntryUrl?: (url: string) => string;
|
|
478
551
|
_inErrorHandling?: boolean;
|
|
552
|
+
resourceContext?: ResourceLoadContext;
|
|
479
553
|
}): Promise<RemoteEntryExports | false | void>;
|
|
480
554
|
//#endregion
|
|
481
555
|
//#region ../runtime-core/dist/core.d.ts
|
|
@@ -538,6 +612,7 @@ declare class ModuleFederation {
|
|
|
538
612
|
* (e.g. preloadRemote / loading remoteEntry).
|
|
539
613
|
*/
|
|
540
614
|
remoteInfo?: RemoteInfo;
|
|
615
|
+
resourceContext?: ResourceLoadContext;
|
|
541
616
|
}], CreateScriptHookReturn>;
|
|
542
617
|
createLink: SyncHook<[{
|
|
543
618
|
url: string;
|
|
@@ -548,8 +623,9 @@ declare class ModuleFederation {
|
|
|
548
623
|
* (e.g. preloadRemote / loading remoteEntry).
|
|
549
624
|
*/
|
|
550
625
|
remoteInfo?: RemoteInfo;
|
|
551
|
-
|
|
552
|
-
|
|
626
|
+
resourceContext?: ResourceLoadContext;
|
|
627
|
+
}], CreateLinkHookReturnDom>;
|
|
628
|
+
fetch: AsyncHook<[string, RequestInit, (RemoteInfo | undefined)?, (ResourceLoadContext | undefined)?], false | void | Promise<Response>>;
|
|
553
629
|
loadEntryError: AsyncHook<[{
|
|
554
630
|
getRemoteEntry: typeof getRemoteEntry;
|
|
555
631
|
origin: ModuleFederation;
|
|
@@ -558,11 +634,65 @@ declare class ModuleFederation {
|
|
|
558
634
|
globalLoading: Record<string, Promise<void | RemoteEntryExports> | undefined>;
|
|
559
635
|
uniqueKey: string;
|
|
560
636
|
}], Promise<Promise<RemoteEntryExports | undefined> | undefined>>;
|
|
637
|
+
afterLoadEntry: AsyncHook<[{
|
|
638
|
+
origin: ModuleFederation;
|
|
639
|
+
remoteInfo: RemoteInfo;
|
|
640
|
+
remoteEntryExports?: false | void | RemoteEntryExports | undefined;
|
|
641
|
+
error?: unknown;
|
|
642
|
+
recovered?: boolean;
|
|
643
|
+
}], void>;
|
|
644
|
+
beforeInitRemote: AsyncHook<[{
|
|
645
|
+
id?: string;
|
|
646
|
+
remoteInfo: RemoteInfo;
|
|
647
|
+
remoteSnapshot?: ModuleInfo;
|
|
648
|
+
origin: ModuleFederation;
|
|
649
|
+
}], void>;
|
|
650
|
+
afterInitRemote: AsyncHook<[{
|
|
651
|
+
id?: string;
|
|
652
|
+
remoteInfo: RemoteInfo;
|
|
653
|
+
remoteSnapshot?: ModuleInfo;
|
|
654
|
+
remoteEntryExports?: RemoteEntryExports;
|
|
655
|
+
error?: unknown;
|
|
656
|
+
cached?: boolean;
|
|
657
|
+
origin: ModuleFederation;
|
|
658
|
+
}], void>;
|
|
659
|
+
beforeGetExpose: AsyncHook<[{
|
|
660
|
+
id: string;
|
|
661
|
+
expose: string;
|
|
662
|
+
moduleInfo: RemoteInfo;
|
|
663
|
+
remoteEntryExports: RemoteEntryExports;
|
|
664
|
+
origin: ModuleFederation;
|
|
665
|
+
}], void>;
|
|
666
|
+
afterGetExpose: AsyncHook<[{
|
|
667
|
+
id: string;
|
|
668
|
+
expose: string;
|
|
669
|
+
moduleInfo: RemoteInfo;
|
|
670
|
+
remoteEntryExports: RemoteEntryExports;
|
|
671
|
+
moduleFactory?: RemoteModuleFactory;
|
|
672
|
+
error?: unknown;
|
|
673
|
+
origin: ModuleFederation;
|
|
674
|
+
}], void>;
|
|
675
|
+
beforeExecuteFactory: AsyncHook<[{
|
|
676
|
+
id: string;
|
|
677
|
+
expose: string;
|
|
678
|
+
moduleInfo: RemoteInfo;
|
|
679
|
+
loadFactory: boolean;
|
|
680
|
+
origin: ModuleFederation;
|
|
681
|
+
}], void>;
|
|
682
|
+
afterExecuteFactory: AsyncHook<[{
|
|
683
|
+
id: string;
|
|
684
|
+
expose: string;
|
|
685
|
+
moduleInfo: RemoteInfo;
|
|
686
|
+
loadFactory: boolean;
|
|
687
|
+
exposeModule?: unknown;
|
|
688
|
+
error?: unknown;
|
|
689
|
+
origin: ModuleFederation;
|
|
690
|
+
}], void>;
|
|
561
691
|
getModuleFactory: AsyncHook<[{
|
|
562
692
|
remoteEntryExports: RemoteEntryExports;
|
|
563
693
|
expose: string;
|
|
564
694
|
moduleInfo: RemoteInfo;
|
|
565
|
-
}], Promise<
|
|
695
|
+
}], RemoteModuleFactory | Promise<RemoteModuleFactory | undefined> | undefined>;
|
|
566
696
|
}>;
|
|
567
697
|
bridgeHook: PluginSystem<{
|
|
568
698
|
beforeBridgeRender: SyncHook<[Record<string, any>], void | Record<string, any>>;
|
|
@@ -607,6 +737,7 @@ declare class ModuleFederation {
|
|
|
607
737
|
//#region ../runtime-core/dist/module/index.d.ts
|
|
608
738
|
//#region src/module/index.d.ts
|
|
609
739
|
type ModuleOptions = ConstructorParameters<typeof Module$1>[0];
|
|
740
|
+
type RemoteModuleFactory = () => unknown | Promise<unknown>;
|
|
610
741
|
declare class Module$1 {
|
|
611
742
|
remoteInfo: RemoteInfo;
|
|
612
743
|
inited: boolean;
|
|
@@ -622,11 +753,11 @@ declare class Module$1 {
|
|
|
622
753
|
remoteInfo: RemoteInfo;
|
|
623
754
|
host: ModuleFederation;
|
|
624
755
|
});
|
|
625
|
-
getEntry(): Promise<RemoteEntryExports>;
|
|
626
|
-
init(id?: string, remoteSnapshot?: ModuleInfo, rawInitScope?: InitScope): Promise<RemoteEntryExports>;
|
|
756
|
+
getEntry(expose?: string): Promise<RemoteEntryExports>;
|
|
757
|
+
init(id?: string, remoteSnapshot?: ModuleInfo, rawInitScope?: InitScope, expose?: string): Promise<RemoteEntryExports>;
|
|
627
758
|
get(id: string, expose: string, options?: {
|
|
628
759
|
loadFactory?: boolean;
|
|
629
|
-
}, remoteSnapshot?: ModuleInfo): Promise<
|
|
760
|
+
}, remoteSnapshot?: ModuleInfo): Promise<unknown>;
|
|
630
761
|
private wraperFactory;
|
|
631
762
|
} //#endregion
|
|
632
763
|
//#endregion
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as cloneDeepOptions, n as RpcGMCallTypes, o as getDTSManagerConstructor, s as isDebugMode, t as exposeRpc, x as __exportAll } from "./expose-rpc-
|
|
1
|
+
import { a as cloneDeepOptions, n as RpcGMCallTypes, o as getDTSManagerConstructor, s as isDebugMode, t as exposeRpc, x as __exportAll } from "./expose-rpc-BgxOTFXQ.mjs";
|
|
2
2
|
import path from "path";
|
|
3
3
|
import { randomUUID } from "crypto";
|
|
4
4
|
import * as child_process from "child_process";
|
package/dist/esm/core.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { _ as retrieveMfTypesPath, c as isTSProject, d as DTSManager, f as HOST_API_TYPES_FILE_NAME, g as retrieveTypesZipPath, h as retrieveHostConfig, i as retrieveRemoteConfig, l as retrieveTypesAssetsInfo, m as REMOTE_API_TYPES_FILE_NAME, o as getDTSManagerConstructor, p as REMOTE_ALIAS_IDENTIFIER, r as generateTypes, u as validateOptions, v as retrieveOriginalOutDir } from "./expose-rpc-
|
|
1
|
+
import { _ as retrieveMfTypesPath, c as isTSProject, d as DTSManager, f as HOST_API_TYPES_FILE_NAME, g as retrieveTypesZipPath, h as retrieveHostConfig, i as retrieveRemoteConfig, l as retrieveTypesAssetsInfo, m as REMOTE_API_TYPES_FILE_NAME, o as getDTSManagerConstructor, p as REMOTE_ALIAS_IDENTIFIER, r as generateTypes, u as validateOptions, v as retrieveOriginalOutDir } from "./expose-rpc-BgxOTFXQ.mjs";
|
|
2
2
|
import "./Broker-z82OgzMe.mjs";
|
|
3
|
-
import { i as rpc_exports, n as generateTypesInChildProcess, r as DtsWorker, t as consumeTypes } from "./consumeTypes-
|
|
3
|
+
import { i as rpc_exports, n as generateTypesInChildProcess, r as DtsWorker, t as consumeTypes } from "./consumeTypes-DCGF9bG3.mjs";
|
|
4
4
|
|
|
5
5
|
export { DTSManager, DtsWorker, HOST_API_TYPES_FILE_NAME, REMOTE_ALIAS_IDENTIFIER, REMOTE_API_TYPES_FILE_NAME, consumeTypes, generateTypes, generateTypesInChildProcess, getDTSManagerConstructor, isTSProject, retrieveHostConfig, retrieveMfTypesPath, retrieveOriginalOutDir, retrieveRemoteConfig, retrieveTypesAssetsInfo, retrieveTypesZipPath, rpc_exports as rpc, validateOptions };
|
|
@@ -688,12 +688,14 @@ const retrieveRemoteInfo = (options) => {
|
|
|
688
688
|
let zipUrl = "";
|
|
689
689
|
let apiTypeUrl = "";
|
|
690
690
|
const name = parsedInfo.name || remoteAlias;
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
691
|
+
const remoteTypeUrl = typeof remoteTypeUrls === "object" && remoteTypeUrls[name];
|
|
692
|
+
if (remoteTypeUrl) {
|
|
693
|
+
zipUrl = remoteTypeUrl.zip;
|
|
694
|
+
apiTypeUrl = remoteTypeUrl.api;
|
|
694
695
|
}
|
|
695
|
-
|
|
696
|
-
if (!
|
|
696
|
+
const shouldResolveTypeUrlsByConvention = Boolean(url && !url.includes(MANIFEST_EXT));
|
|
697
|
+
if (!zipUrl && shouldResolveTypeUrlsByConvention) zipUrl = buildZipUrl(hostOptions, url);
|
|
698
|
+
if (!apiTypeUrl && zipUrl && (remoteTypeUrl || shouldResolveTypeUrlsByConvention)) apiTypeUrl = buildApiTypeUrl(zipUrl);
|
|
697
699
|
return {
|
|
698
700
|
name,
|
|
699
701
|
url,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { _ as retrieveMfTypesPath, b as ModuleFederationDevServer, g as retrieveTypesZipPath, h as retrieveHostConfig, i as retrieveRemoteConfig, n as RpcGMCallTypes, o as getDTSManagerConstructor, t as exposeRpc, y as createHttpServer } from "./expose-rpc-
|
|
1
|
+
import { _ as retrieveMfTypesPath, b as ModuleFederationDevServer, g as retrieveTypesZipPath, h as retrieveHostConfig, i as retrieveRemoteConfig, n as RpcGMCallTypes, o as getDTSManagerConstructor, t as exposeRpc, y as createHttpServer } from "./expose-rpc-BgxOTFXQ.mjs";
|
|
2
2
|
import { o as UpdateMode, r as DEFAULT_TAR_NAME } from "./Action-DNNg2YDh.mjs";
|
|
3
3
|
import { n as UpdateKind, o as getIPV4, s as fileLog } from "./Broker-z82OgzMe.mjs";
|
|
4
|
-
import "./consumeTypes-
|
|
4
|
+
import "./consumeTypes-DCGF9bG3.mjs";
|
|
5
5
|
import "./core.mjs";
|
|
6
6
|
import { t as getIpFromEntry } from "./utils-CkPvDGOy.mjs";
|
|
7
7
|
import { decodeName } from "@module-federation/sdk";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as RpcGMCallTypes, r as generateTypes, t as exposeRpc } from "./expose-rpc-
|
|
1
|
+
import { n as RpcGMCallTypes, r as generateTypes, t as exposeRpc } from "./expose-rpc-BgxOTFXQ.mjs";
|
|
2
2
|
import "./Broker-z82OgzMe.mjs";
|
|
3
3
|
|
|
4
4
|
//#region src/core/lib/forkGenerateDts.ts
|
package/dist/esm/index.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { a as cloneDeepOptions, c as isTSProject, l as retrieveTypesAssetsInfo, n as RpcGMCallTypes, r as generateTypes, u as validateOptions } from "./expose-rpc-
|
|
1
|
+
import { a as cloneDeepOptions, c as isTSProject, l as retrieveTypesAssetsInfo, n as RpcGMCallTypes, r as generateTypes, u as validateOptions } from "./expose-rpc-BgxOTFXQ.mjs";
|
|
2
2
|
import { s as WEB_CLIENT_OPTIONS_IDENTIFIER } from "./Action-DNNg2YDh.mjs";
|
|
3
3
|
import { c as logger$1, o as getIPV4 } from "./Broker-z82OgzMe.mjs";
|
|
4
|
-
import { a as createRpcWorker, n as generateTypesInChildProcess, t as consumeTypes } from "./consumeTypes-
|
|
4
|
+
import { a as createRpcWorker, n as generateTypesInChildProcess, t as consumeTypes } from "./consumeTypes-DCGF9bG3.mjs";
|
|
5
5
|
import "./core.mjs";
|
|
6
6
|
import fs from "fs";
|
|
7
7
|
import * as path$1 from "path";
|
|
@@ -679,12 +679,14 @@ const retrieveRemoteInfo = (options) => {
|
|
|
679
679
|
let zipUrl = "";
|
|
680
680
|
let apiTypeUrl = "";
|
|
681
681
|
const name = parsedInfo.name || remoteAlias;
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
682
|
+
const remoteTypeUrl = typeof remoteTypeUrls === "object" && remoteTypeUrls[name];
|
|
683
|
+
if (remoteTypeUrl) {
|
|
684
|
+
zipUrl = remoteTypeUrl.zip;
|
|
685
|
+
apiTypeUrl = remoteTypeUrl.api;
|
|
685
686
|
}
|
|
686
|
-
|
|
687
|
-
if (!
|
|
687
|
+
const shouldResolveTypeUrlsByConvention = Boolean(url && !url.includes(_module_federation_sdk.MANIFEST_EXT));
|
|
688
|
+
if (!zipUrl && shouldResolveTypeUrlsByConvention) zipUrl = buildZipUrl(hostOptions, url);
|
|
689
|
+
if (!apiTypeUrl && zipUrl && (remoteTypeUrl || shouldResolveTypeUrlsByConvention)) apiTypeUrl = buildApiTypeUrl(zipUrl);
|
|
688
690
|
return {
|
|
689
691
|
name,
|
|
690
692
|
url,
|
package/dist/fork-dev-worker.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
2
|
const require_Action = require('./Action-CzhPMw2i.js');
|
|
3
3
|
const require_Broker = require('./Broker-DRFgFvXI.js');
|
|
4
|
-
const require_expose_rpc = require('./expose-rpc-
|
|
5
|
-
require('./consumeTypes-
|
|
4
|
+
const require_expose_rpc = require('./expose-rpc-mEaCWCcd.js');
|
|
5
|
+
require('./consumeTypes-CFK17Cck.js');
|
|
6
6
|
require('./core.js');
|
|
7
7
|
const require_utils = require('./utils-7KqCZHbb.js');
|
|
8
8
|
let _module_federation_sdk = require("@module-federation/sdk");
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
2
|
require('./Broker-DRFgFvXI.js');
|
|
3
|
-
const require_expose_rpc = require('./expose-rpc-
|
|
3
|
+
const require_expose_rpc = require('./expose-rpc-mEaCWCcd.js');
|
|
4
4
|
|
|
5
5
|
//#region src/core/lib/forkGenerateDts.ts
|
|
6
6
|
async function forkGenerateDts(options) {
|
package/dist/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
2
|
const require_Action = require('./Action-CzhPMw2i.js');
|
|
3
3
|
const require_Broker = require('./Broker-DRFgFvXI.js');
|
|
4
|
-
const require_expose_rpc = require('./expose-rpc-
|
|
5
|
-
const require_consumeTypes = require('./consumeTypes-
|
|
4
|
+
const require_expose_rpc = require('./expose-rpc-mEaCWCcd.js');
|
|
5
|
+
const require_consumeTypes = require('./consumeTypes-CFK17Cck.js');
|
|
6
6
|
require('./core.js');
|
|
7
7
|
let fs = require("fs");
|
|
8
8
|
fs = require_Action.__toESM(fs);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@module-federation/dts-plugin",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.5.0",
|
|
4
4
|
"author": "hanric <hanric.zhang@gmail.com>",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"module": "./dist/esm/index.mjs",
|
|
@@ -71,10 +71,10 @@
|
|
|
71
71
|
"undici": "7.24.7",
|
|
72
72
|
"node-schedule": "2.1.1",
|
|
73
73
|
"ws": "8.18.0",
|
|
74
|
-
"@module-federation/
|
|
75
|
-
"@module-federation/
|
|
76
|
-
"@module-federation/
|
|
77
|
-
"@module-federation/
|
|
74
|
+
"@module-federation/managers": "2.5.0",
|
|
75
|
+
"@module-federation/third-party-dts-extractor": "2.5.0",
|
|
76
|
+
"@module-federation/sdk": "2.5.0",
|
|
77
|
+
"@module-federation/error-codes": "2.5.0"
|
|
78
78
|
},
|
|
79
79
|
"devDependencies": {
|
|
80
80
|
"@types/node-schedule": "2.1.7",
|
|
@@ -86,7 +86,7 @@
|
|
|
86
86
|
"directory-tree": "3.5.2",
|
|
87
87
|
"vitest": "1.6.0",
|
|
88
88
|
"webpack": "^5.104.1",
|
|
89
|
-
"@module-federation/runtime": "2.
|
|
89
|
+
"@module-federation/runtime": "2.5.0"
|
|
90
90
|
},
|
|
91
91
|
"peerDependencies": {
|
|
92
92
|
"typescript": "^4.9.0 || ^5.0.0",
|