@appshell/config 1.0.0-alpha.90 → 1.0.0-alpha.92
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/main.js +1 -1
- package/dist/types/context.d.ts +5 -1
- package/dist/types/types.d.ts +15 -2
- package/dist/types/utils/config.d.ts +15 -0
- package/dist/types/utils/index.d.ts +1 -1
- package/package.json +3 -3
package/dist/types/context.d.ts
CHANGED
|
@@ -2,7 +2,11 @@ export type AppshellContext = {
|
|
|
2
2
|
registry?: string;
|
|
3
3
|
/** Activation target as `scope/name`. */
|
|
4
4
|
application?: string;
|
|
5
|
-
|
|
5
|
+
/**
|
|
6
|
+
* The addressing default, if one is configured. Optional because there is no honest
|
|
7
|
+
* value to invent when there is not — see `qualify`.
|
|
8
|
+
*/
|
|
9
|
+
scopeId?: string;
|
|
6
10
|
token?: string;
|
|
7
11
|
};
|
|
8
12
|
/**
|
package/dist/types/types.d.ts
CHANGED
|
@@ -51,7 +51,7 @@ export type ComparisonTarget = {
|
|
|
51
51
|
* It used to live in the set handler, and adding `caFile` to CliConfig without touching it
|
|
52
52
|
* produced a setting the cli could read and refuse to write.
|
|
53
53
|
*/
|
|
54
|
-
export declare const CLI_SETTINGS: readonly ["registry", "application", "
|
|
54
|
+
export declare const CLI_SETTINGS: readonly ["registry", "application", "defaultScope", "authIssuer", "clientId", "apiKey", "apiKeyHeader", "caFile"];
|
|
55
55
|
export type CliSetting = (typeof CLI_SETTINGS)[number];
|
|
56
56
|
export type CliConfig = Record<string, string> & {
|
|
57
57
|
apiKey: string;
|
|
@@ -63,7 +63,20 @@ export type CliConfig = Record<string, string> & {
|
|
|
63
63
|
caFile?: string;
|
|
64
64
|
registry: string;
|
|
65
65
|
application: string;
|
|
66
|
-
|
|
66
|
+
/**
|
|
67
|
+
* Which namespace an unqualified name belongs to, absent anything better.
|
|
68
|
+
*
|
|
69
|
+
* Addressing only, and named for it. It was `scope-id`, which read as *the scope this
|
|
70
|
+
* account has* — identity — and it is not: the registry takes a caller's scope from the
|
|
71
|
+
* token, and this value never reaches it. Publishing takes it from the package name.
|
|
72
|
+
* So a `scope-id` here decided where names resolved while something else decided where
|
|
73
|
+
* writes landed, and the two could disagree without anything saying so.
|
|
74
|
+
*
|
|
75
|
+
* It earns its place all the same: `resolveScopeId` falls back to the account's own
|
|
76
|
+
* scope and deliberately refuses to guess when an account owns several, and this is how
|
|
77
|
+
* that is settled without passing a flag to every command.
|
|
78
|
+
*/
|
|
79
|
+
defaultScope: string;
|
|
67
80
|
authIssuer: string;
|
|
68
81
|
clientId: string;
|
|
69
82
|
};
|
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
import yargs from 'yargs';
|
|
2
2
|
import { CliConfig } from '../types';
|
|
3
|
+
/**
|
|
4
|
+
* The addressing default: which namespace an unqualified name resolves to.
|
|
5
|
+
*
|
|
6
|
+
* Named `default-scope` and not `scope-id`, because the old name described identity —
|
|
7
|
+
* *the scope this account has* — and the value has never been that. The registry takes a
|
|
8
|
+
* caller's scope from the token and publishing takes it from the package name; this
|
|
9
|
+
* reaches neither. A `scope-id` deciding where names resolved while something else decided
|
|
10
|
+
* where writes landed is how the two came to disagree without anything saying so.
|
|
11
|
+
*
|
|
12
|
+
* Stated once because the cli and the webpack plugin both need the answer, and two
|
|
13
|
+
* precedence chains for one setting is how they drift apart.
|
|
14
|
+
*/
|
|
15
|
+
export declare const resolveDefaultScope: (config: {
|
|
16
|
+
defaultScope?: string;
|
|
17
|
+
}, env?: NodeJS.ProcessEnv) => string | undefined;
|
|
3
18
|
export declare const readConfig: (configPath: string) => CliConfig;
|
|
4
19
|
export declare const writeConfig: (configPath: string, config: CliConfig) => void;
|
|
5
20
|
export declare const mergeConfigWithArgs: (config: CliConfig, argv: yargs.ArgumentsCamelCase<unknown>) => void;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export { default as blur } from './blur';
|
|
2
2
|
export { compareDependencies, compareDependency, compareSharedDependencies, compareSharedModules, extractDependencies, printResults, } from './compare';
|
|
3
|
-
export { mergeConfigWithArgs, readConfig, writeConfig } from './config';
|
|
3
|
+
export { mergeConfigWithArgs, readConfig, resolveDefaultScope, writeConfig } from './config';
|
|
4
4
|
export { default as copy } from './copy';
|
|
5
5
|
export { default as dump } from './dump';
|
|
6
6
|
export { default as list } from './list';
|
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.92",
|
|
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": "e882b41193588bb623ada8db1e4f62b07032b21d",
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@appshell/runtime": "^1.0.0-alpha.
|
|
36
|
+
"@appshell/runtime": "^1.0.0-alpha.92",
|
|
37
37
|
"yaml": "^2.8.0"
|
|
38
38
|
}
|
|
39
39
|
}
|