@sanity/runtime-cli 10.6.2 → 10.6.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 +18 -16
- package/dist/commands/functions/test.js +2 -1
- package/oclif.manifest.json +3 -2
- package/package.json +1 -1
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/10.6.
|
|
23
|
+
@sanity/runtime-cli/10.6.3 linux-x64 node-v22.19.0
|
|
24
24
|
$ sanity-run --help [COMMAND]
|
|
25
25
|
USAGE
|
|
26
26
|
$ sanity-run COMMAND
|
|
@@ -88,7 +88,7 @@ EXAMPLES
|
|
|
88
88
|
$ sanity-run blueprints add function --name my-function --fn-type document-create --fn-type document-update --lang js
|
|
89
89
|
```
|
|
90
90
|
|
|
91
|
-
_See code: [src/commands/blueprints/add.ts](https://github.com/sanity-io/runtime-cli/blob/v10.6.
|
|
91
|
+
_See code: [src/commands/blueprints/add.ts](https://github.com/sanity-io/runtime-cli/blob/v10.6.3/src/commands/blueprints/add.ts)_
|
|
92
92
|
|
|
93
93
|
## `sanity-run blueprints config`
|
|
94
94
|
|
|
@@ -119,7 +119,7 @@ EXAMPLES
|
|
|
119
119
|
$ sanity-run blueprints config --edit --project-id <projectId> --stack-id <stackId>
|
|
120
120
|
```
|
|
121
121
|
|
|
122
|
-
_See code: [src/commands/blueprints/config.ts](https://github.com/sanity-io/runtime-cli/blob/v10.6.
|
|
122
|
+
_See code: [src/commands/blueprints/config.ts](https://github.com/sanity-io/runtime-cli/blob/v10.6.3/src/commands/blueprints/config.ts)_
|
|
123
123
|
|
|
124
124
|
## `sanity-run blueprints deploy`
|
|
125
125
|
|
|
@@ -141,7 +141,7 @@ EXAMPLES
|
|
|
141
141
|
$ sanity-run blueprints deploy --no-wait
|
|
142
142
|
```
|
|
143
143
|
|
|
144
|
-
_See code: [src/commands/blueprints/deploy.ts](https://github.com/sanity-io/runtime-cli/blob/v10.6.
|
|
144
|
+
_See code: [src/commands/blueprints/deploy.ts](https://github.com/sanity-io/runtime-cli/blob/v10.6.3/src/commands/blueprints/deploy.ts)_
|
|
145
145
|
|
|
146
146
|
## `sanity-run blueprints destroy`
|
|
147
147
|
|
|
@@ -166,7 +166,7 @@ EXAMPLES
|
|
|
166
166
|
$ sanity-run blueprints destroy --stack-id <stackId> --project-id <projectId> --force --no-wait
|
|
167
167
|
```
|
|
168
168
|
|
|
169
|
-
_See code: [src/commands/blueprints/destroy.ts](https://github.com/sanity-io/runtime-cli/blob/v10.6.
|
|
169
|
+
_See code: [src/commands/blueprints/destroy.ts](https://github.com/sanity-io/runtime-cli/blob/v10.6.3/src/commands/blueprints/destroy.ts)_
|
|
170
170
|
|
|
171
171
|
## `sanity-run blueprints info`
|
|
172
172
|
|
|
@@ -188,7 +188,7 @@ EXAMPLES
|
|
|
188
188
|
$ sanity-run blueprints info --stack-id <stackId>
|
|
189
189
|
```
|
|
190
190
|
|
|
191
|
-
_See code: [src/commands/blueprints/info.ts](https://github.com/sanity-io/runtime-cli/blob/v10.6.
|
|
191
|
+
_See code: [src/commands/blueprints/info.ts](https://github.com/sanity-io/runtime-cli/blob/v10.6.3/src/commands/blueprints/info.ts)_
|
|
192
192
|
|
|
193
193
|
## `sanity-run blueprints init [DIR]`
|
|
194
194
|
|
|
@@ -226,7 +226,7 @@ EXAMPLES
|
|
|
226
226
|
$ sanity-run blueprints init --blueprint-type <json|js|ts> --stack-name <stackName>
|
|
227
227
|
```
|
|
228
228
|
|
|
229
|
-
_See code: [src/commands/blueprints/init.ts](https://github.com/sanity-io/runtime-cli/blob/v10.6.
|
|
229
|
+
_See code: [src/commands/blueprints/init.ts](https://github.com/sanity-io/runtime-cli/blob/v10.6.3/src/commands/blueprints/init.ts)_
|
|
230
230
|
|
|
231
231
|
## `sanity-run blueprints logs`
|
|
232
232
|
|
|
@@ -248,7 +248,7 @@ EXAMPLES
|
|
|
248
248
|
$ sanity-run blueprints logs --watch
|
|
249
249
|
```
|
|
250
250
|
|
|
251
|
-
_See code: [src/commands/blueprints/logs.ts](https://github.com/sanity-io/runtime-cli/blob/v10.6.
|
|
251
|
+
_See code: [src/commands/blueprints/logs.ts](https://github.com/sanity-io/runtime-cli/blob/v10.6.3/src/commands/blueprints/logs.ts)_
|
|
252
252
|
|
|
253
253
|
## `sanity-run blueprints plan`
|
|
254
254
|
|
|
@@ -265,7 +265,7 @@ EXAMPLES
|
|
|
265
265
|
$ sanity-run blueprints plan
|
|
266
266
|
```
|
|
267
267
|
|
|
268
|
-
_See code: [src/commands/blueprints/plan.ts](https://github.com/sanity-io/runtime-cli/blob/v10.6.
|
|
268
|
+
_See code: [src/commands/blueprints/plan.ts](https://github.com/sanity-io/runtime-cli/blob/v10.6.3/src/commands/blueprints/plan.ts)_
|
|
269
269
|
|
|
270
270
|
## `sanity-run blueprints stacks`
|
|
271
271
|
|
|
@@ -287,7 +287,7 @@ EXAMPLES
|
|
|
287
287
|
$ sanity-run blueprints stacks --project-id <projectId>
|
|
288
288
|
```
|
|
289
289
|
|
|
290
|
-
_See code: [src/commands/blueprints/stacks.ts](https://github.com/sanity-io/runtime-cli/blob/v10.6.
|
|
290
|
+
_See code: [src/commands/blueprints/stacks.ts](https://github.com/sanity-io/runtime-cli/blob/v10.6.3/src/commands/blueprints/stacks.ts)_
|
|
291
291
|
|
|
292
292
|
## `sanity-run functions dev`
|
|
293
293
|
|
|
@@ -307,7 +307,7 @@ EXAMPLES
|
|
|
307
307
|
$ sanity-run functions dev --port 8974
|
|
308
308
|
```
|
|
309
309
|
|
|
310
|
-
_See code: [src/commands/functions/dev.ts](https://github.com/sanity-io/runtime-cli/blob/v10.6.
|
|
310
|
+
_See code: [src/commands/functions/dev.ts](https://github.com/sanity-io/runtime-cli/blob/v10.6.3/src/commands/functions/dev.ts)_
|
|
311
311
|
|
|
312
312
|
## `sanity-run functions env add NAME KEY VALUE`
|
|
313
313
|
|
|
@@ -329,7 +329,7 @@ EXAMPLES
|
|
|
329
329
|
$ sanity-run functions env add MyFunction API_URL https://api.example.com/
|
|
330
330
|
```
|
|
331
331
|
|
|
332
|
-
_See code: [src/commands/functions/env/add.ts](https://github.com/sanity-io/runtime-cli/blob/v10.6.
|
|
332
|
+
_See code: [src/commands/functions/env/add.ts](https://github.com/sanity-io/runtime-cli/blob/v10.6.3/src/commands/functions/env/add.ts)_
|
|
333
333
|
|
|
334
334
|
## `sanity-run functions env list NAME`
|
|
335
335
|
|
|
@@ -349,7 +349,7 @@ EXAMPLES
|
|
|
349
349
|
$ sanity-run functions env list MyFunction
|
|
350
350
|
```
|
|
351
351
|
|
|
352
|
-
_See code: [src/commands/functions/env/list.ts](https://github.com/sanity-io/runtime-cli/blob/v10.6.
|
|
352
|
+
_See code: [src/commands/functions/env/list.ts](https://github.com/sanity-io/runtime-cli/blob/v10.6.3/src/commands/functions/env/list.ts)_
|
|
353
353
|
|
|
354
354
|
## `sanity-run functions env remove NAME KEY`
|
|
355
355
|
|
|
@@ -370,7 +370,7 @@ EXAMPLES
|
|
|
370
370
|
$ sanity-run functions env remove MyFunction API_URL
|
|
371
371
|
```
|
|
372
372
|
|
|
373
|
-
_See code: [src/commands/functions/env/remove.ts](https://github.com/sanity-io/runtime-cli/blob/v10.6.
|
|
373
|
+
_See code: [src/commands/functions/env/remove.ts](https://github.com/sanity-io/runtime-cli/blob/v10.6.3/src/commands/functions/env/remove.ts)_
|
|
374
374
|
|
|
375
375
|
## `sanity-run functions logs NAME`
|
|
376
376
|
|
|
@@ -404,7 +404,7 @@ EXAMPLES
|
|
|
404
404
|
$ sanity-run functions logs <name> --delete
|
|
405
405
|
```
|
|
406
406
|
|
|
407
|
-
_See code: [src/commands/functions/logs.ts](https://github.com/sanity-io/runtime-cli/blob/v10.6.
|
|
407
|
+
_See code: [src/commands/functions/logs.ts](https://github.com/sanity-io/runtime-cli/blob/v10.6.3/src/commands/functions/logs.ts)_
|
|
408
408
|
|
|
409
409
|
## `sanity-run functions test NAME`
|
|
410
410
|
|
|
@@ -447,9 +447,11 @@ EXAMPLES
|
|
|
447
447
|
$ sanity-run functions test <name> --file 'payload.json'
|
|
448
448
|
|
|
449
449
|
$ sanity-run functions test <name> --data '{ "id": 1 }' --timeout 60
|
|
450
|
+
|
|
451
|
+
$ sanity-run functions test <name> --event update --data-before '{ "title": "before" }' --data-after '{ "title": "after" }'
|
|
450
452
|
```
|
|
451
453
|
|
|
452
|
-
_See code: [src/commands/functions/test.ts](https://github.com/sanity-io/runtime-cli/blob/v10.6.
|
|
454
|
+
_See code: [src/commands/functions/test.ts](https://github.com/sanity-io/runtime-cli/blob/v10.6.3/src/commands/functions/test.ts)_
|
|
453
455
|
|
|
454
456
|
## `sanity-run help [COMMAND]`
|
|
455
457
|
|
|
@@ -10,6 +10,7 @@ export default class TestCommand extends BlueprintCommand {
|
|
|
10
10
|
`<%= config.bin %> <%= command.id %> <name> --data '{ "id": 1 }'`,
|
|
11
11
|
`<%= config.bin %> <%= command.id %> <name> --file 'payload.json'`,
|
|
12
12
|
`<%= config.bin %> <%= command.id %> <name> --data '{ "id": 1 }' --timeout 60`,
|
|
13
|
+
`<%= config.bin %> <%= command.id %> <name> --event update --data-before '{ "title": "before" }' --data-after '{ "title": "after" }'`,
|
|
13
14
|
];
|
|
14
15
|
static flags = {
|
|
15
16
|
data: Flags.string({
|
|
@@ -141,7 +142,7 @@ export default class TestCommand extends BlueprintCommand {
|
|
|
141
142
|
async run() {
|
|
142
143
|
if (this.flags.event === 'update') {
|
|
143
144
|
const hasDataPair = this.flags['data-before'] && this.flags['data-after'];
|
|
144
|
-
const hasFilePair = this.flags['file-before'] && this.flags['file-
|
|
145
|
+
const hasFilePair = this.flags['file-before'] && this.flags['file-after'];
|
|
145
146
|
const hasDocPair = this.flags['document-id-before'] && this.flags['document-id-after'];
|
|
146
147
|
if (!(hasDataPair || hasFilePair || hasDocPair)) {
|
|
147
148
|
this.error('When using --event=update, you must provide one of the following flag pairs:\n' +
|
package/oclif.manifest.json
CHANGED
|
@@ -696,7 +696,8 @@
|
|
|
696
696
|
"examples": [
|
|
697
697
|
"<%= config.bin %> <%= command.id %> <name> --data '{ \"id\": 1 }'",
|
|
698
698
|
"<%= config.bin %> <%= command.id %> <name> --file 'payload.json'",
|
|
699
|
-
"<%= config.bin %> <%= command.id %> <name> --data '{ \"id\": 1 }' --timeout 60"
|
|
699
|
+
"<%= config.bin %> <%= command.id %> <name> --data '{ \"id\": 1 }' --timeout 60",
|
|
700
|
+
"<%= config.bin %> <%= command.id %> <name> --event update --data-before '{ \"title\": \"before\" }' --data-after '{ \"title\": \"after\" }'"
|
|
700
701
|
],
|
|
701
702
|
"flags": {
|
|
702
703
|
"data": {
|
|
@@ -1023,5 +1024,5 @@
|
|
|
1023
1024
|
]
|
|
1024
1025
|
}
|
|
1025
1026
|
},
|
|
1026
|
-
"version": "10.6.
|
|
1027
|
+
"version": "10.6.3"
|
|
1027
1028
|
}
|