@sortlist/cli 0.27.0 → 0.28.0
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/package.json +1 -1
- package/src/commands/config.ts +6 -4
package/package.json
CHANGED
package/src/commands/config.ts
CHANGED
|
@@ -13,10 +13,10 @@ export const configCommand = new Command('config')
|
|
|
13
13
|
.summary('View or update CLI configuration')
|
|
14
14
|
.description(
|
|
15
15
|
'View or update CLI configuration\n\n' +
|
|
16
|
-
'Manage your
|
|
16
|
+
'Manage your company context and credentials.\n\n' +
|
|
17
17
|
'Examples:\n' +
|
|
18
18
|
' sl config show See current endpoint and company\n' +
|
|
19
|
-
' sl config set endpoint <url> Point to a custom endpoint\n' +
|
|
19
|
+
(isLocalDev ? ' sl config set endpoint <url> Point to a custom endpoint\n' : '') +
|
|
20
20
|
' sl config reset Clear all config and credentials',
|
|
21
21
|
);
|
|
22
22
|
|
|
@@ -38,9 +38,11 @@ configCommand
|
|
|
38
38
|
|
|
39
39
|
configCommand
|
|
40
40
|
.command('set <key> <value>')
|
|
41
|
-
.description(
|
|
41
|
+
.description(`Set a config value (${isLocalDev ? 'endpoint, ' : ''}companyId, companySlug)`)
|
|
42
42
|
.action((key: string, value: string) => {
|
|
43
|
-
|
|
43
|
+
// `endpoint` is dev-only — published builds always target production, so the
|
|
44
|
+
// endpoint must not be overridable there (mirrors the gated use-* commands).
|
|
45
|
+
const allowed = [...(isLocalDev ? ['endpoint'] : []), 'companyId', 'companySlug', 'companyName', 'oauthId'];
|
|
44
46
|
if (!allowed.includes(key)) {
|
|
45
47
|
error(`Unknown config key: "${key}".`);
|
|
46
48
|
info('');
|