@sanity/cli 8.35.0 → 8.37.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (57) hide show
  1. package/dist/actions/build/buildApp.js +1 -4
  2. package/dist/actions/build/buildApp.js.map +1 -1
  3. package/dist/actions/build/buildStudio.js +1 -0
  4. package/dist/actions/build/buildStudio.js.map +1 -1
  5. package/dist/actions/deploy/deployApp.js +32 -12
  6. package/dist/actions/deploy/deployApp.js.map +1 -1
  7. package/dist/actions/deploy/deployChecks.js +2 -1
  8. package/dist/actions/deploy/deployChecks.js.map +1 -1
  9. package/dist/actions/deploy/deployDashboardConfig.js +124 -0
  10. package/dist/actions/deploy/deployDashboardConfig.js.map +1 -0
  11. package/dist/actions/deploy/deployRunner.js.map +1 -1
  12. package/dist/actions/deploy/deployStudio.js +26 -9
  13. package/dist/actions/deploy/deployStudio.js.map +1 -1
  14. package/dist/actions/deploy/resolveDeployTarget.js +2 -2
  15. package/dist/actions/deploy/resolveDeployTarget.js.map +1 -1
  16. package/dist/actions/dev/servers/getDevServerConfig.js +2 -5
  17. package/dist/actions/dev/servers/getDevServerConfig.js.map +1 -1
  18. package/dist/actions/graphql/extractGraphQLAPIs.js +6 -4
  19. package/dist/actions/graphql/extractGraphQLAPIs.js.map +1 -1
  20. package/dist/actions/graphql/extractGraphQLAPIs.worker.js +2 -1
  21. package/dist/actions/graphql/extractGraphQLAPIs.worker.js.map +1 -1
  22. package/dist/actions/preview/previewAction.js +2 -2
  23. package/dist/actions/preview/previewAction.js.map +1 -1
  24. package/dist/actions/targets/resolveCommandTarget.js +130 -0
  25. package/dist/actions/targets/resolveCommandTarget.js.map +1 -0
  26. package/dist/actions/undeploy/runUndeploy.js +33 -5
  27. package/dist/actions/undeploy/runUndeploy.js.map +1 -1
  28. package/dist/actions/undeploy/undeployPlan.js +2 -2
  29. package/dist/actions/undeploy/undeployPlan.js.map +1 -1
  30. package/dist/commands/build.js +8 -1
  31. package/dist/commands/build.js.map +1 -1
  32. package/dist/commands/deploy.js +15 -3
  33. package/dist/commands/deploy.js.map +1 -1
  34. package/dist/commands/documents/query.js +26 -11
  35. package/dist/commands/documents/query.js.map +1 -1
  36. package/dist/commands/media/prune-aspect-data.js +1 -1
  37. package/dist/commands/media/prune-aspect-data.js.map +1 -1
  38. package/dist/commands/media/pull-aspects.js +1 -1
  39. package/dist/commands/media/pull-aspects.js.map +1 -1
  40. package/dist/exports/index.d.ts +2 -2
  41. package/dist/exports/index.js +1 -1
  42. package/dist/exports/index.js.map +1 -1
  43. package/dist/exports/runtime.d.ts +2 -2
  44. package/dist/exports/runtime.js +1 -1
  45. package/dist/exports/runtime.js.map +1 -1
  46. package/dist/generated/apiRoutes.js +37 -0
  47. package/dist/generated/apiRoutes.js.map +1 -1
  48. package/dist/prompts/promptForProject.js +9 -3
  49. package/dist/prompts/promptForProject.js.map +1 -1
  50. package/dist/services/blueprints.js +18 -0
  51. package/dist/services/blueprints.js.map +1 -0
  52. package/dist/util/checkoutBlueprint.js +33 -0
  53. package/dist/util/checkoutBlueprint.js.map +1 -0
  54. package/dist/util/sharedFlags.js +10 -0
  55. package/dist/util/sharedFlags.js.map +1 -1
  56. package/oclif.manifest.json +1143 -1136
  57. package/package.json +16 -16
@@ -2505,6 +2505,179 @@
2505
2505
  "update.js"
2506
2506
  ]
2507
2507
  },
2508
+ "cors:add": {
2509
+ "aliases": [],
2510
+ "args": {
2511
+ "origin": {
2512
+ "description": "Origin to allow (e.g., https://example.com)",
2513
+ "name": "origin",
2514
+ "required": true
2515
+ }
2516
+ },
2517
+ "description": "Add a CORS origin to the project",
2518
+ "examples": [
2519
+ {
2520
+ "command": "<%= config.bin %> <%= command.id %>",
2521
+ "description": "Interactively add a CORS origin"
2522
+ },
2523
+ {
2524
+ "command": "<%= config.bin %> <%= command.id %> http://localhost:3000 --no-credentials",
2525
+ "description": "Add a localhost origin without credentials"
2526
+ },
2527
+ {
2528
+ "command": "<%= config.bin %> <%= command.id %> https://myapp.com --credentials",
2529
+ "description": "Add a production origin with credentials allowed"
2530
+ },
2531
+ {
2532
+ "command": "<%= config.bin %> <%= command.id %> https://myapp.com --project abc123",
2533
+ "description": "Add a CORS origin for a specific project"
2534
+ }
2535
+ ],
2536
+ "flags": {
2537
+ "project": {
2538
+ "aliases": [
2539
+ "project-id"
2540
+ ],
2541
+ "char": "p",
2542
+ "deprecateAliases": true,
2543
+ "description": "Project ID to add CORS origin to (overrides CLI configuration)",
2544
+ "helpGroup": "OVERRIDE",
2545
+ "name": "project",
2546
+ "hasDynamicHelp": false,
2547
+ "helpValue": "<id>",
2548
+ "multiple": false,
2549
+ "type": "option"
2550
+ },
2551
+ "credentials": {
2552
+ "description": "Allow credentials (token/cookie) to be sent from this origin",
2553
+ "name": "credentials",
2554
+ "required": false,
2555
+ "allowNo": true,
2556
+ "type": "boolean"
2557
+ },
2558
+ "yes": {
2559
+ "char": "y",
2560
+ "description": "Confirm risky wildcard origins without prompting",
2561
+ "name": "yes",
2562
+ "allowNo": false,
2563
+ "type": "boolean"
2564
+ }
2565
+ },
2566
+ "hasDynamicHelp": false,
2567
+ "hiddenAliases": [],
2568
+ "id": "cors:add",
2569
+ "pluginAlias": "@sanity/cli",
2570
+ "pluginName": "@sanity/cli",
2571
+ "pluginType": "core",
2572
+ "strict": true,
2573
+ "isESM": true,
2574
+ "relativePath": [
2575
+ "dist",
2576
+ "commands",
2577
+ "cors",
2578
+ "add.js"
2579
+ ]
2580
+ },
2581
+ "cors:delete": {
2582
+ "aliases": [],
2583
+ "args": {
2584
+ "origin": {
2585
+ "description": "Origin to delete (will prompt if not provided)",
2586
+ "name": "origin",
2587
+ "required": false
2588
+ }
2589
+ },
2590
+ "description": "Delete a CORS origin from the project",
2591
+ "examples": [
2592
+ {
2593
+ "command": "<%= config.bin %> <%= command.id %>",
2594
+ "description": "Interactively select and delete a CORS origin"
2595
+ },
2596
+ {
2597
+ "command": "<%= config.bin %> <%= command.id %> https://example.com",
2598
+ "description": "Delete a specific CORS origin"
2599
+ },
2600
+ {
2601
+ "command": "<%= config.bin %> <%= command.id %> --project abc123",
2602
+ "description": "Delete a CORS origin from a specific project"
2603
+ }
2604
+ ],
2605
+ "flags": {
2606
+ "project": {
2607
+ "aliases": [
2608
+ "project-id"
2609
+ ],
2610
+ "char": "p",
2611
+ "deprecateAliases": true,
2612
+ "description": "Project ID to delete CORS origin from (overrides CLI configuration)",
2613
+ "helpGroup": "OVERRIDE",
2614
+ "name": "project",
2615
+ "hasDynamicHelp": false,
2616
+ "helpValue": "<id>",
2617
+ "multiple": false,
2618
+ "type": "option"
2619
+ }
2620
+ },
2621
+ "hasDynamicHelp": false,
2622
+ "hiddenAliases": [],
2623
+ "id": "cors:delete",
2624
+ "pluginAlias": "@sanity/cli",
2625
+ "pluginName": "@sanity/cli",
2626
+ "pluginType": "core",
2627
+ "strict": true,
2628
+ "isESM": true,
2629
+ "relativePath": [
2630
+ "dist",
2631
+ "commands",
2632
+ "cors",
2633
+ "delete.js"
2634
+ ]
2635
+ },
2636
+ "cors:list": {
2637
+ "aliases": [],
2638
+ "args": {},
2639
+ "description": "List CORS origins for the project",
2640
+ "examples": [
2641
+ {
2642
+ "command": "<%= config.bin %> <%= command.id %>",
2643
+ "description": "List CORS origins for the project"
2644
+ },
2645
+ {
2646
+ "command": "<%= config.bin %> <%= command.id %> --project abc123",
2647
+ "description": "List CORS origins for a specific project"
2648
+ }
2649
+ ],
2650
+ "flags": {
2651
+ "project": {
2652
+ "aliases": [
2653
+ "project-id"
2654
+ ],
2655
+ "char": "p",
2656
+ "deprecateAliases": true,
2657
+ "description": "Project ID to list CORS origins for (overrides CLI configuration)",
2658
+ "helpGroup": "OVERRIDE",
2659
+ "name": "project",
2660
+ "hasDynamicHelp": false,
2661
+ "helpValue": "<id>",
2662
+ "multiple": false,
2663
+ "type": "option"
2664
+ }
2665
+ },
2666
+ "hasDynamicHelp": false,
2667
+ "hiddenAliases": [],
2668
+ "id": "cors:list",
2669
+ "pluginAlias": "@sanity/cli",
2670
+ "pluginName": "@sanity/cli",
2671
+ "pluginType": "core",
2672
+ "strict": true,
2673
+ "isESM": true,
2674
+ "relativePath": [
2675
+ "dist",
2676
+ "commands",
2677
+ "cors",
2678
+ "list.js"
2679
+ ]
2680
+ },
2508
2681
  "datasets:copy": {
2509
2682
  "aliases": [],
2510
2683
  "args": {
@@ -3161,67 +3334,69 @@
3161
3334
  "list.js"
3162
3335
  ]
3163
3336
  },
3164
- "cors:add": {
3337
+ "docs:browse": {
3338
+ "aliases": [],
3339
+ "args": {},
3340
+ "description": "Open Sanity docs in your browser",
3341
+ "flags": {},
3342
+ "hasDynamicHelp": false,
3343
+ "hiddenAliases": [],
3344
+ "id": "docs:browse",
3345
+ "pluginAlias": "@sanity/cli",
3346
+ "pluginName": "@sanity/cli",
3347
+ "pluginType": "core",
3348
+ "strict": true,
3349
+ "enableJsonFlag": false,
3350
+ "isESM": true,
3351
+ "relativePath": [
3352
+ "dist",
3353
+ "commands",
3354
+ "docs",
3355
+ "browse.js"
3356
+ ]
3357
+ },
3358
+ "docs:read": {
3165
3359
  "aliases": [],
3166
3360
  "args": {
3167
- "origin": {
3168
- "description": "Origin to allow (e.g., https://example.com)",
3169
- "name": "origin",
3361
+ "path": {
3362
+ "description": "Path or URL to article, found in search results and docs content as links",
3363
+ "name": "path",
3170
3364
  "required": true
3171
3365
  }
3172
3366
  },
3173
- "description": "Add a CORS origin to the project",
3367
+ "description": "Read an article in terminal",
3174
3368
  "examples": [
3175
3369
  {
3176
- "command": "<%= config.bin %> <%= command.id %>",
3177
- "description": "Interactively add a CORS origin"
3370
+ "command": "<%= config.bin %> <%= command.id %> /docs/studio/installation",
3371
+ "description": "Read as markdown in terminal"
3178
3372
  },
3179
3373
  {
3180
- "command": "<%= config.bin %> <%= command.id %> http://localhost:3000 --no-credentials",
3181
- "description": "Add a localhost origin without credentials"
3374
+ "command": "<%= config.bin %> <%= command.id %> https://www.sanity.io/docs/studio/installation",
3375
+ "description": "Read using full URL"
3182
3376
  },
3183
3377
  {
3184
- "command": "<%= config.bin %> <%= command.id %> https://myapp.com --credentials",
3185
- "description": "Add a production origin with credentials allowed"
3378
+ "command": "<%= config.bin %> <%= command.id %> /docs/studio/installation --web",
3379
+ "description": "Open in web browser"
3186
3380
  },
3187
3381
  {
3188
- "command": "<%= config.bin %> <%= command.id %> https://myapp.com --project abc123",
3189
- "description": "Add a CORS origin for a specific project"
3382
+ "command": "<%= config.bin %> <%= command.id %> https://www.sanity.io/docs/studio/installation -w",
3383
+ "description": "Open using full URL in web browser"
3190
3384
  }
3191
3385
  ],
3192
3386
  "flags": {
3193
- "project": {
3387
+ "web": {
3194
3388
  "aliases": [
3195
- "project-id"
3389
+ "w"
3196
3390
  ],
3197
- "char": "p",
3198
- "deprecateAliases": true,
3199
- "description": "Project ID to add CORS origin to (overrides CLI configuration)",
3200
- "helpGroup": "OVERRIDE",
3201
- "name": "project",
3202
- "hasDynamicHelp": false,
3203
- "helpValue": "<id>",
3204
- "multiple": false,
3205
- "type": "option"
3206
- },
3207
- "credentials": {
3208
- "description": "Allow credentials (token/cookie) to be sent from this origin",
3209
- "name": "credentials",
3210
- "required": false,
3211
- "allowNo": true,
3212
- "type": "boolean"
3213
- },
3214
- "yes": {
3215
- "char": "y",
3216
- "description": "Confirm risky wildcard origins without prompting",
3217
- "name": "yes",
3391
+ "description": "Open in a web browser",
3392
+ "name": "web",
3218
3393
  "allowNo": false,
3219
3394
  "type": "boolean"
3220
3395
  }
3221
3396
  },
3222
3397
  "hasDynamicHelp": false,
3223
3398
  "hiddenAliases": [],
3224
- "id": "cors:add",
3399
+ "id": "docs:read",
3225
3400
  "pluginAlias": "@sanity/cli",
3226
3401
  "pluginName": "@sanity/cli",
3227
3402
  "pluginType": "core",
@@ -3230,98 +3405,47 @@
3230
3405
  "relativePath": [
3231
3406
  "dist",
3232
3407
  "commands",
3233
- "cors",
3234
- "add.js"
3408
+ "docs",
3409
+ "read.js"
3235
3410
  ]
3236
3411
  },
3237
- "cors:delete": {
3412
+ "docs:search": {
3238
3413
  "aliases": [],
3239
3414
  "args": {
3240
- "origin": {
3241
- "description": "Origin to delete (will prompt if not provided)",
3242
- "name": "origin",
3243
- "required": false
3415
+ "query": {
3416
+ "description": "Search query for documentation",
3417
+ "name": "query",
3418
+ "required": true
3244
3419
  }
3245
3420
  },
3246
- "description": "Delete a CORS origin from the project",
3421
+ "description": "Search Sanity docs",
3247
3422
  "examples": [
3248
3423
  {
3249
- "command": "<%= config.bin %> <%= command.id %>",
3250
- "description": "Interactively select and delete a CORS origin"
3251
- },
3252
- {
3253
- "command": "<%= config.bin %> <%= command.id %> https://example.com",
3254
- "description": "Delete a specific CORS origin"
3424
+ "command": "<%= config.bin %> <%= command.id %> schema",
3425
+ "description": "Search for documentation about schemas"
3255
3426
  },
3256
3427
  {
3257
- "command": "<%= config.bin %> <%= command.id %> --project abc123",
3258
- "description": "Delete a CORS origin from a specific project"
3259
- }
3260
- ],
3261
- "flags": {
3262
- "project": {
3263
- "aliases": [
3264
- "project-id"
3265
- ],
3266
- "char": "p",
3267
- "deprecateAliases": true,
3268
- "description": "Project ID to delete CORS origin from (overrides CLI configuration)",
3269
- "helpGroup": "OVERRIDE",
3270
- "name": "project",
3271
- "hasDynamicHelp": false,
3272
- "helpValue": "<id>",
3273
- "multiple": false,
3274
- "type": "option"
3275
- }
3276
- },
3277
- "hasDynamicHelp": false,
3278
- "hiddenAliases": [],
3279
- "id": "cors:delete",
3280
- "pluginAlias": "@sanity/cli",
3281
- "pluginName": "@sanity/cli",
3282
- "pluginType": "core",
3283
- "strict": true,
3284
- "isESM": true,
3285
- "relativePath": [
3286
- "dist",
3287
- "commands",
3288
- "cors",
3289
- "delete.js"
3290
- ]
3291
- },
3292
- "cors:list": {
3293
- "aliases": [],
3294
- "args": {},
3295
- "description": "List CORS origins for the project",
3296
- "examples": [
3297
- {
3298
- "command": "<%= config.bin %> <%= command.id %>",
3299
- "description": "List CORS origins for the project"
3428
+ "command": "<%= config.bin %> <%= command.id %> \"groq functions\"",
3429
+ "description": "Search with phrase"
3300
3430
  },
3301
3431
  {
3302
- "command": "<%= config.bin %> <%= command.id %> --project abc123",
3303
- "description": "List CORS origins for a specific project"
3432
+ "command": "<%= config.bin %> <%= command.id %> \"deployment\" --limit=5",
3433
+ "description": "Limit search results"
3304
3434
  }
3305
3435
  ],
3306
3436
  "flags": {
3307
- "project": {
3308
- "aliases": [
3309
- "project-id"
3310
- ],
3311
- "char": "p",
3312
- "deprecateAliases": true,
3313
- "description": "Project ID to list CORS origins for (overrides CLI configuration)",
3314
- "helpGroup": "OVERRIDE",
3315
- "name": "project",
3437
+ "limit": {
3438
+ "description": "Maximum number of results to return",
3439
+ "name": "limit",
3440
+ "default": 10,
3316
3441
  "hasDynamicHelp": false,
3317
- "helpValue": "<id>",
3318
3442
  "multiple": false,
3319
3443
  "type": "option"
3320
3444
  }
3321
3445
  },
3322
3446
  "hasDynamicHelp": false,
3323
3447
  "hiddenAliases": [],
3324
- "id": "cors:list",
3448
+ "id": "docs:search",
3325
3449
  "pluginAlias": "@sanity/cli",
3326
3450
  "pluginName": "@sanity/cli",
3327
3451
  "pluginType": "core",
@@ -3330,8 +3454,8 @@
3330
3454
  "relativePath": [
3331
3455
  "dist",
3332
3456
  "commands",
3333
- "cors",
3334
- "list.js"
3457
+ "docs",
3458
+ "search.js"
3335
3459
  ]
3336
3460
  },
3337
3461
  "documents:create": {
@@ -3650,6 +3774,13 @@
3650
3774
  "multiple": false,
3651
3775
  "type": "option"
3652
3776
  },
3777
+ "with-blueprints": {
3778
+ "description": "Use Blueprint-aware behavior",
3779
+ "hidden": true,
3780
+ "name": "with-blueprints",
3781
+ "allowNo": false,
3782
+ "type": "boolean"
3783
+ },
3653
3784
  "anonymous": {
3654
3785
  "description": "Send the query without any authorization token",
3655
3786
  "name": "anonymous",
@@ -3826,130 +3957,6 @@
3826
3957
  "validate.js"
3827
3958
  ]
3828
3959
  },
3829
- "docs:browse": {
3830
- "aliases": [],
3831
- "args": {},
3832
- "description": "Open Sanity docs in your browser",
3833
- "flags": {},
3834
- "hasDynamicHelp": false,
3835
- "hiddenAliases": [],
3836
- "id": "docs:browse",
3837
- "pluginAlias": "@sanity/cli",
3838
- "pluginName": "@sanity/cli",
3839
- "pluginType": "core",
3840
- "strict": true,
3841
- "enableJsonFlag": false,
3842
- "isESM": true,
3843
- "relativePath": [
3844
- "dist",
3845
- "commands",
3846
- "docs",
3847
- "browse.js"
3848
- ]
3849
- },
3850
- "docs:read": {
3851
- "aliases": [],
3852
- "args": {
3853
- "path": {
3854
- "description": "Path or URL to article, found in search results and docs content as links",
3855
- "name": "path",
3856
- "required": true
3857
- }
3858
- },
3859
- "description": "Read an article in terminal",
3860
- "examples": [
3861
- {
3862
- "command": "<%= config.bin %> <%= command.id %> /docs/studio/installation",
3863
- "description": "Read as markdown in terminal"
3864
- },
3865
- {
3866
- "command": "<%= config.bin %> <%= command.id %> https://www.sanity.io/docs/studio/installation",
3867
- "description": "Read using full URL"
3868
- },
3869
- {
3870
- "command": "<%= config.bin %> <%= command.id %> /docs/studio/installation --web",
3871
- "description": "Open in web browser"
3872
- },
3873
- {
3874
- "command": "<%= config.bin %> <%= command.id %> https://www.sanity.io/docs/studio/installation -w",
3875
- "description": "Open using full URL in web browser"
3876
- }
3877
- ],
3878
- "flags": {
3879
- "web": {
3880
- "aliases": [
3881
- "w"
3882
- ],
3883
- "description": "Open in a web browser",
3884
- "name": "web",
3885
- "allowNo": false,
3886
- "type": "boolean"
3887
- }
3888
- },
3889
- "hasDynamicHelp": false,
3890
- "hiddenAliases": [],
3891
- "id": "docs:read",
3892
- "pluginAlias": "@sanity/cli",
3893
- "pluginName": "@sanity/cli",
3894
- "pluginType": "core",
3895
- "strict": true,
3896
- "isESM": true,
3897
- "relativePath": [
3898
- "dist",
3899
- "commands",
3900
- "docs",
3901
- "read.js"
3902
- ]
3903
- },
3904
- "docs:search": {
3905
- "aliases": [],
3906
- "args": {
3907
- "query": {
3908
- "description": "Search query for documentation",
3909
- "name": "query",
3910
- "required": true
3911
- }
3912
- },
3913
- "description": "Search Sanity docs",
3914
- "examples": [
3915
- {
3916
- "command": "<%= config.bin %> <%= command.id %> schema",
3917
- "description": "Search for documentation about schemas"
3918
- },
3919
- {
3920
- "command": "<%= config.bin %> <%= command.id %> \"groq functions\"",
3921
- "description": "Search with phrase"
3922
- },
3923
- {
3924
- "command": "<%= config.bin %> <%= command.id %> \"deployment\" --limit=5",
3925
- "description": "Limit search results"
3926
- }
3927
- ],
3928
- "flags": {
3929
- "limit": {
3930
- "description": "Maximum number of results to return",
3931
- "name": "limit",
3932
- "default": 10,
3933
- "hasDynamicHelp": false,
3934
- "multiple": false,
3935
- "type": "option"
3936
- }
3937
- },
3938
- "hasDynamicHelp": false,
3939
- "hiddenAliases": [],
3940
- "id": "docs:search",
3941
- "pluginAlias": "@sanity/cli",
3942
- "pluginName": "@sanity/cli",
3943
- "pluginType": "core",
3944
- "strict": true,
3945
- "isESM": true,
3946
- "relativePath": [
3947
- "dist",
3948
- "commands",
3949
- "docs",
3950
- "search.js"
3951
- ]
3952
- },
3953
3960
  "graphql:deploy": {
3954
3961
  "aliases": [],
3955
3962
  "args": {},
@@ -4539,212 +4546,32 @@
4539
4546
  "configure.js"
4540
4547
  ]
4541
4548
  },
4542
- "migrations:create": {
4549
+ "media:create-aspect": {
4543
4550
  "aliases": [],
4544
- "args": {
4545
- "title": {
4546
- "description": "Title of migration",
4547
- "name": "title",
4548
- "required": false
4549
- }
4550
- },
4551
- "description": "Create a new migration within your project",
4551
+ "args": {},
4552
+ "description": "Create a new aspect definition file",
4552
4553
  "examples": [
4553
4554
  {
4554
4555
  "command": "<%= config.bin %> <%= command.id %>",
4555
- "description": "Create a new migration, prompting for title and options"
4556
- },
4557
- {
4558
- "command": "<%= config.bin %> <%= command.id %> \"Rename field from location to address\"",
4559
- "description": "Create a new migration with the provided title, prompting for options"
4556
+ "description": "Create a new aspect definition file"
4560
4557
  }
4561
4558
  ],
4562
- "flags": {},
4563
- "hasDynamicHelp": false,
4564
- "hiddenAliases": [
4565
- "migration:create"
4566
- ],
4567
- "id": "migrations:create",
4568
- "pluginAlias": "@sanity/cli",
4569
- "pluginName": "@sanity/cli",
4570
- "pluginType": "core",
4571
- "strict": true,
4572
- "isESM": true,
4573
- "relativePath": [
4574
- "dist",
4575
- "commands",
4576
- "migrations",
4577
- "create.js"
4578
- ]
4579
- },
4580
- "migrations:list": {
4581
- "aliases": [],
4582
- "args": {},
4583
- "description": "List available migrations",
4584
- "examples": [
4585
- {
4586
- "command": "<%= config.bin %> <%= command.id %>",
4587
- "description": "List all available migrations in the project"
4588
- }
4589
- ],
4590
- "flags": {},
4591
- "hasDynamicHelp": false,
4592
- "hiddenAliases": [
4593
- "migration:list"
4594
- ],
4595
- "id": "migrations:list",
4596
- "pluginAlias": "@sanity/cli",
4597
- "pluginName": "@sanity/cli",
4598
- "pluginType": "core",
4599
- "strict": true,
4600
- "isESM": true,
4601
- "relativePath": [
4602
- "dist",
4603
- "commands",
4604
- "migrations",
4605
- "list.js"
4606
- ]
4607
- },
4608
- "migrations:run": {
4609
- "aliases": [],
4610
- "args": {
4611
- "id": {
4612
- "description": "ID",
4613
- "name": "id",
4614
- "required": false
4615
- }
4616
- },
4617
- "description": "Run a migration against a dataset",
4618
- "examples": [
4619
- {
4620
- "command": "<%= config.bin %> <%= command.id %> <id>",
4621
- "description": "dry run the migration"
4622
- },
4623
- {
4624
- "command": "<%= config.bin %> <%= command.id %> <id> --no-dry-run --project xyz --dataset staging",
4625
- "description": "execute the migration against a dataset"
4626
- },
4627
- {
4628
- "command": "<%= config.bin %> <%= command.id %> <id> --from-export=production.tar.gz --no-dry-run --project xyz --dataset staging",
4629
- "description": "execute the migration using a dataset export as the source"
4630
- }
4631
- ],
4632
- "flags": {
4633
- "api-version": {
4634
- "description": "API version to use when migrating. Defaults to v2024-01-29.",
4635
- "name": "api-version",
4636
- "hasDynamicHelp": false,
4637
- "multiple": false,
4638
- "type": "option"
4639
- },
4640
- "concurrency": {
4641
- "description": "How many mutation requests to run in parallel. Must be between 1 and 10. Default: 6.",
4642
- "name": "concurrency",
4643
- "default": 6,
4644
- "hasDynamicHelp": false,
4645
- "multiple": false,
4646
- "type": "option"
4647
- },
4648
- "confirm": {
4649
- "description": "Prompt for confirmation before running the migration (default: true). Use --no-confirm to skip.",
4650
- "name": "confirm",
4651
- "allowNo": true,
4652
- "type": "boolean"
4653
- },
4654
- "dataset": {
4655
- "description": "Dataset to migrate. Defaults to the dataset configured in your Sanity CLI config.",
4656
- "name": "dataset",
4657
- "hasDynamicHelp": false,
4658
- "multiple": false,
4659
- "type": "option"
4660
- },
4661
- "dry-run": {
4662
- "description": "By default the migration runs in dry mode. Use --no-dry-run to migrate dataset.",
4663
- "name": "dry-run",
4664
- "allowNo": true,
4665
- "type": "boolean"
4666
- },
4667
- "from-export": {
4668
- "description": "Use a local dataset export as source for migration instead of calling the Sanity API. Note: this is only supported for dry runs.",
4669
- "name": "from-export",
4670
- "hasDynamicHelp": false,
4671
- "multiple": false,
4672
- "type": "option"
4673
- },
4674
- "progress": {
4675
- "description": "Display progress during migration (default: true). Use --no-progress to hide output.",
4676
- "name": "progress",
4677
- "allowNo": true,
4678
- "type": "boolean"
4679
- },
4680
- "project": {
4681
- "aliases": [
4682
- "project-id"
4683
- ],
4684
- "char": "p",
4685
- "deprecateAliases": true,
4686
- "description": "Project ID of the dataset to migrate (overrides CLI configuration)",
4687
- "helpGroup": "OVERRIDE",
4688
- "name": "project",
4689
- "hasDynamicHelp": false,
4690
- "helpValue": "<id>",
4691
- "multiple": false,
4692
- "type": "option"
4693
- }
4694
- },
4695
- "hasDynamicHelp": false,
4696
- "hiddenAliases": [
4697
- "migration:run"
4698
- ],
4699
- "id": "migrations:run",
4700
- "pluginAlias": "@sanity/cli",
4701
- "pluginName": "@sanity/cli",
4702
- "pluginType": "core",
4703
- "strict": true,
4704
- "telemetry": {
4705
- "redactedFlags": [
4706
- {
4707
- "canonical": "--from-export",
4708
- "flags": [
4709
- "--from-export"
4710
- ]
4711
- }
4712
- ]
4713
- },
4714
- "isESM": true,
4715
- "relativePath": [
4716
- "dist",
4717
- "commands",
4718
- "migrations",
4719
- "run.js"
4720
- ]
4721
- },
4722
- "media:create-aspect": {
4723
- "aliases": [],
4724
- "args": {},
4725
- "description": "Create a new aspect definition file",
4726
- "examples": [
4727
- {
4728
- "command": "<%= config.bin %> <%= command.id %>",
4729
- "description": "Create a new aspect definition file"
4730
- }
4731
- ],
4732
- "flags": {
4733
- "name": {
4734
- "description": "Aspect name. Defaults to the title in camel case",
4735
- "name": "name",
4736
- "hasDynamicHelp": false,
4737
- "multiple": false,
4738
- "type": "option"
4739
- },
4740
- "title": {
4741
- "description": "Aspect title",
4742
- "name": "title",
4743
- "hasDynamicHelp": false,
4744
- "multiple": false,
4745
- "type": "option"
4746
- }
4747
- },
4559
+ "flags": {
4560
+ "name": {
4561
+ "description": "Aspect name. Defaults to the title in camel case",
4562
+ "name": "name",
4563
+ "hasDynamicHelp": false,
4564
+ "multiple": false,
4565
+ "type": "option"
4566
+ },
4567
+ "title": {
4568
+ "description": "Aspect title",
4569
+ "name": "title",
4570
+ "hasDynamicHelp": false,
4571
+ "multiple": false,
4572
+ "type": "option"
4573
+ }
4574
+ },
4748
4575
  "hasDynamicHelp": false,
4749
4576
  "hiddenAliases": [],
4750
4577
  "id": "media:create-aspect",
@@ -5212,199 +5039,60 @@
5212
5039
  "pull-aspects.js"
5213
5040
  ]
5214
5041
  },
5215
- "organizations:create": {
5042
+ "migrations:create": {
5216
5043
  "aliases": [],
5217
- "args": {},
5218
- "description": "Create a new organization",
5044
+ "args": {
5045
+ "title": {
5046
+ "description": "Title of migration",
5047
+ "name": "title",
5048
+ "required": false
5049
+ }
5050
+ },
5051
+ "description": "Create a new migration within your project",
5219
5052
  "examples": [
5220
5053
  {
5221
5054
  "command": "<%= config.bin %> <%= command.id %>",
5222
- "description": "Interactively create an organization"
5223
- },
5224
- {
5225
- "command": "<%= config.bin %> <%= command.id %> --name \"Acme Corp\"",
5226
- "description": "Create an organization named \"Acme Corp\""
5227
- },
5228
- {
5229
- "command": "<%= config.bin %> <%= command.id %> --name \"Acme Corp\" --default-role member",
5230
- "description": "Create an organization with a default member role"
5055
+ "description": "Create a new migration, prompting for title and options"
5231
5056
  },
5232
5057
  {
5233
- "command": "<%= config.bin %> <%= command.id %> --name \"Acme Corp\" --logo ./logo.png",
5234
- "description": "Create an organization with a logo"
5058
+ "command": "<%= config.bin %> <%= command.id %> \"Rename field from location to address\"",
5059
+ "description": "Create a new migration with the provided title, prompting for options"
5235
5060
  }
5236
5061
  ],
5237
- "flags": {
5238
- "default-role": {
5239
- "description": "Default role assigned to new members",
5240
- "name": "default-role",
5241
- "required": false,
5242
- "hasDynamicHelp": false,
5243
- "multiple": false,
5244
- "type": "option"
5245
- },
5246
- "logo": {
5247
- "description": "Image file to use as the logo: PNG, JPEG, GIF, WebP, SVG, BMP, TIFF, HEIF or AVIF, at most 5 MB",
5248
- "name": "logo",
5249
- "required": false,
5250
- "hasDynamicHelp": false,
5251
- "helpValue": "<path>",
5252
- "multiple": false,
5253
- "type": "option"
5254
- },
5255
- "name": {
5256
- "description": "Organization name",
5257
- "name": "name",
5258
- "hasDynamicHelp": false,
5259
- "multiple": false,
5260
- "type": "option"
5261
- }
5262
- },
5062
+ "flags": {},
5263
5063
  "hasDynamicHelp": false,
5264
5064
  "hiddenAliases": [
5265
- "organization:create",
5266
- "organisations:create",
5267
- "organisation:create",
5268
- "org:create",
5269
- "orgs:create"
5065
+ "migration:create"
5270
5066
  ],
5271
- "id": "organizations:create",
5067
+ "id": "migrations:create",
5272
5068
  "pluginAlias": "@sanity/cli",
5273
5069
  "pluginName": "@sanity/cli",
5274
5070
  "pluginType": "core",
5275
5071
  "strict": true,
5276
- "telemetry": {
5277
- "redactedFlags": [
5278
- {
5279
- "canonical": "--logo",
5280
- "flags": [
5281
- "--logo"
5282
- ]
5283
- },
5284
- {
5285
- "canonical": "--name",
5286
- "flags": [
5287
- "--name"
5288
- ]
5289
- }
5290
- ]
5291
- },
5292
5072
  "isESM": true,
5293
5073
  "relativePath": [
5294
5074
  "dist",
5295
5075
  "commands",
5296
- "organizations",
5076
+ "migrations",
5297
5077
  "create.js"
5298
5078
  ]
5299
5079
  },
5300
- "organizations:delete": {
5301
- "aliases": [],
5302
- "args": {
5303
- "organizationId": {
5304
- "description": "Organization ID to delete",
5305
- "name": "organizationId",
5306
- "required": true
5307
- }
5308
- },
5309
- "description": "Delete an organization",
5310
- "examples": [
5311
- {
5312
- "command": "<%= config.bin %> <%= command.id %> org-abc123",
5313
- "description": "Delete an organization (prompts for confirmation)"
5314
- },
5315
- {
5316
- "command": "<%= config.bin %> <%= command.id %> org-abc123 --force",
5317
- "description": "Delete an organization without confirmation"
5318
- }
5319
- ],
5320
- "flags": {
5321
- "force": {
5322
- "description": "Do not prompt for delete confirmation - forcefully delete",
5323
- "name": "force",
5324
- "required": false,
5325
- "allowNo": false,
5326
- "type": "boolean"
5327
- }
5328
- },
5329
- "hasDynamicHelp": false,
5330
- "hiddenAliases": [
5331
- "organization:delete",
5332
- "organisations:delete",
5333
- "organisation:delete",
5334
- "org:delete",
5335
- "orgs:delete"
5336
- ],
5337
- "id": "organizations:delete",
5338
- "pluginAlias": "@sanity/cli",
5339
- "pluginName": "@sanity/cli",
5340
- "pluginType": "core",
5341
- "strict": true,
5342
- "isESM": true,
5343
- "relativePath": [
5344
- "dist",
5345
- "commands",
5346
- "organizations",
5347
- "delete.js"
5348
- ]
5349
- },
5350
- "organizations:get": {
5351
- "aliases": [],
5352
- "args": {
5353
- "organizationId": {
5354
- "description": "Organization ID",
5355
- "name": "organizationId",
5356
- "required": true
5357
- }
5358
- },
5359
- "description": "Get details of an organization",
5360
- "examples": [
5361
- {
5362
- "command": "<%= config.bin %> <%= command.id %> org-abc123",
5363
- "description": "Get details of a specific organization"
5364
- }
5365
- ],
5366
- "flags": {},
5367
- "hasDynamicHelp": false,
5368
- "hiddenAliases": [
5369
- "organization:get",
5370
- "organisations:get",
5371
- "organisation:get",
5372
- "org:get",
5373
- "orgs:get"
5374
- ],
5375
- "id": "organizations:get",
5376
- "pluginAlias": "@sanity/cli",
5377
- "pluginName": "@sanity/cli",
5378
- "pluginType": "core",
5379
- "strict": true,
5380
- "isESM": true,
5381
- "relativePath": [
5382
- "dist",
5383
- "commands",
5384
- "organizations",
5385
- "get.js"
5386
- ]
5387
- },
5388
- "organizations:list": {
5080
+ "migrations:list": {
5389
5081
  "aliases": [],
5390
5082
  "args": {},
5391
- "description": "List organizations you are a member of",
5083
+ "description": "List available migrations",
5392
5084
  "examples": [
5393
5085
  {
5394
5086
  "command": "<%= config.bin %> <%= command.id %>",
5395
- "description": "List all your organizations"
5087
+ "description": "List all available migrations in the project"
5396
5088
  }
5397
5089
  ],
5398
5090
  "flags": {},
5399
5091
  "hasDynamicHelp": false,
5400
5092
  "hiddenAliases": [
5401
- "organization:list",
5402
- "organisations:list",
5403
- "organisation:list",
5404
- "org:list",
5405
- "orgs:list"
5093
+ "migration:list"
5406
5094
  ],
5407
- "id": "organizations:list",
5095
+ "id": "migrations:list",
5408
5096
  "pluginAlias": "@sanity/cli",
5409
5097
  "pluginName": "@sanity/cli",
5410
5098
  "pluginType": "core",
@@ -5413,86 +5101,102 @@
5413
5101
  "relativePath": [
5414
5102
  "dist",
5415
5103
  "commands",
5416
- "organizations",
5104
+ "migrations",
5417
5105
  "list.js"
5418
5106
  ]
5419
5107
  },
5420
- "organizations:update": {
5108
+ "migrations:run": {
5421
5109
  "aliases": [],
5422
5110
  "args": {
5423
- "organizationId": {
5424
- "description": "Organization ID",
5425
- "name": "organizationId",
5426
- "required": true
5111
+ "id": {
5112
+ "description": "ID",
5113
+ "name": "id",
5114
+ "required": false
5427
5115
  }
5428
5116
  },
5429
- "description": "Update an organization",
5117
+ "description": "Run a migration against a dataset",
5430
5118
  "examples": [
5431
5119
  {
5432
- "command": "<%= config.bin %> <%= command.id %> org-abc123 --name \"New Name\"",
5433
- "description": "Rename an organization"
5434
- },
5435
- {
5436
- "command": "<%= config.bin %> <%= command.id %> org-abc123 --slug new-slug",
5437
- "description": "Set the organization slug (requires authSAML feature)"
5438
- },
5439
- {
5440
- "command": "<%= config.bin %> <%= command.id %> org-abc123 --default-role viewer",
5441
- "description": "Change the default member role"
5120
+ "command": "<%= config.bin %> <%= command.id %> <id>",
5121
+ "description": "dry run the migration"
5442
5122
  },
5443
5123
  {
5444
- "command": "<%= config.bin %> <%= command.id %> org-abc123 --logo ./logo.png",
5445
- "description": "Set or replace the organization logo"
5124
+ "command": "<%= config.bin %> <%= command.id %> <id> --no-dry-run --project xyz --dataset staging",
5125
+ "description": "execute the migration against a dataset"
5446
5126
  },
5447
5127
  {
5448
- "command": "<%= config.bin %> <%= command.id %> org-abc123 --logo \"\"",
5449
- "description": "Remove the organization logo"
5128
+ "command": "<%= config.bin %> <%= command.id %> <id> --from-export=production.tar.gz --no-dry-run --project xyz --dataset staging",
5129
+ "description": "execute the migration using a dataset export as the source"
5450
5130
  }
5451
5131
  ],
5452
5132
  "flags": {
5453
- "default-role": {
5454
- "description": "New default role for new members",
5455
- "name": "default-role",
5456
- "required": false,
5133
+ "api-version": {
5134
+ "description": "API version to use when migrating. Defaults to v2024-01-29.",
5135
+ "name": "api-version",
5457
5136
  "hasDynamicHelp": false,
5458
5137
  "multiple": false,
5459
5138
  "type": "option"
5460
5139
  },
5461
- "logo": {
5462
- "description": "Image file to use as the logo: PNG, JPEG, GIF, WebP, SVG, BMP, TIFF, HEIF or AVIF, at most 5 MB (\"\" removes it)",
5463
- "name": "logo",
5464
- "required": false,
5140
+ "concurrency": {
5141
+ "description": "How many mutation requests to run in parallel. Must be between 1 and 10. Default: 6.",
5142
+ "name": "concurrency",
5143
+ "default": 6,
5465
5144
  "hasDynamicHelp": false,
5466
- "helpValue": "<path>",
5467
5145
  "multiple": false,
5468
5146
  "type": "option"
5469
5147
  },
5470
- "name": {
5471
- "description": "New organization name",
5472
- "name": "name",
5473
- "required": false,
5148
+ "confirm": {
5149
+ "description": "Prompt for confirmation before running the migration (default: true). Use --no-confirm to skip.",
5150
+ "name": "confirm",
5151
+ "allowNo": true,
5152
+ "type": "boolean"
5153
+ },
5154
+ "dataset": {
5155
+ "description": "Dataset to migrate. Defaults to the dataset configured in your Sanity CLI config.",
5156
+ "name": "dataset",
5474
5157
  "hasDynamicHelp": false,
5475
5158
  "multiple": false,
5476
5159
  "type": "option"
5477
5160
  },
5478
- "slug": {
5479
- "description": "New URL slug (requires authSAML feature on the organization)",
5480
- "name": "slug",
5481
- "required": false,
5161
+ "dry-run": {
5162
+ "description": "By default the migration runs in dry mode. Use --no-dry-run to migrate dataset.",
5163
+ "name": "dry-run",
5164
+ "allowNo": true,
5165
+ "type": "boolean"
5166
+ },
5167
+ "from-export": {
5168
+ "description": "Use a local dataset export as source for migration instead of calling the Sanity API. Note: this is only supported for dry runs.",
5169
+ "name": "from-export",
5170
+ "hasDynamicHelp": false,
5171
+ "multiple": false,
5172
+ "type": "option"
5173
+ },
5174
+ "progress": {
5175
+ "description": "Display progress during migration (default: true). Use --no-progress to hide output.",
5176
+ "name": "progress",
5177
+ "allowNo": true,
5178
+ "type": "boolean"
5179
+ },
5180
+ "project": {
5181
+ "aliases": [
5182
+ "project-id"
5183
+ ],
5184
+ "char": "p",
5185
+ "deprecateAliases": true,
5186
+ "description": "Project ID of the dataset to migrate (overrides CLI configuration)",
5187
+ "helpGroup": "OVERRIDE",
5188
+ "name": "project",
5482
5189
  "hasDynamicHelp": false,
5190
+ "helpValue": "<id>",
5483
5191
  "multiple": false,
5484
5192
  "type": "option"
5485
5193
  }
5486
5194
  },
5487
5195
  "hasDynamicHelp": false,
5488
5196
  "hiddenAliases": [
5489
- "organization:update",
5490
- "organisations:update",
5491
- "organisation:update",
5492
- "org:update",
5493
- "orgs:update"
5197
+ "migration:run"
5494
5198
  ],
5495
- "id": "organizations:update",
5199
+ "id": "migrations:run",
5496
5200
  "pluginAlias": "@sanity/cli",
5497
5201
  "pluginName": "@sanity/cli",
5498
5202
  "pluginType": "core",
@@ -5500,15 +5204,9 @@
5500
5204
  "telemetry": {
5501
5205
  "redactedFlags": [
5502
5206
  {
5503
- "canonical": "--logo",
5504
- "flags": [
5505
- "--logo"
5506
- ]
5507
- },
5508
- {
5509
- "canonical": "--name",
5207
+ "canonical": "--from-export",
5510
5208
  "flags": [
5511
- "--name"
5209
+ "--from-export"
5512
5210
  ]
5513
5211
  }
5514
5212
  ]
@@ -5517,8 +5215,8 @@
5517
5215
  "relativePath": [
5518
5216
  "dist",
5519
5217
  "commands",
5520
- "organizations",
5521
- "update.js"
5218
+ "migrations",
5219
+ "run.js"
5522
5220
  ]
5523
5221
  },
5524
5222
  "openapi:get": {
@@ -5635,41 +5333,350 @@
5635
5333
  "list.js"
5636
5334
  ]
5637
5335
  },
5638
- "projects:create": {
5336
+ "organizations:create": {
5639
5337
  "aliases": [],
5640
- "args": {
5641
- "projectName": {
5642
- "description": "Name of the project to create",
5643
- "name": "projectName",
5644
- "required": false
5645
- }
5646
- },
5647
- "description": "Create a new Sanity project",
5338
+ "args": {},
5339
+ "description": "Create a new organization",
5648
5340
  "examples": [
5649
5341
  {
5650
5342
  "command": "<%= config.bin %> <%= command.id %>",
5651
- "description": "Interactively create a project"
5652
- },
5653
- {
5654
- "command": "<%= config.bin %> <%= command.id %> \"My New Project\"",
5655
- "description": "Create a project named \"My New Project\""
5656
- },
5657
- {
5658
- "command": "<%= config.bin %> <%= command.id %> \"My Project\" --organization=my-org",
5659
- "description": "Create a project in a specific organization"
5343
+ "description": "Interactively create an organization"
5660
5344
  },
5661
5345
  {
5662
- "command": "<%= config.bin %> <%= command.id %> \"My Project\" --dataset=staging --dataset-visibility=private",
5663
- "description": "Create a project with a private dataset named \"staging\""
5346
+ "command": "<%= config.bin %> <%= command.id %> --name \"Acme Corp\"",
5347
+ "description": "Create an organization named \"Acme Corp\""
5664
5348
  },
5665
5349
  {
5666
- "command": "<%= config.bin %> <%= command.id %> \"My Project\" --logo ./logo.png",
5667
- "description": "Create a project with a logo"
5350
+ "command": "<%= config.bin %> <%= command.id %> --name \"Acme Corp\" --default-role member",
5351
+ "description": "Create an organization with a default member role"
5668
5352
  },
5669
5353
  {
5670
- "command": "<%= config.bin %> <%= command.id %> \"CI Project\" --yes --json",
5671
- "description": "Create a project non-interactively with JSON output"
5672
- }
5354
+ "command": "<%= config.bin %> <%= command.id %> --name \"Acme Corp\" --logo ./logo.png",
5355
+ "description": "Create an organization with a logo"
5356
+ }
5357
+ ],
5358
+ "flags": {
5359
+ "default-role": {
5360
+ "description": "Default role assigned to new members",
5361
+ "name": "default-role",
5362
+ "required": false,
5363
+ "hasDynamicHelp": false,
5364
+ "multiple": false,
5365
+ "type": "option"
5366
+ },
5367
+ "logo": {
5368
+ "description": "Image file to use as the logo: PNG, JPEG, GIF, WebP, SVG, BMP, TIFF, HEIF or AVIF, at most 5 MB",
5369
+ "name": "logo",
5370
+ "required": false,
5371
+ "hasDynamicHelp": false,
5372
+ "helpValue": "<path>",
5373
+ "multiple": false,
5374
+ "type": "option"
5375
+ },
5376
+ "name": {
5377
+ "description": "Organization name",
5378
+ "name": "name",
5379
+ "hasDynamicHelp": false,
5380
+ "multiple": false,
5381
+ "type": "option"
5382
+ }
5383
+ },
5384
+ "hasDynamicHelp": false,
5385
+ "hiddenAliases": [
5386
+ "organization:create",
5387
+ "organisations:create",
5388
+ "organisation:create",
5389
+ "org:create",
5390
+ "orgs:create"
5391
+ ],
5392
+ "id": "organizations:create",
5393
+ "pluginAlias": "@sanity/cli",
5394
+ "pluginName": "@sanity/cli",
5395
+ "pluginType": "core",
5396
+ "strict": true,
5397
+ "telemetry": {
5398
+ "redactedFlags": [
5399
+ {
5400
+ "canonical": "--logo",
5401
+ "flags": [
5402
+ "--logo"
5403
+ ]
5404
+ },
5405
+ {
5406
+ "canonical": "--name",
5407
+ "flags": [
5408
+ "--name"
5409
+ ]
5410
+ }
5411
+ ]
5412
+ },
5413
+ "isESM": true,
5414
+ "relativePath": [
5415
+ "dist",
5416
+ "commands",
5417
+ "organizations",
5418
+ "create.js"
5419
+ ]
5420
+ },
5421
+ "organizations:delete": {
5422
+ "aliases": [],
5423
+ "args": {
5424
+ "organizationId": {
5425
+ "description": "Organization ID to delete",
5426
+ "name": "organizationId",
5427
+ "required": true
5428
+ }
5429
+ },
5430
+ "description": "Delete an organization",
5431
+ "examples": [
5432
+ {
5433
+ "command": "<%= config.bin %> <%= command.id %> org-abc123",
5434
+ "description": "Delete an organization (prompts for confirmation)"
5435
+ },
5436
+ {
5437
+ "command": "<%= config.bin %> <%= command.id %> org-abc123 --force",
5438
+ "description": "Delete an organization without confirmation"
5439
+ }
5440
+ ],
5441
+ "flags": {
5442
+ "force": {
5443
+ "description": "Do not prompt for delete confirmation - forcefully delete",
5444
+ "name": "force",
5445
+ "required": false,
5446
+ "allowNo": false,
5447
+ "type": "boolean"
5448
+ }
5449
+ },
5450
+ "hasDynamicHelp": false,
5451
+ "hiddenAliases": [
5452
+ "organization:delete",
5453
+ "organisations:delete",
5454
+ "organisation:delete",
5455
+ "org:delete",
5456
+ "orgs:delete"
5457
+ ],
5458
+ "id": "organizations:delete",
5459
+ "pluginAlias": "@sanity/cli",
5460
+ "pluginName": "@sanity/cli",
5461
+ "pluginType": "core",
5462
+ "strict": true,
5463
+ "isESM": true,
5464
+ "relativePath": [
5465
+ "dist",
5466
+ "commands",
5467
+ "organizations",
5468
+ "delete.js"
5469
+ ]
5470
+ },
5471
+ "organizations:get": {
5472
+ "aliases": [],
5473
+ "args": {
5474
+ "organizationId": {
5475
+ "description": "Organization ID",
5476
+ "name": "organizationId",
5477
+ "required": true
5478
+ }
5479
+ },
5480
+ "description": "Get details of an organization",
5481
+ "examples": [
5482
+ {
5483
+ "command": "<%= config.bin %> <%= command.id %> org-abc123",
5484
+ "description": "Get details of a specific organization"
5485
+ }
5486
+ ],
5487
+ "flags": {},
5488
+ "hasDynamicHelp": false,
5489
+ "hiddenAliases": [
5490
+ "organization:get",
5491
+ "organisations:get",
5492
+ "organisation:get",
5493
+ "org:get",
5494
+ "orgs:get"
5495
+ ],
5496
+ "id": "organizations:get",
5497
+ "pluginAlias": "@sanity/cli",
5498
+ "pluginName": "@sanity/cli",
5499
+ "pluginType": "core",
5500
+ "strict": true,
5501
+ "isESM": true,
5502
+ "relativePath": [
5503
+ "dist",
5504
+ "commands",
5505
+ "organizations",
5506
+ "get.js"
5507
+ ]
5508
+ },
5509
+ "organizations:list": {
5510
+ "aliases": [],
5511
+ "args": {},
5512
+ "description": "List organizations you are a member of",
5513
+ "examples": [
5514
+ {
5515
+ "command": "<%= config.bin %> <%= command.id %>",
5516
+ "description": "List all your organizations"
5517
+ }
5518
+ ],
5519
+ "flags": {},
5520
+ "hasDynamicHelp": false,
5521
+ "hiddenAliases": [
5522
+ "organization:list",
5523
+ "organisations:list",
5524
+ "organisation:list",
5525
+ "org:list",
5526
+ "orgs:list"
5527
+ ],
5528
+ "id": "organizations:list",
5529
+ "pluginAlias": "@sanity/cli",
5530
+ "pluginName": "@sanity/cli",
5531
+ "pluginType": "core",
5532
+ "strict": true,
5533
+ "isESM": true,
5534
+ "relativePath": [
5535
+ "dist",
5536
+ "commands",
5537
+ "organizations",
5538
+ "list.js"
5539
+ ]
5540
+ },
5541
+ "organizations:update": {
5542
+ "aliases": [],
5543
+ "args": {
5544
+ "organizationId": {
5545
+ "description": "Organization ID",
5546
+ "name": "organizationId",
5547
+ "required": true
5548
+ }
5549
+ },
5550
+ "description": "Update an organization",
5551
+ "examples": [
5552
+ {
5553
+ "command": "<%= config.bin %> <%= command.id %> org-abc123 --name \"New Name\"",
5554
+ "description": "Rename an organization"
5555
+ },
5556
+ {
5557
+ "command": "<%= config.bin %> <%= command.id %> org-abc123 --slug new-slug",
5558
+ "description": "Set the organization slug (requires authSAML feature)"
5559
+ },
5560
+ {
5561
+ "command": "<%= config.bin %> <%= command.id %> org-abc123 --default-role viewer",
5562
+ "description": "Change the default member role"
5563
+ },
5564
+ {
5565
+ "command": "<%= config.bin %> <%= command.id %> org-abc123 --logo ./logo.png",
5566
+ "description": "Set or replace the organization logo"
5567
+ },
5568
+ {
5569
+ "command": "<%= config.bin %> <%= command.id %> org-abc123 --logo \"\"",
5570
+ "description": "Remove the organization logo"
5571
+ }
5572
+ ],
5573
+ "flags": {
5574
+ "default-role": {
5575
+ "description": "New default role for new members",
5576
+ "name": "default-role",
5577
+ "required": false,
5578
+ "hasDynamicHelp": false,
5579
+ "multiple": false,
5580
+ "type": "option"
5581
+ },
5582
+ "logo": {
5583
+ "description": "Image file to use as the logo: PNG, JPEG, GIF, WebP, SVG, BMP, TIFF, HEIF or AVIF, at most 5 MB (\"\" removes it)",
5584
+ "name": "logo",
5585
+ "required": false,
5586
+ "hasDynamicHelp": false,
5587
+ "helpValue": "<path>",
5588
+ "multiple": false,
5589
+ "type": "option"
5590
+ },
5591
+ "name": {
5592
+ "description": "New organization name",
5593
+ "name": "name",
5594
+ "required": false,
5595
+ "hasDynamicHelp": false,
5596
+ "multiple": false,
5597
+ "type": "option"
5598
+ },
5599
+ "slug": {
5600
+ "description": "New URL slug (requires authSAML feature on the organization)",
5601
+ "name": "slug",
5602
+ "required": false,
5603
+ "hasDynamicHelp": false,
5604
+ "multiple": false,
5605
+ "type": "option"
5606
+ }
5607
+ },
5608
+ "hasDynamicHelp": false,
5609
+ "hiddenAliases": [
5610
+ "organization:update",
5611
+ "organisations:update",
5612
+ "organisation:update",
5613
+ "org:update",
5614
+ "orgs:update"
5615
+ ],
5616
+ "id": "organizations:update",
5617
+ "pluginAlias": "@sanity/cli",
5618
+ "pluginName": "@sanity/cli",
5619
+ "pluginType": "core",
5620
+ "strict": true,
5621
+ "telemetry": {
5622
+ "redactedFlags": [
5623
+ {
5624
+ "canonical": "--logo",
5625
+ "flags": [
5626
+ "--logo"
5627
+ ]
5628
+ },
5629
+ {
5630
+ "canonical": "--name",
5631
+ "flags": [
5632
+ "--name"
5633
+ ]
5634
+ }
5635
+ ]
5636
+ },
5637
+ "isESM": true,
5638
+ "relativePath": [
5639
+ "dist",
5640
+ "commands",
5641
+ "organizations",
5642
+ "update.js"
5643
+ ]
5644
+ },
5645
+ "projects:create": {
5646
+ "aliases": [],
5647
+ "args": {
5648
+ "projectName": {
5649
+ "description": "Name of the project to create",
5650
+ "name": "projectName",
5651
+ "required": false
5652
+ }
5653
+ },
5654
+ "description": "Create a new Sanity project",
5655
+ "examples": [
5656
+ {
5657
+ "command": "<%= config.bin %> <%= command.id %>",
5658
+ "description": "Interactively create a project"
5659
+ },
5660
+ {
5661
+ "command": "<%= config.bin %> <%= command.id %> \"My New Project\"",
5662
+ "description": "Create a project named \"My New Project\""
5663
+ },
5664
+ {
5665
+ "command": "<%= config.bin %> <%= command.id %> \"My Project\" --organization=my-org",
5666
+ "description": "Create a project in a specific organization"
5667
+ },
5668
+ {
5669
+ "command": "<%= config.bin %> <%= command.id %> \"My Project\" --dataset=staging --dataset-visibility=private",
5670
+ "description": "Create a project with a private dataset named \"staging\""
5671
+ },
5672
+ {
5673
+ "command": "<%= config.bin %> <%= command.id %> \"My Project\" --logo ./logo.png",
5674
+ "description": "Create a project with a logo"
5675
+ },
5676
+ {
5677
+ "command": "<%= config.bin %> <%= command.id %> \"CI Project\" --yes --json",
5678
+ "description": "Create a project non-interactively with JSON output"
5679
+ }
5673
5680
  ],
5674
5681
  "flags": {
5675
5682
  "json": {
@@ -7349,66 +7356,230 @@
7349
7356
  ],
7350
7357
  "type": "option"
7351
7358
  },
7352
- "ids": {
7353
- "description": "Comma-separated IDs of the documents to return, up to 200, in any state. Use it to look up the documents entry citations point at.",
7354
- "name": "ids",
7355
- "hasDynamicHelp": false,
7356
- "multiple": false,
7357
- "type": "option"
7359
+ "ids": {
7360
+ "description": "Comma-separated IDs of the documents to return, up to 200, in any state. Use it to look up the documents entry citations point at.",
7361
+ "name": "ids",
7362
+ "hasDynamicHelp": false,
7363
+ "multiple": false,
7364
+ "type": "option"
7365
+ }
7366
+ },
7367
+ "hasDynamicHelp": false,
7368
+ "hiddenAliases": [],
7369
+ "id": "context:documents:list",
7370
+ "pluginAlias": "@sanity/cli",
7371
+ "pluginName": "@sanity/cli",
7372
+ "pluginType": "core",
7373
+ "strict": true,
7374
+ "summary": "List documents",
7375
+ "enableJsonFlag": true,
7376
+ "telemetry": {
7377
+ "redactedFlags": [
7378
+ {
7379
+ "canonical": "--source",
7380
+ "flags": [
7381
+ "--source"
7382
+ ]
7383
+ },
7384
+ {
7385
+ "canonical": "--ids",
7386
+ "flags": [
7387
+ "--ids"
7388
+ ]
7389
+ }
7390
+ ]
7391
+ },
7392
+ "isESM": true,
7393
+ "relativePath": [
7394
+ "dist",
7395
+ "commands",
7396
+ "context",
7397
+ "documents",
7398
+ "list.js"
7399
+ ]
7400
+ },
7401
+ "context:entries:get": {
7402
+ "aliases": [],
7403
+ "args": {
7404
+ "knowledgeBaseId": {
7405
+ "description": "Knowledge base ID",
7406
+ "name": "knowledgeBaseId",
7407
+ "required": true
7408
+ },
7409
+ "path": {
7410
+ "description": "Entry path, as listed by `sanity context entries list`",
7411
+ "name": "path",
7412
+ "required": true
7413
+ }
7414
+ },
7415
+ "description": "Get an entry and its content",
7416
+ "examples": [
7417
+ {
7418
+ "command": "<%= config.bin %> <%= command.id %> kb-abc123 billing/refunds",
7419
+ "description": "Print an entry and its content"
7420
+ },
7421
+ {
7422
+ "command": "<%= config.bin %> <%= command.id %> kb-abc123 billing/refunds --json",
7423
+ "description": "Output the entry, including citations, as JSON"
7424
+ }
7425
+ ],
7426
+ "flags": {
7427
+ "json": {
7428
+ "description": "Format output as json.",
7429
+ "helpGroup": "GLOBAL",
7430
+ "name": "json",
7431
+ "allowNo": false,
7432
+ "type": "boolean"
7433
+ }
7434
+ },
7435
+ "hasDynamicHelp": false,
7436
+ "hiddenAliases": [],
7437
+ "id": "context:entries:get",
7438
+ "pluginAlias": "@sanity/cli",
7439
+ "pluginName": "@sanity/cli",
7440
+ "pluginType": "core",
7441
+ "strict": true,
7442
+ "enableJsonFlag": true,
7443
+ "isESM": true,
7444
+ "relativePath": [
7445
+ "dist",
7446
+ "commands",
7447
+ "context",
7448
+ "entries",
7449
+ "get.js"
7450
+ ]
7451
+ },
7452
+ "context:entries:list": {
7453
+ "aliases": [],
7454
+ "args": {
7455
+ "knowledgeBaseId": {
7456
+ "description": "Knowledge base ID",
7457
+ "name": "knowledgeBaseId",
7458
+ "required": true
7459
+ }
7460
+ },
7461
+ "description": "List the entries a knowledge base build produced",
7462
+ "examples": [
7463
+ {
7464
+ "command": "<%= config.bin %> <%= command.id %> kb-abc123",
7465
+ "description": "List all entries for a knowledge base"
7466
+ },
7467
+ {
7468
+ "command": "<%= config.bin %> <%= command.id %> kb-abc123 --json",
7469
+ "description": "Output entries as JSON"
7470
+ }
7471
+ ],
7472
+ "flags": {
7473
+ "json": {
7474
+ "description": "Format output as json.",
7475
+ "helpGroup": "GLOBAL",
7476
+ "name": "json",
7477
+ "allowNo": false,
7478
+ "type": "boolean"
7479
+ }
7480
+ },
7481
+ "hasDynamicHelp": false,
7482
+ "hiddenAliases": [],
7483
+ "id": "context:entries:list",
7484
+ "pluginAlias": "@sanity/cli",
7485
+ "pluginName": "@sanity/cli",
7486
+ "pluginType": "core",
7487
+ "strict": true,
7488
+ "enableJsonFlag": true,
7489
+ "isESM": true,
7490
+ "relativePath": [
7491
+ "dist",
7492
+ "commands",
7493
+ "context",
7494
+ "entries",
7495
+ "list.js"
7496
+ ]
7497
+ },
7498
+ "context:entries:rebuild": {
7499
+ "aliases": [],
7500
+ "args": {
7501
+ "knowledgeBaseId": {
7502
+ "description": "The knowledge base's ID (`kb...`), its `publicId`. Its UUID `id` is also accepted.",
7503
+ "name": "knowledgeBaseId",
7504
+ "required": true
7505
+ },
7506
+ "entryPath": {
7507
+ "description": "The entry's slash-delimited path, such as `pricing/plans/free`, URL-encoded.",
7508
+ "name": "entryPath",
7509
+ "required": true
7510
+ }
7511
+ },
7512
+ "description": "Queues a rewrite of the entry at `entryPath` from its cited sources and the active instructions, and returns a job ID immediately. The response also lists the other entries built from any of the same sources. An instruction applies to every entry built from its sources, so those entries can change too. Returns `422` with code `entryDocumentInvalid` if the entry document was edited into a shape the API cannot read.",
7513
+ "examples": [
7514
+ {
7515
+ "command": "<%= config.bin %> <%= command.id %> <knowledgeBaseId> <entryPath>",
7516
+ "description": "Rebuild an entry from its sources"
7517
+ },
7518
+ {
7519
+ "command": "<%= config.bin %> <%= command.id %> <knowledgeBaseId> <entryPath> --json",
7520
+ "description": "Rebuild an entry from its sources, as JSON"
7521
+ }
7522
+ ],
7523
+ "flags": {
7524
+ "json": {
7525
+ "description": "Format output as json.",
7526
+ "helpGroup": "GLOBAL",
7527
+ "name": "json",
7528
+ "allowNo": false,
7529
+ "type": "boolean"
7530
+ },
7531
+ "watch": {
7532
+ "description": "Wait for the job to finish, exiting non-zero if it fails",
7533
+ "name": "watch",
7534
+ "allowNo": false,
7535
+ "type": "boolean"
7358
7536
  }
7359
7537
  },
7360
7538
  "hasDynamicHelp": false,
7361
7539
  "hiddenAliases": [],
7362
- "id": "context:documents:list",
7540
+ "id": "context:entries:rebuild",
7363
7541
  "pluginAlias": "@sanity/cli",
7364
7542
  "pluginName": "@sanity/cli",
7365
7543
  "pluginType": "core",
7366
7544
  "strict": true,
7367
- "summary": "List documents",
7545
+ "summary": "Rebuild an entry from its sources",
7368
7546
  "enableJsonFlag": true,
7369
7547
  "telemetry": {
7370
- "redactedFlags": [
7371
- {
7372
- "canonical": "--source",
7373
- "flags": [
7374
- "--source"
7375
- ]
7376
- },
7377
- {
7378
- "canonical": "--ids",
7379
- "flags": [
7380
- "--ids"
7381
- ]
7382
- }
7383
- ]
7548
+ "redactedFlags": []
7384
7549
  },
7385
7550
  "isESM": true,
7386
7551
  "relativePath": [
7387
7552
  "dist",
7388
7553
  "commands",
7389
7554
  "context",
7390
- "documents",
7391
- "list.js"
7555
+ "entries",
7556
+ "rebuild.js"
7392
7557
  ]
7393
7558
  },
7394
- "context:instructions:create": {
7559
+ "context:issues:apply": {
7395
7560
  "aliases": [],
7396
7561
  "args": {
7397
7562
  "knowledgeBaseId": {
7398
7563
  "description": "The knowledge base's ID (`kb...`), its `publicId`. Its UUID `id` is also accepted.",
7399
7564
  "name": "knowledgeBaseId",
7400
7565
  "required": true
7566
+ },
7567
+ "issueIds": {
7568
+ "description": "The IDs of the issues to accept and apply.",
7569
+ "multiple": true,
7570
+ "name": "issueIds",
7571
+ "required": true
7401
7572
  }
7402
7573
  },
7403
- "description": "Creates a standing instruction for how entries built from its documents are written. Every instruction applies to specific documents, set in `scopeDocumentIds`. To rebuild entries under the new instruction right away, pass their paths in `rebuildPaths`. The response includes the rebuild job ID, or `null` if the rebuild could not start. The instruction is saved either way. After the instruction is saved, a background check files issues for entries that contradict it. If you already checked the instruction for contradictions, set `verified` to skip the background check. If the requested rebuild does not start, the background check runs even when `verified` is set.",
7574
+ "description": "Accepts the issues in `issueIds`, then queues a job that applies them, rewrites the affected entries, and saves a new revision. Returns a job ID. IDs of issues that no longer exist are skipped. Returns `409` with code `issueNotAutoApplicable`, and accepts none of the issues, if any of them cannot be applied: a `conflict` (resolve it with `POST .../issues/{issueId}/resolve`), or an `update_required` issue whose `scopePath` is `*` or names an entry that no longer exists. Dismiss those instead.",
7404
7575
  "examples": [
7405
7576
  {
7406
7577
  "command": "<%= config.bin %> <%= command.id %> <knowledgeBaseId>",
7407
- "description": "Create an instruction"
7578
+ "description": "Accept and apply issues"
7408
7579
  },
7409
7580
  {
7410
7581
  "command": "<%= config.bin %> <%= command.id %> <knowledgeBaseId> --json",
7411
- "description": "Create an instruction, as JSON"
7582
+ "description": "Accept and apply issues, as JSON"
7412
7583
  }
7413
7584
  ],
7414
7585
  "flags": {
@@ -7419,77 +7590,35 @@
7419
7590
  "allowNo": false,
7420
7591
  "type": "boolean"
7421
7592
  },
7422
- "statement": {
7423
- "description": "The instruction in plain language. Builds follow it over what the sources say.",
7424
- "name": "statement",
7425
- "required": true,
7426
- "hasDynamicHelp": false,
7427
- "multiple": false,
7428
- "type": "option"
7429
- },
7430
- "scope-document-ids": {
7431
- "description": "IDs of the documents the instruction applies to. Builds apply it when they write entries built from these documents. IDs of documents that no longer exist are dropped. If none exist, the request returns `422` with code `instructionScopeVanished`.",
7432
- "name": "scope-document-ids",
7433
- "required": true,
7434
- "hasDynamicHelp": false,
7435
- "multiple": true,
7436
- "type": "option"
7437
- },
7438
- "rebuild-paths": {
7439
- "description": "Paths of entries to rebuild under the new instruction right away. The response returns the rebuild job ID in `rebuildJobId`.",
7440
- "name": "rebuild-paths",
7441
- "hasDynamicHelp": false,
7442
- "multiple": true,
7443
- "type": "option"
7444
- },
7445
- "verified": {
7446
- "description": "Whether you already checked the instruction for entries that contradict it. When `true`, the background check that files issues for those entries is skipped. It still runs if the rebuild you requested in `rebuildPaths` does not start.",
7447
- "name": "verified",
7448
- "allowNo": true,
7593
+ "watch": {
7594
+ "description": "Wait for the job to finish, exiting non-zero if it fails",
7595
+ "name": "watch",
7596
+ "allowNo": false,
7449
7597
  "type": "boolean"
7450
7598
  }
7451
7599
  },
7452
7600
  "hasDynamicHelp": false,
7453
7601
  "hiddenAliases": [],
7454
- "id": "context:instructions:create",
7602
+ "id": "context:issues:apply",
7455
7603
  "pluginAlias": "@sanity/cli",
7456
7604
  "pluginName": "@sanity/cli",
7457
7605
  "pluginType": "core",
7458
7606
  "strict": true,
7459
- "summary": "Create an instruction",
7607
+ "summary": "Accept and apply issues",
7460
7608
  "enableJsonFlag": true,
7461
7609
  "telemetry": {
7462
- "redactedFlags": [
7463
- {
7464
- "canonical": "--statement",
7465
- "flags": [
7466
- "--statement"
7467
- ]
7468
- },
7469
- {
7470
- "canonical": "--scope-document-ids",
7471
- "flags": [
7472
- "--scope-document-ids"
7473
- ]
7474
- },
7475
- {
7476
- "canonical": "--rebuild-paths",
7477
- "flags": [
7478
- "--rebuild-paths"
7479
- ]
7480
- }
7481
- ]
7610
+ "redactedFlags": []
7482
7611
  },
7483
7612
  "isESM": true,
7484
7613
  "relativePath": [
7485
7614
  "dist",
7486
7615
  "commands",
7487
7616
  "context",
7488
- "instructions",
7489
- "create.js"
7617
+ "issues",
7618
+ "apply.js"
7490
7619
  ]
7491
7620
  },
7492
- "context:instructions:delete": {
7621
+ "context:issues:dismiss": {
7493
7622
  "aliases": [],
7494
7623
  "args": {
7495
7624
  "knowledgeBaseId": {
@@ -7497,21 +7626,21 @@
7497
7626
  "name": "knowledgeBaseId",
7498
7627
  "required": true
7499
7628
  },
7500
- "instructionId": {
7501
- "description": "The instruction's ID.",
7502
- "name": "instructionId",
7629
+ "issueId": {
7630
+ "description": "The issue's document ID.",
7631
+ "name": "issueId",
7503
7632
  "required": true
7504
7633
  }
7505
7634
  },
7506
- "description": "Deletes the instruction. Builds stop applying it from the next run. Entries already written under it keep their text until they are rebuilt; pass `rebuild=true` to rebuild every entry built from its documents right away.",
7635
+ "description": "Marks the issue as rejected. If the issue already left triage, the request returns it unchanged. Returns `422` with code `issueDocumentInvalid` if the issue document was edited into a shape the API cannot verify. Returns `409` with code `issueTransitionConflict` if another change to the issue happened at the same time. You can safely retry a `409`.",
7507
7636
  "examples": [
7508
7637
  {
7509
- "command": "<%= config.bin %> <%= command.id %> <knowledgeBaseId> <instructionId>",
7510
- "description": "Delete an instruction"
7638
+ "command": "<%= config.bin %> <%= command.id %> <knowledgeBaseId> <issueId>",
7639
+ "description": "Dismiss an issue"
7511
7640
  },
7512
7641
  {
7513
- "command": "<%= config.bin %> <%= command.id %> <knowledgeBaseId> <instructionId> --json",
7514
- "description": "Delete an instruction, as JSON"
7642
+ "command": "<%= config.bin %> <%= command.id %> <knowledgeBaseId> <issueId> --json",
7643
+ "description": "Dismiss an issue, as JSON"
7515
7644
  }
7516
7645
  ],
7517
7646
  "flags": {
@@ -7521,29 +7650,16 @@
7521
7650
  "name": "json",
7522
7651
  "allowNo": false,
7523
7652
  "type": "boolean"
7524
- },
7525
- "rebuild": {
7526
- "description": "Set to `true` to rebuild every entry built from the instruction's documents once it is deleted, so pages written under the instruction reflect their documents again. The response returns the rebuild job ID in `rebuildJobId`.",
7527
- "name": "rebuild",
7528
- "allowNo": true,
7529
- "type": "boolean"
7530
- },
7531
- "yes": {
7532
- "char": "y",
7533
- "description": "Skip confirmation prompt (unattended mode)",
7534
- "name": "yes",
7535
- "allowNo": false,
7536
- "type": "boolean"
7537
7653
  }
7538
7654
  },
7539
7655
  "hasDynamicHelp": false,
7540
7656
  "hiddenAliases": [],
7541
- "id": "context:instructions:delete",
7657
+ "id": "context:issues:dismiss",
7542
7658
  "pluginAlias": "@sanity/cli",
7543
7659
  "pluginName": "@sanity/cli",
7544
7660
  "pluginType": "core",
7545
7661
  "strict": true,
7546
- "summary": "Delete an instruction",
7662
+ "summary": "Dismiss an issue",
7547
7663
  "enableJsonFlag": true,
7548
7664
  "telemetry": {
7549
7665
  "redactedFlags": []
@@ -7553,33 +7669,33 @@
7553
7669
  "dist",
7554
7670
  "commands",
7555
7671
  "context",
7556
- "instructions",
7557
- "delete.js"
7672
+ "issues",
7673
+ "dismiss.js"
7558
7674
  ]
7559
7675
  },
7560
- "context:instructions:edit": {
7676
+ "context:issues:get": {
7561
7677
  "aliases": [],
7562
7678
  "args": {
7563
7679
  "knowledgeBaseId": {
7564
- "description": "The knowledge base's ID (`kb...`), its `publicId`. Its UUID `id` is also accepted.",
7680
+ "description": "Knowledge base ID",
7565
7681
  "name": "knowledgeBaseId",
7566
7682
  "required": true
7567
7683
  },
7568
- "instructionId": {
7569
- "description": "The instruction's ID.",
7570
- "name": "instructionId",
7684
+ "issueId": {
7685
+ "description": "Issue ID",
7686
+ "name": "issueId",
7571
7687
  "required": true
7572
7688
  }
7573
7689
  },
7574
- "description": "Updates the instruction's statement or documents. The change applies from the next build. Any update also reactivates an archived instruction and ties it to the current content of its documents.",
7690
+ "description": "Get details of an issue",
7575
7691
  "examples": [
7576
7692
  {
7577
- "command": "<%= config.bin %> <%= command.id %> <knowledgeBaseId> <instructionId>",
7578
- "description": "Update an instruction"
7693
+ "command": "<%= config.bin %> <%= command.id %> kb-abc123 issue.def456",
7694
+ "description": "Get details of a specific issue"
7579
7695
  },
7580
7696
  {
7581
- "command": "<%= config.bin %> <%= command.id %> <knowledgeBaseId> <instructionId> --json",
7582
- "description": "Update an instruction, as JSON"
7697
+ "command": "<%= config.bin %> <%= command.id %> kb-abc123 issue.def456 --json",
7698
+ "description": "Output the issue as JSON"
7583
7699
  }
7584
7700
  ],
7585
7701
  "flags": {
@@ -7589,118 +7705,126 @@
7589
7705
  "name": "json",
7590
7706
  "allowNo": false,
7591
7707
  "type": "boolean"
7592
- },
7593
- "statement": {
7594
- "description": "The new instruction text. Omit it to keep the current text.",
7595
- "name": "statement",
7596
- "hasDynamicHelp": false,
7597
- "multiple": false,
7598
- "type": "option"
7599
- },
7600
- "scope-document-ids": {
7601
- "description": "IDs of the documents the instruction applies to. Replaces the current list. Omit it to keep the current documents. IDs of documents that no longer exist are dropped. If none exist, the request returns `422` with code `instructionScopeVanished`.",
7602
- "name": "scope-document-ids",
7603
- "hasDynamicHelp": false,
7604
- "multiple": true,
7605
- "type": "option"
7606
7708
  }
7607
7709
  },
7608
7710
  "hasDynamicHelp": false,
7609
7711
  "hiddenAliases": [],
7610
- "id": "context:instructions:edit",
7712
+ "id": "context:issues:get",
7611
7713
  "pluginAlias": "@sanity/cli",
7612
7714
  "pluginName": "@sanity/cli",
7613
7715
  "pluginType": "core",
7614
7716
  "strict": true,
7615
- "summary": "Update an instruction",
7616
7717
  "enableJsonFlag": true,
7617
- "telemetry": {
7618
- "redactedFlags": [
7619
- {
7620
- "canonical": "--statement",
7621
- "flags": [
7622
- "--statement"
7623
- ]
7624
- },
7625
- {
7626
- "canonical": "--scope-document-ids",
7627
- "flags": [
7628
- "--scope-document-ids"
7629
- ]
7630
- }
7631
- ]
7632
- },
7633
7718
  "isESM": true,
7634
7719
  "relativePath": [
7635
7720
  "dist",
7636
7721
  "commands",
7637
7722
  "context",
7638
- "instructions",
7639
- "edit.js"
7723
+ "issues",
7724
+ "get.js"
7640
7725
  ]
7641
7726
  },
7642
- "context:jobs:get": {
7727
+ "context:issues:list": {
7643
7728
  "aliases": [],
7644
7729
  "args": {
7645
7730
  "knowledgeBaseId": {
7646
- "description": "The knowledge base's ID (`kb...`), its `publicId`. Its UUID `id` is also accepted.",
7731
+ "description": "Knowledge base ID",
7647
7732
  "name": "knowledgeBaseId",
7648
7733
  "required": true
7649
- },
7650
- "jobId": {
7651
- "description": "The job ID returned by the endpoint that started the work.",
7652
- "name": "jobId",
7653
- "required": true
7654
7734
  }
7655
7735
  },
7656
- "description": "Returns the status of a background job, such as a build, sync, or refresh. The endpoint that starts the work returns the job ID. A job cancelled before it started never ran, so it returns 404.",
7736
+ "description": "List issues found by knowledge base builds",
7657
7737
  "examples": [
7658
7738
  {
7659
- "command": "<%= config.bin %> <%= command.id %> <knowledgeBaseId> <jobId>",
7660
- "description": "Get a job"
7739
+ "command": "<%= config.bin %> <%= command.id %> kb-abc123",
7740
+ "description": "List all issues for a knowledge base"
7661
7741
  },
7662
7742
  {
7663
- "command": "<%= config.bin %> <%= command.id %> <knowledgeBaseId> <jobId> --json",
7664
- "description": "Get a job, as JSON"
7743
+ "command": "<%= config.bin %> <%= command.id %> kb-abc123 --status open",
7744
+ "description": "List issues awaiting triage"
7745
+ },
7746
+ {
7747
+ "command": "<%= config.bin %> <%= command.id %> kb-abc123 --kind conflict --severity critical",
7748
+ "description": "List critical conflicts"
7749
+ },
7750
+ {
7751
+ "command": "<%= config.bin %> <%= command.id %> kb-abc123 --scope billing",
7752
+ "description": "List issues about entries under billing/"
7753
+ },
7754
+ {
7755
+ "command": "<%= config.bin %> <%= command.id %> kb-abc123 --json",
7756
+ "description": "Output issues as JSON"
7665
7757
  }
7666
7758
  ],
7667
7759
  "flags": {
7668
7760
  "json": {
7669
7761
  "description": "Format output as json.",
7670
7762
  "helpGroup": "GLOBAL",
7671
- "name": "json",
7672
- "allowNo": false,
7673
- "type": "boolean"
7674
- },
7675
- "watch": {
7676
- "description": "Wait for the job to finish, exiting non-zero if it fails",
7677
- "name": "watch",
7763
+ "name": "json",
7678
7764
  "allowNo": false,
7679
7765
  "type": "boolean"
7766
+ },
7767
+ "kind": {
7768
+ "description": "Only list issues of this kind",
7769
+ "name": "kind",
7770
+ "hasDynamicHelp": false,
7771
+ "multiple": false,
7772
+ "options": [
7773
+ "conflict",
7774
+ "update_required"
7775
+ ],
7776
+ "type": "option"
7777
+ },
7778
+ "scope": {
7779
+ "description": "Only list issues about this entry path or anything under it (`*` for knowledge-base-wide issues)",
7780
+ "name": "scope",
7781
+ "hasDynamicHelp": false,
7782
+ "helpValue": "<path>",
7783
+ "multiple": false,
7784
+ "type": "option"
7785
+ },
7786
+ "severity": {
7787
+ "description": "Only list issues of this severity",
7788
+ "name": "severity",
7789
+ "hasDynamicHelp": false,
7790
+ "multiple": false,
7791
+ "options": [
7792
+ "critical",
7793
+ "suggestion"
7794
+ ],
7795
+ "type": "option"
7796
+ },
7797
+ "status": {
7798
+ "description": "Only list issues with this status (rejected = dismissed, accepted = resolved or applied)",
7799
+ "name": "status",
7800
+ "hasDynamicHelp": false,
7801
+ "multiple": false,
7802
+ "options": [
7803
+ "open",
7804
+ "accepted",
7805
+ "rejected"
7806
+ ],
7807
+ "type": "option"
7680
7808
  }
7681
7809
  },
7682
7810
  "hasDynamicHelp": false,
7683
7811
  "hiddenAliases": [],
7684
- "id": "context:jobs:get",
7812
+ "id": "context:issues:list",
7685
7813
  "pluginAlias": "@sanity/cli",
7686
7814
  "pluginName": "@sanity/cli",
7687
7815
  "pluginType": "core",
7688
7816
  "strict": true,
7689
- "summary": "Get a job",
7690
7817
  "enableJsonFlag": true,
7691
- "telemetry": {
7692
- "redactedFlags": []
7693
- },
7694
7818
  "isESM": true,
7695
7819
  "relativePath": [
7696
7820
  "dist",
7697
7821
  "commands",
7698
7822
  "context",
7699
- "jobs",
7700
- "get.js"
7823
+ "issues",
7824
+ "list.js"
7701
7825
  ]
7702
7826
  },
7703
- "context:issues:apply": {
7827
+ "context:issues:reopen": {
7704
7828
  "aliases": [],
7705
7829
  "args": {
7706
7830
  "knowledgeBaseId": {
@@ -7708,22 +7832,21 @@
7708
7832
  "name": "knowledgeBaseId",
7709
7833
  "required": true
7710
7834
  },
7711
- "issueIds": {
7712
- "description": "The IDs of the issues to accept and apply.",
7713
- "multiple": true,
7714
- "name": "issueIds",
7835
+ "issueId": {
7836
+ "description": "The issue's document ID.",
7837
+ "name": "issueId",
7715
7838
  "required": true
7716
7839
  }
7717
7840
  },
7718
- "description": "Accepts the issues in `issueIds`, then queues a job that applies them, rewrites the affected entries, and saves a new revision. Returns a job ID. IDs of issues that no longer exist are skipped. Returns `409` with code `issueNotAutoApplicable`, and accepts none of the issues, if any of them cannot be applied: a `conflict` (resolve it with `POST .../issues/{issueId}/resolve`), or an `update_required` issue whose `scopePath` is `*` or names an entry that no longer exists. Dismiss those instead.",
7841
+ "description": "Returns an accepted conflict issue to triage, clears its resolution, and deletes the instruction the resolution created. Reopening an open or dismissed conflict returns it unchanged. Other issue types return `422` with code `issueNotResolvable`.",
7719
7842
  "examples": [
7720
7843
  {
7721
- "command": "<%= config.bin %> <%= command.id %> <knowledgeBaseId>",
7722
- "description": "Accept and apply issues"
7844
+ "command": "<%= config.bin %> <%= command.id %> <knowledgeBaseId> <issueId>",
7845
+ "description": "Reopen an accepted conflict"
7723
7846
  },
7724
7847
  {
7725
- "command": "<%= config.bin %> <%= command.id %> <knowledgeBaseId> --json",
7726
- "description": "Accept and apply issues, as JSON"
7848
+ "command": "<%= config.bin %> <%= command.id %> <knowledgeBaseId> <issueId> --json",
7849
+ "description": "Reopen an accepted conflict, as JSON"
7727
7850
  }
7728
7851
  ],
7729
7852
  "flags": {
@@ -7733,22 +7856,16 @@
7733
7856
  "name": "json",
7734
7857
  "allowNo": false,
7735
7858
  "type": "boolean"
7736
- },
7737
- "watch": {
7738
- "description": "Wait for the job to finish, exiting non-zero if it fails",
7739
- "name": "watch",
7740
- "allowNo": false,
7741
- "type": "boolean"
7742
7859
  }
7743
7860
  },
7744
7861
  "hasDynamicHelp": false,
7745
7862
  "hiddenAliases": [],
7746
- "id": "context:issues:apply",
7863
+ "id": "context:issues:reopen",
7747
7864
  "pluginAlias": "@sanity/cli",
7748
7865
  "pluginName": "@sanity/cli",
7749
7866
  "pluginType": "core",
7750
7867
  "strict": true,
7751
- "summary": "Accept and apply issues",
7868
+ "summary": "Reopen an accepted conflict",
7752
7869
  "enableJsonFlag": true,
7753
7870
  "telemetry": {
7754
7871
  "redactedFlags": []
@@ -7759,10 +7876,10 @@
7759
7876
  "commands",
7760
7877
  "context",
7761
7878
  "issues",
7762
- "apply.js"
7879
+ "reopen.js"
7763
7880
  ]
7764
7881
  },
7765
- "context:issues:dismiss": {
7882
+ "context:issues:resolve": {
7766
7883
  "aliases": [],
7767
7884
  "args": {
7768
7885
  "knowledgeBaseId": {
@@ -7776,15 +7893,15 @@
7776
7893
  "required": true
7777
7894
  }
7778
7895
  },
7779
- "description": "Marks the issue as rejected. If the issue already left triage, the request returns it unchanged. Returns `422` with code `issueDocumentInvalid` if the issue document was edited into a shape the API cannot verify. Returns `409` with code `issueTransitionConflict` if another change to the issue happened at the same time. You can safely retry a `409`.",
7896
+ "description": "Resolves a conflict issue by choosing one of its sides. Set `resolution` to the index of a side in `content.sides`. For a conflict on a single entry, index `0` is the entry's current content, so choosing it keeps the entry as it is. Choosing any other side rewrites the entry, and the returned `jobId` tracks the rewrite. The decision becomes a standing instruction for every future build, and `resolvedBy` records who made it. To change a decision, resolve the accepted conflict again. Other issue types, dismissed conflicts, and out-of-range indexes return `422` with code `issueNotResolvable`.",
7780
7897
  "examples": [
7781
7898
  {
7782
- "command": "<%= config.bin %> <%= command.id %> <knowledgeBaseId> <issueId>",
7783
- "description": "Dismiss an issue"
7899
+ "command": "<%= config.bin %> <%= command.id %> kb-abc123 issue-def456",
7900
+ "description": "Choose the correct side interactively"
7784
7901
  },
7785
7902
  {
7786
- "command": "<%= config.bin %> <%= command.id %> <knowledgeBaseId> <issueId> --json",
7787
- "description": "Dismiss an issue, as JSON"
7903
+ "command": "<%= config.bin %> <%= command.id %> kb-abc123 issue-def456 --side 1 --watch",
7904
+ "description": "Choose side 1 and wait for the entry rewrite"
7788
7905
  }
7789
7906
  ],
7790
7907
  "flags": {
@@ -7794,16 +7911,28 @@
7794
7911
  "name": "json",
7795
7912
  "allowNo": false,
7796
7913
  "type": "boolean"
7914
+ },
7915
+ "watch": {
7916
+ "description": "Wait for the job to finish, exiting non-zero if it fails",
7917
+ "name": "watch",
7918
+ "allowNo": false,
7919
+ "type": "boolean"
7920
+ },
7921
+ "side": {
7922
+ "description": "Index of the correct side, as listed by `sanity context issues get`",
7923
+ "name": "side",
7924
+ "hasDynamicHelp": false,
7925
+ "multiple": false,
7926
+ "type": "option"
7797
7927
  }
7798
7928
  },
7799
7929
  "hasDynamicHelp": false,
7800
7930
  "hiddenAliases": [],
7801
- "id": "context:issues:dismiss",
7931
+ "id": "context:issues:resolve",
7802
7932
  "pluginAlias": "@sanity/cli",
7803
7933
  "pluginName": "@sanity/cli",
7804
7934
  "pluginType": "core",
7805
- "strict": true,
7806
- "summary": "Dismiss an issue",
7935
+ "summary": "Resolve a conflict issue",
7807
7936
  "enableJsonFlag": true,
7808
7937
  "telemetry": {
7809
7938
  "redactedFlags": []
@@ -7814,32 +7943,32 @@
7814
7943
  "commands",
7815
7944
  "context",
7816
7945
  "issues",
7817
- "dismiss.js"
7946
+ "resolve.js"
7818
7947
  ]
7819
7948
  },
7820
- "context:issues:get": {
7949
+ "context:jobs:get": {
7821
7950
  "aliases": [],
7822
7951
  "args": {
7823
7952
  "knowledgeBaseId": {
7824
- "description": "Knowledge base ID",
7953
+ "description": "The knowledge base's ID (`kb...`), its `publicId`. Its UUID `id` is also accepted.",
7825
7954
  "name": "knowledgeBaseId",
7826
7955
  "required": true
7827
7956
  },
7828
- "issueId": {
7829
- "description": "Issue ID",
7830
- "name": "issueId",
7957
+ "jobId": {
7958
+ "description": "The job ID returned by the endpoint that started the work.",
7959
+ "name": "jobId",
7831
7960
  "required": true
7832
7961
  }
7833
7962
  },
7834
- "description": "Get details of an issue",
7963
+ "description": "Returns the status of a background job, such as a build, sync, or refresh. The endpoint that starts the work returns the job ID. A job cancelled before it started never ran, so it returns 404.",
7835
7964
  "examples": [
7836
7965
  {
7837
- "command": "<%= config.bin %> <%= command.id %> kb-abc123 issue.def456",
7838
- "description": "Get details of a specific issue"
7966
+ "command": "<%= config.bin %> <%= command.id %> <knowledgeBaseId> <jobId>",
7967
+ "description": "Get a job"
7839
7968
  },
7840
7969
  {
7841
- "command": "<%= config.bin %> <%= command.id %> kb-abc123 issue.def456 --json",
7842
- "description": "Output the issue as JSON"
7970
+ "command": "<%= config.bin %> <%= command.id %> <knowledgeBaseId> <jobId> --json",
7971
+ "description": "Get a job, as JSON"
7843
7972
  }
7844
7973
  ],
7845
7974
  "flags": {
@@ -7849,55 +7978,53 @@
7849
7978
  "name": "json",
7850
7979
  "allowNo": false,
7851
7980
  "type": "boolean"
7981
+ },
7982
+ "watch": {
7983
+ "description": "Wait for the job to finish, exiting non-zero if it fails",
7984
+ "name": "watch",
7985
+ "allowNo": false,
7986
+ "type": "boolean"
7852
7987
  }
7853
7988
  },
7854
7989
  "hasDynamicHelp": false,
7855
7990
  "hiddenAliases": [],
7856
- "id": "context:issues:get",
7991
+ "id": "context:jobs:get",
7857
7992
  "pluginAlias": "@sanity/cli",
7858
7993
  "pluginName": "@sanity/cli",
7859
7994
  "pluginType": "core",
7860
7995
  "strict": true,
7996
+ "summary": "Get a job",
7861
7997
  "enableJsonFlag": true,
7998
+ "telemetry": {
7999
+ "redactedFlags": []
8000
+ },
7862
8001
  "isESM": true,
7863
8002
  "relativePath": [
7864
8003
  "dist",
7865
8004
  "commands",
7866
8005
  "context",
7867
- "issues",
8006
+ "jobs",
7868
8007
  "get.js"
7869
8008
  ]
7870
8009
  },
7871
- "context:issues:list": {
8010
+ "context:instructions:create": {
7872
8011
  "aliases": [],
7873
8012
  "args": {
7874
8013
  "knowledgeBaseId": {
7875
- "description": "Knowledge base ID",
8014
+ "description": "The knowledge base's ID (`kb...`), its `publicId`. Its UUID `id` is also accepted.",
7876
8015
  "name": "knowledgeBaseId",
7877
8016
  "required": true
7878
8017
  }
7879
8018
  },
7880
- "description": "List issues found by knowledge base builds",
8019
+ "description": "Creates a standing instruction for how entries built from its documents are written. Every instruction applies to specific documents, set in `scopeDocumentIds`. To rebuild entries under the new instruction right away, pass their paths in `rebuildPaths`. The response includes the rebuild job ID, or `null` if the rebuild could not start. The instruction is saved either way. After the instruction is saved, a background check files issues for entries that contradict it. If you already checked the instruction for contradictions, set `verified` to skip the background check. If the requested rebuild does not start, the background check runs even when `verified` is set.",
7881
8020
  "examples": [
7882
8021
  {
7883
- "command": "<%= config.bin %> <%= command.id %> kb-abc123",
7884
- "description": "List all issues for a knowledge base"
7885
- },
7886
- {
7887
- "command": "<%= config.bin %> <%= command.id %> kb-abc123 --status open",
7888
- "description": "List issues awaiting triage"
7889
- },
7890
- {
7891
- "command": "<%= config.bin %> <%= command.id %> kb-abc123 --kind conflict --severity critical",
7892
- "description": "List critical conflicts"
7893
- },
7894
- {
7895
- "command": "<%= config.bin %> <%= command.id %> kb-abc123 --scope billing",
7896
- "description": "List issues about entries under billing/"
8022
+ "command": "<%= config.bin %> <%= command.id %> <knowledgeBaseId>",
8023
+ "description": "Create an instruction"
7897
8024
  },
7898
8025
  {
7899
- "command": "<%= config.bin %> <%= command.id %> kb-abc123 --json",
7900
- "description": "Output issues as JSON"
8026
+ "command": "<%= config.bin %> <%= command.id %> <knowledgeBaseId> --json",
8027
+ "description": "Create an instruction, as JSON"
7901
8028
  }
7902
8029
  ],
7903
8030
  "flags": {
@@ -7908,67 +8035,77 @@
7908
8035
  "allowNo": false,
7909
8036
  "type": "boolean"
7910
8037
  },
7911
- "kind": {
7912
- "description": "Only list issues of this kind",
7913
- "name": "kind",
8038
+ "statement": {
8039
+ "description": "The instruction in plain language. Builds follow it over what the sources say.",
8040
+ "name": "statement",
8041
+ "required": true,
7914
8042
  "hasDynamicHelp": false,
7915
8043
  "multiple": false,
7916
- "options": [
7917
- "conflict",
7918
- "update_required"
7919
- ],
7920
8044
  "type": "option"
7921
8045
  },
7922
- "scope": {
7923
- "description": "Only list issues about this entry path or anything under it (`*` for knowledge-base-wide issues)",
7924
- "name": "scope",
8046
+ "scope-document-ids": {
8047
+ "description": "IDs of the documents the instruction applies to. Builds apply it when they write entries built from these documents. IDs of documents that no longer exist are dropped. If none exist, the request returns `422` with code `instructionScopeVanished`.",
8048
+ "name": "scope-document-ids",
8049
+ "required": true,
7925
8050
  "hasDynamicHelp": false,
7926
- "helpValue": "<path>",
7927
- "multiple": false,
8051
+ "multiple": true,
7928
8052
  "type": "option"
7929
8053
  },
7930
- "severity": {
7931
- "description": "Only list issues of this severity",
7932
- "name": "severity",
8054
+ "rebuild-paths": {
8055
+ "description": "Paths of entries to rebuild under the new instruction right away. The response returns the rebuild job ID in `rebuildJobId`.",
8056
+ "name": "rebuild-paths",
7933
8057
  "hasDynamicHelp": false,
7934
- "multiple": false,
7935
- "options": [
7936
- "critical",
7937
- "suggestion"
7938
- ],
8058
+ "multiple": true,
7939
8059
  "type": "option"
7940
8060
  },
7941
- "status": {
7942
- "description": "Only list issues with this status (rejected = dismissed, accepted = resolved or applied)",
7943
- "name": "status",
7944
- "hasDynamicHelp": false,
7945
- "multiple": false,
7946
- "options": [
7947
- "open",
7948
- "accepted",
7949
- "rejected"
7950
- ],
7951
- "type": "option"
8061
+ "verified": {
8062
+ "description": "Whether you already checked the instruction for entries that contradict it. When `true`, the background check that files issues for those entries is skipped. It still runs if the rebuild you requested in `rebuildPaths` does not start.",
8063
+ "name": "verified",
8064
+ "allowNo": true,
8065
+ "type": "boolean"
7952
8066
  }
7953
8067
  },
7954
8068
  "hasDynamicHelp": false,
7955
8069
  "hiddenAliases": [],
7956
- "id": "context:issues:list",
8070
+ "id": "context:instructions:create",
7957
8071
  "pluginAlias": "@sanity/cli",
7958
8072
  "pluginName": "@sanity/cli",
7959
8073
  "pluginType": "core",
7960
8074
  "strict": true,
8075
+ "summary": "Create an instruction",
7961
8076
  "enableJsonFlag": true,
8077
+ "telemetry": {
8078
+ "redactedFlags": [
8079
+ {
8080
+ "canonical": "--statement",
8081
+ "flags": [
8082
+ "--statement"
8083
+ ]
8084
+ },
8085
+ {
8086
+ "canonical": "--scope-document-ids",
8087
+ "flags": [
8088
+ "--scope-document-ids"
8089
+ ]
8090
+ },
8091
+ {
8092
+ "canonical": "--rebuild-paths",
8093
+ "flags": [
8094
+ "--rebuild-paths"
8095
+ ]
8096
+ }
8097
+ ]
8098
+ },
7962
8099
  "isESM": true,
7963
8100
  "relativePath": [
7964
8101
  "dist",
7965
8102
  "commands",
7966
8103
  "context",
7967
- "issues",
7968
- "list.js"
8104
+ "instructions",
8105
+ "create.js"
7969
8106
  ]
7970
8107
  },
7971
- "context:issues:reopen": {
8108
+ "context:instructions:delete": {
7972
8109
  "aliases": [],
7973
8110
  "args": {
7974
8111
  "knowledgeBaseId": {
@@ -7976,21 +8113,21 @@
7976
8113
  "name": "knowledgeBaseId",
7977
8114
  "required": true
7978
8115
  },
7979
- "issueId": {
7980
- "description": "The issue's document ID.",
7981
- "name": "issueId",
8116
+ "instructionId": {
8117
+ "description": "The instruction's ID.",
8118
+ "name": "instructionId",
7982
8119
  "required": true
7983
8120
  }
7984
8121
  },
7985
- "description": "Returns an accepted conflict issue to triage, clears its resolution, and deletes the instruction the resolution created. Reopening an open or dismissed conflict returns it unchanged. Other issue types return `422` with code `issueNotResolvable`.",
8122
+ "description": "Deletes the instruction. Builds stop applying it from the next run. Entries already written under it keep their text until they are rebuilt; pass `rebuild=true` to rebuild every entry built from its documents right away.",
7986
8123
  "examples": [
7987
8124
  {
7988
- "command": "<%= config.bin %> <%= command.id %> <knowledgeBaseId> <issueId>",
7989
- "description": "Reopen an accepted conflict"
8125
+ "command": "<%= config.bin %> <%= command.id %> <knowledgeBaseId> <instructionId>",
8126
+ "description": "Delete an instruction"
7990
8127
  },
7991
8128
  {
7992
- "command": "<%= config.bin %> <%= command.id %> <knowledgeBaseId> <issueId> --json",
7993
- "description": "Reopen an accepted conflict, as JSON"
8129
+ "command": "<%= config.bin %> <%= command.id %> <knowledgeBaseId> <instructionId> --json",
8130
+ "description": "Delete an instruction, as JSON"
7994
8131
  }
7995
8132
  ],
7996
8133
  "flags": {
@@ -8000,16 +8137,29 @@
8000
8137
  "name": "json",
8001
8138
  "allowNo": false,
8002
8139
  "type": "boolean"
8140
+ },
8141
+ "rebuild": {
8142
+ "description": "Set to `true` to rebuild every entry built from the instruction's documents once it is deleted, so pages written under the instruction reflect their documents again. The response returns the rebuild job ID in `rebuildJobId`.",
8143
+ "name": "rebuild",
8144
+ "allowNo": true,
8145
+ "type": "boolean"
8146
+ },
8147
+ "yes": {
8148
+ "char": "y",
8149
+ "description": "Skip confirmation prompt (unattended mode)",
8150
+ "name": "yes",
8151
+ "allowNo": false,
8152
+ "type": "boolean"
8003
8153
  }
8004
8154
  },
8005
8155
  "hasDynamicHelp": false,
8006
8156
  "hiddenAliases": [],
8007
- "id": "context:issues:reopen",
8157
+ "id": "context:instructions:delete",
8008
8158
  "pluginAlias": "@sanity/cli",
8009
8159
  "pluginName": "@sanity/cli",
8010
8160
  "pluginType": "core",
8011
8161
  "strict": true,
8012
- "summary": "Reopen an accepted conflict",
8162
+ "summary": "Delete an instruction",
8013
8163
  "enableJsonFlag": true,
8014
8164
  "telemetry": {
8015
8165
  "redactedFlags": []
@@ -8019,11 +8169,11 @@
8019
8169
  "dist",
8020
8170
  "commands",
8021
8171
  "context",
8022
- "issues",
8023
- "reopen.js"
8172
+ "instructions",
8173
+ "delete.js"
8024
8174
  ]
8025
8175
  },
8026
- "context:issues:resolve": {
8176
+ "context:instructions:edit": {
8027
8177
  "aliases": [],
8028
8178
  "args": {
8029
8179
  "knowledgeBaseId": {
@@ -8031,21 +8181,21 @@
8031
8181
  "name": "knowledgeBaseId",
8032
8182
  "required": true
8033
8183
  },
8034
- "issueId": {
8035
- "description": "The issue's document ID.",
8036
- "name": "issueId",
8184
+ "instructionId": {
8185
+ "description": "The instruction's ID.",
8186
+ "name": "instructionId",
8037
8187
  "required": true
8038
8188
  }
8039
8189
  },
8040
- "description": "Resolves a conflict issue by choosing one of its sides. Set `resolution` to the index of a side in `content.sides`. For a conflict on a single entry, index `0` is the entry's current content, so choosing it keeps the entry as it is. Choosing any other side rewrites the entry, and the returned `jobId` tracks the rewrite. The decision becomes a standing instruction for every future build, and `resolvedBy` records who made it. To change a decision, resolve the accepted conflict again. Other issue types, dismissed conflicts, and out-of-range indexes return `422` with code `issueNotResolvable`.",
8190
+ "description": "Updates the instruction's statement or documents. The change applies from the next build. Any update also reactivates an archived instruction and ties it to the current content of its documents.",
8041
8191
  "examples": [
8042
8192
  {
8043
- "command": "<%= config.bin %> <%= command.id %> kb-abc123 issue-def456",
8044
- "description": "Choose the correct side interactively"
8193
+ "command": "<%= config.bin %> <%= command.id %> <knowledgeBaseId> <instructionId>",
8194
+ "description": "Update an instruction"
8045
8195
  },
8046
8196
  {
8047
- "command": "<%= config.bin %> <%= command.id %> kb-abc123 issue-def456 --side 1 --watch",
8048
- "description": "Choose side 1 and wait for the entry rewrite"
8197
+ "command": "<%= config.bin %> <%= command.id %> <knowledgeBaseId> <instructionId> --json",
8198
+ "description": "Update an instruction, as JSON"
8049
8199
  }
8050
8200
  ],
8051
8201
  "flags": {
@@ -8056,38 +8206,53 @@
8056
8206
  "allowNo": false,
8057
8207
  "type": "boolean"
8058
8208
  },
8059
- "watch": {
8060
- "description": "Wait for the job to finish, exiting non-zero if it fails",
8061
- "name": "watch",
8062
- "allowNo": false,
8063
- "type": "boolean"
8064
- },
8065
- "side": {
8066
- "description": "Index of the correct side, as listed by `sanity context issues get`",
8067
- "name": "side",
8209
+ "statement": {
8210
+ "description": "The new instruction text. Omit it to keep the current text.",
8211
+ "name": "statement",
8068
8212
  "hasDynamicHelp": false,
8069
8213
  "multiple": false,
8070
8214
  "type": "option"
8215
+ },
8216
+ "scope-document-ids": {
8217
+ "description": "IDs of the documents the instruction applies to. Replaces the current list. Omit it to keep the current documents. IDs of documents that no longer exist are dropped. If none exist, the request returns `422` with code `instructionScopeVanished`.",
8218
+ "name": "scope-document-ids",
8219
+ "hasDynamicHelp": false,
8220
+ "multiple": true,
8221
+ "type": "option"
8071
8222
  }
8072
8223
  },
8073
8224
  "hasDynamicHelp": false,
8074
8225
  "hiddenAliases": [],
8075
- "id": "context:issues:resolve",
8226
+ "id": "context:instructions:edit",
8076
8227
  "pluginAlias": "@sanity/cli",
8077
8228
  "pluginName": "@sanity/cli",
8078
8229
  "pluginType": "core",
8079
- "summary": "Resolve a conflict issue",
8230
+ "strict": true,
8231
+ "summary": "Update an instruction",
8080
8232
  "enableJsonFlag": true,
8081
8233
  "telemetry": {
8082
- "redactedFlags": []
8234
+ "redactedFlags": [
8235
+ {
8236
+ "canonical": "--statement",
8237
+ "flags": [
8238
+ "--statement"
8239
+ ]
8240
+ },
8241
+ {
8242
+ "canonical": "--scope-document-ids",
8243
+ "flags": [
8244
+ "--scope-document-ids"
8245
+ ]
8246
+ }
8247
+ ]
8083
8248
  },
8084
8249
  "isESM": true,
8085
8250
  "relativePath": [
8086
8251
  "dist",
8087
8252
  "commands",
8088
8253
  "context",
8089
- "issues",
8090
- "resolve.js"
8254
+ "instructions",
8255
+ "edit.js"
8091
8256
  ]
8092
8257
  },
8093
8258
  "context:mcp:create": {
@@ -9463,164 +9628,6 @@
9463
9628
  "upload.js"
9464
9629
  ]
9465
9630
  },
9466
- "context:entries:get": {
9467
- "aliases": [],
9468
- "args": {
9469
- "knowledgeBaseId": {
9470
- "description": "Knowledge base ID",
9471
- "name": "knowledgeBaseId",
9472
- "required": true
9473
- },
9474
- "path": {
9475
- "description": "Entry path, as listed by `sanity context entries list`",
9476
- "name": "path",
9477
- "required": true
9478
- }
9479
- },
9480
- "description": "Get an entry and its content",
9481
- "examples": [
9482
- {
9483
- "command": "<%= config.bin %> <%= command.id %> kb-abc123 billing/refunds",
9484
- "description": "Print an entry and its content"
9485
- },
9486
- {
9487
- "command": "<%= config.bin %> <%= command.id %> kb-abc123 billing/refunds --json",
9488
- "description": "Output the entry, including citations, as JSON"
9489
- }
9490
- ],
9491
- "flags": {
9492
- "json": {
9493
- "description": "Format output as json.",
9494
- "helpGroup": "GLOBAL",
9495
- "name": "json",
9496
- "allowNo": false,
9497
- "type": "boolean"
9498
- }
9499
- },
9500
- "hasDynamicHelp": false,
9501
- "hiddenAliases": [],
9502
- "id": "context:entries:get",
9503
- "pluginAlias": "@sanity/cli",
9504
- "pluginName": "@sanity/cli",
9505
- "pluginType": "core",
9506
- "strict": true,
9507
- "enableJsonFlag": true,
9508
- "isESM": true,
9509
- "relativePath": [
9510
- "dist",
9511
- "commands",
9512
- "context",
9513
- "entries",
9514
- "get.js"
9515
- ]
9516
- },
9517
- "context:entries:list": {
9518
- "aliases": [],
9519
- "args": {
9520
- "knowledgeBaseId": {
9521
- "description": "Knowledge base ID",
9522
- "name": "knowledgeBaseId",
9523
- "required": true
9524
- }
9525
- },
9526
- "description": "List the entries a knowledge base build produced",
9527
- "examples": [
9528
- {
9529
- "command": "<%= config.bin %> <%= command.id %> kb-abc123",
9530
- "description": "List all entries for a knowledge base"
9531
- },
9532
- {
9533
- "command": "<%= config.bin %> <%= command.id %> kb-abc123 --json",
9534
- "description": "Output entries as JSON"
9535
- }
9536
- ],
9537
- "flags": {
9538
- "json": {
9539
- "description": "Format output as json.",
9540
- "helpGroup": "GLOBAL",
9541
- "name": "json",
9542
- "allowNo": false,
9543
- "type": "boolean"
9544
- }
9545
- },
9546
- "hasDynamicHelp": false,
9547
- "hiddenAliases": [],
9548
- "id": "context:entries:list",
9549
- "pluginAlias": "@sanity/cli",
9550
- "pluginName": "@sanity/cli",
9551
- "pluginType": "core",
9552
- "strict": true,
9553
- "enableJsonFlag": true,
9554
- "isESM": true,
9555
- "relativePath": [
9556
- "dist",
9557
- "commands",
9558
- "context",
9559
- "entries",
9560
- "list.js"
9561
- ]
9562
- },
9563
- "context:entries:rebuild": {
9564
- "aliases": [],
9565
- "args": {
9566
- "knowledgeBaseId": {
9567
- "description": "The knowledge base's ID (`kb...`), its `publicId`. Its UUID `id` is also accepted.",
9568
- "name": "knowledgeBaseId",
9569
- "required": true
9570
- },
9571
- "entryPath": {
9572
- "description": "The entry's slash-delimited path, such as `pricing/plans/free`, URL-encoded.",
9573
- "name": "entryPath",
9574
- "required": true
9575
- }
9576
- },
9577
- "description": "Queues a rewrite of the entry at `entryPath` from its cited sources and the active instructions, and returns a job ID immediately. The response also lists the other entries built from any of the same sources. An instruction applies to every entry built from its sources, so those entries can change too. Returns `422` with code `entryDocumentInvalid` if the entry document was edited into a shape the API cannot read.",
9578
- "examples": [
9579
- {
9580
- "command": "<%= config.bin %> <%= command.id %> <knowledgeBaseId> <entryPath>",
9581
- "description": "Rebuild an entry from its sources"
9582
- },
9583
- {
9584
- "command": "<%= config.bin %> <%= command.id %> <knowledgeBaseId> <entryPath> --json",
9585
- "description": "Rebuild an entry from its sources, as JSON"
9586
- }
9587
- ],
9588
- "flags": {
9589
- "json": {
9590
- "description": "Format output as json.",
9591
- "helpGroup": "GLOBAL",
9592
- "name": "json",
9593
- "allowNo": false,
9594
- "type": "boolean"
9595
- },
9596
- "watch": {
9597
- "description": "Wait for the job to finish, exiting non-zero if it fails",
9598
- "name": "watch",
9599
- "allowNo": false,
9600
- "type": "boolean"
9601
- }
9602
- },
9603
- "hasDynamicHelp": false,
9604
- "hiddenAliases": [],
9605
- "id": "context:entries:rebuild",
9606
- "pluginAlias": "@sanity/cli",
9607
- "pluginName": "@sanity/cli",
9608
- "pluginType": "core",
9609
- "strict": true,
9610
- "summary": "Rebuild an entry from its sources",
9611
- "enableJsonFlag": true,
9612
- "telemetry": {
9613
- "redactedFlags": []
9614
- },
9615
- "isESM": true,
9616
- "relativePath": [
9617
- "dist",
9618
- "commands",
9619
- "context",
9620
- "entries",
9621
- "rebuild.js"
9622
- ]
9623
- },
9624
9631
  "datasets:alias:create": {
9625
9632
  "aliases": [],
9626
9633
  "args": {
@@ -10428,5 +10435,5 @@
10428
10435
  ]
10429
10436
  }
10430
10437
  },
10431
- "version": "8.35.0"
10438
+ "version": "8.37.0"
10432
10439
  }