@quonfig/cli 0.0.72 → 0.0.74
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 +100 -75
- package/dist/commands/cleanup/status.js +5 -1
- package/dist/commands/config-schema.js +8 -3
- package/dist/commands/info.js +9 -15
- package/dist/commands/log-level.js +7 -10
- package/dist/commands/override.js +7 -3
- package/dist/commands/serve.js +6 -3
- package/dist/commands/set-default.d.ts +1 -0
- package/dist/commands/set-default.js +106 -71
- package/dist/commands/set-rollout.d.ts +1 -0
- package/dist/commands/set-rollout.js +65 -18
- package/dist/index.d.ts +30 -0
- package/dist/index.js +105 -8
- package/dist/init/templates.js +43 -0
- package/dist/util/rules.d.ts +98 -0
- package/dist/util/rules.js +131 -0
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/oclif.manifest.json +21 -7
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -17,7 +17,7 @@ $ npm install -g @quonfig/cli
|
|
|
17
17
|
$ qfg COMMAND
|
|
18
18
|
running command...
|
|
19
19
|
$ qfg (--version)
|
|
20
|
-
@quonfig/cli/0.0.
|
|
20
|
+
@quonfig/cli/0.0.74 linux-x64 node-v24.4.1
|
|
21
21
|
$ qfg --help [COMMAND]
|
|
22
22
|
USAGE
|
|
23
23
|
$ qfg COMMAND
|
|
@@ -201,7 +201,7 @@ EXAMPLES
|
|
|
201
201
|
$ qfg activity restore my.flag --yes
|
|
202
202
|
```
|
|
203
203
|
|
|
204
|
-
_See code: [src/commands/activity.ts](https://github.com/quonfig/cli/blob/v0.0.
|
|
204
|
+
_See code: [src/commands/activity.ts](https://github.com/quonfig/cli/blob/v0.0.74/src/commands/activity.ts)_
|
|
205
205
|
|
|
206
206
|
## `qfg activity deleted`
|
|
207
207
|
|
|
@@ -230,7 +230,7 @@ EXAMPLES
|
|
|
230
230
|
$ qfg activity deleted --json
|
|
231
231
|
```
|
|
232
232
|
|
|
233
|
-
_See code: [src/commands/activity/deleted.ts](https://github.com/quonfig/cli/blob/v0.0.
|
|
233
|
+
_See code: [src/commands/activity/deleted.ts](https://github.com/quonfig/cli/blob/v0.0.74/src/commands/activity/deleted.ts)_
|
|
234
234
|
|
|
235
235
|
## `qfg activity feed`
|
|
236
236
|
|
|
@@ -265,7 +265,7 @@ EXAMPLES
|
|
|
265
265
|
$ qfg activity feed --json
|
|
266
266
|
```
|
|
267
267
|
|
|
268
|
-
_See code: [src/commands/activity/feed.ts](https://github.com/quonfig/cli/blob/v0.0.
|
|
268
|
+
_See code: [src/commands/activity/feed.ts](https://github.com/quonfig/cli/blob/v0.0.74/src/commands/activity/feed.ts)_
|
|
269
269
|
|
|
270
270
|
## `qfg activity history [NAME]`
|
|
271
271
|
|
|
@@ -299,7 +299,7 @@ EXAMPLES
|
|
|
299
299
|
$ qfg activity history request.timeout --json
|
|
300
300
|
```
|
|
301
301
|
|
|
302
|
-
_See code: [src/commands/activity/history.ts](https://github.com/quonfig/cli/blob/v0.0.
|
|
302
|
+
_See code: [src/commands/activity/history.ts](https://github.com/quonfig/cli/blob/v0.0.74/src/commands/activity/history.ts)_
|
|
303
303
|
|
|
304
304
|
## `qfg activity restore [NAME]`
|
|
305
305
|
|
|
@@ -338,7 +338,7 @@ EXAMPLES
|
|
|
338
338
|
$ qfg activity restore request.timeout --type config --yes
|
|
339
339
|
```
|
|
340
340
|
|
|
341
|
-
_See code: [src/commands/activity/restore.ts](https://github.com/quonfig/cli/blob/v0.0.
|
|
341
|
+
_See code: [src/commands/activity/restore.ts](https://github.com/quonfig/cli/blob/v0.0.74/src/commands/activity/restore.ts)_
|
|
342
342
|
|
|
343
343
|
## `qfg audit-log [NAME]`
|
|
344
344
|
|
|
@@ -366,7 +366,7 @@ EXAMPLES
|
|
|
366
366
|
$ qfg audit-log my.flag
|
|
367
367
|
```
|
|
368
368
|
|
|
369
|
-
_See code: [src/commands/audit-log.ts](https://github.com/quonfig/cli/blob/v0.0.
|
|
369
|
+
_See code: [src/commands/audit-log.ts](https://github.com/quonfig/cli/blob/v0.0.74/src/commands/audit-log.ts)_
|
|
370
370
|
|
|
371
371
|
## `qfg cleanup`
|
|
372
372
|
|
|
@@ -407,7 +407,7 @@ EXAMPLES
|
|
|
407
407
|
$ qfg cleanup status my.flag.key
|
|
408
408
|
```
|
|
409
409
|
|
|
410
|
-
_See code: [src/commands/cleanup.ts](https://github.com/quonfig/cli/blob/v0.0.
|
|
410
|
+
_See code: [src/commands/cleanup.ts](https://github.com/quonfig/cli/blob/v0.0.74/src/commands/cleanup.ts)_
|
|
411
411
|
|
|
412
412
|
## `qfg cleanup list`
|
|
413
413
|
|
|
@@ -453,7 +453,7 @@ EXAMPLES
|
|
|
453
453
|
$ qfg cleanup list --json
|
|
454
454
|
```
|
|
455
455
|
|
|
456
|
-
_See code: [src/commands/cleanup/list.ts](https://github.com/quonfig/cli/blob/v0.0.
|
|
456
|
+
_See code: [src/commands/cleanup/list.ts](https://github.com/quonfig/cli/blob/v0.0.74/src/commands/cleanup/list.ts)_
|
|
457
457
|
|
|
458
458
|
## `qfg cleanup remove [NAME]`
|
|
459
459
|
|
|
@@ -498,7 +498,7 @@ EXAMPLES
|
|
|
498
498
|
$ qfg cleanup remove my.flag.key --json
|
|
499
499
|
```
|
|
500
500
|
|
|
501
|
-
_See code: [src/commands/cleanup/remove.ts](https://github.com/quonfig/cli/blob/v0.0.
|
|
501
|
+
_See code: [src/commands/cleanup/remove.ts](https://github.com/quonfig/cli/blob/v0.0.74/src/commands/cleanup/remove.ts)_
|
|
502
502
|
|
|
503
503
|
## `qfg cleanup status [NAME]`
|
|
504
504
|
|
|
@@ -538,7 +538,7 @@ EXAMPLES
|
|
|
538
538
|
$ qfg cleanup status my.flag.key --json
|
|
539
539
|
```
|
|
540
540
|
|
|
541
|
-
_See code: [src/commands/cleanup/status.ts](https://github.com/quonfig/cli/blob/v0.0.
|
|
541
|
+
_See code: [src/commands/cleanup/status.ts](https://github.com/quonfig/cli/blob/v0.0.74/src/commands/cleanup/status.ts)_
|
|
542
542
|
|
|
543
543
|
## `qfg cleanup verify [NAME]`
|
|
544
544
|
|
|
@@ -584,7 +584,7 @@ EXAMPLES
|
|
|
584
584
|
$ qfg cleanup verify my.flag.key && qfg delete my.flag.key
|
|
585
585
|
```
|
|
586
586
|
|
|
587
|
-
_See code: [src/commands/cleanup/verify.ts](https://github.com/quonfig/cli/blob/v0.0.
|
|
587
|
+
_See code: [src/commands/cleanup/verify.ts](https://github.com/quonfig/cli/blob/v0.0.74/src/commands/cleanup/verify.ts)_
|
|
588
588
|
|
|
589
589
|
## `qfg config-schema`
|
|
590
590
|
|
|
@@ -613,7 +613,7 @@ EXAMPLES
|
|
|
613
613
|
$ qfg config-schema --json-schema # full JSON Schema document (copy into your editor)
|
|
614
614
|
```
|
|
615
615
|
|
|
616
|
-
_See code: [src/commands/config-schema.ts](https://github.com/quonfig/cli/blob/v0.0.
|
|
616
|
+
_See code: [src/commands/config-schema.ts](https://github.com/quonfig/cli/blob/v0.0.74/src/commands/config-schema.ts)_
|
|
617
617
|
|
|
618
618
|
## `qfg create NAME`
|
|
619
619
|
|
|
@@ -700,7 +700,7 @@ EXAMPLES
|
|
|
700
700
|
$ qfg set-rollout my.new.flag --environment production --true-percent 20
|
|
701
701
|
```
|
|
702
702
|
|
|
703
|
-
_See code: [src/commands/create.ts](https://github.com/quonfig/cli/blob/v0.0.
|
|
703
|
+
_See code: [src/commands/create.ts](https://github.com/quonfig/cli/blob/v0.0.74/src/commands/create.ts)_
|
|
704
704
|
|
|
705
705
|
## `qfg delete NAME`
|
|
706
706
|
|
|
@@ -746,7 +746,7 @@ EXAMPLES
|
|
|
746
746
|
$ qfg delete my.config --yes
|
|
747
747
|
```
|
|
748
748
|
|
|
749
|
-
_See code: [src/commands/delete.ts](https://github.com/quonfig/cli/blob/v0.0.
|
|
749
|
+
_See code: [src/commands/delete.ts](https://github.com/quonfig/cli/blob/v0.0.74/src/commands/delete.ts)_
|
|
750
750
|
|
|
751
751
|
## `qfg flag info [NAME]`
|
|
752
752
|
|
|
@@ -950,7 +950,7 @@ EXAMPLES
|
|
|
950
950
|
$ qfg generate --targets node-ts -o ./dist # combine with targets
|
|
951
951
|
```
|
|
952
952
|
|
|
953
|
-
_See code: [src/commands/generate.ts](https://github.com/quonfig/cli/blob/v0.0.
|
|
953
|
+
_See code: [src/commands/generate.ts](https://github.com/quonfig/cli/blob/v0.0.74/src/commands/generate.ts)_
|
|
954
954
|
|
|
955
955
|
## `qfg generate-new-hex-key`
|
|
956
956
|
|
|
@@ -973,7 +973,7 @@ EXAMPLES
|
|
|
973
973
|
$ qfg generate-new-hex-key
|
|
974
974
|
```
|
|
975
975
|
|
|
976
|
-
_See code: [src/commands/generate-new-hex-key.ts](https://github.com/quonfig/cli/blob/v0.0.
|
|
976
|
+
_See code: [src/commands/generate-new-hex-key.ts](https://github.com/quonfig/cli/blob/v0.0.74/src/commands/generate-new-hex-key.ts)_
|
|
977
977
|
|
|
978
978
|
## `qfg get [NAME]`
|
|
979
979
|
|
|
@@ -1005,7 +1005,7 @@ EXAMPLES
|
|
|
1005
1005
|
$ qfg get my.config.name --environment=production
|
|
1006
1006
|
```
|
|
1007
1007
|
|
|
1008
|
-
_See code: [src/commands/get.ts](https://github.com/quonfig/cli/blob/v0.0.
|
|
1008
|
+
_See code: [src/commands/get.ts](https://github.com/quonfig/cli/blob/v0.0.74/src/commands/get.ts)_
|
|
1009
1009
|
|
|
1010
1010
|
## `qfg history NAME`
|
|
1011
1011
|
|
|
@@ -1031,7 +1031,7 @@ EXAMPLES
|
|
|
1031
1031
|
$ qfg history my.flag
|
|
1032
1032
|
```
|
|
1033
1033
|
|
|
1034
|
-
_See code: [src/commands/history.ts](https://github.com/quonfig/cli/blob/v0.0.
|
|
1034
|
+
_See code: [src/commands/history.ts](https://github.com/quonfig/cli/blob/v0.0.74/src/commands/history.ts)_
|
|
1035
1035
|
|
|
1036
1036
|
## `qfg info [NAME]`
|
|
1037
1037
|
|
|
@@ -1079,7 +1079,7 @@ EXAMPLES
|
|
|
1079
1079
|
$ qfg info my.config.name --exclude-evaluations # skip 24h stats
|
|
1080
1080
|
```
|
|
1081
1081
|
|
|
1082
|
-
_See code: [src/commands/info.ts](https://github.com/quonfig/cli/blob/v0.0.
|
|
1082
|
+
_See code: [src/commands/info.ts](https://github.com/quonfig/cli/blob/v0.0.74/src/commands/info.ts)_
|
|
1083
1083
|
|
|
1084
1084
|
## `qfg init [DIRECTORY]`
|
|
1085
1085
|
|
|
@@ -1119,7 +1119,7 @@ EXAMPLES
|
|
|
1119
1119
|
$ qfg init --dry-run
|
|
1120
1120
|
```
|
|
1121
1121
|
|
|
1122
|
-
_See code: [src/commands/init.ts](https://github.com/quonfig/cli/blob/v0.0.
|
|
1122
|
+
_See code: [src/commands/init.ts](https://github.com/quonfig/cli/blob/v0.0.74/src/commands/init.ts)_
|
|
1123
1123
|
|
|
1124
1124
|
## `qfg interactive`
|
|
1125
1125
|
|
|
@@ -1149,7 +1149,7 @@ EXAMPLES
|
|
|
1149
1149
|
$ qfg
|
|
1150
1150
|
```
|
|
1151
1151
|
|
|
1152
|
-
_See code: [src/commands/interactive.ts](https://github.com/quonfig/cli/blob/v0.0.
|
|
1152
|
+
_See code: [src/commands/interactive.ts](https://github.com/quonfig/cli/blob/v0.0.74/src/commands/interactive.ts)_
|
|
1153
1153
|
|
|
1154
1154
|
## `qfg list`
|
|
1155
1155
|
|
|
@@ -1189,7 +1189,7 @@ EXAMPLES
|
|
|
1189
1189
|
$ qfg list --feature-flags
|
|
1190
1190
|
```
|
|
1191
1191
|
|
|
1192
|
-
_See code: [src/commands/list.ts](https://github.com/quonfig/cli/blob/v0.0.
|
|
1192
|
+
_See code: [src/commands/list.ts](https://github.com/quonfig/cli/blob/v0.0.74/src/commands/list.ts)_
|
|
1193
1193
|
|
|
1194
1194
|
## `qfg log`
|
|
1195
1195
|
|
|
@@ -1214,7 +1214,7 @@ EXAMPLES
|
|
|
1214
1214
|
$ qfg log --limit 5
|
|
1215
1215
|
```
|
|
1216
1216
|
|
|
1217
|
-
_See code: [src/commands/log.ts](https://github.com/quonfig/cli/blob/v0.0.
|
|
1217
|
+
_See code: [src/commands/log.ts](https://github.com/quonfig/cli/blob/v0.0.74/src/commands/log.ts)_
|
|
1218
1218
|
|
|
1219
1219
|
## `qfg log-level NAME`
|
|
1220
1220
|
|
|
@@ -1279,7 +1279,7 @@ EXAMPLES
|
|
|
1279
1279
|
$ qfg log-level log-level.my-app --target=Chatty --value=INFO --environment=production
|
|
1280
1280
|
```
|
|
1281
1281
|
|
|
1282
|
-
_See code: [src/commands/log-level.ts](https://github.com/quonfig/cli/blob/v0.0.
|
|
1282
|
+
_See code: [src/commands/log-level.ts](https://github.com/quonfig/cli/blob/v0.0.74/src/commands/log-level.ts)_
|
|
1283
1283
|
|
|
1284
1284
|
## `qfg login`
|
|
1285
1285
|
|
|
@@ -1304,7 +1304,7 @@ EXAMPLES
|
|
|
1304
1304
|
$ qfg login --profile myprofile
|
|
1305
1305
|
```
|
|
1306
1306
|
|
|
1307
|
-
_See code: [src/commands/login.ts](https://github.com/quonfig/cli/blob/v0.0.
|
|
1307
|
+
_See code: [src/commands/login.ts](https://github.com/quonfig/cli/blob/v0.0.74/src/commands/login.ts)_
|
|
1308
1308
|
|
|
1309
1309
|
## `qfg logout`
|
|
1310
1310
|
|
|
@@ -1327,7 +1327,7 @@ EXAMPLES
|
|
|
1327
1327
|
$ qfg logout
|
|
1328
1328
|
```
|
|
1329
1329
|
|
|
1330
|
-
_See code: [src/commands/logout.ts](https://github.com/quonfig/cli/blob/v0.0.
|
|
1330
|
+
_See code: [src/commands/logout.ts](https://github.com/quonfig/cli/blob/v0.0.74/src/commands/logout.ts)_
|
|
1331
1331
|
|
|
1332
1332
|
## `qfg migrate`
|
|
1333
1333
|
|
|
@@ -1392,7 +1392,7 @@ EXAMPLES
|
|
|
1392
1392
|
$ qfg migrate --from launch --source-api-key $LAUNCH_API_KEY --dir ./quonfig-repo --staging
|
|
1393
1393
|
```
|
|
1394
1394
|
|
|
1395
|
-
_See code: [src/commands/migrate.ts](https://github.com/quonfig/cli/blob/v0.0.
|
|
1395
|
+
_See code: [src/commands/migrate.ts](https://github.com/quonfig/cli/blob/v0.0.74/src/commands/migrate.ts)_
|
|
1396
1396
|
|
|
1397
1397
|
## `qfg migrate doctor`
|
|
1398
1398
|
|
|
@@ -1430,7 +1430,7 @@ EXAMPLES
|
|
|
1430
1430
|
$ qfg migrate doctor --json
|
|
1431
1431
|
```
|
|
1432
1432
|
|
|
1433
|
-
_See code: [src/commands/migrate/doctor.ts](https://github.com/quonfig/cli/blob/v0.0.
|
|
1433
|
+
_See code: [src/commands/migrate/doctor.ts](https://github.com/quonfig/cli/blob/v0.0.74/src/commands/migrate/doctor.ts)_
|
|
1434
1434
|
|
|
1435
1435
|
## `qfg migrate my-code`
|
|
1436
1436
|
|
|
@@ -1462,7 +1462,7 @@ EXAMPLES
|
|
|
1462
1462
|
$ qfg migrate my-code --dry-run
|
|
1463
1463
|
```
|
|
1464
1464
|
|
|
1465
|
-
_See code: [src/commands/migrate/my-code.ts](https://github.com/quonfig/cli/blob/v0.0.
|
|
1465
|
+
_See code: [src/commands/migrate/my-code.ts](https://github.com/quonfig/cli/blob/v0.0.74/src/commands/migrate/my-code.ts)_
|
|
1466
1466
|
|
|
1467
1467
|
## `qfg migrate status`
|
|
1468
1468
|
|
|
@@ -1493,7 +1493,7 @@ EXAMPLES
|
|
|
1493
1493
|
$ qfg migrate status --json
|
|
1494
1494
|
```
|
|
1495
1495
|
|
|
1496
|
-
_See code: [src/commands/migrate/status.ts](https://github.com/quonfig/cli/blob/v0.0.
|
|
1496
|
+
_See code: [src/commands/migrate/status.ts](https://github.com/quonfig/cli/blob/v0.0.74/src/commands/migrate/status.ts)_
|
|
1497
1497
|
|
|
1498
1498
|
## `qfg override [NAME] [VALUE]`
|
|
1499
1499
|
|
|
@@ -1510,7 +1510,7 @@ ARGUMENTS
|
|
|
1510
1510
|
|
|
1511
1511
|
FLAGS
|
|
1512
1512
|
--clear remove ALL of your overrides in this env
|
|
1513
|
-
--env=<value> environment to operate in (
|
|
1513
|
+
--env=<value> environment to operate in (required; QUONFIG_ENVIRONMENT is never read)
|
|
1514
1514
|
--remove remove your override on this key
|
|
1515
1515
|
|
|
1516
1516
|
GLOBAL FLAGS
|
|
@@ -1548,7 +1548,7 @@ EXAMPLES
|
|
|
1548
1548
|
$ qfg override my.flag true --env=staging
|
|
1549
1549
|
```
|
|
1550
1550
|
|
|
1551
|
-
_See code: [src/commands/override.ts](https://github.com/quonfig/cli/blob/v0.0.
|
|
1551
|
+
_See code: [src/commands/override.ts](https://github.com/quonfig/cli/blob/v0.0.74/src/commands/override.ts)_
|
|
1552
1552
|
|
|
1553
1553
|
## `qfg pull`
|
|
1554
1554
|
|
|
@@ -1595,7 +1595,7 @@ EXAMPLES
|
|
|
1595
1595
|
$ qfg pull # uses QUONFIG_DIR env var
|
|
1596
1596
|
```
|
|
1597
1597
|
|
|
1598
|
-
_See code: [src/commands/pull.ts](https://github.com/quonfig/cli/blob/v0.0.
|
|
1598
|
+
_See code: [src/commands/pull.ts](https://github.com/quonfig/cli/blob/v0.0.74/src/commands/pull.ts)_
|
|
1599
1599
|
|
|
1600
1600
|
## `qfg push`
|
|
1601
1601
|
|
|
@@ -1644,7 +1644,7 @@ EXAMPLES
|
|
|
1644
1644
|
$ qfg push --dir ./our-config --yes
|
|
1645
1645
|
```
|
|
1646
1646
|
|
|
1647
|
-
_See code: [src/commands/push.ts](https://github.com/quonfig/cli/blob/v0.0.
|
|
1647
|
+
_See code: [src/commands/push.ts](https://github.com/quonfig/cli/blob/v0.0.74/src/commands/push.ts)_
|
|
1648
1648
|
|
|
1649
1649
|
## `qfg run [COMMAND]`
|
|
1650
1650
|
|
|
@@ -1695,7 +1695,7 @@ EXAMPLES
|
|
|
1695
1695
|
$ qfg run --env DATABASE_URL=db.url --preserve-env --environment=staging -- npm test
|
|
1696
1696
|
```
|
|
1697
1697
|
|
|
1698
|
-
_See code: [src/commands/run.ts](https://github.com/quonfig/cli/blob/v0.0.
|
|
1698
|
+
_See code: [src/commands/run.ts](https://github.com/quonfig/cli/blob/v0.0.74/src/commands/run.ts)_
|
|
1699
1699
|
|
|
1700
1700
|
## `qfg schema NAME`
|
|
1701
1701
|
|
|
@@ -1733,7 +1733,7 @@ EXAMPLES
|
|
|
1733
1733
|
$ qfg schema my-schema --set-json-schema=@schemas/my-schema.json --protected
|
|
1734
1734
|
```
|
|
1735
1735
|
|
|
1736
|
-
_See code: [src/commands/schema.ts](https://github.com/quonfig/cli/blob/v0.0.
|
|
1736
|
+
_See code: [src/commands/schema.ts](https://github.com/quonfig/cli/blob/v0.0.74/src/commands/schema.ts)_
|
|
1737
1737
|
|
|
1738
1738
|
## `qfg sdk-key`
|
|
1739
1739
|
|
|
@@ -1760,7 +1760,7 @@ EXAMPLES
|
|
|
1760
1760
|
$ qfg sdk-key revoke <key-id>
|
|
1761
1761
|
```
|
|
1762
1762
|
|
|
1763
|
-
_See code: [src/commands/sdk-key.ts](https://github.com/quonfig/cli/blob/v0.0.
|
|
1763
|
+
_See code: [src/commands/sdk-key.ts](https://github.com/quonfig/cli/blob/v0.0.74/src/commands/sdk-key.ts)_
|
|
1764
1764
|
|
|
1765
1765
|
## `qfg sdk-key create`
|
|
1766
1766
|
|
|
@@ -1792,7 +1792,7 @@ EXAMPLES
|
|
|
1792
1792
|
$ qfg sdk-key create --environment staging --type browser
|
|
1793
1793
|
```
|
|
1794
1794
|
|
|
1795
|
-
_See code: [src/commands/sdk-key/create.ts](https://github.com/quonfig/cli/blob/v0.0.
|
|
1795
|
+
_See code: [src/commands/sdk-key/create.ts](https://github.com/quonfig/cli/blob/v0.0.74/src/commands/sdk-key/create.ts)_
|
|
1796
1796
|
|
|
1797
1797
|
## `qfg sdk-key list`
|
|
1798
1798
|
|
|
@@ -1821,7 +1821,7 @@ EXAMPLES
|
|
|
1821
1821
|
$ qfg sdk-key list --environment production
|
|
1822
1822
|
```
|
|
1823
1823
|
|
|
1824
|
-
_See code: [src/commands/sdk-key/list.ts](https://github.com/quonfig/cli/blob/v0.0.
|
|
1824
|
+
_See code: [src/commands/sdk-key/list.ts](https://github.com/quonfig/cli/blob/v0.0.74/src/commands/sdk-key/list.ts)_
|
|
1825
1825
|
|
|
1826
1826
|
## `qfg sdk-key revoke KEYID`
|
|
1827
1827
|
|
|
@@ -1848,7 +1848,7 @@ EXAMPLES
|
|
|
1848
1848
|
$ qfg sdk-key revoke a1b2c3d4-e5f6-7890-abcd-ef1234567890
|
|
1849
1849
|
```
|
|
1850
1850
|
|
|
1851
|
-
_See code: [src/commands/sdk-key/revoke.ts](https://github.com/quonfig/cli/blob/v0.0.
|
|
1851
|
+
_See code: [src/commands/sdk-key/revoke.ts](https://github.com/quonfig/cli/blob/v0.0.74/src/commands/sdk-key/revoke.ts)_
|
|
1852
1852
|
|
|
1853
1853
|
## `qfg serve`
|
|
1854
1854
|
|
|
@@ -1866,7 +1866,8 @@ FLAGS
|
|
|
1866
1866
|
non-loopback host.
|
|
1867
1867
|
--datadir=<value> Datadir to serve (defaults to ./our-config, then ./.quonfig, then errors). Honors
|
|
1868
1868
|
QUONFIG_DIR.
|
|
1869
|
-
--environment=<value> [default: development] Which environment slug to evaluate.
|
|
1869
|
+
--environment=<value> [default: development] Which environment slug to evaluate. Flag wins, then
|
|
1870
|
+
QUONFIG_ENVIRONMENT (serve hosts a service, so the var is its identity), then development.
|
|
1870
1871
|
--frontend-sdk-key=<value> If set, every request must present Authorization: Basic 1:<key>. If unset, the server is
|
|
1871
1872
|
open (matches the "datadir is the source of truth" mental model).
|
|
1872
1873
|
--host=<value> [default: 127.0.0.1] Bind address. Loopback by default; non-loopback requires
|
|
@@ -1905,16 +1906,17 @@ EXAMPLES
|
|
|
1905
1906
|
$ qfg serve --port 6581 --frontend-sdk-key PUBLIC_KEY
|
|
1906
1907
|
```
|
|
1907
1908
|
|
|
1908
|
-
_See code: [src/commands/serve.ts](https://github.com/quonfig/cli/blob/v0.0.
|
|
1909
|
+
_See code: [src/commands/serve.ts](https://github.com/quonfig/cli/blob/v0.0.74/src/commands/serve.ts)_
|
|
1909
1910
|
|
|
1910
1911
|
## `qfg set-default [NAME]`
|
|
1911
1912
|
|
|
1912
|
-
Set the
|
|
1913
|
+
Set the fallback value for a flag or config in one environment.
|
|
1913
1914
|
|
|
1914
1915
|
```
|
|
1915
1916
|
USAGE
|
|
1916
1917
|
$ qfg set-default [NAME] [--json] [--interactive] [--no-color] [--verbose] [-w <value>] [--confidential]
|
|
1917
|
-
[--env-var <value>] [--environment <value>] [--value <value>] [--confirm] [--secret]
|
|
1918
|
+
[--env-var <value>] [--environment <value>] [--replace-targeting] [--value <value>] [--confirm] [--secret]
|
|
1919
|
+
[--secret-key-name <value>]
|
|
1918
1920
|
|
|
1919
1921
|
ARGUMENTS
|
|
1920
1922
|
NAME config/feature-flag/etc. name
|
|
@@ -1924,6 +1926,8 @@ FLAGS
|
|
|
1924
1926
|
--confirm confirm without prompt
|
|
1925
1927
|
--env-var=<value> environment variable to use as default value
|
|
1926
1928
|
--environment=<value> environment to change
|
|
1929
|
+
--replace-targeting set the value for EVERYONE: delete this environment's targeting rules instead of keeping
|
|
1930
|
+
them (they stay in git history)
|
|
1927
1931
|
--secret encrypt the value of this item
|
|
1928
1932
|
--secret-key-name=<value> [default: quonfig.secrets.encryption.key] name of the secret key to use for
|
|
1929
1933
|
encryption/decryption
|
|
@@ -1937,15 +1941,17 @@ GLOBAL FLAGS
|
|
|
1937
1941
|
--verbose Verbose output
|
|
1938
1942
|
|
|
1939
1943
|
DESCRIPTION
|
|
1940
|
-
Set the
|
|
1944
|
+
Set the fallback value for a flag or config in one environment.
|
|
1941
1945
|
|
|
1942
|
-
|
|
1943
|
-
|
|
1944
|
-
|
|
1946
|
+
The fallback is the unconditional rule at the end of the environment's rule
|
|
1947
|
+
list: what users receive when no targeting rule matches. Targeting rules and
|
|
1948
|
+
percentage rollouts above it are kept, and the command tells you how many.
|
|
1949
|
+
If the environment has no rules of its own yet, they are copied from the
|
|
1950
|
+
flag's default rules first, so inherited targeting is kept too.
|
|
1945
1951
|
|
|
1946
|
-
|
|
1947
|
-
|
|
1948
|
-
|
|
1952
|
+
To turn a flag on or off for EVERYONE, including users matched by targeting
|
|
1953
|
+
rules, add --replace-targeting. This deletes the environment's targeting
|
|
1954
|
+
rules (they stay in git history).
|
|
1949
1955
|
|
|
1950
1956
|
To set a percentage rollout (gradual rollout / A/B test / canary deploy) instead:
|
|
1951
1957
|
qfg set-rollout my.flag --environment production --true-percent 20
|
|
@@ -1961,7 +1967,7 @@ EXAMPLES
|
|
|
1961
1967
|
|
|
1962
1968
|
$ qfg set-default my.flag.name --value=true --environment=staging
|
|
1963
1969
|
|
|
1964
|
-
$ qfg set-default my.flag.name --value=false --environment=production # kill-switch:
|
|
1970
|
+
$ qfg set-default my.flag.name --value=false --environment=production --replace-targeting # kill-switch: off for everyone
|
|
1965
1971
|
|
|
1966
1972
|
$ qfg set-default my.flag.name --value=true --secret
|
|
1967
1973
|
|
|
@@ -1976,7 +1982,7 @@ EXAMPLES
|
|
|
1976
1982
|
$ qfg pull && qfg config-schema
|
|
1977
1983
|
```
|
|
1978
1984
|
|
|
1979
|
-
_See code: [src/commands/set-default.ts](https://github.com/quonfig/cli/blob/v0.0.
|
|
1985
|
+
_See code: [src/commands/set-default.ts](https://github.com/quonfig/cli/blob/v0.0.74/src/commands/set-default.ts)_
|
|
1980
1986
|
|
|
1981
1987
|
## `qfg set-rollout [NAME]`
|
|
1982
1988
|
|
|
@@ -1985,7 +1991,7 @@ Configure a percentage rollout (gradual rollout / A/B test / canary deploy) for
|
|
|
1985
1991
|
```
|
|
1986
1992
|
USAGE
|
|
1987
1993
|
$ qfg set-rollout [NAME] [--json] [--interactive] [--no-color] [--verbose] [-w <value>] [--environment <value>]
|
|
1988
|
-
[--hash-by <value>] [--true-percent <value>] [--weights <value>] [--confirm]
|
|
1994
|
+
[--hash-by <value>] [--true-percent <value>] [--replace-targeting] [--weights <value>] [--confirm]
|
|
1989
1995
|
|
|
1990
1996
|
ARGUMENTS
|
|
1991
1997
|
NAME config/feature-flag/etc. name
|
|
@@ -1994,6 +2000,8 @@ FLAGS
|
|
|
1994
2000
|
--confirm skip the interactive confirmation prompt (useful for scripts and agents)
|
|
1995
2001
|
--environment=<value> environment to update (e.g. production, staging)
|
|
1996
2002
|
--hash-by=<value> [default: user.key] user property used to assign buckets (default: user.key)
|
|
2003
|
+
--replace-targeting roll out to EVERYONE: delete this environment's targeting rules instead of keeping them (they
|
|
2004
|
+
stay in git history)
|
|
1997
2005
|
--true-percent=<value> percentage of users that receive true (0–100). Remaining users receive false. Boolean flags
|
|
1998
2006
|
only.
|
|
1999
2007
|
--weights=<value> comma-separated "value:percent" pairs that must sum to 100 (e.g. "true:20,false:80" or
|
|
@@ -2026,6 +2034,16 @@ DESCRIPTION
|
|
|
2026
2034
|
Use --hash-by to change which property drives the bucket assignment:
|
|
2027
2035
|
qfg set-rollout my.flag --environment production --true-percent 10 --hash-by user.id
|
|
2028
2036
|
|
|
2037
|
+
The rollout becomes the environment's fallback: the unconditional rule at the end
|
|
2038
|
+
of its rule list, what users receive when no targeting rule matches. Targeting
|
|
2039
|
+
rules above it are kept, and the command tells you how many. If the environment
|
|
2040
|
+
has no rules of its own yet, they are copied from the flag's default rules first,
|
|
2041
|
+
so inherited targeting is kept too.
|
|
2042
|
+
|
|
2043
|
+
To roll out to EVERYONE, including users matched by targeting rules, add
|
|
2044
|
+
--replace-targeting. This deletes the environment's targeting rules (they stay in
|
|
2045
|
+
git history).
|
|
2046
|
+
|
|
2029
2047
|
For scripted / agent use, add --confirm to skip the interactive confirmation prompt.
|
|
2030
2048
|
|
|
2031
2049
|
To combine a rollout with segment targeting (e.g. beta ON, holdout OFF, everyone else 50/50),
|
|
@@ -2034,7 +2052,7 @@ DESCRIPTION
|
|
|
2034
2052
|
qfg pull --dir ./config # clone workspace to edit
|
|
2035
2053
|
|
|
2036
2054
|
To revert to a single value for everyone, use:
|
|
2037
|
-
qfg set-default my.flag --environment production --value false
|
|
2055
|
+
qfg set-default my.flag --environment production --value false --replace-targeting
|
|
2038
2056
|
|
|
2039
2057
|
To inspect the current rollout:
|
|
2040
2058
|
qfg info my.flag
|
|
@@ -2046,14 +2064,16 @@ EXAMPLES
|
|
|
2046
2064
|
|
|
2047
2065
|
$ qfg set-rollout my.feature.flag --environment production --true-percent 100 # full rollout
|
|
2048
2066
|
|
|
2049
|
-
|
|
2067
|
+
# For a kill switch — false for EVERYONE, including targeted users — use set-default:
|
|
2068
|
+
|
|
2069
|
+
$ qfg set-default my.feature.flag --value=false --environment=production --replace-targeting
|
|
2050
2070
|
|
|
2051
2071
|
$ qfg set-rollout my.variant.flag --environment production --weights "control:50,treatment:50"
|
|
2052
2072
|
|
|
2053
2073
|
$ qfg set-rollout my.variant.flag --environment production --weights "a:33,b:33,c:34" --hash-by user.id
|
|
2054
2074
|
```
|
|
2055
2075
|
|
|
2056
|
-
_See code: [src/commands/set-rollout.ts](https://github.com/quonfig/cli/blob/v0.0.
|
|
2076
|
+
_See code: [src/commands/set-rollout.ts](https://github.com/quonfig/cli/blob/v0.0.74/src/commands/set-rollout.ts)_
|
|
2057
2077
|
|
|
2058
2078
|
## `qfg sync`
|
|
2059
2079
|
|
|
@@ -2085,16 +2105,17 @@ EXAMPLES
|
|
|
2085
2105
|
$ qfg sync --watch --dir ./our-config --interval 30
|
|
2086
2106
|
```
|
|
2087
2107
|
|
|
2088
|
-
_See code: [src/commands/sync.ts](https://github.com/quonfig/cli/blob/v0.0.
|
|
2108
|
+
_See code: [src/commands/sync.ts](https://github.com/quonfig/cli/blob/v0.0.74/src/commands/sync.ts)_
|
|
2089
2109
|
|
|
2090
2110
|
## `qfg toggle [NAME]`
|
|
2091
2111
|
|
|
2092
|
-
Set the
|
|
2112
|
+
Set the fallback value for a flag or config in one environment.
|
|
2093
2113
|
|
|
2094
2114
|
```
|
|
2095
2115
|
USAGE
|
|
2096
2116
|
$ qfg toggle [NAME] [--json] [--interactive] [--no-color] [--verbose] [-w <value>] [--confidential]
|
|
2097
|
-
[--env-var <value>] [--environment <value>] [--value <value>] [--confirm] [--secret]
|
|
2117
|
+
[--env-var <value>] [--environment <value>] [--replace-targeting] [--value <value>] [--confirm] [--secret]
|
|
2118
|
+
[--secret-key-name <value>]
|
|
2098
2119
|
|
|
2099
2120
|
ARGUMENTS
|
|
2100
2121
|
NAME config/feature-flag/etc. name
|
|
@@ -2104,6 +2125,8 @@ FLAGS
|
|
|
2104
2125
|
--confirm confirm without prompt
|
|
2105
2126
|
--env-var=<value> environment variable to use as default value
|
|
2106
2127
|
--environment=<value> environment to change
|
|
2128
|
+
--replace-targeting set the value for EVERYONE: delete this environment's targeting rules instead of keeping
|
|
2129
|
+
them (they stay in git history)
|
|
2107
2130
|
--secret encrypt the value of this item
|
|
2108
2131
|
--secret-key-name=<value> [default: quonfig.secrets.encryption.key] name of the secret key to use for
|
|
2109
2132
|
encryption/decryption
|
|
@@ -2117,15 +2140,17 @@ GLOBAL FLAGS
|
|
|
2117
2140
|
--verbose Verbose output
|
|
2118
2141
|
|
|
2119
2142
|
DESCRIPTION
|
|
2120
|
-
Set the
|
|
2143
|
+
Set the fallback value for a flag or config in one environment.
|
|
2121
2144
|
|
|
2122
|
-
|
|
2123
|
-
|
|
2124
|
-
|
|
2145
|
+
The fallback is the unconditional rule at the end of the environment's rule
|
|
2146
|
+
list: what users receive when no targeting rule matches. Targeting rules and
|
|
2147
|
+
percentage rollouts above it are kept, and the command tells you how many.
|
|
2148
|
+
If the environment has no rules of its own yet, they are copied from the
|
|
2149
|
+
flag's default rules first, so inherited targeting is kept too.
|
|
2125
2150
|
|
|
2126
|
-
|
|
2127
|
-
|
|
2128
|
-
|
|
2151
|
+
To turn a flag on or off for EVERYONE, including users matched by targeting
|
|
2152
|
+
rules, add --replace-targeting. This deletes the environment's targeting
|
|
2153
|
+
rules (they stay in git history).
|
|
2129
2154
|
|
|
2130
2155
|
To set a percentage rollout (gradual rollout / A/B test / canary deploy) instead:
|
|
2131
2156
|
qfg set-rollout my.flag --environment production --true-percent 20
|
|
@@ -2141,7 +2166,7 @@ EXAMPLES
|
|
|
2141
2166
|
|
|
2142
2167
|
$ qfg toggle my.flag.name --value=true --environment=staging
|
|
2143
2168
|
|
|
2144
|
-
$ qfg toggle my.flag.name --value=false --environment=production # kill-switch:
|
|
2169
|
+
$ qfg toggle my.flag.name --value=false --environment=production --replace-targeting # kill-switch: off for everyone
|
|
2145
2170
|
|
|
2146
2171
|
$ qfg toggle my.flag.name --value=true --secret
|
|
2147
2172
|
|
|
@@ -2187,7 +2212,7 @@ EXAMPLES
|
|
|
2187
2212
|
$ qfg verify --json
|
|
2188
2213
|
```
|
|
2189
2214
|
|
|
2190
|
-
_See code: [src/commands/verify.ts](https://github.com/quonfig/cli/blob/v0.0.
|
|
2215
|
+
_See code: [src/commands/verify.ts](https://github.com/quonfig/cli/blob/v0.0.74/src/commands/verify.ts)_
|
|
2191
2216
|
|
|
2192
2217
|
## `qfg whoami`
|
|
2193
2218
|
|
|
@@ -2210,7 +2235,7 @@ EXAMPLES
|
|
|
2210
2235
|
$ qfg whoami
|
|
2211
2236
|
```
|
|
2212
2237
|
|
|
2213
|
-
_See code: [src/commands/whoami.ts](https://github.com/quonfig/cli/blob/v0.0.
|
|
2238
|
+
_See code: [src/commands/whoami.ts](https://github.com/quonfig/cli/blob/v0.0.74/src/commands/whoami.ts)_
|
|
2214
2239
|
|
|
2215
2240
|
## `qfg workspace`
|
|
2216
2241
|
|
|
@@ -2233,7 +2258,7 @@ EXAMPLES
|
|
|
2233
2258
|
$ qfg workspace
|
|
2234
2259
|
```
|
|
2235
2260
|
|
|
2236
|
-
_See code: [src/commands/workspace.ts](https://github.com/quonfig/cli/blob/v0.0.
|
|
2261
|
+
_See code: [src/commands/workspace.ts](https://github.com/quonfig/cli/blob/v0.0.74/src/commands/workspace.ts)_
|
|
2237
2262
|
|
|
2238
2263
|
## `qfg workspace bootstrap`
|
|
2239
2264
|
|
|
@@ -2266,7 +2291,7 @@ EXAMPLES
|
|
|
2266
2291
|
$ qfg workspace bootstrap --dir ./our-config --skip-validate
|
|
2267
2292
|
```
|
|
2268
2293
|
|
|
2269
|
-
_See code: [src/commands/workspace/bootstrap.ts](https://github.com/quonfig/cli/blob/v0.0.
|
|
2294
|
+
_See code: [src/commands/workspace/bootstrap.ts](https://github.com/quonfig/cli/blob/v0.0.74/src/commands/workspace/bootstrap.ts)_
|
|
2270
2295
|
|
|
2271
2296
|
## `qfg workspace create SLUG`
|
|
2272
2297
|
|
|
@@ -2300,7 +2325,7 @@ EXAMPLES
|
|
|
2300
2325
|
$ qfg workspace create my-team --org 11111111-1111-1111-1111-111111111111
|
|
2301
2326
|
```
|
|
2302
2327
|
|
|
2303
|
-
_See code: [src/commands/workspace/create.ts](https://github.com/quonfig/cli/blob/v0.0.
|
|
2328
|
+
_See code: [src/commands/workspace/create.ts](https://github.com/quonfig/cli/blob/v0.0.74/src/commands/workspace/create.ts)_
|
|
2304
2329
|
|
|
2305
2330
|
## `qfg workspace switch [SLUG]`
|
|
2306
2331
|
|
|
@@ -2328,7 +2353,7 @@ EXAMPLES
|
|
|
2328
2353
|
$ qfg workspace switch acme/production
|
|
2329
2354
|
```
|
|
2330
2355
|
|
|
2331
|
-
_See code: [src/commands/workspace/switch.ts](https://github.com/quonfig/cli/blob/v0.0.
|
|
2356
|
+
_See code: [src/commands/workspace/switch.ts](https://github.com/quonfig/cli/blob/v0.0.74/src/commands/workspace/switch.ts)_
|
|
2332
2357
|
<!-- commandsstop -->
|
|
2333
2358
|
|
|
2334
2359
|
## Local Development
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Flags } from '@oclif/core';
|
|
2
2
|
import { APICommand } from '../../index.js';
|
|
3
3
|
import nameArg from '../../util/name-arg.js';
|
|
4
|
+
import { isCatchAllRule } from '../../util/rules.js';
|
|
4
5
|
function startOfDayUtcMs(date) {
|
|
5
6
|
return Date.UTC(date.getUTCFullYear(), date.getUTCMonth(), date.getUTCDate());
|
|
6
7
|
}
|
|
@@ -26,7 +27,10 @@ function formatRuleValue(value) {
|
|
|
26
27
|
function summarizeRules(rules) {
|
|
27
28
|
if (!rules || rules.length === 0)
|
|
28
29
|
return '[inherit default]';
|
|
29
|
-
|
|
30
|
+
// Both catch-all spellings count as the fallback (qfg-9kr8): a strict
|
|
31
|
+
// single-ALWAYS_TRUE find reported a targeting rule's value as the fallback
|
|
32
|
+
// for every scope written by an older `qfg set-default`.
|
|
33
|
+
const fallback = rules.find((r) => isCatchAllRule(r));
|
|
30
34
|
const overrides = rules.filter((r) => r !== fallback);
|
|
31
35
|
const fallbackStr = fallback ? formatRuleValue(fallback.value) : formatRuleValue(rules[0].value);
|
|
32
36
|
if (overrides.length === 0)
|