@cloudcannon/configuration-types 0.0.43 → 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 +151 -2
- package/dist/cloudcannon-config.latest.schema.json +151 -1
- package/dist/cloudcannon-config.legacy-eleventy.schema.json +151 -1
- package/dist/cloudcannon-config.legacy-hugo.schema.json +151 -1
- package/dist/cloudcannon-config.legacy-jekyll.schema.json +151 -1
- package/dist/cloudcannon-config.legacy-reader.schema.json +151 -1
- 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 +8589 -161967
- package/package.json +10 -12
- package/src/build-coupled.ts +3 -3
- package/src/cascade.ts +7 -4
- package/src/collections.ts +5 -4
- package/src/configuration.ts +13 -9
- package/src/documentation.ts +1 -1
- package/src/editables.ts +2 -2
- package/src/index.ts +17 -17
- package/src/inputs.ts +12 -12
- package/src/snippets.ts +2 -2
- package/src/structures.ts +8 -5
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cloudcannon/configuration-types",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.44",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Contains TypeScript declarations and generates JSONSchema files for the CloudCannon configuration file.",
|
|
6
6
|
"author": "CloudCannon <support@cloudcannon.com>",
|
|
@@ -31,9 +31,9 @@
|
|
|
31
31
|
"lint:staged": "biome check --diagnostic-level=error --staged --no-errors-on-unmatched",
|
|
32
32
|
"site:dev": "http-server site -p 12345 -c-1",
|
|
33
33
|
"site:build": "cp dist/*.schema.json site/.",
|
|
34
|
-
"test": "
|
|
35
|
-
"test:watch": "
|
|
36
|
-
"test:coverage": "
|
|
34
|
+
"test": "node --experimental-strip-types --test",
|
|
35
|
+
"test:watch": "node --experimental-strip-types --test --watch",
|
|
36
|
+
"test:coverage": "node --test --experimental-test-coverage --test-reporter=lcov --test-reporter-destination=lcov.info"
|
|
37
37
|
},
|
|
38
38
|
"main": "./src/index.ts",
|
|
39
39
|
"types": "./src/index.ts",
|
|
@@ -45,17 +45,15 @@
|
|
|
45
45
|
"dist/**/*"
|
|
46
46
|
],
|
|
47
47
|
"dependencies": {
|
|
48
|
-
"zod": "^4.
|
|
48
|
+
"zod": "^4.1.13"
|
|
49
49
|
},
|
|
50
50
|
"devDependencies": {
|
|
51
|
-
"@biomejs/biome": "
|
|
51
|
+
"@biomejs/biome": "2.3.8",
|
|
52
52
|
"@types/js-yaml": "^4.0.9",
|
|
53
|
-
"@types/node": "^24.
|
|
54
|
-
"@vitest/coverage-v8": "^3.2.4",
|
|
53
|
+
"@types/node": "^24.10.1",
|
|
55
54
|
"http-server": "^14.1.1",
|
|
56
|
-
"js-yaml": "^4.1.
|
|
57
|
-
"tsx": "^4.
|
|
58
|
-
"typescript": "^5.9.
|
|
59
|
-
"vitest": "^3.2.4"
|
|
55
|
+
"js-yaml": "^4.1.1",
|
|
56
|
+
"tsx": "^4.21.0",
|
|
57
|
+
"typescript": "^5.9.3"
|
|
60
58
|
}
|
|
61
59
|
}
|
package/src/build-coupled.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as z from 'zod';
|
|
2
|
-
import { CollectionConfigSchema } from './collections';
|
|
3
|
-
import { ConfigurationSchema, DataConfigEntrySchema } from './configuration';
|
|
4
|
-
import { PathsSchema } from './paths';
|
|
2
|
+
import { CollectionConfigSchema } from './collections.ts';
|
|
3
|
+
import { ConfigurationSchema, DataConfigEntrySchema } from './configuration.ts';
|
|
4
|
+
import { PathsSchema } from './paths.ts';
|
|
5
5
|
|
|
6
6
|
export const BuildCoupledPathsSchema = z
|
|
7
7
|
.object({
|
package/src/cascade.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import * as z from 'zod';
|
|
2
|
-
import { EditablesSchema } from './editables';
|
|
3
|
-
import { InputsSchema } from './inputs';
|
|
4
|
-
import { SelectDataSchema } from './select-values';
|
|
5
|
-
import { StructuresSchema } from './structures';
|
|
2
|
+
import { EditablesSchema } from './editables.ts';
|
|
3
|
+
import { InputsSchema } from './inputs.ts';
|
|
4
|
+
import { SelectDataSchema } from './select-values.ts';
|
|
5
|
+
import { StructuresSchema } from './structures.ts';
|
|
6
6
|
|
|
7
7
|
export const EditorKeySchema = z.enum(['visual', 'content', 'data']).meta({
|
|
8
8
|
id: 'EditorKey',
|
|
@@ -12,8 +12,10 @@ export const EditorKeySchema = z.enum(['visual', 'content', 'data']).meta({
|
|
|
12
12
|
|
|
13
13
|
export const ReducedCascadeSchema = z.object({
|
|
14
14
|
_inputs: InputsSchema.optional(),
|
|
15
|
+
_inputs_from_glob: z.array(z.string()).optional(),
|
|
15
16
|
_select_data: SelectDataSchema.optional(),
|
|
16
17
|
_structures: StructuresSchema.optional(),
|
|
18
|
+
_structures_from_glob: z.array(z.string()).optional(),
|
|
17
19
|
});
|
|
18
20
|
|
|
19
21
|
export const CascadeSchema = z.object({
|
|
@@ -31,6 +33,7 @@ export const CascadeSchema = z.object({
|
|
|
31
33
|
description:
|
|
32
34
|
'Configuration for editable regions in the Visual Editor, including content, block, link, image, and text editing options.',
|
|
33
35
|
}),
|
|
36
|
+
_editables_from_glob: z.array(z.string()).optional(),
|
|
34
37
|
});
|
|
35
38
|
|
|
36
39
|
export type EditorKey = z.infer<typeof EditorKeySchema>;
|
package/src/collections.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import * as z from 'zod';
|
|
2
|
-
import { CascadeSchema, EditorKeySchema, ReducedCascadeSchema } from './cascade';
|
|
3
|
-
import { DocumentationSchema } from './documentation';
|
|
4
|
-
import { IconSchema } from './icon';
|
|
5
|
-
import { PreviewSchema } from './preview';
|
|
2
|
+
import { CascadeSchema, EditorKeySchema, ReducedCascadeSchema } from './cascade.ts';
|
|
3
|
+
import { DocumentationSchema } from './documentation.ts';
|
|
4
|
+
import { IconSchema } from './icon.ts';
|
|
5
|
+
import { PreviewSchema } from './preview.ts';
|
|
6
6
|
|
|
7
7
|
export const HrefAddOptionSchema = z
|
|
8
8
|
.object({
|
|
@@ -231,6 +231,7 @@ export const CollectionConfigSchema = z
|
|
|
231
231
|
description:
|
|
232
232
|
'This key defines which Schemas are available to populate files in this Collection.',
|
|
233
233
|
}),
|
|
234
|
+
schemas_config_from_glob: z.array(z.string()).optional(),
|
|
234
235
|
schema_key: z.string().optional().meta({
|
|
235
236
|
description:
|
|
236
237
|
'This key defines the name for the structured data key that references the Schema a file uses.',
|
package/src/configuration.ts
CHANGED
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import * as z from 'zod';
|
|
2
|
-
import { CascadeSchema } from './cascade';
|
|
3
|
-
import { CollectionConfigSchema, CollectionGroupSchema } from './collections';
|
|
4
|
-
import { InputsSchema } from './inputs';
|
|
5
|
-
import { MarkdownSettingsSchema } from './markdown';
|
|
6
|
-
import { PathsSchema } from './paths';
|
|
7
|
-
import { SnippetConfigSchema } from './snippets';
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import { TimezoneSchema } from './timezone';
|
|
2
|
+
import { CascadeSchema } from './cascade.ts';
|
|
3
|
+
import { CollectionConfigSchema, CollectionGroupSchema } from './collections.ts';
|
|
4
|
+
import { InputsSchema } from './inputs.ts';
|
|
5
|
+
import { MarkdownSettingsSchema } from './markdown.ts';
|
|
6
|
+
import { PathsSchema } from './paths.ts';
|
|
7
|
+
import { SnippetConfigSchema, SnippetsImportsSchema } from './snippets.ts';
|
|
8
|
+
import { SourceEditorSchema } from './source-editor.ts';
|
|
9
|
+
import { TimezoneSchema } from './timezone.ts';
|
|
11
10
|
|
|
12
11
|
export const DataConfigEntrySchema = z.object({ path: z.string() }).meta({ id: 'DataConfigEntry' });
|
|
13
12
|
|
|
@@ -83,6 +82,7 @@ export const ConfigurationSchema = z
|
|
|
83
82
|
.record(z.string(), CollectionConfigSchema)
|
|
84
83
|
.optional()
|
|
85
84
|
.meta({ id: 'collections_config' }),
|
|
85
|
+
collections_config_from_glob: z.array(z.string()).optional(),
|
|
86
86
|
collection_groups: z
|
|
87
87
|
.array(CollectionGroupSchema)
|
|
88
88
|
.optional()
|
|
@@ -105,17 +105,21 @@ export const ConfigurationSchema = z
|
|
|
105
105
|
title: 'Snippets',
|
|
106
106
|
description: 'Configuration for custom snippets.',
|
|
107
107
|
}),
|
|
108
|
+
_snippets_from_glob: z.array(z.string()).optional(),
|
|
108
109
|
_snippets_imports: SnippetsImportsSchema.optional(),
|
|
110
|
+
_snippets_imports_from_glob: z.array(z.string()).optional(),
|
|
109
111
|
_snippets_templates: z.record(z.string(), SnippetConfigSchema).optional().meta({
|
|
110
112
|
id: 'type._snippets_templates',
|
|
111
113
|
title: 'Snippets Templates',
|
|
112
114
|
description: 'Extended option used when creating more complex custom snippets.',
|
|
113
115
|
}),
|
|
116
|
+
_snippets_templates_from_glob: z.array(z.string()).optional(),
|
|
114
117
|
_snippets_definitions: z.record(z.string(), z.unknown()).optional().meta({
|
|
115
118
|
id: 'type._snippets_definitions',
|
|
116
119
|
title: 'Snippets Definitions',
|
|
117
120
|
description: 'Extended option used when creating more complex custom snippets.',
|
|
118
121
|
}),
|
|
122
|
+
_snippets_definitions_from_glob: z.array(z.string()).optional(),
|
|
119
123
|
})
|
|
120
124
|
.meta({
|
|
121
125
|
title: 'Configuration',
|
package/src/documentation.ts
CHANGED
package/src/editables.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as z from 'zod';
|
|
2
|
-
import { ImageOptionsSchema } from './image-options';
|
|
3
|
-
import { PathsSchema } from './paths';
|
|
2
|
+
import { ImageOptionsSchema } from './image-options.ts';
|
|
3
|
+
import { PathsSchema } from './paths.ts';
|
|
4
4
|
|
|
5
5
|
export const TextEditableSchema = z.object({
|
|
6
6
|
paths: PathsSchema.optional(),
|
package/src/index.ts
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
import * as z from 'zod';
|
|
2
2
|
|
|
3
|
-
export * from './build-coupled';
|
|
4
|
-
export * from './cascade';
|
|
5
|
-
export * from './
|
|
6
|
-
export * from './
|
|
7
|
-
export * from './documentation';
|
|
8
|
-
export * from './editables';
|
|
9
|
-
export * from './icon';
|
|
10
|
-
export * from './image-options';
|
|
11
|
-
export * from './inputs';
|
|
12
|
-
export * from './markdown';
|
|
13
|
-
export * from './paths';
|
|
14
|
-
export * from './preview';
|
|
15
|
-
export * from './select-values';
|
|
16
|
-
export * from './snippets';
|
|
17
|
-
export * from './source-editor';
|
|
18
|
-
export * from './structures';
|
|
19
|
-
export * from './timezone';
|
|
3
|
+
export * from './build-coupled.ts';
|
|
4
|
+
export * from './cascade.ts';
|
|
5
|
+
export * from './collections.ts';
|
|
6
|
+
export * from './configuration.ts';
|
|
7
|
+
export * from './documentation.ts';
|
|
8
|
+
export * from './editables.ts';
|
|
9
|
+
export * from './icon.ts';
|
|
10
|
+
export * from './image-options.ts';
|
|
11
|
+
export * from './inputs.ts';
|
|
12
|
+
export * from './markdown.ts';
|
|
13
|
+
export * from './paths.ts';
|
|
14
|
+
export * from './preview.ts';
|
|
15
|
+
export * from './select-values.ts';
|
|
16
|
+
export * from './snippets.ts';
|
|
17
|
+
export * from './source-editor.ts';
|
|
18
|
+
export * from './structures.ts';
|
|
19
|
+
export * from './timezone.ts';
|
|
20
20
|
|
|
21
21
|
export const SsgKeySchema = z.enum([
|
|
22
22
|
'hugo',
|
package/src/inputs.ts
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import * as z from 'zod';
|
|
2
|
-
import { DocumentationSchema } from './documentation';
|
|
3
|
-
import { BlockEditableSchema } from './editables';
|
|
4
|
-
import { IconSchema } from './icon';
|
|
5
|
-
import { ImageOptionsSchema } from './image-options';
|
|
6
|
-
import { MimeTypeSchema } from './mimetype';
|
|
7
|
-
import { PathsSchema } from './paths';
|
|
8
|
-
import { PreviewEntriesSchema, PreviewSchema } from './preview';
|
|
9
|
-
import { SelectDataValuesSchema } from './select-values';
|
|
10
|
-
import { SourceEditorSchema } from './source-editor';
|
|
11
|
-
import { StructureReferenceSchema, StructureSchema } from './structures';
|
|
12
|
-
import { SyntaxSchema } from './syntax';
|
|
13
|
-
import { TimezoneSchema } from './timezone';
|
|
2
|
+
import { DocumentationSchema } from './documentation.ts';
|
|
3
|
+
import { BlockEditableSchema } from './editables.ts';
|
|
4
|
+
import { IconSchema } from './icon.ts';
|
|
5
|
+
import { ImageOptionsSchema } from './image-options.ts';
|
|
6
|
+
import { MimeTypeSchema } from './mimetype.ts';
|
|
7
|
+
import { PathsSchema } from './paths.ts';
|
|
8
|
+
import { PreviewEntriesSchema, PreviewSchema } from './preview.ts';
|
|
9
|
+
import { SelectDataValuesSchema } from './select-values.ts';
|
|
10
|
+
import { SourceEditorSchema } from './source-editor.ts';
|
|
11
|
+
import { StructureReferenceSchema, StructureSchema } from './structures.ts';
|
|
12
|
+
import { SyntaxSchema } from './syntax.ts';
|
|
13
|
+
import { TimezoneSchema } from './timezone.ts';
|
|
14
14
|
|
|
15
15
|
export const InputTypeSchema = z
|
|
16
16
|
.enum([
|
package/src/snippets.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as z from 'zod';
|
|
2
|
-
import { ReducedCascadeSchema } from './cascade';
|
|
3
|
-
import { PreviewSchema } from './preview';
|
|
2
|
+
import { ReducedCascadeSchema } from './cascade.ts';
|
|
3
|
+
import { PreviewSchema } from './preview.ts';
|
|
4
4
|
|
|
5
5
|
export const ParserModelSchema = z.object({
|
|
6
6
|
source_key: z.string().optional(),
|
package/src/structures.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
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 { PreviewSchema } from './preview';
|
|
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
7
|
|
|
8
8
|
export const StructureReferenceSchema = z.string().meta({
|
|
9
9
|
id: 'type.structure-reference',
|
|
@@ -37,10 +37,12 @@ export const StructureValueSchema = StructureBaseSchema.extend({
|
|
|
37
37
|
get _inputs() {
|
|
38
38
|
return InputsSchema.optional();
|
|
39
39
|
},
|
|
40
|
+
_inputs_from_glob: z.array(z.string()).optional(),
|
|
40
41
|
_select_data: SelectDataSchema.optional(),
|
|
41
42
|
get _structures() {
|
|
42
43
|
return StructuresSchema.optional();
|
|
43
44
|
},
|
|
45
|
+
_structures_from_glob: z.array(z.string()).optional(),
|
|
44
46
|
|
|
45
47
|
id: z.string().optional().meta({
|
|
46
48
|
description:
|
|
@@ -99,6 +101,7 @@ export const StructureSchema = z
|
|
|
99
101
|
values: z.array(StructureValueSchema).meta({
|
|
100
102
|
description: 'Defines what values are available to add when using this structure.',
|
|
101
103
|
}),
|
|
104
|
+
values_from_glob: z.array(z.string()).optional(),
|
|
102
105
|
id_key: z.string().default('_type').optional().meta({
|
|
103
106
|
description:
|
|
104
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".',
|