@module-federation/manifest 0.0.0-next-20240511031741 → 0.0.0-next-20240515062211
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/index.cjs.js +146 -110
- package/dist/index.esm.js +146 -110
- package/dist/package.json +1 -1
- package/dist/src/ManifestManager.d.ts +4 -1
- package/dist/src/StatsManager.d.ts +5 -2
- package/dist/src/StatsPlugin.d.ts +5 -0
- package/dist/src/index.d.ts +1 -0
- package/dist/src/types.d.ts +13 -0
- package/package.json +4 -4
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Stats, Manifest, moduleFederationPlugin } from '@module-federation/sdk';
|
|
2
2
|
import type { Compilation, Compiler } from 'webpack';
|
|
3
|
+
import { ManifestInfo } from './types';
|
|
3
4
|
interface GenerateManifestOptions {
|
|
4
5
|
compilation: Compilation;
|
|
5
6
|
stats: Stats;
|
|
@@ -14,6 +15,8 @@ declare class ManifestManager {
|
|
|
14
15
|
get manifest(): Manifest | undefined;
|
|
15
16
|
init(options: moduleFederationPlugin.ModuleFederationPluginOptions): void;
|
|
16
17
|
get fileName(): string;
|
|
17
|
-
generateManifest(options: GenerateManifestOptions
|
|
18
|
+
generateManifest(options: GenerateManifestOptions, extraOptions?: {
|
|
19
|
+
disableEmit?: boolean;
|
|
20
|
+
}): Promise<ManifestInfo>;
|
|
18
21
|
}
|
|
19
22
|
export { ManifestManager };
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { StatsBuildInfo,
|
|
1
|
+
import { StatsBuildInfo, moduleFederationPlugin } from '@module-federation/sdk';
|
|
2
2
|
import { Compilation, Compiler } from 'webpack';
|
|
3
|
+
import { StatsInfo } from './types';
|
|
3
4
|
declare class StatsManager {
|
|
4
5
|
private _options;
|
|
5
6
|
private _publicPath?;
|
|
@@ -21,7 +22,9 @@ declare class StatsManager {
|
|
|
21
22
|
pluginVersion: string;
|
|
22
23
|
bundler: 'webpack' | 'rspack';
|
|
23
24
|
}): void;
|
|
24
|
-
generateStats(compiler: Compiler, compilation: Compilation, extraOptions?: {
|
|
25
|
+
generateStats(compiler: Compiler, compilation: Compilation, extraOptions?: {
|
|
26
|
+
disableEmit?: boolean;
|
|
27
|
+
}): Promise<StatsInfo>;
|
|
25
28
|
validate(compiler: Compiler): boolean;
|
|
26
29
|
}
|
|
27
30
|
export { StatsManager };
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Compiler, WebpackPluginInstance } from 'webpack';
|
|
2
2
|
import { moduleFederationPlugin } from '@module-federation/sdk';
|
|
3
|
+
import { StatsInfo, ManifestInfo, ResourceInfo } from './types';
|
|
3
4
|
export declare class StatsPlugin implements WebpackPluginInstance {
|
|
4
5
|
readonly name = "StatsPlugin";
|
|
5
6
|
private _options;
|
|
@@ -7,9 +8,13 @@ export declare class StatsPlugin implements WebpackPluginInstance {
|
|
|
7
8
|
private _manifestManager;
|
|
8
9
|
private _enable;
|
|
9
10
|
private _bundler;
|
|
11
|
+
statsInfo?: StatsInfo;
|
|
12
|
+
manifestInfo?: ManifestInfo;
|
|
13
|
+
disableEmit?: boolean;
|
|
10
14
|
constructor(options: moduleFederationPlugin.ModuleFederationPluginOptions, { pluginVersion, bundler, }: {
|
|
11
15
|
pluginVersion: string;
|
|
12
16
|
bundler: 'webpack' | 'rspack';
|
|
13
17
|
});
|
|
14
18
|
apply(compiler: Compiler): void;
|
|
19
|
+
get resourceInfo(): Partial<ResourceInfo>;
|
|
15
20
|
}
|
package/dist/src/index.d.ts
CHANGED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Manifest, Stats } from '@module-federation/sdk';
|
|
2
|
+
export type StatsInfo = {
|
|
3
|
+
stats: Stats;
|
|
4
|
+
filename: string;
|
|
5
|
+
};
|
|
6
|
+
export type ManifestInfo = {
|
|
7
|
+
manifest: Manifest;
|
|
8
|
+
filename: string;
|
|
9
|
+
};
|
|
10
|
+
export type ResourceInfo = {
|
|
11
|
+
stats: StatsInfo;
|
|
12
|
+
manifest: ManifestInfo;
|
|
13
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@module-federation/manifest",
|
|
3
|
-
"version": "0.0.0-next-
|
|
3
|
+
"version": "0.0.0-next-20240515062211",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "Provide manifest/stats for webpack/rspack MF project .",
|
|
6
6
|
"keywords": [
|
|
@@ -24,9 +24,9 @@
|
|
|
24
24
|
"dependencies": {
|
|
25
25
|
"find-pkg": "2.0.0",
|
|
26
26
|
"chalk": "3.0.0",
|
|
27
|
-
"@module-federation/sdk": "0.0.0-next-
|
|
28
|
-
"@module-federation/dts-plugin": "0.0.0-next-
|
|
29
|
-
"@module-federation/managers": "0.0.0-next-
|
|
27
|
+
"@module-federation/sdk": "0.0.0-next-20240515062211",
|
|
28
|
+
"@module-federation/dts-plugin": "0.0.0-next-20240515062211",
|
|
29
|
+
"@module-federation/managers": "0.0.0-next-20240515062211"
|
|
30
30
|
},
|
|
31
31
|
"exports": {
|
|
32
32
|
".": {
|