@appshell/config 1.0.0-alpha.67 → 1.0.0-alpha.68
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.
|
@@ -14,7 +14,8 @@ import { AppshellTemplate } from './types';
|
|
|
14
14
|
*/
|
|
15
15
|
export declare const manifestFrom: <TMetadata extends Record<string, unknown>>(template: AppshellTemplate) => {
|
|
16
16
|
vars: Record<string, Record<string, string | number | undefined>>;
|
|
17
|
-
|
|
17
|
+
components: Record<string, import("./types").PublishedRemote<TMetadata>>;
|
|
18
|
+
remotes?: string[];
|
|
18
19
|
modules: Record<string, import("./types").ModuleFederationPluginOptions>;
|
|
19
20
|
tokens?: Record<string, import("./types").AppshellTokenUsage>;
|
|
20
21
|
overrides?: import("./types").AppshellOverrides;
|
|
@@ -26,7 +27,8 @@ export declare const manifestFrom: <TMetadata extends Record<string, unknown>>(t
|
|
|
26
27
|
*/
|
|
27
28
|
declare const _default: <TMetadata extends Record<string, unknown>>(templatePath: string) => Promise<{
|
|
28
29
|
vars: Record<string, Record<string, string | number | undefined>>;
|
|
29
|
-
|
|
30
|
+
components: Record<string, import("./types").PublishedRemote<TMetadata>>;
|
|
31
|
+
remotes?: string[];
|
|
30
32
|
modules: Record<string, import("./types").ModuleFederationPluginOptions>;
|
|
31
33
|
tokens?: Record<string, import("./types").AppshellTokenUsage>;
|
|
32
34
|
overrides?: import("./types").AppshellOverrides;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { AppshellTemplate, ConfigMap, PublishedRemote } from '../types';
|
|
2
2
|
export declare const toAppshellManifest: <TMetadata extends Record<string, unknown>>(template: AppshellTemplate, args: ConfigMap) => {
|
|
3
3
|
vars: Record<string, Record<string, string | number | undefined>>;
|
|
4
|
-
|
|
4
|
+
components: Record<string, PublishedRemote<TMetadata>>;
|
|
5
|
+
remotes?: string[];
|
|
5
6
|
modules: Record<string, import("../types").ModuleFederationPluginOptions>;
|
|
6
7
|
tokens?: Record<string, import("../types").AppshellTokenUsage>;
|
|
7
8
|
overrides?: import("../types").AppshellOverrides;
|
package/dist/types/types.d.ts
CHANGED
|
@@ -93,7 +93,28 @@ export type AppshellConfig<TMetadata = Metadata> = {
|
|
|
93
93
|
* content changing identity.
|
|
94
94
|
*/
|
|
95
95
|
visibility?: 'public' | 'private';
|
|
96
|
-
|
|
96
|
+
/**
|
|
97
|
+
* What this package publishes, keyed by federation entrypoint.
|
|
98
|
+
*
|
|
99
|
+
* Appshell's own word rather than a framework's. It was `remotes`, which is MF's word
|
|
100
|
+
* for the opposite — what a package consumes — so the file read inverted to anyone who
|
|
101
|
+
* knew the framework. `exposes` would fix that and put MF's vocabulary at the top level
|
|
102
|
+
* of appshell's model, which is what the loader recipe exists to prevent.
|
|
103
|
+
*/
|
|
104
|
+
components?: Record<string, AppshellConfigRemote<TMetadata>>;
|
|
105
|
+
/**
|
|
106
|
+
* What this package consumes, by the name it refers to them by.
|
|
107
|
+
*
|
|
108
|
+
* A flat list because a referenced remote is required by definition: unbound, the region
|
|
109
|
+
* renders an error. `RemoteSlot`'s `fallback` is a loading placeholder — it shows while
|
|
110
|
+
* the remote arrives, not when it is absent — so unlike a design token's `var()`
|
|
111
|
+
* fallback it describes no degraded-but-working state.
|
|
112
|
+
*
|
|
113
|
+
* The application binds each name to a registry address, so a package never states the
|
|
114
|
+
* scope its siblings were published into — which it cannot know, since scope is assigned
|
|
115
|
+
* by whoever publishes.
|
|
116
|
+
*/
|
|
117
|
+
remotes?: string[];
|
|
97
118
|
vars?: Record<string, unknown>;
|
|
98
119
|
overrides?: AppshellOverrides;
|
|
99
120
|
};
|
|
@@ -101,7 +122,8 @@ export type AppshellTemplate<TMetadata = Metadata> = {
|
|
|
101
122
|
name?: string;
|
|
102
123
|
/** Carried from the yaml for publish to read; never mapped into the manifest. */
|
|
103
124
|
visibility?: 'public' | 'private';
|
|
104
|
-
|
|
125
|
+
components?: Record<string, AppshellConfigRemote<TMetadata>>;
|
|
126
|
+
remotes?: string[];
|
|
105
127
|
module: ModuleFederationPluginOptions;
|
|
106
128
|
vars?: Record<string, unknown>;
|
|
107
129
|
tokens?: Record<string, AppshellTokenUsage>;
|
|
@@ -143,7 +165,10 @@ export type AppshellTokenUsage = {
|
|
|
143
165
|
optional: string[];
|
|
144
166
|
};
|
|
145
167
|
export type AppshellManifest<TMetadata = Metadata> = {
|
|
146
|
-
|
|
168
|
+
/** What this package publishes, keyed by federation entrypoint. */
|
|
169
|
+
components: Record<string, PublishedRemote<TMetadata>>;
|
|
170
|
+
/** What it consumes, by local name; the application binds each to an address. */
|
|
171
|
+
remotes?: string[];
|
|
147
172
|
modules: Record<string, ModuleFederationPluginOptions>;
|
|
148
173
|
vars: Record<string, Record<string, string | number | undefined>>;
|
|
149
174
|
/** Keyed by federation scope, so a merged manifest still says which package needs what. */
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@appshell/config",
|
|
3
|
-
"version": "1.0.0-alpha.
|
|
3
|
+
"version": "1.0.0-alpha.68",
|
|
4
4
|
"description": "Utility for producing a global appshell manifest for module federation micro-frontends",
|
|
5
5
|
"main": "dist/main.js",
|
|
6
6
|
"types": "dist/types/index.d.ts",
|
|
@@ -31,9 +31,9 @@
|
|
|
31
31
|
"appshell"
|
|
32
32
|
],
|
|
33
33
|
"license": "MIT",
|
|
34
|
-
"gitHead": "
|
|
34
|
+
"gitHead": "01fae5c396c09f51af4a3b802dae9decfb29ef93",
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@appshell/runtime": "^1.0.0-alpha.
|
|
36
|
+
"@appshell/runtime": "^1.0.0-alpha.68",
|
|
37
37
|
"yaml": "^2.8.0"
|
|
38
38
|
}
|
|
39
39
|
}
|