@sanity/runtime-cli 10.1.3 → 10.1.4
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/actions/blueprints/blueprint.js +3 -3
- package/dist/actions/blueprints/logs.js +1 -1
- package/dist/actions/functions/logs.js +1 -1
- package/dist/actions/sanity/examples.js +2 -2
- package/dist/cores/blueprints/add.js +1 -1
- package/dist/cores/blueprints/config.js +2 -2
- package/dist/cores/blueprints/destroy.js +1 -1
- package/dist/cores/blueprints/init.js +1 -1
- package/dist/cores/blueprints/logs.js +1 -2
- package/dist/cores/functions/logs.js +3 -3
- package/dist/server/app.js +3 -4
- package/dist/server/static/components/app.css +5 -5
- package/dist/server/static/components/codemirror-theme.js +1 -1
- package/dist/server/static/components/response-panel.js +1 -1
- package/dist/server/static/vendor/vendor.bundle.js +2 -1
- package/dist/utils/child-process-wrapper.js +1 -1
- package/dist/utils/display/blueprints-logs-streaming.js +1 -1
- package/dist/utils/get-headers.js +1 -1
- package/dist/utils/invoke-local.js +1 -1
- package/dist/utils/other/npmjs.js +1 -1
- package/oclif.manifest.json +1 -1
- package/package.json +10 -10
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.1.
|
|
23
|
+
@sanity/runtime-cli/10.1.4 linux-x64 node-v22.18.0
|
|
24
24
|
$ sanity-run --help [COMMAND]
|
|
25
25
|
USAGE
|
|
26
26
|
$ sanity-run COMMAND
|
|
@@ -86,7 +86,7 @@ EXAMPLES
|
|
|
86
86
|
$ sanity-run blueprints add function --name my-function --fn-type document-publish --lang js
|
|
87
87
|
```
|
|
88
88
|
|
|
89
|
-
_See code: [src/commands/blueprints/add.ts](https://github.com/sanity-io/runtime-cli/blob/v10.1.
|
|
89
|
+
_See code: [src/commands/blueprints/add.ts](https://github.com/sanity-io/runtime-cli/blob/v10.1.4/src/commands/blueprints/add.ts)_
|
|
90
90
|
|
|
91
91
|
## `sanity-run blueprints config`
|
|
92
92
|
|
|
@@ -117,7 +117,7 @@ EXAMPLES
|
|
|
117
117
|
$ sanity-run blueprints config --edit --project-id <projectId> --stack-id <stackId>
|
|
118
118
|
```
|
|
119
119
|
|
|
120
|
-
_See code: [src/commands/blueprints/config.ts](https://github.com/sanity-io/runtime-cli/blob/v10.1.
|
|
120
|
+
_See code: [src/commands/blueprints/config.ts](https://github.com/sanity-io/runtime-cli/blob/v10.1.4/src/commands/blueprints/config.ts)_
|
|
121
121
|
|
|
122
122
|
## `sanity-run blueprints deploy`
|
|
123
123
|
|
|
@@ -139,7 +139,7 @@ EXAMPLES
|
|
|
139
139
|
$ sanity-run blueprints deploy --no-wait
|
|
140
140
|
```
|
|
141
141
|
|
|
142
|
-
_See code: [src/commands/blueprints/deploy.ts](https://github.com/sanity-io/runtime-cli/blob/v10.1.
|
|
142
|
+
_See code: [src/commands/blueprints/deploy.ts](https://github.com/sanity-io/runtime-cli/blob/v10.1.4/src/commands/blueprints/deploy.ts)_
|
|
143
143
|
|
|
144
144
|
## `sanity-run blueprints destroy`
|
|
145
145
|
|
|
@@ -164,7 +164,7 @@ EXAMPLES
|
|
|
164
164
|
$ sanity-run blueprints destroy --stack-id <stackId> --project-id <projectId> --force --no-wait
|
|
165
165
|
```
|
|
166
166
|
|
|
167
|
-
_See code: [src/commands/blueprints/destroy.ts](https://github.com/sanity-io/runtime-cli/blob/v10.1.
|
|
167
|
+
_See code: [src/commands/blueprints/destroy.ts](https://github.com/sanity-io/runtime-cli/blob/v10.1.4/src/commands/blueprints/destroy.ts)_
|
|
168
168
|
|
|
169
169
|
## `sanity-run blueprints info`
|
|
170
170
|
|
|
@@ -186,7 +186,7 @@ EXAMPLES
|
|
|
186
186
|
$ sanity-run blueprints info --stack-id <stackId>
|
|
187
187
|
```
|
|
188
188
|
|
|
189
|
-
_See code: [src/commands/blueprints/info.ts](https://github.com/sanity-io/runtime-cli/blob/v10.1.
|
|
189
|
+
_See code: [src/commands/blueprints/info.ts](https://github.com/sanity-io/runtime-cli/blob/v10.1.4/src/commands/blueprints/info.ts)_
|
|
190
190
|
|
|
191
191
|
## `sanity-run blueprints init [DIR]`
|
|
192
192
|
|
|
@@ -224,7 +224,7 @@ EXAMPLES
|
|
|
224
224
|
$ sanity-run blueprints init --blueprint-type <json|js|ts> --stack-name <stackName>
|
|
225
225
|
```
|
|
226
226
|
|
|
227
|
-
_See code: [src/commands/blueprints/init.ts](https://github.com/sanity-io/runtime-cli/blob/v10.1.
|
|
227
|
+
_See code: [src/commands/blueprints/init.ts](https://github.com/sanity-io/runtime-cli/blob/v10.1.4/src/commands/blueprints/init.ts)_
|
|
228
228
|
|
|
229
229
|
## `sanity-run blueprints logs`
|
|
230
230
|
|
|
@@ -246,7 +246,7 @@ EXAMPLES
|
|
|
246
246
|
$ sanity-run blueprints logs --watch
|
|
247
247
|
```
|
|
248
248
|
|
|
249
|
-
_See code: [src/commands/blueprints/logs.ts](https://github.com/sanity-io/runtime-cli/blob/v10.1.
|
|
249
|
+
_See code: [src/commands/blueprints/logs.ts](https://github.com/sanity-io/runtime-cli/blob/v10.1.4/src/commands/blueprints/logs.ts)_
|
|
250
250
|
|
|
251
251
|
## `sanity-run blueprints plan`
|
|
252
252
|
|
|
@@ -263,7 +263,7 @@ EXAMPLES
|
|
|
263
263
|
$ sanity-run blueprints plan
|
|
264
264
|
```
|
|
265
265
|
|
|
266
|
-
_See code: [src/commands/blueprints/plan.ts](https://github.com/sanity-io/runtime-cli/blob/v10.1.
|
|
266
|
+
_See code: [src/commands/blueprints/plan.ts](https://github.com/sanity-io/runtime-cli/blob/v10.1.4/src/commands/blueprints/plan.ts)_
|
|
267
267
|
|
|
268
268
|
## `sanity-run blueprints stacks`
|
|
269
269
|
|
|
@@ -285,7 +285,7 @@ EXAMPLES
|
|
|
285
285
|
$ sanity-run blueprints stacks --project-id <projectId>
|
|
286
286
|
```
|
|
287
287
|
|
|
288
|
-
_See code: [src/commands/blueprints/stacks.ts](https://github.com/sanity-io/runtime-cli/blob/v10.1.
|
|
288
|
+
_See code: [src/commands/blueprints/stacks.ts](https://github.com/sanity-io/runtime-cli/blob/v10.1.4/src/commands/blueprints/stacks.ts)_
|
|
289
289
|
|
|
290
290
|
## `sanity-run functions dev`
|
|
291
291
|
|
|
@@ -305,7 +305,7 @@ EXAMPLES
|
|
|
305
305
|
$ sanity-run functions dev --port 8974
|
|
306
306
|
```
|
|
307
307
|
|
|
308
|
-
_See code: [src/commands/functions/dev.ts](https://github.com/sanity-io/runtime-cli/blob/v10.1.
|
|
308
|
+
_See code: [src/commands/functions/dev.ts](https://github.com/sanity-io/runtime-cli/blob/v10.1.4/src/commands/functions/dev.ts)_
|
|
309
309
|
|
|
310
310
|
## `sanity-run functions env add NAME KEY VALUE`
|
|
311
311
|
|
|
@@ -327,7 +327,7 @@ EXAMPLES
|
|
|
327
327
|
$ sanity-run functions env add MyFunction API_URL https://api.example.com/
|
|
328
328
|
```
|
|
329
329
|
|
|
330
|
-
_See code: [src/commands/functions/env/add.ts](https://github.com/sanity-io/runtime-cli/blob/v10.1.
|
|
330
|
+
_See code: [src/commands/functions/env/add.ts](https://github.com/sanity-io/runtime-cli/blob/v10.1.4/src/commands/functions/env/add.ts)_
|
|
331
331
|
|
|
332
332
|
## `sanity-run functions env list NAME`
|
|
333
333
|
|
|
@@ -347,7 +347,7 @@ EXAMPLES
|
|
|
347
347
|
$ sanity-run functions env list MyFunction
|
|
348
348
|
```
|
|
349
349
|
|
|
350
|
-
_See code: [src/commands/functions/env/list.ts](https://github.com/sanity-io/runtime-cli/blob/v10.1.
|
|
350
|
+
_See code: [src/commands/functions/env/list.ts](https://github.com/sanity-io/runtime-cli/blob/v10.1.4/src/commands/functions/env/list.ts)_
|
|
351
351
|
|
|
352
352
|
## `sanity-run functions env remove NAME KEY`
|
|
353
353
|
|
|
@@ -368,7 +368,7 @@ EXAMPLES
|
|
|
368
368
|
$ sanity-run functions env remove MyFunction API_URL
|
|
369
369
|
```
|
|
370
370
|
|
|
371
|
-
_See code: [src/commands/functions/env/remove.ts](https://github.com/sanity-io/runtime-cli/blob/v10.1.
|
|
371
|
+
_See code: [src/commands/functions/env/remove.ts](https://github.com/sanity-io/runtime-cli/blob/v10.1.4/src/commands/functions/env/remove.ts)_
|
|
372
372
|
|
|
373
373
|
## `sanity-run functions logs NAME`
|
|
374
374
|
|
|
@@ -402,7 +402,7 @@ EXAMPLES
|
|
|
402
402
|
$ sanity-run functions logs <name> --delete
|
|
403
403
|
```
|
|
404
404
|
|
|
405
|
-
_See code: [src/commands/functions/logs.ts](https://github.com/sanity-io/runtime-cli/blob/v10.1.
|
|
405
|
+
_See code: [src/commands/functions/logs.ts](https://github.com/sanity-io/runtime-cli/blob/v10.1.4/src/commands/functions/logs.ts)_
|
|
406
406
|
|
|
407
407
|
## `sanity-run functions test NAME`
|
|
408
408
|
|
|
@@ -437,7 +437,7 @@ EXAMPLES
|
|
|
437
437
|
$ sanity-run functions test <name> --data '{ "id": 1 }' --timeout 60
|
|
438
438
|
```
|
|
439
439
|
|
|
440
|
-
_See code: [src/commands/functions/test.ts](https://github.com/sanity-io/runtime-cli/blob/v10.1.
|
|
440
|
+
_See code: [src/commands/functions/test.ts](https://github.com/sanity-io/runtime-cli/blob/v10.1.4/src/commands/functions/test.ts)_
|
|
441
441
|
|
|
442
442
|
## `sanity-run help [COMMAND]`
|
|
443
443
|
|
|
@@ -227,7 +227,7 @@ export function readConfigFile(blueprintFilePath) {
|
|
|
227
227
|
const config = JSON.parse(readFileSync(configPath, 'utf8'));
|
|
228
228
|
return { configPath, ...config };
|
|
229
229
|
}
|
|
230
|
-
catch
|
|
230
|
+
catch {
|
|
231
231
|
return null;
|
|
232
232
|
}
|
|
233
233
|
}
|
|
@@ -239,7 +239,7 @@ export function readConfigFile(blueprintFilePath) {
|
|
|
239
239
|
const config = JSON.parse(readFileSync(configFilePath, 'utf8'));
|
|
240
240
|
return config || null;
|
|
241
241
|
}
|
|
242
|
-
catch
|
|
242
|
+
catch {
|
|
243
243
|
return null;
|
|
244
244
|
}
|
|
245
245
|
}
|
|
@@ -255,7 +255,7 @@ export function writeConfigFile({ blueprintFilePath, projectId, stackId, }) {
|
|
|
255
255
|
try {
|
|
256
256
|
config = JSON.parse(readFileSync(configPath, 'utf8'));
|
|
257
257
|
}
|
|
258
|
-
catch
|
|
258
|
+
catch {
|
|
259
259
|
// config broken, start fresh
|
|
260
260
|
}
|
|
261
261
|
}
|
|
@@ -81,7 +81,7 @@ export function streamLogs({ stackId, after, auth, onLog, onOpen, onError, }) {
|
|
|
81
81
|
console.error('Error parsing logs event:', err);
|
|
82
82
|
}
|
|
83
83
|
});
|
|
84
|
-
eventSource.onerror = (
|
|
84
|
+
eventSource.onerror = () => {
|
|
85
85
|
onError('Connection to log stream failed or was closed');
|
|
86
86
|
if (eventSource.readyState === eventSource.CLOSED) {
|
|
87
87
|
console.log('Connection is CLOSED');
|
|
@@ -66,7 +66,7 @@ export function streamLogs(id, auth, onLog, onOpen, onError) {
|
|
|
66
66
|
console.error('Error parsing logs event:', err);
|
|
67
67
|
}
|
|
68
68
|
});
|
|
69
|
-
eventSource.onerror = (
|
|
69
|
+
eventSource.onerror = () => {
|
|
70
70
|
onError('Connection to log stream failed or was closed');
|
|
71
71
|
if (eventSource.readyState === eventSource.CLOSED) {
|
|
72
72
|
console.log('Connection is CLOSED');
|
|
@@ -124,7 +124,7 @@ function extractFunctionConfig(exampleFiles) {
|
|
|
124
124
|
packageJsonContent.blueprintResourceItem = undefined;
|
|
125
125
|
exampleFiles['package.json'] = JSON.stringify(packageJsonContent, null, 2);
|
|
126
126
|
}
|
|
127
|
-
catch
|
|
127
|
+
catch {
|
|
128
128
|
return null;
|
|
129
129
|
}
|
|
130
130
|
return functionConfig;
|
|
@@ -144,7 +144,7 @@ function extractInstructions(exampleFiles) {
|
|
|
144
144
|
packageJsonContent.exampleInstructions = undefined;
|
|
145
145
|
exampleFiles['package.json'] = JSON.stringify(packageJsonContent, null, 2);
|
|
146
146
|
}
|
|
147
|
-
catch
|
|
147
|
+
catch {
|
|
148
148
|
return null;
|
|
149
149
|
}
|
|
150
150
|
return instructions;
|
|
@@ -18,7 +18,7 @@ const FUNCTION_BLUEPRINT_RESOURCE_TEMPLATE = `
|
|
|
18
18
|
`;
|
|
19
19
|
export async function blueprintAddCore(options) {
|
|
20
20
|
const root = cwd();
|
|
21
|
-
const {
|
|
21
|
+
const { log, blueprint, args, flags } = options;
|
|
22
22
|
const { blueprintFilePath } = blueprint.fileInfo;
|
|
23
23
|
const { type: resourceType } = args;
|
|
24
24
|
const { example: flagExample, name: flagResourceName, 'fn-type': flagFnType, javascript: flagJs, 'fn-helpers': flagFnHelpers, install: flagI, 'fn-installer': flagFnInstaller, // can be 'skip'!
|
|
@@ -119,7 +119,7 @@ export async function blueprintConfigCore(options) {
|
|
|
119
119
|
log('Configuration updated successfully.');
|
|
120
120
|
return { success: true };
|
|
121
121
|
}
|
|
122
|
-
catch
|
|
122
|
+
catch {
|
|
123
123
|
log(`Unable to update config. These values should be set in ${BLUEPRINT_DIR}/${BLUEPRINT_CONFIG_FILE}`);
|
|
124
124
|
log(highlight(JSON.stringify({ metadata: { projectId: updatedProjectId, stackId: updatedStackId } }, null, 2)));
|
|
125
125
|
return {
|
|
@@ -131,7 +131,7 @@ export async function blueprintConfigCore(options) {
|
|
|
131
131
|
// Default return (shouldn't reach here with proper flow control)
|
|
132
132
|
return { success: true };
|
|
133
133
|
}
|
|
134
|
-
catch
|
|
134
|
+
catch {
|
|
135
135
|
return { success: false, error: 'Unknown error' };
|
|
136
136
|
}
|
|
137
137
|
}
|
|
@@ -6,7 +6,7 @@ import { destroyStack, getStack } from '../../actions/blueprints/stacks.js';
|
|
|
6
6
|
import { setupLogStreaming } from '../../utils/display/blueprints-logs-streaming.js';
|
|
7
7
|
import { niceId } from '../../utils/display/presenters.js';
|
|
8
8
|
export async function blueprintDestroyCore(options) {
|
|
9
|
-
const {
|
|
9
|
+
const { log, token, blueprint, flags } = options;
|
|
10
10
|
const { force = false, 'project-id': flagProjectId, 'stack-id': flagStackId, 'no-wait': noWait = false, } = flags;
|
|
11
11
|
// 3-flag combo: just destroy it
|
|
12
12
|
if (flagProjectId && flagStackId && force) {
|
|
@@ -30,13 +30,12 @@ export async function blueprintLogsCore(options) {
|
|
|
30
30
|
log(`No recent logs found for deployment ${niceId(stackId)}`);
|
|
31
31
|
}
|
|
32
32
|
// Set up streaming log display
|
|
33
|
-
|
|
33
|
+
await setupLogStreaming({
|
|
34
34
|
stackId,
|
|
35
35
|
auth,
|
|
36
36
|
log,
|
|
37
37
|
showBanner: true,
|
|
38
38
|
});
|
|
39
|
-
// Note: don't call streamCleanup() here, it will close the stream
|
|
40
39
|
// Return a special key for streaming mode
|
|
41
40
|
return {
|
|
42
41
|
success: true,
|
|
@@ -16,7 +16,7 @@ export async function functionLogsCore(options) {
|
|
|
16
16
|
return streamLogs({ name, externalId, auth, json, utc, log });
|
|
17
17
|
return getLogs({ name, externalId, auth, limit, json, utc, log });
|
|
18
18
|
}
|
|
19
|
-
async function deleteLogs({ name, externalId, auth, force,
|
|
19
|
+
async function deleteLogs({ name, externalId, auth, force, }) {
|
|
20
20
|
if (!force) {
|
|
21
21
|
const { certain } = await inquirer.prompt({
|
|
22
22
|
type: 'confirm',
|
|
@@ -36,14 +36,14 @@ async function deleteLogs({ name, externalId, auth, force, log, }) {
|
|
|
36
36
|
spinner.succeed('Logs deleted');
|
|
37
37
|
return { success: true };
|
|
38
38
|
}
|
|
39
|
-
async function streamLogs({ name, externalId, auth,
|
|
39
|
+
async function streamLogs({ name, externalId, auth, log, }) {
|
|
40
40
|
const spinner = ora(`Setting up streaming logs session for function ${niceId(name)}`).start();
|
|
41
41
|
try {
|
|
42
42
|
spinner.stop();
|
|
43
43
|
log(`Streaming log session for function ${niceId(name)}`);
|
|
44
44
|
log(`Watching for new logs... ${chalk.bold('ctrl+c')} to stop`);
|
|
45
45
|
const onOpen = () => {
|
|
46
|
-
// TODO delete
|
|
46
|
+
// TODO delete log("Watching for new logs...") and uncomment this when Fns service is updated
|
|
47
47
|
// log(`Watching for new logs... ${chalk.bold('ctrl+c')} to stop`)
|
|
48
48
|
};
|
|
49
49
|
const renderLog = (logEntry) => {
|
package/dist/server/app.js
CHANGED
|
@@ -39,7 +39,6 @@ const app = (port) => {
|
|
|
39
39
|
context.clientOptions.token = config.token || undefined;
|
|
40
40
|
}
|
|
41
41
|
else {
|
|
42
|
-
// biome-ignore lint/performance/noDelete: but we love delete
|
|
43
42
|
delete context.clientOptions.token;
|
|
44
43
|
}
|
|
45
44
|
const start = performance.now();
|
|
@@ -82,7 +81,7 @@ const app = (port) => {
|
|
|
82
81
|
res.writeHead(200);
|
|
83
82
|
res.end(JSON.stringify(json));
|
|
84
83
|
}
|
|
85
|
-
catch
|
|
84
|
+
catch {
|
|
86
85
|
res.writeHead(200);
|
|
87
86
|
res.end(JSON.stringify([]));
|
|
88
87
|
}
|
|
@@ -106,7 +105,7 @@ const app = (port) => {
|
|
|
106
105
|
res.writeHead(200);
|
|
107
106
|
res.end(JSON.stringify(json));
|
|
108
107
|
}
|
|
109
|
-
catch
|
|
108
|
+
catch {
|
|
110
109
|
res.writeHead(200);
|
|
111
110
|
res.end(JSON.stringify([]));
|
|
112
111
|
}
|
|
@@ -135,7 +134,7 @@ const app = (port) => {
|
|
|
135
134
|
res.writeHead(200);
|
|
136
135
|
res.end(JSON.stringify(json));
|
|
137
136
|
}
|
|
138
|
-
catch
|
|
137
|
+
catch {
|
|
139
138
|
res.writeHead(200);
|
|
140
139
|
res.end(JSON.stringify([]));
|
|
141
140
|
}
|
|
@@ -761,22 +761,22 @@ body {
|
|
|
761
761
|
}
|
|
762
762
|
|
|
763
763
|
/* Layout */
|
|
764
|
-
|
|
764
|
+
header {
|
|
765
765
|
grid-area: header;
|
|
766
766
|
}
|
|
767
|
-
|
|
767
|
+
filters-component {
|
|
768
768
|
grid-area: filters;
|
|
769
769
|
}
|
|
770
|
-
|
|
770
|
+
nav {
|
|
771
771
|
grid-area: left-sidebar;
|
|
772
772
|
}
|
|
773
|
-
|
|
773
|
+
main {
|
|
774
774
|
grid-area: main;
|
|
775
775
|
/* Ensure main takes up available space if body is grid/flex */
|
|
776
776
|
overflow: hidden; /* Prevent main itself from scrolling */
|
|
777
777
|
min-height: 0; /* Needed for grid children height */
|
|
778
778
|
}
|
|
779
|
-
|
|
779
|
+
footer {
|
|
780
780
|
grid-area: footer;
|
|
781
781
|
}
|
|
782
782
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {HighlightStyle, syntaxHighlighting, tags as t} from '../vendor/vendor.bundle.js'
|
|
2
2
|
|
|
3
3
|
const red = 'light-dark(var(--red-600), var(--red-400))'
|
|
4
|
-
const orange = 'light-dark(var(--orange-600), var(--orange-400))'
|
|
4
|
+
// const orange = 'light-dark(var(--orange-600), var(--orange-400))'
|
|
5
5
|
const yellow = 'light-dark(var(--yellow-600), var(--yellow-400))'
|
|
6
6
|
const green = 'light-dark(var(--green-600), var(--green-400))'
|
|
7
7
|
const blue = 'light-dark(var(--blue-600), var(--blue-400))'
|
|
@@ -36,7 +36,7 @@ class ResponsePanel extends ApiBaseElement {
|
|
|
36
36
|
updateResponse = ({result}) => {
|
|
37
37
|
if (!result) return
|
|
38
38
|
|
|
39
|
-
const {error, json,
|
|
39
|
+
const {error, json, timings} = result
|
|
40
40
|
if (!error) {
|
|
41
41
|
const transaction = this.api.store.response.state.update({
|
|
42
42
|
changes: {
|
|
@@ -26710,7 +26710,8 @@ function prettyBytes(number, options) {
|
|
|
26710
26710
|
number = divide(number, (options.binary ? 1024 : 1000) ** exponent);
|
|
26711
26711
|
|
|
26712
26712
|
if (!localeOptions) {
|
|
26713
|
-
|
|
26713
|
+
const minPrecision = Math.max(3, Number.parseInt(number, 10).toString().length);
|
|
26714
|
+
number = number.toPrecision(minPrecision);
|
|
26714
26715
|
}
|
|
26715
26716
|
|
|
26716
26717
|
const numberString = toLocaleString(Number(number), options.locale, localeOptions);
|
|
@@ -50,7 +50,7 @@ console.table = (data, columns) => {
|
|
|
50
50
|
const originalWrite = process.stdout.write.bind(process.stdout)
|
|
51
51
|
let buffer = ''
|
|
52
52
|
|
|
53
|
-
process.stdout.write = (chunk,
|
|
53
|
+
process.stdout.write = (chunk, _encoding, callback) => {
|
|
54
54
|
buffer += chunk
|
|
55
55
|
if (typeof callback === 'function') callback()
|
|
56
56
|
}
|
|
@@ -8,7 +8,7 @@ import { formatLogEntry } from './logs-formatting.js';
|
|
|
8
8
|
*/
|
|
9
9
|
export async function setupLogStreaming(config) {
|
|
10
10
|
const { stackId, auth, log, showBanner, after } = config;
|
|
11
|
-
let newestTimestamp =
|
|
11
|
+
let newestTimestamp = Date.now();
|
|
12
12
|
const onLogReceived = (logEntry) => {
|
|
13
13
|
if (!isNewerLog(logEntry, newestTimestamp))
|
|
14
14
|
return;
|
|
@@ -52,7 +52,7 @@ export async function applyGroqRule(resource, data) {
|
|
|
52
52
|
// TODO can this be multiple documents?
|
|
53
53
|
return currentFunctionDocumentSet[0] || {};
|
|
54
54
|
}
|
|
55
|
-
catch
|
|
55
|
+
catch {
|
|
56
56
|
// parsing/validating the groq rule we do up front as part of functions HTTP API
|
|
57
57
|
// so this likely would be triggered by evaluating the query, if anything
|
|
58
58
|
throw Error('⚠️ failed parsing/evaluating GROQ rule! Skipping invoke.');
|
package/oclif.manifest.json
CHANGED
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": "10.1.
|
|
4
|
+
"version": "10.1.4",
|
|
5
5
|
"author": "Sanity Runtime Team",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"license": "MIT",
|
|
@@ -79,33 +79,33 @@
|
|
|
79
79
|
"@architect/inventory": "^4.0.9",
|
|
80
80
|
"@oclif/core": "^4.5.2",
|
|
81
81
|
"@oclif/plugin-help": "^6.2.32",
|
|
82
|
-
"@sanity/client": "^7.8.
|
|
82
|
+
"@sanity/client": "^7.8.2",
|
|
83
83
|
"adm-zip": "^0.5.16",
|
|
84
84
|
"array-treeify": "^0.1.5",
|
|
85
85
|
"cardinal": "^2.1.1",
|
|
86
|
-
"chalk": "^5.
|
|
86
|
+
"chalk": "^5.5.0",
|
|
87
87
|
"eventsource": "^4.0.0",
|
|
88
88
|
"find-up": "^7.0.0",
|
|
89
89
|
"get-folder-size": "^5.0.0",
|
|
90
90
|
"groq-js": "^1.17.3",
|
|
91
|
-
"inquirer": "^12.9.
|
|
91
|
+
"inquirer": "^12.9.2",
|
|
92
92
|
"jiti": "^2.5.1",
|
|
93
93
|
"mime-types": "^3.0.1",
|
|
94
94
|
"ora": "^8.2.0",
|
|
95
95
|
"tar-stream": "^3.1.7",
|
|
96
|
-
"vite": "^
|
|
96
|
+
"vite": "^7.1.2",
|
|
97
97
|
"vite-tsconfig-paths": "^5.1.4",
|
|
98
98
|
"ws": "^8.18.3",
|
|
99
99
|
"xdg-basedir": "^5.1.0"
|
|
100
100
|
},
|
|
101
101
|
"devDependencies": {
|
|
102
|
-
"@biomejs/biome": "2.
|
|
102
|
+
"@biomejs/biome": "2.2.0",
|
|
103
103
|
"@codemirror/lang-json": "^6.0.2",
|
|
104
104
|
"@codemirror/state": "^6.5.2",
|
|
105
105
|
"@enhance/store": "^1.0.2",
|
|
106
106
|
"@lezer/highlight": "^1.2.1",
|
|
107
107
|
"@oclif/test": "^4.1.13",
|
|
108
|
-
"@playwright/test": "^1.54.
|
|
108
|
+
"@playwright/test": "^1.54.2",
|
|
109
109
|
"@rollup/plugin-node-resolve": "^16.0.1",
|
|
110
110
|
"@sanity/blueprints": "^0.1.0",
|
|
111
111
|
"@sanity/functions": "^1.0.3",
|
|
@@ -117,13 +117,13 @@
|
|
|
117
117
|
"@types/ws": "^8.18.1",
|
|
118
118
|
"codemirror": "^6.0.2",
|
|
119
119
|
"mentoss": "^0.11.0",
|
|
120
|
-
"oclif": "^4.22.
|
|
121
|
-
"pretty-bytes": "^7.0.
|
|
120
|
+
"oclif": "^4.22.9",
|
|
121
|
+
"pretty-bytes": "^7.0.1",
|
|
122
122
|
"pretty-ms": "^9.2.0",
|
|
123
123
|
"rollup": "^4.46.2",
|
|
124
124
|
"shx": "^0.4.0",
|
|
125
125
|
"ts-node": "^10.9.2",
|
|
126
|
-
"typescript": "^5.
|
|
126
|
+
"typescript": "^5.9.2",
|
|
127
127
|
"vitest": "3.2.4"
|
|
128
128
|
},
|
|
129
129
|
"oclif": {
|