@sanity/runtime-cli 5.0.1 → 5.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 +16 -16
- package/dist/commands/blueprints/add.js +1 -1
- package/dist/utils/validate/resource.js +5 -4
- package/oclif.manifest.json +1 -1
- 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/5.0.
|
|
23
|
+
@sanity/runtime-cli/5.0.3 linux-x64 node-v22.15.0
|
|
24
24
|
$ sanity-run --help [COMMAND]
|
|
25
25
|
USAGE
|
|
26
26
|
$ sanity-run COMMAND
|
|
@@ -78,7 +78,7 @@ EXAMPLES
|
|
|
78
78
|
$ sanity-run blueprints add function --name my-function --fn-type document-publish --lang js
|
|
79
79
|
```
|
|
80
80
|
|
|
81
|
-
_See code: [src/commands/blueprints/add.ts](https://github.com/sanity-io/runtime-cli/blob/v5.0.
|
|
81
|
+
_See code: [src/commands/blueprints/add.ts](https://github.com/sanity-io/runtime-cli/blob/v5.0.3/src/commands/blueprints/add.ts)_
|
|
82
82
|
|
|
83
83
|
## `sanity-run blueprints config`
|
|
84
84
|
|
|
@@ -106,7 +106,7 @@ EXAMPLES
|
|
|
106
106
|
$ sanity-run blueprints config --edit --project-id <projectId>
|
|
107
107
|
```
|
|
108
108
|
|
|
109
|
-
_See code: [src/commands/blueprints/config.ts](https://github.com/sanity-io/runtime-cli/blob/v5.0.
|
|
109
|
+
_See code: [src/commands/blueprints/config.ts](https://github.com/sanity-io/runtime-cli/blob/v5.0.3/src/commands/blueprints/config.ts)_
|
|
110
110
|
|
|
111
111
|
## `sanity-run blueprints deploy`
|
|
112
112
|
|
|
@@ -128,7 +128,7 @@ EXAMPLES
|
|
|
128
128
|
$ sanity-run blueprints deploy --no-wait
|
|
129
129
|
```
|
|
130
130
|
|
|
131
|
-
_See code: [src/commands/blueprints/deploy.ts](https://github.com/sanity-io/runtime-cli/blob/v5.0.
|
|
131
|
+
_See code: [src/commands/blueprints/deploy.ts](https://github.com/sanity-io/runtime-cli/blob/v5.0.3/src/commands/blueprints/deploy.ts)_
|
|
132
132
|
|
|
133
133
|
## `sanity-run blueprints destroy`
|
|
134
134
|
|
|
@@ -148,7 +148,7 @@ EXAMPLES
|
|
|
148
148
|
$ sanity-run blueprints destroy
|
|
149
149
|
```
|
|
150
150
|
|
|
151
|
-
_See code: [src/commands/blueprints/destroy.ts](https://github.com/sanity-io/runtime-cli/blob/v5.0.
|
|
151
|
+
_See code: [src/commands/blueprints/destroy.ts](https://github.com/sanity-io/runtime-cli/blob/v5.0.3/src/commands/blueprints/destroy.ts)_
|
|
152
152
|
|
|
153
153
|
## `sanity-run blueprints info`
|
|
154
154
|
|
|
@@ -165,7 +165,7 @@ EXAMPLES
|
|
|
165
165
|
$ sanity-run blueprints info
|
|
166
166
|
```
|
|
167
167
|
|
|
168
|
-
_See code: [src/commands/blueprints/info.ts](https://github.com/sanity-io/runtime-cli/blob/v5.0.
|
|
168
|
+
_See code: [src/commands/blueprints/info.ts](https://github.com/sanity-io/runtime-cli/blob/v5.0.3/src/commands/blueprints/info.ts)_
|
|
169
169
|
|
|
170
170
|
## `sanity-run blueprints init [DIR]`
|
|
171
171
|
|
|
@@ -197,7 +197,7 @@ EXAMPLES
|
|
|
197
197
|
$ sanity-run blueprints init --blueprint-type <json|js|ts> --project-id <projectId>
|
|
198
198
|
```
|
|
199
199
|
|
|
200
|
-
_See code: [src/commands/blueprints/init.ts](https://github.com/sanity-io/runtime-cli/blob/v5.0.
|
|
200
|
+
_See code: [src/commands/blueprints/init.ts](https://github.com/sanity-io/runtime-cli/blob/v5.0.3/src/commands/blueprints/init.ts)_
|
|
201
201
|
|
|
202
202
|
## `sanity-run blueprints logs`
|
|
203
203
|
|
|
@@ -219,7 +219,7 @@ EXAMPLES
|
|
|
219
219
|
$ sanity-run blueprints logs --watch
|
|
220
220
|
```
|
|
221
221
|
|
|
222
|
-
_See code: [src/commands/blueprints/logs.ts](https://github.com/sanity-io/runtime-cli/blob/v5.0.
|
|
222
|
+
_See code: [src/commands/blueprints/logs.ts](https://github.com/sanity-io/runtime-cli/blob/v5.0.3/src/commands/blueprints/logs.ts)_
|
|
223
223
|
|
|
224
224
|
## `sanity-run blueprints plan`
|
|
225
225
|
|
|
@@ -236,7 +236,7 @@ EXAMPLES
|
|
|
236
236
|
$ sanity-run blueprints plan
|
|
237
237
|
```
|
|
238
238
|
|
|
239
|
-
_See code: [src/commands/blueprints/plan.ts](https://github.com/sanity-io/runtime-cli/blob/v5.0.
|
|
239
|
+
_See code: [src/commands/blueprints/plan.ts](https://github.com/sanity-io/runtime-cli/blob/v5.0.3/src/commands/blueprints/plan.ts)_
|
|
240
240
|
|
|
241
241
|
## `sanity-run functions dev`
|
|
242
242
|
|
|
@@ -256,7 +256,7 @@ EXAMPLES
|
|
|
256
256
|
$ sanity-run functions dev --port 8974
|
|
257
257
|
```
|
|
258
258
|
|
|
259
|
-
_See code: [src/commands/functions/dev.ts](https://github.com/sanity-io/runtime-cli/blob/v5.0.
|
|
259
|
+
_See code: [src/commands/functions/dev.ts](https://github.com/sanity-io/runtime-cli/blob/v5.0.3/src/commands/functions/dev.ts)_
|
|
260
260
|
|
|
261
261
|
## `sanity-run functions env add NAME KEY VALUE`
|
|
262
262
|
|
|
@@ -278,7 +278,7 @@ EXAMPLES
|
|
|
278
278
|
$ sanity-run functions env add MyFunction API_URL https://api.example.com/
|
|
279
279
|
```
|
|
280
280
|
|
|
281
|
-
_See code: [src/commands/functions/env/add.ts](https://github.com/sanity-io/runtime-cli/blob/v5.0.
|
|
281
|
+
_See code: [src/commands/functions/env/add.ts](https://github.com/sanity-io/runtime-cli/blob/v5.0.3/src/commands/functions/env/add.ts)_
|
|
282
282
|
|
|
283
283
|
## `sanity-run functions env list NAME`
|
|
284
284
|
|
|
@@ -298,7 +298,7 @@ EXAMPLES
|
|
|
298
298
|
$ sanity-run functions env list MyFunction
|
|
299
299
|
```
|
|
300
300
|
|
|
301
|
-
_See code: [src/commands/functions/env/list.ts](https://github.com/sanity-io/runtime-cli/blob/v5.0.
|
|
301
|
+
_See code: [src/commands/functions/env/list.ts](https://github.com/sanity-io/runtime-cli/blob/v5.0.3/src/commands/functions/env/list.ts)_
|
|
302
302
|
|
|
303
303
|
## `sanity-run functions env remove NAME KEY`
|
|
304
304
|
|
|
@@ -319,7 +319,7 @@ EXAMPLES
|
|
|
319
319
|
$ sanity-run functions env remove MyFunction API_URL
|
|
320
320
|
```
|
|
321
321
|
|
|
322
|
-
_See code: [src/commands/functions/env/remove.ts](https://github.com/sanity-io/runtime-cli/blob/v5.0.
|
|
322
|
+
_See code: [src/commands/functions/env/remove.ts](https://github.com/sanity-io/runtime-cli/blob/v5.0.3/src/commands/functions/env/remove.ts)_
|
|
323
323
|
|
|
324
324
|
## `sanity-run functions invoke NAME`
|
|
325
325
|
|
|
@@ -345,7 +345,7 @@ EXAMPLES
|
|
|
345
345
|
$ sanity-run functions invoke <name> --file 'payload.json'
|
|
346
346
|
```
|
|
347
347
|
|
|
348
|
-
_See code: [src/commands/functions/invoke.ts](https://github.com/sanity-io/runtime-cli/blob/v5.0.
|
|
348
|
+
_See code: [src/commands/functions/invoke.ts](https://github.com/sanity-io/runtime-cli/blob/v5.0.3/src/commands/functions/invoke.ts)_
|
|
349
349
|
|
|
350
350
|
## `sanity-run functions logs NAME`
|
|
351
351
|
|
|
@@ -377,7 +377,7 @@ EXAMPLES
|
|
|
377
377
|
$ sanity-run functions logs <name> --delete
|
|
378
378
|
```
|
|
379
379
|
|
|
380
|
-
_See code: [src/commands/functions/logs.ts](https://github.com/sanity-io/runtime-cli/blob/v5.0.
|
|
380
|
+
_See code: [src/commands/functions/logs.ts](https://github.com/sanity-io/runtime-cli/blob/v5.0.3/src/commands/functions/logs.ts)_
|
|
381
381
|
|
|
382
382
|
## `sanity-run functions test NAME`
|
|
383
383
|
|
|
@@ -410,7 +410,7 @@ EXAMPLES
|
|
|
410
410
|
$ sanity-run functions test <name> --data '{ "id": 1 }' --timeout 60
|
|
411
411
|
```
|
|
412
412
|
|
|
413
|
-
_See code: [src/commands/functions/test.ts](https://github.com/sanity-io/runtime-cli/blob/v5.0.
|
|
413
|
+
_See code: [src/commands/functions/test.ts](https://github.com/sanity-io/runtime-cli/blob/v5.0.3/src/commands/functions/test.ts)_
|
|
414
414
|
|
|
415
415
|
## `sanity-run help [COMMAND]`
|
|
416
416
|
|
|
@@ -53,7 +53,7 @@ export default class AddCommand extends Command {
|
|
|
53
53
|
this.error('No Blueprint file found. Run `sanity-run blueprints init` first.');
|
|
54
54
|
}
|
|
55
55
|
const { name: resourceName, 'fn-type': functionType, javascript } = flags;
|
|
56
|
-
let {
|
|
56
|
+
let { language: functionLang } = flags;
|
|
57
57
|
if (javascript)
|
|
58
58
|
functionLang = 'js';
|
|
59
59
|
await this.addFunction({ name: resourceName, type: functionType, lang: functionLang });
|
|
@@ -49,10 +49,11 @@ export function validateFunctionResource(resource) {
|
|
|
49
49
|
message: `${msgPrefix} memory must be an integer`,
|
|
50
50
|
type: BlueprintParserErrorType.InvalidType,
|
|
51
51
|
});
|
|
52
|
+
// } else if (resource.memory < 1 || resource.memory > 10) {
|
|
52
53
|
}
|
|
53
|
-
else if (resource.memory <
|
|
54
|
+
else if (resource.memory < 1024 || resource.memory > 1024 * 10) {
|
|
54
55
|
errors.push({
|
|
55
|
-
message: `${msgPrefix} memory must be between
|
|
56
|
+
message: `${msgPrefix} memory must be between 1024 and 10240 (MB)`,
|
|
56
57
|
type: BlueprintParserErrorType.InvalidValue,
|
|
57
58
|
});
|
|
58
59
|
}
|
|
@@ -64,9 +65,9 @@ export function validateFunctionResource(resource) {
|
|
|
64
65
|
type: BlueprintParserErrorType.InvalidType,
|
|
65
66
|
});
|
|
66
67
|
}
|
|
67
|
-
else if (resource.timeout <
|
|
68
|
+
else if (resource.timeout < 1 || resource.timeout > 900) {
|
|
68
69
|
errors.push({
|
|
69
|
-
message: `${msgPrefix} timeout must be between
|
|
70
|
+
message: `${msgPrefix} timeout must be between 1 and 900 (seconds)`,
|
|
70
71
|
type: BlueprintParserErrorType.InvalidValue,
|
|
71
72
|
});
|
|
72
73
|
}
|
package/oclif.manifest.json
CHANGED