@module-federation/webpack-bundler-runtime 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/_virtual/_rolldown/runtime.cjs +29 -0
- package/dist/attachShareScopeMap.cjs +11 -0
- package/dist/attachShareScopeMap.cjs.map +1 -0
- package/dist/attachShareScopeMap.d.ts +7 -0
- package/dist/attachShareScopeMap.js +10 -0
- package/dist/attachShareScopeMap.js.map +1 -0
- package/dist/bundler.cjs +18 -0
- package/dist/bundler.d.ts +4 -0
- package/dist/bundler.js +4 -0
- package/dist/constant.cjs +8 -0
- package/dist/constant.cjs.map +1 -0
- package/dist/constant.d.ts +5 -1
- package/dist/constant.js +6 -0
- package/dist/constant.js.map +1 -0
- package/dist/consumes.cjs +68 -0
- package/dist/consumes.cjs.map +1 -0
- package/dist/consumes.js +68 -0
- package/dist/consumes.js.map +1 -0
- package/dist/error-codes/dist/error-codes.cjs +7 -0
- package/dist/error-codes/dist/error-codes.cjs.map +1 -0
- package/dist/error-codes/dist/error-codes.js +6 -0
- package/dist/error-codes/dist/error-codes.js.map +1 -0
- package/dist/error-codes/dist/getShortErrorMsg.cjs +16 -0
- package/dist/error-codes/dist/getShortErrorMsg.cjs.map +1 -0
- package/dist/error-codes/dist/getShortErrorMsg.js +15 -0
- package/dist/error-codes/dist/getShortErrorMsg.js.map +1 -0
- package/dist/getSharedFallbackGetter.cjs +27 -0
- package/dist/getSharedFallbackGetter.cjs.map +1 -0
- package/dist/getSharedFallbackGetter.js +26 -0
- package/dist/getSharedFallbackGetter.js.map +1 -0
- package/dist/getUsedExports.cjs +11 -0
- package/dist/getUsedExports.cjs.map +1 -0
- package/dist/getUsedExports.js +10 -0
- package/dist/getUsedExports.js.map +1 -0
- package/dist/index.cjs +52 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.ts +24 -2
- package/dist/index.js +38 -0
- package/dist/index.js.map +1 -0
- package/dist/init.cjs +85 -0
- package/dist/init.cjs.map +1 -0
- package/dist/init.js +83 -0
- package/dist/init.js.map +1 -0
- package/dist/initContainerEntry.cjs +42 -0
- package/dist/initContainerEntry.cjs.map +1 -0
- package/dist/initContainerEntry.d.ts +7 -0
- package/dist/initContainerEntry.js +41 -0
- package/dist/initContainerEntry.js.map +1 -0
- package/dist/initializeSharing.cjs +61 -0
- package/dist/initializeSharing.cjs.map +1 -0
- package/dist/initializeSharing.d.ts +13 -0
- package/dist/initializeSharing.js +61 -0
- package/dist/initializeSharing.js.map +1 -0
- package/dist/installInitialConsumes.cjs +75 -0
- package/dist/installInitialConsumes.cjs.map +1 -0
- package/dist/installInitialConsumes.js +75 -0
- package/dist/installInitialConsumes.js.map +1 -0
- package/dist/remotes.cjs +74 -0
- package/dist/remotes.cjs.map +1 -0
- package/dist/remotes.js +73 -0
- package/dist/remotes.js.map +1 -0
- package/dist/sdk/dist/types/plugins/ModuleFederationPlugin.d.ts +11 -0
- package/dist/types.d.ts +201 -0
- package/dist/updateOptions.cjs +112 -0
- package/dist/updateOptions.cjs.map +1 -0
- package/dist/updateOptions.js +110 -0
- package/dist/updateOptions.js.map +1 -0
- package/package.json +20 -11
- package/dist/constant.cjs.cjs +0 -6
- package/dist/constant.cjs.cjs.map +0 -1
- package/dist/constant.cjs.d.ts +0 -1
- package/dist/constant.esm.js +0 -4
- package/dist/constant.esm.js.map +0 -1
- package/dist/index.cjs.cjs +0 -575
- package/dist/index.cjs.cjs.map +0 -1
- package/dist/index.cjs.d.ts +0 -2
- package/dist/index.esm.js +0 -560
- package/dist/index.esm.js.map +0 -1
- package/dist/src/attachShareScopeMap.d.ts +0 -2
- package/dist/src/constant.d.ts +0 -1
- package/dist/src/consumes.d.ts +0 -2
- package/dist/src/index.d.ts +0 -4
- package/dist/src/initContainerEntry.d.ts +0 -2
- package/dist/src/initializeSharing.d.ts +0 -2
- package/dist/src/installInitialConsumes.d.ts +0 -2
- package/dist/src/remotes.d.ts +0 -2
- package/dist/src/types.d.ts +0 -170
- package/dist/src/updateOptions.d.ts +0 -3
package/dist/src/types.d.ts
DELETED
|
@@ -1,170 +0,0 @@
|
|
|
1
|
-
import * as runtime from '@module-federation/runtime';
|
|
2
|
-
import type { Remote, RemoteEntryInitOptions, SharedConfig, SharedGetter } from '@module-federation/runtime/types';
|
|
3
|
-
import { initializeSharing } from './initializeSharing';
|
|
4
|
-
import { attachShareScopeMap } from './attachShareScopeMap';
|
|
5
|
-
import { initContainerEntry } from './initContainerEntry';
|
|
6
|
-
import type { moduleFederationPlugin } from '@module-federation/sdk';
|
|
7
|
-
type ExcludeUndefined<T> = T extends undefined ? never : T;
|
|
8
|
-
type Shared = InitOptions['shared'];
|
|
9
|
-
type NonUndefined<T = Shared> = ExcludeUndefined<T>;
|
|
10
|
-
type InitOptions = Omit<Parameters<typeof runtime.init>[0], 'remotes'> & {
|
|
11
|
-
remotes: Array<Remote & {
|
|
12
|
-
externalType: moduleFederationPlugin.ExternalsType;
|
|
13
|
-
}>;
|
|
14
|
-
};
|
|
15
|
-
type ModuleCache = runtime.ModuleFederation['moduleCache'];
|
|
16
|
-
type InferModule<T> = T extends Map<string, infer U> ? U : never;
|
|
17
|
-
type InferredModule = InferModule<ModuleCache>;
|
|
18
|
-
export type ShareScopeMap = runtime.ModuleFederation['shareScopeMap'];
|
|
19
|
-
type InitToken = Record<string, Record<string, any>>;
|
|
20
|
-
export interface InitializeSharingOptions {
|
|
21
|
-
shareScopeName: string | string[];
|
|
22
|
-
webpackRequire: WebpackRequire;
|
|
23
|
-
initPromises: Record<string, Promise<boolean> | boolean>;
|
|
24
|
-
initTokens: InitToken;
|
|
25
|
-
initScope: InitToken[];
|
|
26
|
-
}
|
|
27
|
-
export type RemoteEntryExports = NonUndefined<InferredModule['remoteEntryExports']>;
|
|
28
|
-
type ExtractInitParameters<T> = T extends {
|
|
29
|
-
init: (shareScope: infer U, ...args: any[]) => void;
|
|
30
|
-
} ? U : never;
|
|
31
|
-
type InferredShareScope = ExtractInitParameters<RemoteEntryExports>;
|
|
32
|
-
type InferredGlobalShareScope = {
|
|
33
|
-
[scope: string]: InferredShareScope;
|
|
34
|
-
};
|
|
35
|
-
type IdToExternalAndNameMappingItem = [string, string, string | number];
|
|
36
|
-
interface IdToExternalAndNameMappingItemWithPromise extends IdToExternalAndNameMappingItem {
|
|
37
|
-
p?: Promise<any> | number;
|
|
38
|
-
}
|
|
39
|
-
export type IdToExternalAndNameMapping = Record<string, IdToExternalAndNameMappingItemWithPromise>;
|
|
40
|
-
export type ModuleId = string | number;
|
|
41
|
-
export type RemoteDataItem = {
|
|
42
|
-
shareScope: string;
|
|
43
|
-
name: string;
|
|
44
|
-
externalModuleId: ModuleId;
|
|
45
|
-
remoteName: string;
|
|
46
|
-
};
|
|
47
|
-
export type ModuleIdToRemoteDataMapping = Record<ModuleId, RemoteDataItem>;
|
|
48
|
-
type ModuleIdToConsumeDataMapping = {
|
|
49
|
-
fallback: () => Promise<any>;
|
|
50
|
-
shareKey: string;
|
|
51
|
-
shareScope: string | string[];
|
|
52
|
-
} & SharedConfig;
|
|
53
|
-
type WithStatus<T> = T & {
|
|
54
|
-
_updated: number;
|
|
55
|
-
};
|
|
56
|
-
export type ConsumesLoadingData = WithStatus<{
|
|
57
|
-
chunkMapping?: Record<string, Array<string | number>>;
|
|
58
|
-
moduleIdToConsumeDataMapping?: Record<string, ModuleIdToConsumeDataMapping>;
|
|
59
|
-
initialConsumes?: Array<ModuleId>;
|
|
60
|
-
}>;
|
|
61
|
-
export type RemotesLoadingData = WithStatus<{
|
|
62
|
-
chunkMapping?: Record<string, Array<ModuleId>>;
|
|
63
|
-
moduleIdToRemoteDataMapping?: ModuleIdToRemoteDataMapping;
|
|
64
|
-
}>;
|
|
65
|
-
export type InitializeSharingData = WithStatus<{
|
|
66
|
-
scopeToSharingDataMapping: {
|
|
67
|
-
[shareScope: string]: Array<{
|
|
68
|
-
name: string;
|
|
69
|
-
version: string;
|
|
70
|
-
factory: SharedGetter;
|
|
71
|
-
eager?: boolean;
|
|
72
|
-
singleton?: boolean;
|
|
73
|
-
requiredVersion?: string;
|
|
74
|
-
strictVersion?: boolean;
|
|
75
|
-
}>;
|
|
76
|
-
};
|
|
77
|
-
uniqueName: string;
|
|
78
|
-
}>;
|
|
79
|
-
export interface WebpackRequire {
|
|
80
|
-
(moduleId: string | number): any;
|
|
81
|
-
o: (obj: Record<string, any>, key: string | number) => boolean;
|
|
82
|
-
R: Array<string | number>;
|
|
83
|
-
m: Record<string, (mod: any) => any>;
|
|
84
|
-
c: Record<string, any>;
|
|
85
|
-
I: (scopeName: string | string[], initScope?: InitializeSharingOptions['initScope']) => ReturnType<typeof initializeSharing>;
|
|
86
|
-
S?: InferredGlobalShareScope;
|
|
87
|
-
federation: Federation;
|
|
88
|
-
consumesLoadingData?: ConsumesLoadingData;
|
|
89
|
-
remotesLoadingData?: RemotesLoadingData;
|
|
90
|
-
initializeSharingData?: InitializeSharingData;
|
|
91
|
-
}
|
|
92
|
-
interface ShareInfo {
|
|
93
|
-
shareConfig: SharedConfig;
|
|
94
|
-
scope: Array<string>;
|
|
95
|
-
}
|
|
96
|
-
interface ModuleToHandlerMappingItem {
|
|
97
|
-
getter: () => Promise<any>;
|
|
98
|
-
shareInfo: ShareInfo;
|
|
99
|
-
shareKey: string;
|
|
100
|
-
}
|
|
101
|
-
export interface IdToRemoteMapItem {
|
|
102
|
-
externalType: string;
|
|
103
|
-
name: string;
|
|
104
|
-
}
|
|
105
|
-
export type IdToRemoteMap = Record<string, IdToRemoteMapItem[]>;
|
|
106
|
-
export type RemoteInfos = Record<string, Array<IdToRemoteMapItem & {
|
|
107
|
-
alias: string;
|
|
108
|
-
entry?: string;
|
|
109
|
-
shareScope: string;
|
|
110
|
-
}>>;
|
|
111
|
-
export type RemoteChunkMapping = Record<string, Array<ModuleId>>;
|
|
112
|
-
export type CoreRemotesOptions = {
|
|
113
|
-
idToRemoteMap: IdToRemoteMap;
|
|
114
|
-
chunkMapping: RemoteChunkMapping;
|
|
115
|
-
idToExternalAndNameMapping: IdToExternalAndNameMapping;
|
|
116
|
-
};
|
|
117
|
-
export type RemotesOptions = {
|
|
118
|
-
chunkId: string | number;
|
|
119
|
-
promises: Promise<any>[];
|
|
120
|
-
webpackRequire: WebpackRequire;
|
|
121
|
-
} & CoreRemotesOptions;
|
|
122
|
-
export interface HandleInitialConsumesOptions {
|
|
123
|
-
moduleId: string | number;
|
|
124
|
-
moduleToHandlerMapping: Record<string, ModuleToHandlerMappingItem>;
|
|
125
|
-
webpackRequire: WebpackRequire;
|
|
126
|
-
}
|
|
127
|
-
export interface InstallInitialConsumesOptions {
|
|
128
|
-
moduleToHandlerMapping: Record<string, ModuleToHandlerMappingItem>;
|
|
129
|
-
webpackRequire: WebpackRequire;
|
|
130
|
-
installedModules: Record<string, Promise<any> | 0>;
|
|
131
|
-
initialConsumes: Array<string | number>;
|
|
132
|
-
}
|
|
133
|
-
export interface ConsumesOptions {
|
|
134
|
-
chunkId: string | number;
|
|
135
|
-
promises: Promise<any>[];
|
|
136
|
-
chunkMapping: Record<string, Array<string | number>>;
|
|
137
|
-
installedModules: Record<string, Promise<any> | 0>;
|
|
138
|
-
moduleToHandlerMapping: Record<string, ModuleToHandlerMappingItem>;
|
|
139
|
-
webpackRequire: WebpackRequire;
|
|
140
|
-
}
|
|
141
|
-
export interface InitContainerEntryOptions {
|
|
142
|
-
shareScope: ShareScopeMap[string];
|
|
143
|
-
shareScopeKey: string | string[];
|
|
144
|
-
webpackRequire: WebpackRequire;
|
|
145
|
-
remoteEntryInitOptions?: RemoteEntryInitOptions;
|
|
146
|
-
initScope?: InitializeSharingOptions['initScope'];
|
|
147
|
-
}
|
|
148
|
-
export interface Federation {
|
|
149
|
-
runtime?: typeof runtime;
|
|
150
|
-
instance?: runtime.ModuleFederation;
|
|
151
|
-
initOptions?: InitOptions;
|
|
152
|
-
installInitialConsumes?: (options: InstallInitialConsumesOptions) => any;
|
|
153
|
-
bundlerRuntime?: {
|
|
154
|
-
remotes: (options: RemotesOptions) => void;
|
|
155
|
-
consumes: (options: ConsumesOptions) => void;
|
|
156
|
-
I: typeof initializeSharing;
|
|
157
|
-
S: InferredGlobalShareScope;
|
|
158
|
-
installInitialConsumes: (options: InstallInitialConsumesOptions) => any;
|
|
159
|
-
initContainerEntry: typeof initContainerEntry;
|
|
160
|
-
};
|
|
161
|
-
bundlerRuntimeOptions: {
|
|
162
|
-
remotes?: Exclude<RemotesOptions, 'chunkId' | 'promises'> & {
|
|
163
|
-
remoteInfos?: RemoteInfos;
|
|
164
|
-
};
|
|
165
|
-
};
|
|
166
|
-
attachShareScopeMap?: typeof attachShareScopeMap;
|
|
167
|
-
hasAttachShareScopeMap?: boolean;
|
|
168
|
-
prefetch?: () => void;
|
|
169
|
-
}
|
|
170
|
-
export {};
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import type { RemotesOptions, InstallInitialConsumesOptions, ConsumesOptions } from './types';
|
|
2
|
-
export declare function updateConsumeOptions(options: InstallInitialConsumesOptions | ConsumesOptions): void;
|
|
3
|
-
export declare function updateRemoteOptions(options: RemotesOptions): void;
|