@quonfig/cli 0.0.59 → 0.0.61

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,11 +14,19 @@ export interface ResolvedWorkspace {
14
14
  * don't extend APICommand (e.g. pull, push — which talk to Gitea, not the
15
15
  * oRPC API, but still need to mint a Gitea token for the right org).
16
16
  *
17
- * Handles all three auth paths in the same order as util/get-client.ts:
18
- * 1. QUONFIG_API_KEY + QUONFIG_WORKSPACE (or --workspace flag) — CI/headless.
19
- * 2. OAuth profile — the default interactive path.
17
+ * Resolution precedence (qfg-08i):
18
+ * 1. --workspace flag
19
+ * 2. QUONFIG_WORKSPACE env
20
+ * 3. the target dir's quonfig.json `workspace` pin (when `dir` is given)
21
+ * 4. active OAuth profile / QUONFIG_API_KEY + QUONFIG_WORKSPACE
22
+ *
23
+ * Ranking the pin above the active profile makes a pinned workspace dir
24
+ * self-describing: a bare `qfg pull`/`qfg sync` inside it targets the pinned
25
+ * workspace no matter which workspace the user's default profile points at.
26
+ * Without this, `qfg sync --dir ./our-config` under an unrelated active
27
+ * profile would rewrite that dir's git origin to the wrong workspace.
20
28
  *
21
29
  * Mirrors the error messages from get-client.ts so behavior feels identical
22
30
  * whether you're hitting the API directly or going through Gitea.
23
31
  */
24
- export declare function resolveWorkspaceUuid(command: BaseCommand, flagOverride?: string): Promise<ResolvedWorkspace>;
32
+ export declare function resolveWorkspaceUuid(command: BaseCommand, flagOverride?: string, dir?: string): Promise<ResolvedWorkspace>;
@@ -1,6 +1,6 @@
1
1
  import { getApiUrl } from './domain-urls.js';
2
2
  import { getValidAccessToken } from './get-valid-token.js';
3
- import { tryParseWorkspacePin } from './quonfig-json.js';
3
+ import { readWorkspaceSlug, tryParseWorkspacePin } from './quonfig-json.js';
4
4
  import { findOrgIdBySlug, getActiveProfile, loadAuthConfig, loadTokens, saveAuthConfig, } from './token-storage.js';
5
5
  const UUID_PATTERN = /^[\da-f]{8}(?:-[\da-f]{4}){3}-[\da-f]{12}$/i;
6
6
  const BARE_SLUG_ENV_MIGRATION_MESSAGE = 'QUONFIG_WORKSPACE must be in org/workspace form (e.g. acme/foo). ' +
@@ -10,25 +10,43 @@ const BARE_SLUG_ENV_MIGRATION_MESSAGE = 'QUONFIG_WORKSPACE must be in org/worksp
10
10
  * don't extend APICommand (e.g. pull, push — which talk to Gitea, not the
11
11
  * oRPC API, but still need to mint a Gitea token for the right org).
12
12
  *
13
- * Handles all three auth paths in the same order as util/get-client.ts:
14
- * 1. QUONFIG_API_KEY + QUONFIG_WORKSPACE (or --workspace flag) — CI/headless.
15
- * 2. OAuth profile — the default interactive path.
13
+ * Resolution precedence (qfg-08i):
14
+ * 1. --workspace flag
15
+ * 2. QUONFIG_WORKSPACE env
16
+ * 3. the target dir's quonfig.json `workspace` pin (when `dir` is given)
17
+ * 4. active OAuth profile / QUONFIG_API_KEY + QUONFIG_WORKSPACE
18
+ *
19
+ * Ranking the pin above the active profile makes a pinned workspace dir
20
+ * self-describing: a bare `qfg pull`/`qfg sync` inside it targets the pinned
21
+ * workspace no matter which workspace the user's default profile points at.
22
+ * Without this, `qfg sync --dir ./our-config` under an unrelated active
23
+ * profile would rewrite that dir's git origin to the wrong workspace.
16
24
  *
17
25
  * Mirrors the error messages from get-client.ts so behavior feels identical
18
26
  * whether you're hitting the API directly or going through Gitea.
19
27
  */
20
- export async function resolveWorkspaceUuid(command, flagOverride) {
21
- const override = flagOverride ?? process.env.QUONFIG_WORKSPACE;
28
+ export async function resolveWorkspaceUuid(command, flagOverride, dir) {
29
+ // The pin only acts as a fallback BELOW the flag and env var, so a user can
30
+ // always point a pinned dir at a different workspace for a one-off command.
31
+ const pinOverride = flagOverride || process.env.QUONFIG_WORKSPACE ? undefined : await readPinOverride(command, dir);
32
+ const override = flagOverride ?? process.env.QUONFIG_WORKSPACE ?? pinOverride;
22
33
  const apiKey = process.env.QUONFIG_API_KEY;
23
34
  if (apiKey && apiKey.length > 0) {
24
35
  if (!override) {
25
- command.error('QUONFIG_API_KEY is set but QUONFIG_WORKSPACE is not. Set QUONFIG_WORKSPACE=<workspace-slug> or pass --workspace=<slug>. (UUIDs also work.)', { exit: 1 });
36
+ command.error('QUONFIG_API_KEY is set but QUONFIG_WORKSPACE is not. Set QUONFIG_WORKSPACE=<org>/<workspace> (e.g. acme/foo) or pass --workspace=<org>/<workspace>. (UUIDs also work.)', { exit: 1 });
26
37
  }
27
38
  if (UUID_PATTERN.test(override)) {
28
39
  command.verboseLog('ApiKey auth', { source: 'uuid', workspaceId: override });
29
40
  return { workspaceId: override, orgSlug: '' };
30
41
  }
31
- // Slug — resolve via the server since there's no local auth config in CI mode.
42
+ // QUONFIG_WORKSPACE must be org-qualified, the same single form used by
43
+ // quonfig.json, the interactive shell, and every error message (qfg-dl87).
44
+ // Bare slugs are rejected here too so there is no per-surface special case.
45
+ const pin = tryParseWorkspacePin(override);
46
+ if (!pin) {
47
+ command.error(BARE_SLUG_ENV_MIGRATION_MESSAGE, { exit: 1 });
48
+ }
49
+ // Resolve via the server since there's no local auth config in CI mode.
32
50
  // API-key path short-circuits before consulting the orgId.
33
51
  const jwt = await getValidAccessToken('', command.verboseLog);
34
52
  let res;
@@ -40,21 +58,25 @@ export async function resolveWorkspaceUuid(command, flagOverride) {
40
58
  });
41
59
  }
42
60
  catch (error) {
43
- command.error(`Failed to resolve workspace slug "${override}": ${error instanceof Error ? error.message : String(error)}`, { exit: 1 });
61
+ command.error(`Failed to resolve workspace "${override}": ${error instanceof Error ? error.message : String(error)}`, { exit: 1 });
44
62
  }
45
63
  if (!res.ok) {
46
- command.error(`Failed to resolve workspace slug "${override}" (HTTP ${res.status}). Check that QUONFIG_API_KEY is valid.`, { exit: 1 });
64
+ command.error(`Failed to resolve workspace "${override}" (HTTP ${res.status}). Check that QUONFIG_API_KEY is valid.`, { exit: 1 });
47
65
  }
48
66
  const body = (await res.json());
49
67
  const entries = body.json ?? body ?? [];
50
- const match = entries.find((w) => w.workspaceSlug === override);
68
+ // Match on the org-qualified pin so a slug shared across orgs resolves
69
+ // to the right workspace.
70
+ const match = entries.find((w) => w.organizationSlug === pin.orgSlug && w.workspaceSlug === pin.workspaceSlug);
51
71
  if (!match) {
52
- const available = entries.map((w) => w.workspaceSlug).join(', ') || '(none)';
53
- command.error(`No workspace with slug "${override}" is accessible with this API key. Available: ${available}.`, {
72
+ const available = entries
73
+ .map((w) => (w.organizationSlug ? `${w.organizationSlug}/${w.workspaceSlug}` : w.workspaceSlug))
74
+ .join(', ') || '(none)';
75
+ command.error(`No workspace matching "${override}" is accessible with this API key. Available: ${available}.`, {
54
76
  exit: 1,
55
77
  });
56
78
  }
57
- command.verboseLog('ApiKey auth', { source: 'slug', slug: override, workspaceId: match.workspaceId });
79
+ command.verboseLog('ApiKey auth', { source: 'org/ws', pin, workspaceId: match.workspaceId });
58
80
  return { workspaceId: match.workspaceId, orgSlug: '' };
59
81
  }
60
82
  // OAuth path with an explicit override → must be in org/ws form.
@@ -82,6 +104,33 @@ export async function resolveWorkspaceUuid(command, flagOverride) {
82
104
  }
83
105
  return { workspaceId: profileData.workspace, orgSlug: profileData.organizationSlug };
84
106
  }
107
+ /**
108
+ * Read the `<org>/<ws>` workspace pin from `<dir>/quonfig.json`, returning it
109
+ * as the same override string the flag/env path accepts. Returns `undefined`
110
+ * when no dir is given, the file/field is absent, or the pin can't be parsed
111
+ * (e.g. a legacy bare slug) — resolution then falls through to the active
112
+ * profile, exactly as before this fix. A malformed pin must never crash
113
+ * `qfg pull`/`qfg sync`, so all errors degrade to `undefined` with a verbose
114
+ * log rather than propagating.
115
+ */
116
+ async function readPinOverride(command, dir) {
117
+ if (!dir)
118
+ return undefined;
119
+ try {
120
+ const pin = await readWorkspaceSlug(dir);
121
+ if (!pin)
122
+ return undefined;
123
+ command.verboseLog('resolve-workspace: using quonfig.json pin', pin);
124
+ return `${pin.orgSlug}/${pin.workspaceSlug}`;
125
+ }
126
+ catch (error) {
127
+ command.verboseLog('resolve-workspace: ignoring unreadable quonfig.json pin', {
128
+ dir,
129
+ error: error instanceof Error ? error.message : String(error),
130
+ });
131
+ return undefined;
132
+ }
133
+ }
85
134
  /**
86
135
  * OAuth-mode resolver for an explicit `<org-slug>/<workspace-slug>` override.
87
136
  *
package/dist/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- declare const _default: "0.0.59";
1
+ declare const _default: "0.0.61";
2
2
  export default _default;
package/dist/version.js CHANGED
@@ -1,2 +1,2 @@
1
1
  // AUTO-GENERATED from package.json by scripts/generate-version.mjs — do not edit.
2
- export default '0.0.59';
2
+ export default '0.0.61';
@@ -3646,14 +3646,13 @@
3646
3646
  "status.js"
3647
3647
  ]
3648
3648
  },
3649
- "workspace:bootstrap": {
3649
+ "sdk-key:create": {
3650
3650
  "aliases": [],
3651
3651
  "args": {},
3652
- "description": "Push a local git repo to Gitea as this workspace's config repository",
3652
+ "description": "Create a new SDK key",
3653
3653
  "examples": [
3654
- "<%= config.bin %> workspace bootstrap --dir ./our-config",
3655
- "<%= config.bin %> workspace bootstrap --dir ./launch-migrator/output",
3656
- "<%= config.bin %> workspace bootstrap --dir ./our-config --skip-validate"
3654
+ "<%= config.bin %> <%= command.id %> --environment production --type server",
3655
+ "<%= config.bin %> <%= command.id %> --environment staging --type browser"
3657
3656
  ],
3658
3657
  "flags": {
3659
3658
  "json": {
@@ -3685,30 +3684,53 @@
3685
3684
  "allowNo": false,
3686
3685
  "type": "boolean"
3687
3686
  },
3688
- "dir": {
3689
- "description": "Local directory to push (defaults to current directory)",
3690
- "name": "dir",
3687
+ "workspace": {
3688
+ "char": "w",
3689
+ "description": "Workspace slug to use (overrides QUONFIG_WORKSPACE env var and saved default)",
3690
+ "helpGroup": "GLOBAL",
3691
+ "name": "workspace",
3691
3692
  "required": false,
3692
3693
  "hasDynamicHelp": false,
3693
3694
  "multiple": false,
3694
3695
  "type": "option"
3695
3696
  },
3696
- "force": {
3697
- "description": "Force push even if remote already has commits",
3698
- "name": "force",
3699
- "allowNo": false,
3700
- "type": "boolean"
3697
+ "profile": {
3698
+ "char": "p",
3699
+ "description": "Deprecated: use --workspace instead",
3700
+ "helpGroup": "GLOBAL",
3701
+ "hidden": true,
3702
+ "name": "profile",
3703
+ "required": false,
3704
+ "hasDynamicHelp": false,
3705
+ "multiple": false,
3706
+ "type": "option"
3701
3707
  },
3702
- "skip-validate": {
3703
- "description": "Skip config validation before pushing",
3704
- "name": "skip-validate",
3705
- "allowNo": false,
3706
- "type": "boolean"
3708
+ "environment": {
3709
+ "char": "e",
3710
+ "description": "Environment name (e.g. production, staging)",
3711
+ "name": "environment",
3712
+ "required": false,
3713
+ "hasDynamicHelp": false,
3714
+ "multiple": false,
3715
+ "type": "option"
3716
+ },
3717
+ "type": {
3718
+ "char": "t",
3719
+ "description": "Key type: server (backend) or browser (frontend)",
3720
+ "name": "type",
3721
+ "required": false,
3722
+ "hasDynamicHelp": false,
3723
+ "multiple": false,
3724
+ "options": [
3725
+ "server",
3726
+ "browser"
3727
+ ],
3728
+ "type": "option"
3707
3729
  }
3708
3730
  },
3709
3731
  "hasDynamicHelp": false,
3710
3732
  "hiddenAliases": [],
3711
- "id": "workspace:bootstrap",
3733
+ "id": "sdk-key:create",
3712
3734
  "pluginAlias": "@quonfig/cli",
3713
3735
  "pluginName": "@quonfig/cli",
3714
3736
  "pluginType": "core",
@@ -3718,24 +3740,17 @@
3718
3740
  "relativePath": [
3719
3741
  "dist",
3720
3742
  "commands",
3721
- "workspace",
3722
- "bootstrap.js"
3743
+ "sdk-key",
3744
+ "create.js"
3723
3745
  ]
3724
3746
  },
3725
- "workspace:create": {
3747
+ "sdk-key:list": {
3726
3748
  "aliases": [],
3727
- "args": {
3728
- "slug": {
3729
- "description": "Workspace slug (lowercase letters, numbers, hyphens)",
3730
- "name": "slug",
3731
- "required": true
3732
- }
3733
- },
3734
- "description": "Create a new workspace. Provisions the Gitea repo and default environments, identical to the app's New Workspace UI.",
3749
+ "args": {},
3750
+ "description": "List SDK keys for your workspace",
3735
3751
  "examples": [
3736
- "<%= config.bin %> <%= command.id %> my-team",
3737
- "<%= config.bin %> <%= command.id %> lt-21-smoke --name \"Load Test 21\"",
3738
- "<%= config.bin %> <%= command.id %> my-team --org 11111111-1111-1111-1111-111111111111"
3752
+ "<%= config.bin %> <%= command.id %>",
3753
+ "<%= config.bin %> <%= command.id %> --environment production"
3739
3754
  ],
3740
3755
  "flags": {
3741
3756
  "json": {
@@ -3767,17 +3782,31 @@
3767
3782
  "allowNo": false,
3768
3783
  "type": "boolean"
3769
3784
  },
3770
- "name": {
3771
- "description": "Human-readable display name (defaults to the slug)",
3772
- "name": "name",
3785
+ "workspace": {
3786
+ "char": "w",
3787
+ "description": "Workspace slug to use (overrides QUONFIG_WORKSPACE env var and saved default)",
3788
+ "helpGroup": "GLOBAL",
3789
+ "name": "workspace",
3773
3790
  "required": false,
3774
3791
  "hasDynamicHelp": false,
3775
3792
  "multiple": false,
3776
3793
  "type": "option"
3777
3794
  },
3778
- "org": {
3779
- "description": "Organization UUID or slug. Required when you belong to more than one organization; inferred otherwise.",
3780
- "name": "org",
3795
+ "profile": {
3796
+ "char": "p",
3797
+ "description": "Deprecated: use --workspace instead",
3798
+ "helpGroup": "GLOBAL",
3799
+ "hidden": true,
3800
+ "name": "profile",
3801
+ "required": false,
3802
+ "hasDynamicHelp": false,
3803
+ "multiple": false,
3804
+ "type": "option"
3805
+ },
3806
+ "environment": {
3807
+ "char": "e",
3808
+ "description": "Filter by environment name",
3809
+ "name": "environment",
3781
3810
  "required": false,
3782
3811
  "hasDynamicHelp": false,
3783
3812
  "multiple": false,
@@ -3786,7 +3815,7 @@
3786
3815
  },
3787
3816
  "hasDynamicHelp": false,
3788
3817
  "hiddenAliases": [],
3789
- "id": "workspace:create",
3818
+ "id": "sdk-key:list",
3790
3819
  "pluginAlias": "@quonfig/cli",
3791
3820
  "pluginName": "@quonfig/cli",
3792
3821
  "pluginType": "core",
@@ -3796,23 +3825,22 @@
3796
3825
  "relativePath": [
3797
3826
  "dist",
3798
3827
  "commands",
3799
- "workspace",
3800
- "create.js"
3828
+ "sdk-key",
3829
+ "list.js"
3801
3830
  ]
3802
3831
  },
3803
- "workspace:switch": {
3832
+ "sdk-key:revoke": {
3804
3833
  "aliases": [],
3805
3834
  "args": {
3806
- "slug": {
3807
- "description": "Workspace pin in `<org-slug>/<workspace-slug>` form. Omit for an interactive picker.",
3808
- "name": "slug",
3809
- "required": false
3835
+ "keyId": {
3836
+ "description": "ID of the SDK key to revoke",
3837
+ "name": "keyId",
3838
+ "required": true
3810
3839
  }
3811
3840
  },
3812
- "description": "Switch the saved default profile to a different (org, workspace) pair",
3841
+ "description": "Revoke an SDK key by its ID",
3813
3842
  "examples": [
3814
- "<%= config.bin %> <%= command.id %>",
3815
- "<%= config.bin %> <%= command.id %> acme/production"
3843
+ "<%= config.bin %> <%= command.id %> a1b2c3d4-e5f6-7890-abcd-ef1234567890"
3816
3844
  ],
3817
3845
  "flags": {
3818
3846
  "json": {
@@ -3843,11 +3871,32 @@
3843
3871
  "name": "verbose",
3844
3872
  "allowNo": false,
3845
3873
  "type": "boolean"
3874
+ },
3875
+ "workspace": {
3876
+ "char": "w",
3877
+ "description": "Workspace slug to use (overrides QUONFIG_WORKSPACE env var and saved default)",
3878
+ "helpGroup": "GLOBAL",
3879
+ "name": "workspace",
3880
+ "required": false,
3881
+ "hasDynamicHelp": false,
3882
+ "multiple": false,
3883
+ "type": "option"
3884
+ },
3885
+ "profile": {
3886
+ "char": "p",
3887
+ "description": "Deprecated: use --workspace instead",
3888
+ "helpGroup": "GLOBAL",
3889
+ "hidden": true,
3890
+ "name": "profile",
3891
+ "required": false,
3892
+ "hasDynamicHelp": false,
3893
+ "multiple": false,
3894
+ "type": "option"
3846
3895
  }
3847
3896
  },
3848
3897
  "hasDynamicHelp": false,
3849
3898
  "hiddenAliases": [],
3850
- "id": "workspace:switch",
3899
+ "id": "sdk-key:revoke",
3851
3900
  "pluginAlias": "@quonfig/cli",
3852
3901
  "pluginName": "@quonfig/cli",
3853
3902
  "pluginType": "core",
@@ -3857,17 +3906,18 @@
3857
3906
  "relativePath": [
3858
3907
  "dist",
3859
3908
  "commands",
3860
- "workspace",
3861
- "switch.js"
3909
+ "sdk-key",
3910
+ "revoke.js"
3862
3911
  ]
3863
3912
  },
3864
- "sdk-key:create": {
3913
+ "workspace:bootstrap": {
3865
3914
  "aliases": [],
3866
3915
  "args": {},
3867
- "description": "Create a new SDK key",
3916
+ "description": "Push a local git repo to Gitea as this workspace's config repository",
3868
3917
  "examples": [
3869
- "<%= config.bin %> <%= command.id %> --environment production --type server",
3870
- "<%= config.bin %> <%= command.id %> --environment staging --type browser"
3918
+ "<%= config.bin %> workspace bootstrap --dir ./our-config",
3919
+ "<%= config.bin %> workspace bootstrap --dir ./launch-migrator/output",
3920
+ "<%= config.bin %> workspace bootstrap --dir ./our-config --skip-validate"
3871
3921
  ],
3872
3922
  "flags": {
3873
3923
  "json": {
@@ -3899,53 +3949,30 @@
3899
3949
  "allowNo": false,
3900
3950
  "type": "boolean"
3901
3951
  },
3902
- "workspace": {
3903
- "char": "w",
3904
- "description": "Workspace slug to use (overrides QUONFIG_WORKSPACE env var and saved default)",
3905
- "helpGroup": "GLOBAL",
3906
- "name": "workspace",
3907
- "required": false,
3908
- "hasDynamicHelp": false,
3909
- "multiple": false,
3910
- "type": "option"
3911
- },
3912
- "profile": {
3913
- "char": "p",
3914
- "description": "Deprecated: use --workspace instead",
3915
- "helpGroup": "GLOBAL",
3916
- "hidden": true,
3917
- "name": "profile",
3952
+ "dir": {
3953
+ "description": "Local directory to push (defaults to current directory)",
3954
+ "name": "dir",
3918
3955
  "required": false,
3919
3956
  "hasDynamicHelp": false,
3920
3957
  "multiple": false,
3921
3958
  "type": "option"
3922
3959
  },
3923
- "environment": {
3924
- "char": "e",
3925
- "description": "Environment name (e.g. production, staging)",
3926
- "name": "environment",
3927
- "required": false,
3928
- "hasDynamicHelp": false,
3929
- "multiple": false,
3930
- "type": "option"
3960
+ "force": {
3961
+ "description": "Force push even if remote already has commits",
3962
+ "name": "force",
3963
+ "allowNo": false,
3964
+ "type": "boolean"
3931
3965
  },
3932
- "type": {
3933
- "char": "t",
3934
- "description": "Key type: server (backend) or browser (frontend)",
3935
- "name": "type",
3936
- "required": false,
3937
- "hasDynamicHelp": false,
3938
- "multiple": false,
3939
- "options": [
3940
- "server",
3941
- "browser"
3942
- ],
3943
- "type": "option"
3966
+ "skip-validate": {
3967
+ "description": "Skip config validation before pushing",
3968
+ "name": "skip-validate",
3969
+ "allowNo": false,
3970
+ "type": "boolean"
3944
3971
  }
3945
3972
  },
3946
3973
  "hasDynamicHelp": false,
3947
3974
  "hiddenAliases": [],
3948
- "id": "sdk-key:create",
3975
+ "id": "workspace:bootstrap",
3949
3976
  "pluginAlias": "@quonfig/cli",
3950
3977
  "pluginName": "@quonfig/cli",
3951
3978
  "pluginType": "core",
@@ -3955,17 +3982,24 @@
3955
3982
  "relativePath": [
3956
3983
  "dist",
3957
3984
  "commands",
3958
- "sdk-key",
3959
- "create.js"
3985
+ "workspace",
3986
+ "bootstrap.js"
3960
3987
  ]
3961
3988
  },
3962
- "sdk-key:list": {
3989
+ "workspace:create": {
3963
3990
  "aliases": [],
3964
- "args": {},
3965
- "description": "List SDK keys for your workspace",
3991
+ "args": {
3992
+ "slug": {
3993
+ "description": "Workspace slug (lowercase letters, numbers, hyphens)",
3994
+ "name": "slug",
3995
+ "required": true
3996
+ }
3997
+ },
3998
+ "description": "Create a new workspace. Provisions the Gitea repo and default environments, identical to the app's New Workspace UI.",
3966
3999
  "examples": [
3967
- "<%= config.bin %> <%= command.id %>",
3968
- "<%= config.bin %> <%= command.id %> --environment production"
4000
+ "<%= config.bin %> <%= command.id %> my-team",
4001
+ "<%= config.bin %> <%= command.id %> lt-21-smoke --name \"Load Test 21\"",
4002
+ "<%= config.bin %> <%= command.id %> my-team --org 11111111-1111-1111-1111-111111111111"
3969
4003
  ],
3970
4004
  "flags": {
3971
4005
  "json": {
@@ -3997,31 +4031,17 @@
3997
4031
  "allowNo": false,
3998
4032
  "type": "boolean"
3999
4033
  },
4000
- "workspace": {
4001
- "char": "w",
4002
- "description": "Workspace slug to use (overrides QUONFIG_WORKSPACE env var and saved default)",
4003
- "helpGroup": "GLOBAL",
4004
- "name": "workspace",
4005
- "required": false,
4006
- "hasDynamicHelp": false,
4007
- "multiple": false,
4008
- "type": "option"
4009
- },
4010
- "profile": {
4011
- "char": "p",
4012
- "description": "Deprecated: use --workspace instead",
4013
- "helpGroup": "GLOBAL",
4014
- "hidden": true,
4015
- "name": "profile",
4034
+ "name": {
4035
+ "description": "Human-readable display name (defaults to the slug)",
4036
+ "name": "name",
4016
4037
  "required": false,
4017
4038
  "hasDynamicHelp": false,
4018
4039
  "multiple": false,
4019
4040
  "type": "option"
4020
4041
  },
4021
- "environment": {
4022
- "char": "e",
4023
- "description": "Filter by environment name",
4024
- "name": "environment",
4042
+ "org": {
4043
+ "description": "Organization UUID or slug. Required when you belong to more than one organization; inferred otherwise.",
4044
+ "name": "org",
4025
4045
  "required": false,
4026
4046
  "hasDynamicHelp": false,
4027
4047
  "multiple": false,
@@ -4030,7 +4050,7 @@
4030
4050
  },
4031
4051
  "hasDynamicHelp": false,
4032
4052
  "hiddenAliases": [],
4033
- "id": "sdk-key:list",
4053
+ "id": "workspace:create",
4034
4054
  "pluginAlias": "@quonfig/cli",
4035
4055
  "pluginName": "@quonfig/cli",
4036
4056
  "pluginType": "core",
@@ -4040,22 +4060,23 @@
4040
4060
  "relativePath": [
4041
4061
  "dist",
4042
4062
  "commands",
4043
- "sdk-key",
4044
- "list.js"
4063
+ "workspace",
4064
+ "create.js"
4045
4065
  ]
4046
4066
  },
4047
- "sdk-key:revoke": {
4067
+ "workspace:switch": {
4048
4068
  "aliases": [],
4049
4069
  "args": {
4050
- "keyId": {
4051
- "description": "ID of the SDK key to revoke",
4052
- "name": "keyId",
4053
- "required": true
4070
+ "slug": {
4071
+ "description": "Workspace pin in `<org-slug>/<workspace-slug>` form. Omit for an interactive picker.",
4072
+ "name": "slug",
4073
+ "required": false
4054
4074
  }
4055
4075
  },
4056
- "description": "Revoke an SDK key by its ID",
4076
+ "description": "Switch the saved default profile to a different (org, workspace) pair",
4057
4077
  "examples": [
4058
- "<%= config.bin %> <%= command.id %> a1b2c3d4-e5f6-7890-abcd-ef1234567890"
4078
+ "<%= config.bin %> <%= command.id %>",
4079
+ "<%= config.bin %> <%= command.id %> acme/production"
4059
4080
  ],
4060
4081
  "flags": {
4061
4082
  "json": {
@@ -4086,32 +4107,11 @@
4086
4107
  "name": "verbose",
4087
4108
  "allowNo": false,
4088
4109
  "type": "boolean"
4089
- },
4090
- "workspace": {
4091
- "char": "w",
4092
- "description": "Workspace slug to use (overrides QUONFIG_WORKSPACE env var and saved default)",
4093
- "helpGroup": "GLOBAL",
4094
- "name": "workspace",
4095
- "required": false,
4096
- "hasDynamicHelp": false,
4097
- "multiple": false,
4098
- "type": "option"
4099
- },
4100
- "profile": {
4101
- "char": "p",
4102
- "description": "Deprecated: use --workspace instead",
4103
- "helpGroup": "GLOBAL",
4104
- "hidden": true,
4105
- "name": "profile",
4106
- "required": false,
4107
- "hasDynamicHelp": false,
4108
- "multiple": false,
4109
- "type": "option"
4110
4110
  }
4111
4111
  },
4112
4112
  "hasDynamicHelp": false,
4113
4113
  "hiddenAliases": [],
4114
- "id": "sdk-key:revoke",
4114
+ "id": "workspace:switch",
4115
4115
  "pluginAlias": "@quonfig/cli",
4116
4116
  "pluginName": "@quonfig/cli",
4117
4117
  "pluginType": "core",
@@ -4121,10 +4121,10 @@
4121
4121
  "relativePath": [
4122
4122
  "dist",
4123
4123
  "commands",
4124
- "sdk-key",
4125
- "revoke.js"
4124
+ "workspace",
4125
+ "switch.js"
4126
4126
  ]
4127
4127
  }
4128
4128
  },
4129
- "version": "0.0.59"
4129
+ "version": "0.0.61"
4130
4130
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "packageManager": "yarn@4.11.0+sha512.4e54aeace9141df2f0177c266b05ec50dc044638157dae128c471ba65994ac802122d7ab35bcd9e81641228b7dcf24867d28e750e0bcae8a05277d600008ad54",
3
3
  "name": "@quonfig/cli",
4
- "version": "0.0.59",
4
+ "version": "0.0.61",
5
5
  "bugs": {
6
6
  "url": "https://github.com/quonfig/cli/issues"
7
7
  },