@adobe/helix-shared-config 1.7.23 → 2.0.2

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 (46) hide show
  1. package/CHANGELOG.md +38 -0
  2. package/package.json +10 -7
  3. package/src/config-wrapper.js +0 -6
  4. package/src/index.js +0 -12
  5. package/src/Condition.js +0 -573
  6. package/src/ConfigValidator.js +0 -95
  7. package/src/DataEmbedValidator.js +0 -51
  8. package/src/DynamicRedirect.js +0 -125
  9. package/src/HelixConfig.js +0 -133
  10. package/src/MarkupConfig.js +0 -35
  11. package/src/Origin.js +0 -159
  12. package/src/Performance.js +0 -80
  13. package/src/Redirect.js +0 -64
  14. package/src/RedirectConfig.js +0 -64
  15. package/src/RedirectRuleHandler.js +0 -46
  16. package/src/Static.js +0 -119
  17. package/src/Strain.js +0 -332
  18. package/src/Strains.js +0 -68
  19. package/src/schemas/conditions.schema.json +0 -140
  20. package/src/schemas/config.description.md +0 -7
  21. package/src/schemas/config.example.1.json +0 -26
  22. package/src/schemas/config.schema.json +0 -44
  23. package/src/schemas/data-embed-response.schema.json +0 -40
  24. package/src/schemas/giturl.schema.json +0 -62
  25. package/src/schemas/markup.schema.json +0 -22
  26. package/src/schemas/markupconfig.schema.json +0 -38
  27. package/src/schemas/markupmapping.description.md +0 -242
  28. package/src/schemas/markupmapping.schema.json +0 -122
  29. package/src/schemas/origin.description.md +0 -5
  30. package/src/schemas/origin.schema.json +0 -86
  31. package/src/schemas/performance.schema.json +0 -210
  32. package/src/schemas/proxystrain.description.md +0 -20
  33. package/src/schemas/proxystrain.schema.json +0 -87
  34. package/src/schemas/redirect.schema.json +0 -34
  35. package/src/schemas/redirectrule.schema.json +0 -46
  36. package/src/schemas/redirects.description.md +0 -1
  37. package/src/schemas/redirects.schema.json +0 -41
  38. package/src/schemas/row.schema.json +0 -23
  39. package/src/schemas/runtimestrain.schema.json +0 -144
  40. package/src/schemas/sheet.schema.json +0 -57
  41. package/src/schemas/staticgiturl.schema.json +0 -80
  42. package/src/schemas/strains.schema.json +0 -39
  43. package/src/schemas/vanity.schema.json +0 -38
  44. package/src/schemas/version-lock.description.md +0 -3
  45. package/src/schemas/version-lock.schema.json +0 -35
  46. package/src/schemas/workbook.schema.json +0 -49
@@ -1,122 +0,0 @@
1
- {
2
- "meta:license": [
3
- "Copyright 2019 Adobe. All rights reserved.",
4
- "This file is licensed to you under the Apache License, Version 2.0 (the \"License\");",
5
- "you may not use this file except in compliance with the License. You may obtain a copy",
6
- "of the License at http://www.apache.org/licenses/LICENSE-2.0",
7
- "",
8
- "Unless required by applicable law or agreed to in writing, software distributed under",
9
- "the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS",
10
- "OF ANY KIND, either express or implied. See the License for the specific language",
11
- "governing permissions and limitations under the License."
12
- ],
13
- "$id": "https://ns.adobe.com/helix/shared/markupmapping",
14
- "$schema": "http://json-schema.org/draft-07/schema#",
15
- "title": "Markup Mapping",
16
- "type": "object",
17
- "meta:status": "stabilizing",
18
- "description": "",
19
- "required": [
20
- "match"
21
- ],
22
- "additionalProperties": false,
23
- "properties": {
24
- "name": {
25
- "type": "string",
26
- "description": "The (optional) name of the mapping. The name is normative only, and can be used for debugging purposes. It does not affect either matching nor the markup output."
27
- },
28
- "match": {
29
- "type": "string",
30
- "anyOf": [
31
- {
32
- "type": "string",
33
- "title": "DOM Match Expression",
34
- "description": "A CSS selector expression selecting the DOM nodes that should get processed",
35
- "examples": [
36
- "p",
37
- "p>img",
38
- "h1+p"
39
- ]
40
- },
41
- {
42
- "type": "string",
43
- "title": "MDAST Match Expression",
44
- "description": "A CSS selector expression selecting the Markdown nodes that should get processed",
45
- "examples": [
46
- "paragraph",
47
- "paragraph>image",
48
- "heading+paragraph"
49
- ]
50
- },
51
- {
52
- "type": "string",
53
- "title": "URL Pattern Match Expression",
54
- "description": "An [Express-like](https://expressjs.com/en/guide/routing.html) path expression for selecting URL patterns that will apply the changes to the `body` element.",
55
- "examples": [
56
- "/about",
57
- "/authors/:name",
58
- "/posts/(\\d\\d\\d\\d)/(\\d\\d)/:title"
59
- ]
60
- },
61
- {
62
- "type": "string",
63
- "title": "Content Intelligence Match Expression",
64
- "description": "Use a [Content Intelligence](https://github.com/adobe/helix-pipeline/blob/master/README.md#infer-content-types-with-utilstypes) expression for selecting sections in MDAST that have the specified order of children.",
65
- "examples": [
66
- "^heading",
67
- "paragraph$",
68
- "heading image+",
69
- "heading? image",
70
- "heading paragraph* image",
71
- "(paragraph|list)",
72
- "^heading (image paragraph)+$"
73
- ]
74
- }
75
- ]
76
- },
77
- "type": {
78
- "type": "string",
79
- "enum": ["html", "markdown", "url", "content"],
80
- "default": "html",
81
- "meta:enum": {
82
- "html": "Match against the generated DOM tree",
83
- "markdown": "Match against the source MDAST tree",
84
- "url": "Match against the request URL",
85
- "content": "Use content intelligence matching for sections"
86
- }
87
- },
88
- "wrap": {
89
- "type": "string",
90
- "description": "Add the following HTML tags around the generated HTML. This attribute is using [Emmet](https://emmet.io) notation.",
91
- "examples": [
92
- "div>ul>li",
93
- "div+p+bq",
94
- "div+div>p>span+em"
95
- ]
96
- },
97
- "replace": {
98
- "type": "string",
99
- "description": "Add the following HTML tags instead of the generated HTML. This attribute is using [Emmet](https://emmet.io) notation.",
100
- "examples": [
101
- "div>ul>li",
102
- "div+p+bq",
103
- "div+div>p>span+em"
104
- ]
105
- },
106
- "classnames": {
107
- "type": "array",
108
- "description": "Add the following class names to the `class` attribute of the generated HTML",
109
- "items": {
110
- "type": "string"
111
- }
112
- },
113
- "attribute": {
114
- "type": "object",
115
- "description": "create new attributes for each key value pair below this property",
116
- "additionalProperties": {
117
- "type": "string",
118
- "description": "The property value"
119
- }
120
- }
121
- }
122
- }
@@ -1,5 +0,0 @@
1
- Representation of a origin host for a proxy strain.
2
-
3
- As proxy strains deliver content from another web server, the `origin` property can be used to specify the source of this third-party content to be served. In the simplest case, the `origin` property can be a simple URL, but for advanced configuration, all the properties in this schema are available.
4
-
5
- The properties in this schema are largely identical with the properties defined in the [Fastly Backend API](https://docs.fastly.com/api/config#backend).
@@ -1,86 +0,0 @@
1
- {
2
- "meta:license": [
3
- "Copyright 2018 Adobe. All rights reserved.",
4
- "This file is licensed to you under the Apache License, Version 2.0 (the \"License\");",
5
- "you may not use this file except in compliance with the License. You may obtain a copy",
6
- "of the License at http://www.apache.org/licenses/LICENSE-2.0",
7
- "",
8
- "Unless required by applicable law or agreed to in writing, software distributed under",
9
- "the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS",
10
- "OF ANY KIND, either express or implied. See the License for the specific language",
11
- "governing permissions and limitations under the License."
12
- ],
13
- "$id": "https://ns.adobe.com/helix/shared/origin",
14
- "$schema": "http://json-schema.org/draft-07/schema#",
15
- "title": "Origin",
16
- "type": "object",
17
- "meta:status": "stabilizing",
18
- "description": "Representation of a origin host for a proxy strain.",
19
- "additionalProperties": false,
20
- "properties": {
21
- "hostname": {
22
- "type": "string",
23
- "format": "hostname",
24
- "description": "The hostname of the backend."
25
- },
26
- "port": {
27
- "type": "integer",
28
- "description": "The port number."
29
- },
30
- "error_threshold": {
31
- "type": "integer",
32
- "description": ""
33
- },
34
- "first_byte_timeout": {
35
- "type": "integer",
36
- "description": "How long to wait for the first bytes in milliseconds."
37
- },
38
- "weight": {
39
- "type": "integer",
40
- "description": "Weight used to load balance this backend against others."
41
- },
42
- "address": {
43
- "type": "string",
44
- "format": "hostname",
45
- "description": "An hostname, IPv4, or IPv6 address for the backend."
46
- },
47
- "connect_timeout": {
48
- "type": "string",
49
- "description": "How long to wait for a timeout in milliseconds."
50
- },
51
- "name": {
52
- "type": "string",
53
- "description": "The name of the backend."
54
- },
55
- "between_bytes_timeout": {
56
- "type": "integer",
57
- "description": "How long to wait between bytes in milliseconds."
58
- },
59
- "shield": {
60
- "type": "string",
61
- "description": "The shield POP designated to reduce inbound load on this origin by serving the cached data to the rest of the network."
62
- },
63
- "ssl_cert_hostname": {
64
- "type": "string",
65
- "format": "hostname",
66
- "description": "Overrides ssl_hostname, but only for cert verification. Does not affect SNI at all."
67
- },
68
- "max_conn": {
69
- "type": "integer",
70
- "description": "Maximum number of connections."
71
- },
72
- "use_ssl": {
73
- "type": "boolean",
74
- "description": "Whether or not to use SSL to reach the backend."
75
- },
76
- "path": {
77
- "type": "string",
78
- "description": "The base path to make requests again. For example, if your `origin` is `http://www.example.com/foo` and a request is made to your site using the URL `/bar`, a backend request to `http://www.example.com/foo/bar` will be made."
79
- },
80
- "override_host": {
81
- "type": "string",
82
- "format": "hostname",
83
- "description": "The hostname to override the [Host header](https://docs.fastly.com/guides/basic-configuration/specifying-an-override-host).\nBy default, proxy strains use the `Host` header that was used to make the request to Helix's CDN, which is ideal for migration use cases where the existing backend expects to serve traffic to a hostname that has now been taken over by Helix. In cases where Helix is aggregating content from multiple hosts, and the backend won't serve any content to the domain name Helix is using, set the `override_host` property to an accepted `Host` header value."
84
- }
85
- }
86
- }
@@ -1,210 +0,0 @@
1
- {
2
- "meta:license": [
3
- "Copyright 2019 Adobe. All rights reserved.",
4
- "This file is licensed to you under the Apache License, Version 2.0 (the \"License\");",
5
- "you may not use this file except in compliance with the License. You may obtain a copy",
6
- "of the License at http://www.apache.org/licenses/LICENSE-2.0",
7
- "",
8
- "Unless required by applicable law or agreed to in writing, software distributed under",
9
- "the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS",
10
- "OF ANY KIND, either express or implied. See the License for the specific language",
11
- "governing permissions and limitations under the License."
12
- ],
13
- "$id": "https://ns.adobe.com/helix/shared/performance",
14
- "$schema": "http://json-schema.org/draft-07/schema#",
15
- "title": "Performance",
16
- "type": "object",
17
- "meta:status": "stabilizing",
18
- "description": "Performance testing details.",
19
- "additionalProperties": false,
20
- "properties": {
21
- "device": {
22
- "description": "Testing device",
23
- "enum": [
24
- "",
25
- "MotorolaMotoG4",
26
- "iPhone5",
27
- "iPhone6",
28
- "iPhone6Plus",
29
- "iPhone7",
30
- "iPhone8",
31
- "Nexus5X",
32
- "Nexus6P",
33
- "GalaxyS5",
34
- "iPad",
35
- "iPadPro"
36
- ]
37
- },
38
- "location": {
39
- "description": "Testing location",
40
- "enum": [
41
- "",
42
- "NorthVirginia",
43
- "Frankfurt",
44
- "Sydney",
45
- "Ohio",
46
- "California",
47
- "Oregon",
48
- "Canada",
49
- "Ireland",
50
- "Tokyo",
51
- "Seoul",
52
- "Singapore",
53
- "Mumbai",
54
- "SaoPaulo",
55
- "London"
56
- ]
57
- },
58
- "connection": {
59
- "description": "Testing connection",
60
- "enum": [
61
- "",
62
- "regular2G",
63
- "good2G",
64
- "slow3G",
65
- "regular3G",
66
- "good3G",
67
- "emergingMarkets",
68
- "regular4G",
69
- "LTE",
70
- "dsl",
71
- "wifi",
72
- "cable"
73
- ]
74
- },
75
- "lighthouse-seo-score": {
76
- "type": "number",
77
- "description": "Lighthouse SEO Score"
78
- },
79
-
80
- "lighthouse-best-practices-score": {
81
- "type": "number",
82
- "description": "Lighthouse Best Practices Score"
83
- },
84
-
85
- "lighthouse-accessibility-score": {
86
- "type": "number",
87
- "description": "Lighthouse Accessibility Score"
88
- },
89
-
90
- "lighthouse-performance-score": {
91
- "type": "number",
92
- "description": "Lighthouse Performance Score"
93
- },
94
-
95
- "lighthouse-pwa-score": {
96
- "type": "number",
97
- "description": "Lighthouse Progressive Web App Score"
98
- },
99
-
100
- "js-parse-compile": {
101
- "type": "number",
102
- "description": "JS Parse & Compile"
103
- },
104
- "dom-size": { "type": "number", "description": "DOM Element Count" },
105
- "visually_complete_85": {
106
- "type": "number",
107
- "description": "85% Visually Complete"
108
- },
109
-
110
- "visually_complete": {
111
- "type": "number",
112
- "description": "Visually Complete"
113
- },
114
-
115
- "consistently-interactive": {
116
- "type": "number",
117
- "description": "Time to Interactive"
118
- },
119
-
120
- "first-interactive": { "type": "number", "description": "First CPU Idle" },
121
-
122
- "time-to-first-byte": {
123
- "type": "number",
124
- "description": "Time to First Byte"
125
- },
126
-
127
- "estimated-input-latency": {
128
- "type": "number",
129
- "description": "Estimated input latency"
130
- },
131
- "speed_index": { "type": "number", "description": "Speed Index" },
132
- "first-meaningful-paint": {
133
- "type": "number",
134
- "description": "First Meaningful Paint"
135
- },
136
-
137
- "first-contentful-paint": {
138
- "type": "number",
139
- "description": "First Contentful Paint"
140
- },
141
- "firstRender": { "type": "number", "description": "First Paint" },
142
- "image_body_size_in_bytes": {
143
- "type": "number",
144
- "description": "Total Image size in bytes"
145
- },
146
-
147
- "image_size_in_bytes": {
148
- "type": "number",
149
- "description": "Total Image transferred"
150
- },
151
-
152
- "font_body_size_in_bytes": {
153
- "type": "number",
154
- "description": "Total Webfont size in bytes"
155
- },
156
-
157
- "font_size_in_bytes": {
158
- "type": "number",
159
- "description": "Total Webfont transferred"
160
- },
161
-
162
- "js_body_size_in_bytes": {
163
- "type": "number",
164
- "description": "Total JavaScript size in bytes"
165
- },
166
-
167
- "js_size_in_bytes": {
168
- "type": "number",
169
- "description": "Total JavaScript Transferred"
170
- },
171
-
172
- "css_body_size_in_bytes": {
173
- "type": "number",
174
- "description": "Total CSS size in bytes"
175
- },
176
-
177
- "css_size_in_bytes": {
178
- "type": "number",
179
- "description": "Total CSS transferred"
180
- },
181
-
182
- "html_body_size_in_bytes": {
183
- "type": "number",
184
- "description": "Total HTML size in bytes"
185
- },
186
-
187
- "html_size_in_bytes": {
188
- "type": "number",
189
- "description": "Total HTML transferred"
190
- },
191
-
192
- "page_wait_timing": { "type": "number", "description": "Response time" },
193
-
194
- "page_size_in_bytes": {
195
- "type": "number",
196
- "description": "Total Page transferred"
197
- },
198
-
199
- "page_body_size_in_bytes": {
200
- "type": "number",
201
- "description": "Total Page size in bytes"
202
- },
203
-
204
- "asset_count": { "type": "number", "description": "Number of requests" },
205
-
206
- "onload": { "type": "number", "description": "onLoad" },
207
-
208
- "oncontentload": { "type": "number", "description": "onContentLoad" }
209
- }
210
- }
@@ -1,20 +0,0 @@
1
- A proxy strain is a strain that serves content from another web server, acting as a pure proxy.
2
-
3
- ## How are Proxy Strains configured?
4
-
5
- Add an `origin` property to your strain object in the `helix-config.yaml`. The `origin` property can be either the base URL of the web server that you want to serve content from
6
- or a more complex configuration object, described in the [Origin schema](origin.schema.md).
7
-
8
- Most of the other properties that can be used to describe other strains (i.e. [Runtime strains](runtimestrain.schema.md)) do not work for Proxy strains and are not just irrelevant, but also forbidden.
9
-
10
- ## What are useful scenarios for Proxy Strains?
11
-
12
- You can use Proxy Strains in a number of scenarios:
13
-
14
- - in order to integrate non-Helix web applications that should run on the same hostname
15
- - in order to serve legacy content from an old website as a fallback
16
- - in order to enable a gradual migration of an existing site to Helix
17
-
18
- A good pattern for migrating to Project Helix is to define one proxy strain as the `default` that serves the old site from the current backend.
19
-
20
- Over time, add more and more runtime strains that are powered by Helix and adjust the `url` and `conditions` so that they receive more traffic.
@@ -1,87 +0,0 @@
1
- {
2
- "meta:license": [
3
- "Copyright 2019 Adobe. All rights reserved.",
4
- "This file is licensed to you under the Apache License, Version 2.0 (the \"License\");",
5
- "you may not use this file except in compliance with the License. You may obtain a copy",
6
- "of the License at http://www.apache.org/licenses/LICENSE-2.0",
7
- "",
8
- "Unless required by applicable law or agreed to in writing, software distributed under",
9
- "the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS",
10
- "OF ANY KIND, either express or implied. See the License for the specific language",
11
- "governing permissions and limitations under the License."
12
- ],
13
- "$id": "https://ns.adobe.com/helix/shared/proxystrain",
14
- "$schema": "http://json-schema.org/draft-07/schema#",
15
- "title": "Proxy Strain",
16
- "type": "object",
17
- "meta:status": "stabilizing",
18
- "description": "A strain is a combination of code and content that enables the creation of a digital experience. Strains can be used to create language variants of websites, A/B tests, personalization, or to aggregate content from multiple sources",
19
- "additionalProperties": false,
20
- "properties": {
21
- "name": {
22
- "type": "string",
23
- "description": "Name of the strain"
24
- },
25
- "origin": {
26
- "description": "Origin backend for proxy strains.",
27
- "anyOf": [
28
- {
29
- "type": "string",
30
- "format": "uri"
31
- },
32
- {"$ref": "https://ns.adobe.com/helix/shared/origin"}
33
- ]
34
- },
35
- "sticky": {
36
- "description": "Sticky strains are not re-evaluated on every request. As soon as a visitor is determined to match a sticky strain, a session cookie will be set to keep the user in the strain.",
37
- "type": "boolean"
38
- },
39
- "url": {
40
- "description": "URL condition.\n\n**Warning**: this property has been deprecated in favour of adding the `url` to the `condition` property.",
41
- "type": "string",
42
- "format": "uri",
43
- "meta:status": "deprecated"
44
- },
45
- "urls": {
46
- "description": "List of known URLs for testing this strain",
47
- "type": "array",
48
- "items": {
49
- "type": "string",
50
- "format": "uri"
51
- }
52
- },
53
- "condition": {
54
- "description": "VLC condition that controls that can optionally activate this strain.",
55
- "oneOf": [
56
- {
57
- "type": "string"
58
- },
59
- {"$ref": "https://ns.adobe.com/helix/shared/conditions"}
60
- ]
61
- },
62
- "perf": {
63
- "$ref": "https://ns.adobe.com/helix/shared/performance"
64
- },
65
- "version-lock": {
66
- "$ref": "https://ns.adobe.com/helix/shared/version-lock"
67
- },
68
- "params": {
69
- "description": "A list (using globbing language) of accepted URL parameters. Note: every parameter is a potential cache killer.",
70
- "type": "array",
71
- "items": {
72
- "type": "string"
73
- }
74
- },
75
- "redirects": {
76
- "type": "array",
77
- "description": "The redirect rules that should be applied to this strain",
78
- "items": {
79
- "$ref": "https://ns.adobe.com/helix/shared/redirectrule"
80
- }
81
- }
82
- },
83
- "required": [
84
- "origin",
85
- "name"
86
- ]
87
- }
@@ -1,34 +0,0 @@
1
- {
2
- "meta:license": [
3
- "Copyright 2020 Adobe. All rights reserved.",
4
- "This file is licensed to you under the Apache License, Version 2.0 (the \"License\");",
5
- "you may not use this file except in compliance with the License. You may obtain a copy",
6
- "of the License at http://www.apache.org/licenses/LICENSE-2.0",
7
- "",
8
- "Unless required by applicable law or agreed to in writing, software distributed under",
9
- "the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS",
10
- "OF ANY KIND, either express or implied. See the License for the specific language",
11
- "governing permissions and limitations under the License."
12
- ],
13
- "$id": "https://ns.adobe.com/helix/shared/redirect",
14
- "$schema": "http://json-schema.org/draft-07/schema#",
15
- "title": "Redirect",
16
- "description": "A redirect specification take take the form of either a URL of a spreadsheet with rewrite rules or a rewrite rule as `from`, `to` pairs.",
17
- "anyOf": [
18
- {
19
- "type": "string",
20
- "format": "uri",
21
- "title": "Rewrites Excel Spreadsheet",
22
- "description": "A link to an Excel spreadsheet hosted on Sharepoint, shared with `helix@adobe.com` that has at least two columns. The first column, titled ‟from” contains the rewrite source path, the second column, titled ‟to” specifies the rewrite target path."
23
- },
24
- {
25
- "type": "string",
26
- "format": "uri",
27
- "title": "Rewrites Google Spreadsheet",
28
- "description": "A link to a Google spreadsheet, shared with `helix@adobe.com` that has at least two columns. The first column, titled ‟from” contains the rewrite source path, the second column, titled ‟to” specifies the rewrite target path."
29
- },
30
- {
31
- "$ref": "https://ns.adobe.com/helix/shared/redirectrule"
32
- }
33
- ]
34
- }
@@ -1,46 +0,0 @@
1
- {
2
- "meta:license": [
3
- "Copyright 2019 Adobe. All rights reserved.",
4
- "This file is licensed to you under the Apache License, Version 2.0 (the \"License\");",
5
- "you may not use this file except in compliance with the License. You may obtain a copy",
6
- "of the License at http://www.apache.org/licenses/LICENSE-2.0",
7
- "",
8
- "Unless required by applicable law or agreed to in writing, software distributed under",
9
- "the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS",
10
- "OF ANY KIND, either express or implied. See the License for the specific language",
11
- "governing permissions and limitations under the License."
12
- ],
13
- "$id": "https://ns.adobe.com/helix/shared/redirectrule",
14
- "$schema": "http://json-schema.org/draft-07/schema#",
15
- "title": "Redirect Rule",
16
- "type": "object",
17
- "meta:status": "stabilizing",
18
- "description": "A strain is a combination of code and content that enables the creation of a digital experience. Strains can be used to create language variants of websites, A/B tests, personalization, or to aggregate content from multiple sources",
19
- "additionalProperties": false,
20
- "properties": {
21
- "from": {
22
- "type": "string",
23
- "description": "A URL path or regular expression to match the path of a URL. It can contain capture groups that can be used in `to`.",
24
- "examples": [
25
- "/old",
26
- "/old/(.*)\\.php$"
27
- ]
28
- },
29
- "to": {
30
- "type": "string",
31
- "description": "A replacement string that replaces matched URLs found in `from`.",
32
- "examples": [
33
- "/new",
34
- "/new/$1.html"
35
- ]
36
- },
37
- "type": {
38
- "enum": [
39
- "permanent",
40
- "temporary",
41
- "internal"
42
- ],
43
- "description": "What kind of redirect is this?"
44
- }
45
- }
46
- }
@@ -1 +0,0 @@
1
- This configuration file enables the creation of programmatic redirects, rewrites, and vanity URLs.
@@ -1,41 +0,0 @@
1
- {
2
- "meta:license": [
3
- "Copyright 2020 Adobe. All rights reserved.",
4
- "This file is licensed to you under the Apache License, Version 2.0 (the \"License\");",
5
- "you may not use this file except in compliance with the License. You may obtain a copy",
6
- "of the License at http://www.apache.org/licenses/LICENSE-2.0",
7
- "",
8
- "Unless required by applicable law or agreed to in writing, software distributed under",
9
- "the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS",
10
- "OF ANY KIND, either express or implied. See the License for the specific language",
11
- "governing permissions and limitations under the License."
12
- ],
13
- "$id": "https://ns.adobe.com/helix/shared/redirects",
14
- "$schema": "http://json-schema.org/draft-07/schema#",
15
- "title": "Redirects Configuration",
16
- "type": "object",
17
- "properties": {
18
- "version": {
19
- "type":["string", "number"],
20
- "enum": ["1", 1],
21
- "default": 1,
22
- "description": "The redirect-config file format version"
23
- },
24
- "redirects": {
25
- "type": "array",
26
- "default": [],
27
- "items": {
28
- "$ref": "https://ns.adobe.com/helix/shared/redirect"
29
- }
30
- },
31
- "vanity": {
32
- "type": "object",
33
- "title": "Vanity URL extractor",
34
- "description": "Configure one or multiple vanity URL extractors, each extractor is a property of this object",
35
- "default": {},
36
- "additionalProperties": {
37
- "$ref": "https://ns.adobe.com/helix/shared/vanity"
38
- }
39
- }
40
- }
41
- }