@sanity/cli 7.12.0 → 7.13.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 (177) hide show
  1. package/README.md +88 -0
  2. package/dist/actions/api/constants.js +13 -0
  3. package/dist/actions/api/constants.js.map +1 -0
  4. package/dist/actions/api/distillApiRoutes.js +106 -0
  5. package/dist/actions/api/distillApiRoutes.js.map +1 -0
  6. package/dist/actions/api/errors.js +18 -0
  7. package/dist/actions/api/errors.js.map +1 -0
  8. package/dist/actions/api/parseFields.js +183 -0
  9. package/dist/actions/api/parseFields.js.map +1 -0
  10. package/dist/actions/api/resolveEndpoint.js +159 -0
  11. package/dist/actions/api/resolveEndpoint.js.map +1 -0
  12. package/dist/actions/api/types.js +10 -0
  13. package/dist/actions/api/types.js.map +1 -0
  14. package/dist/actions/build/buildApp.js +4 -2
  15. package/dist/actions/build/buildApp.js.map +1 -1
  16. package/dist/actions/build/buildStudio.js +105 -14
  17. package/dist/actions/build/buildStudio.js.map +1 -1
  18. package/dist/actions/build/eventListenerFactory.js +70 -0
  19. package/dist/actions/build/eventListenerFactory.js.map +1 -0
  20. package/dist/actions/dev/servers/startStudioDevServer.js +5 -1
  21. package/dist/actions/dev/servers/startStudioDevServer.js.map +1 -1
  22. package/dist/commands/api.js +294 -0
  23. package/dist/commands/api.js.map +1 -0
  24. package/dist/commands/backups/disable.js +4 -4
  25. package/dist/commands/backups/disable.js.map +1 -1
  26. package/dist/commands/backups/download.js +7 -7
  27. package/dist/commands/backups/download.js.map +1 -1
  28. package/dist/commands/backups/enable.js +4 -4
  29. package/dist/commands/backups/enable.js.map +1 -1
  30. package/dist/commands/backups/list.js +7 -7
  31. package/dist/commands/backups/list.js.map +1 -1
  32. package/dist/commands/codemod.js +5 -5
  33. package/dist/commands/codemod.js.map +1 -1
  34. package/dist/commands/cors/add.js +1 -1
  35. package/dist/commands/cors/add.js.map +1 -1
  36. package/dist/commands/cors/delete.js +4 -4
  37. package/dist/commands/cors/delete.js.map +1 -1
  38. package/dist/commands/cors/list.js +2 -2
  39. package/dist/commands/cors/list.js.map +1 -1
  40. package/dist/commands/datasets/alias/create.js +5 -5
  41. package/dist/commands/datasets/alias/create.js.map +1 -1
  42. package/dist/commands/datasets/alias/delete.js +2 -2
  43. package/dist/commands/datasets/alias/delete.js.map +1 -1
  44. package/dist/commands/datasets/alias/link.js +5 -5
  45. package/dist/commands/datasets/alias/link.js.map +1 -1
  46. package/dist/commands/datasets/alias/unlink.js +3 -3
  47. package/dist/commands/datasets/alias/unlink.js.map +1 -1
  48. package/dist/commands/datasets/copy.js +7 -7
  49. package/dist/commands/datasets/copy.js.map +1 -1
  50. package/dist/commands/datasets/create.js +3 -3
  51. package/dist/commands/datasets/create.js.map +1 -1
  52. package/dist/commands/datasets/delete.js +2 -2
  53. package/dist/commands/datasets/delete.js.map +1 -1
  54. package/dist/commands/datasets/embeddings/disable.js +3 -3
  55. package/dist/commands/datasets/embeddings/disable.js.map +1 -1
  56. package/dist/commands/datasets/embeddings/enable.js +5 -5
  57. package/dist/commands/datasets/embeddings/enable.js.map +1 -1
  58. package/dist/commands/datasets/embeddings/status.js +3 -3
  59. package/dist/commands/datasets/embeddings/status.js.map +1 -1
  60. package/dist/commands/datasets/export.js +6 -6
  61. package/dist/commands/datasets/export.js.map +1 -1
  62. package/dist/commands/datasets/import.js +3 -3
  63. package/dist/commands/datasets/import.js.map +1 -1
  64. package/dist/commands/datasets/list.js +2 -2
  65. package/dist/commands/datasets/list.js.map +1 -1
  66. package/dist/commands/datasets/visibility/get.js +2 -2
  67. package/dist/commands/datasets/visibility/get.js.map +1 -1
  68. package/dist/commands/datasets/visibility/set.js +3 -3
  69. package/dist/commands/datasets/visibility/set.js.map +1 -1
  70. package/dist/commands/deploy.js +2 -2
  71. package/dist/commands/deploy.js.map +1 -1
  72. package/dist/commands/dev.js +2 -2
  73. package/dist/commands/dev.js.map +1 -1
  74. package/dist/commands/docs/read.js +1 -1
  75. package/dist/commands/docs/read.js.map +1 -1
  76. package/dist/commands/docs/search.js +3 -3
  77. package/dist/commands/docs/search.js.map +1 -1
  78. package/dist/commands/doctor.js +3 -3
  79. package/dist/commands/doctor.js.map +1 -1
  80. package/dist/commands/documents/create.js +3 -3
  81. package/dist/commands/documents/create.js.map +1 -1
  82. package/dist/commands/documents/delete.js +3 -3
  83. package/dist/commands/documents/delete.js.map +1 -1
  84. package/dist/commands/documents/get.js +2 -2
  85. package/dist/commands/documents/get.js.map +1 -1
  86. package/dist/commands/documents/query.js +2 -2
  87. package/dist/commands/documents/query.js.map +1 -1
  88. package/dist/commands/documents/validate.js +3 -3
  89. package/dist/commands/documents/validate.js.map +1 -1
  90. package/dist/commands/graphql/deploy.js +13 -13
  91. package/dist/commands/graphql/deploy.js.map +1 -1
  92. package/dist/commands/graphql/list.js +2 -2
  93. package/dist/commands/graphql/list.js.map +1 -1
  94. package/dist/commands/graphql/undeploy.js +2 -2
  95. package/dist/commands/graphql/undeploy.js.map +1 -1
  96. package/dist/commands/hooks/attempt.js +2 -2
  97. package/dist/commands/hooks/attempt.js.map +1 -1
  98. package/dist/commands/hooks/create.js +3 -3
  99. package/dist/commands/hooks/create.js.map +1 -1
  100. package/dist/commands/hooks/delete.js +4 -4
  101. package/dist/commands/hooks/delete.js.map +1 -1
  102. package/dist/commands/hooks/list.js +2 -2
  103. package/dist/commands/hooks/list.js.map +1 -1
  104. package/dist/commands/hooks/logs.js +5 -5
  105. package/dist/commands/hooks/logs.js.map +1 -1
  106. package/dist/commands/login.js +2 -2
  107. package/dist/commands/login.js.map +1 -1
  108. package/dist/commands/logout.js +2 -2
  109. package/dist/commands/logout.js.map +1 -1
  110. package/dist/commands/manifest/extract.js +3 -3
  111. package/dist/commands/manifest/extract.js.map +1 -1
  112. package/dist/commands/mcp/configure.js +4 -4
  113. package/dist/commands/mcp/configure.js.map +1 -1
  114. package/dist/commands/media/create-aspect.js +3 -3
  115. package/dist/commands/media/create-aspect.js.map +1 -1
  116. package/dist/commands/media/delete-aspect.js +1 -1
  117. package/dist/commands/media/delete-aspect.js.map +1 -1
  118. package/dist/commands/media/deploy-aspect.js +4 -4
  119. package/dist/commands/media/deploy-aspect.js.map +1 -1
  120. package/dist/commands/media/export.js +7 -7
  121. package/dist/commands/media/export.js.map +1 -1
  122. package/dist/commands/media/import.js +6 -6
  123. package/dist/commands/media/import.js.map +1 -1
  124. package/dist/commands/migrations/create.js +4 -4
  125. package/dist/commands/migrations/create.js.map +1 -1
  126. package/dist/commands/migrations/list.js +2 -2
  127. package/dist/commands/migrations/list.js.map +1 -1
  128. package/dist/commands/migrations/run.js +14 -14
  129. package/dist/commands/migrations/run.js.map +1 -1
  130. package/dist/commands/openapi/get.js +3 -3
  131. package/dist/commands/openapi/get.js.map +1 -1
  132. package/dist/commands/openapi/list.js +2 -2
  133. package/dist/commands/openapi/list.js.map +1 -1
  134. package/dist/commands/organizations/create.js +5 -5
  135. package/dist/commands/organizations/create.js.map +1 -1
  136. package/dist/commands/organizations/delete.js +6 -6
  137. package/dist/commands/organizations/delete.js.map +1 -1
  138. package/dist/commands/organizations/get.js +3 -3
  139. package/dist/commands/organizations/get.js.map +1 -1
  140. package/dist/commands/organizations/list.js +2 -2
  141. package/dist/commands/organizations/list.js.map +1 -1
  142. package/dist/commands/organizations/update.js +6 -6
  143. package/dist/commands/organizations/update.js.map +1 -1
  144. package/dist/commands/preview.js +2 -2
  145. package/dist/commands/preview.js.map +1 -1
  146. package/dist/commands/projects/create.js +2 -2
  147. package/dist/commands/projects/create.js.map +1 -1
  148. package/dist/commands/projects/list.js +2 -2
  149. package/dist/commands/projects/list.js.map +1 -1
  150. package/dist/commands/schemas/delete.js +2 -2
  151. package/dist/commands/schemas/delete.js.map +1 -1
  152. package/dist/commands/schemas/deploy.js +2 -2
  153. package/dist/commands/schemas/deploy.js.map +1 -1
  154. package/dist/commands/schemas/list.js +1 -1
  155. package/dist/commands/schemas/list.js.map +1 -1
  156. package/dist/commands/schemas/validate.js +2 -1
  157. package/dist/commands/schemas/validate.js.map +1 -1
  158. package/dist/commands/skills/install.js +2 -2
  159. package/dist/commands/skills/install.js.map +1 -1
  160. package/dist/commands/telemetry/disable.js +2 -2
  161. package/dist/commands/telemetry/disable.js.map +1 -1
  162. package/dist/commands/telemetry/enable.js +2 -2
  163. package/dist/commands/telemetry/enable.js.map +1 -1
  164. package/dist/commands/tokens/create.js +2 -2
  165. package/dist/commands/tokens/create.js.map +1 -1
  166. package/dist/commands/tokens/delete.js +2 -2
  167. package/dist/commands/tokens/delete.js.map +1 -1
  168. package/dist/commands/tokens/list.js +2 -2
  169. package/dist/commands/tokens/list.js.map +1 -1
  170. package/dist/commands/users/invite.js +3 -3
  171. package/dist/commands/users/invite.js.map +1 -1
  172. package/dist/generated/apiRoutes.js +401 -0
  173. package/dist/generated/apiRoutes.js.map +1 -0
  174. package/dist/services/api.js +116 -0
  175. package/dist/services/api.js.map +1 -0
  176. package/oclif.manifest.json +433 -252
  177. package/package.json +5 -3
@@ -1,5 +1,186 @@
1
1
  {
2
2
  "commands": {
3
+ "api": {
4
+ "aliases": [],
5
+ "args": {
6
+ "endpoint": {
7
+ "description": "API path (eg \"projects\" or \"data/query/{dataset}\"), optionally with placeholders, or a full https://*.api.sanity.io URL",
8
+ "name": "endpoint",
9
+ "required": true
10
+ }
11
+ },
12
+ "description": "Make an authenticated HTTP request to a Sanity API\n\nThe endpoint argument is an API path as documented in the published OpenAPI\nspecifications - list them with \"sanity openapi list\" and inspect one with\n\"sanity openapi get <slug>\". Paths can be copied verbatim from the specs:\n{projectId} and {dataset} placeholders are filled in from flags or the CLI\nconfiguration, and the API host (api.sanity.io or <projectId>.api.sanity.io)\nis chosen based on the specs' routing information.\n\nThe default request method is GET, or POST when fields or --input are\nprovided. For GET/HEAD requests, fields are sent as query parameters;\notherwise they are combined into a JSON request body sent with\n\"Content-Type: application/json\". Raw --input bodies are sent without a\ndefault Content-Type - provide one with -H when the API requires it. The\nresponse body is written to stdout.\n\nRequests are authenticated with the token from \"sanity login\". To use a\nspecific token instead - for example in CI or when the CLI is not logged in\n- pass --token or set the SANITY_AUTH_TOKEN environment variable. Pass\n--anonymous to send no token at all.",
13
+ "examples": [
14
+ {
15
+ "command": "<%= config.bin %> <%= command.id %> users/me",
16
+ "description": "Get the current user"
17
+ },
18
+ {
19
+ "command": "<%= config.bin %> <%= command.id %> projects/{projectId}",
20
+ "description": "Get the current project (placeholder filled from CLI config)"
21
+ },
22
+ {
23
+ "command": "<%= config.bin %> <%= command.id %> 'data/query/{dataset}' -f query='*[_type == \"movie\"][0..2]'",
24
+ "description": "Run a GROQ query against the project host"
25
+ },
26
+ {
27
+ "command": "<%= config.bin %> <%= command.id %> projects/{projectId} -X PATCH -F displayName=\"My project\"",
28
+ "description": "Send a JSON body built from typed fields"
29
+ },
30
+ {
31
+ "command": "echo '{\"mutations\": []}' | <%= config.bin %> <%= command.id %> 'data/mutate/{dataset}' --input - -H 'Content-Type: application/json'",
32
+ "description": "Send a raw request body from stdin"
33
+ },
34
+ {
35
+ "command": "<%= config.bin %> <%= command.id %> jobs/123 --include --api-version v2025-02-19",
36
+ "description": "Include the response status and headers, pinning the API version"
37
+ },
38
+ {
39
+ "command": "SANITY_AUTH_TOKEN=<token> <%= config.bin %> <%= command.id %> users/me",
40
+ "description": "Authenticate with a specific token instead of the logged-in session"
41
+ }
42
+ ],
43
+ "flags": {
44
+ "project-id": {
45
+ "char": "p",
46
+ "description": "Project ID for {projectId} placeholders and project-hosted APIs (overrides CLI configuration)",
47
+ "helpGroup": "OVERRIDE",
48
+ "name": "project-id",
49
+ "hasDynamicHelp": false,
50
+ "helpValue": "<id>",
51
+ "multiple": false,
52
+ "type": "option"
53
+ },
54
+ "dataset": {
55
+ "char": "d",
56
+ "description": "Dataset for {dataset} placeholders (overrides CLI configuration)",
57
+ "helpGroup": "OVERRIDE",
58
+ "name": "dataset",
59
+ "hasDynamicHelp": false,
60
+ "helpValue": "<name>",
61
+ "multiple": false,
62
+ "type": "option"
63
+ },
64
+ "anonymous": {
65
+ "description": "Send the request without an authorization token",
66
+ "name": "anonymous",
67
+ "allowNo": false,
68
+ "type": "boolean"
69
+ },
70
+ "api-version": {
71
+ "description": "API version to use (eg v2025-02-19). Defaults to a version embedded in the endpoint path, or the version from the matching OpenAPI spec",
72
+ "name": "api-version",
73
+ "hasDynamicHelp": false,
74
+ "helpValue": "<version>",
75
+ "multiple": false,
76
+ "type": "option"
77
+ },
78
+ "field": {
79
+ "char": "F",
80
+ "description": "Add a typed parameter (key=value): true/false/null and numbers are converted, @file reads the value from a file, @- from stdin",
81
+ "name": "field",
82
+ "hasDynamicHelp": false,
83
+ "helpValue": "<key=value>",
84
+ "multiple": true,
85
+ "type": "option"
86
+ },
87
+ "global": {
88
+ "description": "Force the request to the global API host (api.sanity.io)",
89
+ "exclusive": [
90
+ "project-hosted"
91
+ ],
92
+ "name": "global",
93
+ "allowNo": false,
94
+ "type": "boolean"
95
+ },
96
+ "header": {
97
+ "char": "H",
98
+ "description": "Add an HTTP request header (key: value)",
99
+ "name": "header",
100
+ "hasDynamicHelp": false,
101
+ "helpValue": "<key:value>",
102
+ "multiple": true,
103
+ "type": "option"
104
+ },
105
+ "include": {
106
+ "char": "i",
107
+ "description": "Include the HTTP response status and headers in the output",
108
+ "name": "include",
109
+ "allowNo": false,
110
+ "type": "boolean"
111
+ },
112
+ "input": {
113
+ "description": "Read the raw request body from a file (use \"-\" for stdin). Sent without a default Content-Type - provide one with -H when the API requires it",
114
+ "exclusive": [
115
+ "field",
116
+ "raw-field"
117
+ ],
118
+ "name": "input",
119
+ "hasDynamicHelp": false,
120
+ "helpValue": "<file>",
121
+ "multiple": false,
122
+ "type": "option"
123
+ },
124
+ "method": {
125
+ "char": "X",
126
+ "description": "HTTP method to use (default GET, or POST when fields or --input are provided)",
127
+ "name": "method",
128
+ "hasDynamicHelp": false,
129
+ "helpValue": "<method>",
130
+ "multiple": false,
131
+ "type": "option"
132
+ },
133
+ "pretty": {
134
+ "description": "Colorize JSON output",
135
+ "name": "pretty",
136
+ "allowNo": false,
137
+ "type": "boolean"
138
+ },
139
+ "project-hosted": {
140
+ "description": "Force the request to the project API host (<projectId>.api.sanity.io)",
141
+ "exclusive": [
142
+ "global"
143
+ ],
144
+ "name": "project-hosted",
145
+ "allowNo": false,
146
+ "type": "boolean"
147
+ },
148
+ "raw-field": {
149
+ "char": "f",
150
+ "description": "Add a string parameter (key=value)",
151
+ "name": "raw-field",
152
+ "hasDynamicHelp": false,
153
+ "helpValue": "<key=value>",
154
+ "multiple": true,
155
+ "type": "option"
156
+ },
157
+ "token": {
158
+ "char": "t",
159
+ "description": "API token to authenticate with, instead of the logged-in user token",
160
+ "exclusive": [
161
+ "anonymous"
162
+ ],
163
+ "name": "token",
164
+ "hasDynamicHelp": false,
165
+ "helpValue": "<token>",
166
+ "multiple": false,
167
+ "type": "option"
168
+ }
169
+ },
170
+ "hasDynamicHelp": false,
171
+ "hiddenAliases": [],
172
+ "id": "api",
173
+ "pluginAlias": "@sanity/cli",
174
+ "pluginName": "@sanity/cli",
175
+ "pluginType": "core",
176
+ "strict": true,
177
+ "isESM": true,
178
+ "relativePath": [
179
+ "dist",
180
+ "commands",
181
+ "api.js"
182
+ ]
183
+ },
3
184
  "build": {
4
185
  "aliases": [],
5
186
  "args": {
@@ -2728,43 +2909,98 @@
2728
2909
  "validate.js"
2729
2910
  ]
2730
2911
  },
2731
- "hooks:attempt": {
2912
+ "graphql:deploy": {
2732
2913
  "aliases": [],
2733
- "args": {
2734
- "attemptId": {
2735
- "description": "The delivery attempt ID to get details for",
2736
- "name": "attemptId",
2737
- "required": true
2738
- }
2739
- },
2740
- "description": "Print details of a given webhook delivery attempt",
2914
+ "args": {},
2915
+ "description": "Deploy a GraphQL API from the current Sanity schema",
2741
2916
  "examples": [
2742
2917
  {
2743
- "command": "<%= config.bin %> <%= command.id %> abc123",
2744
- "description": "Print details of webhook delivery attempt with ID abc123"
2918
+ "command": "<%= config.bin %> <%= command.id %>",
2919
+ "description": "Deploy all defined GraphQL APIs"
2745
2920
  },
2746
2921
  {
2747
- "command": "<%= config.bin %> <%= command.id %> abc123 --project-id projectId",
2748
- "description": "Get attempt details for a specific project"
2922
+ "command": "<%= config.bin %> <%= command.id %> --dry-run",
2923
+ "description": "Validate defined GraphQL APIs, check for breaking changes, skip deploy"
2924
+ },
2925
+ {
2926
+ "command": "<%= config.bin %> <%= command.id %> --api staging --api ios",
2927
+ "description": "Deploy only the GraphQL APIs with the IDs \"staging\" and \"ios\""
2928
+ },
2929
+ {
2930
+ "command": "<%= config.bin %> <%= command.id %> --playground",
2931
+ "description": "Deploy all defined GraphQL APIs, overriding any playground setting"
2749
2932
  }
2750
2933
  ],
2751
2934
  "flags": {
2752
- "project-id": {
2753
- "char": "p",
2754
- "description": "Project ID to view webhook attempt for (overrides CLI configuration)",
2755
- "helpGroup": "OVERRIDE",
2756
- "name": "project-id",
2935
+ "api": {
2936
+ "description": "Only deploy API with this ID (can be specified multiple times)",
2937
+ "name": "api",
2938
+ "hasDynamicHelp": false,
2939
+ "multiple": true,
2940
+ "type": "option"
2941
+ },
2942
+ "dataset": {
2943
+ "char": "d",
2944
+ "description": "Deploy API for the given dataset",
2945
+ "name": "dataset",
2946
+ "hasDynamicHelp": false,
2947
+ "helpValue": "<name>",
2948
+ "multiple": false,
2949
+ "type": "option"
2950
+ },
2951
+ "dry-run": {
2952
+ "description": "Validate defined GraphQL APIs, check for breaking changes, skip deploy",
2953
+ "name": "dry-run",
2954
+ "allowNo": false,
2955
+ "type": "boolean"
2956
+ },
2957
+ "force": {
2958
+ "description": "Deploy API without confirming breaking changes",
2959
+ "name": "force",
2960
+ "allowNo": false,
2961
+ "type": "boolean"
2962
+ },
2963
+ "generation": {
2964
+ "description": "API generation to deploy (defaults to \"gen3\")",
2965
+ "name": "generation",
2966
+ "hasDynamicHelp": false,
2967
+ "multiple": false,
2968
+ "options": [
2969
+ "gen1",
2970
+ "gen2",
2971
+ "gen3"
2972
+ ],
2973
+ "type": "option"
2974
+ },
2975
+ "non-null-document-fields": {
2976
+ "description": "Use non-null document fields (_id, _type etc)",
2977
+ "name": "non-null-document-fields",
2978
+ "allowNo": false,
2979
+ "type": "boolean"
2980
+ },
2981
+ "playground": {
2982
+ "description": "Enable GraphQL playground for easier debugging",
2983
+ "name": "playground",
2984
+ "allowNo": true,
2985
+ "type": "boolean"
2986
+ },
2987
+ "tag": {
2988
+ "description": "Deploy API(s) to given tag (defaults to \"default\")",
2989
+ "name": "tag",
2757
2990
  "hasDynamicHelp": false,
2758
- "helpValue": "<id>",
2759
2991
  "multiple": false,
2760
2992
  "type": "option"
2993
+ },
2994
+ "with-union-cache": {
2995
+ "description": "Cache union types (faster for schemas with many self-references)",
2996
+ "name": "with-union-cache",
2997
+ "allowNo": false,
2998
+ "type": "boolean"
2761
2999
  }
2762
3000
  },
2763
3001
  "hasDynamicHelp": false,
2764
- "hiddenAliases": [
2765
- "hook:attempt"
2766
- ],
2767
- "id": "hooks:attempt",
3002
+ "hiddenAliases": [],
3003
+ "id": "graphql:deploy",
2768
3004
  "pluginAlias": "@sanity/cli",
2769
3005
  "pluginName": "@sanity/cli",
2770
3006
  "pluginType": "core",
@@ -2773,28 +3009,28 @@
2773
3009
  "relativePath": [
2774
3010
  "dist",
2775
3011
  "commands",
2776
- "hooks",
2777
- "attempt.js"
3012
+ "graphql",
3013
+ "deploy.js"
2778
3014
  ]
2779
3015
  },
2780
- "hooks:create": {
3016
+ "graphql:list": {
2781
3017
  "aliases": [],
2782
3018
  "args": {},
2783
- "description": "Create a new webhook for the project",
3019
+ "description": "List deployed GraphQL endpoints for the project",
2784
3020
  "examples": [
2785
3021
  {
2786
3022
  "command": "<%= config.bin %> <%= command.id %>",
2787
- "description": "Create a new webhook for the project"
3023
+ "description": "List GraphQL endpoints for the project"
2788
3024
  },
2789
3025
  {
2790
3026
  "command": "<%= config.bin %> <%= command.id %> --project-id abc123",
2791
- "description": "Create a webhook for a specific project"
3027
+ "description": "List GraphQL endpoints for a specific project"
2792
3028
  }
2793
3029
  ],
2794
3030
  "flags": {
2795
3031
  "project-id": {
2796
3032
  "char": "p",
2797
- "description": "Project ID to create webhook for (overrides CLI configuration)",
3033
+ "description": "Project ID to list GraphQL endpoints for (overrides CLI configuration)",
2798
3034
  "helpGroup": "OVERRIDE",
2799
3035
  "name": "project-id",
2800
3036
  "hasDynamicHelp": false,
@@ -2804,10 +3040,8 @@
2804
3040
  }
2805
3041
  },
2806
3042
  "hasDynamicHelp": false,
2807
- "hiddenAliases": [
2808
- "hook:create"
2809
- ],
2810
- "id": "hooks:create",
3043
+ "hiddenAliases": [],
3044
+ "id": "graphql:list",
2811
3045
  "pluginAlias": "@sanity/cli",
2812
3046
  "pluginName": "@sanity/cli",
2813
3047
  "pluginType": "core",
@@ -2816,51 +3050,105 @@
2816
3050
  "relativePath": [
2817
3051
  "dist",
2818
3052
  "commands",
2819
- "hooks",
2820
- "create.js"
3053
+ "graphql",
3054
+ "list.js"
2821
3055
  ]
2822
3056
  },
2823
- "hooks:delete": {
3057
+ "graphql:undeploy": {
2824
3058
  "aliases": [],
2825
- "args": {
2826
- "name": {
2827
- "description": "Name of webhook to delete (will prompt if not provided)",
2828
- "name": "name",
2829
- "required": false
2830
- }
2831
- },
2832
- "description": "Delete a webhook from the project",
3059
+ "args": {},
3060
+ "description": "Remove a deployed GraphQL API",
2833
3061
  "examples": [
2834
3062
  {
2835
3063
  "command": "<%= config.bin %> <%= command.id %>",
2836
- "description": "Interactively select and delete a webhook"
3064
+ "description": "Undeploy GraphQL API for current project and dataset"
2837
3065
  },
2838
3066
  {
2839
- "command": "<%= config.bin %> <%= command.id %> my-hook",
2840
- "description": "Delete a specific webhook by name"
2841
- },
3067
+ "command": "<%= config.bin %> <%= command.id %> --api ios",
3068
+ "description": "Undeploy API with ID \"ios\""
3069
+ },
2842
3070
  {
2843
- "command": "<%= config.bin %> <%= command.id %> --project-id abc123",
2844
- "description": "Delete a webhook from a specific project"
3071
+ "command": "<%= config.bin %> <%= command.id %> --dataset staging",
3072
+ "description": "Undeploy GraphQL API for staging dataset"
3073
+ },
3074
+ {
3075
+ "command": "<%= config.bin %> <%= command.id %> --dataset staging --tag next",
3076
+ "description": "Undeploy GraphQL API for staging dataset with \"next\" tag"
3077
+ },
3078
+ {
3079
+ "command": "<%= config.bin %> <%= command.id %> --force",
3080
+ "description": "Undeploy GraphQL API without confirmation prompt"
3081
+ },
3082
+ {
3083
+ "command": "<%= config.bin %> <%= command.id %> --project-id abc123 --dataset production",
3084
+ "description": "Undeploy GraphQL API for a specific project and dataset"
2845
3085
  }
2846
3086
  ],
2847
3087
  "flags": {
2848
3088
  "project-id": {
2849
3089
  "char": "p",
2850
- "description": "Project ID to delete webhook from (overrides CLI configuration)",
3090
+ "description": "Project ID to undeploy GraphQL API from (overrides CLI configuration)",
2851
3091
  "helpGroup": "OVERRIDE",
2852
3092
  "name": "project-id",
2853
3093
  "hasDynamicHelp": false,
2854
3094
  "helpValue": "<id>",
2855
3095
  "multiple": false,
2856
3096
  "type": "option"
3097
+ },
3098
+ "api": {
3099
+ "description": "Undeploy API with this ID",
3100
+ "exclusive": [
3101
+ "project-id",
3102
+ "project"
3103
+ ],
3104
+ "name": "api",
3105
+ "required": false,
3106
+ "hasDynamicHelp": false,
3107
+ "multiple": false,
3108
+ "type": "option"
3109
+ },
3110
+ "dataset": {
3111
+ "char": "d",
3112
+ "description": "Dataset to undeploy GraphQL API from (overrides CLI configuration)",
3113
+ "helpGroup": "OVERRIDE",
3114
+ "name": "dataset",
3115
+ "hasDynamicHelp": false,
3116
+ "helpValue": "<name>",
3117
+ "multiple": false,
3118
+ "type": "option"
3119
+ },
3120
+ "force": {
3121
+ "description": "Skip confirmation prompt",
3122
+ "name": "force",
3123
+ "required": false,
3124
+ "allowNo": false,
3125
+ "type": "boolean"
3126
+ },
3127
+ "project": {
3128
+ "deprecated": {
3129
+ "to": "project-id"
3130
+ },
3131
+ "description": "Project ID to delete GraphQL API for",
3132
+ "hidden": true,
3133
+ "name": "project",
3134
+ "required": false,
3135
+ "hasDynamicHelp": false,
3136
+ "multiple": false,
3137
+ "type": "option"
3138
+ },
3139
+ "tag": {
3140
+ "description": "Tag to undeploy GraphQL API from",
3141
+ "name": "tag",
3142
+ "required": false,
3143
+ "default": "default",
3144
+ "hasDynamicHelp": false,
3145
+ "multiple": false,
3146
+ "type": "option"
2857
3147
  }
2858
3148
  },
2859
3149
  "hasDynamicHelp": false,
2860
- "hiddenAliases": [
2861
- "hook:delete"
2862
- ],
2863
- "id": "hooks:delete",
3150
+ "hiddenAliases": [],
3151
+ "id": "graphql:undeploy",
2864
3152
  "pluginAlias": "@sanity/cli",
2865
3153
  "pluginName": "@sanity/cli",
2866
3154
  "pluginType": "core",
@@ -2869,28 +3157,34 @@
2869
3157
  "relativePath": [
2870
3158
  "dist",
2871
3159
  "commands",
2872
- "hooks",
2873
- "delete.js"
3160
+ "graphql",
3161
+ "undeploy.js"
2874
3162
  ]
2875
3163
  },
2876
- "hooks:list": {
3164
+ "hooks:attempt": {
2877
3165
  "aliases": [],
2878
- "args": {},
2879
- "description": "List webhooks for the project",
3166
+ "args": {
3167
+ "attemptId": {
3168
+ "description": "The delivery attempt ID to get details for",
3169
+ "name": "attemptId",
3170
+ "required": true
3171
+ }
3172
+ },
3173
+ "description": "Print details of a given webhook delivery attempt",
2880
3174
  "examples": [
2881
3175
  {
2882
- "command": "<%= config.bin %> <%= command.id %>",
2883
- "description": "List webhooks for the project"
3176
+ "command": "<%= config.bin %> <%= command.id %> abc123",
3177
+ "description": "Print details of webhook delivery attempt with ID abc123"
2884
3178
  },
2885
3179
  {
2886
- "command": "<%= config.bin %> <%= command.id %> --project-id abc123",
2887
- "description": "List webhooks for a specific project"
3180
+ "command": "<%= config.bin %> <%= command.id %> abc123 --project-id projectId",
3181
+ "description": "Get attempt details for a specific project"
2888
3182
  }
2889
3183
  ],
2890
3184
  "flags": {
2891
3185
  "project-id": {
2892
3186
  "char": "p",
2893
- "description": "Project ID to list webhooks for (overrides CLI configuration)",
3187
+ "description": "Project ID to view webhook attempt for (overrides CLI configuration)",
2894
3188
  "helpGroup": "OVERRIDE",
2895
3189
  "name": "project-id",
2896
3190
  "hasDynamicHelp": false,
@@ -2901,9 +3195,9 @@
2901
3195
  },
2902
3196
  "hasDynamicHelp": false,
2903
3197
  "hiddenAliases": [
2904
- "hook:list"
3198
+ "hook:attempt"
2905
3199
  ],
2906
- "id": "hooks:list",
3200
+ "id": "hooks:attempt",
2907
3201
  "pluginAlias": "@sanity/cli",
2908
3202
  "pluginName": "@sanity/cli",
2909
3203
  "pluginType": "core",
@@ -2913,57 +3207,40 @@
2913
3207
  "dist",
2914
3208
  "commands",
2915
3209
  "hooks",
2916
- "list.js"
3210
+ "attempt.js"
2917
3211
  ]
2918
3212
  },
2919
- "hooks:logs": {
3213
+ "hooks:create": {
2920
3214
  "aliases": [],
2921
- "args": {
2922
- "name": {
2923
- "description": "Name of the webhook to show logs for",
2924
- "name": "name",
2925
- "required": false
2926
- }
2927
- },
2928
- "description": "Show log entries for project webhooks",
3215
+ "args": {},
3216
+ "description": "Create a new webhook for the project",
2929
3217
  "examples": [
2930
3218
  {
2931
3219
  "command": "<%= config.bin %> <%= command.id %>",
2932
- "description": "Show log entries for project webhooks"
2933
- },
2934
- {
2935
- "command": "<%= config.bin %> <%= command.id %> [NAME]",
2936
- "description": "Show log entries for a specific webhook by name"
3220
+ "description": "Create a new webhook for the project"
2937
3221
  },
2938
3222
  {
2939
3223
  "command": "<%= config.bin %> <%= command.id %> --project-id abc123",
2940
- "description": "Show log entries for a specific project"
3224
+ "description": "Create a webhook for a specific project"
2941
3225
  }
2942
3226
  ],
2943
3227
  "flags": {
2944
3228
  "project-id": {
2945
3229
  "char": "p",
2946
- "description": "Project ID to view webhook logs for (overrides CLI configuration)",
3230
+ "description": "Project ID to create webhook for (overrides CLI configuration)",
2947
3231
  "helpGroup": "OVERRIDE",
2948
3232
  "name": "project-id",
2949
3233
  "hasDynamicHelp": false,
2950
3234
  "helpValue": "<id>",
2951
3235
  "multiple": false,
2952
3236
  "type": "option"
2953
- },
2954
- "detailed": {
2955
- "description": "Include detailed payload and attempts",
2956
- "name": "detailed",
2957
- "required": false,
2958
- "allowNo": false,
2959
- "type": "boolean"
2960
3237
  }
2961
3238
  },
2962
3239
  "hasDynamicHelp": false,
2963
3240
  "hiddenAliases": [
2964
- "hook:logs"
3241
+ "hook:create"
2965
3242
  ],
2966
- "id": "hooks:logs",
3243
+ "id": "hooks:create",
2967
3244
  "pluginAlias": "@sanity/cli",
2968
3245
  "pluginName": "@sanity/cli",
2969
3246
  "pluginType": "core",
@@ -2973,101 +3250,50 @@
2973
3250
  "dist",
2974
3251
  "commands",
2975
3252
  "hooks",
2976
- "logs.js"
3253
+ "create.js"
2977
3254
  ]
2978
3255
  },
2979
- "graphql:deploy": {
3256
+ "hooks:delete": {
2980
3257
  "aliases": [],
2981
- "args": {},
2982
- "description": "Deploy a GraphQL API from the current Sanity schema",
3258
+ "args": {
3259
+ "name": {
3260
+ "description": "Name of webhook to delete (will prompt if not provided)",
3261
+ "name": "name",
3262
+ "required": false
3263
+ }
3264
+ },
3265
+ "description": "Delete a webhook from the project",
2983
3266
  "examples": [
2984
3267
  {
2985
3268
  "command": "<%= config.bin %> <%= command.id %>",
2986
- "description": "Deploy all defined GraphQL APIs"
2987
- },
2988
- {
2989
- "command": "<%= config.bin %> <%= command.id %> --dry-run",
2990
- "description": "Validate defined GraphQL APIs, check for breaking changes, skip deploy"
3269
+ "description": "Interactively select and delete a webhook"
2991
3270
  },
2992
3271
  {
2993
- "command": "<%= config.bin %> <%= command.id %> --api staging --api ios",
2994
- "description": "Deploy only the GraphQL APIs with the IDs \"staging\" and \"ios\""
3272
+ "command": "<%= config.bin %> <%= command.id %> my-hook",
3273
+ "description": "Delete a specific webhook by name"
2995
3274
  },
2996
3275
  {
2997
- "command": "<%= config.bin %> <%= command.id %> --playground",
2998
- "description": "Deploy all defined GraphQL APIs, overriding any playground setting"
3276
+ "command": "<%= config.bin %> <%= command.id %> --project-id abc123",
3277
+ "description": "Delete a webhook from a specific project"
2999
3278
  }
3000
3279
  ],
3001
3280
  "flags": {
3002
- "api": {
3003
- "description": "Only deploy API with this ID (can be specified multiple times)",
3004
- "name": "api",
3005
- "hasDynamicHelp": false,
3006
- "multiple": true,
3007
- "type": "option"
3008
- },
3009
- "dataset": {
3010
- "char": "d",
3011
- "description": "Deploy API for the given dataset",
3012
- "name": "dataset",
3013
- "hasDynamicHelp": false,
3014
- "helpValue": "<name>",
3015
- "multiple": false,
3016
- "type": "option"
3017
- },
3018
- "dry-run": {
3019
- "description": "Validate defined GraphQL APIs, check for breaking changes, skip deploy",
3020
- "name": "dry-run",
3021
- "allowNo": false,
3022
- "type": "boolean"
3023
- },
3024
- "force": {
3025
- "description": "Deploy API without confirming breaking changes",
3026
- "name": "force",
3027
- "allowNo": false,
3028
- "type": "boolean"
3029
- },
3030
- "generation": {
3031
- "description": "API generation to deploy (defaults to \"gen3\")",
3032
- "name": "generation",
3033
- "hasDynamicHelp": false,
3034
- "multiple": false,
3035
- "options": [
3036
- "gen1",
3037
- "gen2",
3038
- "gen3"
3039
- ],
3040
- "type": "option"
3041
- },
3042
- "non-null-document-fields": {
3043
- "description": "Use non-null document fields (_id, _type etc)",
3044
- "name": "non-null-document-fields",
3045
- "allowNo": false,
3046
- "type": "boolean"
3047
- },
3048
- "playground": {
3049
- "description": "Enable GraphQL playground for easier debugging",
3050
- "name": "playground",
3051
- "allowNo": true,
3052
- "type": "boolean"
3053
- },
3054
- "tag": {
3055
- "description": "Deploy API(s) to given tag (defaults to \"default\")",
3056
- "name": "tag",
3281
+ "project-id": {
3282
+ "char": "p",
3283
+ "description": "Project ID to delete webhook from (overrides CLI configuration)",
3284
+ "helpGroup": "OVERRIDE",
3285
+ "name": "project-id",
3057
3286
  "hasDynamicHelp": false,
3287
+ "helpValue": "<id>",
3058
3288
  "multiple": false,
3059
3289
  "type": "option"
3060
- },
3061
- "with-union-cache": {
3062
- "description": "Cache union types (faster for schemas with many self-references)",
3063
- "name": "with-union-cache",
3064
- "allowNo": false,
3065
- "type": "boolean"
3066
3290
  }
3067
3291
  },
3068
3292
  "hasDynamicHelp": false,
3069
- "hiddenAliases": [],
3070
- "id": "graphql:deploy",
3293
+ "hiddenAliases": [
3294
+ "hook:delete"
3295
+ ],
3296
+ "id": "hooks:delete",
3071
3297
  "pluginAlias": "@sanity/cli",
3072
3298
  "pluginName": "@sanity/cli",
3073
3299
  "pluginType": "core",
@@ -3076,28 +3302,28 @@
3076
3302
  "relativePath": [
3077
3303
  "dist",
3078
3304
  "commands",
3079
- "graphql",
3080
- "deploy.js"
3305
+ "hooks",
3306
+ "delete.js"
3081
3307
  ]
3082
3308
  },
3083
- "graphql:list": {
3309
+ "hooks:list": {
3084
3310
  "aliases": [],
3085
3311
  "args": {},
3086
- "description": "List deployed GraphQL endpoints for the project",
3312
+ "description": "List webhooks for the project",
3087
3313
  "examples": [
3088
3314
  {
3089
3315
  "command": "<%= config.bin %> <%= command.id %>",
3090
- "description": "List GraphQL endpoints for the project"
3316
+ "description": "List webhooks for the project"
3091
3317
  },
3092
3318
  {
3093
3319
  "command": "<%= config.bin %> <%= command.id %> --project-id abc123",
3094
- "description": "List GraphQL endpoints for a specific project"
3320
+ "description": "List webhooks for a specific project"
3095
3321
  }
3096
3322
  ],
3097
3323
  "flags": {
3098
3324
  "project-id": {
3099
3325
  "char": "p",
3100
- "description": "Project ID to list GraphQL endpoints for (overrides CLI configuration)",
3326
+ "description": "Project ID to list webhooks for (overrides CLI configuration)",
3101
3327
  "helpGroup": "OVERRIDE",
3102
3328
  "name": "project-id",
3103
3329
  "hasDynamicHelp": false,
@@ -3107,8 +3333,10 @@
3107
3333
  }
3108
3334
  },
3109
3335
  "hasDynamicHelp": false,
3110
- "hiddenAliases": [],
3111
- "id": "graphql:list",
3336
+ "hiddenAliases": [
3337
+ "hook:list"
3338
+ ],
3339
+ "id": "hooks:list",
3112
3340
  "pluginAlias": "@sanity/cli",
3113
3341
  "pluginName": "@sanity/cli",
3114
3342
  "pluginType": "core",
@@ -3117,44 +3345,38 @@
3117
3345
  "relativePath": [
3118
3346
  "dist",
3119
3347
  "commands",
3120
- "graphql",
3348
+ "hooks",
3121
3349
  "list.js"
3122
3350
  ]
3123
3351
  },
3124
- "graphql:undeploy": {
3352
+ "hooks:logs": {
3125
3353
  "aliases": [],
3126
- "args": {},
3127
- "description": "Remove a deployed GraphQL API",
3354
+ "args": {
3355
+ "name": {
3356
+ "description": "Name of the webhook to show logs for",
3357
+ "name": "name",
3358
+ "required": false
3359
+ }
3360
+ },
3361
+ "description": "Show log entries for project webhooks",
3128
3362
  "examples": [
3129
3363
  {
3130
3364
  "command": "<%= config.bin %> <%= command.id %>",
3131
- "description": "Undeploy GraphQL API for current project and dataset"
3132
- },
3133
- {
3134
- "command": "<%= config.bin %> <%= command.id %> --api ios",
3135
- "description": "Undeploy API with ID \"ios\""
3136
- },
3137
- {
3138
- "command": "<%= config.bin %> <%= command.id %> --dataset staging",
3139
- "description": "Undeploy GraphQL API for staging dataset"
3140
- },
3141
- {
3142
- "command": "<%= config.bin %> <%= command.id %> --dataset staging --tag next",
3143
- "description": "Undeploy GraphQL API for staging dataset with \"next\" tag"
3365
+ "description": "Show log entries for project webhooks"
3144
3366
  },
3145
3367
  {
3146
- "command": "<%= config.bin %> <%= command.id %> --force",
3147
- "description": "Undeploy GraphQL API without confirmation prompt"
3368
+ "command": "<%= config.bin %> <%= command.id %> [NAME]",
3369
+ "description": "Show log entries for a specific webhook by name"
3148
3370
  },
3149
3371
  {
3150
- "command": "<%= config.bin %> <%= command.id %> --project-id abc123 --dataset production",
3151
- "description": "Undeploy GraphQL API for a specific project and dataset"
3372
+ "command": "<%= config.bin %> <%= command.id %> --project-id abc123",
3373
+ "description": "Show log entries for a specific project"
3152
3374
  }
3153
3375
  ],
3154
3376
  "flags": {
3155
3377
  "project-id": {
3156
3378
  "char": "p",
3157
- "description": "Project ID to undeploy GraphQL API from (overrides CLI configuration)",
3379
+ "description": "Project ID to view webhook logs for (overrides CLI configuration)",
3158
3380
  "helpGroup": "OVERRIDE",
3159
3381
  "name": "project-id",
3160
3382
  "hasDynamicHelp": false,
@@ -3162,60 +3384,19 @@
3162
3384
  "multiple": false,
3163
3385
  "type": "option"
3164
3386
  },
3165
- "api": {
3166
- "description": "Undeploy API with this ID",
3167
- "exclusive": [
3168
- "project-id",
3169
- "project"
3170
- ],
3171
- "name": "api",
3172
- "required": false,
3173
- "hasDynamicHelp": false,
3174
- "multiple": false,
3175
- "type": "option"
3176
- },
3177
- "dataset": {
3178
- "char": "d",
3179
- "description": "Dataset to undeploy GraphQL API from (overrides CLI configuration)",
3180
- "helpGroup": "OVERRIDE",
3181
- "name": "dataset",
3182
- "hasDynamicHelp": false,
3183
- "helpValue": "<name>",
3184
- "multiple": false,
3185
- "type": "option"
3186
- },
3187
- "force": {
3188
- "description": "Skip confirmation prompt",
3189
- "name": "force",
3387
+ "detailed": {
3388
+ "description": "Include detailed payload and attempts",
3389
+ "name": "detailed",
3190
3390
  "required": false,
3191
3391
  "allowNo": false,
3192
3392
  "type": "boolean"
3193
- },
3194
- "project": {
3195
- "deprecated": {
3196
- "to": "project-id"
3197
- },
3198
- "description": "Project ID to delete GraphQL API for",
3199
- "hidden": true,
3200
- "name": "project",
3201
- "required": false,
3202
- "hasDynamicHelp": false,
3203
- "multiple": false,
3204
- "type": "option"
3205
- },
3206
- "tag": {
3207
- "description": "Tag to undeploy GraphQL API from",
3208
- "name": "tag",
3209
- "required": false,
3210
- "default": "default",
3211
- "hasDynamicHelp": false,
3212
- "multiple": false,
3213
- "type": "option"
3214
3393
  }
3215
3394
  },
3216
3395
  "hasDynamicHelp": false,
3217
- "hiddenAliases": [],
3218
- "id": "graphql:undeploy",
3396
+ "hiddenAliases": [
3397
+ "hook:logs"
3398
+ ],
3399
+ "id": "hooks:logs",
3219
3400
  "pluginAlias": "@sanity/cli",
3220
3401
  "pluginName": "@sanity/cli",
3221
3402
  "pluginType": "core",
@@ -3224,8 +3405,8 @@
3224
3405
  "relativePath": [
3225
3406
  "dist",
3226
3407
  "commands",
3227
- "graphql",
3228
- "undeploy.js"
3408
+ "hooks",
3409
+ "logs.js"
3229
3410
  ]
3230
3411
  },
3231
3412
  "manifest:extract": {
@@ -5649,5 +5830,5 @@
5649
5830
  ]
5650
5831
  }
5651
5832
  },
5652
- "version": "7.12.0"
5833
+ "version": "7.13.0"
5653
5834
  }