@quonfig/cli 0.0.49 → 0.0.51

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.
Files changed (35) hide show
  1. package/README.md +50 -48
  2. package/dist/commands/generate.js +21 -5
  3. package/dist/commands/info.d.ts +1 -0
  4. package/dist/commands/info.js +28 -1
  5. package/dist/commands/migrate.d.ts +1 -1
  6. package/dist/commands/migrate.js +16 -5
  7. package/dist/commands/pull.js +2 -2
  8. package/dist/init/templates.js +59 -12
  9. package/dist/migrate/local-write.js +11 -1
  10. package/dist/migrate/migration-report.d.ts +16 -5
  11. package/dist/migrate/migration-report.js +351 -20
  12. package/dist/migrate/push-to-cloud.js +6 -1
  13. package/dist/migrate/quonfig-target/report.d.ts +45 -4
  14. package/dist/migrate/quonfig-target/report.js +5 -2
  15. package/dist/migrate/quonfig-target/ruleset.js +8 -6
  16. package/dist/migrate/source.d.ts +27 -0
  17. package/dist/migrate/sources/flagsmith/api.d.ts +115 -0
  18. package/dist/migrate/sources/flagsmith/api.js +402 -0
  19. package/dist/migrate/sources/flagsmith/translate.d.ts +72 -0
  20. package/dist/migrate/sources/flagsmith/translate.js +657 -0
  21. package/dist/migrate/sources/flagsmith/types.d.ts +282 -0
  22. package/dist/migrate/sources/flagsmith/types.js +18 -0
  23. package/dist/migrate/sources/flagsmith.d.ts +62 -0
  24. package/dist/migrate/sources/flagsmith.js +380 -23
  25. package/dist/migrate/sources/launchdarkly/api.d.ts +22 -1
  26. package/dist/migrate/sources/launchdarkly/api.js +23 -1
  27. package/dist/migrate/sources/launchdarkly/translate.js +42 -2
  28. package/dist/migrate/sources/launchdarkly/types.d.ts +19 -0
  29. package/dist/migrate/sources/launchdarkly.js +75 -4
  30. package/dist/util/friction-log.d.ts +1 -0
  31. package/dist/util/friction-log.js +6 -1
  32. package/dist/version.d.ts +1 -1
  33. package/dist/version.js +1 -1
  34. package/oclif.manifest.json +158 -160
  35. package/package.json +2 -2
@@ -499,7 +499,7 @@
499
499
  "type": "boolean"
500
500
  },
501
501
  "dir": {
502
- "description": "Path to local QUONFIG_DIR (defaults to QUONFIG_DIR env var). When omitted, fetches the workspace from the server using your active credentials.",
502
+ "description": "Path to local QUONFIG_DIR (defaults to QUONFIG_DIR env var). When omitted, auto-detects a quonfig.json in the current directory; if none, fetches the workspace from the server.",
503
503
  "env": "QUONFIG_DIR",
504
504
  "name": "dir",
505
505
  "hasDynamicHelp": false,
@@ -1390,10 +1390,8 @@
1390
1390
  "type": "boolean"
1391
1391
  },
1392
1392
  "project": {
1393
- "description": "LaunchDarkly project key to migrate from (or set LAUNCHDARKLY_PROJECT_KEY). Scoped to `--from launchdarkly`; ignored by other sources.",
1394
- "env": "LAUNCHDARKLY_PROJECT_KEY",
1393
+ "description": "Source-system project identifier. For --from launchdarkly this is the project KEY (default: \"default\"; env: LAUNCHDARKLY_PROJECT_KEY). For --from flagsmith this is the numeric project ID (env: FLAGSMITH_PROJECT_ID). Ignored by --from launch.",
1395
1394
  "name": "project",
1396
- "default": "default",
1397
1395
  "hasDynamicHelp": false,
1398
1396
  "multiple": false,
1399
1397
  "type": "option"
@@ -3145,14 +3143,13 @@
3145
3143
  "status.js"
3146
3144
  ]
3147
3145
  },
3148
- "workspace:bootstrap": {
3146
+ "sdk-key:create": {
3149
3147
  "aliases": [],
3150
3148
  "args": {},
3151
- "description": "Push a local git repo to Gitea as this workspace's config repository",
3149
+ "description": "Create a new SDK key",
3152
3150
  "examples": [
3153
- "<%= config.bin %> workspace bootstrap --dir ./our-config",
3154
- "<%= config.bin %> workspace bootstrap --dir ./launch-migrator/output",
3155
- "<%= config.bin %> workspace bootstrap --dir ./our-config --skip-validate"
3151
+ "<%= config.bin %> <%= command.id %> --environment production --type server",
3152
+ "<%= config.bin %> <%= command.id %> --environment staging --type browser"
3156
3153
  ],
3157
3154
  "flags": {
3158
3155
  "json": {
@@ -3184,30 +3181,53 @@
3184
3181
  "allowNo": false,
3185
3182
  "type": "boolean"
3186
3183
  },
3187
- "dir": {
3188
- "description": "Local directory to push (defaults to current directory)",
3189
- "name": "dir",
3184
+ "workspace": {
3185
+ "char": "w",
3186
+ "description": "Workspace slug to use (overrides QUONFIG_WORKSPACE env var and saved default)",
3187
+ "helpGroup": "GLOBAL",
3188
+ "name": "workspace",
3190
3189
  "required": false,
3191
3190
  "hasDynamicHelp": false,
3192
3191
  "multiple": false,
3193
3192
  "type": "option"
3194
3193
  },
3195
- "force": {
3196
- "description": "Force push even if remote already has commits",
3197
- "name": "force",
3198
- "allowNo": false,
3199
- "type": "boolean"
3194
+ "profile": {
3195
+ "char": "p",
3196
+ "description": "Deprecated: use --workspace instead",
3197
+ "helpGroup": "GLOBAL",
3198
+ "hidden": true,
3199
+ "name": "profile",
3200
+ "required": false,
3201
+ "hasDynamicHelp": false,
3202
+ "multiple": false,
3203
+ "type": "option"
3200
3204
  },
3201
- "skip-validate": {
3202
- "description": "Skip config validation before pushing",
3203
- "name": "skip-validate",
3204
- "allowNo": false,
3205
- "type": "boolean"
3205
+ "environment": {
3206
+ "char": "e",
3207
+ "description": "Environment name (e.g. production, staging)",
3208
+ "name": "environment",
3209
+ "required": false,
3210
+ "hasDynamicHelp": false,
3211
+ "multiple": false,
3212
+ "type": "option"
3213
+ },
3214
+ "type": {
3215
+ "char": "t",
3216
+ "description": "Key type: server (backend) or browser (frontend)",
3217
+ "name": "type",
3218
+ "required": false,
3219
+ "hasDynamicHelp": false,
3220
+ "multiple": false,
3221
+ "options": [
3222
+ "server",
3223
+ "browser"
3224
+ ],
3225
+ "type": "option"
3206
3226
  }
3207
3227
  },
3208
3228
  "hasDynamicHelp": false,
3209
3229
  "hiddenAliases": [],
3210
- "id": "workspace:bootstrap",
3230
+ "id": "sdk-key:create",
3211
3231
  "pluginAlias": "@quonfig/cli",
3212
3232
  "pluginName": "@quonfig/cli",
3213
3233
  "pluginType": "core",
@@ -3217,24 +3237,17 @@
3217
3237
  "relativePath": [
3218
3238
  "dist",
3219
3239
  "commands",
3220
- "workspace",
3221
- "bootstrap.js"
3240
+ "sdk-key",
3241
+ "create.js"
3222
3242
  ]
3223
3243
  },
3224
- "workspace:create": {
3244
+ "sdk-key:list": {
3225
3245
  "aliases": [],
3226
- "args": {
3227
- "slug": {
3228
- "description": "Workspace slug (lowercase letters, numbers, hyphens)",
3229
- "name": "slug",
3230
- "required": true
3231
- }
3232
- },
3233
- "description": "Create a new workspace. Provisions the Gitea repo and default environments, identical to the app's New Workspace UI.",
3246
+ "args": {},
3247
+ "description": "List SDK keys for your workspace",
3234
3248
  "examples": [
3235
- "<%= config.bin %> <%= command.id %> my-team",
3236
- "<%= config.bin %> <%= command.id %> lt-21-smoke --name \"Load Test 21\"",
3237
- "<%= config.bin %> <%= command.id %> my-team --org 11111111-1111-1111-1111-111111111111"
3249
+ "<%= config.bin %> <%= command.id %>",
3250
+ "<%= config.bin %> <%= command.id %> --environment production"
3238
3251
  ],
3239
3252
  "flags": {
3240
3253
  "json": {
@@ -3266,17 +3279,31 @@
3266
3279
  "allowNo": false,
3267
3280
  "type": "boolean"
3268
3281
  },
3269
- "name": {
3270
- "description": "Human-readable display name (defaults to the slug)",
3271
- "name": "name",
3282
+ "workspace": {
3283
+ "char": "w",
3284
+ "description": "Workspace slug to use (overrides QUONFIG_WORKSPACE env var and saved default)",
3285
+ "helpGroup": "GLOBAL",
3286
+ "name": "workspace",
3272
3287
  "required": false,
3273
3288
  "hasDynamicHelp": false,
3274
3289
  "multiple": false,
3275
3290
  "type": "option"
3276
3291
  },
3277
- "org": {
3278
- "description": "Organization UUID or slug. Required when you belong to more than one organization; inferred otherwise.",
3279
- "name": "org",
3292
+ "profile": {
3293
+ "char": "p",
3294
+ "description": "Deprecated: use --workspace instead",
3295
+ "helpGroup": "GLOBAL",
3296
+ "hidden": true,
3297
+ "name": "profile",
3298
+ "required": false,
3299
+ "hasDynamicHelp": false,
3300
+ "multiple": false,
3301
+ "type": "option"
3302
+ },
3303
+ "environment": {
3304
+ "char": "e",
3305
+ "description": "Filter by environment name",
3306
+ "name": "environment",
3280
3307
  "required": false,
3281
3308
  "hasDynamicHelp": false,
3282
3309
  "multiple": false,
@@ -3285,7 +3312,7 @@
3285
3312
  },
3286
3313
  "hasDynamicHelp": false,
3287
3314
  "hiddenAliases": [],
3288
- "id": "workspace:create",
3315
+ "id": "sdk-key:list",
3289
3316
  "pluginAlias": "@quonfig/cli",
3290
3317
  "pluginName": "@quonfig/cli",
3291
3318
  "pluginType": "core",
@@ -3295,23 +3322,22 @@
3295
3322
  "relativePath": [
3296
3323
  "dist",
3297
3324
  "commands",
3298
- "workspace",
3299
- "create.js"
3325
+ "sdk-key",
3326
+ "list.js"
3300
3327
  ]
3301
3328
  },
3302
- "workspace:switch": {
3329
+ "sdk-key:revoke": {
3303
3330
  "aliases": [],
3304
3331
  "args": {
3305
- "slug": {
3306
- "description": "Workspace pin in `<org-slug>/<workspace-slug>` form. Omit for an interactive picker.",
3307
- "name": "slug",
3308
- "required": false
3332
+ "keyId": {
3333
+ "description": "ID of the SDK key to revoke",
3334
+ "name": "keyId",
3335
+ "required": true
3309
3336
  }
3310
3337
  },
3311
- "description": "Switch the saved default profile to a different (org, workspace) pair",
3338
+ "description": "Revoke an SDK key by its ID",
3312
3339
  "examples": [
3313
- "<%= config.bin %> <%= command.id %>",
3314
- "<%= config.bin %> <%= command.id %> acme/production"
3340
+ "<%= config.bin %> <%= command.id %> a1b2c3d4-e5f6-7890-abcd-ef1234567890"
3315
3341
  ],
3316
3342
  "flags": {
3317
3343
  "json": {
@@ -3342,11 +3368,32 @@
3342
3368
  "name": "verbose",
3343
3369
  "allowNo": false,
3344
3370
  "type": "boolean"
3371
+ },
3372
+ "workspace": {
3373
+ "char": "w",
3374
+ "description": "Workspace slug to use (overrides QUONFIG_WORKSPACE env var and saved default)",
3375
+ "helpGroup": "GLOBAL",
3376
+ "name": "workspace",
3377
+ "required": false,
3378
+ "hasDynamicHelp": false,
3379
+ "multiple": false,
3380
+ "type": "option"
3381
+ },
3382
+ "profile": {
3383
+ "char": "p",
3384
+ "description": "Deprecated: use --workspace instead",
3385
+ "helpGroup": "GLOBAL",
3386
+ "hidden": true,
3387
+ "name": "profile",
3388
+ "required": false,
3389
+ "hasDynamicHelp": false,
3390
+ "multiple": false,
3391
+ "type": "option"
3345
3392
  }
3346
3393
  },
3347
3394
  "hasDynamicHelp": false,
3348
3395
  "hiddenAliases": [],
3349
- "id": "workspace:switch",
3396
+ "id": "sdk-key:revoke",
3350
3397
  "pluginAlias": "@quonfig/cli",
3351
3398
  "pluginName": "@quonfig/cli",
3352
3399
  "pluginType": "core",
@@ -3356,17 +3403,18 @@
3356
3403
  "relativePath": [
3357
3404
  "dist",
3358
3405
  "commands",
3359
- "workspace",
3360
- "switch.js"
3406
+ "sdk-key",
3407
+ "revoke.js"
3361
3408
  ]
3362
3409
  },
3363
- "sdk-key:create": {
3410
+ "workspace:bootstrap": {
3364
3411
  "aliases": [],
3365
3412
  "args": {},
3366
- "description": "Create a new SDK key",
3413
+ "description": "Push a local git repo to Gitea as this workspace's config repository",
3367
3414
  "examples": [
3368
- "<%= config.bin %> <%= command.id %> --environment production --type server",
3369
- "<%= config.bin %> <%= command.id %> --environment staging --type browser"
3415
+ "<%= config.bin %> workspace bootstrap --dir ./our-config",
3416
+ "<%= config.bin %> workspace bootstrap --dir ./launch-migrator/output",
3417
+ "<%= config.bin %> workspace bootstrap --dir ./our-config --skip-validate"
3370
3418
  ],
3371
3419
  "flags": {
3372
3420
  "json": {
@@ -3398,53 +3446,30 @@
3398
3446
  "allowNo": false,
3399
3447
  "type": "boolean"
3400
3448
  },
3401
- "workspace": {
3402
- "char": "w",
3403
- "description": "Workspace slug to use (overrides QUONFIG_WORKSPACE env var and saved default)",
3404
- "helpGroup": "GLOBAL",
3405
- "name": "workspace",
3406
- "required": false,
3407
- "hasDynamicHelp": false,
3408
- "multiple": false,
3409
- "type": "option"
3410
- },
3411
- "profile": {
3412
- "char": "p",
3413
- "description": "Deprecated: use --workspace instead",
3414
- "helpGroup": "GLOBAL",
3415
- "hidden": true,
3416
- "name": "profile",
3449
+ "dir": {
3450
+ "description": "Local directory to push (defaults to current directory)",
3451
+ "name": "dir",
3417
3452
  "required": false,
3418
3453
  "hasDynamicHelp": false,
3419
3454
  "multiple": false,
3420
3455
  "type": "option"
3421
3456
  },
3422
- "environment": {
3423
- "char": "e",
3424
- "description": "Environment name (e.g. production, staging)",
3425
- "name": "environment",
3426
- "required": false,
3427
- "hasDynamicHelp": false,
3428
- "multiple": false,
3429
- "type": "option"
3457
+ "force": {
3458
+ "description": "Force push even if remote already has commits",
3459
+ "name": "force",
3460
+ "allowNo": false,
3461
+ "type": "boolean"
3430
3462
  },
3431
- "type": {
3432
- "char": "t",
3433
- "description": "Key type: server (backend) or browser (frontend)",
3434
- "name": "type",
3435
- "required": false,
3436
- "hasDynamicHelp": false,
3437
- "multiple": false,
3438
- "options": [
3439
- "server",
3440
- "browser"
3441
- ],
3442
- "type": "option"
3463
+ "skip-validate": {
3464
+ "description": "Skip config validation before pushing",
3465
+ "name": "skip-validate",
3466
+ "allowNo": false,
3467
+ "type": "boolean"
3443
3468
  }
3444
3469
  },
3445
3470
  "hasDynamicHelp": false,
3446
3471
  "hiddenAliases": [],
3447
- "id": "sdk-key:create",
3472
+ "id": "workspace:bootstrap",
3448
3473
  "pluginAlias": "@quonfig/cli",
3449
3474
  "pluginName": "@quonfig/cli",
3450
3475
  "pluginType": "core",
@@ -3454,17 +3479,24 @@
3454
3479
  "relativePath": [
3455
3480
  "dist",
3456
3481
  "commands",
3457
- "sdk-key",
3458
- "create.js"
3482
+ "workspace",
3483
+ "bootstrap.js"
3459
3484
  ]
3460
3485
  },
3461
- "sdk-key:list": {
3486
+ "workspace:create": {
3462
3487
  "aliases": [],
3463
- "args": {},
3464
- "description": "List SDK keys for your workspace",
3488
+ "args": {
3489
+ "slug": {
3490
+ "description": "Workspace slug (lowercase letters, numbers, hyphens)",
3491
+ "name": "slug",
3492
+ "required": true
3493
+ }
3494
+ },
3495
+ "description": "Create a new workspace. Provisions the Gitea repo and default environments, identical to the app's New Workspace UI.",
3465
3496
  "examples": [
3466
- "<%= config.bin %> <%= command.id %>",
3467
- "<%= config.bin %> <%= command.id %> --environment production"
3497
+ "<%= config.bin %> <%= command.id %> my-team",
3498
+ "<%= config.bin %> <%= command.id %> lt-21-smoke --name \"Load Test 21\"",
3499
+ "<%= config.bin %> <%= command.id %> my-team --org 11111111-1111-1111-1111-111111111111"
3468
3500
  ],
3469
3501
  "flags": {
3470
3502
  "json": {
@@ -3496,31 +3528,17 @@
3496
3528
  "allowNo": false,
3497
3529
  "type": "boolean"
3498
3530
  },
3499
- "workspace": {
3500
- "char": "w",
3501
- "description": "Workspace slug to use (overrides QUONFIG_WORKSPACE env var and saved default)",
3502
- "helpGroup": "GLOBAL",
3503
- "name": "workspace",
3504
- "required": false,
3505
- "hasDynamicHelp": false,
3506
- "multiple": false,
3507
- "type": "option"
3508
- },
3509
- "profile": {
3510
- "char": "p",
3511
- "description": "Deprecated: use --workspace instead",
3512
- "helpGroup": "GLOBAL",
3513
- "hidden": true,
3514
- "name": "profile",
3531
+ "name": {
3532
+ "description": "Human-readable display name (defaults to the slug)",
3533
+ "name": "name",
3515
3534
  "required": false,
3516
3535
  "hasDynamicHelp": false,
3517
3536
  "multiple": false,
3518
3537
  "type": "option"
3519
3538
  },
3520
- "environment": {
3521
- "char": "e",
3522
- "description": "Filter by environment name",
3523
- "name": "environment",
3539
+ "org": {
3540
+ "description": "Organization UUID or slug. Required when you belong to more than one organization; inferred otherwise.",
3541
+ "name": "org",
3524
3542
  "required": false,
3525
3543
  "hasDynamicHelp": false,
3526
3544
  "multiple": false,
@@ -3529,7 +3547,7 @@
3529
3547
  },
3530
3548
  "hasDynamicHelp": false,
3531
3549
  "hiddenAliases": [],
3532
- "id": "sdk-key:list",
3550
+ "id": "workspace:create",
3533
3551
  "pluginAlias": "@quonfig/cli",
3534
3552
  "pluginName": "@quonfig/cli",
3535
3553
  "pluginType": "core",
@@ -3539,22 +3557,23 @@
3539
3557
  "relativePath": [
3540
3558
  "dist",
3541
3559
  "commands",
3542
- "sdk-key",
3543
- "list.js"
3560
+ "workspace",
3561
+ "create.js"
3544
3562
  ]
3545
3563
  },
3546
- "sdk-key:revoke": {
3564
+ "workspace:switch": {
3547
3565
  "aliases": [],
3548
3566
  "args": {
3549
- "keyId": {
3550
- "description": "ID of the SDK key to revoke",
3551
- "name": "keyId",
3552
- "required": true
3567
+ "slug": {
3568
+ "description": "Workspace pin in `<org-slug>/<workspace-slug>` form. Omit for an interactive picker.",
3569
+ "name": "slug",
3570
+ "required": false
3553
3571
  }
3554
3572
  },
3555
- "description": "Revoke an SDK key by its ID",
3573
+ "description": "Switch the saved default profile to a different (org, workspace) pair",
3556
3574
  "examples": [
3557
- "<%= config.bin %> <%= command.id %> a1b2c3d4-e5f6-7890-abcd-ef1234567890"
3575
+ "<%= config.bin %> <%= command.id %>",
3576
+ "<%= config.bin %> <%= command.id %> acme/production"
3558
3577
  ],
3559
3578
  "flags": {
3560
3579
  "json": {
@@ -3585,32 +3604,11 @@
3585
3604
  "name": "verbose",
3586
3605
  "allowNo": false,
3587
3606
  "type": "boolean"
3588
- },
3589
- "workspace": {
3590
- "char": "w",
3591
- "description": "Workspace slug to use (overrides QUONFIG_WORKSPACE env var and saved default)",
3592
- "helpGroup": "GLOBAL",
3593
- "name": "workspace",
3594
- "required": false,
3595
- "hasDynamicHelp": false,
3596
- "multiple": false,
3597
- "type": "option"
3598
- },
3599
- "profile": {
3600
- "char": "p",
3601
- "description": "Deprecated: use --workspace instead",
3602
- "helpGroup": "GLOBAL",
3603
- "hidden": true,
3604
- "name": "profile",
3605
- "required": false,
3606
- "hasDynamicHelp": false,
3607
- "multiple": false,
3608
- "type": "option"
3609
3607
  }
3610
3608
  },
3611
3609
  "hasDynamicHelp": false,
3612
3610
  "hiddenAliases": [],
3613
- "id": "sdk-key:revoke",
3611
+ "id": "workspace:switch",
3614
3612
  "pluginAlias": "@quonfig/cli",
3615
3613
  "pluginName": "@quonfig/cli",
3616
3614
  "pluginType": "core",
@@ -3620,10 +3618,10 @@
3620
3618
  "relativePath": [
3621
3619
  "dist",
3622
3620
  "commands",
3623
- "sdk-key",
3624
- "revoke.js"
3621
+ "workspace",
3622
+ "switch.js"
3625
3623
  ]
3626
3624
  }
3627
3625
  },
3628
- "version": "0.0.49"
3626
+ "version": "0.0.51"
3629
3627
  }
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.49",
4
+ "version": "0.0.51",
5
5
  "bugs": {
6
6
  "url": "https://github.com/quonfig/cli/issues"
7
7
  },
@@ -21,7 +21,7 @@
21
21
  "@oclif/core": "^3.18.2",
22
22
  "@oclif/plugin-help": "^6",
23
23
  "@oclif/plugin-plugins": "^4",
24
- "@quonfig/node": "^0.0.24",
24
+ "@quonfig/node": "^0.0.28",
25
25
  "acorn": "^8.10.0",
26
26
  "acorn-walk": "^8.3.5",
27
27
  "chalk": "^5.4.1",