@adobe/helix-config 3.13.2 → 4.1.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.
Files changed (73) hide show
  1. package/CHANGELOG.md +19 -0
  2. package/package.json +5 -15
  3. package/src/config-view.js +1 -11
  4. package/src/utils.js +0 -36
  5. package/src/schemas/access-admin.schema.cjs +0 -12
  6. package/src/schemas/access-admin.schema.json +0 -57
  7. package/src/schemas/access-site.schema.cjs +0 -12
  8. package/src/schemas/access-site.schema.json +0 -24
  9. package/src/schemas/access.schema.cjs +0 -12
  10. package/src/schemas/access.schema.json +0 -22
  11. package/src/schemas/cdn-prod-akamai.schema.cjs +0 -12
  12. package/src/schemas/cdn-prod-akamai.schema.json +0 -45
  13. package/src/schemas/cdn-prod-cloudflare.schema.cjs +0 -12
  14. package/src/schemas/cdn-prod-cloudflare.schema.json +0 -41
  15. package/src/schemas/cdn-prod-cloudfront.schema.cjs +0 -12
  16. package/src/schemas/cdn-prod-cloudfront.schema.json +0 -41
  17. package/src/schemas/cdn-prod-fastly.schema.cjs +0 -12
  18. package/src/schemas/cdn-prod-fastly.schema.json +0 -40
  19. package/src/schemas/cdn-prod-managed.schema.cjs +0 -12
  20. package/src/schemas/cdn-prod-managed.schema.json +0 -29
  21. package/src/schemas/cdn.schema.cjs +0 -12
  22. package/src/schemas/cdn.schema.json +0 -75
  23. package/src/schemas/code.schema.cjs +0 -12
  24. package/src/schemas/code.schema.json +0 -43
  25. package/src/schemas/common.schema.cjs +0 -12
  26. package/src/schemas/common.schema.json +0 -27
  27. package/src/schemas/content-source-google.schema.cjs +0 -12
  28. package/src/schemas/content-source-google.schema.json +0 -26
  29. package/src/schemas/content-source-markup.schema.cjs +0 -12
  30. package/src/schemas/content-source-markup.schema.json +0 -24
  31. package/src/schemas/content-source-onedrive.schema.cjs +0 -12
  32. package/src/schemas/content-source-onedrive.schema.json +0 -28
  33. package/src/schemas/content.schema.cjs +0 -12
  34. package/src/schemas/content.schema.json +0 -30
  35. package/src/schemas/folders.schema.cjs +0 -12
  36. package/src/schemas/folders.schema.json +0 -13
  37. package/src/schemas/groups.schema.cjs +0 -12
  38. package/src/schemas/groups.schema.json +0 -39
  39. package/src/schemas/headers.schema.cjs +0 -12
  40. package/src/schemas/headers.schema.json +0 -16
  41. package/src/schemas/metadata-source.schema.cjs +0 -12
  42. package/src/schemas/metadata-source.schema.json +0 -16
  43. package/src/schemas/org.schema.cjs +0 -12
  44. package/src/schemas/org.schema.json +0 -26
  45. package/src/schemas/profile.schema.cjs +0 -12
  46. package/src/schemas/profile.schema.json +0 -57
  47. package/src/schemas/profiles.schema.cjs +0 -12
  48. package/src/schemas/profiles.schema.json +0 -28
  49. package/src/schemas/public.schema.cjs +0 -12
  50. package/src/schemas/public.schema.json +0 -8
  51. package/src/schemas/robots.schema.cjs +0 -12
  52. package/src/schemas/robots.schema.json +0 -13
  53. package/src/schemas/sidekick.schema.cjs +0 -12
  54. package/src/schemas/sidekick.schema.json +0 -112
  55. package/src/schemas/site.schema.cjs +0 -12
  56. package/src/schemas/site.schema.json +0 -74
  57. package/src/schemas/sites.schema.cjs +0 -12
  58. package/src/schemas/sites.schema.json +0 -28
  59. package/src/schemas/tokens.schema.cjs +0 -12
  60. package/src/schemas/tokens.schema.json +0 -28
  61. package/src/schemas/user.schema.cjs +0 -12
  62. package/src/schemas/user.schema.json +0 -42
  63. package/src/schemas/users.schema.cjs +0 -12
  64. package/src/schemas/users.schema.json +0 -10
  65. package/src/storage/ValidationError.js +0 -95
  66. package/src/storage/config-store.js +0 -359
  67. package/src/storage/config-validator.js +0 -112
  68. package/src/storage/index.js +0 -14
  69. package/src/storage/status-code-error.js +0 -22
  70. package/src/storage/utils.js +0 -157
  71. package/types/org-config.d.ts +0 -51
  72. package/types/profile-config.d.ts +0 -368
  73. package/types/site-config.d.ts +0 -375
@@ -1,51 +0,0 @@
1
- /*
2
- * Copyright 2024 Adobe. All rights reserved.
3
- * This file is licensed to you under the Apache License, Version 2.0 (the "License");
4
- * you may not use this file except in compliance with the License. You may obtain a copy
5
- * of the License at http://www.apache.org/licenses/LICENSE-2.0
6
- *
7
- * Unless required by applicable law or agreed to in writing, software distributed under
8
- * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
9
- * OF ANY KIND, either express or implied. See the License for the specific language
10
- * governing permissions and limitations under the License.
11
- */
12
-
13
- // NOTE: this file is autogenerated via 'npm run docs:types'
14
-
15
- export type Users = User[];
16
-
17
- export interface HelixOrgConfig {
18
- version: 1;
19
- /**
20
- * human readable title. has no influence on the configuration.
21
- */
22
- title?: string;
23
- /**
24
- * description for clarity. has no influence on the configuration.
25
- */
26
- description?: string;
27
- users?: Users;
28
- groups?: Groups;
29
- }
30
- export interface User {
31
- id: string;
32
- email: string;
33
- name?: string;
34
- roles: ('admin' | 'author' | 'publish' | 'develop' | 'basic_author' | 'basic_publish' | 'config' | 'config_admin')[];
35
- }
36
- export interface Groups {
37
- [k: string]: Group;
38
- }
39
- /**
40
- * A group of members. Can be referenced in access.admin.role.
41
- *
42
- * This interface was referenced by `Groups`'s JSON-Schema definition
43
- * via the `patternProperty` "^[a-zA-Z0-9-_=]+$".
44
- */
45
- export interface Group {
46
- members: {
47
- email: string;
48
- name?: string;
49
- [k: string]: unknown;
50
- }[];
51
- }
@@ -1,368 +0,0 @@
1
- /*
2
- * Copyright 2024 Adobe. All rights reserved.
3
- * This file is licensed to you under the Apache License, Version 2.0 (the "License");
4
- * you may not use this file except in compliance with the License. You may obtain a copy
5
- * of the License at http://www.apache.org/licenses/LICENSE-2.0
6
- *
7
- * Unless required by applicable law or agreed to in writing, software distributed under
8
- * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
9
- * OF ANY KIND, either express or implied. See the License for the specific language
10
- * governing permissions and limitations under the License.
11
- */
12
-
13
- // NOTE: this file is autogenerated via 'npm run docs:types'
14
-
15
- export interface HelixProfileConfig {
16
- version: 1;
17
- /**
18
- * human readable title. has no influence on the configuration.
19
- */
20
- title?: string;
21
- /**
22
- * description for clarity. has no influence on the configuration.
23
- */
24
- description?: string;
25
- content?: ContentSource;
26
- code?: CodeSource;
27
- folders?: Folders;
28
- headers?: HelixHeadersConfig;
29
- cdn?: CDNConfig;
30
- access?: Access;
31
- tokens?: Tokens;
32
- groups?: Groups;
33
- sidekick?: SidekickConfig;
34
- metadata?: Metadata;
35
- robots?: Robots;
36
- public?: Public;
37
- }
38
- /**
39
- * Defines the content bus location and source.
40
- */
41
- export interface ContentSource {
42
- /**
43
- * human readable title. has no influence on the configuration.
44
- */
45
- title?: string;
46
- /**
47
- * description for clarity. has no influence on the configuration.
48
- */
49
- description?: string;
50
- contentBusId: string;
51
- source: GoogleContentSource | OnedriveContentSource | MarkupContentSource;
52
- }
53
- export interface GoogleContentSource {
54
- type: 'google';
55
- url: string;
56
- /**
57
- * Google drive ID of the root folder; updated automatically when updating the url.
58
- */
59
- id: string;
60
- }
61
- export interface OnedriveContentSource {
62
- type: 'onedrive';
63
- url: string;
64
- tenantId?: string;
65
- /**
66
- * onedrive item ID of the root folder; currently not required as we don't know how setup will work.
67
- */
68
- itemId?: string;
69
- }
70
- export interface MarkupContentSource {
71
- type: 'markup';
72
- url: string;
73
- suffix?: string;
74
- }
75
- /**
76
- * Defines the code bus location and source.
77
- */
78
- export interface CodeSource {
79
- /**
80
- * human readable title. has no influence on the configuration.
81
- */
82
- title?: string;
83
- /**
84
- * description for clarity. has no influence on the configuration.
85
- */
86
- description?: string;
87
- owner: string;
88
- repo: string;
89
- source: {
90
- type: 'github';
91
- url: string;
92
- };
93
- [k: string]: unknown;
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
- }
102
- export interface HelixHeadersConfig {
103
- /**
104
- * This interface was referenced by `HelixHeadersConfig`'s JSON-Schema definition
105
- * via the `patternProperty` "^/[a-zA-Z0-9-/.]*\*{0,2}$".
106
- */
107
- [k: string]: KeyValuePair[];
108
- }
109
- export interface KeyValuePair {
110
- key: string;
111
- value: string;
112
- }
113
- export interface CDNConfig {
114
- prod?: FastlyCDNConfig | CloudflareCDNConfig | AkamaiCDNConfig | ManagedCDNConfig | CloudfrontCDNConfig | EmptyConfig;
115
- live?: {
116
- /**
117
- * Sidekick config to override the default preview host. it supports parameters $owner and $repo
118
- */
119
- host: string;
120
- };
121
- preview?: {
122
- /**
123
- * Sidekick config to override the default live host. it supports parameters $owner and $repo
124
- */
125
- host: string;
126
- };
127
- }
128
- /**
129
- * Production CDN configuration for Fastly
130
- */
131
- export interface FastlyCDNConfig {
132
- type: 'fastly';
133
- /**
134
- * production host
135
- */
136
- host: string;
137
- /**
138
- * Routes on the CDN that are rendered with Franklin
139
- */
140
- route?: string[];
141
- /**
142
- * The Fastly Service ID
143
- */
144
- serviceId: string;
145
- /**
146
- * A Fastly token for purging
147
- */
148
- authToken: string;
149
- }
150
- export interface CloudflareCDNConfig {
151
- type: 'cloudflare';
152
- /**
153
- * production host
154
- */
155
- host: string;
156
- /**
157
- * Routes on the CDN that are rendered with Franklin
158
- */
159
- route?: string[];
160
- plan: string;
161
- zoneId: string;
162
- apiToken: string;
163
- }
164
- export interface AkamaiCDNConfig {
165
- type: 'akamai';
166
- /**
167
- * production host
168
- */
169
- host: string;
170
- /**
171
- * Routes on the CDN that are rendered with Franklin
172
- */
173
- route?: string[];
174
- endpoint: string;
175
- clientSecret: string;
176
- clientToken: string;
177
- accessToken: string;
178
- }
179
- export interface ManagedCDNConfig {
180
- type: 'managed';
181
- /**
182
- * production host
183
- */
184
- host: string;
185
- /**
186
- * Routes on the CDN that are rendered with Franklin
187
- */
188
- route?: string[];
189
- }
190
- export interface CloudfrontCDNConfig {
191
- type: 'cloudfront';
192
- /**
193
- * production host
194
- */
195
- host: string;
196
- /**
197
- * Routes on the CDN that are rendered with Franklin
198
- */
199
- route?: string[];
200
- distributionId: string;
201
- accessKeyId: string;
202
- secretAccessKey: string;
203
- }
204
- export interface EmptyConfig {
205
- /**
206
- * production host
207
- */
208
- host: string;
209
- }
210
- export interface Access {
211
- admin?: AdminAccessConfig;
212
- site?: SiteAccessConfig;
213
- preview?: SiteAccessConfig;
214
- live?: SiteAccessConfig;
215
- }
216
- export interface AdminAccessConfig {
217
- role?: Role;
218
- /**
219
- * Enforce authentication if set to true. If set to 'auto' it will enforce authentication if a role mapping is defined. defaults to 'auto'.
220
- */
221
- requireAuth?: boolean | 'auto';
222
- /**
223
- * the default roles assigned to the users. defaults to `basic_publish` for unauthenticated setups.
224
- */
225
- defaultRole?: (
226
- | 'admin'
227
- | 'author'
228
- | 'publish'
229
- | 'develop'
230
- | 'basic_author'
231
- | 'basic_publish'
232
- | 'config'
233
- | 'config_admin'
234
- )[];
235
- /**
236
- * the id of the API key(s). this is used to validate the API KEYS and allows to invalidate them.
237
- */
238
- apiKeyId?: string[];
239
- }
240
- export interface Role {
241
- /**
242
- * The email glob of the users or a group reference for the respective role.
243
- *
244
- * This interface was referenced by `Role`'s JSON-Schema definition
245
- * via the `patternProperty` "^[a-z-_]+$".
246
- */
247
- [k: string]: string[];
248
- }
249
- export interface SiteAccessConfig {
250
- /**
251
- * IDs of the api keys (tokens) that are allowed.
252
- */
253
- apiKeyId?: string[];
254
- /**
255
- * the DNs of the client certificates that are allowed.
256
- */
257
- clientCertDN?: string[];
258
- }
259
- export interface Tokens {
260
- /**
261
- * This interface was referenced by `Tokens`'s JSON-Schema definition
262
- * via the `patternProperty` "^[a-zA-Z0-9-_=]+$".
263
- */
264
- [k: string]: {
265
- id?: string;
266
- hash?: string;
267
- created?: string;
268
- };
269
- }
270
- export interface Groups {
271
- [k: string]: Group;
272
- }
273
- /**
274
- * A group of members. Can be referenced in access.admin.role.
275
- *
276
- * This interface was referenced by `Groups`'s JSON-Schema definition
277
- * via the `patternProperty` "^[a-zA-Z0-9-_=]+$".
278
- */
279
- export interface Group {
280
- members: {
281
- email: string;
282
- name?: string;
283
- [k: string]: unknown;
284
- }[];
285
- }
286
- export interface SidekickConfig {
287
- plugins?: SidekickPlugin[];
288
- [k: string]: unknown;
289
- }
290
- export interface SidekickPlugin {
291
- /**
292
- * The unique plugin ID
293
- */
294
- id: string;
295
- /**
296
- * The button text
297
- */
298
- title?: string;
299
- /**
300
- * The URL to open when the button is clicked
301
- */
302
- url?: string;
303
- /**
304
- * The ID of the container to add this plugin to
305
- */
306
- containerId?: string;
307
- /**
308
- * The environments to display this plugin in
309
- */
310
- environments?: string & ('any' | 'dev' | 'admin' | 'edit' | 'preview' | 'live' | 'prod')[];
311
- /**
312
- * The name of a custom event to fire when the button is clicked (defaults to id)
313
- */
314
- event?: string;
315
- /**
316
- * Exclude the plugin from these paths
317
- */
318
- excludePaths?: string[];
319
- /**
320
- * Include the plugin on these paths (overrides excludePaths)
321
- */
322
- includePaths?: string[];
323
- /**
324
- * Turns the plugin into a container for other plugins
325
- */
326
- isContainer?: boolean;
327
- /**
328
- * Opens the URL in a palette instead of a new tab
329
- */
330
- isPalette?: boolean;
331
- /**
332
- * he dimensions and position of a palette box
333
- */
334
- paletteRect?: string;
335
- /**
336
- * The button text in other supported languages
337
- */
338
- titleI18n?: {
339
- /**
340
- * ISO language code (`en` or `en-US`) with translated button text
341
- *
342
- * This interface was referenced by `undefined`'s JSON-Schema definition
343
- * via the `patternProperty` "^[a-z]{2}(-[A-Z]{2})?$".
344
- */
345
- [k: string]: string;
346
- };
347
- /**
348
- * Append ref, repo, owner, host, and project as query params on new URL button click
349
- */
350
- passConfig?: boolean;
351
- /**
352
- * Append the referrer URL as a query param on new URL button click
353
- */
354
- passReferrer?: boolean;
355
- [k: string]: unknown;
356
- }
357
- export interface Metadata {
358
- source?: string[];
359
- }
360
- export interface Robots {
361
- txt?: string;
362
- }
363
- /**
364
- * Public configuration
365
- */
366
- export interface Public {
367
- [k: string]: unknown;
368
- }