@quonfig/cli 0.0.24 → 0.0.26
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 +47 -47
- package/dist/commands/create.d.ts +7 -0
- package/dist/commands/create.js +33 -0
- package/dist/commands/delete.js +4 -2
- package/dist/commands/init.js +6 -2
- package/dist/commands/login.js +72 -91
- package/dist/commands/migrate/doctor.js +13 -3
- package/dist/commands/override.js +4 -2
- package/dist/commands/pull.d.ts +11 -0
- package/dist/commands/pull.js +67 -20
- package/dist/commands/push.js +4 -7
- package/dist/commands/whoami.d.ts +13 -0
- package/dist/commands/whoami.js +119 -32
- package/dist/commands/workspace/bootstrap.js +27 -20
- package/dist/commands/workspace/create.d.ts +11 -0
- package/dist/commands/workspace/create.js +56 -16
- package/dist/commands/workspace/switch.d.ts +10 -0
- package/dist/commands/workspace/switch.js +98 -50
- package/dist/commands/workspace.d.ts +14 -0
- package/dist/commands/workspace.js +152 -40
- package/dist/migrate/local-write.js +16 -31
- package/dist/push/bare-path-diff.js +2 -4
- package/dist/push/config-push-client.js +4 -2
- package/dist/push/run-push.js +37 -8
- package/dist/util/clone-and-stack-push.js +14 -29
- package/dist/util/get-client.js +70 -38
- package/dist/util/get-valid-token.d.ts +16 -4
- package/dist/util/get-valid-token.js +59 -42
- package/dist/util/git-ops.d.ts +90 -0
- package/dist/util/git-ops.js +172 -24
- package/dist/util/gitea-api.js +4 -2
- package/dist/util/local-config-writer.d.ts +33 -0
- package/dist/util/local-config-writer.js +63 -0
- package/dist/util/login-orchestrator.d.ts +42 -0
- package/dist/util/login-orchestrator.js +79 -0
- package/dist/util/oauth-client.d.ts +2 -0
- package/dist/util/oauth-client.js +30 -0
- package/dist/util/quonfig-json.d.ts +58 -21
- package/dist/util/quonfig-json.js +151 -22
- package/dist/util/resolve-workspace.js +79 -17
- package/dist/util/token-storage.d.ts +39 -8
- package/dist/util/token-storage.js +34 -4
- package/dist/verify/validate.js +25 -1
- package/oclif.manifest.json +8 -8
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -14,7 +14,7 @@ $ npm install -g @quonfig/cli
|
|
|
14
14
|
$ qfg COMMAND
|
|
15
15
|
running command...
|
|
16
16
|
$ qfg (--version)
|
|
17
|
-
@quonfig/cli/0.0.
|
|
17
|
+
@quonfig/cli/0.0.26 linux-x64 node-v24.4.1
|
|
18
18
|
$ qfg --help [COMMAND]
|
|
19
19
|
USAGE
|
|
20
20
|
$ qfg COMMAND
|
|
@@ -92,7 +92,7 @@ EXAMPLES
|
|
|
92
92
|
$ qfg config-schema --json-schema # full JSON Schema document (copy into your editor)
|
|
93
93
|
```
|
|
94
94
|
|
|
95
|
-
_See code: [src/commands/config-schema.ts](https://github.com/quonfig/cli/blob/v0.0.
|
|
95
|
+
_See code: [src/commands/config-schema.ts](https://github.com/quonfig/cli/blob/v0.0.26/src/commands/config-schema.ts)_
|
|
96
96
|
|
|
97
97
|
## `qfg create NAME`
|
|
98
98
|
|
|
@@ -177,7 +177,7 @@ EXAMPLES
|
|
|
177
177
|
$ qfg set-rollout my.new.flag --environment production --true-percent 20
|
|
178
178
|
```
|
|
179
179
|
|
|
180
|
-
_See code: [src/commands/create.ts](https://github.com/quonfig/cli/blob/v0.0.
|
|
180
|
+
_See code: [src/commands/create.ts](https://github.com/quonfig/cli/blob/v0.0.26/src/commands/create.ts)_
|
|
181
181
|
|
|
182
182
|
## `qfg delete NAME`
|
|
183
183
|
|
|
@@ -223,7 +223,7 @@ EXAMPLES
|
|
|
223
223
|
$ qfg delete my.config --yes
|
|
224
224
|
```
|
|
225
225
|
|
|
226
|
-
_See code: [src/commands/delete.ts](https://github.com/quonfig/cli/blob/v0.0.
|
|
226
|
+
_See code: [src/commands/delete.ts](https://github.com/quonfig/cli/blob/v0.0.26/src/commands/delete.ts)_
|
|
227
227
|
|
|
228
228
|
## `qfg flag info [NAME]`
|
|
229
229
|
|
|
@@ -426,7 +426,7 @@ EXAMPLES
|
|
|
426
426
|
$ qfg generate --targets node-ts -o ./dist # combine with targets
|
|
427
427
|
```
|
|
428
428
|
|
|
429
|
-
_See code: [src/commands/generate.ts](https://github.com/quonfig/cli/blob/v0.0.
|
|
429
|
+
_See code: [src/commands/generate.ts](https://github.com/quonfig/cli/blob/v0.0.26/src/commands/generate.ts)_
|
|
430
430
|
|
|
431
431
|
## `qfg generate-new-hex-key`
|
|
432
432
|
|
|
@@ -449,7 +449,7 @@ EXAMPLES
|
|
|
449
449
|
$ qfg generate-new-hex-key
|
|
450
450
|
```
|
|
451
451
|
|
|
452
|
-
_See code: [src/commands/generate-new-hex-key.ts](https://github.com/quonfig/cli/blob/v0.0.
|
|
452
|
+
_See code: [src/commands/generate-new-hex-key.ts](https://github.com/quonfig/cli/blob/v0.0.26/src/commands/generate-new-hex-key.ts)_
|
|
453
453
|
|
|
454
454
|
## `qfg get [NAME]`
|
|
455
455
|
|
|
@@ -481,7 +481,7 @@ EXAMPLES
|
|
|
481
481
|
$ qfg get my.config.name --environment=production
|
|
482
482
|
```
|
|
483
483
|
|
|
484
|
-
_See code: [src/commands/get.ts](https://github.com/quonfig/cli/blob/v0.0.
|
|
484
|
+
_See code: [src/commands/get.ts](https://github.com/quonfig/cli/blob/v0.0.26/src/commands/get.ts)_
|
|
485
485
|
|
|
486
486
|
## `qfg info [NAME]`
|
|
487
487
|
|
|
@@ -529,7 +529,7 @@ EXAMPLES
|
|
|
529
529
|
$ qfg info my.config.name --exclude-evaluations # skip 24h stats
|
|
530
530
|
```
|
|
531
531
|
|
|
532
|
-
_See code: [src/commands/info.ts](https://github.com/quonfig/cli/blob/v0.0.
|
|
532
|
+
_See code: [src/commands/info.ts](https://github.com/quonfig/cli/blob/v0.0.26/src/commands/info.ts)_
|
|
533
533
|
|
|
534
534
|
## `qfg init [DIRECTORY]`
|
|
535
535
|
|
|
@@ -546,7 +546,7 @@ ARGUMENTS
|
|
|
546
546
|
FLAGS
|
|
547
547
|
--dry-run Show what would be done without writing anything
|
|
548
548
|
--[no-]samples Include sample configs (default: yes on first init, no on update)
|
|
549
|
-
--workspace=<value> Workspace
|
|
549
|
+
--workspace=<value> Workspace pin in <org-slug>/<workspace-slug> form (Guard 1). If omitted, no pin is written.
|
|
550
550
|
|
|
551
551
|
GLOBAL FLAGS
|
|
552
552
|
--[no-]interactive Force interactive mode
|
|
@@ -569,7 +569,7 @@ EXAMPLES
|
|
|
569
569
|
$ qfg init --dry-run
|
|
570
570
|
```
|
|
571
571
|
|
|
572
|
-
_See code: [src/commands/init.ts](https://github.com/quonfig/cli/blob/v0.0.
|
|
572
|
+
_See code: [src/commands/init.ts](https://github.com/quonfig/cli/blob/v0.0.26/src/commands/init.ts)_
|
|
573
573
|
|
|
574
574
|
## `qfg interactive`
|
|
575
575
|
|
|
@@ -599,7 +599,7 @@ EXAMPLES
|
|
|
599
599
|
$ qfg
|
|
600
600
|
```
|
|
601
601
|
|
|
602
|
-
_See code: [src/commands/interactive.ts](https://github.com/quonfig/cli/blob/v0.0.
|
|
602
|
+
_See code: [src/commands/interactive.ts](https://github.com/quonfig/cli/blob/v0.0.26/src/commands/interactive.ts)_
|
|
603
603
|
|
|
604
604
|
## `qfg list`
|
|
605
605
|
|
|
@@ -639,7 +639,7 @@ EXAMPLES
|
|
|
639
639
|
$ qfg list --feature-flags
|
|
640
640
|
```
|
|
641
641
|
|
|
642
|
-
_See code: [src/commands/list.ts](https://github.com/quonfig/cli/blob/v0.0.
|
|
642
|
+
_See code: [src/commands/list.ts](https://github.com/quonfig/cli/blob/v0.0.26/src/commands/list.ts)_
|
|
643
643
|
|
|
644
644
|
## `qfg log-level NAME`
|
|
645
645
|
|
|
@@ -704,11 +704,11 @@ EXAMPLES
|
|
|
704
704
|
$ qfg log-level log-level.my-app --target=Chatty --value=INFO --environment=production
|
|
705
705
|
```
|
|
706
706
|
|
|
707
|
-
_See code: [src/commands/log-level.ts](https://github.com/quonfig/cli/blob/v0.0.
|
|
707
|
+
_See code: [src/commands/log-level.ts](https://github.com/quonfig/cli/blob/v0.0.26/src/commands/log-level.ts)_
|
|
708
708
|
|
|
709
709
|
## `qfg login`
|
|
710
710
|
|
|
711
|
-
Log in to Quonfig via WorkOS device authorization
|
|
711
|
+
Log in to Quonfig via WorkOS device authorization (mints one token per org)
|
|
712
712
|
|
|
713
713
|
```
|
|
714
714
|
USAGE
|
|
@@ -721,7 +721,7 @@ GLOBAL FLAGS
|
|
|
721
721
|
--verbose Verbose output
|
|
722
722
|
|
|
723
723
|
DESCRIPTION
|
|
724
|
-
Log in to Quonfig via WorkOS device authorization
|
|
724
|
+
Log in to Quonfig via WorkOS device authorization (mints one token per org)
|
|
725
725
|
|
|
726
726
|
EXAMPLES
|
|
727
727
|
$ qfg login
|
|
@@ -729,7 +729,7 @@ EXAMPLES
|
|
|
729
729
|
$ qfg login --profile myprofile
|
|
730
730
|
```
|
|
731
731
|
|
|
732
|
-
_See code: [src/commands/login.ts](https://github.com/quonfig/cli/blob/v0.0.
|
|
732
|
+
_See code: [src/commands/login.ts](https://github.com/quonfig/cli/blob/v0.0.26/src/commands/login.ts)_
|
|
733
733
|
|
|
734
734
|
## `qfg logout`
|
|
735
735
|
|
|
@@ -752,7 +752,7 @@ EXAMPLES
|
|
|
752
752
|
$ qfg logout
|
|
753
753
|
```
|
|
754
754
|
|
|
755
|
-
_See code: [src/commands/logout.ts](https://github.com/quonfig/cli/blob/v0.0.
|
|
755
|
+
_See code: [src/commands/logout.ts](https://github.com/quonfig/cli/blob/v0.0.26/src/commands/logout.ts)_
|
|
756
756
|
|
|
757
757
|
## `qfg mcp`
|
|
758
758
|
|
|
@@ -785,7 +785,7 @@ EXAMPLES
|
|
|
785
785
|
$ qfg mcp --url http://local-app.quonfig-staging.com:3003/api/v1/mcp
|
|
786
786
|
```
|
|
787
787
|
|
|
788
|
-
_See code: [src/commands/mcp.ts](https://github.com/quonfig/cli/blob/v0.0.
|
|
788
|
+
_See code: [src/commands/mcp.ts](https://github.com/quonfig/cli/blob/v0.0.26/src/commands/mcp.ts)_
|
|
789
789
|
|
|
790
790
|
## `qfg migrate`
|
|
791
791
|
|
|
@@ -839,7 +839,7 @@ EXAMPLES
|
|
|
839
839
|
$ qfg migrate --from launch --api-key $LAUNCH_API_KEY --dir ./quonfig-config --staging
|
|
840
840
|
```
|
|
841
841
|
|
|
842
|
-
_See code: [src/commands/migrate.ts](https://github.com/quonfig/cli/blob/v0.0.
|
|
842
|
+
_See code: [src/commands/migrate.ts](https://github.com/quonfig/cli/blob/v0.0.26/src/commands/migrate.ts)_
|
|
843
843
|
|
|
844
844
|
## `qfg migrate doctor`
|
|
845
845
|
|
|
@@ -877,7 +877,7 @@ EXAMPLES
|
|
|
877
877
|
$ qfg migrate doctor --json
|
|
878
878
|
```
|
|
879
879
|
|
|
880
|
-
_See code: [src/commands/migrate/doctor.ts](https://github.com/quonfig/cli/blob/v0.0.
|
|
880
|
+
_See code: [src/commands/migrate/doctor.ts](https://github.com/quonfig/cli/blob/v0.0.26/src/commands/migrate/doctor.ts)_
|
|
881
881
|
|
|
882
882
|
## `qfg migrate my-code`
|
|
883
883
|
|
|
@@ -909,7 +909,7 @@ EXAMPLES
|
|
|
909
909
|
$ qfg migrate my-code --dry-run
|
|
910
910
|
```
|
|
911
911
|
|
|
912
|
-
_See code: [src/commands/migrate/my-code.ts](https://github.com/quonfig/cli/blob/v0.0.
|
|
912
|
+
_See code: [src/commands/migrate/my-code.ts](https://github.com/quonfig/cli/blob/v0.0.26/src/commands/migrate/my-code.ts)_
|
|
913
913
|
|
|
914
914
|
## `qfg migrate status`
|
|
915
915
|
|
|
@@ -940,7 +940,7 @@ EXAMPLES
|
|
|
940
940
|
$ qfg migrate status --json
|
|
941
941
|
```
|
|
942
942
|
|
|
943
|
-
_See code: [src/commands/migrate/status.ts](https://github.com/quonfig/cli/blob/v0.0.
|
|
943
|
+
_See code: [src/commands/migrate/status.ts](https://github.com/quonfig/cli/blob/v0.0.26/src/commands/migrate/status.ts)_
|
|
944
944
|
|
|
945
945
|
## `qfg override [NAME] [VALUE]`
|
|
946
946
|
|
|
@@ -995,7 +995,7 @@ EXAMPLES
|
|
|
995
995
|
$ qfg override my.flag true --env=staging
|
|
996
996
|
```
|
|
997
997
|
|
|
998
|
-
_See code: [src/commands/override.ts](https://github.com/quonfig/cli/blob/v0.0.
|
|
998
|
+
_See code: [src/commands/override.ts](https://github.com/quonfig/cli/blob/v0.0.26/src/commands/override.ts)_
|
|
999
999
|
|
|
1000
1000
|
## `qfg pull`
|
|
1001
1001
|
|
|
@@ -1039,7 +1039,7 @@ EXAMPLES
|
|
|
1039
1039
|
$ qfg pull # uses QUONFIG_DIR env var
|
|
1040
1040
|
```
|
|
1041
1041
|
|
|
1042
|
-
_See code: [src/commands/pull.ts](https://github.com/quonfig/cli/blob/v0.0.
|
|
1042
|
+
_See code: [src/commands/pull.ts](https://github.com/quonfig/cli/blob/v0.0.26/src/commands/pull.ts)_
|
|
1043
1043
|
|
|
1044
1044
|
## `qfg push`
|
|
1045
1045
|
|
|
@@ -1087,7 +1087,7 @@ EXAMPLES
|
|
|
1087
1087
|
$ qfg push --dir ./our-config --yes
|
|
1088
1088
|
```
|
|
1089
1089
|
|
|
1090
|
-
_See code: [src/commands/push.ts](https://github.com/quonfig/cli/blob/v0.0.
|
|
1090
|
+
_See code: [src/commands/push.ts](https://github.com/quonfig/cli/blob/v0.0.26/src/commands/push.ts)_
|
|
1091
1091
|
|
|
1092
1092
|
## `qfg schema NAME`
|
|
1093
1093
|
|
|
@@ -1125,7 +1125,7 @@ EXAMPLES
|
|
|
1125
1125
|
$ qfg schema my-schema --set-json-schema=@schemas/my-schema.json --protected
|
|
1126
1126
|
```
|
|
1127
1127
|
|
|
1128
|
-
_See code: [src/commands/schema.ts](https://github.com/quonfig/cli/blob/v0.0.
|
|
1128
|
+
_See code: [src/commands/schema.ts](https://github.com/quonfig/cli/blob/v0.0.26/src/commands/schema.ts)_
|
|
1129
1129
|
|
|
1130
1130
|
## `qfg sdk-key`
|
|
1131
1131
|
|
|
@@ -1152,7 +1152,7 @@ EXAMPLES
|
|
|
1152
1152
|
$ qfg sdk-key revoke <key-id>
|
|
1153
1153
|
```
|
|
1154
1154
|
|
|
1155
|
-
_See code: [src/commands/sdk-key.ts](https://github.com/quonfig/cli/blob/v0.0.
|
|
1155
|
+
_See code: [src/commands/sdk-key.ts](https://github.com/quonfig/cli/blob/v0.0.26/src/commands/sdk-key.ts)_
|
|
1156
1156
|
|
|
1157
1157
|
## `qfg sdk-key create`
|
|
1158
1158
|
|
|
@@ -1184,7 +1184,7 @@ EXAMPLES
|
|
|
1184
1184
|
$ qfg sdk-key create --environment staging --type browser
|
|
1185
1185
|
```
|
|
1186
1186
|
|
|
1187
|
-
_See code: [src/commands/sdk-key/create.ts](https://github.com/quonfig/cli/blob/v0.0.
|
|
1187
|
+
_See code: [src/commands/sdk-key/create.ts](https://github.com/quonfig/cli/blob/v0.0.26/src/commands/sdk-key/create.ts)_
|
|
1188
1188
|
|
|
1189
1189
|
## `qfg sdk-key list`
|
|
1190
1190
|
|
|
@@ -1213,7 +1213,7 @@ EXAMPLES
|
|
|
1213
1213
|
$ qfg sdk-key list --environment production
|
|
1214
1214
|
```
|
|
1215
1215
|
|
|
1216
|
-
_See code: [src/commands/sdk-key/list.ts](https://github.com/quonfig/cli/blob/v0.0.
|
|
1216
|
+
_See code: [src/commands/sdk-key/list.ts](https://github.com/quonfig/cli/blob/v0.0.26/src/commands/sdk-key/list.ts)_
|
|
1217
1217
|
|
|
1218
1218
|
## `qfg sdk-key revoke KEYID`
|
|
1219
1219
|
|
|
@@ -1240,7 +1240,7 @@ EXAMPLES
|
|
|
1240
1240
|
$ qfg sdk-key revoke a1b2c3d4-e5f6-7890-abcd-ef1234567890
|
|
1241
1241
|
```
|
|
1242
1242
|
|
|
1243
|
-
_See code: [src/commands/sdk-key/revoke.ts](https://github.com/quonfig/cli/blob/v0.0.
|
|
1243
|
+
_See code: [src/commands/sdk-key/revoke.ts](https://github.com/quonfig/cli/blob/v0.0.26/src/commands/sdk-key/revoke.ts)_
|
|
1244
1244
|
|
|
1245
1245
|
## `qfg set-default [NAME]`
|
|
1246
1246
|
|
|
@@ -1311,7 +1311,7 @@ EXAMPLES
|
|
|
1311
1311
|
$ qfg pull && qfg config-schema
|
|
1312
1312
|
```
|
|
1313
1313
|
|
|
1314
|
-
_See code: [src/commands/set-default.ts](https://github.com/quonfig/cli/blob/v0.0.
|
|
1314
|
+
_See code: [src/commands/set-default.ts](https://github.com/quonfig/cli/blob/v0.0.26/src/commands/set-default.ts)_
|
|
1315
1315
|
|
|
1316
1316
|
## `qfg set-rollout [NAME]`
|
|
1317
1317
|
|
|
@@ -1388,7 +1388,7 @@ EXAMPLES
|
|
|
1388
1388
|
$ qfg set-rollout my.variant.flag --environment production --weights "a:33,b:33,c:34" --hash-by user.id
|
|
1389
1389
|
```
|
|
1390
1390
|
|
|
1391
|
-
_See code: [src/commands/set-rollout.ts](https://github.com/quonfig/cli/blob/v0.0.
|
|
1391
|
+
_See code: [src/commands/set-rollout.ts](https://github.com/quonfig/cli/blob/v0.0.26/src/commands/set-rollout.ts)_
|
|
1392
1392
|
|
|
1393
1393
|
## `qfg sync`
|
|
1394
1394
|
|
|
@@ -1420,7 +1420,7 @@ EXAMPLES
|
|
|
1420
1420
|
$ qfg sync --watch --dir ./our-config --interval 30
|
|
1421
1421
|
```
|
|
1422
1422
|
|
|
1423
|
-
_See code: [src/commands/sync.ts](https://github.com/quonfig/cli/blob/v0.0.
|
|
1423
|
+
_See code: [src/commands/sync.ts](https://github.com/quonfig/cli/blob/v0.0.26/src/commands/sync.ts)_
|
|
1424
1424
|
|
|
1425
1425
|
## `qfg toggle [NAME]`
|
|
1426
1426
|
|
|
@@ -1522,11 +1522,11 @@ EXAMPLES
|
|
|
1522
1522
|
$ qfg verify --json
|
|
1523
1523
|
```
|
|
1524
1524
|
|
|
1525
|
-
_See code: [src/commands/verify.ts](https://github.com/quonfig/cli/blob/v0.0.
|
|
1525
|
+
_See code: [src/commands/verify.ts](https://github.com/quonfig/cli/blob/v0.0.26/src/commands/verify.ts)_
|
|
1526
1526
|
|
|
1527
1527
|
## `qfg whoami`
|
|
1528
1528
|
|
|
1529
|
-
Display information about the currently logged in user
|
|
1529
|
+
Display information about the currently logged in user and all org memberships
|
|
1530
1530
|
|
|
1531
1531
|
```
|
|
1532
1532
|
USAGE
|
|
@@ -1539,17 +1539,17 @@ GLOBAL FLAGS
|
|
|
1539
1539
|
--verbose Verbose output
|
|
1540
1540
|
|
|
1541
1541
|
DESCRIPTION
|
|
1542
|
-
Display information about the currently logged in user
|
|
1542
|
+
Display information about the currently logged in user and all org memberships
|
|
1543
1543
|
|
|
1544
1544
|
EXAMPLES
|
|
1545
1545
|
$ qfg whoami
|
|
1546
1546
|
```
|
|
1547
1547
|
|
|
1548
|
-
_See code: [src/commands/whoami.ts](https://github.com/quonfig/cli/blob/v0.0.
|
|
1548
|
+
_See code: [src/commands/whoami.ts](https://github.com/quonfig/cli/blob/v0.0.26/src/commands/whoami.ts)_
|
|
1549
1549
|
|
|
1550
1550
|
## `qfg workspace`
|
|
1551
1551
|
|
|
1552
|
-
Show the
|
|
1552
|
+
Show the active workspace, all org tokens, and every (org, workspace) the user can reach
|
|
1553
1553
|
|
|
1554
1554
|
```
|
|
1555
1555
|
USAGE
|
|
@@ -1562,13 +1562,13 @@ GLOBAL FLAGS
|
|
|
1562
1562
|
--verbose Verbose output
|
|
1563
1563
|
|
|
1564
1564
|
DESCRIPTION
|
|
1565
|
-
Show the
|
|
1565
|
+
Show the active workspace, all org tokens, and every (org, workspace) the user can reach
|
|
1566
1566
|
|
|
1567
1567
|
EXAMPLES
|
|
1568
1568
|
$ qfg workspace
|
|
1569
1569
|
```
|
|
1570
1570
|
|
|
1571
|
-
_See code: [src/commands/workspace.ts](https://github.com/quonfig/cli/blob/v0.0.
|
|
1571
|
+
_See code: [src/commands/workspace.ts](https://github.com/quonfig/cli/blob/v0.0.26/src/commands/workspace.ts)_
|
|
1572
1572
|
|
|
1573
1573
|
## `qfg workspace bootstrap`
|
|
1574
1574
|
|
|
@@ -1601,7 +1601,7 @@ EXAMPLES
|
|
|
1601
1601
|
$ qfg workspace bootstrap --dir ./our-config --skip-validate
|
|
1602
1602
|
```
|
|
1603
1603
|
|
|
1604
|
-
_See code: [src/commands/workspace/bootstrap.ts](https://github.com/quonfig/cli/blob/v0.0.
|
|
1604
|
+
_See code: [src/commands/workspace/bootstrap.ts](https://github.com/quonfig/cli/blob/v0.0.26/src/commands/workspace/bootstrap.ts)_
|
|
1605
1605
|
|
|
1606
1606
|
## `qfg workspace create SLUG`
|
|
1607
1607
|
|
|
@@ -1635,18 +1635,18 @@ EXAMPLES
|
|
|
1635
1635
|
$ qfg workspace create my-team --org 11111111-1111-1111-1111-111111111111
|
|
1636
1636
|
```
|
|
1637
1637
|
|
|
1638
|
-
_See code: [src/commands/workspace/create.ts](https://github.com/quonfig/cli/blob/v0.0.
|
|
1638
|
+
_See code: [src/commands/workspace/create.ts](https://github.com/quonfig/cli/blob/v0.0.26/src/commands/workspace/create.ts)_
|
|
1639
1639
|
|
|
1640
1640
|
## `qfg workspace switch [SLUG]`
|
|
1641
1641
|
|
|
1642
|
-
Switch to a different workspace
|
|
1642
|
+
Switch the saved default profile to a different (org, workspace) pair
|
|
1643
1643
|
|
|
1644
1644
|
```
|
|
1645
1645
|
USAGE
|
|
1646
1646
|
$ qfg workspace switch [SLUG] [--json] [--interactive] [--no-color] [--verbose]
|
|
1647
1647
|
|
|
1648
1648
|
ARGUMENTS
|
|
1649
|
-
SLUG Workspace
|
|
1649
|
+
SLUG Workspace pin in `<org-slug>/<workspace-slug>` form. Omit for an interactive picker.
|
|
1650
1650
|
|
|
1651
1651
|
GLOBAL FLAGS
|
|
1652
1652
|
--[no-]interactive Force interactive mode
|
|
@@ -1655,15 +1655,15 @@ GLOBAL FLAGS
|
|
|
1655
1655
|
--verbose Verbose output
|
|
1656
1656
|
|
|
1657
1657
|
DESCRIPTION
|
|
1658
|
-
Switch to a different workspace
|
|
1658
|
+
Switch the saved default profile to a different (org, workspace) pair
|
|
1659
1659
|
|
|
1660
1660
|
EXAMPLES
|
|
1661
1661
|
$ qfg workspace switch
|
|
1662
1662
|
|
|
1663
|
-
$ qfg workspace switch
|
|
1663
|
+
$ qfg workspace switch acme/production
|
|
1664
1664
|
```
|
|
1665
1665
|
|
|
1666
|
-
_See code: [src/commands/workspace/switch.ts](https://github.com/quonfig/cli/blob/v0.0.
|
|
1666
|
+
_See code: [src/commands/workspace/switch.ts](https://github.com/quonfig/cli/blob/v0.0.26/src/commands/workspace/switch.ts)_
|
|
1667
1667
|
<!-- commandsstop -->
|
|
1668
1668
|
|
|
1669
1669
|
## Local Development
|
|
@@ -17,4 +17,11 @@ export default class Create extends APICommand {
|
|
|
17
17
|
run(): Promise<JsonObj | void>;
|
|
18
18
|
private createBooleanFlag;
|
|
19
19
|
private createLogLevel;
|
|
20
|
+
/**
|
|
21
|
+
* Mirror the server-side create to disk under QUONFIG_DIR so the user can
|
|
22
|
+
* `qfg verify` (or just open the JSON) without a follow-up `qfg pull`.
|
|
23
|
+
* Best-effort — server already created the flag, so we never let local-disk
|
|
24
|
+
* problems fail the command. Closes qfg-d5t.
|
|
25
|
+
*/
|
|
26
|
+
private syncConfigToDisk;
|
|
20
27
|
}
|
package/dist/commands/create.js
CHANGED
|
@@ -6,6 +6,7 @@ import { TYPE_MAPPING, coerceBool, coerceIntoType } from '../util/coerce.js';
|
|
|
6
6
|
import { checkmark } from '../util/color.js';
|
|
7
7
|
import { mapConfigValueToDto, mapValueTypeToString } from '../util/config-value-dto.js';
|
|
8
8
|
import { makeConfidentialValue } from '../util/encryption.js';
|
|
9
|
+
import { writeStoredConfigToWorkspace } from '../util/local-config-writer.js';
|
|
9
10
|
import { LOG_LEVELS, LOG_LEVEL_KEY_PREFIX, isLogLevel } from '../util/log-levels.js';
|
|
10
11
|
import secretFlags, { parsedSecretFlags } from '../util/secret-flags.js';
|
|
11
12
|
export default class Create extends APICommand {
|
|
@@ -150,6 +151,7 @@ Log levels:
|
|
|
150
151
|
}
|
|
151
152
|
const response = request.json;
|
|
152
153
|
const confidentialMaybe = flags.confidential ? '(confidential) ' : '';
|
|
154
|
+
await this.syncConfigToDisk('configs', key, response);
|
|
153
155
|
return this.ok(`${checkmark} Created ${confidentialMaybe}config: ${key}`, { key, ...response });
|
|
154
156
|
}
|
|
155
157
|
async createBooleanFlag(args, rawDefault) {
|
|
@@ -195,6 +197,7 @@ Log levels:
|
|
|
195
197
|
return this.err(errMsg, { key, phase: 'creation', serverError: request.error });
|
|
196
198
|
}
|
|
197
199
|
const response = request.json;
|
|
200
|
+
await this.syncConfigToDisk('feature-flags', key, response);
|
|
198
201
|
return this.ok(`${checkmark} Created boolean flag: ${key}`, { key, ...response });
|
|
199
202
|
}
|
|
200
203
|
async createLogLevel(args, flags) {
|
|
@@ -281,4 +284,34 @@ Log levels:
|
|
|
281
284
|
value: rawValue,
|
|
282
285
|
});
|
|
283
286
|
}
|
|
287
|
+
/**
|
|
288
|
+
* Mirror the server-side create to disk under QUONFIG_DIR so the user can
|
|
289
|
+
* `qfg verify` (or just open the JSON) without a follow-up `qfg pull`.
|
|
290
|
+
* Best-effort — server already created the flag, so we never let local-disk
|
|
291
|
+
* problems fail the command. Closes qfg-d5t.
|
|
292
|
+
*/
|
|
293
|
+
async syncConfigToDisk(subdir, key, response) {
|
|
294
|
+
if (!response)
|
|
295
|
+
return;
|
|
296
|
+
try {
|
|
297
|
+
const result = await writeStoredConfigToWorkspace({
|
|
298
|
+
subdir,
|
|
299
|
+
key,
|
|
300
|
+
storedConfig: response,
|
|
301
|
+
});
|
|
302
|
+
if (result) {
|
|
303
|
+
this.verboseLog('LocalWrite', {
|
|
304
|
+
path: result.filePath,
|
|
305
|
+
committed: result.committed,
|
|
306
|
+
skippedCommitReason: result.skippedCommitReason,
|
|
307
|
+
});
|
|
308
|
+
}
|
|
309
|
+
else {
|
|
310
|
+
this.verboseLog('LocalWrite', 'skipped: QUONFIG_DIR not set or workspace dir missing');
|
|
311
|
+
}
|
|
312
|
+
}
|
|
313
|
+
catch (error) {
|
|
314
|
+
this.verboseLog('LocalWrite', `Failed to sync ${key} to disk: ${String(error)}`);
|
|
315
|
+
}
|
|
316
|
+
}
|
|
284
317
|
}
|
package/dist/commands/delete.js
CHANGED
|
@@ -47,8 +47,10 @@ Examples
|
|
|
47
47
|
};
|
|
48
48
|
async run() {
|
|
49
49
|
const { args, flags } = await this.parse(Delete);
|
|
50
|
-
|
|
51
|
-
|
|
50
|
+
// TODO(qfg-kr7.5): pick the token set keyed by the resolved workosOrgId.
|
|
51
|
+
const store = await loadTokens();
|
|
52
|
+
const tokens = store ? Object.values(store.tokensByOrg)[0] : undefined;
|
|
53
|
+
if (!tokens?.access_token) {
|
|
52
54
|
return this.err('Not logged in. Run `qfg login` first.');
|
|
53
55
|
}
|
|
54
56
|
const key = args.name;
|
package/dist/commands/init.js
CHANGED
|
@@ -27,7 +27,7 @@ export default class Init extends BaseCommand {
|
|
|
27
27
|
description: 'Include sample configs (default: yes on first init, no on update)',
|
|
28
28
|
}),
|
|
29
29
|
workspace: Flags.string({
|
|
30
|
-
description: 'Workspace
|
|
30
|
+
description: 'Workspace pin in <org-slug>/<workspace-slug> form (Guard 1). If omitted, no pin is written.',
|
|
31
31
|
required: false,
|
|
32
32
|
}),
|
|
33
33
|
};
|
|
@@ -79,7 +79,11 @@ export default class Init extends BaseCommand {
|
|
|
79
79
|
// non-interactive: flag → write, no flag → no write. Users who need the
|
|
80
80
|
// pin later can run `qfg pull` (backfills) or edit the file directly.
|
|
81
81
|
if (flags.workspace) {
|
|
82
|
-
|
|
82
|
+
const parts = flags.workspace.split('/');
|
|
83
|
+
if (parts.length !== 2 || !parts[0] || !parts[1]) {
|
|
84
|
+
this.error(`--workspace must be in <org-slug>/<workspace-slug> form (e.g. acme/foo). Got: ${JSON.stringify(flags.workspace)}.`);
|
|
85
|
+
}
|
|
86
|
+
await writeWorkspaceSlug(dir, { orgSlug: parts[0], workspaceSlug: parts[1] });
|
|
83
87
|
}
|
|
84
88
|
this.log(`${mode} workspace: ${dir === '.' ? process.cwd() : dir}\n`);
|
|
85
89
|
for (const action of writeActions) {
|