@adobe/helix-config 3.10.1 → 3.11.1

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 (36) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/package.json +3 -2
  3. package/src/schemas/access-admin.schema.json +2 -12
  4. package/src/schemas/access-site.schema.json +2 -12
  5. package/src/schemas/access.schema.json +2 -12
  6. package/src/schemas/cdn-prod-akamai.schema.json +2 -12
  7. package/src/schemas/cdn-prod-cloudflare.schema.json +2 -12
  8. package/src/schemas/cdn-prod-cloudfront.schema.json +2 -12
  9. package/src/schemas/cdn-prod-fastly.schema.json +2 -12
  10. package/src/schemas/cdn-prod-managed.schema.json +2 -12
  11. package/src/schemas/cdn.schema.json +4 -12
  12. package/src/schemas/code.schema.json +2 -12
  13. package/src/schemas/common.schema.json +2 -12
  14. package/src/schemas/content-source-google.schema.json +2 -12
  15. package/src/schemas/content-source-markup.schema.json +2 -12
  16. package/src/schemas/content-source-onedrive.schema.json +2 -12
  17. package/src/schemas/content.schema.json +2 -12
  18. package/src/schemas/folders.schema.json +2 -12
  19. package/src/schemas/groups.schema.json +2 -12
  20. package/src/schemas/headers.schema.json +2 -12
  21. package/src/schemas/metadata-source.schema.json +2 -12
  22. package/src/schemas/org.schema.json +2 -12
  23. package/src/schemas/profile.schema.json +2 -12
  24. package/src/schemas/profiles.schema.json +2 -12
  25. package/src/schemas/public.schema.json +2 -12
  26. package/src/schemas/robots.schema.json +2 -12
  27. package/src/schemas/sidekick.schema.json +85 -19
  28. package/src/schemas/site.schema.json +2 -12
  29. package/src/schemas/sites.schema.json +2 -12
  30. package/src/schemas/tokens.schema.json +2 -12
  31. package/src/schemas/user.schema.json +2 -12
  32. package/src/schemas/users.schema.json +3 -14
  33. package/src/storage/config-validator.js +2 -3
  34. package/types/profile-config.d.ts +63 -2
  35. package/types/site-config.d.ts +63 -2
  36. package/validate-json-schemas.sh +32 -0
package/CHANGELOG.md CHANGED
@@ -1,3 +1,17 @@
1
+ ## [3.11.1](https://github.com/adobe/helix-config/compare/v3.11.0...v3.11.1) (2024-07-29)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * fix schema and add validator ([#155](https://github.com/adobe/helix-config/issues/155)) ([4235141](https://github.com/adobe/helix-config/commit/42351418b61a1e83ee476d241875aa63fd520ae7))
7
+
8
+ # [3.11.0](https://github.com/adobe/helix-config/compare/v3.10.1...v3.11.0) (2024-07-29)
9
+
10
+
11
+ ### Features
12
+
13
+ * update sidekick plugin schema ([bac329a](https://github.com/adobe/helix-config/commit/bac329a15045ff49e4d58b1e7dc0289a97e6a67b))
14
+
1
15
  ## [3.10.1](https://github.com/adobe/helix-config/compare/v3.10.0...v3.10.1) (2024-07-27)
2
16
 
3
17
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adobe/helix-config",
3
- "version": "3.10.1",
3
+ "version": "3.11.1",
4
4
  "description": "Helix Config",
5
5
  "main": "src/index.js",
6
6
  "types": "src/index.d.ts",
@@ -11,7 +11,7 @@
11
11
  "type": "module",
12
12
  "scripts": {
13
13
  "test": "c8 mocha --spec 'test/**/*.test.js'",
14
- "lint": "eslint .",
14
+ "lint": "eslint . && ./validate-json-schemas.sh",
15
15
  "docs:types": "node ./test/dev/generate-types.js",
16
16
  "semantic-release": "semantic-release",
17
17
  "semantic-release-dry": "semantic-release --dry-run --branches $CI_BRANCH",
@@ -41,6 +41,7 @@
41
41
  "@semantic-release/changelog": "6.0.3",
42
42
  "@semantic-release/git": "10.0.1",
43
43
  "@semantic-release/npm": "12.0.1",
44
+ "ajv-cli": "5.0.0",
44
45
  "c8": "10.1.2",
45
46
  "eslint": "8.57.0",
46
47
  "husky": "9.1.3",
@@ -1,17 +1,7 @@
1
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
- ],
2
+ "$comment": "https://github.com/adobe/helix-config/blob/main/LICENSE.txt",
13
3
  "$id": "https://ns.adobe.com/helix/config/access/admin",
14
- "$schema": "http://json-schema.org/draft-07/schema#",
4
+ "$schema": "https://json-schema.org/draft/2019-09/schema",
15
5
  "title": "Admin Access Config",
16
6
  "type": "object",
17
7
  "properties": {
@@ -1,17 +1,7 @@
1
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
- ],
2
+ "$comment": "https://github.com/adobe/helix-config/blob/main/LICENSE.txt",
13
3
  "$id": "https://ns.adobe.com/helix/config/access/site",
14
- "$schema": "http://json-schema.org/draft-07/schema#",
4
+ "$schema": "https://json-schema.org/draft/2019-09/schema",
15
5
  "title": "Site Access Config",
16
6
  "type": "object",
17
7
  "properties": {
@@ -1,16 +1,6 @@
1
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#",
2
+ "$comment": "https://github.com/adobe/helix-config/blob/main/LICENSE.txt",
3
+ "$schema": "https://json-schema.org/draft/2019-09/schema",
14
4
  "$id": "https://ns.adobe.com/helix/config/access",
15
5
  "type": "object",
16
6
  "title": "Access",
@@ -1,17 +1,7 @@
1
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
- ],
2
+ "$comment": "https://github.com/adobe/helix-config/blob/main/LICENSE.txt",
13
3
  "$id": "https://ns.adobe.com/helix/config/cdn/prod/akamai",
14
- "$schema": "http://json-schema.org/draft-07/schema#",
4
+ "$schema": "https://json-schema.org/draft/2019-09/schema",
15
5
  "title": "Akamai CDN Config",
16
6
  "type": "object",
17
7
  "properties": {
@@ -1,17 +1,7 @@
1
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
- ],
2
+ "$comment": "https://github.com/adobe/helix-config/blob/main/LICENSE.txt",
13
3
  "$id": "https://ns.adobe.com/helix/config/cdn/prod/cloudflare",
14
- "$schema": "http://json-schema.org/draft-07/schema#",
4
+ "$schema": "https://json-schema.org/draft/2019-09/schema",
15
5
  "title": "Cloudflare CDN Config",
16
6
  "type": "object",
17
7
  "properties": {
@@ -1,17 +1,7 @@
1
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
- ],
2
+ "$comment": "https://github.com/adobe/helix-config/blob/main/LICENSE.txt",
13
3
  "$id": "https://ns.adobe.com/helix/config/cdn/prod/cloudfront",
14
- "$schema": "http://json-schema.org/draft-07/schema#",
4
+ "$schema": "https://json-schema.org/draft/2019-09/schema",
15
5
  "title": "Cloudfront CDN Config",
16
6
  "type": "object",
17
7
  "properties": {
@@ -1,17 +1,7 @@
1
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
- ],
2
+ "$comment": "https://github.com/adobe/helix-config/blob/main/LICENSE.txt",
13
3
  "$id": "https://ns.adobe.com/helix/config/cdn/prod/fastly",
14
- "$schema": "http://json-schema.org/draft-07/schema#",
4
+ "$schema": "https://json-schema.org/draft/2019-09/schema",
15
5
  "title": "Fastly CDN Config",
16
6
  "type": "object",
17
7
  "description": "Production CDN configuration for Fastly",
@@ -1,17 +1,7 @@
1
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
- ],
2
+ "$comment": "https://github.com/adobe/helix-config/blob/main/LICENSE.txt",
13
3
  "$id": "https://ns.adobe.com/helix/config/cdn/prod/managed",
14
- "$schema": "http://json-schema.org/draft-07/schema#",
4
+ "$schema": "https://json-schema.org/draft/2019-09/schema",
15
5
  "title": "Managed CDN Config",
16
6
  "type": "object",
17
7
  "properties": {
@@ -1,17 +1,7 @@
1
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
- ],
2
+ "$comment": "https://github.com/adobe/helix-config/blob/main/LICENSE.txt",
13
3
  "$id": "https://ns.adobe.com/helix/config/cdn",
14
- "$schema": "http://json-schema.org/draft-07/schema#",
4
+ "$schema": "https://json-schema.org/draft/2019-09/schema",
15
5
  "title": "CDN Config",
16
6
  "type": "object",
17
7
  "properties": {
@@ -49,6 +39,7 @@
49
39
  ]
50
40
  },
51
41
  "live": {
42
+ "type": "object",
52
43
  "properties": {
53
44
  "host": {
54
45
  "description": "Sidekick config to override the default preview host. it supports parameters $owner and $repo",
@@ -64,6 +55,7 @@
64
55
  "additionalProperties": false
65
56
  },
66
57
  "preview": {
58
+ "type": "object",
67
59
  "properties": {
68
60
  "host": {
69
61
  "description": "Sidekick config to override the default live host. it supports parameters $owner and $repo",
@@ -1,16 +1,6 @@
1
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#",
2
+ "$comment": "https://github.com/adobe/helix-config/blob/main/LICENSE.txt",
3
+ "$schema": "https://json-schema.org/draft/2019-09/schema",
14
4
  "$id": "https://ns.adobe.com/helix/config/code",
15
5
  "title": "Code source",
16
6
  "type": "object",
@@ -1,16 +1,6 @@
1
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#",
2
+ "$comment": "https://github.com/adobe/helix-config/blob/main/LICENSE.txt",
3
+ "$schema": "https://json-schema.org/draft/2019-09/schema",
14
4
  "$id": "https://ns.adobe.com/helix/config/common",
15
5
  "definitions": {
16
6
  "title": {
@@ -1,16 +1,6 @@
1
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#",
2
+ "$comment": "https://github.com/adobe/helix-config/blob/main/LICENSE.txt",
3
+ "$schema": "https://json-schema.org/draft/2019-09/schema",
14
4
  "$id": "https://ns.adobe.com/helix/config/content-source/google",
15
5
  "title": "Google Content Source",
16
6
  "type": "object",
@@ -1,16 +1,6 @@
1
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#",
2
+ "$comment": "https://github.com/adobe/helix-config/blob/main/LICENSE.txt",
3
+ "$schema": "https://json-schema.org/draft/2019-09/schema",
14
4
  "$id": "https://ns.adobe.com/helix/config/content-source/markup",
15
5
  "title": "Markup Content Source",
16
6
  "type": "object",
@@ -1,16 +1,6 @@
1
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#",
2
+ "$comment": "https://github.com/adobe/helix-config/blob/main/LICENSE.txt",
3
+ "$schema": "https://json-schema.org/draft/2019-09/schema",
14
4
  "$id": "https://ns.adobe.com/helix/config/content-source/onedrive",
15
5
  "title": "Onedrive Content Source",
16
6
  "type": "object",
@@ -1,16 +1,6 @@
1
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#",
2
+ "$comment": "https://github.com/adobe/helix-config/blob/main/LICENSE.txt",
3
+ "$schema": "https://json-schema.org/draft/2019-09/schema",
14
4
  "$id": "https://ns.adobe.com/helix/config/content",
15
5
  "type": "object",
16
6
  "title": "Content source",
@@ -1,16 +1,6 @@
1
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#",
2
+ "$comment": "https://github.com/adobe/helix-config/blob/main/LICENSE.txt",
3
+ "$schema": "https://json-schema.org/draft/2019-09/schema",
14
4
  "$id": "https://ns.adobe.com/helix/config/folders",
15
5
  "type": "object",
16
6
  "title": "folders",
@@ -1,16 +1,6 @@
1
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#",
2
+ "$comment": "https://github.com/adobe/helix-config/blob/main/LICENSE.txt",
3
+ "$schema": "https://json-schema.org/draft/2019-09/schema",
14
4
  "$id": "https://ns.adobe.com/helix/config/groups",
15
5
  "type": "object",
16
6
  "title": "Groups",
@@ -1,16 +1,6 @@
1
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#",
2
+ "$comment": "https://github.com/adobe/helix-config/blob/main/LICENSE.txt",
3
+ "$schema": "https://json-schema.org/draft/2019-09/schema",
14
4
  "$id": "https://ns.adobe.com/helix/config/headers",
15
5
  "type": "object",
16
6
  "title": "Helix Headers Config",
@@ -1,16 +1,6 @@
1
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#",
2
+ "$comment": "https://github.com/adobe/helix-config/blob/main/LICENSE.txt",
3
+ "$schema": "https://json-schema.org/draft/2019-09/schema",
14
4
  "$id": "https://ns.adobe.com/helix/config/metadata-source",
15
5
  "type": "object",
16
6
  "title": "metadata",
@@ -1,16 +1,6 @@
1
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#",
2
+ "$comment": "https://github.com/adobe/helix-config/blob/main/LICENSE.txt",
3
+ "$schema": "https://json-schema.org/draft/2019-09/schema",
14
4
  "$id": "https://ns.adobe.com/helix/config/org",
15
5
  "title": "Helix Org Config",
16
6
  "type": "object",
@@ -1,16 +1,6 @@
1
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#",
2
+ "$comment": "https://github.com/adobe/helix-config/blob/main/LICENSE.txt",
3
+ "$schema": "https://json-schema.org/draft/2019-09/schema",
14
4
  "$id": "https://ns.adobe.com/helix/config/profile",
15
5
  "title": "Helix Profile Config",
16
6
  "type": "object",
@@ -1,16 +1,6 @@
1
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#",
2
+ "$comment": "https://github.com/adobe/helix-config/blob/main/LICENSE.txt",
3
+ "$schema": "https://json-schema.org/draft/2019-09/schema",
14
4
  "$id": "https://ns.adobe.com/helix/config/profiles",
15
5
  "title": "Helix Profiles List",
16
6
  "type": "object",
@@ -1,16 +1,6 @@
1
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#",
2
+ "$comment": "https://github.com/adobe/helix-config/blob/main/LICENSE.txt",
3
+ "$schema": "https://json-schema.org/draft/2019-09/schema",
14
4
  "$id": "https://ns.adobe.com/helix/config/public",
15
5
  "type": "object",
16
6
  "title": "public",
@@ -1,16 +1,6 @@
1
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#",
2
+ "$comment": "https://github.com/adobe/helix-config/blob/main/LICENSE.txt",
3
+ "$schema": "https://json-schema.org/draft/2019-09/schema",
14
4
  "$id": "https://ns.adobe.com/helix/config/robots",
15
5
  "type": "object",
16
6
  "title": "robots",
@@ -1,36 +1,102 @@
1
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
- ],
2
+ "$comment": "https://github.com/adobe/helix-config/blob/main/LICENSE.txt",
13
3
  "$id": "https://ns.adobe.com/helix/config/sidekick",
14
- "$schema": "http://json-schema.org/draft-07/schema#",
4
+ "$schema": "https://json-schema.org/draft/2019-09/schema",
15
5
  "definitions": {
16
6
  "sidekickPlugin": {
17
7
  "type": "object",
18
8
  "properties": {
19
9
  "id": {
20
- "type": "string"
10
+ "type": "string",
11
+ "description": "The unique plugin ID"
21
12
  },
22
13
  "title": {
23
- "type": "string"
14
+ "type": "string",
15
+ "description": "The button text"
24
16
  },
25
17
  "url": {
26
- "type": "string"
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"
27
91
  }
28
92
  },
29
93
  "required": [
30
- "id",
31
- "title",
32
- "url"
33
- ]
94
+ "id"
95
+ ],
96
+ "dependentRequired": {
97
+ "isPalette": ["url"],
98
+ "paletteRect": ["isPalette"]
99
+ }
34
100
  }
35
101
  },
36
102
  "title": "Sidekick Config",
@@ -1,16 +1,6 @@
1
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#",
2
+ "$comment": "https://github.com/adobe/helix-config/blob/main/LICENSE.txt",
3
+ "$schema": "https://json-schema.org/draft/2019-09/schema",
14
4
  "$id": "https://ns.adobe.com/helix/config/site",
15
5
  "title": "Helix Site Config",
16
6
  "type": "object",
@@ -1,16 +1,6 @@
1
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#",
2
+ "$comment": "https://github.com/adobe/helix-config/blob/main/LICENSE.txt",
3
+ "$schema": "https://json-schema.org/draft/2019-09/schema",
14
4
  "$id": "https://ns.adobe.com/helix/config/sites",
15
5
  "title": "Helix Sites List",
16
6
  "type": "object",
@@ -1,16 +1,6 @@
1
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#",
2
+ "$comment": "https://github.com/adobe/helix-config/blob/main/LICENSE.txt",
3
+ "$schema": "https://json-schema.org/draft/2019-09/schema",
14
4
  "$id": "https://ns.adobe.com/helix/config/tokens",
15
5
  "title": "tokens",
16
6
  "type": "object",
@@ -1,16 +1,6 @@
1
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#",
2
+ "$comment": "https://github.com/adobe/helix-config/blob/main/LICENSE.txt",
3
+ "$schema": "https://json-schema.org/draft/2019-09/schema",
14
4
  "$id": "https://ns.adobe.com/helix/config/user",
15
5
  "title": "user",
16
6
  "type": "object",
@@ -1,21 +1,10 @@
1
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#",
2
+ "$comment": "https://github.com/adobe/helix-config/blob/main/LICENSE.txt",
3
+ "$schema": "https://json-schema.org/draft/2019-09/schema",
14
4
  "$id": "https://ns.adobe.com/helix/config/users",
15
5
  "title": "users",
16
6
  "type": "array",
17
7
  "items": {
18
8
  "$ref": "https://ns.adobe.com/helix/config/user"
19
- },
20
- "additionalProperties": false
9
+ }
21
10
  }
@@ -9,7 +9,7 @@
9
9
  * OF ANY KIND, either express or implied. See the License for the specific language
10
10
  * governing permissions and limitations under the License.
11
11
  */
12
- import Ajv from 'ajv';
12
+ import Ajv2019 from 'ajv/dist/2019.js';
13
13
  import ajvFormats from 'ajv-formats';
14
14
  import { ValidationError } from './ValidationError.js';
15
15
 
@@ -94,8 +94,7 @@ export async function validate(config, type) {
94
94
  if (!schema) {
95
95
  throw new Error(`no such type: ${type}`);
96
96
  }
97
-
98
- const ajv = new Ajv({
97
+ const ajv = new Ajv2019({
99
98
  allErrors: true,
100
99
  verbose: true,
101
100
  useDefaults: true,
@@ -288,9 +288,70 @@ export interface SidekickConfig {
288
288
  [k: string]: unknown;
289
289
  }
290
290
  export interface SidekickPlugin {
291
+ /**
292
+ * The unique plugin ID
293
+ */
291
294
  id: string;
292
- title: string;
293
- url: 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;
294
355
  [k: string]: unknown;
295
356
  }
296
357
  export interface Metadata {
@@ -295,9 +295,70 @@ export interface SidekickConfig {
295
295
  [k: string]: unknown;
296
296
  }
297
297
  export interface SidekickPlugin {
298
+ /**
299
+ * The unique plugin ID
300
+ */
298
301
  id: string;
299
- title: string;
300
- url: 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;
301
362
  [k: string]: unknown;
302
363
  }
303
364
  export interface Metadata {
@@ -0,0 +1,32 @@
1
+ # the need the proper file order to compile the schemas.
2
+ npx ajv-cli --spec=draft2019 -c ajv-formats compile \
3
+ -s src/schemas/common.schema.json \
4
+ -s src/schemas/access-admin.schema.json \
5
+ -s src/schemas/access-site.schema.json \
6
+ -s src/schemas/access.schema.json \
7
+ -s src/schemas/cdn-prod-akamai.schema.json \
8
+ -s src/schemas/cdn-prod-cloudflare.schema.json \
9
+ -s src/schemas/cdn-prod-cloudfront.schema.json \
10
+ -s src/schemas/cdn-prod-fastly.schema.json \
11
+ -s src/schemas/cdn-prod-managed.schema.json \
12
+ -s src/schemas/cdn.schema.json \
13
+ -s src/schemas/code.schema.json \
14
+ -s src/schemas/content-source-google.schema.json \
15
+ -s src/schemas/content-source-markup.schema.json \
16
+ -s src/schemas/content-source-onedrive.schema.json \
17
+ -s src/schemas/content.schema.json \
18
+ -s src/schemas/folders.schema.json \
19
+ -s src/schemas/groups.schema.json \
20
+ -s src/schemas/headers.schema.json \
21
+ -s src/schemas/metadata-source.schema.json \
22
+ -s src/schemas/user.schema.json \
23
+ -s src/schemas/users.schema.json \
24
+ -s src/schemas/org.schema.json \
25
+ -s src/schemas/tokens.schema.json \
26
+ -s src/schemas/sidekick.schema.json \
27
+ -s src/schemas/robots.schema.json \
28
+ -s src/schemas/public.schema.json \
29
+ -s src/schemas/profile.schema.json \
30
+ -s src/schemas/profiles.schema.json \
31
+ -s src/schemas/site.schema.json \
32
+ -s src/schemas/sites.schema.json