@appshell/config 1.0.0-alpha.68 → 1.0.0-alpha.70

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.
@@ -16,7 +16,7 @@ export declare const manifestFrom: <TMetadata extends Record<string, unknown>>(t
16
16
  vars: Record<string, Record<string, string | number | undefined>>;
17
17
  components: Record<string, import("./types").PublishedRemote<TMetadata>>;
18
18
  remotes?: string[];
19
- modules: Record<string, import("./types").ModuleFederationPluginOptions>;
19
+ shared?: import("./types").SharedContract;
20
20
  tokens?: Record<string, import("./types").AppshellTokenUsage>;
21
21
  overrides?: import("./types").AppshellOverrides;
22
22
  };
@@ -29,7 +29,7 @@ declare const _default: <TMetadata extends Record<string, unknown>>(templatePath
29
29
  vars: Record<string, Record<string, string | number | undefined>>;
30
30
  components: Record<string, import("./types").PublishedRemote<TMetadata>>;
31
31
  remotes?: string[];
32
- modules: Record<string, import("./types").ModuleFederationPluginOptions>;
32
+ shared?: import("./types").SharedContract;
33
33
  tokens?: Record<string, import("./types").AppshellTokenUsage>;
34
34
  overrides?: import("./types").AppshellOverrides;
35
35
  } | null>;
@@ -1,9 +1,9 @@
1
- import { AppshellTemplate, ConfigMap, PublishedRemote } from '../types';
1
+ import { AppshellTemplate, ConfigMap, PublishedRemote, SharedContract } 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
5
  remotes?: string[];
6
- modules: Record<string, import("../types").ModuleFederationPluginOptions>;
6
+ shared?: SharedContract;
7
7
  tokens?: Record<string, import("../types").AppshellTokenUsage>;
8
8
  overrides?: import("../types").AppshellOverrides;
9
9
  };
@@ -164,12 +164,28 @@ export type AppshellTokenUsage = {
164
164
  required: string[];
165
165
  optional: string[];
166
166
  };
167
+ /** A shared-dependency contract, named as one framework's model among possible models. */
168
+ export type SharedContract = {
169
+ apiVersion: 'federation.appshell.org/v1';
170
+ kind: 'ModuleFederation';
171
+ /** Keyed by share scope, as Module Federation groups them. */
172
+ scopes: Record<string, SharedObject>;
173
+ };
167
174
  export type AppshellManifest<TMetadata = Metadata> = {
168
175
  /** What this package publishes, keyed by federation entrypoint. */
169
176
  components: Record<string, PublishedRemote<TMetadata>>;
170
177
  /** What it consumes, by local name; the application binds each to an address. */
171
178
  remotes?: string[];
172
- modules: Record<string, ModuleFederationPluginOptions>;
179
+ /**
180
+ * The shared-dependency contract this package was built against.
181
+ *
182
+ * Tagged like the loader recipe, and for the same reason: share scopes, singletons and
183
+ * version ranges are Module Federation's model of the problem, which single-spa and
184
+ * import maps solve differently. This replaced `modules`, which stored MF's plugin
185
+ * options verbatim — one reader took two fields from it, while its source paths and
186
+ * type-generation flags sat inside the package digest.
187
+ */
188
+ shared?: SharedContract;
173
189
  vars: Record<string, Record<string, string | number | undefined>>;
174
190
  /** Keyed by federation scope, so a merged manifest still says which package needs what. */
175
191
  tokens?: Record<string, AppshellTokenUsage>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@appshell/config",
3
- "version": "1.0.0-alpha.68",
3
+ "version": "1.0.0-alpha.70",
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": "01fae5c396c09f51af4a3b802dae9decfb29ef93",
34
+ "gitHead": "78219dbc07717a9b2ea92e24371c605675cf7ae8",
35
35
  "dependencies": {
36
- "@appshell/runtime": "^1.0.0-alpha.68",
36
+ "@appshell/runtime": "^1.0.0-alpha.70",
37
37
  "yaml": "^2.8.0"
38
38
  }
39
39
  }