@adobe/helix-config 2.5.5 → 2.6.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/CHANGELOG.md +7 -0
- package/package.json +5 -2
- package/src/schemas/access-admin.schema.cjs +12 -0
- package/src/schemas/access-site.schema.cjs +12 -0
- package/src/schemas/access.schema.cjs +12 -0
- package/src/schemas/access.schema.json +29 -0
- package/src/schemas/cdn.schema.cjs +12 -0
- package/src/schemas/cdn.schema.json +233 -0
- package/src/schemas/code.schema.cjs +12 -0
- package/src/schemas/code.schema.json +53 -0
- package/src/schemas/common.schema.cjs +12 -0
- package/src/schemas/content-source-google.schema.cjs +12 -0
- package/src/schemas/content-source-markup.schema.cjs +12 -0
- package/src/schemas/content-source-onedrive.schema.cjs +12 -0
- package/src/schemas/content.schema.cjs +12 -0
- package/src/schemas/content.schema.json +35 -0
- package/src/schemas/folders.schema.cjs +12 -0
- package/src/schemas/folders.schema.json +25 -0
- package/src/schemas/metadata-source.schema.cjs +12 -0
- package/src/schemas/metadata-source.schema.json +26 -0
- package/src/schemas/profile.schema.cjs +12 -0
- package/src/schemas/profile.schema.json +55 -0
- package/src/schemas/sidekick.schema.cjs +12 -0
- package/src/schemas/site.schema.cjs +12 -0
- package/src/schemas/site.schema.json +62 -0
- package/src/storage/ValidationError.js +46 -0
- package/src/storage/config-store.js +20 -3
- package/src/storage/config-validator.js +77 -0
- package/src/storage/utils.js +65 -11
- package/types/profile-config.d.ts +249 -0
- package/types/site-config.d.ts +25 -16
- package/src/schemas/cdn-config.schema.json +0 -182
- package/src/schemas/site-config.schema.json +0 -146
- /package/src/schemas/{admin-access-config.schema.json → access-admin.schema.json} +0 -0
- /package/src/schemas/{access-config.schema.json → access-site.schema.json} +0 -0
- /package/src/schemas/{content-google.schema.json → content-source-google.schema.json} +0 -0
- /package/src/schemas/{content-markup.schema.json → content-source-markup.schema.json} +0 -0
- /package/src/schemas/{content-onedrive.schema.json → content-source-onedrive.schema.json} +0 -0
- /package/src/schemas/{sidekick-config.schema.json → sidekick.schema.json} +0 -0
package/types/site-config.d.ts
CHANGED
|
@@ -28,24 +28,12 @@ export interface HelixSiteConfig {
|
|
|
28
28
|
description?: string;
|
|
29
29
|
content: ContentBus;
|
|
30
30
|
code: CodeBus;
|
|
31
|
-
folders?:
|
|
32
|
-
/**
|
|
33
|
-
* This interface was referenced by `undefined`'s JSON-Schema definition
|
|
34
|
-
* via the `patternProperty` "^/[a-zA-Z0-9-/.]+$".
|
|
35
|
-
*/
|
|
36
|
-
[k: string]: [] | [string];
|
|
37
|
-
};
|
|
31
|
+
folders?: Folders;
|
|
38
32
|
headers?: ModifierMap;
|
|
39
33
|
cdn?: CDNConfig;
|
|
40
|
-
access?:
|
|
41
|
-
admin?: AdminAccessConfig;
|
|
42
|
-
preview?: SiteAccessConfig;
|
|
43
|
-
live?: SiteAccessConfig;
|
|
44
|
-
};
|
|
34
|
+
access?: Access;
|
|
45
35
|
sidekick?: SidekickConfig;
|
|
46
|
-
metadata?:
|
|
47
|
-
source?: [] | [string];
|
|
48
|
-
};
|
|
36
|
+
metadata?: Metadata;
|
|
49
37
|
}
|
|
50
38
|
/**
|
|
51
39
|
* Defines the content bus location and source.
|
|
@@ -104,6 +92,13 @@ export interface CodeBus {
|
|
|
104
92
|
};
|
|
105
93
|
[k: string]: unknown;
|
|
106
94
|
}
|
|
95
|
+
export interface Folders {
|
|
96
|
+
/**
|
|
97
|
+
* This interface was referenced by `Folders`'s JSON-Schema definition
|
|
98
|
+
* via the `patternProperty` "^/[a-zA-Z0-9-/.]+$".
|
|
99
|
+
*/
|
|
100
|
+
[k: string]: [] | [string];
|
|
101
|
+
}
|
|
107
102
|
export interface ModifierMap {
|
|
108
103
|
/**
|
|
109
104
|
* This interface was referenced by `ModifierMap`'s JSON-Schema definition
|
|
@@ -116,7 +111,7 @@ export interface KeyValuePair {
|
|
|
116
111
|
value: string;
|
|
117
112
|
}
|
|
118
113
|
export interface CDNConfig {
|
|
119
|
-
prod: FastlyConfig | AkamaiConfig | CloudflareConfig | ManagedConfig;
|
|
114
|
+
prod: FastlyConfig | AkamaiConfig | CloudflareConfig | ManagedConfig | EmptyConfig;
|
|
120
115
|
live?: {
|
|
121
116
|
/**
|
|
122
117
|
* Sidekick config to override the default preview host. it supports parameters $owner and $repo
|
|
@@ -193,6 +188,17 @@ export interface ManagedConfig {
|
|
|
193
188
|
*/
|
|
194
189
|
route?: string[];
|
|
195
190
|
}
|
|
191
|
+
export interface EmptyConfig {
|
|
192
|
+
/**
|
|
193
|
+
* production host
|
|
194
|
+
*/
|
|
195
|
+
host: string;
|
|
196
|
+
}
|
|
197
|
+
export interface Access {
|
|
198
|
+
admin?: AdminAccessConfig;
|
|
199
|
+
preview?: SiteAccessConfig;
|
|
200
|
+
live?: SiteAccessConfig;
|
|
201
|
+
}
|
|
196
202
|
export interface AdminAccessConfig {
|
|
197
203
|
role?: Role;
|
|
198
204
|
/**
|
|
@@ -241,3 +247,6 @@ export interface SidekickPlugin {
|
|
|
241
247
|
url: string;
|
|
242
248
|
[k: string]: unknown;
|
|
243
249
|
}
|
|
250
|
+
export interface Metadata {
|
|
251
|
+
source?: [] | [string];
|
|
252
|
+
}
|
|
@@ -1,182 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"meta:license": [
|
|
3
|
-
"Copyright 2023 Adobe. All rights reserved.",
|
|
4
|
-
"This file is licensed to you under the Apache License, Version 2.0 (the \"License\");",
|
|
5
|
-
"you may not use this file except in compliance with the License. You may obtain a copy",
|
|
6
|
-
"of the License at http://www.apache.org/licenses/LICENSE-2.0",
|
|
7
|
-
"",
|
|
8
|
-
"Unless required by applicable law or agreed to in writing, software distributed under",
|
|
9
|
-
"the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS",
|
|
10
|
-
"OF ANY KIND, either express or implied. See the License for the specific language",
|
|
11
|
-
"governing permissions and limitations under the License."
|
|
12
|
-
],
|
|
13
|
-
"$id": "https://ns.adobe.com/helix/config/cdn",
|
|
14
|
-
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
15
|
-
"$defs": {
|
|
16
|
-
"stringOrArray": {
|
|
17
|
-
"oneOf": [
|
|
18
|
-
{
|
|
19
|
-
"type": "string"
|
|
20
|
-
},
|
|
21
|
-
{
|
|
22
|
-
"type": "array",
|
|
23
|
-
"items": {
|
|
24
|
-
"type": "string"
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
]
|
|
28
|
-
}
|
|
29
|
-
},
|
|
30
|
-
"title": "CDN Config",
|
|
31
|
-
"type": "object",
|
|
32
|
-
"properties": {
|
|
33
|
-
"prod": {
|
|
34
|
-
"oneOf": [{
|
|
35
|
-
"type": "object",
|
|
36
|
-
"title": "FastlyConfig",
|
|
37
|
-
"description": "Production CDN configuration for Fastly",
|
|
38
|
-
"properties": {
|
|
39
|
-
"type": {
|
|
40
|
-
"type": "string",
|
|
41
|
-
"const": "fastly"
|
|
42
|
-
},
|
|
43
|
-
"host": {
|
|
44
|
-
"description": "production host",
|
|
45
|
-
"type": "string"
|
|
46
|
-
},
|
|
47
|
-
"route": {
|
|
48
|
-
"description": "Routes on the CDN that are rendered with Franklin",
|
|
49
|
-
"type": "array",
|
|
50
|
-
"items": {
|
|
51
|
-
"type": "string"
|
|
52
|
-
}
|
|
53
|
-
},
|
|
54
|
-
"serviceId": {
|
|
55
|
-
"description": "The Fastly Service ID",
|
|
56
|
-
"type": "string"
|
|
57
|
-
},
|
|
58
|
-
"authToken": {
|
|
59
|
-
"description": "A Fastly token for purging",
|
|
60
|
-
"type": "string"
|
|
61
|
-
}
|
|
62
|
-
},
|
|
63
|
-
"required": ["type", "host", "serviceId", "authToken"],
|
|
64
|
-
"additionalProperties": false
|
|
65
|
-
}, {
|
|
66
|
-
"type": "object",
|
|
67
|
-
"title": "AkamaiConfig",
|
|
68
|
-
"properties": {
|
|
69
|
-
"type": {
|
|
70
|
-
"type": "string",
|
|
71
|
-
"const": "akamai"
|
|
72
|
-
},
|
|
73
|
-
"host": {
|
|
74
|
-
"description": "production host",
|
|
75
|
-
"type": "string"
|
|
76
|
-
},
|
|
77
|
-
"route": {
|
|
78
|
-
"description": "Routes on the CDN that are rendered with Franklin",
|
|
79
|
-
"type": "array",
|
|
80
|
-
"items": {
|
|
81
|
-
"type": "string"
|
|
82
|
-
}
|
|
83
|
-
},
|
|
84
|
-
"endpoint": {
|
|
85
|
-
"type": "string"
|
|
86
|
-
},
|
|
87
|
-
"clientSecret": {
|
|
88
|
-
"type": "string"
|
|
89
|
-
},
|
|
90
|
-
"clientToken": {
|
|
91
|
-
"type": "string"
|
|
92
|
-
},
|
|
93
|
-
"accessToken": {
|
|
94
|
-
"type": "string"
|
|
95
|
-
}
|
|
96
|
-
},
|
|
97
|
-
"required": ["type", "host", "endpoint", "clientSecret", "clientToken", "accessToken"],
|
|
98
|
-
"additionalProperties": false
|
|
99
|
-
}, {
|
|
100
|
-
"type": "object",
|
|
101
|
-
"title": "CloudflareConfig",
|
|
102
|
-
"properties": {
|
|
103
|
-
"type": {
|
|
104
|
-
"type": "string",
|
|
105
|
-
"const": "cloudflare"
|
|
106
|
-
},
|
|
107
|
-
"host": {
|
|
108
|
-
"description": "production host",
|
|
109
|
-
"type": "string"
|
|
110
|
-
},
|
|
111
|
-
"route": {
|
|
112
|
-
"description": "Routes on the CDN that are rendered with Franklin",
|
|
113
|
-
"type": "array",
|
|
114
|
-
"items": {
|
|
115
|
-
"type": "string"
|
|
116
|
-
}
|
|
117
|
-
},
|
|
118
|
-
"origin": {
|
|
119
|
-
"type": "string"
|
|
120
|
-
},
|
|
121
|
-
"plan": {
|
|
122
|
-
"type": "string"
|
|
123
|
-
},
|
|
124
|
-
"zoneId": {
|
|
125
|
-
"type": "string"
|
|
126
|
-
},
|
|
127
|
-
"apiToken": {
|
|
128
|
-
"type": "string"
|
|
129
|
-
}
|
|
130
|
-
},
|
|
131
|
-
"required": ["type", "host", "origin", "plan", "zoneId", "apiToken"],
|
|
132
|
-
"additionalProperties": false
|
|
133
|
-
}, {
|
|
134
|
-
"type": "object",
|
|
135
|
-
"title": "ManagedConfig",
|
|
136
|
-
"properties": {
|
|
137
|
-
"type": {
|
|
138
|
-
"type": "string",
|
|
139
|
-
"const": "managed"
|
|
140
|
-
},
|
|
141
|
-
"host": {
|
|
142
|
-
"description": "production host",
|
|
143
|
-
"type": "string"
|
|
144
|
-
},
|
|
145
|
-
"route": {
|
|
146
|
-
"description": "Routes on the CDN that are rendered with Franklin",
|
|
147
|
-
"type": "array",
|
|
148
|
-
"items": {
|
|
149
|
-
"type": "string"
|
|
150
|
-
}
|
|
151
|
-
}
|
|
152
|
-
},
|
|
153
|
-
"required": [ "type", "host"],
|
|
154
|
-
"additionalProperties": false
|
|
155
|
-
}]
|
|
156
|
-
},
|
|
157
|
-
"live": {
|
|
158
|
-
"properties": {
|
|
159
|
-
"host": {
|
|
160
|
-
"description": "Sidekick config to override the default preview host. it supports parameters $owner and $repo",
|
|
161
|
-
"examples": ["main--$repo--page.example.com"],
|
|
162
|
-
"type": "string"
|
|
163
|
-
}
|
|
164
|
-
},
|
|
165
|
-
"required": ["host"],
|
|
166
|
-
"additionalProperties": false
|
|
167
|
-
},
|
|
168
|
-
"preview": {
|
|
169
|
-
"properties": {
|
|
170
|
-
"host": {
|
|
171
|
-
"description": "Sidekick config to override the default live host. it supports parameters $owner and $repo",
|
|
172
|
-
"examples": ["main--$repo--live.example.com\""],
|
|
173
|
-
"type": "string"
|
|
174
|
-
}
|
|
175
|
-
},
|
|
176
|
-
"required": ["host"],
|
|
177
|
-
"additionalProperties": false
|
|
178
|
-
}
|
|
179
|
-
},
|
|
180
|
-
"required": ["prod"],
|
|
181
|
-
"additionalProperties": false
|
|
182
|
-
}
|
|
@@ -1,146 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"meta:license": [
|
|
3
|
-
"Copyright 2024 Adobe. All rights reserved.",
|
|
4
|
-
"This file is licensed to you under the Apache License, Version 2.0 (the \"License\");",
|
|
5
|
-
"you may not use this file except in compliance with the License. You may obtain a copy",
|
|
6
|
-
"of the License at http://www.apache.org/licenses/LICENSE-2.0",
|
|
7
|
-
"",
|
|
8
|
-
"Unless required by applicable law or agreed to in writing, software distributed under",
|
|
9
|
-
"the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS",
|
|
10
|
-
"OF ANY KIND, either express or implied. See the License for the specific language",
|
|
11
|
-
"governing permissions and limitations under the License."
|
|
12
|
-
],
|
|
13
|
-
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
14
|
-
"$id": "https://ns.adobe.com/helix/config/site",
|
|
15
|
-
"title": "Helix Site Config",
|
|
16
|
-
"type": "object",
|
|
17
|
-
"properties": {
|
|
18
|
-
"version": {
|
|
19
|
-
"type": "integer",
|
|
20
|
-
"enum": [1]
|
|
21
|
-
},
|
|
22
|
-
"name": {
|
|
23
|
-
"type": "string",
|
|
24
|
-
"description": "Site name; part of the hostname",
|
|
25
|
-
"format": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
|
|
26
|
-
},
|
|
27
|
-
"title": { "$ref": "common.schema.json#/$defs/title" },
|
|
28
|
-
"description": { "$ref": "common.schema.json#/$defs/description" },
|
|
29
|
-
|
|
30
|
-
"content": {
|
|
31
|
-
"type": "object",
|
|
32
|
-
"title": "Content Bus",
|
|
33
|
-
"description": "Defines the content bus location and source.",
|
|
34
|
-
"properties": {
|
|
35
|
-
"title": { "$ref": "common.schema.json#/$defs/title" },
|
|
36
|
-
"description": { "$ref": "common.schema.json#/$defs/description" },
|
|
37
|
-
"contentBusId": {"type": "string" },
|
|
38
|
-
"source": {
|
|
39
|
-
"oneOf": [
|
|
40
|
-
{ "$ref": "content-google.schema.json" },
|
|
41
|
-
{ "$ref": "content-onedrive.schema.json" },
|
|
42
|
-
{ "$ref": "content-markup.schema.json" }
|
|
43
|
-
]
|
|
44
|
-
}
|
|
45
|
-
},
|
|
46
|
-
"required": [
|
|
47
|
-
"contentBusId",
|
|
48
|
-
"source"
|
|
49
|
-
],
|
|
50
|
-
"additionalProperties": false
|
|
51
|
-
},
|
|
52
|
-
"code": {
|
|
53
|
-
"type": "object",
|
|
54
|
-
"title": "Code Bus",
|
|
55
|
-
"description": "Defines the code bus location and source.",
|
|
56
|
-
"properties": {
|
|
57
|
-
"title": { "$ref": "common.schema.json#/$defs/title" },
|
|
58
|
-
"description": { "$ref": "common.schema.json#/$defs/description" },
|
|
59
|
-
"owner": {
|
|
60
|
-
"$comment": "Note, that owner/repo are no longer part of the hostname and can therefor have more allowed characters than in helix4",
|
|
61
|
-
"type": "string",
|
|
62
|
-
"format": "[a-zA-Z0-9_-]+"
|
|
63
|
-
},
|
|
64
|
-
"repo": {
|
|
65
|
-
"type": "string",
|
|
66
|
-
"format": "[a-zA-Z0-9_-]+"
|
|
67
|
-
},
|
|
68
|
-
"source": {
|
|
69
|
-
"type": "object",
|
|
70
|
-
"properties": {
|
|
71
|
-
"type": {
|
|
72
|
-
"const": "github"
|
|
73
|
-
},
|
|
74
|
-
"url": {
|
|
75
|
-
"type": "string",
|
|
76
|
-
"format": "uri"
|
|
77
|
-
}
|
|
78
|
-
},
|
|
79
|
-
"required": [
|
|
80
|
-
"type",
|
|
81
|
-
"url"
|
|
82
|
-
],
|
|
83
|
-
"additionalProperties": false
|
|
84
|
-
}
|
|
85
|
-
},
|
|
86
|
-
"required": [
|
|
87
|
-
"owner",
|
|
88
|
-
"repo",
|
|
89
|
-
"source"
|
|
90
|
-
]
|
|
91
|
-
},
|
|
92
|
-
"folders": {
|
|
93
|
-
"type": "object",
|
|
94
|
-
"patternProperties": {
|
|
95
|
-
"^/[a-zA-Z0-9-/.]+$": {
|
|
96
|
-
"type": "array",
|
|
97
|
-
"items": [
|
|
98
|
-
{ "type": "string" }
|
|
99
|
-
]
|
|
100
|
-
}
|
|
101
|
-
}
|
|
102
|
-
},
|
|
103
|
-
"headers": {
|
|
104
|
-
"$ref": "common.schema.json#/$defs/modifier-map"
|
|
105
|
-
},
|
|
106
|
-
"cdn": {
|
|
107
|
-
"$ref": "cdn-config.schema.json"
|
|
108
|
-
},
|
|
109
|
-
"access": {
|
|
110
|
-
"type": "object",
|
|
111
|
-
"properties": {
|
|
112
|
-
"admin": {
|
|
113
|
-
"$ref": "admin-access-config.schema.json"
|
|
114
|
-
},
|
|
115
|
-
"preview": {
|
|
116
|
-
"$ref": "access-config.schema.json"
|
|
117
|
-
},
|
|
118
|
-
"live": {
|
|
119
|
-
"$ref": "access-config.schema.json"
|
|
120
|
-
}
|
|
121
|
-
},
|
|
122
|
-
"additionalProperties": false
|
|
123
|
-
},
|
|
124
|
-
"sidekick": {
|
|
125
|
-
"$ref": "sidekick-config.schema.json"
|
|
126
|
-
},
|
|
127
|
-
"metadata": {
|
|
128
|
-
"type": "object",
|
|
129
|
-
"properties": {
|
|
130
|
-
"source": {
|
|
131
|
-
"type": "array",
|
|
132
|
-
"items": [
|
|
133
|
-
{ "type": "string" }
|
|
134
|
-
]
|
|
135
|
-
}
|
|
136
|
-
},
|
|
137
|
-
"additionalProperties": false
|
|
138
|
-
}
|
|
139
|
-
},
|
|
140
|
-
"required": [
|
|
141
|
-
"version",
|
|
142
|
-
"content",
|
|
143
|
-
"code"
|
|
144
|
-
],
|
|
145
|
-
"additionalProperties": false
|
|
146
|
-
}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|