@appshell/config 1.0.0-alpha.23 → 1.0.0-alpha.25
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/README.md +1 -1
- package/dist/main.js +1 -1
- package/dist/types/index.d.ts +1 -1
- package/dist/types/types.d.ts +18 -11
- package/package.json +5 -2
package/dist/types/index.d.ts
CHANGED
|
@@ -11,6 +11,6 @@ export { default as outdated } from './outdated';
|
|
|
11
11
|
export { activate, publish } from './publish';
|
|
12
12
|
export type { PublishOptions, PublishResult } from './publish';
|
|
13
13
|
export { default as sync } from './sync';
|
|
14
|
-
export type { AppshellComposition, AppshellConfig, AppshellConfigRemote, AppshellIndex, AppshellManifest, AppshellRemote, AppshellTemplate, ComparisonResult, ComparisonResults, ComparisonTarget, Metadata, ModuleFederationPluginOptions, PackageSpec, ResolvedRemote, Schema, SharedConfig, SharedModuleSpec, } from './types';
|
|
14
|
+
export type { AppshellComposition, AppshellConfig, AppshellConfigRemote, AppshellIndex, AppshellManifest, AppshellRemote, AppshellTemplate, AppshellTokenUsage, ComparisonResult, ComparisonResults, ComparisonTarget, Metadata, ModuleFederationPluginOptions, PackageSpec, ResolvedRemote, Schema, SharedConfig, SharedObject, SharedModuleSpec, } from './types';
|
|
15
15
|
export * as utils from './utils';
|
|
16
16
|
export * as validators from './validators';
|
package/dist/types/types.d.ts
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
|
+
import type { AppshellIndex, AppshellRemote, Metadata } from '@appshell/runtime';
|
|
1
2
|
import { JSONSchema4, JSONSchema6, JSONSchema7 } from 'json-schema';
|
|
3
|
+
export type { AppshellIndex, AppshellRemote, Metadata } from '@appshell/runtime';
|
|
2
4
|
export type Schema = JSONSchema4 | JSONSchema6 | JSONSchema7;
|
|
3
5
|
export type ConfigValidator = {
|
|
4
6
|
validate: <T>(...config: T[]) => void;
|
|
@@ -68,29 +70,34 @@ export type AppshellTemplate<TMetadata = Metadata> = {
|
|
|
68
70
|
remotes?: Record<string, AppshellConfigRemote<TMetadata>>;
|
|
69
71
|
module: ModuleFederationPluginOptions;
|
|
70
72
|
vars?: Record<string, unknown>;
|
|
73
|
+
tokens?: Record<string, AppshellTokenUsage>;
|
|
71
74
|
overrides?: AppshellOverrides;
|
|
72
75
|
};
|
|
73
76
|
/** Appshell manifest types */
|
|
74
|
-
export type AppshellRemote<TMetadata = Metadata> = {
|
|
75
|
-
id: string;
|
|
76
|
-
manifestUrl: string;
|
|
77
|
-
remoteEntryUrl: string;
|
|
78
|
-
scope: string;
|
|
79
|
-
module: string;
|
|
80
|
-
shareScope?: string;
|
|
81
|
-
metadata: TMetadata;
|
|
82
|
-
};
|
|
83
77
|
export type AppshellOverrides = {
|
|
84
78
|
vars: Record<string, Record<string, string | number | undefined>>;
|
|
85
79
|
};
|
|
80
|
+
/**
|
|
81
|
+
* Which design tokens a package's own output reaches for. Observed from the emitted
|
|
82
|
+
* assets rather than declared: the CSS already says it, and a hand-kept list is a copy
|
|
83
|
+
* that drifts the first time someone adds a token and forgets the yaml.
|
|
84
|
+
*
|
|
85
|
+
* `required` is a reference with no fallback — the package has no plan B. `optional` is
|
|
86
|
+
* `var(--appshell-x, something)`, which degrades on its own. That split is read off what
|
|
87
|
+
* the author wrote rather than asked of them.
|
|
88
|
+
*/
|
|
89
|
+
export type AppshellTokenUsage = {
|
|
90
|
+
required: string[];
|
|
91
|
+
optional: string[];
|
|
92
|
+
};
|
|
86
93
|
export type AppshellManifest<TMetadata = Metadata> = {
|
|
87
94
|
remotes: Record<string, AppshellRemote<TMetadata>>;
|
|
88
95
|
modules: Record<string, ModuleFederationPluginOptions>;
|
|
89
96
|
vars: Record<string, Record<string, string | number | undefined>>;
|
|
97
|
+
/** Keyed by federation scope, so a merged manifest still says which package needs what. */
|
|
98
|
+
tokens?: Record<string, AppshellTokenUsage>;
|
|
90
99
|
overrides?: AppshellOverrides;
|
|
91
100
|
};
|
|
92
|
-
export type AppshellIndex = Record<string, string>;
|
|
93
|
-
export type Metadata = Record<string, unknown>;
|
|
94
101
|
/** An `AppshellRemote` the registry already resolved, so the browser needs no manifest fetch. */
|
|
95
102
|
export type ResolvedRemote<TMetadata = Metadata> = AppshellRemote<TMetadata>;
|
|
96
103
|
/**
|
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.25",
|
|
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",
|
|
@@ -30,5 +30,8 @@
|
|
|
30
30
|
"appshell"
|
|
31
31
|
],
|
|
32
32
|
"license": "MIT",
|
|
33
|
-
"gitHead": "
|
|
33
|
+
"gitHead": "7d90eb91be3cb50aae5aaa680063878dfcaafea2",
|
|
34
|
+
"dependencies": {
|
|
35
|
+
"@appshell/runtime": "^1.0.0-alpha.25"
|
|
36
|
+
}
|
|
34
37
|
}
|