@sanity/runtime-cli 8.0.2 → 8.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -20,7 +20,7 @@ $ npm install -g @sanity/runtime-cli
20
20
  $ sanity-run COMMAND
21
21
  running command...
22
22
  $ sanity-run (--version)
23
- @sanity/runtime-cli/8.0.2 linux-x64 node-v22.16.0
23
+ @sanity/runtime-cli/8.0.3 linux-x64 node-v22.16.0
24
24
  $ sanity-run --help [COMMAND]
25
25
  USAGE
26
26
  $ sanity-run COMMAND
@@ -85,7 +85,7 @@ EXAMPLES
85
85
  $ sanity-run blueprints add function --name my-function --fn-type document-publish --lang js
86
86
  ```
87
87
 
88
- _See code: [src/commands/blueprints/add.ts](https://github.com/sanity-io/runtime-cli/blob/v8.0.2/src/commands/blueprints/add.ts)_
88
+ _See code: [src/commands/blueprints/add.ts](https://github.com/sanity-io/runtime-cli/blob/v8.0.3/src/commands/blueprints/add.ts)_
89
89
 
90
90
  ## `sanity-run blueprints config`
91
91
 
@@ -116,7 +116,7 @@ EXAMPLES
116
116
  $ sanity-run blueprints config --edit --project-id <projectId> --stack-id <stackId>
117
117
  ```
118
118
 
119
- _See code: [src/commands/blueprints/config.ts](https://github.com/sanity-io/runtime-cli/blob/v8.0.2/src/commands/blueprints/config.ts)_
119
+ _See code: [src/commands/blueprints/config.ts](https://github.com/sanity-io/runtime-cli/blob/v8.0.3/src/commands/blueprints/config.ts)_
120
120
 
121
121
  ## `sanity-run blueprints deploy`
122
122
 
@@ -138,7 +138,7 @@ EXAMPLES
138
138
  $ sanity-run blueprints deploy --no-wait
139
139
  ```
140
140
 
141
- _See code: [src/commands/blueprints/deploy.ts](https://github.com/sanity-io/runtime-cli/blob/v8.0.2/src/commands/blueprints/deploy.ts)_
141
+ _See code: [src/commands/blueprints/deploy.ts](https://github.com/sanity-io/runtime-cli/blob/v8.0.3/src/commands/blueprints/deploy.ts)_
142
142
 
143
143
  ## `sanity-run blueprints destroy`
144
144
 
@@ -163,7 +163,7 @@ EXAMPLES
163
163
  $ sanity-run blueprints destroy --stack-id <stackId> --project-id <projectId> --force --no-wait
164
164
  ```
165
165
 
166
- _See code: [src/commands/blueprints/destroy.ts](https://github.com/sanity-io/runtime-cli/blob/v8.0.2/src/commands/blueprints/destroy.ts)_
166
+ _See code: [src/commands/blueprints/destroy.ts](https://github.com/sanity-io/runtime-cli/blob/v8.0.3/src/commands/blueprints/destroy.ts)_
167
167
 
168
168
  ## `sanity-run blueprints info`
169
169
 
@@ -185,7 +185,7 @@ EXAMPLES
185
185
  $ sanity-run blueprints info --stack-id <stackId>
186
186
  ```
187
187
 
188
- _See code: [src/commands/blueprints/info.ts](https://github.com/sanity-io/runtime-cli/blob/v8.0.2/src/commands/blueprints/info.ts)_
188
+ _See code: [src/commands/blueprints/info.ts](https://github.com/sanity-io/runtime-cli/blob/v8.0.3/src/commands/blueprints/info.ts)_
189
189
 
190
190
  ## `sanity-run blueprints init [DIR]`
191
191
 
@@ -222,7 +222,7 @@ EXAMPLES
222
222
  $ sanity-run blueprints init --blueprint-type <json|js|ts> --stack-name <stackName>
223
223
  ```
224
224
 
225
- _See code: [src/commands/blueprints/init.ts](https://github.com/sanity-io/runtime-cli/blob/v8.0.2/src/commands/blueprints/init.ts)_
225
+ _See code: [src/commands/blueprints/init.ts](https://github.com/sanity-io/runtime-cli/blob/v8.0.3/src/commands/blueprints/init.ts)_
226
226
 
227
227
  ## `sanity-run blueprints logs`
228
228
 
@@ -244,7 +244,7 @@ EXAMPLES
244
244
  $ sanity-run blueprints logs --watch
245
245
  ```
246
246
 
247
- _See code: [src/commands/blueprints/logs.ts](https://github.com/sanity-io/runtime-cli/blob/v8.0.2/src/commands/blueprints/logs.ts)_
247
+ _See code: [src/commands/blueprints/logs.ts](https://github.com/sanity-io/runtime-cli/blob/v8.0.3/src/commands/blueprints/logs.ts)_
248
248
 
249
249
  ## `sanity-run blueprints plan`
250
250
 
@@ -261,7 +261,7 @@ EXAMPLES
261
261
  $ sanity-run blueprints plan
262
262
  ```
263
263
 
264
- _See code: [src/commands/blueprints/plan.ts](https://github.com/sanity-io/runtime-cli/blob/v8.0.2/src/commands/blueprints/plan.ts)_
264
+ _See code: [src/commands/blueprints/plan.ts](https://github.com/sanity-io/runtime-cli/blob/v8.0.3/src/commands/blueprints/plan.ts)_
265
265
 
266
266
  ## `sanity-run blueprints stacks`
267
267
 
@@ -283,7 +283,7 @@ EXAMPLES
283
283
  $ sanity-run blueprints stacks --project-id <projectId>
284
284
  ```
285
285
 
286
- _See code: [src/commands/blueprints/stacks.ts](https://github.com/sanity-io/runtime-cli/blob/v8.0.2/src/commands/blueprints/stacks.ts)_
286
+ _See code: [src/commands/blueprints/stacks.ts](https://github.com/sanity-io/runtime-cli/blob/v8.0.3/src/commands/blueprints/stacks.ts)_
287
287
 
288
288
  ## `sanity-run functions dev`
289
289
 
@@ -303,7 +303,7 @@ EXAMPLES
303
303
  $ sanity-run functions dev --port 8974
304
304
  ```
305
305
 
306
- _See code: [src/commands/functions/dev.ts](https://github.com/sanity-io/runtime-cli/blob/v8.0.2/src/commands/functions/dev.ts)_
306
+ _See code: [src/commands/functions/dev.ts](https://github.com/sanity-io/runtime-cli/blob/v8.0.3/src/commands/functions/dev.ts)_
307
307
 
308
308
  ## `sanity-run functions env add NAME KEY VALUE`
309
309
 
@@ -325,7 +325,7 @@ EXAMPLES
325
325
  $ sanity-run functions env add MyFunction API_URL https://api.example.com/
326
326
  ```
327
327
 
328
- _See code: [src/commands/functions/env/add.ts](https://github.com/sanity-io/runtime-cli/blob/v8.0.2/src/commands/functions/env/add.ts)_
328
+ _See code: [src/commands/functions/env/add.ts](https://github.com/sanity-io/runtime-cli/blob/v8.0.3/src/commands/functions/env/add.ts)_
329
329
 
330
330
  ## `sanity-run functions env list NAME`
331
331
 
@@ -345,7 +345,7 @@ EXAMPLES
345
345
  $ sanity-run functions env list MyFunction
346
346
  ```
347
347
 
348
- _See code: [src/commands/functions/env/list.ts](https://github.com/sanity-io/runtime-cli/blob/v8.0.2/src/commands/functions/env/list.ts)_
348
+ _See code: [src/commands/functions/env/list.ts](https://github.com/sanity-io/runtime-cli/blob/v8.0.3/src/commands/functions/env/list.ts)_
349
349
 
350
350
  ## `sanity-run functions env remove NAME KEY`
351
351
 
@@ -366,7 +366,7 @@ EXAMPLES
366
366
  $ sanity-run functions env remove MyFunction API_URL
367
367
  ```
368
368
 
369
- _See code: [src/commands/functions/env/remove.ts](https://github.com/sanity-io/runtime-cli/blob/v8.0.2/src/commands/functions/env/remove.ts)_
369
+ _See code: [src/commands/functions/env/remove.ts](https://github.com/sanity-io/runtime-cli/blob/v8.0.3/src/commands/functions/env/remove.ts)_
370
370
 
371
371
  ## `sanity-run functions logs NAME`
372
372
 
@@ -400,7 +400,7 @@ EXAMPLES
400
400
  $ sanity-run functions logs <name> --delete
401
401
  ```
402
402
 
403
- _See code: [src/commands/functions/logs.ts](https://github.com/sanity-io/runtime-cli/blob/v8.0.2/src/commands/functions/logs.ts)_
403
+ _See code: [src/commands/functions/logs.ts](https://github.com/sanity-io/runtime-cli/blob/v8.0.3/src/commands/functions/logs.ts)_
404
404
 
405
405
  ## `sanity-run functions test NAME`
406
406
 
@@ -433,7 +433,7 @@ EXAMPLES
433
433
  $ sanity-run functions test <name> --data '{ "id": 1 }' --timeout 60
434
434
  ```
435
435
 
436
- _See code: [src/commands/functions/test.ts](https://github.com/sanity-io/runtime-cli/blob/v8.0.2/src/commands/functions/test.ts)_
436
+ _See code: [src/commands/functions/test.ts](https://github.com/sanity-io/runtime-cli/blob/v8.0.3/src/commands/functions/test.ts)_
437
437
 
438
438
  ## `sanity-run help [COMMAND]`
439
439
 
@@ -113,7 +113,7 @@ export default async function invoke(resource, data, context, options) {
113
113
  }
114
114
  else {
115
115
  resolve({
116
- json: {},
116
+ json: undefined,
117
117
  logs: '',
118
118
  error: undefined,
119
119
  timings: {
@@ -128,7 +128,7 @@ export default async function invoke(resource, data, context, options) {
128
128
  reject(new Error(`Timed out after hitting its ${timeout}s timeout!`));
129
129
  }, timeout * 1000);
130
130
  const payload = {
131
- ...filteredData,
131
+ data: { ...filteredData },
132
132
  context: {
133
133
  ...context,
134
134
  clientOptions: {
@@ -141,11 +141,15 @@ export interface InvokeExecutionOptions {
141
141
  /** @internal */
142
142
  export interface InvocationResponse {
143
143
  error: undefined | unknown;
144
- json: Record<string, unknown> | undefined;
144
+ json: JsonInvocationResponse | undefined;
145
145
  logs: string | undefined;
146
146
  timings?: Record<string, number>;
147
147
  }
148
148
  /** @internal */
149
+ export interface JsonInvocationResponse {
150
+ data: Record<string, unknown> | undefined;
151
+ }
152
+ /** @internal */
149
153
  export interface BlueprintLog {
150
154
  timestamp: string;
151
155
  message: string;
@@ -838,5 +838,5 @@
838
838
  ]
839
839
  }
840
840
  },
841
- "version": "8.0.2"
841
+ "version": "8.0.3"
842
842
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@sanity/runtime-cli",
3
3
  "description": "Sanity's Runtime CLI for Blueprints and Functions",
4
- "version": "8.0.2",
4
+ "version": "8.0.3",
5
5
  "author": "Sanity Runtime Team",
6
6
  "type": "module",
7
7
  "license": "MIT",