@sanity/runtime-cli 1.8.0 → 1.8.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.
- package/README.md +13 -13
- package/dist/actions/blueprints/resources.js +1 -1
- package/dist/config.js +2 -1
- package/oclif.manifest.json +25 -25
- 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/1.8.
|
|
23
|
+
@sanity/runtime-cli/1.8.1 linux-x64 node-v22.14.0
|
|
24
24
|
$ sanity-run --help [COMMAND]
|
|
25
25
|
USAGE
|
|
26
26
|
$ sanity-run COMMAND
|
|
@@ -71,7 +71,7 @@ EXAMPLES
|
|
|
71
71
|
$ sanity-run blueprints add function
|
|
72
72
|
```
|
|
73
73
|
|
|
74
|
-
_See code: [src/commands/blueprints/add.ts](https://github.com/sanity-io/runtime-cli/blob/v1.8.
|
|
74
|
+
_See code: [src/commands/blueprints/add.ts](https://github.com/sanity-io/runtime-cli/blob/v1.8.1/src/commands/blueprints/add.ts)_
|
|
75
75
|
|
|
76
76
|
## `sanity-run blueprints config`
|
|
77
77
|
|
|
@@ -93,7 +93,7 @@ EXAMPLES
|
|
|
93
93
|
$ sanity-run blueprints config --edit
|
|
94
94
|
```
|
|
95
95
|
|
|
96
|
-
_See code: [src/commands/blueprints/config.ts](https://github.com/sanity-io/runtime-cli/blob/v1.8.
|
|
96
|
+
_See code: [src/commands/blueprints/config.ts](https://github.com/sanity-io/runtime-cli/blob/v1.8.1/src/commands/blueprints/config.ts)_
|
|
97
97
|
|
|
98
98
|
## `sanity-run blueprints deploy`
|
|
99
99
|
|
|
@@ -110,7 +110,7 @@ EXAMPLES
|
|
|
110
110
|
$ sanity-run blueprints deploy
|
|
111
111
|
```
|
|
112
112
|
|
|
113
|
-
_See code: [src/commands/blueprints/deploy.ts](https://github.com/sanity-io/runtime-cli/blob/v1.8.
|
|
113
|
+
_See code: [src/commands/blueprints/deploy.ts](https://github.com/sanity-io/runtime-cli/blob/v1.8.1/src/commands/blueprints/deploy.ts)_
|
|
114
114
|
|
|
115
115
|
## `sanity-run blueprints info`
|
|
116
116
|
|
|
@@ -132,7 +132,7 @@ EXAMPLES
|
|
|
132
132
|
$ sanity-run blueprints info --id abc123
|
|
133
133
|
```
|
|
134
134
|
|
|
135
|
-
_See code: [src/commands/blueprints/info.ts](https://github.com/sanity-io/runtime-cli/blob/v1.8.
|
|
135
|
+
_See code: [src/commands/blueprints/info.ts](https://github.com/sanity-io/runtime-cli/blob/v1.8.1/src/commands/blueprints/info.ts)_
|
|
136
136
|
|
|
137
137
|
## `sanity-run blueprints init`
|
|
138
138
|
|
|
@@ -149,7 +149,7 @@ EXAMPLES
|
|
|
149
149
|
$ sanity-run blueprints init
|
|
150
150
|
```
|
|
151
151
|
|
|
152
|
-
_See code: [src/commands/blueprints/init.ts](https://github.com/sanity-io/runtime-cli/blob/v1.8.
|
|
152
|
+
_See code: [src/commands/blueprints/init.ts](https://github.com/sanity-io/runtime-cli/blob/v1.8.1/src/commands/blueprints/init.ts)_
|
|
153
153
|
|
|
154
154
|
## `sanity-run blueprints logs`
|
|
155
155
|
|
|
@@ -171,7 +171,7 @@ EXAMPLES
|
|
|
171
171
|
$ sanity-run blueprints logs --watch
|
|
172
172
|
```
|
|
173
173
|
|
|
174
|
-
_See code: [src/commands/blueprints/logs.ts](https://github.com/sanity-io/runtime-cli/blob/v1.8.
|
|
174
|
+
_See code: [src/commands/blueprints/logs.ts](https://github.com/sanity-io/runtime-cli/blob/v1.8.1/src/commands/blueprints/logs.ts)_
|
|
175
175
|
|
|
176
176
|
## `sanity-run blueprints plan`
|
|
177
177
|
|
|
@@ -188,7 +188,7 @@ EXAMPLES
|
|
|
188
188
|
$ sanity-run blueprints plan
|
|
189
189
|
```
|
|
190
190
|
|
|
191
|
-
_See code: [src/commands/blueprints/plan.ts](https://github.com/sanity-io/runtime-cli/blob/v1.8.
|
|
191
|
+
_See code: [src/commands/blueprints/plan.ts](https://github.com/sanity-io/runtime-cli/blob/v1.8.1/src/commands/blueprints/plan.ts)_
|
|
192
192
|
|
|
193
193
|
## `sanity-run blueprints stacks`
|
|
194
194
|
|
|
@@ -205,7 +205,7 @@ EXAMPLES
|
|
|
205
205
|
$ sanity-run blueprints stacks
|
|
206
206
|
```
|
|
207
207
|
|
|
208
|
-
_See code: [src/commands/blueprints/stacks.ts](https://github.com/sanity-io/runtime-cli/blob/v1.8.
|
|
208
|
+
_See code: [src/commands/blueprints/stacks.ts](https://github.com/sanity-io/runtime-cli/blob/v1.8.1/src/commands/blueprints/stacks.ts)_
|
|
209
209
|
|
|
210
210
|
## `sanity-run functions dev`
|
|
211
211
|
|
|
@@ -225,7 +225,7 @@ EXAMPLES
|
|
|
225
225
|
$ sanity-run functions dev --port 8974
|
|
226
226
|
```
|
|
227
227
|
|
|
228
|
-
_See code: [src/commands/functions/dev.ts](https://github.com/sanity-io/runtime-cli/blob/v1.8.
|
|
228
|
+
_See code: [src/commands/functions/dev.ts](https://github.com/sanity-io/runtime-cli/blob/v1.8.1/src/commands/functions/dev.ts)_
|
|
229
229
|
|
|
230
230
|
## `sanity-run functions invoke NAME`
|
|
231
231
|
|
|
@@ -251,7 +251,7 @@ EXAMPLES
|
|
|
251
251
|
$ sanity-run functions invoke <ID> --file 'payload.json'
|
|
252
252
|
```
|
|
253
253
|
|
|
254
|
-
_See code: [src/commands/functions/invoke.ts](https://github.com/sanity-io/runtime-cli/blob/v1.8.
|
|
254
|
+
_See code: [src/commands/functions/invoke.ts](https://github.com/sanity-io/runtime-cli/blob/v1.8.1/src/commands/functions/invoke.ts)_
|
|
255
255
|
|
|
256
256
|
## `sanity-run functions logs NAME`
|
|
257
257
|
|
|
@@ -271,7 +271,7 @@ EXAMPLES
|
|
|
271
271
|
$ sanity-run functions logs <ID>
|
|
272
272
|
```
|
|
273
273
|
|
|
274
|
-
_See code: [src/commands/functions/logs.ts](https://github.com/sanity-io/runtime-cli/blob/v1.8.
|
|
274
|
+
_See code: [src/commands/functions/logs.ts](https://github.com/sanity-io/runtime-cli/blob/v1.8.1/src/commands/functions/logs.ts)_
|
|
275
275
|
|
|
276
276
|
## `sanity-run functions test NAME`
|
|
277
277
|
|
|
@@ -300,7 +300,7 @@ EXAMPLES
|
|
|
300
300
|
$ sanity-run functions test echo-fn --data '{ "id": 1 }' --timeout 60
|
|
301
301
|
```
|
|
302
302
|
|
|
303
|
-
_See code: [src/commands/functions/test.ts](https://github.com/sanity-io/runtime-cli/blob/v1.8.
|
|
303
|
+
_See code: [src/commands/functions/test.ts](https://github.com/sanity-io/runtime-cli/blob/v1.8.1/src/commands/functions/test.ts)_
|
|
304
304
|
|
|
305
305
|
## `sanity-run help [COMMAND]`
|
|
306
306
|
|
|
@@ -15,7 +15,7 @@ export function createFunctionResource(options) {
|
|
|
15
15
|
}
|
|
16
16
|
// Create function file with default template
|
|
17
17
|
const functionPath = join(functionsDir, `${name}.js`);
|
|
18
|
-
const functionContent = `export
|
|
18
|
+
const functionContent = `export async function handler (event) {
|
|
19
19
|
console.log(event)
|
|
20
20
|
return {event}
|
|
21
21
|
}`;
|
package/dist/config.js
CHANGED
|
@@ -4,6 +4,7 @@ const nodeEnv = env.NODE_ENV ?? 'production';
|
|
|
4
4
|
const isTest = nodeEnv === 'test';
|
|
5
5
|
const isDev = nodeEnv === 'development';
|
|
6
6
|
const useProd = nodeEnv === 'production';
|
|
7
|
+
const isPublishing = env?.PUBLISHING === 'true';
|
|
7
8
|
const apiUrls = {
|
|
8
9
|
production: 'https://api.sanity.io/',
|
|
9
10
|
staging: 'https://api.sanity.work/',
|
|
@@ -22,7 +23,7 @@ const blueprintsUrls = {
|
|
|
22
23
|
const functionsUrl = new URL(functionsUrls[nodeEnv] ?? functionsUrls.default);
|
|
23
24
|
const blueprintsUrl = new URL(blueprintsUrls[nodeEnv] ?? blueprintsUrls.default);
|
|
24
25
|
export default {
|
|
25
|
-
token: isDev || isTest ? 'token' : getToken({ prod: useProd }),
|
|
26
|
+
token: isDev || isTest || isPublishing ? 'token' : getToken({ prod: useProd }),
|
|
26
27
|
apiUrl,
|
|
27
28
|
server: {
|
|
28
29
|
functions: functionsUrl,
|
package/oclif.manifest.json
CHANGED
|
@@ -27,10 +27,10 @@
|
|
|
27
27
|
"enableJsonFlag": false,
|
|
28
28
|
"isESM": true,
|
|
29
29
|
"relativePath": [
|
|
30
|
-
"
|
|
30
|
+
"dist",
|
|
31
31
|
"commands",
|
|
32
32
|
"blueprints",
|
|
33
|
-
"add.
|
|
33
|
+
"add.js"
|
|
34
34
|
]
|
|
35
35
|
},
|
|
36
36
|
"blueprints:config": {
|
|
@@ -59,10 +59,10 @@
|
|
|
59
59
|
"enableJsonFlag": false,
|
|
60
60
|
"isESM": true,
|
|
61
61
|
"relativePath": [
|
|
62
|
-
"
|
|
62
|
+
"dist",
|
|
63
63
|
"commands",
|
|
64
64
|
"blueprints",
|
|
65
|
-
"config.
|
|
65
|
+
"config.js"
|
|
66
66
|
]
|
|
67
67
|
},
|
|
68
68
|
"blueprints:deploy": {
|
|
@@ -83,10 +83,10 @@
|
|
|
83
83
|
"enableJsonFlag": false,
|
|
84
84
|
"isESM": true,
|
|
85
85
|
"relativePath": [
|
|
86
|
-
"
|
|
86
|
+
"dist",
|
|
87
87
|
"commands",
|
|
88
88
|
"blueprints",
|
|
89
|
-
"deploy.
|
|
89
|
+
"deploy.js"
|
|
90
90
|
]
|
|
91
91
|
},
|
|
92
92
|
"blueprints:info": {
|
|
@@ -117,10 +117,10 @@
|
|
|
117
117
|
"enableJsonFlag": false,
|
|
118
118
|
"isESM": true,
|
|
119
119
|
"relativePath": [
|
|
120
|
-
"
|
|
120
|
+
"dist",
|
|
121
121
|
"commands",
|
|
122
122
|
"blueprints",
|
|
123
|
-
"info.
|
|
123
|
+
"info.js"
|
|
124
124
|
]
|
|
125
125
|
},
|
|
126
126
|
"blueprints:init": {
|
|
@@ -141,10 +141,10 @@
|
|
|
141
141
|
"enableJsonFlag": false,
|
|
142
142
|
"isESM": true,
|
|
143
143
|
"relativePath": [
|
|
144
|
-
"
|
|
144
|
+
"dist",
|
|
145
145
|
"commands",
|
|
146
146
|
"blueprints",
|
|
147
|
-
"init.
|
|
147
|
+
"init.js"
|
|
148
148
|
]
|
|
149
149
|
},
|
|
150
150
|
"blueprints:logs": {
|
|
@@ -175,10 +175,10 @@
|
|
|
175
175
|
"enableJsonFlag": false,
|
|
176
176
|
"isESM": true,
|
|
177
177
|
"relativePath": [
|
|
178
|
-
"
|
|
178
|
+
"dist",
|
|
179
179
|
"commands",
|
|
180
180
|
"blueprints",
|
|
181
|
-
"logs.
|
|
181
|
+
"logs.js"
|
|
182
182
|
]
|
|
183
183
|
},
|
|
184
184
|
"blueprints:plan": {
|
|
@@ -199,10 +199,10 @@
|
|
|
199
199
|
"enableJsonFlag": false,
|
|
200
200
|
"isESM": true,
|
|
201
201
|
"relativePath": [
|
|
202
|
-
"
|
|
202
|
+
"dist",
|
|
203
203
|
"commands",
|
|
204
204
|
"blueprints",
|
|
205
|
-
"plan.
|
|
205
|
+
"plan.js"
|
|
206
206
|
]
|
|
207
207
|
},
|
|
208
208
|
"blueprints:stacks": {
|
|
@@ -223,10 +223,10 @@
|
|
|
223
223
|
"enableJsonFlag": false,
|
|
224
224
|
"isESM": true,
|
|
225
225
|
"relativePath": [
|
|
226
|
-
"
|
|
226
|
+
"dist",
|
|
227
227
|
"commands",
|
|
228
228
|
"blueprints",
|
|
229
|
-
"stacks.
|
|
229
|
+
"stacks.js"
|
|
230
230
|
]
|
|
231
231
|
},
|
|
232
232
|
"functions:dev": {
|
|
@@ -257,10 +257,10 @@
|
|
|
257
257
|
"enableJsonFlag": false,
|
|
258
258
|
"isESM": true,
|
|
259
259
|
"relativePath": [
|
|
260
|
-
"
|
|
260
|
+
"dist",
|
|
261
261
|
"commands",
|
|
262
262
|
"functions",
|
|
263
|
-
"dev.
|
|
263
|
+
"dev.js"
|
|
264
264
|
]
|
|
265
265
|
},
|
|
266
266
|
"functions:invoke": {
|
|
@@ -307,10 +307,10 @@
|
|
|
307
307
|
"enableJsonFlag": false,
|
|
308
308
|
"isESM": true,
|
|
309
309
|
"relativePath": [
|
|
310
|
-
"
|
|
310
|
+
"dist",
|
|
311
311
|
"commands",
|
|
312
312
|
"functions",
|
|
313
|
-
"invoke.
|
|
313
|
+
"invoke.js"
|
|
314
314
|
]
|
|
315
315
|
},
|
|
316
316
|
"functions:logs": {
|
|
@@ -337,10 +337,10 @@
|
|
|
337
337
|
"enableJsonFlag": false,
|
|
338
338
|
"isESM": true,
|
|
339
339
|
"relativePath": [
|
|
340
|
-
"
|
|
340
|
+
"dist",
|
|
341
341
|
"commands",
|
|
342
342
|
"functions",
|
|
343
|
-
"logs.
|
|
343
|
+
"logs.js"
|
|
344
344
|
]
|
|
345
345
|
},
|
|
346
346
|
"functions:test": {
|
|
@@ -397,12 +397,12 @@
|
|
|
397
397
|
"enableJsonFlag": false,
|
|
398
398
|
"isESM": true,
|
|
399
399
|
"relativePath": [
|
|
400
|
-
"
|
|
400
|
+
"dist",
|
|
401
401
|
"commands",
|
|
402
402
|
"functions",
|
|
403
|
-
"test.
|
|
403
|
+
"test.js"
|
|
404
404
|
]
|
|
405
405
|
}
|
|
406
406
|
},
|
|
407
|
-
"version": "1.8.
|
|
407
|
+
"version": "1.8.1"
|
|
408
408
|
}
|