@sanity/cli 8.3.0 → 8.4.1

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 (115) hide show
  1. package/dist/actions/build/buildApp.js +14 -7
  2. package/dist/actions/build/buildApp.js.map +1 -1
  3. package/dist/actions/build/buildStudio.js +3 -3
  4. package/dist/actions/build/buildStudio.js.map +1 -1
  5. package/dist/actions/deploy/deployApp.js +32 -25
  6. package/dist/actions/deploy/deployApp.js.map +1 -1
  7. package/dist/actions/deploy/deployStudio.js +2 -1
  8. package/dist/actions/deploy/deployStudio.js.map +1 -1
  9. package/dist/actions/deploy/deployStudioSchemasAndManifests.worker.js +2 -4
  10. package/dist/actions/deploy/deployStudioSchemasAndManifests.worker.js.map +1 -1
  11. package/dist/actions/deploy/deploymentPlan.js.map +1 -1
  12. package/dist/actions/dev/devAction.js +2 -2
  13. package/dist/actions/dev/devAction.js.map +1 -1
  14. package/dist/actions/dev/servers/getDevServerConfig.js +13 -6
  15. package/dist/actions/dev/servers/getDevServerConfig.js.map +1 -1
  16. package/dist/actions/dev/servers/startAppDevServer.js +4 -2
  17. package/dist/actions/dev/servers/startAppDevServer.js.map +1 -1
  18. package/dist/actions/graphql/gen1/generateTypeFilters.js +1 -2
  19. package/dist/actions/graphql/gen1/generateTypeFilters.js.map +1 -1
  20. package/dist/actions/graphql/resolveGraphQLApisFromWorkspaces.js +5 -2
  21. package/dist/actions/graphql/resolveGraphQLApisFromWorkspaces.js.map +1 -1
  22. package/dist/actions/init/templates/shopify.js +2 -1
  23. package/dist/actions/init/templates/shopify.js.map +1 -1
  24. package/dist/actions/manifest/extractManifest.js +5 -37
  25. package/dist/actions/manifest/extractManifest.js.map +1 -1
  26. package/dist/actions/manifest/extractStudioManifest.js +1 -1
  27. package/dist/actions/manifest/extractStudioManifest.js.map +1 -1
  28. package/dist/actions/preview/previewAction.js +1 -1
  29. package/dist/actions/preview/previewAction.js.map +1 -1
  30. package/dist/actions/schema/deleteSchemaAction.js +1 -1
  31. package/dist/actions/schema/deleteSchemaAction.js.map +1 -1
  32. package/dist/actions/schema/deploySchemas.js.map +1 -1
  33. package/dist/actions/schema/extractSanityWorkspace.worker.js +1 -1
  34. package/dist/actions/schema/extractSanityWorkspace.worker.js.map +1 -1
  35. package/dist/actions/schema/listSchemas.js +1 -1
  36. package/dist/actions/schema/listSchemas.js.map +1 -1
  37. package/dist/actions/schema/schemaTypeHelpers.js +5 -0
  38. package/dist/actions/schema/schemaTypeHelpers.js.map +1 -0
  39. package/dist/actions/schema/updateWorkspaceSchema.js +1 -1
  40. package/dist/actions/schema/updateWorkspaceSchema.js.map +1 -1
  41. package/dist/actions/schema/utils/schemaStoreValidation.js +2 -2
  42. package/dist/actions/schema/utils/schemaStoreValidation.js.map +1 -1
  43. package/dist/actions/schema/utils/workspaceSchemaId.js +1 -1
  44. package/dist/actions/schema/utils/workspaceSchemaId.js.map +1 -1
  45. package/dist/actions/versions/getFormatters.js +1 -2
  46. package/dist/actions/versions/getFormatters.js.map +1 -1
  47. package/dist/commands/documents/create.js +4 -4
  48. package/dist/commands/documents/create.js.map +1 -1
  49. package/dist/commands/hooks/logs.js +1 -2
  50. package/dist/commands/hooks/logs.js.map +1 -1
  51. package/dist/commands/projects/list.js +3 -5
  52. package/dist/commands/projects/list.js.map +1 -1
  53. package/dist/commands/undeploy.js +7 -5
  54. package/dist/commands/undeploy.js.map +1 -1
  55. package/dist/commands/users/list.js +3 -5
  56. package/dist/commands/users/list.js.map +1 -1
  57. package/dist/commands/versions.js +1 -2
  58. package/dist/commands/versions.js.map +1 -1
  59. package/dist/exports/_internal.d.ts +1 -67
  60. package/dist/exports/_internal.js +1 -1
  61. package/dist/exports/_internal.js.map +1 -1
  62. package/dist/exports/index.d.ts +2 -2
  63. package/dist/exports/index.js +2 -1
  64. package/dist/exports/index.js.map +1 -1
  65. package/dist/exports/runtime.d.ts +2 -2
  66. package/dist/exports/runtime.js +1 -1
  67. package/dist/exports/runtime.js.map +1 -1
  68. package/dist/generated/apiRoutes.js +4 -0
  69. package/dist/generated/apiRoutes.js.map +1 -1
  70. package/dist/prompts/selectMediaLibrary.js +2 -3
  71. package/dist/prompts/selectMediaLibrary.js.map +1 -1
  72. package/dist/services/mintProject.js +27 -14
  73. package/dist/services/mintProject.js.map +1 -1
  74. package/dist/services/schemas.js.map +1 -1
  75. package/dist/services/userApplications.js.map +1 -1
  76. package/dist/util/determineIsApp.js +1 -1
  77. package/dist/util/determineIsApp.js.map +1 -1
  78. package/dist/util/sortRowsByColumn.js +23 -0
  79. package/dist/util/sortRowsByColumn.js.map +1 -0
  80. package/oclif.manifest.json +253 -253
  81. package/package.json +6 -9
  82. package/dist/actions/manifest/blockTypeTransformer.js +0 -67
  83. package/dist/actions/manifest/blockTypeTransformer.js.map +0 -1
  84. package/dist/actions/manifest/extractCoreAppManifest.js +0 -111
  85. package/dist/actions/manifest/extractCoreAppManifest.js.map +0 -1
  86. package/dist/actions/manifest/extractManifest.worker.js +0 -30
  87. package/dist/actions/manifest/extractManifest.worker.js.map +0 -1
  88. package/dist/actions/manifest/extractWorkspaceManifest.js +0 -72
  89. package/dist/actions/manifest/extractWorkspaceManifest.js.map +0 -1
  90. package/dist/actions/manifest/iconResolver.js +0 -36
  91. package/dist/actions/manifest/iconResolver.js.map +0 -1
  92. package/dist/actions/manifest/purifyConfig.js +0 -307
  93. package/dist/actions/manifest/purifyConfig.js.map +0 -1
  94. package/dist/actions/manifest/referenceTransformer.js +0 -51
  95. package/dist/actions/manifest/referenceTransformer.js.map +0 -1
  96. package/dist/actions/manifest/resolveSchemaIcon.js +0 -43
  97. package/dist/actions/manifest/resolveSchemaIcon.js.map +0 -1
  98. package/dist/actions/manifest/sanitizeIcon.js +0 -13
  99. package/dist/actions/manifest/sanitizeIcon.js.map +0 -1
  100. package/dist/actions/manifest/schemaTypeHelpers.js +0 -110
  101. package/dist/actions/manifest/schemaTypeHelpers.js.map +0 -1
  102. package/dist/actions/manifest/schemaTypeTransformer.js +0 -169
  103. package/dist/actions/manifest/schemaTypeTransformer.js.map +0 -1
  104. package/dist/actions/manifest/transformerUtils.js +0 -40
  105. package/dist/actions/manifest/transformerUtils.js.map +0 -1
  106. package/dist/actions/manifest/types.js +0 -13
  107. package/dist/actions/manifest/types.js.map +0 -1
  108. package/dist/actions/manifest/validationTransformer.js +0 -84
  109. package/dist/actions/manifest/validationTransformer.js.map +0 -1
  110. package/dist/actions/manifest/writeManifestFile.js +0 -29
  111. package/dist/actions/manifest/writeManifestFile.js.map +0 -1
  112. package/dist/actions/manifest/writeWorkspaceFiles.js +0 -30
  113. package/dist/actions/manifest/writeWorkspaceFiles.js.map +0 -1
  114. package/dist/actions/schema/uploadSchemaToLexicon.js +0 -91
  115. package/dist/actions/schema/uploadSchemaToLexicon.js.map +0 -1
@@ -2621,6 +2621,258 @@
2621
2621
  "search.js"
2622
2622
  ]
2623
2623
  },
2624
+ "graphql:deploy": {
2625
+ "aliases": [],
2626
+ "args": {},
2627
+ "description": "Deploy a GraphQL API from the current Sanity schema",
2628
+ "examples": [
2629
+ {
2630
+ "command": "<%= config.bin %> <%= command.id %>",
2631
+ "description": "Deploy all defined GraphQL APIs"
2632
+ },
2633
+ {
2634
+ "command": "<%= config.bin %> <%= command.id %> --dry-run",
2635
+ "description": "Validate defined GraphQL APIs, check for breaking changes, skip deploy"
2636
+ },
2637
+ {
2638
+ "command": "<%= config.bin %> <%= command.id %> --api staging --api ios",
2639
+ "description": "Deploy only the GraphQL APIs with the IDs \"staging\" and \"ios\""
2640
+ },
2641
+ {
2642
+ "command": "<%= config.bin %> <%= command.id %> --playground",
2643
+ "description": "Deploy all defined GraphQL APIs, overriding any playground setting"
2644
+ }
2645
+ ],
2646
+ "flags": {
2647
+ "api": {
2648
+ "description": "Only deploy API with this ID (can be specified multiple times)",
2649
+ "name": "api",
2650
+ "hasDynamicHelp": false,
2651
+ "multiple": true,
2652
+ "type": "option"
2653
+ },
2654
+ "dataset": {
2655
+ "char": "d",
2656
+ "description": "Deploy API for the given dataset",
2657
+ "name": "dataset",
2658
+ "hasDynamicHelp": false,
2659
+ "helpValue": "<name>",
2660
+ "multiple": false,
2661
+ "type": "option"
2662
+ },
2663
+ "dry-run": {
2664
+ "description": "Validate defined GraphQL APIs, check for breaking changes, skip deploy",
2665
+ "name": "dry-run",
2666
+ "allowNo": false,
2667
+ "type": "boolean"
2668
+ },
2669
+ "force": {
2670
+ "description": "Deploy API without confirming breaking changes",
2671
+ "name": "force",
2672
+ "allowNo": false,
2673
+ "type": "boolean"
2674
+ },
2675
+ "generation": {
2676
+ "description": "API generation to deploy (defaults to \"gen3\")",
2677
+ "name": "generation",
2678
+ "hasDynamicHelp": false,
2679
+ "multiple": false,
2680
+ "options": [
2681
+ "gen1",
2682
+ "gen2",
2683
+ "gen3"
2684
+ ],
2685
+ "type": "option"
2686
+ },
2687
+ "non-null-document-fields": {
2688
+ "description": "Use non-null document fields (_id, _type etc)",
2689
+ "name": "non-null-document-fields",
2690
+ "allowNo": false,
2691
+ "type": "boolean"
2692
+ },
2693
+ "playground": {
2694
+ "description": "Enable GraphQL playground for easier debugging",
2695
+ "name": "playground",
2696
+ "allowNo": true,
2697
+ "type": "boolean"
2698
+ },
2699
+ "tag": {
2700
+ "description": "Deploy API(s) to given tag (defaults to \"default\")",
2701
+ "name": "tag",
2702
+ "hasDynamicHelp": false,
2703
+ "multiple": false,
2704
+ "type": "option"
2705
+ },
2706
+ "with-union-cache": {
2707
+ "description": "Cache union types (faster for schemas with many self-references)",
2708
+ "name": "with-union-cache",
2709
+ "allowNo": false,
2710
+ "type": "boolean"
2711
+ }
2712
+ },
2713
+ "hasDynamicHelp": false,
2714
+ "hiddenAliases": [],
2715
+ "id": "graphql:deploy",
2716
+ "pluginAlias": "@sanity/cli",
2717
+ "pluginName": "@sanity/cli",
2718
+ "pluginType": "core",
2719
+ "strict": true,
2720
+ "isESM": true,
2721
+ "relativePath": [
2722
+ "dist",
2723
+ "commands",
2724
+ "graphql",
2725
+ "deploy.js"
2726
+ ]
2727
+ },
2728
+ "graphql:list": {
2729
+ "aliases": [],
2730
+ "args": {},
2731
+ "description": "List deployed GraphQL endpoints for the project",
2732
+ "examples": [
2733
+ {
2734
+ "command": "<%= config.bin %> <%= command.id %>",
2735
+ "description": "List GraphQL endpoints for the project"
2736
+ },
2737
+ {
2738
+ "command": "<%= config.bin %> <%= command.id %> --project-id abc123",
2739
+ "description": "List GraphQL endpoints for a specific project"
2740
+ }
2741
+ ],
2742
+ "flags": {
2743
+ "project-id": {
2744
+ "char": "p",
2745
+ "description": "Project ID to list GraphQL endpoints for (overrides CLI configuration)",
2746
+ "helpGroup": "OVERRIDE",
2747
+ "name": "project-id",
2748
+ "hasDynamicHelp": false,
2749
+ "helpValue": "<id>",
2750
+ "multiple": false,
2751
+ "type": "option"
2752
+ }
2753
+ },
2754
+ "hasDynamicHelp": false,
2755
+ "hiddenAliases": [],
2756
+ "id": "graphql:list",
2757
+ "pluginAlias": "@sanity/cli",
2758
+ "pluginName": "@sanity/cli",
2759
+ "pluginType": "core",
2760
+ "strict": true,
2761
+ "isESM": true,
2762
+ "relativePath": [
2763
+ "dist",
2764
+ "commands",
2765
+ "graphql",
2766
+ "list.js"
2767
+ ]
2768
+ },
2769
+ "graphql:undeploy": {
2770
+ "aliases": [],
2771
+ "args": {},
2772
+ "description": "Remove a deployed GraphQL API",
2773
+ "examples": [
2774
+ {
2775
+ "command": "<%= config.bin %> <%= command.id %>",
2776
+ "description": "Undeploy GraphQL API for current project and dataset"
2777
+ },
2778
+ {
2779
+ "command": "<%= config.bin %> <%= command.id %> --api ios",
2780
+ "description": "Undeploy API with ID \"ios\""
2781
+ },
2782
+ {
2783
+ "command": "<%= config.bin %> <%= command.id %> --dataset staging",
2784
+ "description": "Undeploy GraphQL API for staging dataset"
2785
+ },
2786
+ {
2787
+ "command": "<%= config.bin %> <%= command.id %> --dataset staging --tag next",
2788
+ "description": "Undeploy GraphQL API for staging dataset with \"next\" tag"
2789
+ },
2790
+ {
2791
+ "command": "<%= config.bin %> <%= command.id %> --force",
2792
+ "description": "Undeploy GraphQL API without confirmation prompt"
2793
+ },
2794
+ {
2795
+ "command": "<%= config.bin %> <%= command.id %> --project-id abc123 --dataset production",
2796
+ "description": "Undeploy GraphQL API for a specific project and dataset"
2797
+ }
2798
+ ],
2799
+ "flags": {
2800
+ "project-id": {
2801
+ "char": "p",
2802
+ "description": "Project ID to undeploy GraphQL API from (overrides CLI configuration)",
2803
+ "helpGroup": "OVERRIDE",
2804
+ "name": "project-id",
2805
+ "hasDynamicHelp": false,
2806
+ "helpValue": "<id>",
2807
+ "multiple": false,
2808
+ "type": "option"
2809
+ },
2810
+ "api": {
2811
+ "description": "Undeploy API with this ID",
2812
+ "exclusive": [
2813
+ "project-id",
2814
+ "project"
2815
+ ],
2816
+ "name": "api",
2817
+ "required": false,
2818
+ "hasDynamicHelp": false,
2819
+ "multiple": false,
2820
+ "type": "option"
2821
+ },
2822
+ "dataset": {
2823
+ "char": "d",
2824
+ "description": "Dataset to undeploy GraphQL API from (overrides CLI configuration)",
2825
+ "helpGroup": "OVERRIDE",
2826
+ "name": "dataset",
2827
+ "hasDynamicHelp": false,
2828
+ "helpValue": "<name>",
2829
+ "multiple": false,
2830
+ "type": "option"
2831
+ },
2832
+ "force": {
2833
+ "description": "Skip confirmation prompt",
2834
+ "name": "force",
2835
+ "required": false,
2836
+ "allowNo": false,
2837
+ "type": "boolean"
2838
+ },
2839
+ "project": {
2840
+ "deprecated": {
2841
+ "to": "project-id"
2842
+ },
2843
+ "description": "Project ID to delete GraphQL API for",
2844
+ "hidden": true,
2845
+ "name": "project",
2846
+ "required": false,
2847
+ "hasDynamicHelp": false,
2848
+ "multiple": false,
2849
+ "type": "option"
2850
+ },
2851
+ "tag": {
2852
+ "description": "Tag to undeploy GraphQL API from",
2853
+ "name": "tag",
2854
+ "required": false,
2855
+ "default": "default",
2856
+ "hasDynamicHelp": false,
2857
+ "multiple": false,
2858
+ "type": "option"
2859
+ }
2860
+ },
2861
+ "hasDynamicHelp": false,
2862
+ "hiddenAliases": [],
2863
+ "id": "graphql:undeploy",
2864
+ "pluginAlias": "@sanity/cli",
2865
+ "pluginName": "@sanity/cli",
2866
+ "pluginType": "core",
2867
+ "strict": true,
2868
+ "isESM": true,
2869
+ "relativePath": [
2870
+ "dist",
2871
+ "commands",
2872
+ "graphql",
2873
+ "undeploy.js"
2874
+ ]
2875
+ },
2624
2876
  "documents:create": {
2625
2877
  "aliases": [],
2626
2878
  "args": {
@@ -3094,258 +3346,6 @@
3094
3346
  "validate.js"
3095
3347
  ]
3096
3348
  },
3097
- "graphql:deploy": {
3098
- "aliases": [],
3099
- "args": {},
3100
- "description": "Deploy a GraphQL API from the current Sanity schema",
3101
- "examples": [
3102
- {
3103
- "command": "<%= config.bin %> <%= command.id %>",
3104
- "description": "Deploy all defined GraphQL APIs"
3105
- },
3106
- {
3107
- "command": "<%= config.bin %> <%= command.id %> --dry-run",
3108
- "description": "Validate defined GraphQL APIs, check for breaking changes, skip deploy"
3109
- },
3110
- {
3111
- "command": "<%= config.bin %> <%= command.id %> --api staging --api ios",
3112
- "description": "Deploy only the GraphQL APIs with the IDs \"staging\" and \"ios\""
3113
- },
3114
- {
3115
- "command": "<%= config.bin %> <%= command.id %> --playground",
3116
- "description": "Deploy all defined GraphQL APIs, overriding any playground setting"
3117
- }
3118
- ],
3119
- "flags": {
3120
- "api": {
3121
- "description": "Only deploy API with this ID (can be specified multiple times)",
3122
- "name": "api",
3123
- "hasDynamicHelp": false,
3124
- "multiple": true,
3125
- "type": "option"
3126
- },
3127
- "dataset": {
3128
- "char": "d",
3129
- "description": "Deploy API for the given dataset",
3130
- "name": "dataset",
3131
- "hasDynamicHelp": false,
3132
- "helpValue": "<name>",
3133
- "multiple": false,
3134
- "type": "option"
3135
- },
3136
- "dry-run": {
3137
- "description": "Validate defined GraphQL APIs, check for breaking changes, skip deploy",
3138
- "name": "dry-run",
3139
- "allowNo": false,
3140
- "type": "boolean"
3141
- },
3142
- "force": {
3143
- "description": "Deploy API without confirming breaking changes",
3144
- "name": "force",
3145
- "allowNo": false,
3146
- "type": "boolean"
3147
- },
3148
- "generation": {
3149
- "description": "API generation to deploy (defaults to \"gen3\")",
3150
- "name": "generation",
3151
- "hasDynamicHelp": false,
3152
- "multiple": false,
3153
- "options": [
3154
- "gen1",
3155
- "gen2",
3156
- "gen3"
3157
- ],
3158
- "type": "option"
3159
- },
3160
- "non-null-document-fields": {
3161
- "description": "Use non-null document fields (_id, _type etc)",
3162
- "name": "non-null-document-fields",
3163
- "allowNo": false,
3164
- "type": "boolean"
3165
- },
3166
- "playground": {
3167
- "description": "Enable GraphQL playground for easier debugging",
3168
- "name": "playground",
3169
- "allowNo": true,
3170
- "type": "boolean"
3171
- },
3172
- "tag": {
3173
- "description": "Deploy API(s) to given tag (defaults to \"default\")",
3174
- "name": "tag",
3175
- "hasDynamicHelp": false,
3176
- "multiple": false,
3177
- "type": "option"
3178
- },
3179
- "with-union-cache": {
3180
- "description": "Cache union types (faster for schemas with many self-references)",
3181
- "name": "with-union-cache",
3182
- "allowNo": false,
3183
- "type": "boolean"
3184
- }
3185
- },
3186
- "hasDynamicHelp": false,
3187
- "hiddenAliases": [],
3188
- "id": "graphql:deploy",
3189
- "pluginAlias": "@sanity/cli",
3190
- "pluginName": "@sanity/cli",
3191
- "pluginType": "core",
3192
- "strict": true,
3193
- "isESM": true,
3194
- "relativePath": [
3195
- "dist",
3196
- "commands",
3197
- "graphql",
3198
- "deploy.js"
3199
- ]
3200
- },
3201
- "graphql:list": {
3202
- "aliases": [],
3203
- "args": {},
3204
- "description": "List deployed GraphQL endpoints for the project",
3205
- "examples": [
3206
- {
3207
- "command": "<%= config.bin %> <%= command.id %>",
3208
- "description": "List GraphQL endpoints for the project"
3209
- },
3210
- {
3211
- "command": "<%= config.bin %> <%= command.id %> --project-id abc123",
3212
- "description": "List GraphQL endpoints for a specific project"
3213
- }
3214
- ],
3215
- "flags": {
3216
- "project-id": {
3217
- "char": "p",
3218
- "description": "Project ID to list GraphQL endpoints for (overrides CLI configuration)",
3219
- "helpGroup": "OVERRIDE",
3220
- "name": "project-id",
3221
- "hasDynamicHelp": false,
3222
- "helpValue": "<id>",
3223
- "multiple": false,
3224
- "type": "option"
3225
- }
3226
- },
3227
- "hasDynamicHelp": false,
3228
- "hiddenAliases": [],
3229
- "id": "graphql:list",
3230
- "pluginAlias": "@sanity/cli",
3231
- "pluginName": "@sanity/cli",
3232
- "pluginType": "core",
3233
- "strict": true,
3234
- "isESM": true,
3235
- "relativePath": [
3236
- "dist",
3237
- "commands",
3238
- "graphql",
3239
- "list.js"
3240
- ]
3241
- },
3242
- "graphql:undeploy": {
3243
- "aliases": [],
3244
- "args": {},
3245
- "description": "Remove a deployed GraphQL API",
3246
- "examples": [
3247
- {
3248
- "command": "<%= config.bin %> <%= command.id %>",
3249
- "description": "Undeploy GraphQL API for current project and dataset"
3250
- },
3251
- {
3252
- "command": "<%= config.bin %> <%= command.id %> --api ios",
3253
- "description": "Undeploy API with ID \"ios\""
3254
- },
3255
- {
3256
- "command": "<%= config.bin %> <%= command.id %> --dataset staging",
3257
- "description": "Undeploy GraphQL API for staging dataset"
3258
- },
3259
- {
3260
- "command": "<%= config.bin %> <%= command.id %> --dataset staging --tag next",
3261
- "description": "Undeploy GraphQL API for staging dataset with \"next\" tag"
3262
- },
3263
- {
3264
- "command": "<%= config.bin %> <%= command.id %> --force",
3265
- "description": "Undeploy GraphQL API without confirmation prompt"
3266
- },
3267
- {
3268
- "command": "<%= config.bin %> <%= command.id %> --project-id abc123 --dataset production",
3269
- "description": "Undeploy GraphQL API for a specific project and dataset"
3270
- }
3271
- ],
3272
- "flags": {
3273
- "project-id": {
3274
- "char": "p",
3275
- "description": "Project ID to undeploy GraphQL API from (overrides CLI configuration)",
3276
- "helpGroup": "OVERRIDE",
3277
- "name": "project-id",
3278
- "hasDynamicHelp": false,
3279
- "helpValue": "<id>",
3280
- "multiple": false,
3281
- "type": "option"
3282
- },
3283
- "api": {
3284
- "description": "Undeploy API with this ID",
3285
- "exclusive": [
3286
- "project-id",
3287
- "project"
3288
- ],
3289
- "name": "api",
3290
- "required": false,
3291
- "hasDynamicHelp": false,
3292
- "multiple": false,
3293
- "type": "option"
3294
- },
3295
- "dataset": {
3296
- "char": "d",
3297
- "description": "Dataset to undeploy GraphQL API from (overrides CLI configuration)",
3298
- "helpGroup": "OVERRIDE",
3299
- "name": "dataset",
3300
- "hasDynamicHelp": false,
3301
- "helpValue": "<name>",
3302
- "multiple": false,
3303
- "type": "option"
3304
- },
3305
- "force": {
3306
- "description": "Skip confirmation prompt",
3307
- "name": "force",
3308
- "required": false,
3309
- "allowNo": false,
3310
- "type": "boolean"
3311
- },
3312
- "project": {
3313
- "deprecated": {
3314
- "to": "project-id"
3315
- },
3316
- "description": "Project ID to delete GraphQL API for",
3317
- "hidden": true,
3318
- "name": "project",
3319
- "required": false,
3320
- "hasDynamicHelp": false,
3321
- "multiple": false,
3322
- "type": "option"
3323
- },
3324
- "tag": {
3325
- "description": "Tag to undeploy GraphQL API from",
3326
- "name": "tag",
3327
- "required": false,
3328
- "default": "default",
3329
- "hasDynamicHelp": false,
3330
- "multiple": false,
3331
- "type": "option"
3332
- }
3333
- },
3334
- "hasDynamicHelp": false,
3335
- "hiddenAliases": [],
3336
- "id": "graphql:undeploy",
3337
- "pluginAlias": "@sanity/cli",
3338
- "pluginName": "@sanity/cli",
3339
- "pluginType": "core",
3340
- "strict": true,
3341
- "isESM": true,
3342
- "relativePath": [
3343
- "dist",
3344
- "commands",
3345
- "graphql",
3346
- "undeploy.js"
3347
- ]
3348
- },
3349
3349
  "hooks:attempt": {
3350
3350
  "aliases": [],
3351
3351
  "args": {
@@ -6161,5 +6161,5 @@
6161
6161
  ]
6162
6162
  }
6163
6163
  },
6164
- "version": "8.3.0"
6164
+ "version": "8.4.1"
6165
6165
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sanity/cli",
3
- "version": "8.3.0",
3
+ "version": "8.4.1",
4
4
  "description": "Sanity CLI tool for managing Sanity projects and organizations",
5
5
  "keywords": [
6
6
  "cli",
@@ -87,7 +87,6 @@
87
87
  "gunzip-maybe": "^1.4.2",
88
88
  "import-meta-resolve": "^4.2.0",
89
89
  "is-installed-globally": "^1.0.0",
90
- "isomorphic-dompurify": "^2.36.0",
91
90
  "json5": "^2.2.3",
92
91
  "jsonc-parser": "^3.3.1",
93
92
  "lodash-es": "^4.18.1",
@@ -102,7 +101,7 @@
102
101
  "pretty-ms": "^9.3.0",
103
102
  "promise-props-recursive": "^2.0.2",
104
103
  "react": "^19.2.7",
105
- "react-is": "^19.2.7",
104
+ "react-dom": "^19.2.7",
106
105
  "rxjs": "^7.8.2",
107
106
  "semver": "^7.8.1",
108
107
  "skills": "^1.5.9",
@@ -120,14 +119,13 @@
120
119
  "wrap-ansi": "^9.0.2",
121
120
  "yaml": "^2.9.0",
122
121
  "zod": "^4.4.3",
123
- "@sanity/cli-build": "^5.3.1",
124
- "@sanity/cli-core": "^3.3.0",
125
- "@sanity/workbench-cli": "^2.1.0"
122
+ "@sanity/cli-build": "^6.0.0",
123
+ "@sanity/cli-core": "^3.4.0",
124
+ "@sanity/workbench-cli": "^2.2.1"
126
125
  },
127
126
  "devDependencies": {
128
127
  "@eslint/compat": "^2.1.0",
129
128
  "@sanity/pkg-utils": "^12.2.0",
130
- "@sanity/ui": "^3.5.0",
131
129
  "@swc/cli": "^0.8.1",
132
130
  "@swc/core": "^1.15.43",
133
131
  "@types/gunzip-maybe": "^1.4.3",
@@ -138,7 +136,6 @@
138
136
  "@types/picomatch": "^4.0.3",
139
137
  "@types/react": "^19.2.17",
140
138
  "@types/react-dom": "^19.2.3",
141
- "@types/react-is": "^19.2.0",
142
139
  "@types/semver": "^7.7.1",
143
140
  "@types/tar-fs": "^2.0.4",
144
141
  "@types/tar-stream": "^3.1.4",
@@ -158,7 +155,7 @@
158
155
  "vitest": "^4.1.11",
159
156
  "@repo/package.config": "0.0.1",
160
157
  "@repo/tsconfig": "3.70.0",
161
- "@sanity/cli-test": "13.0.0",
158
+ "@sanity/cli-test": "14.0.0",
162
159
  "@sanity/eslint-config-cli": "1.1.3"
163
160
  },
164
161
  "peerDependencies": {
@@ -1,67 +0,0 @@
1
- import { isRecord, isString, isType } from './schemaTypeHelpers.js';
2
- import { ensureString } from './transformerUtils.js';
3
- /**
4
- * Transforms a block schema type (Portable Text) to its manifest representation
5
- */ export function transformBlockType(blockType, context, transformType) {
6
- if (blockType.jsonType !== 'object' || !isType(blockType, 'block')) {
7
- return {};
8
- }
9
- const childrenField = blockType.fields?.find((field)=>field.name === 'children');
10
- if (!childrenField) {
11
- return {};
12
- }
13
- const ofType = childrenField.type.of;
14
- if (!ofType) {
15
- return {};
16
- }
17
- const spanType = ofType.find((memberType)=>memberType.name === 'span');
18
- if (!spanType) {
19
- return {};
20
- }
21
- const inlineObjectTypes = ofType.filter((memberType)=>memberType.name !== 'span') || [];
22
- return {
23
- lists: resolveEnabledListItems(blockType),
24
- marks: {
25
- annotations: spanType.annotations.map((t)=>transformType(t, context)),
26
- decorators: resolveEnabledDecorators(spanType)
27
- },
28
- of: inlineObjectTypes.map((t)=>transformType(t, context)),
29
- styles: resolveEnabledStyles(blockType)
30
- };
31
- }
32
- /**
33
- * Resolves enabled styles from a block type
34
- */ function resolveEnabledStyles(blockType) {
35
- const styleField = blockType.fields?.find((btField)=>btField.name === 'style');
36
- return resolveTitleValueArray(styleField?.type?.options?.list);
37
- }
38
- /**
39
- * Resolves enabled decorators from a span type
40
- */ function resolveEnabledDecorators(spanType) {
41
- return 'decorators' in spanType ? resolveTitleValueArray(spanType.decorators) : undefined;
42
- }
43
- /**
44
- * Resolves enabled list items from a block type
45
- */ function resolveEnabledListItems(blockType) {
46
- const listField = blockType.fields?.find((btField)=>btField.name === 'listItem');
47
- return resolveTitleValueArray(listField?.type?.options?.list);
48
- }
49
- /**
50
- * Resolves an array of title/value objects
51
- */ function resolveTitleValueArray(possibleArray) {
52
- if (!possibleArray || !Array.isArray(possibleArray)) {
53
- return undefined;
54
- }
55
- const titledValues = possibleArray.filter((d)=>isRecord(d) && !!d.value && isString(d.value)).map((item)=>{
56
- return {
57
- value: item.value,
58
- ...ensureString('title', item.title)
59
- };
60
- });
61
- if (!titledValues?.length) {
62
- return undefined;
63
- }
64
- return titledValues;
65
- }
66
-
67
- //# sourceMappingURL=blockTypeTransformer.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../src/actions/manifest/blockTypeTransformer.ts"],"sourcesContent":["import {\n type ArraySchemaType,\n type ObjectSchemaType,\n type SchemaType,\n type SpanSchemaType,\n} from '@sanity/types'\n\nimport {isRecord, isString, isType} from './schemaTypeHelpers.js'\nimport {type Context, ensureString} from './transformerUtils.js'\nimport {type ManifestSchemaType, type ManifestTitledValue} from './types.js'\n\ntype TransformTypeFn = (type: SchemaType, context: Context) => ManifestSchemaType\n\n/**\n * Transforms a block schema type (Portable Text) to its manifest representation\n */\nexport function transformBlockType(\n blockType: SchemaType,\n context: Context,\n transformType: TransformTypeFn,\n): Pick<ManifestSchemaType, 'lists' | 'marks' | 'of' | 'styles'> | Record<string, never> {\n if (blockType.jsonType !== 'object' || !isType(blockType, 'block')) {\n return {}\n }\n\n const childrenField = blockType.fields?.find((field) => field.name === 'children') as\n | {type: ArraySchemaType}\n | undefined\n\n if (!childrenField) {\n return {}\n }\n const ofType = childrenField.type.of\n if (!ofType) {\n return {}\n }\n const spanType = ofType.find((memberType) => memberType.name === 'span') as\n | ObjectSchemaType\n | undefined\n if (!spanType) {\n return {}\n }\n const inlineObjectTypes = (ofType.filter((memberType) => memberType.name !== 'span') ||\n []) as ObjectSchemaType[]\n\n return {\n lists: resolveEnabledListItems(blockType),\n marks: {\n annotations: (spanType as SpanSchemaType).annotations.map((t) => transformType(t, context)),\n decorators: resolveEnabledDecorators(spanType),\n },\n of: inlineObjectTypes.map((t) => transformType(t, context)),\n styles: resolveEnabledStyles(blockType),\n }\n}\n\n/**\n * Resolves enabled styles from a block type\n */\nfunction resolveEnabledStyles(blockType: ObjectSchemaType): ManifestTitledValue[] | undefined {\n const styleField = blockType.fields?.find((btField) => btField.name === 'style')\n return resolveTitleValueArray(styleField?.type?.options?.list)\n}\n\n/**\n * Resolves enabled decorators from a span type\n */\nfunction resolveEnabledDecorators(spanType: ObjectSchemaType): ManifestTitledValue[] | undefined {\n return 'decorators' in spanType ? resolveTitleValueArray(spanType.decorators) : undefined\n}\n\n/**\n * Resolves enabled list items from a block type\n */\nfunction resolveEnabledListItems(blockType: ObjectSchemaType): ManifestTitledValue[] | undefined {\n const listField = blockType.fields?.find((btField) => btField.name === 'listItem')\n return resolveTitleValueArray(listField?.type?.options?.list)\n}\n\n/**\n * Resolves an array of title/value objects\n */\nfunction resolveTitleValueArray(possibleArray: unknown): ManifestTitledValue[] | undefined {\n if (!possibleArray || !Array.isArray(possibleArray)) {\n return undefined\n }\n const titledValues = possibleArray\n .filter(\n (d): d is {title?: string; value: string} => isRecord(d) && !!d.value && isString(d.value),\n )\n .map((item) => {\n return {\n value: item.value,\n ...ensureString('title', item.title),\n } satisfies ManifestTitledValue\n })\n if (!titledValues?.length) {\n return undefined\n }\n\n return titledValues\n}\n"],"names":["isRecord","isString","isType","ensureString","transformBlockType","blockType","context","transformType","jsonType","childrenField","fields","find","field","name","ofType","type","of","spanType","memberType","inlineObjectTypes","filter","lists","resolveEnabledListItems","marks","annotations","map","t","decorators","resolveEnabledDecorators","styles","resolveEnabledStyles","styleField","btField","resolveTitleValueArray","options","list","undefined","listField","possibleArray","Array","isArray","titledValues","d","value","item","title","length"],"mappings":"AAOA,SAAQA,QAAQ,EAAEC,QAAQ,EAAEC,MAAM,QAAO,yBAAwB;AACjE,SAAsBC,YAAY,QAAO,wBAAuB;AAKhE;;CAEC,GACD,OAAO,SAASC,mBACdC,SAAqB,EACrBC,OAAgB,EAChBC,aAA8B;IAE9B,IAAIF,UAAUG,QAAQ,KAAK,YAAY,CAACN,OAAOG,WAAW,UAAU;QAClE,OAAO,CAAC;IACV;IAEA,MAAMI,gBAAgBJ,UAAUK,MAAM,EAAEC,KAAK,CAACC,QAAUA,MAAMC,IAAI,KAAK;IAIvE,IAAI,CAACJ,eAAe;QAClB,OAAO,CAAC;IACV;IACA,MAAMK,SAASL,cAAcM,IAAI,CAACC,EAAE;IACpC,IAAI,CAACF,QAAQ;QACX,OAAO,CAAC;IACV;IACA,MAAMG,WAAWH,OAAOH,IAAI,CAAC,CAACO,aAAeA,WAAWL,IAAI,KAAK;IAGjE,IAAI,CAACI,UAAU;QACb,OAAO,CAAC;IACV;IACA,MAAME,oBAAqBL,OAAOM,MAAM,CAAC,CAACF,aAAeA,WAAWL,IAAI,KAAK,WAC3E,EAAE;IAEJ,OAAO;QACLQ,OAAOC,wBAAwBjB;QAC/BkB,OAAO;YACLC,aAAa,AAACP,SAA4BO,WAAW,CAACC,GAAG,CAAC,CAACC,IAAMnB,cAAcmB,GAAGpB;YAClFqB,YAAYC,yBAAyBX;QACvC;QACAD,IAAIG,kBAAkBM,GAAG,CAAC,CAACC,IAAMnB,cAAcmB,GAAGpB;QAClDuB,QAAQC,qBAAqBzB;IAC/B;AACF;AAEA;;CAEC,GACD,SAASyB,qBAAqBzB,SAA2B;IACvD,MAAM0B,aAAa1B,UAAUK,MAAM,EAAEC,KAAK,CAACqB,UAAYA,QAAQnB,IAAI,KAAK;IACxE,OAAOoB,uBAAuBF,YAAYhB,MAAMmB,SAASC;AAC3D;AAEA;;CAEC,GACD,SAASP,yBAAyBX,QAA0B;IAC1D,OAAO,gBAAgBA,WAAWgB,uBAAuBhB,SAASU,UAAU,IAAIS;AAClF;AAEA;;CAEC,GACD,SAASd,wBAAwBjB,SAA2B;IAC1D,MAAMgC,YAAYhC,UAAUK,MAAM,EAAEC,KAAK,CAACqB,UAAYA,QAAQnB,IAAI,KAAK;IACvE,OAAOoB,uBAAuBI,WAAWtB,MAAMmB,SAASC;AAC1D;AAEA;;CAEC,GACD,SAASF,uBAAuBK,aAAsB;IACpD,IAAI,CAACA,iBAAiB,CAACC,MAAMC,OAAO,CAACF,gBAAgB;QACnD,OAAOF;IACT;IACA,MAAMK,eAAeH,cAClBlB,MAAM,CACL,CAACsB,IAA4C1C,SAAS0C,MAAM,CAAC,CAACA,EAAEC,KAAK,IAAI1C,SAASyC,EAAEC,KAAK,GAE1FlB,GAAG,CAAC,CAACmB;QACJ,OAAO;YACLD,OAAOC,KAAKD,KAAK;YACjB,GAAGxC,aAAa,SAASyC,KAAKC,KAAK,CAAC;QACtC;IACF;IACF,IAAI,CAACJ,cAAcK,QAAQ;QACzB,OAAOV;IACT;IAEA,OAAOK;AACT"}