@module-federation/webpack-bundler-runtime
Advanced tools
@@ -1,1 +0,1 @@ | ||
| {"version":3,"file":"error-codes.cjs","names":[],"sources":["../../../../error-codes/dist/error-codes.mjs"],"sourcesContent":["//#region src/error-codes.ts\nconst RUNTIME_001 = \"RUNTIME-001\";\nconst RUNTIME_002 = \"RUNTIME-002\";\nconst RUNTIME_003 = \"RUNTIME-003\";\nconst RUNTIME_004 = \"RUNTIME-004\";\nconst RUNTIME_005 = \"RUNTIME-005\";\nconst RUNTIME_006 = \"RUNTIME-006\";\nconst RUNTIME_007 = \"RUNTIME-007\";\nconst RUNTIME_008 = \"RUNTIME-008\";\nconst RUNTIME_009 = \"RUNTIME-009\";\nconst RUNTIME_010 = \"RUNTIME-010\";\nconst RUNTIME_011 = \"RUNTIME-011\";\nconst RUNTIME_012 = \"RUNTIME-012\";\nconst TYPE_001 = \"TYPE-001\";\nconst BUILD_001 = \"BUILD-001\";\nconst BUILD_002 = \"BUILD-002\";\n\n//#endregion\nexport { BUILD_001, BUILD_002, RUNTIME_001, RUNTIME_002, RUNTIME_003, RUNTIME_004, RUNTIME_005, RUNTIME_006, RUNTIME_007, RUNTIME_008, RUNTIME_009, RUNTIME_010, RUNTIME_011, RUNTIME_012, TYPE_001 };\n//# sourceMappingURL=error-codes.mjs.map"],"mappings":";;AAYA,MAAM,cAAc"} | ||
| {"version":3,"file":"error-codes.cjs","names":[],"sources":["../../../../error-codes/dist/error-codes.mjs"],"sourcesContent":["//#region src/error-codes.ts\nconst RUNTIME_001 = \"RUNTIME-001\";\nconst RUNTIME_002 = \"RUNTIME-002\";\nconst RUNTIME_003 = \"RUNTIME-003\";\nconst RUNTIME_004 = \"RUNTIME-004\";\nconst RUNTIME_005 = \"RUNTIME-005\";\nconst RUNTIME_006 = \"RUNTIME-006\";\nconst RUNTIME_007 = \"RUNTIME-007\";\nconst RUNTIME_008 = \"RUNTIME-008\";\nconst RUNTIME_009 = \"RUNTIME-009\";\nconst RUNTIME_010 = \"RUNTIME-010\";\nconst RUNTIME_011 = \"RUNTIME-011\";\nconst RUNTIME_012 = \"RUNTIME-012\";\nconst RUNTIME_013 = \"RUNTIME-013\";\nconst RUNTIME_014 = \"RUNTIME-014\";\nconst RUNTIME_015 = \"RUNTIME-015\";\nconst TYPE_001 = \"TYPE-001\";\nconst BUILD_001 = \"BUILD-001\";\nconst BUILD_002 = \"BUILD-002\";\n\n//#endregion\nexport { BUILD_001, BUILD_002, RUNTIME_001, RUNTIME_002, RUNTIME_003, RUNTIME_004, RUNTIME_005, RUNTIME_006, RUNTIME_007, RUNTIME_008, RUNTIME_009, RUNTIME_010, RUNTIME_011, RUNTIME_012, RUNTIME_013, RUNTIME_014, RUNTIME_015, TYPE_001 };\n//# sourceMappingURL=error-codes.mjs.map"],"mappings":";;AAYA,MAAM,cAAc"} |
@@ -1,1 +0,1 @@ | ||
| {"version":3,"file":"error-codes.js","names":[],"sources":["../../../../error-codes/dist/error-codes.mjs"],"sourcesContent":["//#region src/error-codes.ts\nconst RUNTIME_001 = \"RUNTIME-001\";\nconst RUNTIME_002 = \"RUNTIME-002\";\nconst RUNTIME_003 = \"RUNTIME-003\";\nconst RUNTIME_004 = \"RUNTIME-004\";\nconst RUNTIME_005 = \"RUNTIME-005\";\nconst RUNTIME_006 = \"RUNTIME-006\";\nconst RUNTIME_007 = \"RUNTIME-007\";\nconst RUNTIME_008 = \"RUNTIME-008\";\nconst RUNTIME_009 = \"RUNTIME-009\";\nconst RUNTIME_010 = \"RUNTIME-010\";\nconst RUNTIME_011 = \"RUNTIME-011\";\nconst RUNTIME_012 = \"RUNTIME-012\";\nconst TYPE_001 = \"TYPE-001\";\nconst BUILD_001 = \"BUILD-001\";\nconst BUILD_002 = \"BUILD-002\";\n\n//#endregion\nexport { BUILD_001, BUILD_002, RUNTIME_001, RUNTIME_002, RUNTIME_003, RUNTIME_004, RUNTIME_005, RUNTIME_006, RUNTIME_007, RUNTIME_008, RUNTIME_009, RUNTIME_010, RUNTIME_011, RUNTIME_012, TYPE_001 };\n//# sourceMappingURL=error-codes.mjs.map"],"mappings":";AAYA,MAAM,cAAc"} | ||
| {"version":3,"file":"error-codes.js","names":[],"sources":["../../../../error-codes/dist/error-codes.mjs"],"sourcesContent":["//#region src/error-codes.ts\nconst RUNTIME_001 = \"RUNTIME-001\";\nconst RUNTIME_002 = \"RUNTIME-002\";\nconst RUNTIME_003 = \"RUNTIME-003\";\nconst RUNTIME_004 = \"RUNTIME-004\";\nconst RUNTIME_005 = \"RUNTIME-005\";\nconst RUNTIME_006 = \"RUNTIME-006\";\nconst RUNTIME_007 = \"RUNTIME-007\";\nconst RUNTIME_008 = \"RUNTIME-008\";\nconst RUNTIME_009 = \"RUNTIME-009\";\nconst RUNTIME_010 = \"RUNTIME-010\";\nconst RUNTIME_011 = \"RUNTIME-011\";\nconst RUNTIME_012 = \"RUNTIME-012\";\nconst RUNTIME_013 = \"RUNTIME-013\";\nconst RUNTIME_014 = \"RUNTIME-014\";\nconst RUNTIME_015 = \"RUNTIME-015\";\nconst TYPE_001 = \"TYPE-001\";\nconst BUILD_001 = \"BUILD-001\";\nconst BUILD_002 = \"BUILD-002\";\n\n//#endregion\nexport { BUILD_001, BUILD_002, RUNTIME_001, RUNTIME_002, RUNTIME_003, RUNTIME_004, RUNTIME_005, RUNTIME_006, RUNTIME_007, RUNTIME_008, RUNTIME_009, RUNTIME_010, RUNTIME_011, RUNTIME_012, RUNTIME_013, RUNTIME_014, RUNTIME_015, TYPE_001 };\n//# sourceMappingURL=error-codes.mjs.map"],"mappings":";AAYA,MAAM,cAAc"} |
@@ -7,3 +7,3 @@ import { SyncHook } from "./utils/hooks/syncHook.js"; | ||
| import { CallFrom, InitScope, Options, Remote, RemoteEntryExports, RemoteEntryInitOptions, RemoteInfo, ShareInfos, ShareScopeMap, Shared, UserOptions } from "./type/config.js"; | ||
| import { PreloadRemoteArgs } from "./type/preload.js"; | ||
| import { PreloadRemoteArgs, ResourceLoadContext } from "./type/preload.js"; | ||
| import { RemoteHandler } from "./remote/index.js"; | ||
@@ -13,4 +13,4 @@ import { SharedHandler } from "./shared/index.js"; | ||
| import { getRemoteEntry } from "./utils/load.js"; | ||
| import { Module$1 } from "./module/index.js"; | ||
| import { CreateScriptHookReturn, GlobalModuleInfo, ModuleInfo } from "@module-federation/sdk"; | ||
| import { Module$1, RemoteModuleFactory } from "./module/index.js"; | ||
| import { CreateLinkHookReturnDom, CreateScriptHookReturn, GlobalModuleInfo, ModuleInfo } from "@module-federation/sdk"; | ||
@@ -77,2 +77,3 @@ //#region ../runtime-core/dist/core.d.ts | ||
| remoteInfo?: RemoteInfo; | ||
| resourceContext?: ResourceLoadContext; | ||
| }], CreateScriptHookReturn>; | ||
@@ -88,4 +89,5 @@ createLink: SyncHook<[{ | ||
| remoteInfo?: RemoteInfo; | ||
| }], void | HTMLLinkElement>; | ||
| fetch: AsyncHook<[string, RequestInit, (RemoteInfo | undefined)?], false | void | Promise<Response>>; | ||
| resourceContext?: ResourceLoadContext; | ||
| }], CreateLinkHookReturnDom>; | ||
| fetch: AsyncHook<[string, RequestInit, (RemoteInfo | undefined)?, (ResourceLoadContext | undefined)?], false | void | Promise<Response>>; | ||
| loadEntryError: AsyncHook<[{ | ||
@@ -99,2 +101,56 @@ getRemoteEntry: typeof getRemoteEntry; | ||
| }], Promise<Promise<RemoteEntryExports | undefined> | undefined>>; | ||
| afterLoadEntry: AsyncHook<[{ | ||
| origin: ModuleFederation; | ||
| remoteInfo: RemoteInfo; | ||
| remoteEntryExports?: false | void | RemoteEntryExports | undefined; | ||
| error?: unknown; | ||
| recovered?: boolean; | ||
| }], void>; | ||
| beforeInitRemote: AsyncHook<[{ | ||
| id?: string; | ||
| remoteInfo: RemoteInfo; | ||
| remoteSnapshot?: ModuleInfo; | ||
| origin: ModuleFederation; | ||
| }], void>; | ||
| afterInitRemote: AsyncHook<[{ | ||
| id?: string; | ||
| remoteInfo: RemoteInfo; | ||
| remoteSnapshot?: ModuleInfo; | ||
| remoteEntryExports?: RemoteEntryExports; | ||
| error?: unknown; | ||
| cached?: boolean; | ||
| origin: ModuleFederation; | ||
| }], void>; | ||
| beforeGetExpose: AsyncHook<[{ | ||
| id: string; | ||
| expose: string; | ||
| moduleInfo: RemoteInfo; | ||
| remoteEntryExports: RemoteEntryExports; | ||
| origin: ModuleFederation; | ||
| }], void>; | ||
| afterGetExpose: AsyncHook<[{ | ||
| id: string; | ||
| expose: string; | ||
| moduleInfo: RemoteInfo; | ||
| remoteEntryExports: RemoteEntryExports; | ||
| moduleFactory?: RemoteModuleFactory; | ||
| error?: unknown; | ||
| origin: ModuleFederation; | ||
| }], void>; | ||
| beforeExecuteFactory: AsyncHook<[{ | ||
| id: string; | ||
| expose: string; | ||
| moduleInfo: RemoteInfo; | ||
| loadFactory: boolean; | ||
| origin: ModuleFederation; | ||
| }], void>; | ||
| afterExecuteFactory: AsyncHook<[{ | ||
| id: string; | ||
| expose: string; | ||
| moduleInfo: RemoteInfo; | ||
| loadFactory: boolean; | ||
| exposeModule?: unknown; | ||
| error?: unknown; | ||
| origin: ModuleFederation; | ||
| }], void>; | ||
| getModuleFactory: AsyncHook<[{ | ||
@@ -104,3 +160,3 @@ remoteEntryExports: RemoteEntryExports; | ||
| moduleInfo: RemoteInfo; | ||
| }], Promise<(() => Promise<Module$1>) | undefined>>; | ||
| }], RemoteModuleFactory | Promise<RemoteModuleFactory | undefined> | undefined>; | ||
| }>; | ||
@@ -107,0 +163,0 @@ bridgeHook: PluginSystem<{ |
@@ -8,2 +8,3 @@ import { InitScope, RemoteEntryExports, RemoteInfo } from "../type/config.js"; | ||
| type ModuleOptions = ConstructorParameters<typeof Module$1>[0]; | ||
| type RemoteModuleFactory = () => unknown | Promise<unknown>; | ||
| declare class Module$1 { | ||
@@ -24,11 +25,11 @@ remoteInfo: RemoteInfo; | ||
| }); | ||
| getEntry(): Promise<RemoteEntryExports>; | ||
| init(id?: string, remoteSnapshot?: ModuleInfo, rawInitScope?: InitScope): Promise<RemoteEntryExports>; | ||
| getEntry(expose?: string): Promise<RemoteEntryExports>; | ||
| init(id?: string, remoteSnapshot?: ModuleInfo, rawInitScope?: InitScope, expose?: string): Promise<RemoteEntryExports>; | ||
| get(id: string, expose: string, options?: { | ||
| loadFactory?: boolean; | ||
| }, remoteSnapshot?: ModuleInfo): Promise<any>; | ||
| }, remoteSnapshot?: ModuleInfo): Promise<unknown>; | ||
| private wraperFactory; | ||
| } //#endregion | ||
| //#endregion | ||
| export { Module$1, ModuleOptions }; | ||
| export { Module$1, ModuleOptions, RemoteModuleFactory }; | ||
| //# sourceMappingURL=index.d.ts.map |
@@ -5,2 +5,3 @@ import { AsyncHook } from "../../utils/hooks/asyncHook.js"; | ||
| import { Options, Remote } from "../../type/config.js"; | ||
| import { ResourceLoadInitiator } from "../../type/preload.js"; | ||
| import { getGlobalSnapshot } from "../../global.js"; | ||
@@ -20,2 +21,3 @@ import { ModuleFederation } from "../../core.js"; | ||
| moduleInfo: Remote; | ||
| origin: ModuleFederation; | ||
| }], void>; | ||
@@ -51,7 +53,7 @@ loadSnapshot: AsyncWaterfallHook<{ | ||
| id, | ||
| expose | ||
| initiator | ||
| }: { | ||
| moduleInfo: Remote; | ||
| id?: string; | ||
| expose?: string; | ||
| initiator?: ResourceLoadInitiator; | ||
| }): Promise<{ | ||
@@ -67,2 +69,3 @@ remoteSnapshot: ModuleInfo; | ||
| private getManifestJson; | ||
| private loadManifestSnapshot; | ||
| } //#endregion | ||
@@ -69,0 +72,0 @@ //#endregion |
@@ -7,3 +7,3 @@ import { SyncHook } from "../utils/hooks/syncHook.js"; | ||
| import { CallFrom, Options, Remote, RemoteEntryExports, RemoteInfo, UserOptions } from "../type/config.js"; | ||
| import { PreloadAssets, PreloadOptions, PreloadRemoteArgs } from "../type/preload.js"; | ||
| import { PreloadAssets, PreloadOptions, PreloadRemoteArgs, PreloadRemoteResult } from "../type/preload.js"; | ||
| import { ModuleFederation } from "../core.js"; | ||
@@ -45,2 +45,11 @@ import { Module$1, ModuleOptions } from "../module/index.js"; | ||
| }>; | ||
| afterMatchRemote: AsyncHook<[{ | ||
| id: string; | ||
| options: Options; | ||
| remote?: Remote; | ||
| expose?: string; | ||
| remoteInfo?: RemoteInfo; | ||
| error?: unknown; | ||
| origin: ModuleFederation; | ||
| }], void>; | ||
| onLoad: AsyncHook<[{ | ||
@@ -56,2 +65,14 @@ id: string; | ||
| moduleInstance: Module$1; | ||
| }], unknown>; | ||
| afterLoadRemote: AsyncHook<[{ | ||
| id: string; | ||
| expose?: string; | ||
| remote?: RemoteInfo; | ||
| options?: { | ||
| loadFactory?: boolean; | ||
| from?: CallFrom; | ||
| }; | ||
| error?: unknown; | ||
| recovered?: boolean; | ||
| origin: ModuleFederation; | ||
| }], void>; | ||
@@ -72,2 +93,4 @@ handlePreloadModule: SyncHook<[{ | ||
| lifecycle: "beforeRequest" | "beforeLoadShare" | "afterResolve" | "onLoad"; | ||
| remote?: RemoteInfo; | ||
| expose?: string; | ||
| origin: ModuleFederation; | ||
@@ -88,12 +111,15 @@ }], unknown>; | ||
| }], Promise<PreloadAssets>>; | ||
| afterPreloadRemote: AsyncHook<{ | ||
| afterPreloadRemote: AsyncHook<[{ | ||
| preloadOps: Array<PreloadRemoteArgs>; | ||
| options: Options; | ||
| origin: ModuleFederation; | ||
| }, false | void | Promise<false | void>>; | ||
| results: PreloadRemoteResult[]; | ||
| error?: unknown; | ||
| }], false | void | Promise<false | void>>; | ||
| loadEntry: AsyncHook<[{ | ||
| origin: ModuleFederation; | ||
| loaderHook: ModuleFederation["loaderHook"]; | ||
| remoteInfo: RemoteInfo; | ||
| remoteEntryExports?: RemoteEntryExports; | ||
| }], Promise<RemoteEntryExports>>; | ||
| }], void | RemoteEntryExports | Promise<void | RemoteEntryExports>>; | ||
| }>; | ||
@@ -100,0 +126,0 @@ constructor(host: ModuleFederation); |
@@ -0,1 +1,2 @@ | ||
| import { SyncHook } from "../utils/hooks/syncHook.js"; | ||
| import { AsyncHook } from "../utils/hooks/asyncHook.js"; | ||
@@ -29,2 +30,21 @@ import { SyncWaterfallHook } from "../utils/hooks/syncWaterfallHook.js"; | ||
| loadShare: AsyncHook<[ModuleFederation, string, ShareInfos], false | void | Promise<false | void>>; | ||
| afterLoadShare: SyncHook<[{ | ||
| pkgName: string; | ||
| shareInfo?: Partial<Shared>; | ||
| selectedShared?: Partial<Shared>; | ||
| shared: Options["shared"]; | ||
| shareScopeMap: ShareScopeMap; | ||
| lifecycle: "loadShare" | "loadShareSync"; | ||
| origin: ModuleFederation; | ||
| }], void>; | ||
| errorLoadShare: SyncHook<[{ | ||
| pkgName: string; | ||
| shareInfo?: Partial<Shared>; | ||
| shared: Options["shared"]; | ||
| shareScopeMap: ShareScopeMap; | ||
| lifecycle: "loadShare" | "loadShareSync"; | ||
| origin: ModuleFederation; | ||
| error?: unknown; | ||
| recovered?: boolean; | ||
| }], void>; | ||
| resolveShare: SyncWaterfallHook<{ | ||
@@ -52,2 +72,4 @@ shareScopeMap: ShareScopeMap; | ||
| constructor(host: ModuleFederation); | ||
| private emitAfterLoadShare; | ||
| private emitErrorLoadShare; | ||
| registerShared(globalOptions: Options, userOptions: UserOptions): { | ||
@@ -54,0 +76,0 @@ newShareInfos: ShareInfos; |
@@ -19,2 +19,26 @@ import { Remote, RemoteInfo } from "./config.js"; | ||
| }>; | ||
| type ResourceLoadInitiator = 'loadRemote' | 'preloadRemote'; | ||
| type ResourceLoadType = 'manifest' | 'remoteEntry' | 'js' | 'css'; | ||
| interface ResourceLoadContext { | ||
| initiator: ResourceLoadInitiator; | ||
| id: string; | ||
| resourceType: ResourceLoadType; | ||
| url?: string; | ||
| } | ||
| type PreloadAssetStatus = 'success' | 'error' | 'timeout' | 'cached'; | ||
| interface PreloadAssetResult { | ||
| url: string; | ||
| status: PreloadAssetStatus; | ||
| resourceType: ResourceLoadType; | ||
| initiator: ResourceLoadInitiator; | ||
| id: string; | ||
| error?: unknown; | ||
| } | ||
| interface PreloadRemoteResult { | ||
| remote: Remote; | ||
| remoteInfo: RemoteInfo; | ||
| preloadConfig: PreloadConfig; | ||
| id: string; | ||
| results: PreloadAssetResult[]; | ||
| } | ||
| type EntryAssets = { | ||
@@ -31,3 +55,3 @@ name: string; | ||
| //#endregion | ||
| export { EntryAssets, PreloadAssets, PreloadConfig, PreloadOptions, PreloadRemoteArgs, depsPreloadArg }; | ||
| export { EntryAssets, PreloadAssetResult, PreloadAssetStatus, PreloadAssets, PreloadConfig, PreloadOptions, PreloadRemoteArgs, PreloadRemoteResult, ResourceLoadContext, ResourceLoadInitiator, ResourceLoadType, depsPreloadArg }; | ||
| //# sourceMappingURL=preload.d.ts.map |
| import { CallFrom, GlobalShareScopeMap, InitScope, InitTokens, Optional, Options, Remote, RemoteEntryExports, RemoteEntryInitOptions, RemoteInfo, RemoteInfoCommon, ShareArgs, ShareInfos, ShareScopeMap, ShareStrategy, Shared, SharedConfig, SharedGetter, TreeShakingArgs, UserOptions } from "./type/config.js"; | ||
| import { EntryAssets, PreloadAssets, PreloadConfig, PreloadOptions, PreloadRemoteArgs, depsPreloadArg } from "./type/preload.js"; | ||
| import { EntryAssets, PreloadAssetResult, PreloadAssetStatus, PreloadAssets, PreloadConfig, PreloadOptions, PreloadRemoteArgs, PreloadRemoteResult, ResourceLoadContext, ResourceLoadInitiator, ResourceLoadType, depsPreloadArg } from "./type/preload.js"; | ||
| import { ModuleFederationRuntimePlugin } from "./type/plugin.js"; |
@@ -5,4 +5,4 @@ import { SyncHook } from "./syncHook.js"; | ||
| //#region src/utils/hooks/asyncWaterfallHooks.d.ts | ||
| type CallbackReturnType<T> = T | Promise<T>; | ||
| declare class AsyncWaterfallHook<T extends Record<string, any>> extends SyncHook<[T], CallbackReturnType<T>> { | ||
| type CallbackReturnType<T> = T | void | Promise<T | void>; | ||
| declare class AsyncWaterfallHook<T extends object> extends SyncHook<[T], CallbackReturnType<T>> { | ||
| onerror: (errMsg: string | Error | unknown) => void; | ||
@@ -9,0 +9,0 @@ constructor(type: string); |
@@ -5,3 +5,3 @@ import { SyncHook } from "./syncHook.js"; | ||
| //#region src/utils/hooks/syncWaterfallHook.d.ts | ||
| declare class SyncWaterfallHook<T extends Record<string, any>> extends SyncHook<[T], T> { | ||
| declare class SyncWaterfallHook<T extends Record<string, any>> extends SyncHook<[T], T | void> { | ||
| onerror: (errMsg: string | Error | unknown) => void; | ||
@@ -8,0 +8,0 @@ constructor(type: string); |
| import { RemoteEntryExports, RemoteInfo } from "../type/config.js"; | ||
| import { ResourceLoadContext } from "../type/preload.js"; | ||
| import { ModuleFederation } from "../core.js"; | ||
@@ -12,2 +13,3 @@ | ||
| _inErrorHandling?: boolean; | ||
| resourceContext?: ResourceLoadContext; | ||
| }): Promise<RemoteEntryExports | false | void>; | ||
@@ -14,0 +16,0 @@ //#endregion |
+4
-4
| { | ||
| "public": true, | ||
| "name": "@module-federation/webpack-bundler-runtime", | ||
| "version": "2.4.0", | ||
| "version": "2.5.0", | ||
| "type": "module", | ||
@@ -29,5 +29,5 @@ "license": "MIT", | ||
| "dependencies": { | ||
| "@module-federation/runtime": "2.4.0", | ||
| "@module-federation/sdk": "2.4.0", | ||
| "@module-federation/error-codes": "2.4.0" | ||
| "@module-federation/runtime": "2.5.0", | ||
| "@module-federation/error-codes": "2.5.0", | ||
| "@module-federation/sdk": "2.5.0" | ||
| }, | ||
@@ -34,0 +34,0 @@ "exports": { |
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 1 instance in 1 package
205810
2.38%2325
6.12%1
-50%+ Added
+ Added
+ Added
+ Added
- Removed
- Removed
- Removed
- Removed
Updated