@appshell/webpack-plugin 1.0.0-alpha.70 → 1.0.0-alpha.72
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.
|
@@ -17,6 +17,7 @@ export declare const manifestFrom: <TMetadata extends Record<string, unknown>>(t
|
|
|
17
17
|
components: Record<string, import("./types").PublishedRemote<TMetadata>>;
|
|
18
18
|
remotes?: string[];
|
|
19
19
|
shared?: import("./types").SharedContract;
|
|
20
|
+
bundle?: import("./types").BundleDigest;
|
|
20
21
|
tokens?: Record<string, import("./types").AppshellTokenUsage>;
|
|
21
22
|
overrides?: import("./types").AppshellOverrides;
|
|
22
23
|
};
|
|
@@ -30,6 +31,7 @@ declare const _default: <TMetadata extends Record<string, unknown>>(templatePath
|
|
|
30
31
|
components: Record<string, import("./types").PublishedRemote<TMetadata>>;
|
|
31
32
|
remotes?: string[];
|
|
32
33
|
shared?: import("./types").SharedContract;
|
|
34
|
+
bundle?: import("./types").BundleDigest;
|
|
33
35
|
tokens?: Record<string, import("./types").AppshellTokenUsage>;
|
|
34
36
|
overrides?: import("./types").AppshellOverrides;
|
|
35
37
|
} | null>;
|
|
@@ -4,6 +4,7 @@ export declare const toAppshellManifest: <TMetadata extends Record<string, unkno
|
|
|
4
4
|
components: Record<string, PublishedRemote<TMetadata>>;
|
|
5
5
|
remotes?: string[];
|
|
6
6
|
shared?: SharedContract;
|
|
7
|
+
bundle?: import("../types").BundleDigest;
|
|
7
8
|
tokens?: Record<string, import("../types").AppshellTokenUsage>;
|
|
8
9
|
overrides?: import("../types").AppshellOverrides;
|
|
9
10
|
};
|
|
@@ -120,6 +120,11 @@ export type AppshellConfig<TMetadata = Metadata> = {
|
|
|
120
120
|
};
|
|
121
121
|
export type AppshellTemplate<TMetadata = Metadata> = {
|
|
122
122
|
name?: string;
|
|
123
|
+
/**
|
|
124
|
+
* Digest of everything the build emitted, computed during the compilation. On the
|
|
125
|
+
* template rather than in the yaml because only the build knows it.
|
|
126
|
+
*/
|
|
127
|
+
bundle?: BundleDigest;
|
|
123
128
|
/** Carried from the yaml for publish to read; never mapped into the manifest. */
|
|
124
129
|
visibility?: 'public' | 'private';
|
|
125
130
|
components?: Record<string, AppshellConfigRemote<TMetadata>>;
|
|
@@ -164,6 +169,24 @@ export type AppshellTokenUsage = {
|
|
|
164
169
|
required: string[];
|
|
165
170
|
optional: string[];
|
|
166
171
|
};
|
|
172
|
+
/**
|
|
173
|
+
* A digest of the bytes a package emitted, so its identity covers its code.
|
|
174
|
+
*
|
|
175
|
+
* Without it a manifest describes a bundle it cannot vouch for. The addresses a package
|
|
176
|
+
* asks the registry for live in its source, not in anything it declares — so an edit that
|
|
177
|
+
* changed which remotes it loads left the manifest byte-identical, and republishing the
|
|
178
|
+
* changed build was a no-op rather than a version conflict. Two builds that differ
|
|
179
|
+
* anywhere are now different packages.
|
|
180
|
+
*
|
|
181
|
+
* Over every emitted asset rather than the entry alone. The entry does change whenever a
|
|
182
|
+
* chunk does — but only where chunk filenames carry a content hash, which is a convention
|
|
183
|
+
* a project may not follow and nothing here can enforce.
|
|
184
|
+
*/
|
|
185
|
+
export type BundleDigest = {
|
|
186
|
+
algorithm: 'sha384';
|
|
187
|
+
/** Base64, over each asset's name and bytes in sorted order. */
|
|
188
|
+
digest: string;
|
|
189
|
+
};
|
|
167
190
|
/** A shared-dependency contract, named as one framework's model among possible models. */
|
|
168
191
|
export type SharedContract = {
|
|
169
192
|
apiVersion: 'federation.appshell.org/v1';
|
|
@@ -186,6 +209,8 @@ export type AppshellManifest<TMetadata = Metadata> = {
|
|
|
186
209
|
* type-generation flags sat inside the package digest.
|
|
187
210
|
*/
|
|
188
211
|
shared?: SharedContract;
|
|
212
|
+
/** What this package's code hashes to; absent when built outside a compilation. */
|
|
213
|
+
bundle?: BundleDigest;
|
|
189
214
|
vars: Record<string, Record<string, string | number | undefined>>;
|
|
190
215
|
/** Keyed by federation scope, so a merged manifest still says which package needs what. */
|
|
191
216
|
tokens?: Record<string, AppshellTokenUsage>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@appshell/webpack-plugin",
|
|
3
|
-
"version": "1.0.0-alpha.
|
|
3
|
+
"version": "1.0.0-alpha.72",
|
|
4
4
|
"description": "Webpack plugin used to generate a global Appshell configuration for micro-frontends built with Module Federation",
|
|
5
5
|
"main": "dist/main.js",
|
|
6
6
|
"types": "dist/types/webpack-plugin/src/index.d.ts",
|
|
@@ -33,8 +33,8 @@
|
|
|
33
33
|
"plugin"
|
|
34
34
|
],
|
|
35
35
|
"license": "MIT",
|
|
36
|
-
"gitHead": "
|
|
36
|
+
"gitHead": "524614beb8b6b0f364531986746f1c67ea91d445",
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@appshell/tokens": "^1.0.0-alpha.
|
|
38
|
+
"@appshell/tokens": "^1.0.0-alpha.72"
|
|
39
39
|
}
|
|
40
40
|
}
|