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