@cloudcannon/configuration-types 0.0.48 → 0.0.50
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 +1999 -932
- package/dist/cloudcannon-config.documentation.schema.json +178 -217
- package/dist/cloudcannon-config.latest.schema.json +3094 -1331
- package/dist/cloudcannon-config.legacy-eleventy.schema.json +235 -287
- package/dist/cloudcannon-config.legacy-hugo.schema.json +235 -287
- package/dist/cloudcannon-config.legacy-jekyll.schema.json +235 -287
- package/dist/cloudcannon-config.legacy-reader.schema.json +235 -287
- package/dist/cloudcannon-editables.schema.json +284 -134
- package/dist/cloudcannon-initial-site-settings.documentation.schema.json +116 -0
- package/dist/cloudcannon-initial-site-settings.schema.json +171 -0
- package/dist/cloudcannon-inputs.schema.json +1644 -781
- package/dist/cloudcannon-routing.documentation.schema.json +100 -0
- package/dist/cloudcannon-routing.schema.json +144 -0
- package/dist/cloudcannon-schemas.schema.json +1788 -842
- package/dist/cloudcannon-snippets-imports.schema.json +95 -51
- package/dist/cloudcannon-snippets.schema.json +2286 -999
- package/dist/cloudcannon-structure-value.schema.json +1508 -647
- package/dist/cloudcannon-structures.schema.json +1644 -781
- package/dist/documentation.json +51604 -50649
- package/package.json +1 -1
- package/src/cascade.ts +1 -6
- package/src/collections.ts +7 -1
- package/src/configuration.ts +2 -5
- package/src/editables.ts +40 -32
- package/src/index.ts +3 -24
- package/src/initial-site-settings.ts +82 -0
- package/src/inputs.ts +4 -4
- package/src/routing.ts +92 -0
- package/src/snippets.ts +48 -41
- package/src/ssg.ts +23 -0
- package/src/structures.ts +2 -0
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"title": "Routing",
|
|
4
|
+
"description": "Configuration for the `.cloudcannon/routing.json` file. Defines redirects, rewrites, and custom HTTP headers for your site.",
|
|
5
|
+
"id": "type.Routing",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"properties": {
|
|
8
|
+
"routes": {
|
|
9
|
+
"description": "An array of route rules for redirects and rewrites. Rules are processed in order; the first matching rule is applied.",
|
|
10
|
+
"type": "array",
|
|
11
|
+
"items": {
|
|
12
|
+
"description": "A single route rule for redirects or rewrites.",
|
|
13
|
+
"type": "object",
|
|
14
|
+
"properties": {
|
|
15
|
+
"from": {
|
|
16
|
+
"description": "The URL pattern to match incoming requests against. CloudCannon routing supports glob-style patterns.",
|
|
17
|
+
"type": "string"
|
|
18
|
+
},
|
|
19
|
+
"to": {
|
|
20
|
+
"description": "The destination path or URL for this route. Can be a relative path on the same site or an absolute URL for external redirects.",
|
|
21
|
+
"type": "string"
|
|
22
|
+
},
|
|
23
|
+
"status": {
|
|
24
|
+
"description": "The HTTP status code for this redirect rule. When using 200, 404, and 410 status codes, `to` must refer to a path on the same Site.",
|
|
25
|
+
"default": 301,
|
|
26
|
+
"type": "number",
|
|
27
|
+
"enum": [
|
|
28
|
+
200,
|
|
29
|
+
301,
|
|
30
|
+
302,
|
|
31
|
+
303,
|
|
32
|
+
307,
|
|
33
|
+
308,
|
|
34
|
+
404,
|
|
35
|
+
410
|
|
36
|
+
]
|
|
37
|
+
},
|
|
38
|
+
"forced": {
|
|
39
|
+
"description": "When true, the redirect will be applied even if a file exists at the `from` path.",
|
|
40
|
+
"default": false,
|
|
41
|
+
"type": "boolean"
|
|
42
|
+
},
|
|
43
|
+
"substitutions": {
|
|
44
|
+
"description": "When true, captured segments from glob patterns in `from` will be substituted into the `to` path.",
|
|
45
|
+
"default": true,
|
|
46
|
+
"type": "boolean"
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
"required": [
|
|
50
|
+
"from",
|
|
51
|
+
"to"
|
|
52
|
+
],
|
|
53
|
+
"additionalProperties": false
|
|
54
|
+
}
|
|
55
|
+
},
|
|
56
|
+
"headers": {
|
|
57
|
+
"description": "An array of header rules to apply custom HTTP headers to responses.",
|
|
58
|
+
"type": "array",
|
|
59
|
+
"items": {
|
|
60
|
+
"description": "A rule for applying custom HTTP headers to matching requests.",
|
|
61
|
+
"type": "object",
|
|
62
|
+
"properties": {
|
|
63
|
+
"match": {
|
|
64
|
+
"description": "A glob pattern to match request paths against. Headers will be applied to responses for matching paths.",
|
|
65
|
+
"type": "string"
|
|
66
|
+
},
|
|
67
|
+
"headers": {
|
|
68
|
+
"description": "The list of HTTP headers to set for matching requests.",
|
|
69
|
+
"type": "array",
|
|
70
|
+
"items": {
|
|
71
|
+
"description": "A single HTTP header name-value pair.",
|
|
72
|
+
"type": "object",
|
|
73
|
+
"properties": {
|
|
74
|
+
"name": {
|
|
75
|
+
"description": "The name of the HTTP header to set.",
|
|
76
|
+
"type": "string"
|
|
77
|
+
},
|
|
78
|
+
"value": {
|
|
79
|
+
"description": "The value of the HTTP header.",
|
|
80
|
+
"type": "string"
|
|
81
|
+
}
|
|
82
|
+
},
|
|
83
|
+
"required": [
|
|
84
|
+
"name",
|
|
85
|
+
"value"
|
|
86
|
+
],
|
|
87
|
+
"additionalProperties": false
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
},
|
|
91
|
+
"required": [
|
|
92
|
+
"match",
|
|
93
|
+
"headers"
|
|
94
|
+
],
|
|
95
|
+
"additionalProperties": false
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
},
|
|
99
|
+
"additionalProperties": false
|
|
100
|
+
}
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"title": "Routing",
|
|
4
|
+
"description": "Configuration for the `.cloudcannon/routing.json` file. Defines redirects, rewrites, and custom HTTP headers for your site.",
|
|
5
|
+
"$id": "https://github.com/cloudcannon/configuration-types/releases/latest/download/cloudcannon-routing.schema.json",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"properties": {
|
|
8
|
+
"routes": {
|
|
9
|
+
"description": "An array of route rules for redirects and rewrites. Rules are processed in order; the first matching rule is applied.",
|
|
10
|
+
"type": "array",
|
|
11
|
+
"items": {
|
|
12
|
+
"description": "A single route rule for redirects or rewrites.",
|
|
13
|
+
"type": "object",
|
|
14
|
+
"properties": {
|
|
15
|
+
"from": {
|
|
16
|
+
"description": "The URL pattern to match incoming requests against. CloudCannon routing supports glob-style patterns.",
|
|
17
|
+
"type": "string",
|
|
18
|
+
"documented": true,
|
|
19
|
+
"title": "from",
|
|
20
|
+
"markdownDescription": "The URL pattern to match incoming requests against. CloudCannon routing supports glob-style patterns."
|
|
21
|
+
},
|
|
22
|
+
"to": {
|
|
23
|
+
"description": "The destination path or URL for this route. Can be a relative path on the same site or an absolute URL for external redirects.",
|
|
24
|
+
"type": "string",
|
|
25
|
+
"documented": true,
|
|
26
|
+
"title": "to",
|
|
27
|
+
"markdownDescription": "The destination path or URL for this route. Can be a relative path on the same site or an absolute URL for external redirects."
|
|
28
|
+
},
|
|
29
|
+
"status": {
|
|
30
|
+
"description": "The HTTP status code for this redirect rule. When using 200, 404, and 410 status codes, `to` must refer to a path on the same Site.",
|
|
31
|
+
"default": 301,
|
|
32
|
+
"type": "number",
|
|
33
|
+
"enum": [
|
|
34
|
+
200,
|
|
35
|
+
301,
|
|
36
|
+
302,
|
|
37
|
+
303,
|
|
38
|
+
307,
|
|
39
|
+
308,
|
|
40
|
+
404,
|
|
41
|
+
410
|
|
42
|
+
],
|
|
43
|
+
"documented": true,
|
|
44
|
+
"title": "status",
|
|
45
|
+
"markdownDescription": "The HTTP status code for this redirect rule. When using 200, 404, and 410 status codes, `to` must refer to a path on the same Site."
|
|
46
|
+
},
|
|
47
|
+
"forced": {
|
|
48
|
+
"description": "When true, the redirect will be applied even if a file exists at the `from` path.",
|
|
49
|
+
"default": false,
|
|
50
|
+
"type": "boolean",
|
|
51
|
+
"documented": true,
|
|
52
|
+
"title": "forced",
|
|
53
|
+
"markdownDescription": "When true, the redirect will be applied even if a file exists at the `from` path."
|
|
54
|
+
},
|
|
55
|
+
"substitutions": {
|
|
56
|
+
"description": "When true, captured segments from glob patterns in `from` will be substituted into the `to` path.",
|
|
57
|
+
"default": true,
|
|
58
|
+
"type": "boolean",
|
|
59
|
+
"documented": true,
|
|
60
|
+
"title": "substitutions",
|
|
61
|
+
"markdownDescription": "When true, captured segments from glob patterns in `from` will be substituted into the `to` path."
|
|
62
|
+
}
|
|
63
|
+
},
|
|
64
|
+
"required": [
|
|
65
|
+
"from",
|
|
66
|
+
"to"
|
|
67
|
+
],
|
|
68
|
+
"additionalProperties": false,
|
|
69
|
+
"documented": true,
|
|
70
|
+
"title": "routes[*]",
|
|
71
|
+
"markdownDescription": "A single route rule for redirects or rewrites."
|
|
72
|
+
},
|
|
73
|
+
"documented": true,
|
|
74
|
+
"title": "routes",
|
|
75
|
+
"markdownDescription": "An array of route rules for redirects and rewrites. Rules are processed in order; the first matching rule is applied."
|
|
76
|
+
},
|
|
77
|
+
"headers": {
|
|
78
|
+
"description": "An array of header rules to apply custom HTTP headers to responses.",
|
|
79
|
+
"type": "array",
|
|
80
|
+
"items": {
|
|
81
|
+
"description": "A rule for applying custom HTTP headers to matching requests.",
|
|
82
|
+
"type": "object",
|
|
83
|
+
"properties": {
|
|
84
|
+
"match": {
|
|
85
|
+
"description": "A glob pattern to match request paths against. Headers will be applied to responses for matching paths.",
|
|
86
|
+
"type": "string",
|
|
87
|
+
"documented": true,
|
|
88
|
+
"title": "match",
|
|
89
|
+
"markdownDescription": "A glob pattern to match request paths against. Headers will be applied to responses for matching paths."
|
|
90
|
+
},
|
|
91
|
+
"headers": {
|
|
92
|
+
"description": "The list of HTTP headers to set for matching requests.",
|
|
93
|
+
"type": "array",
|
|
94
|
+
"items": {
|
|
95
|
+
"description": "A single HTTP header name-value pair.",
|
|
96
|
+
"type": "object",
|
|
97
|
+
"properties": {
|
|
98
|
+
"name": {
|
|
99
|
+
"description": "The name of the HTTP header to set.",
|
|
100
|
+
"type": "string",
|
|
101
|
+
"documented": true,
|
|
102
|
+
"title": "name",
|
|
103
|
+
"markdownDescription": "The name of the HTTP header to set."
|
|
104
|
+
},
|
|
105
|
+
"value": {
|
|
106
|
+
"description": "The value of the HTTP header.",
|
|
107
|
+
"type": "string",
|
|
108
|
+
"documented": true,
|
|
109
|
+
"title": "value",
|
|
110
|
+
"markdownDescription": "The value of the HTTP header."
|
|
111
|
+
}
|
|
112
|
+
},
|
|
113
|
+
"required": [
|
|
114
|
+
"name",
|
|
115
|
+
"value"
|
|
116
|
+
],
|
|
117
|
+
"additionalProperties": false,
|
|
118
|
+
"documented": true,
|
|
119
|
+
"title": "headers[*]",
|
|
120
|
+
"markdownDescription": "A single HTTP header name-value pair."
|
|
121
|
+
},
|
|
122
|
+
"documented": true,
|
|
123
|
+
"title": "headers",
|
|
124
|
+
"markdownDescription": "The list of HTTP headers to set for matching requests."
|
|
125
|
+
}
|
|
126
|
+
},
|
|
127
|
+
"required": [
|
|
128
|
+
"match",
|
|
129
|
+
"headers"
|
|
130
|
+
],
|
|
131
|
+
"additionalProperties": false,
|
|
132
|
+
"documented": true,
|
|
133
|
+
"title": "headers[*]",
|
|
134
|
+
"markdownDescription": "A rule for applying custom HTTP headers to matching requests."
|
|
135
|
+
},
|
|
136
|
+
"documented": true,
|
|
137
|
+
"title": "headers",
|
|
138
|
+
"markdownDescription": "An array of header rules to apply custom HTTP headers to responses."
|
|
139
|
+
}
|
|
140
|
+
},
|
|
141
|
+
"additionalProperties": false,
|
|
142
|
+
"documented": false,
|
|
143
|
+
"markdownDescription": "Configuration for the `.cloudcannon/routing.json` file. Defines redirects, rewrites, and custom HTTP headers for your site."
|
|
144
|
+
}
|