@adobe/helix-config-storage 1.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 (82) hide show
  1. package/.eslintrc.cjs +16 -0
  2. package/.husky/pre-commit +1 -0
  3. package/.mocha-multi.json +6 -0
  4. package/.nycrc.json +10 -0
  5. package/.releaserc.cjs +16 -0
  6. package/CHANGELOG.md +877 -0
  7. package/CODE_OF_CONDUCT.md +74 -0
  8. package/CONTRIBUTING.md +74 -0
  9. package/LICENSE.txt +264 -0
  10. package/README.md +40 -0
  11. package/package.json +71 -0
  12. package/src/ValidationError.js +95 -0
  13. package/src/config-merge.js +145 -0
  14. package/src/config-store.js +359 -0
  15. package/src/config-validator.js +112 -0
  16. package/src/index.js +15 -0
  17. package/src/schemas/access-admin.schema.cjs +12 -0
  18. package/src/schemas/access-admin.schema.json +57 -0
  19. package/src/schemas/access-site.schema.cjs +12 -0
  20. package/src/schemas/access-site.schema.json +24 -0
  21. package/src/schemas/access.schema.cjs +12 -0
  22. package/src/schemas/access.schema.json +22 -0
  23. package/src/schemas/cdn-prod-akamai.schema.cjs +12 -0
  24. package/src/schemas/cdn-prod-akamai.schema.json +45 -0
  25. package/src/schemas/cdn-prod-cloudflare.schema.cjs +12 -0
  26. package/src/schemas/cdn-prod-cloudflare.schema.json +41 -0
  27. package/src/schemas/cdn-prod-cloudfront.schema.cjs +12 -0
  28. package/src/schemas/cdn-prod-cloudfront.schema.json +41 -0
  29. package/src/schemas/cdn-prod-fastly.schema.cjs +12 -0
  30. package/src/schemas/cdn-prod-fastly.schema.json +40 -0
  31. package/src/schemas/cdn-prod-managed.schema.cjs +12 -0
  32. package/src/schemas/cdn-prod-managed.schema.json +29 -0
  33. package/src/schemas/cdn.schema.cjs +12 -0
  34. package/src/schemas/cdn.schema.json +75 -0
  35. package/src/schemas/code.schema.cjs +12 -0
  36. package/src/schemas/code.schema.json +43 -0
  37. package/src/schemas/common.schema.cjs +12 -0
  38. package/src/schemas/common.schema.json +27 -0
  39. package/src/schemas/content-source-google.schema.cjs +12 -0
  40. package/src/schemas/content-source-google.schema.json +26 -0
  41. package/src/schemas/content-source-markup.schema.cjs +12 -0
  42. package/src/schemas/content-source-markup.schema.json +24 -0
  43. package/src/schemas/content-source-onedrive.schema.cjs +12 -0
  44. package/src/schemas/content-source-onedrive.schema.json +28 -0
  45. package/src/schemas/content.schema.cjs +12 -0
  46. package/src/schemas/content.schema.json +30 -0
  47. package/src/schemas/folders.schema.cjs +12 -0
  48. package/src/schemas/folders.schema.json +13 -0
  49. package/src/schemas/groups.schema.cjs +12 -0
  50. package/src/schemas/groups.schema.json +39 -0
  51. package/src/schemas/headers.schema.cjs +12 -0
  52. package/src/schemas/headers.schema.json +16 -0
  53. package/src/schemas/metadata-source.schema.cjs +12 -0
  54. package/src/schemas/metadata-source.schema.json +16 -0
  55. package/src/schemas/org.schema.cjs +12 -0
  56. package/src/schemas/org.schema.json +26 -0
  57. package/src/schemas/profile.schema.cjs +12 -0
  58. package/src/schemas/profile.schema.json +57 -0
  59. package/src/schemas/profiles.schema.cjs +12 -0
  60. package/src/schemas/profiles.schema.json +28 -0
  61. package/src/schemas/public.schema.cjs +12 -0
  62. package/src/schemas/public.schema.json +8 -0
  63. package/src/schemas/robots.schema.cjs +12 -0
  64. package/src/schemas/robots.schema.json +13 -0
  65. package/src/schemas/sidekick.schema.cjs +12 -0
  66. package/src/schemas/sidekick.schema.json +112 -0
  67. package/src/schemas/site.schema.cjs +12 -0
  68. package/src/schemas/site.schema.json +74 -0
  69. package/src/schemas/sites.schema.cjs +12 -0
  70. package/src/schemas/sites.schema.json +28 -0
  71. package/src/schemas/tokens.schema.cjs +12 -0
  72. package/src/schemas/tokens.schema.json +28 -0
  73. package/src/schemas/user.schema.cjs +12 -0
  74. package/src/schemas/user.schema.json +42 -0
  75. package/src/schemas/users.schema.cjs +12 -0
  76. package/src/schemas/users.schema.json +10 -0
  77. package/src/status-code-error.js +22 -0
  78. package/src/utils.js +223 -0
  79. package/types/org-config.d.ts +51 -0
  80. package/types/profile-config.d.ts +368 -0
  81. package/types/site-config.d.ts +375 -0
  82. package/validate-json-schemas.sh +32 -0
@@ -0,0 +1,12 @@
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
+ module.exports = require('./content.schema.json');
@@ -0,0 +1,30 @@
1
+ {
2
+ "$comment": "https://github.com/adobe/helix-config/blob/main/LICENSE.txt",
3
+ "$schema": "https://json-schema.org/draft/2019-09/schema",
4
+ "$id": "https://ns.adobe.com/helix/config/content",
5
+ "type": "object",
6
+ "title": "Content source",
7
+ "description": "Defines the content bus location and source.",
8
+ "properties": {
9
+ "title": { "$ref": "https://ns.adobe.com/helix/config/common#/definitions/title" },
10
+ "description": { "$ref": "https://ns.adobe.com/helix/config/common#/definitions/description" },
11
+ "contentBusId": {"type": "string" },
12
+ "source": {
13
+ "oneOf": [
14
+ { "$ref": "https://ns.adobe.com/helix/config/content-source/google" },
15
+ { "$ref": "https://ns.adobe.com/helix/config/content-source/onedrive" },
16
+ { "$ref": "https://ns.adobe.com/helix/config/content-source/markup" }
17
+ ]
18
+ },
19
+ "overlay": {
20
+ "oneOf": [
21
+ { "$ref": "https://ns.adobe.com/helix/config/content-source/markup" }
22
+ ]
23
+ }
24
+ },
25
+ "required": [
26
+ "contentBusId",
27
+ "source"
28
+ ],
29
+ "additionalProperties": false
30
+ }
@@ -0,0 +1,12 @@
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
+ module.exports = require('./folders.schema.json');
@@ -0,0 +1,13 @@
1
+ {
2
+ "$comment": "https://github.com/adobe/helix-config/blob/main/LICENSE.txt",
3
+ "$schema": "https://json-schema.org/draft/2019-09/schema",
4
+ "$id": "https://ns.adobe.com/helix/config/folders",
5
+ "type": "object",
6
+ "title": "folders",
7
+ "patternProperties": {
8
+ "^/[a-zA-Z0-9-/.]*$": {
9
+ "type": "string"
10
+ }
11
+ },
12
+ "additionalProperties": false
13
+ }
@@ -0,0 +1,12 @@
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
+ module.exports = require('./groups.schema.json');
@@ -0,0 +1,39 @@
1
+ {
2
+ "$comment": "https://github.com/adobe/helix-config/blob/main/LICENSE.txt",
3
+ "$schema": "https://json-schema.org/draft/2019-09/schema",
4
+ "$id": "https://ns.adobe.com/helix/config/groups",
5
+ "type": "object",
6
+ "title": "Groups",
7
+ "patternProperties": {
8
+ "^[a-zA-Z0-9-_=]+$": {
9
+ "type": "object",
10
+ "title": "Group",
11
+ "description": "A group of members. Can be referenced in access.admin.role.",
12
+ "properties": {
13
+ "members": {
14
+ "type": "array",
15
+ "items": {
16
+ "type": "object",
17
+ "properties": {
18
+ "email": {
19
+ "type": "string",
20
+ "format": "email"
21
+ },
22
+ "name": {
23
+ "type": "string"
24
+ }
25
+ },
26
+ "required": [
27
+ "email"
28
+ ]
29
+ }
30
+ }
31
+ },
32
+ "additionalProperties": false,
33
+ "required": [
34
+ "members"
35
+ ]
36
+ }
37
+ },
38
+ "additionalProperties": false
39
+ }
@@ -0,0 +1,12 @@
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
+ module.exports = require('./headers.schema.json');
@@ -0,0 +1,16 @@
1
+ {
2
+ "$comment": "https://github.com/adobe/helix-config/blob/main/LICENSE.txt",
3
+ "$schema": "https://json-schema.org/draft/2019-09/schema",
4
+ "$id": "https://ns.adobe.com/helix/config/headers",
5
+ "type": "object",
6
+ "title": "Helix Headers Config",
7
+ "patternProperties": {
8
+ "^/[a-zA-Z0-9-/.]*\\*{0,2}$": {
9
+ "type": "array",
10
+ "items": {
11
+ "$ref": "https://ns.adobe.com/helix/config/common#/definitions/keyValuePair"
12
+ }
13
+ }
14
+ },
15
+ "additionalProperties": false
16
+ }
@@ -0,0 +1,12 @@
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
+ module.exports = require('./metadata-source.schema.json');
@@ -0,0 +1,16 @@
1
+ {
2
+ "$comment": "https://github.com/adobe/helix-config/blob/main/LICENSE.txt",
3
+ "$schema": "https://json-schema.org/draft/2019-09/schema",
4
+ "$id": "https://ns.adobe.com/helix/config/metadata-source",
5
+ "type": "object",
6
+ "title": "metadata",
7
+ "properties": {
8
+ "source": {
9
+ "type": "array",
10
+ "items": {
11
+ "type": "string"
12
+ }
13
+ }
14
+ },
15
+ "additionalProperties": false
16
+ }
@@ -0,0 +1,12 @@
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
+ module.exports = require('./org.schema.json');
@@ -0,0 +1,26 @@
1
+ {
2
+ "$comment": "https://github.com/adobe/helix-config/blob/main/LICENSE.txt",
3
+ "$schema": "https://json-schema.org/draft/2019-09/schema",
4
+ "$id": "https://ns.adobe.com/helix/config/org",
5
+ "title": "Helix Org Config",
6
+ "type": "object",
7
+ "properties": {
8
+ "version": {
9
+ "type": "integer",
10
+ "enum": [1],
11
+ "default": 1
12
+ },
13
+ "title": { "$ref": "https://ns.adobe.com/helix/config/common#/definitions/title" },
14
+ "description": { "$ref": "https://ns.adobe.com/helix/config/common#/definitions/description" },
15
+ "users": {
16
+ "$ref": "https://ns.adobe.com/helix/config/users"
17
+ },
18
+ "groups": {
19
+ "$ref": "https://ns.adobe.com/helix/config/groups"
20
+ }
21
+ },
22
+ "required": [
23
+ "version"
24
+ ],
25
+ "additionalProperties": false
26
+ }
@@ -0,0 +1,12 @@
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
+ module.exports = require('./profile.schema.json');
@@ -0,0 +1,57 @@
1
+ {
2
+ "$comment": "https://github.com/adobe/helix-config/blob/main/LICENSE.txt",
3
+ "$schema": "https://json-schema.org/draft/2019-09/schema",
4
+ "$id": "https://ns.adobe.com/helix/config/profile",
5
+ "title": "Helix Profile Config",
6
+ "type": "object",
7
+ "properties": {
8
+ "version": {
9
+ "type": "integer",
10
+ "enum": [1],
11
+ "default": 1
12
+ },
13
+ "title": { "$ref": "https://ns.adobe.com/helix/config/common#/definitions/title" },
14
+ "description": { "$ref": "https://ns.adobe.com/helix/config/common#/definitions/description" },
15
+
16
+ "content": {
17
+ "$ref": "https://ns.adobe.com/helix/config/content"
18
+ },
19
+ "code": {
20
+ "$ref": "https://ns.adobe.com/helix/config/code"
21
+ },
22
+ "folders": {
23
+ "$ref": "https://ns.adobe.com/helix/config/folders"
24
+ },
25
+ "headers": {
26
+ "$ref": "https://ns.adobe.com/helix/config/headers"
27
+ },
28
+ "cdn": {
29
+ "$ref": "https://ns.adobe.com/helix/config/cdn"
30
+ },
31
+ "access": {
32
+ "$ref": "https://ns.adobe.com/helix/config/access"
33
+ },
34
+ "tokens": {
35
+ "$ref": "https://ns.adobe.com/helix/config/tokens"
36
+ },
37
+ "groups": {
38
+ "$ref": "https://ns.adobe.com/helix/config/groups"
39
+ },
40
+ "sidekick": {
41
+ "$ref": "https://ns.adobe.com/helix/config/sidekick"
42
+ },
43
+ "metadata": {
44
+ "$ref": "https://ns.adobe.com/helix/config/metadata-source"
45
+ },
46
+ "robots": {
47
+ "$ref": "https://ns.adobe.com/helix/config/robots"
48
+ },
49
+ "public": {
50
+ "$ref": "https://ns.adobe.com/helix/config/public"
51
+ }
52
+ },
53
+ "required": [
54
+ "version"
55
+ ],
56
+ "additionalProperties": false
57
+ }
@@ -0,0 +1,12 @@
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
+ module.exports = require('./profiles.schema.json');
@@ -0,0 +1,28 @@
1
+ {
2
+ "$comment": "https://github.com/adobe/helix-config/blob/main/LICENSE.txt",
3
+ "$schema": "https://json-schema.org/draft/2019-09/schema",
4
+ "$id": "https://ns.adobe.com/helix/config/profiles",
5
+ "title": "Helix Profiles List",
6
+ "type": "object",
7
+ "properties": {
8
+ "profiles": {
9
+ "type": "array",
10
+ "items": {
11
+ "type": "object",
12
+ "properties": {
13
+ "name": {
14
+ "type": "string"
15
+ }
16
+ },
17
+ "required": [
18
+ "name"
19
+ ],
20
+ "additionalProperties": false
21
+ }
22
+ }
23
+ },
24
+ "required": [
25
+ "profiles"
26
+ ],
27
+ "additionalProperties": false
28
+ }
@@ -0,0 +1,12 @@
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
+ module.exports = require('./public.schema.json');
@@ -0,0 +1,8 @@
1
+ {
2
+ "$comment": "https://github.com/adobe/helix-config/blob/main/LICENSE.txt",
3
+ "$schema": "https://json-schema.org/draft/2019-09/schema",
4
+ "$id": "https://ns.adobe.com/helix/config/public",
5
+ "type": "object",
6
+ "title": "public",
7
+ "description": "Public configuration"
8
+ }
@@ -0,0 +1,12 @@
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
+ module.exports = require('./robots.schema.json');
@@ -0,0 +1,13 @@
1
+ {
2
+ "$comment": "https://github.com/adobe/helix-config/blob/main/LICENSE.txt",
3
+ "$schema": "https://json-schema.org/draft/2019-09/schema",
4
+ "$id": "https://ns.adobe.com/helix/config/robots",
5
+ "type": "object",
6
+ "title": "robots",
7
+ "properties": {
8
+ "txt": {
9
+ "type": "string"
10
+ }
11
+ },
12
+ "additionalProperties": false
13
+ }
@@ -0,0 +1,12 @@
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
+ module.exports = require('./sidekick.schema.json');
@@ -0,0 +1,112 @@
1
+ {
2
+ "$comment": "https://github.com/adobe/helix-config/blob/main/LICENSE.txt",
3
+ "$id": "https://ns.adobe.com/helix/config/sidekick",
4
+ "$schema": "https://json-schema.org/draft/2019-09/schema",
5
+ "definitions": {
6
+ "sidekickPlugin": {
7
+ "type": "object",
8
+ "properties": {
9
+ "id": {
10
+ "type": "string",
11
+ "description": "The unique plugin ID"
12
+ },
13
+ "title": {
14
+ "type": "string",
15
+ "description": "The button text"
16
+ },
17
+ "url": {
18
+ "type": "string",
19
+ "description": "The URL to open when the button is clicked"
20
+ },
21
+ "containerId": {
22
+ "type": "string",
23
+ "description": "The ID of the container to add this plugin to"
24
+ },
25
+ "environments": {
26
+ "type": "array",
27
+ "items": {
28
+ "type": "string",
29
+ "enum": ["any", "dev", "admin", "edit", "preview", "live", "prod"]
30
+ },
31
+ "description": "The environments to display this plugin in",
32
+ "default": "any"
33
+ },
34
+ "event": {
35
+ "type": "string",
36
+ "description": "The name of a custom event to fire when the button is clicked (defaults to id)"
37
+ },
38
+ "excludePaths": {
39
+ "type": "array",
40
+ "items": {
41
+ "type": "string"
42
+ },
43
+ "description": "Exclude the plugin from these paths",
44
+ "examples": [
45
+ "/foo/**",
46
+ "**/:x:**"
47
+ ]
48
+ },
49
+ "includePaths": {
50
+ "type": "array",
51
+ "items": {
52
+ "type": "string"
53
+ },
54
+ "description": "Include the plugin on these paths (overrides excludePaths)",
55
+ "examples": [
56
+ "/foo/bar/**",
57
+ "**.docx**"
58
+ ]
59
+ },
60
+ "isContainer": {
61
+ "type": "boolean",
62
+ "description": "Turns the plugin into a container for other plugins"
63
+ },
64
+ "isPalette": {
65
+ "type": "boolean",
66
+ "description": "Opens the URL in a palette instead of a new tab"
67
+ },
68
+ "paletteRect": {
69
+ "type": "string",
70
+ "description": "he dimensions and position of a palette box"
71
+ },
72
+ "titleI18n": {
73
+ "type": "object",
74
+ "description": "The button text in other supported languages",
75
+ "patternProperties": {
76
+ "^[a-z]{2}(-[A-Z]{2})?$": {
77
+ "type": "string",
78
+ "description": "ISO language code (`en` or `en-US`) with translated button text"
79
+ }
80
+ },
81
+ "minProperties": 1,
82
+ "additionalProperties": false
83
+ },
84
+ "passConfig": {
85
+ "type": "boolean",
86
+ "description": "Append ref, repo, owner, host, and project as query params on new URL button click"
87
+ },
88
+ "passReferrer": {
89
+ "type": "boolean",
90
+ "description": "Append the referrer URL as a query param on new URL button click"
91
+ }
92
+ },
93
+ "required": [
94
+ "id"
95
+ ],
96
+ "dependentRequired": {
97
+ "isPalette": ["url"],
98
+ "paletteRect": ["isPalette"]
99
+ }
100
+ }
101
+ },
102
+ "title": "Sidekick Config",
103
+ "type": "object",
104
+ "properties": {
105
+ "plugins": {
106
+ "type": "array",
107
+ "items": {
108
+ "$ref": "#/definitions/sidekickPlugin"
109
+ }
110
+ }
111
+ }
112
+ }
@@ -0,0 +1,12 @@
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
+ module.exports = require('./site.schema.json');
@@ -0,0 +1,74 @@
1
+ {
2
+ "$comment": "https://github.com/adobe/helix-config/blob/main/LICENSE.txt",
3
+ "$schema": "https://json-schema.org/draft/2019-09/schema",
4
+ "$id": "https://ns.adobe.com/helix/config/site",
5
+ "title": "Helix Site Config",
6
+ "type": "object",
7
+ "properties": {
8
+ "version": {
9
+ "type": "integer",
10
+ "enum": [1],
11
+ "default": 1
12
+ },
13
+ "name": {
14
+ "type": "string",
15
+ "description": "Site name; part of the hostname",
16
+ "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
17
+ },
18
+ "title": { "$ref": "https://ns.adobe.com/helix/config/common#/definitions/title" },
19
+ "description": { "$ref": "https://ns.adobe.com/helix/config/common#/definitions/description" },
20
+
21
+ "content": {
22
+ "$ref": "https://ns.adobe.com/helix/config/content"
23
+ },
24
+ "code": {
25
+ "$ref": "https://ns.adobe.com/helix/config/code"
26
+ },
27
+ "folders": {
28
+ "$ref": "https://ns.adobe.com/helix/config/folders"
29
+ },
30
+ "headers": {
31
+ "$ref": "https://ns.adobe.com/helix/config/headers"
32
+ },
33
+ "cdn": {
34
+ "$ref": "https://ns.adobe.com/helix/config/cdn"
35
+ },
36
+ "access": {
37
+ "$ref": "https://ns.adobe.com/helix/config/access"
38
+ },
39
+ "tokens": {
40
+ "$ref": "https://ns.adobe.com/helix/config/tokens"
41
+ },
42
+ "groups": {
43
+ "$ref": "https://ns.adobe.com/helix/config/groups"
44
+ },
45
+ "sidekick": {
46
+ "$ref": "https://ns.adobe.com/helix/config/sidekick"
47
+ },
48
+ "metadata": {
49
+ "$ref": "https://ns.adobe.com/helix/config/metadata-source"
50
+ },
51
+ "robots": {
52
+ "$ref": "https://ns.adobe.com/helix/config/robots"
53
+ },
54
+ "public": {
55
+ "$ref": "https://ns.adobe.com/helix/config/public"
56
+ },
57
+ "extends": {
58
+ "type": "object",
59
+ "properties": {
60
+ "profile": {
61
+ "type": "string",
62
+ "pattern": "^[0-9a-zA-Z-_]+$"
63
+ }
64
+ },
65
+ "additionalProperties": false
66
+ }
67
+ },
68
+ "required": [
69
+ "version",
70
+ "content",
71
+ "code"
72
+ ],
73
+ "additionalProperties": false
74
+ }
@@ -0,0 +1,12 @@
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
+ module.exports = require('./sites.schema.json');
@@ -0,0 +1,28 @@
1
+ {
2
+ "$comment": "https://github.com/adobe/helix-config/blob/main/LICENSE.txt",
3
+ "$schema": "https://json-schema.org/draft/2019-09/schema",
4
+ "$id": "https://ns.adobe.com/helix/config/sites",
5
+ "title": "Helix Sites List",
6
+ "type": "object",
7
+ "properties": {
8
+ "sites": {
9
+ "type": "array",
10
+ "items": {
11
+ "type": "object",
12
+ "properties": {
13
+ "name": {
14
+ "type": "string"
15
+ }
16
+ },
17
+ "required": [
18
+ "name"
19
+ ],
20
+ "additionalProperties": false
21
+ }
22
+ }
23
+ },
24
+ "required": [
25
+ "sites"
26
+ ],
27
+ "additionalProperties": false
28
+ }