@cloudcannon/configuration-types 0.0.42 → 0.0.44
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/dist/cloudcannon-collections.schema.json +9677 -0
- package/dist/cloudcannon-config.documentation.schema.json +11087 -0
- package/dist/cloudcannon-config.latest.schema.json +3640 -2288
- package/dist/cloudcannon-config.legacy-eleventy.schema.json +11018 -9663
- package/dist/cloudcannon-config.legacy-hugo.schema.json +3482 -2127
- package/dist/cloudcannon-config.legacy-jekyll.schema.json +11018 -9663
- package/dist/cloudcannon-config.legacy-reader.schema.json +6664 -5314
- package/dist/cloudcannon-editables.schema.json +767 -0
- package/dist/cloudcannon-inputs.schema.json +8713 -0
- package/dist/cloudcannon-schemas.schema.json +9341 -0
- package/dist/cloudcannon-snippets-definitions.schema.json +9 -0
- package/dist/cloudcannon-snippets-imports.schema.json +340 -0
- package/dist/cloudcannon-snippets.schema.json +9960 -0
- package/dist/cloudcannon-structure-value.schema.json +8715 -0
- package/dist/cloudcannon-structures.schema.json +8713 -0
- package/dist/documentation.json +59120 -0
- package/package.json +14 -12
- package/src/build-coupled.ts +3 -6
- package/src/cascade.ts +9 -6
- package/src/collections.ts +262 -0
- package/src/configuration.ts +53 -369
- package/src/documentation.ts +1 -1
- package/src/editables.ts +12 -2
- package/src/icon.ts +1 -1
- package/src/index.ts +17 -16
- package/src/inputs.ts +117 -50
- package/src/markdown.ts +69 -68
- package/src/paths.ts +11 -36
- package/src/preview.ts +51 -116
- package/src/select-values.ts +5 -8
- package/src/snippets.ts +218 -49
- package/src/source-editor.ts +25 -52
- package/src/structures.ts +17 -8
- package/src/syntax.ts +0 -103
- package/src/timezone.ts +1 -5
package/src/structures.ts
CHANGED
|
@@ -1,9 +1,15 @@
|
|
|
1
1
|
import * as z from 'zod';
|
|
2
|
-
import { DocumentationSchema } from './documentation';
|
|
3
|
-
import { IconSchema } from './icon';
|
|
4
|
-
import { InputsSchema, ObjectInputGroupSchema } from './inputs';
|
|
5
|
-
import {
|
|
6
|
-
import { SelectDataSchema } from './select-values';
|
|
2
|
+
import { DocumentationSchema } from './documentation.ts';
|
|
3
|
+
import { IconSchema } from './icon.ts';
|
|
4
|
+
import { InputsSchema, ObjectInputGroupSchema } from './inputs.ts';
|
|
5
|
+
import { PreviewSchema } from './preview.ts';
|
|
6
|
+
import { SelectDataSchema } from './select-values.ts';
|
|
7
|
+
|
|
8
|
+
export const StructureReferenceSchema = z.string().meta({
|
|
9
|
+
id: 'type.structure-reference',
|
|
10
|
+
title: 'Structure Reference',
|
|
11
|
+
description: 'A reference to an existing structure.',
|
|
12
|
+
});
|
|
7
13
|
|
|
8
14
|
const StructureBaseSchema = z.object({
|
|
9
15
|
reorder_inputs: z.boolean().default(true).optional().meta({
|
|
@@ -25,16 +31,18 @@ const StructureBaseSchema = z.object({
|
|
|
25
31
|
|
|
26
32
|
export const StructureValueSchema = StructureBaseSchema.extend({
|
|
27
33
|
preview: PreviewSchema.optional(),
|
|
28
|
-
picker_preview:
|
|
34
|
+
picker_preview: PreviewSchema.optional(),
|
|
29
35
|
|
|
30
36
|
// This is the ReducedCascadeSchema - can't seem to reuse it due to Zod's limitations.
|
|
31
37
|
get _inputs() {
|
|
32
38
|
return InputsSchema.optional();
|
|
33
39
|
},
|
|
40
|
+
_inputs_from_glob: z.array(z.string()).optional(),
|
|
34
41
|
_select_data: SelectDataSchema.optional(),
|
|
35
42
|
get _structures() {
|
|
36
43
|
return StructuresSchema.optional();
|
|
37
44
|
},
|
|
45
|
+
_structures_from_glob: z.array(z.string()).optional(),
|
|
38
46
|
|
|
39
47
|
id: z.string().optional().meta({
|
|
40
48
|
description:
|
|
@@ -93,6 +101,7 @@ export const StructureSchema = z
|
|
|
93
101
|
values: z.array(StructureValueSchema).meta({
|
|
94
102
|
description: 'Defines what values are available to add when using this structure.',
|
|
95
103
|
}),
|
|
104
|
+
values_from_glob: z.array(z.string()).optional(),
|
|
96
105
|
id_key: z.string().default('_type').optional().meta({
|
|
97
106
|
description:
|
|
98
107
|
'Defines what key should be used to detect which structure an item is. If this key is not found in the existing structure, a comparison of key names is used. Defaults to "_type".',
|
|
@@ -103,14 +112,14 @@ export const StructureSchema = z
|
|
|
103
112
|
}),
|
|
104
113
|
})
|
|
105
114
|
.meta({
|
|
106
|
-
id: '
|
|
115
|
+
id: 'type.structure',
|
|
107
116
|
title: 'Structure',
|
|
108
117
|
description:
|
|
109
118
|
'Provides data formats when adding new items to arrays and objects, with options for how editors choose from available values.',
|
|
110
119
|
});
|
|
111
120
|
|
|
112
121
|
export const StructuresSchema = z.record(z.string(), StructureSchema).meta({
|
|
113
|
-
id: '_structures',
|
|
122
|
+
id: 'type._structures',
|
|
114
123
|
title: 'Structures',
|
|
115
124
|
description:
|
|
116
125
|
'Structured values for editors adding new items to arrays and objects. Entries here can be referenced in the configuration for `array` or `object` inputs.',
|
package/src/syntax.ts
CHANGED
|
@@ -2,177 +2,74 @@ import * as z from 'zod';
|
|
|
2
2
|
|
|
3
3
|
export const SyntaxSchema = z
|
|
4
4
|
.enum([
|
|
5
|
-
'abap',
|
|
6
|
-
'abc',
|
|
7
|
-
'actionscript',
|
|
8
|
-
'ada',
|
|
9
|
-
'alda',
|
|
10
|
-
'apache_conf',
|
|
11
|
-
'apex',
|
|
12
|
-
'applescript',
|
|
13
|
-
'aql',
|
|
14
|
-
'asciidoc',
|
|
15
|
-
'asl',
|
|
16
|
-
'assembly_x86',
|
|
17
|
-
'autohotkey',
|
|
18
|
-
'batchfile',
|
|
19
|
-
'c9search',
|
|
20
5
|
'c_cpp',
|
|
21
|
-
'cirru',
|
|
22
6
|
'clojure',
|
|
23
7
|
'cobol',
|
|
24
8
|
'coffee',
|
|
25
|
-
'coldfusion',
|
|
26
|
-
'crystal',
|
|
27
9
|
'csharp',
|
|
28
|
-
'csound_document',
|
|
29
|
-
'csound_orchestra',
|
|
30
|
-
'csound_score',
|
|
31
|
-
'csp',
|
|
32
10
|
'css',
|
|
33
|
-
'curly',
|
|
34
11
|
'd',
|
|
35
12
|
'dart',
|
|
36
13
|
'diff',
|
|
37
|
-
'django',
|
|
38
14
|
'dockerfile',
|
|
39
|
-
'dot',
|
|
40
|
-
'drools',
|
|
41
|
-
'edifact',
|
|
42
15
|
'eiffel',
|
|
43
|
-
'ejs',
|
|
44
|
-
'elixir',
|
|
45
16
|
'elm',
|
|
46
17
|
'erlang',
|
|
47
18
|
'forth',
|
|
48
19
|
'fortran',
|
|
49
20
|
'fsharp',
|
|
50
|
-
'fsl',
|
|
51
|
-
'ftl',
|
|
52
|
-
'gcode',
|
|
53
21
|
'gherkin',
|
|
54
|
-
'gitignore',
|
|
55
|
-
'glsl',
|
|
56
|
-
'gobstones',
|
|
57
22
|
'golang',
|
|
58
|
-
'graphqlschema',
|
|
59
23
|
'groovy',
|
|
60
|
-
'haml',
|
|
61
|
-
'handlebars',
|
|
62
24
|
'haskell',
|
|
63
25
|
'haskell_cabal',
|
|
64
26
|
'haxe',
|
|
65
|
-
'hjson',
|
|
66
27
|
'html',
|
|
67
|
-
'html_elixir',
|
|
68
|
-
'html_ruby',
|
|
69
|
-
'ini',
|
|
70
|
-
'io',
|
|
71
|
-
'jack',
|
|
72
|
-
'jade',
|
|
73
28
|
'java',
|
|
74
29
|
'javascript',
|
|
75
|
-
'json5',
|
|
76
30
|
'json',
|
|
77
|
-
'jsoniq',
|
|
78
|
-
'jsp',
|
|
79
|
-
'jssm',
|
|
80
|
-
'jsx',
|
|
81
31
|
'julia',
|
|
82
32
|
'kotlin',
|
|
83
|
-
'latex',
|
|
84
33
|
'less',
|
|
85
34
|
'liquid',
|
|
86
|
-
'lisp',
|
|
87
35
|
'livescript',
|
|
88
|
-
'logiql',
|
|
89
|
-
'logtalk',
|
|
90
|
-
'lsl',
|
|
91
36
|
'lua',
|
|
92
|
-
'luapage',
|
|
93
|
-
'lucene',
|
|
94
|
-
'makefile',
|
|
95
37
|
'markdown',
|
|
96
|
-
'mask',
|
|
97
|
-
'matlab',
|
|
98
|
-
'maze',
|
|
99
|
-
'mediawiki',
|
|
100
|
-
'mel',
|
|
101
|
-
'mixal',
|
|
102
|
-
'mushcode',
|
|
103
38
|
'mysql',
|
|
104
39
|
'nginx',
|
|
105
|
-
'nim',
|
|
106
|
-
'nix',
|
|
107
40
|
'nsis',
|
|
108
|
-
'nunjucks',
|
|
109
41
|
'objectivec',
|
|
110
42
|
'ocaml',
|
|
111
43
|
'pascal',
|
|
112
|
-
'perl6',
|
|
113
|
-
'perl',
|
|
114
44
|
'pgsql',
|
|
115
|
-
'php',
|
|
116
|
-
'php_laravel_blade',
|
|
117
45
|
'pig',
|
|
118
|
-
'plain_text',
|
|
119
46
|
'powershell',
|
|
120
|
-
'praat',
|
|
121
|
-
'prisma',
|
|
122
|
-
'prolog',
|
|
123
47
|
'properties',
|
|
124
48
|
'protobuf',
|
|
125
49
|
'puppet',
|
|
126
50
|
'python',
|
|
127
|
-
'qml',
|
|
128
51
|
'r',
|
|
129
|
-
'razor',
|
|
130
|
-
'rdoc',
|
|
131
|
-
'red',
|
|
132
|
-
'redshift',
|
|
133
|
-
'rhtml',
|
|
134
|
-
'rst',
|
|
135
52
|
'ruby',
|
|
136
53
|
'rust',
|
|
137
54
|
'sass',
|
|
138
|
-
'scad',
|
|
139
55
|
'scala',
|
|
140
56
|
'scheme',
|
|
141
57
|
'scss',
|
|
142
58
|
'sh',
|
|
143
|
-
'sjs',
|
|
144
|
-
'slim',
|
|
145
|
-
'smarty',
|
|
146
|
-
'snippets',
|
|
147
|
-
'soy_template',
|
|
148
|
-
'space',
|
|
149
|
-
'sparql',
|
|
150
59
|
'sql',
|
|
151
|
-
'sqlserver',
|
|
152
60
|
'stylus',
|
|
153
|
-
'svg',
|
|
154
61
|
'swift',
|
|
155
62
|
'tcl',
|
|
156
|
-
'terraform',
|
|
157
|
-
'tex',
|
|
158
|
-
'text',
|
|
159
|
-
'textile',
|
|
160
63
|
'toml',
|
|
161
|
-
'tsx',
|
|
162
64
|
'turtle',
|
|
163
|
-
'twig',
|
|
164
65
|
'typescript',
|
|
165
|
-
'vala',
|
|
166
66
|
'vbscript',
|
|
167
67
|
'velocity',
|
|
168
68
|
'verilog',
|
|
169
69
|
'vhdl',
|
|
170
|
-
'visualforce',
|
|
171
|
-
'wollok',
|
|
172
70
|
'xml',
|
|
173
71
|
'xquery',
|
|
174
72
|
'yaml',
|
|
175
|
-
'zeek',
|
|
176
73
|
])
|
|
177
74
|
.meta({
|
|
178
75
|
id: 'Syntax',
|
package/src/timezone.ts
CHANGED
|
@@ -598,10 +598,6 @@ export const TimezoneSchema = z
|
|
|
598
598
|
'WET',
|
|
599
599
|
'Zulu',
|
|
600
600
|
])
|
|
601
|
-
.meta({
|
|
602
|
-
id: 'Timezone',
|
|
603
|
-
title: 'Timezone',
|
|
604
|
-
description: 'IANA timezone identifiers for date and time formatting in CloudCannon.',
|
|
605
|
-
});
|
|
601
|
+
.meta({ id: 'type.timezone', title: 'Timezone' });
|
|
606
602
|
|
|
607
603
|
export type Timezone = z.infer<typeof TimezoneSchema>;
|