@sanity/runtime-cli 10.1.2 → 10.1.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 +17 -17
- package/dist/actions/blueprints/index.d.ts +5 -6
- package/dist/actions/blueprints/index.js +4 -4
- package/dist/actions/blueprints/resources.js +1 -2
- package/dist/baseCommands.d.ts +1 -1
- package/dist/config.js +1 -1
- package/dist/cores/blueprints/index.d.ts +9 -9
- package/dist/cores/functions/index.d.ts +7 -7
- package/dist/cores/functions/index.js +1 -1
- package/dist/server/app.js +1 -1
- package/dist/server/static/components/api-base.js +1 -0
- package/dist/server/static/components/app.css +7 -7
- package/dist/server/static/components/codemirror-theme.js +1 -2
- package/dist/server/static/components/payload-panel.js +2 -2
- package/dist/server/static/components/response-panel.js +2 -2
- package/dist/server/static/components/rule-panel.js +2 -2
- package/dist/server/static/hot-reload.js +1 -0
- package/dist/utils/display/colors.d.ts +1 -1
- package/dist/utils/display/colors.js +1 -1
- package/dist/utils/display/index.d.ts +2 -2
- package/dist/utils/display/index.js +2 -2
- package/dist/utils/index.d.ts +1 -1
- package/dist/utils/index.js +1 -1
- package/dist/utils/invoke-local.js +2 -2
- package/oclif.manifest.json +1 -1
- package/package.json +16 -16
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.3 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.3/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.3/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.3/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.3/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.3/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.3/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.3/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.3/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.3/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.3/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.3/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.3/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.3/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.3/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.3/src/commands/functions/test.ts)_
|
|
441
441
|
|
|
442
442
|
## `sanity-run help [COMMAND]`
|
|
443
443
|
|
|
@@ -457,5 +457,5 @@ DESCRIPTION
|
|
|
457
457
|
Display help for sanity-run.
|
|
458
458
|
```
|
|
459
459
|
|
|
460
|
-
_See code: [@oclif/plugin-help](https://github.com/oclif/plugin-help/blob/v6.2.
|
|
460
|
+
_See code: [@oclif/plugin-help](https://github.com/oclif/plugin-help/blob/v6.2.32/src/commands/help.ts)_
|
|
461
461
|
<!-- commandsstop -->
|
|
@@ -1,15 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @deprecated Use actions/sanity/projects.js instead
|
|
3
|
+
*/
|
|
4
|
+
export * as projects from '../sanity/projects.js';
|
|
1
5
|
export * as assets from './assets.js';
|
|
2
6
|
export * as blueprint from './blueprint.js';
|
|
3
7
|
export * as logs from './logs.js';
|
|
4
8
|
export * as operations from './operations.js';
|
|
5
9
|
export * as resources from './resources.js';
|
|
6
10
|
export * as stacks from './stacks.js';
|
|
7
|
-
|
|
8
|
-
* @deprecated Use actions/sanity/projects.js instead
|
|
9
|
-
*/
|
|
10
|
-
export * as projects from '../sanity/projects.js';
|
|
11
|
-
import type { Stack } from '../../utils/types.js';
|
|
12
|
-
import type { BlueprintParserError } from '../../utils/types.js';
|
|
11
|
+
import type { BlueprintParserError, Stack } from '../../utils/types.js';
|
|
13
12
|
import { readLocalBlueprint } from './blueprint.js';
|
|
14
13
|
export type BlueprintIssue = {
|
|
15
14
|
code: 'NO_STACK_ID' | 'NO_PROJECT_ID' | 'NO_STACK' | 'PARSE_ERROR';
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @deprecated Use actions/sanity/projects.js instead
|
|
3
|
+
*/
|
|
4
|
+
export * as projects from '../sanity/projects.js';
|
|
1
5
|
export * as assets from './assets.js';
|
|
2
6
|
export * as blueprint from './blueprint.js';
|
|
3
7
|
export * as logs from './logs.js';
|
|
4
8
|
export * as operations from './operations.js';
|
|
5
9
|
export * as resources from './resources.js';
|
|
6
10
|
export * as stacks from './stacks.js';
|
|
7
|
-
/**
|
|
8
|
-
* @deprecated Use actions/sanity/projects.js instead
|
|
9
|
-
*/
|
|
10
|
-
export * as projects from '../sanity/projects.js';
|
|
11
11
|
import { readLocalBlueprint } from './blueprint.js';
|
|
12
12
|
import { getStack } from './stacks.js';
|
|
13
13
|
/**
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { spawn } from 'node:child_process';
|
|
2
|
-
import { mkdirSync, writeFileSync } from 'node:fs';
|
|
3
|
-
import { existsSync } from 'node:fs';
|
|
2
|
+
import { existsSync, mkdirSync, writeFileSync } from 'node:fs';
|
|
4
3
|
import { dirname, join } from 'node:path';
|
|
5
4
|
import { cwd } from 'node:process';
|
|
6
5
|
import chalk from 'chalk';
|
package/dist/baseCommands.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Command } from '@oclif/core';
|
|
2
1
|
import type { Interfaces } from '@oclif/core';
|
|
2
|
+
import { Command } from '@oclif/core';
|
|
3
3
|
import type { readLocalBlueprint } from './actions/blueprints/blueprint.js';
|
|
4
4
|
import type { AuthParams, Stack } from './utils/types.js';
|
|
5
5
|
export type Flags<T extends typeof Command> = Interfaces.InferredFlags<(typeof BlueprintCommand)['baseFlags'] & T['flags']>;
|
package/dist/config.js
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
export { blueprintAddCore } from './add.js';
|
|
2
1
|
export type { BlueprintAddOptions } from './add.js';
|
|
3
|
-
export {
|
|
2
|
+
export { blueprintAddCore } from './add.js';
|
|
4
3
|
export type { BlueprintConfigOptions } from './config.js';
|
|
5
|
-
export {
|
|
4
|
+
export { blueprintConfigCore } from './config.js';
|
|
6
5
|
export type { BlueprintDeployOptions } from './deploy.js';
|
|
7
|
-
export {
|
|
6
|
+
export { blueprintDeployCore } from './deploy.js';
|
|
8
7
|
export type { BlueprintDestroyOptions } from './destroy.js';
|
|
9
|
-
export {
|
|
8
|
+
export { blueprintDestroyCore } from './destroy.js';
|
|
10
9
|
export type { BlueprintInfoOptions } from './info.js';
|
|
11
|
-
export {
|
|
10
|
+
export { blueprintInfoCore } from './info.js';
|
|
12
11
|
export type { BlueprintInitOptions } from './init.js';
|
|
13
|
-
export {
|
|
12
|
+
export { blueprintInitCore } from './init.js';
|
|
14
13
|
export type { BlueprintLogsOptions } from './logs.js';
|
|
15
|
-
export {
|
|
14
|
+
export { blueprintLogsCore } from './logs.js';
|
|
16
15
|
export type { BlueprintPlanOptions } from './plan.js';
|
|
17
|
-
export {
|
|
16
|
+
export { blueprintPlanCore } from './plan.js';
|
|
18
17
|
export type { BlueprintStacksOptions } from './stacks.js';
|
|
18
|
+
export { blueprintStacksCore } from './stacks.js';
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export type { FunctionDevOptions } from './dev.js';
|
|
2
|
+
export { functionDevCore } from './dev.js';
|
|
2
3
|
export type { FunctionEnvAddOptions as EnvAddOptions } from './env/add.js';
|
|
3
|
-
export {
|
|
4
|
+
export { functionEnvAddCore } from './env/add.js';
|
|
4
5
|
export type { FunctionEnvListOptions as EnvListOptions } from './env/list.js';
|
|
5
|
-
export {
|
|
6
|
+
export { functionEnvListCore } from './env/list.js';
|
|
6
7
|
export type { FunctionEnvRemoveOptions as EnvRemoveOptions } from './env/remove.js';
|
|
7
|
-
export {
|
|
8
|
+
export { functionEnvRemoveCore } from './env/remove.js';
|
|
8
9
|
export type { FunctionLogsOptions } from './logs.js';
|
|
9
|
-
export {
|
|
10
|
+
export { functionLogsCore } from './logs.js';
|
|
10
11
|
export type { FunctionTestOptions } from './test.js';
|
|
11
|
-
export {
|
|
12
|
-
export type { FunctionDevOptions } from './dev.js';
|
|
12
|
+
export { functionTestCore } from './test.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
export { functionDevCore } from './dev.js';
|
|
1
2
|
export { functionEnvAddCore } from './env/add.js';
|
|
2
3
|
export { functionEnvListCore } from './env/list.js';
|
|
3
4
|
export { functionEnvRemoveCore } from './env/remove.js';
|
|
4
5
|
export { functionLogsCore } from './logs.js';
|
|
5
6
|
export { functionTestCore } from './test.js';
|
|
6
|
-
export { functionDevCore } from './dev.js';
|
package/dist/server/app.js
CHANGED
|
@@ -39,7 +39,7 @@ const app = (port) => {
|
|
|
39
39
|
context.clientOptions.token = config.token || undefined;
|
|
40
40
|
}
|
|
41
41
|
else {
|
|
42
|
-
// biome-ignore lint/performance/noDelete:
|
|
42
|
+
// biome-ignore lint/performance/noDelete: but we love delete
|
|
43
43
|
delete context.clientOptions.token;
|
|
44
44
|
}
|
|
45
45
|
const start = performance.now();
|
|
@@ -431,7 +431,7 @@
|
|
|
431
431
|
/* ---------------------------------- */
|
|
432
432
|
/* Unitless values are recommended for line-height. */
|
|
433
433
|
/* Scale derived from font sizes, may need adjustment/simplification. */
|
|
434
|
-
--line-height-1: 1
|
|
434
|
+
--line-height-1: 1; /* 15 / 15 */
|
|
435
435
|
--line-height-2: 1.03; /* 14 / 13.6 */
|
|
436
436
|
--line-height-3: 1.06; /* 13 / 12.25 */
|
|
437
437
|
--line-height-4: 1.11; /* 12 / 10.8 */
|
|
@@ -471,14 +471,14 @@
|
|
|
471
471
|
--text-2: 13px / 1.4615, var(--font-family-text);
|
|
472
472
|
--text-3: 15px / 1.5333, var(--font-family-text);
|
|
473
473
|
--text-4: 18px / 1.5, var(--font-family-text);
|
|
474
|
-
--text-
|
|
474
|
+
--text-5: 21px / 1.4761, var(--font-family-text);
|
|
475
475
|
|
|
476
476
|
--heading-1: 13px / 1.4615, var(--font-family-heading);
|
|
477
477
|
--heading-2: 16px / 1.4375, var(--font-family-heading);
|
|
478
478
|
--heading-3: 21px / 1.3809, var(--font-family-heading);
|
|
479
479
|
--heading-4: 27px / 1.2962, var(--font-family-heading);
|
|
480
|
-
--heading-
|
|
481
|
-
--heading-
|
|
480
|
+
--heading-5: 33px / 1.2424, var(--font-family-heading);
|
|
481
|
+
--heading-6: 38px / 1.2368, var(--font-family-heading);
|
|
482
482
|
|
|
483
483
|
--label-1: 8.1px / 1.2345, var(--font-family-text);
|
|
484
484
|
--label-2: 9.5px / 1.1578, var(--font-family-text);
|
|
@@ -977,7 +977,7 @@ footer {
|
|
|
977
977
|
text-transform: uppercase;
|
|
978
978
|
font-size: 11px;
|
|
979
979
|
font-weight: 500;
|
|
980
|
-
letter-spacing: .5px;
|
|
980
|
+
letter-spacing: 0.5px;
|
|
981
981
|
}
|
|
982
982
|
|
|
983
983
|
.config-label span {
|
|
@@ -988,7 +988,7 @@ footer {
|
|
|
988
988
|
.function-list-item {
|
|
989
989
|
color: light-dark(var(--gray-800), var(--gray-400));
|
|
990
990
|
padding: 8px;
|
|
991
|
-
font-size: .875rem;
|
|
991
|
+
font-size: 0.875rem;
|
|
992
992
|
border-radius: 3px;
|
|
993
993
|
margin: 0 0 1px 0;
|
|
994
994
|
cursor: pointer;
|
|
@@ -1049,7 +1049,7 @@ m-tabs {
|
|
|
1049
1049
|
.tab {
|
|
1050
1050
|
font-size: 11px;
|
|
1051
1051
|
font-weight: 500;
|
|
1052
|
-
border-radius: .1875rem;
|
|
1052
|
+
border-radius: 0.1875rem;
|
|
1053
1053
|
padding: 8px;
|
|
1054
1054
|
border: 0 !important;
|
|
1055
1055
|
}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import {HighlightStyle, syntaxHighlighting} from '../vendor/vendor.bundle.js'
|
|
2
|
-
import {tags as t} from '../vendor/vendor.bundle.js'
|
|
1
|
+
import {HighlightStyle, syntaxHighlighting, tags as t} from '../vendor/vendor.bundle.js'
|
|
3
2
|
|
|
4
3
|
const red = 'light-dark(var(--red-600), var(--red-400))'
|
|
5
4
|
const orange = 'light-dark(var(--orange-600), var(--orange-400))'
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/* globals customElements document */
|
|
2
|
-
import {sanityCodeMirrorTheme} from './codemirror-theme.js'
|
|
3
2
|
|
|
4
|
-
import {
|
|
3
|
+
import {basicSetup, EditorView, json} from '../vendor/vendor.bundle.js'
|
|
5
4
|
import {ApiBaseElement} from './api-base.js'
|
|
5
|
+
import {sanityCodeMirrorTheme} from './codemirror-theme.js'
|
|
6
6
|
|
|
7
7
|
const template = `<div class="gutter-gradient relative h-100 max-h-100 y-scroll border-top border-top-none-l">
|
|
8
8
|
<div class="bg gutter-gradient sticky top-0 right-0 left-0 z-100">
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
/* globals customElements document */
|
|
2
2
|
/* eslint-disable unicorn/prefer-dom-node-text-content */
|
|
3
|
-
import {sanityCodeMirrorTheme} from './codemirror-theme.js'
|
|
4
3
|
|
|
5
4
|
import {
|
|
5
|
+
basicSetup,
|
|
6
6
|
EditorState,
|
|
7
7
|
EditorView,
|
|
8
|
-
basicSetup,
|
|
9
8
|
json,
|
|
10
9
|
prettyBytes,
|
|
11
10
|
prettyMilliseconds,
|
|
12
11
|
} from '../vendor/vendor.bundle.js'
|
|
13
12
|
import {ApiBaseElement} from './api-base.js'
|
|
13
|
+
import {sanityCodeMirrorTheme} from './codemirror-theme.js'
|
|
14
14
|
|
|
15
15
|
const template = `<div class="border-left border-top border-top-none-l h-100 gutter-gradient" style='height: 100%; max-height: 100%; overflow: hidden; display:grid;grid-template-rows: auto 1fr; grid-template-columns: 1fr;' >
|
|
16
16
|
<!-- Response Section -->
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/* globals customElements document */
|
|
2
2
|
/* eslint-disable unicorn/prefer-dom-node-text-content */
|
|
3
|
-
import {sanityCodeMirrorTheme} from './codemirror-theme.js'
|
|
4
3
|
|
|
5
|
-
import {EditorState, EditorView,
|
|
4
|
+
import {basicSetup, EditorState, EditorView, json} from '../vendor/vendor.bundle.js'
|
|
6
5
|
import {ApiBaseElement} from './api-base.js'
|
|
6
|
+
import {sanityCodeMirrorTheme} from './codemirror-theme.js'
|
|
7
7
|
|
|
8
8
|
const template = `<div style='overflow-y:scroll; min-height: 0;'>
|
|
9
9
|
<div>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { info, niceId,
|
|
1
|
+
export { info, niceId, severe, warn } from './presenters.js';
|
|
2
2
|
/** @deprecated Use `chalk.bold` directly */
|
|
3
3
|
export declare function bold(str: string): string;
|
|
4
4
|
/** @deprecated Use `chalk.underline` directly */
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export * as blueprintsFormatting from './blueprints-formatting.js';
|
|
2
2
|
export * as colors from './colors.js';
|
|
3
|
-
export * as presenters from './presenters.js';
|
|
4
3
|
export * as dates from './dates.js';
|
|
5
|
-
export * as logsFormatting from './logs-formatting.js';
|
|
6
4
|
export * as errors from './errors.js';
|
|
5
|
+
export * as logsFormatting from './logs-formatting.js';
|
|
6
|
+
export * as presenters from './presenters.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export * as blueprintsFormatting from './blueprints-formatting.js';
|
|
2
2
|
export * as colors from './colors.js';
|
|
3
|
-
export * as presenters from './presenters.js';
|
|
4
3
|
export * as dates from './dates.js';
|
|
5
|
-
export * as logsFormatting from './logs-formatting.js';
|
|
6
4
|
export * as errors from './errors.js';
|
|
5
|
+
export * as logsFormatting from './logs-formatting.js';
|
|
6
|
+
export * as presenters from './presenters.js';
|
package/dist/utils/index.d.ts
CHANGED
|
@@ -3,5 +3,5 @@ export * as findFunction from './find-function.js';
|
|
|
3
3
|
export * as invokeLocal from './invoke-local.js';
|
|
4
4
|
export * as types from './types.js';
|
|
5
5
|
export * as validate from './validate/index.js';
|
|
6
|
-
export * as vendor from './vendor/index.js';
|
|
7
6
|
export * as validatedToken from './validated-token.js';
|
|
7
|
+
export * as vendor from './vendor/index.js';
|
package/dist/utils/index.js
CHANGED
|
@@ -3,5 +3,5 @@ export * as findFunction from './find-function.js';
|
|
|
3
3
|
export * as invokeLocal from './invoke-local.js';
|
|
4
4
|
export * as types from './types.js';
|
|
5
5
|
export * as validate from './validate/index.js';
|
|
6
|
-
export * as vendor from './vendor/index.js';
|
|
7
6
|
export * as validatedToken from './validated-token.js';
|
|
7
|
+
export * as vendor from './vendor/index.js';
|
|
@@ -43,7 +43,7 @@ export async function applyGroqRule(resource, data) {
|
|
|
43
43
|
const event = getEvent(resource.event);
|
|
44
44
|
if (!isDefaultGROQRule(event)) {
|
|
45
45
|
const hasProjection = event.projection?.length;
|
|
46
|
-
const projection = hasProjection ?
|
|
46
|
+
const projection = hasProjection ? `${event?.projection}` : '';
|
|
47
47
|
const query = `*[${event?.filter}]${projection}`;
|
|
48
48
|
try {
|
|
49
49
|
const rule = groq.parse(query);
|
|
@@ -69,7 +69,7 @@ export default async function invoke(resource, data, context, options) {
|
|
|
69
69
|
const filteredData = await applyGroqRule(resource, data);
|
|
70
70
|
let cleanupBundle = async () => { };
|
|
71
71
|
let functionPath = '';
|
|
72
|
-
let bundleTimings
|
|
72
|
+
let bundleTimings;
|
|
73
73
|
// If no package.json exists we will create a temporary one to avoid the
|
|
74
74
|
// Module Type warning from node
|
|
75
75
|
const existingPackageJson = doesPackageJsonExists(resource);
|
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.3",
|
|
5
5
|
"author": "Sanity Runtime Team",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"license": "MIT",
|
|
@@ -77,9 +77,9 @@
|
|
|
77
77
|
"dependencies": {
|
|
78
78
|
"@architect/hydrate": "^4.0.8",
|
|
79
79
|
"@architect/inventory": "^4.0.9",
|
|
80
|
-
"@oclif/core": "^4.
|
|
81
|
-
"@oclif/plugin-help": "^6.2.
|
|
82
|
-
"@sanity/client": "^7.
|
|
80
|
+
"@oclif/core": "^4.5.2",
|
|
81
|
+
"@oclif/plugin-help": "^6.2.32",
|
|
82
|
+
"@sanity/client": "^7.8.1",
|
|
83
83
|
"adm-zip": "^0.5.16",
|
|
84
84
|
"array-treeify": "^0.1.5",
|
|
85
85
|
"cardinal": "^2.1.1",
|
|
@@ -87,44 +87,44 @@
|
|
|
87
87
|
"eventsource": "^4.0.0",
|
|
88
88
|
"find-up": "^7.0.0",
|
|
89
89
|
"get-folder-size": "^5.0.0",
|
|
90
|
-
"groq-js": "^1.
|
|
91
|
-
"inquirer": "^12.
|
|
92
|
-
"jiti": "^2.
|
|
90
|
+
"groq-js": "^1.17.3",
|
|
91
|
+
"inquirer": "^12.9.0",
|
|
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
96
|
"vite": "^6.3.5",
|
|
97
97
|
"vite-tsconfig-paths": "^5.1.4",
|
|
98
|
-
"ws": "^8.18.
|
|
98
|
+
"ws": "^8.18.3",
|
|
99
99
|
"xdg-basedir": "^5.1.0"
|
|
100
100
|
},
|
|
101
101
|
"devDependencies": {
|
|
102
|
-
"@biomejs/biome": "1.
|
|
103
|
-
"@codemirror/lang-json": "^6.0.
|
|
102
|
+
"@biomejs/biome": "2.1.4",
|
|
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.
|
|
108
|
+
"@playwright/test": "^1.54.1",
|
|
109
109
|
"@rollup/plugin-node-resolve": "^16.0.1",
|
|
110
110
|
"@sanity/blueprints": "^0.1.0",
|
|
111
111
|
"@sanity/functions": "^1.0.3",
|
|
112
112
|
"@types/adm-zip": "^0.5.7",
|
|
113
113
|
"@types/cardinal": "^2.1.1",
|
|
114
|
-
"@types/mime-types": "^
|
|
114
|
+
"@types/mime-types": "^3.0.1",
|
|
115
115
|
"@types/node": "20",
|
|
116
116
|
"@types/tar-stream": "^3.1.4",
|
|
117
117
|
"@types/ws": "^8.18.1",
|
|
118
|
-
"codemirror": "^6.0.
|
|
118
|
+
"codemirror": "^6.0.2",
|
|
119
119
|
"mentoss": "^0.11.0",
|
|
120
|
-
"oclif": "^4.
|
|
120
|
+
"oclif": "^4.22.5",
|
|
121
121
|
"pretty-bytes": "^7.0.0",
|
|
122
122
|
"pretty-ms": "^9.2.0",
|
|
123
|
-
"rollup": "^4.
|
|
123
|
+
"rollup": "^4.46.2",
|
|
124
124
|
"shx": "^0.4.0",
|
|
125
125
|
"ts-node": "^10.9.2",
|
|
126
126
|
"typescript": "^5.8.3",
|
|
127
|
-
"vitest": "3.
|
|
127
|
+
"vitest": "3.2.4"
|
|
128
128
|
},
|
|
129
129
|
"oclif": {
|
|
130
130
|
"bin": "sanity-run",
|