@sanity/runtime-cli 6.1.0 → 6.2.0
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 +15 -15
- package/dist/server/static/components/app.css +18 -6
- package/dist/server/static/components/codemirror-theme.d.ts +6 -0
- package/dist/server/static/components/codemirror-theme.js +49 -0
- package/dist/server/static/components/function-list.js +1 -1
- package/dist/server/static/components/payload-panel.js +4 -2
- package/dist/server/static/components/response-panel.js +4 -2
- package/dist/server/static/favicon-dark.svg +17 -0
- package/dist/server/static/favicon.svg +17 -0
- package/dist/server/static/index.html +13 -1
- package/dist/server/static/vendor/vendor.bundle.d.ts +193 -0
- package/dist/server/static/vendor/vendor.bundle.js +1 -1
- package/dist/utils/validate/resource.js +2 -3
- package/oclif.manifest.json +1 -1
- package/package.json +2 -1
- package/dist/server/static/sanity-logo-sm.svg +0 -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/6.
|
|
23
|
+
@sanity/runtime-cli/6.2.0 linux-x64 node-v22.15.0
|
|
24
24
|
$ sanity-run --help [COMMAND]
|
|
25
25
|
USAGE
|
|
26
26
|
$ sanity-run COMMAND
|
|
@@ -77,7 +77,7 @@ EXAMPLES
|
|
|
77
77
|
$ sanity-run blueprints add function --name my-function --fn-type document-publish --lang js
|
|
78
78
|
```
|
|
79
79
|
|
|
80
|
-
_See code: [src/commands/blueprints/add.ts](https://github.com/sanity-io/runtime-cli/blob/v6.
|
|
80
|
+
_See code: [src/commands/blueprints/add.ts](https://github.com/sanity-io/runtime-cli/blob/v6.2.0/src/commands/blueprints/add.ts)_
|
|
81
81
|
|
|
82
82
|
## `sanity-run blueprints config`
|
|
83
83
|
|
|
@@ -105,7 +105,7 @@ EXAMPLES
|
|
|
105
105
|
$ sanity-run blueprints config --edit --project-id <projectId>
|
|
106
106
|
```
|
|
107
107
|
|
|
108
|
-
_See code: [src/commands/blueprints/config.ts](https://github.com/sanity-io/runtime-cli/blob/v6.
|
|
108
|
+
_See code: [src/commands/blueprints/config.ts](https://github.com/sanity-io/runtime-cli/blob/v6.2.0/src/commands/blueprints/config.ts)_
|
|
109
109
|
|
|
110
110
|
## `sanity-run blueprints deploy`
|
|
111
111
|
|
|
@@ -127,7 +127,7 @@ EXAMPLES
|
|
|
127
127
|
$ sanity-run blueprints deploy --no-wait
|
|
128
128
|
```
|
|
129
129
|
|
|
130
|
-
_See code: [src/commands/blueprints/deploy.ts](https://github.com/sanity-io/runtime-cli/blob/v6.
|
|
130
|
+
_See code: [src/commands/blueprints/deploy.ts](https://github.com/sanity-io/runtime-cli/blob/v6.2.0/src/commands/blueprints/deploy.ts)_
|
|
131
131
|
|
|
132
132
|
## `sanity-run blueprints destroy`
|
|
133
133
|
|
|
@@ -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/v6.
|
|
151
|
+
_See code: [src/commands/blueprints/destroy.ts](https://github.com/sanity-io/runtime-cli/blob/v6.2.0/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/v6.
|
|
168
|
+
_See code: [src/commands/blueprints/info.ts](https://github.com/sanity-io/runtime-cli/blob/v6.2.0/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/v6.
|
|
200
|
+
_See code: [src/commands/blueprints/init.ts](https://github.com/sanity-io/runtime-cli/blob/v6.2.0/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/v6.
|
|
222
|
+
_See code: [src/commands/blueprints/logs.ts](https://github.com/sanity-io/runtime-cli/blob/v6.2.0/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/v6.
|
|
239
|
+
_See code: [src/commands/blueprints/plan.ts](https://github.com/sanity-io/runtime-cli/blob/v6.2.0/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/v6.
|
|
259
|
+
_See code: [src/commands/functions/dev.ts](https://github.com/sanity-io/runtime-cli/blob/v6.2.0/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/v6.
|
|
281
|
+
_See code: [src/commands/functions/env/add.ts](https://github.com/sanity-io/runtime-cli/blob/v6.2.0/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/v6.
|
|
301
|
+
_See code: [src/commands/functions/env/list.ts](https://github.com/sanity-io/runtime-cli/blob/v6.2.0/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/v6.
|
|
322
|
+
_See code: [src/commands/functions/env/remove.ts](https://github.com/sanity-io/runtime-cli/blob/v6.2.0/src/commands/functions/env/remove.ts)_
|
|
323
323
|
|
|
324
324
|
## `sanity-run functions logs NAME`
|
|
325
325
|
|
|
@@ -352,7 +352,7 @@ EXAMPLES
|
|
|
352
352
|
$ sanity-run functions logs <name> --delete
|
|
353
353
|
```
|
|
354
354
|
|
|
355
|
-
_See code: [src/commands/functions/logs.ts](https://github.com/sanity-io/runtime-cli/blob/v6.
|
|
355
|
+
_See code: [src/commands/functions/logs.ts](https://github.com/sanity-io/runtime-cli/blob/v6.2.0/src/commands/functions/logs.ts)_
|
|
356
356
|
|
|
357
357
|
## `sanity-run functions test NAME`
|
|
358
358
|
|
|
@@ -385,7 +385,7 @@ EXAMPLES
|
|
|
385
385
|
$ sanity-run functions test <name> --data '{ "id": 1 }' --timeout 60
|
|
386
386
|
```
|
|
387
387
|
|
|
388
|
-
_See code: [src/commands/functions/test.ts](https://github.com/sanity-io/runtime-cli/blob/v6.
|
|
388
|
+
_See code: [src/commands/functions/test.ts](https://github.com/sanity-io/runtime-cli/blob/v6.2.0/src/commands/functions/test.ts)_
|
|
389
389
|
|
|
390
390
|
## `sanity-run help [COMMAND]`
|
|
391
391
|
|
|
@@ -989,14 +989,20 @@ footer {
|
|
|
989
989
|
cursor: pointer;
|
|
990
990
|
}
|
|
991
991
|
|
|
992
|
-
.
|
|
993
|
-
|
|
994
|
-
|
|
992
|
+
.dropdown-select {
|
|
993
|
+
background: transparent;
|
|
994
|
+
color: light-dark(var(--gray-950), var(--gray-300));
|
|
995
995
|
}
|
|
996
996
|
|
|
997
997
|
ol[type='content'] li:hover:not(.selected:not(.selected)) {
|
|
998
998
|
color: light-dark(var(--gray-950), var(--gray-200));
|
|
999
|
-
background-color: light-dark(var(--gray-50), var(--gray-900))
|
|
999
|
+
background-color: light-dark(var(--gray-50), var(--gray-900));
|
|
1000
|
+
}
|
|
1001
|
+
|
|
1002
|
+
.selected:hover,
|
|
1003
|
+
.selected {
|
|
1004
|
+
color: light-dark(var(--gray-950), var(--gray-200));
|
|
1005
|
+
background-color: light-dark(var(--gray-100), var(--gray-800)) !important;
|
|
1000
1006
|
}
|
|
1001
1007
|
|
|
1002
1008
|
m-box {
|
|
@@ -1043,9 +1049,11 @@ m-tabs {
|
|
|
1043
1049
|
border: 0 !important;
|
|
1044
1050
|
}
|
|
1045
1051
|
|
|
1046
|
-
#payload
|
|
1052
|
+
#payload {
|
|
1053
|
+
height: 100%;
|
|
1054
|
+
}
|
|
1055
|
+
|
|
1047
1056
|
#response {
|
|
1048
|
-
overflow-y: scroll;
|
|
1049
1057
|
height: 100%;
|
|
1050
1058
|
}
|
|
1051
1059
|
|
|
@@ -1073,6 +1081,10 @@ m-tabs {
|
|
|
1073
1081
|
background-color: transparent;
|
|
1074
1082
|
}
|
|
1075
1083
|
|
|
1084
|
+
.cm-cursor.cm-cursor {
|
|
1085
|
+
border-left-color: light-dark(var(--blue-600), var(--blue-400));
|
|
1086
|
+
}
|
|
1087
|
+
|
|
1076
1088
|
.cm-gutters.cm-gutters {
|
|
1077
1089
|
background-color: transparent;
|
|
1078
1090
|
color: light-dark(var(--gray-800), var(--gray-500));
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import {HighlightStyle, syntaxHighlighting} from '../vendor/vendor.bundle.js'
|
|
2
|
+
import {tags as t} from '../vendor/vendor.bundle.js'
|
|
3
|
+
|
|
4
|
+
const red = 'light-dark(var(--red-600), var(--red-400))'
|
|
5
|
+
const orange = 'light-dark(var(--orange-600), var(--orange-400))'
|
|
6
|
+
const yellow = 'light-dark(var(--yellow-600), var(--yellow-400))'
|
|
7
|
+
const green = 'light-dark(var(--green-600), var(--green-400))'
|
|
8
|
+
const blue = 'light-dark(var(--blue-600), var(--blue-400))'
|
|
9
|
+
const magenta = 'light-dark(var(--magenta-600), var(--magenta-400))'
|
|
10
|
+
const purple = 'light-dark(var(--purple-600), var(--purple-400))'
|
|
11
|
+
const gray = 'light-dark(var(--gray-600), var(--gray-400))'
|
|
12
|
+
const text = 'light-dark(var(--gray-900), var(--gray-100))'
|
|
13
|
+
|
|
14
|
+
/// The highlighting style for code
|
|
15
|
+
export const sanityHighlightStyle = HighlightStyle.define([
|
|
16
|
+
{tag: t.keyword, color: magenta},
|
|
17
|
+
{tag: [t.name, t.deleted, t.character, t.propertyName, t.macroName], color: blue},
|
|
18
|
+
{tag: [t.function(t.variableName), t.labelName], color: green},
|
|
19
|
+
{tag: [t.color, t.constant(t.name), t.standard(t.name)], color: red},
|
|
20
|
+
{tag: [t.definition(t.name), t.separator], color: purple},
|
|
21
|
+
{
|
|
22
|
+
tag: [
|
|
23
|
+
t.typeName,
|
|
24
|
+
t.className,
|
|
25
|
+
t.number,
|
|
26
|
+
t.changed,
|
|
27
|
+
t.annotation,
|
|
28
|
+
t.modifier,
|
|
29
|
+
t.self,
|
|
30
|
+
t.namespace,
|
|
31
|
+
],
|
|
32
|
+
color: purple,
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
tag: [t.operator, t.operatorKeyword, t.url, t.escape, t.regexp, t.link, t.special(t.string)],
|
|
36
|
+
color: magenta,
|
|
37
|
+
},
|
|
38
|
+
{tag: [t.meta, t.comment], color: gray},
|
|
39
|
+
{tag: t.strong, fontWeight: 'bold'},
|
|
40
|
+
{tag: t.emphasis, fontStyle: 'italic'},
|
|
41
|
+
{tag: t.strikethrough, textDecoration: 'line-through'},
|
|
42
|
+
{tag: t.link, color: blue, textDecoration: 'underline'},
|
|
43
|
+
{tag: t.heading, fontWeight: 'bold', color: blue},
|
|
44
|
+
{tag: [t.atom, t.bool, t.special(t.variableName)], color: purple},
|
|
45
|
+
{tag: [t.processingInstruction, t.string, t.inserted], color: yellow},
|
|
46
|
+
{tag: t.invalid, color: text},
|
|
47
|
+
])
|
|
48
|
+
|
|
49
|
+
export const sanityCodeMirrorTheme = [syntaxHighlighting(sanityHighlightStyle)]
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import {ApiBaseElement} from './api-base.js'
|
|
3
3
|
|
|
4
4
|
const template = `<ol class="hidden-lg" type="content" style="padding:0 16px;"></ol>
|
|
5
|
-
<fieldset class="hidden block-lg" style="padding:0 var(--space-3); margin-bottom: var(--space-3);"><select></select></fieldset>
|
|
5
|
+
<fieldset class="hidden block-lg" style="padding:0 var(--space-3); margin-bottom: var(--space-3);"><select class="dropdown-select"></select></fieldset>
|
|
6
6
|
`
|
|
7
7
|
|
|
8
8
|
class FunctionList extends ApiBaseElement {
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
/* globals customElements */
|
|
1
|
+
/* globals customElements document */
|
|
2
|
+
import {sanityCodeMirrorTheme} from './codemirror-theme.js'
|
|
3
|
+
|
|
2
4
|
import {EditorView, basicSetup, json} from '../vendor/vendor.bundle.js'
|
|
3
5
|
import {ApiBaseElement} from './api-base.js'
|
|
4
6
|
|
|
@@ -52,7 +54,7 @@ class PayloadPanel extends ApiBaseElement {
|
|
|
52
54
|
|
|
53
55
|
this.api.store.payload = new EditorView({
|
|
54
56
|
doc: '\n\n\n\n',
|
|
55
|
-
extensions: [basicSetup, json()],
|
|
57
|
+
extensions: [basicSetup, json(), sanityCodeMirrorTheme],
|
|
56
58
|
parent: this.payload,
|
|
57
59
|
})
|
|
58
60
|
}
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
/* eslint-disable unicorn/prefer-dom-node-text-content */
|
|
2
1
|
/* globals customElements document */
|
|
2
|
+
/* eslint-disable unicorn/prefer-dom-node-text-content */
|
|
3
|
+
import {sanityCodeMirrorTheme} from './codemirror-theme.js'
|
|
4
|
+
|
|
3
5
|
import {
|
|
4
6
|
EditorState,
|
|
5
7
|
EditorView,
|
|
@@ -86,7 +88,7 @@ class ResponsePanel extends ApiBaseElement {
|
|
|
86
88
|
|
|
87
89
|
this.api.store.response = new EditorView({
|
|
88
90
|
doc: '\n\n\n\n',
|
|
89
|
-
extensions: [basicSetup, json(), EditorState.readOnly.of(true)],
|
|
91
|
+
extensions: [basicSetup, json(), sanityCodeMirrorTheme, EditorState.readOnly.of(true)],
|
|
90
92
|
parent: this.response,
|
|
91
93
|
})
|
|
92
94
|
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
<svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<g clip-path="url(#clip0_2_1533)">
|
|
3
|
+
<rect width="32" height="32" fill="#FFFFFF"/>
|
|
4
|
+
<rect width="32" height="32" fill="#FFFFFF"/>
|
|
5
|
+
<g clip-path="url(#clip1_2_1533)">
|
|
6
|
+
<path d="M29.1873 19.2072L28.1078 17.4092L22.8865 20.4531L28.6858 13.3858L29.5625 12.8933L29.3456 12.5814L29.7439 12.0942L27.914 10.6363L27.0763 11.6579L10.1693 21.126L16.4203 13.9307L28.0633 7.82194L26.9572 5.77516L20.6155 9.10118L23.7383 5.5088L21.9493 4L14.9211 12.089L7.94101 15.7532L13.285 8.99078L16.6337 7.32251L15.5702 5.25295L5.81407 10.1141L8.47452 6.74423L6.61612 5.31954L1 12.4342L1.08714 12.5008L2.13638 14.5458L8.36248 11.4424L2.68768 18.6219L3.61777 19.3351L4.17085 20.3585L10.7259 16.9186L3.50751 25.2283L5.29656 26.7371L5.65579 26.3236L23.0697 16.54L17.2882 23.5881L17.3824 23.6635L17.3735 23.6687L18.5721 25.6647L26.2619 21.1803L23.3009 25.7541L25.2855 27L30 19.7189L29.1873 19.2072Z" fill="#0B0B0B" />
|
|
7
|
+
</g>
|
|
8
|
+
</g>
|
|
9
|
+
<defs>
|
|
10
|
+
<clipPath id="clip0_2_1533">
|
|
11
|
+
<rect width="32" height="32" fill="#0B0B0B"/>
|
|
12
|
+
</clipPath>
|
|
13
|
+
<clipPath id="clip1_2_1533">
|
|
14
|
+
<rect width="29" height="23" fill="#0B0B0B" transform="translate(1 4)"/>
|
|
15
|
+
</clipPath>
|
|
16
|
+
</defs>
|
|
17
|
+
</svg>
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
<svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<g clip-path="url(#clip0_2_1533)">
|
|
3
|
+
<rect width="32" height="32" fill="#0B0B0B"/>
|
|
4
|
+
<rect width="32" height="32" fill="#0B0B0B"/>
|
|
5
|
+
<g clip-path="url(#clip1_2_1533)">
|
|
6
|
+
<path d="M29.1873 19.2072L28.1078 17.4092L22.8865 20.4531L28.6858 13.3858L29.5625 12.8933L29.3456 12.5814L29.7439 12.0942L27.914 10.6363L27.0763 11.6579L10.1693 21.126L16.4203 13.9307L28.0633 7.82194L26.9572 5.77516L20.6155 9.10118L23.7383 5.5088L21.9493 4L14.9211 12.089L7.94101 15.7532L13.285 8.99078L16.6337 7.32251L15.5702 5.25295L5.81407 10.1141L8.47452 6.74423L6.61612 5.31954L1 12.4342L1.08714 12.5008L2.13638 14.5458L8.36248 11.4424L2.68768 18.6219L3.61777 19.3351L4.17085 20.3585L10.7259 16.9186L3.50751 25.2283L5.29656 26.7371L5.65579 26.3236L23.0697 16.54L17.2882 23.5881L17.3824 23.6635L17.3735 23.6687L18.5721 25.6647L26.2619 21.1803L23.3009 25.7541L25.2855 27L30 19.7189L29.1873 19.2072Z" fill="white" />
|
|
7
|
+
</g>
|
|
8
|
+
</g>
|
|
9
|
+
<defs>
|
|
10
|
+
<clipPath id="clip0_2_1533">
|
|
11
|
+
<rect width="32" height="32" fill="white"/>
|
|
12
|
+
</clipPath>
|
|
13
|
+
<clipPath id="clip1_2_1533">
|
|
14
|
+
<rect width="29" height="23" fill="white" transform="translate(1 4)"/>
|
|
15
|
+
</clipPath>
|
|
16
|
+
</defs>
|
|
17
|
+
</svg>
|
|
@@ -6,13 +6,25 @@
|
|
|
6
6
|
<link href="https://unpkg.com/m-@3.2.0/dist/m-.woff2" rel="preload" as="font" crossorigin>
|
|
7
7
|
<link href="https://unpkg.com/m-@3.2.0/dist/m-.css" rel="stylesheet">
|
|
8
8
|
<link href="./components/app.css" rel="stylesheet">
|
|
9
|
+
<link rel="icon" type="image/svg+xml" href="favicon.svg" media="(prefers-color-scheme: light)">
|
|
10
|
+
<link rel="icon" type="image/svg+xml" href="favicon-dark.svg" media="(prefers-color-scheme: dark)">
|
|
9
11
|
|
|
10
12
|
</head>
|
|
11
13
|
<body>
|
|
12
14
|
<header data-slot="header">
|
|
13
15
|
<div class="logo pad-sm">
|
|
14
16
|
<div class="logo-image">
|
|
15
|
-
|
|
17
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="25" height="25" viewBox="0 0 400 400" fill="none">
|
|
18
|
+
<rect width="400" height="400" fill="light-dark(#0B0B0B, #FFFFFF)"/>
|
|
19
|
+
<g clip-path="url(#clip0_2001_278)">
|
|
20
|
+
<path d="M304.798 227.286L296.218 212.355L254.714 237.632L300.812 178.943L307.781 174.853L306.057 172.263L309.223 168.217L294.677 156.11L288.019 164.594L153.627 243.22L203.315 183.468L295.864 132.739L287.072 115.742L236.662 143.362L261.485 113.53L247.265 101L191.399 168.174L135.915 198.603L178.394 142.445L205.012 128.591L196.558 111.405L119.008 151.773L140.155 123.789L125.383 111.958L80.7414 171.041L81.4341 171.594L89.7744 188.576L139.265 162.804L94.1565 222.425L101.55 228.348L105.946 236.846L158.052 208.28L100.673 277.288L114.894 289.817L117.75 286.383L256.17 205.137L210.214 263.667L210.963 264.292L210.892 264.336L220.42 280.911L281.545 243.672L258.008 281.653L273.784 292L311.259 231.535L304.798 227.286Z" fill="light-dark(white, #0B0B0B)"/>
|
|
21
|
+
</g>
|
|
22
|
+
<defs>
|
|
23
|
+
<clipPath id="clip0_2001_278">
|
|
24
|
+
<rect width="230.517" height="191" fill="light-dark(white, #0B0B0B)" transform="translate(80.7414 101)"/>
|
|
25
|
+
</clipPath>
|
|
26
|
+
</defs>
|
|
27
|
+
</svg>
|
|
16
28
|
</div>
|
|
17
29
|
<span class="logo-text pad-xs">Functions</span>
|
|
18
30
|
</div>
|
|
@@ -632,6 +632,34 @@ export namespace EditorView {
|
|
|
632
632
|
export let lineWrapping: FacetProvider;
|
|
633
633
|
export let announce: StateEffectType;
|
|
634
634
|
}
|
|
635
|
+
/**
|
|
636
|
+
A highlight style associates CSS styles with higlighting
|
|
637
|
+
[tags](https://lezer.codemirror.net/docs/ref#highlight.Tag).
|
|
638
|
+
*/
|
|
639
|
+
export class HighlightStyle {
|
|
640
|
+
/**
|
|
641
|
+
Create a highlighter style that associates the given styles to
|
|
642
|
+
the given tags. The specs must be objects that hold a style tag
|
|
643
|
+
or array of tags in their `tag` property, and either a single
|
|
644
|
+
`class` property providing a static CSS class (for highlighter
|
|
645
|
+
that rely on external styling), or a
|
|
646
|
+
[`style-mod`](https://github.com/marijnh/style-mod#documentation)-style
|
|
647
|
+
set of CSS properties (which define the styling for those tags).
|
|
648
|
+
|
|
649
|
+
The CSS rules created for a highlighter will be emitted in the
|
|
650
|
+
order of the spec's properties. That means that for elements that
|
|
651
|
+
have multiple tags associated with them, styles defined further
|
|
652
|
+
down in the list will have a higher CSS precedence than styles
|
|
653
|
+
defined earlier.
|
|
654
|
+
*/
|
|
655
|
+
static define(specs: any, options: any): HighlightStyle;
|
|
656
|
+
constructor(specs: any, options: any);
|
|
657
|
+
specs: any;
|
|
658
|
+
scope: ((type: any) => boolean) | undefined;
|
|
659
|
+
style: (tags: any) => any;
|
|
660
|
+
module: StyleModule | null;
|
|
661
|
+
themeType: any;
|
|
662
|
+
}
|
|
635
663
|
export function Store(initialState: any): any;
|
|
636
664
|
/**
|
|
637
665
|
This is an extension value that just pulls together a number of
|
|
@@ -678,6 +706,102 @@ export function json(): LanguageSupport;
|
|
|
678
706
|
export function prettyBytes(number: any, options: any): string;
|
|
679
707
|
export function prettyMilliseconds(milliseconds: any, options: any): string;
|
|
680
708
|
/**
|
|
709
|
+
Wrap a highlighter in an editor extension that uses it to apply
|
|
710
|
+
syntax highlighting to the editor content.
|
|
711
|
+
|
|
712
|
+
When multiple (non-fallback) styles are provided, the styling
|
|
713
|
+
applied is the union of the classes they emit.
|
|
714
|
+
*/
|
|
715
|
+
export function syntaxHighlighting(highlighter: any, options: any): PrecExtension[];
|
|
716
|
+
export namespace tags {
|
|
717
|
+
export { comment };
|
|
718
|
+
export let lineComment: Tag;
|
|
719
|
+
export let blockComment: Tag;
|
|
720
|
+
export let docComment: Tag;
|
|
721
|
+
export { name };
|
|
722
|
+
export let variableName: Tag;
|
|
723
|
+
export { typeName };
|
|
724
|
+
export let tagName: Tag;
|
|
725
|
+
export { propertyName };
|
|
726
|
+
export let attributeName: Tag;
|
|
727
|
+
export let className: Tag;
|
|
728
|
+
export let labelName: Tag;
|
|
729
|
+
export let namespace: Tag;
|
|
730
|
+
export let macroName: Tag;
|
|
731
|
+
export { literal };
|
|
732
|
+
export { string };
|
|
733
|
+
export let docString: Tag;
|
|
734
|
+
export let character: Tag;
|
|
735
|
+
export let attributeValue: Tag;
|
|
736
|
+
export { number };
|
|
737
|
+
export let integer: Tag;
|
|
738
|
+
export let float: Tag;
|
|
739
|
+
export let bool: Tag;
|
|
740
|
+
export let regexp: Tag;
|
|
741
|
+
export let escape: Tag;
|
|
742
|
+
export let color: Tag;
|
|
743
|
+
export let url: Tag;
|
|
744
|
+
export { keyword };
|
|
745
|
+
export let self: Tag;
|
|
746
|
+
let _null: Tag;
|
|
747
|
+
export { _null as null };
|
|
748
|
+
export let atom: Tag;
|
|
749
|
+
export let unit: Tag;
|
|
750
|
+
export let modifier: Tag;
|
|
751
|
+
export let operatorKeyword: Tag;
|
|
752
|
+
export let controlKeyword: Tag;
|
|
753
|
+
export let definitionKeyword: Tag;
|
|
754
|
+
export let moduleKeyword: Tag;
|
|
755
|
+
export { operator };
|
|
756
|
+
export let derefOperator: Tag;
|
|
757
|
+
export let arithmeticOperator: Tag;
|
|
758
|
+
export let logicOperator: Tag;
|
|
759
|
+
export let bitwiseOperator: Tag;
|
|
760
|
+
export let compareOperator: Tag;
|
|
761
|
+
export let updateOperator: Tag;
|
|
762
|
+
export let definitionOperator: Tag;
|
|
763
|
+
export let typeOperator: Tag;
|
|
764
|
+
export let controlOperator: Tag;
|
|
765
|
+
export { punctuation };
|
|
766
|
+
export let separator: Tag;
|
|
767
|
+
export { bracket };
|
|
768
|
+
export let angleBracket: Tag;
|
|
769
|
+
export let squareBracket: Tag;
|
|
770
|
+
export let paren: Tag;
|
|
771
|
+
export let brace: Tag;
|
|
772
|
+
export { content };
|
|
773
|
+
export { heading };
|
|
774
|
+
export let heading1: Tag;
|
|
775
|
+
export let heading2: Tag;
|
|
776
|
+
export let heading3: Tag;
|
|
777
|
+
export let heading4: Tag;
|
|
778
|
+
export let heading5: Tag;
|
|
779
|
+
export let heading6: Tag;
|
|
780
|
+
export let contentSeparator: Tag;
|
|
781
|
+
export let list: Tag;
|
|
782
|
+
export let quote: Tag;
|
|
783
|
+
export let emphasis: Tag;
|
|
784
|
+
export let strong: Tag;
|
|
785
|
+
export let link: Tag;
|
|
786
|
+
export let monospace: Tag;
|
|
787
|
+
export let strikethrough: Tag;
|
|
788
|
+
export let inserted: Tag;
|
|
789
|
+
export let deleted: Tag;
|
|
790
|
+
export let changed: Tag;
|
|
791
|
+
export let invalid: Tag;
|
|
792
|
+
export { meta };
|
|
793
|
+
export let documentMeta: Tag;
|
|
794
|
+
export let annotation: Tag;
|
|
795
|
+
export let processingInstruction: Tag;
|
|
796
|
+
export function definition(tag: any): any;
|
|
797
|
+
export function constant(tag: any): any;
|
|
798
|
+
export function _function(tag: any): any;
|
|
799
|
+
export { _function as function };
|
|
800
|
+
export function standard(tag: any): any;
|
|
801
|
+
export function local(tag: any): any;
|
|
802
|
+
export function special(tag: any): any;
|
|
803
|
+
}
|
|
804
|
+
/**
|
|
681
805
|
A change set represents a group of modifications to a document. It
|
|
682
806
|
stores the document length, and can only be applied to documents
|
|
683
807
|
with exactly that length.
|
|
@@ -1320,6 +1444,13 @@ declare class StateEffectType {
|
|
|
1320
1444
|
*/
|
|
1321
1445
|
of(value: any): StateEffect;
|
|
1322
1446
|
}
|
|
1447
|
+
declare class StyleModule {
|
|
1448
|
+
static newName(): string;
|
|
1449
|
+
static mount(root: any, modules: any, options: any): void;
|
|
1450
|
+
constructor(spec: any, options: any);
|
|
1451
|
+
rules: any[];
|
|
1452
|
+
getRules(): string;
|
|
1453
|
+
}
|
|
1323
1454
|
/**
|
|
1324
1455
|
This class bundles a [language](https://codemirror.net/6/docs/ref/#language.Language) with an
|
|
1325
1456
|
optional set of supporting extensions. Language packages are
|
|
@@ -1336,6 +1467,68 @@ declare class LanguageSupport {
|
|
|
1336
1467
|
support: any[];
|
|
1337
1468
|
extension: any[];
|
|
1338
1469
|
}
|
|
1470
|
+
declare const comment: Tag;
|
|
1471
|
+
/**
|
|
1472
|
+
Highlighting tags are markers that denote a highlighting category.
|
|
1473
|
+
They are [associated](#highlight.styleTags) with parts of a syntax
|
|
1474
|
+
tree by a language mode, and then mapped to an actual CSS style by
|
|
1475
|
+
a [highlighter](#highlight.Highlighter).
|
|
1476
|
+
|
|
1477
|
+
Because syntax tree node types and highlight styles have to be
|
|
1478
|
+
able to talk the same language, CodeMirror uses a mostly _closed_
|
|
1479
|
+
[vocabulary](#highlight.tags) of syntax tags (as opposed to
|
|
1480
|
+
traditional open string-based systems, which make it hard for
|
|
1481
|
+
highlighting themes to cover all the tokens produced by the
|
|
1482
|
+
various languages).
|
|
1483
|
+
|
|
1484
|
+
It _is_ possible to [define](#highlight.Tag^define) your own
|
|
1485
|
+
highlighting tags for system-internal use (where you control both
|
|
1486
|
+
the language package and the highlighter), but such tags will not
|
|
1487
|
+
be picked up by regular highlighters (though you can derive them
|
|
1488
|
+
from standard tags to allow highlighters to fall back to those).
|
|
1489
|
+
*/
|
|
1490
|
+
declare class Tag {
|
|
1491
|
+
static define(nameOrParent: any, parent: any): Tag;
|
|
1492
|
+
/**
|
|
1493
|
+
Define a tag _modifier_, which is a function that, given a tag,
|
|
1494
|
+
will return a tag that is a subtag of the original. Applying the
|
|
1495
|
+
same modifier to a twice tag will return the same value (`m1(t1)
|
|
1496
|
+
== m1(t1)`) and applying multiple modifiers will, regardless or
|
|
1497
|
+
order, produce the same tag (`m1(m2(t1)) == m2(m1(t1))`).
|
|
1498
|
+
|
|
1499
|
+
When multiple modifiers are applied to a given base tag, each
|
|
1500
|
+
smaller set of modifiers is registered as a parent, so that for
|
|
1501
|
+
example `m1(m2(m3(t1)))` is a subtype of `m1(m2(t1))`,
|
|
1502
|
+
`m1(m3(t1)`, and so on.
|
|
1503
|
+
*/
|
|
1504
|
+
static defineModifier(name: any): (tag: any) => any;
|
|
1505
|
+
/**
|
|
1506
|
+
@internal
|
|
1507
|
+
*/
|
|
1508
|
+
constructor(name: any, set: any, base: any, modified: any);
|
|
1509
|
+
name: any;
|
|
1510
|
+
set: any;
|
|
1511
|
+
base: any;
|
|
1512
|
+
modified: any;
|
|
1513
|
+
/**
|
|
1514
|
+
@internal
|
|
1515
|
+
*/
|
|
1516
|
+
id: number;
|
|
1517
|
+
toString(): any;
|
|
1518
|
+
}
|
|
1519
|
+
declare const name: Tag;
|
|
1520
|
+
declare const typeName: Tag;
|
|
1521
|
+
declare const propertyName: Tag;
|
|
1522
|
+
declare const literal: Tag;
|
|
1523
|
+
declare const string: Tag;
|
|
1524
|
+
declare const number: Tag;
|
|
1525
|
+
declare const keyword: Tag;
|
|
1526
|
+
declare const operator: Tag;
|
|
1527
|
+
declare const punctuation: Tag;
|
|
1528
|
+
declare const bracket: Tag;
|
|
1529
|
+
declare const content: Tag;
|
|
1530
|
+
declare const heading: Tag;
|
|
1531
|
+
declare const meta: Tag;
|
|
1339
1532
|
/**
|
|
1340
1533
|
A change description is a variant of [change set](https://codemirror.net/6/docs/ref/#state.ChangeSet)
|
|
1341
1534
|
that doesn't store the inserted text. As such, it can't be
|
|
@@ -26877,4 +26877,4 @@ function prettyMilliseconds(milliseconds, options) {
|
|
|
26877
26877
|
return sign + result.join(separator);
|
|
26878
26878
|
}
|
|
26879
26879
|
|
|
26880
|
-
export { EditorState, EditorView, Store, basicSetup, json, prettyBytes, prettyMilliseconds };
|
|
26880
|
+
export { EditorState, EditorView, HighlightStyle, Store, basicSetup, json, prettyBytes, prettyMilliseconds, syntaxHighlighting, tags };
|
|
@@ -49,11 +49,10 @@ 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) {
|
|
53
52
|
}
|
|
54
|
-
else if (resource.memory <
|
|
53
|
+
else if (resource.memory < 1 || resource.memory > 10) {
|
|
55
54
|
errors.push({
|
|
56
|
-
message: `${msgPrefix} memory must be between
|
|
55
|
+
message: `${msgPrefix} memory must be between 1 and 10 (GB)`,
|
|
57
56
|
type: BlueprintParserErrorType.InvalidValue,
|
|
58
57
|
});
|
|
59
58
|
}
|
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": "6.
|
|
4
|
+
"version": "6.2.0",
|
|
5
5
|
"author": "Sanity Runtime Team",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"license": "MIT",
|
|
@@ -84,6 +84,7 @@
|
|
|
84
84
|
"@codemirror/lang-json": "^6.0.1",
|
|
85
85
|
"@codemirror/state": "^6.5.2",
|
|
86
86
|
"@enhance/store": "^1.0.2",
|
|
87
|
+
"@lezer/highlight": "^1.2.1",
|
|
87
88
|
"@oclif/test": "^4.1.12",
|
|
88
89
|
"@rollup/plugin-node-resolve": "^16.0.1",
|
|
89
90
|
"@sanity/client": "^6.29.0",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<svg data-sanity-icon="sanity-monogram" width="1em" height="1em" viewBox="0 0 128 128" fill="none" xmlns="http://www.w3.org/2000/svg"><rect width="128" height="128" rx="8" fill="#ef4434"></rect><path d="M39.423 33.163C39.423 44.1615 46.3363 50.7056 60.1768 54.1564L74.843 57.4972C87.9418 60.453 95.9186 67.7945 95.9186 79.7554C96.0205 84.9662 94.2961 90.0531 91.0345 94.1635C91.0345 82.2301 84.751 75.7822 69.595 71.9052L55.1948 68.6882C43.6633 66.1035 34.7629 60.0681 34.7629 47.0761C34.7022 42.0589 36.3416 37.1644 39.423 33.163" fill="#ffffff"></path><path d="M82.0221 76.827C88.2776 80.759 91.0206 86.2582 91.0206 94.1497C85.8426 100.666 76.7462 104.323 66.0545 104.323C48.0576 104.323 35.4626 95.6207 32.6637 80.4977H49.9468C52.172 87.4406 58.0636 90.6576 65.9285 90.6576C75.5287 90.6576 81.9102 85.6258 82.0361 76.7995" fill="#ffdedc"></path><path d="M48.4075 49.4682C45.551 47.8004 43.2074 45.404 41.6256 42.5332C40.0437 39.6624 39.2826 36.4244 39.4231 33.1629C44.4191 26.7013 53.1096 22.7556 63.7034 22.7556C82.0362 22.7556 92.6439 32.2693 95.2609 45.66H78.6355C76.8022 40.3807 72.2121 36.27 63.8434 36.27C54.9009 36.27 48.7993 41.3843 48.4495 49.4682" fill="#ffdedc"></path></svg>
|