@adobe/helix-admin-support 2.0.1 → 2.0.3
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.
- package/CHANGELOG.md +14 -0
- package/docs/API.md +62 -6
- package/docs/README.md +8 -0
- package/docs/helix-config-properties-fstab-properties-data.md +15 -0
- package/docs/helix-config-properties-fstab-properties-lastmodified.md +15 -0
- package/docs/helix-config-properties-fstab.md +58 -0
- package/docs/helix-config-properties-head-properties-data-properties-html.md +15 -0
- package/docs/helix-config-properties-head-properties-data.md +39 -0
- package/docs/helix-config-properties-head-properties-lastmodified.md +15 -0
- package/docs/helix-config-properties-head.md +58 -0
- package/docs/helix-config.md +58 -0
- package/docs/helix-config.schema.json +1 -0
- package/docs/project-config-properties-blueprint.md +22 -0
- package/docs/project-config.md +36 -10
- package/docs/project-config.schema.json +1 -1
- package/package.json +1 -1
- package/src/contentbus.js +2 -10
- package/src/fetch-helix-config.js +34 -8
- package/src/schemas/helix-config.schema.json +2 -3
- package/types/helix-config.d.ts +1 -49
- package/src/schemas/mountconfig.schema.json +0 -38
- package/src/schemas/mountpoint.schema.json +0 -56
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
## [2.0.3](https://github.com/adobe/helix-admin-support/compare/v2.0.2...v2.0.3) (2023-04-05)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* properly add contentbusid ([#133](https://github.com/adobe/helix-admin-support/issues/133)) ([d6152b9](https://github.com/adobe/helix-admin-support/commit/d6152b9492e8b7bb7b3f84ab183d7a9ad8e64016))
|
|
7
|
+
|
|
8
|
+
## [2.0.2](https://github.com/adobe/helix-admin-support/compare/v2.0.1...v2.0.2) (2023-04-04)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
* validate owner/repo/ref ([#132](https://github.com/adobe/helix-admin-support/issues/132)) ([266a624](https://github.com/adobe/helix-admin-support/commit/266a6240ff1434bf9350c3ca72700297d88e15a8))
|
|
14
|
+
|
|
1
15
|
## [2.0.1](https://github.com/adobe/helix-admin-support/compare/v2.0.0...v2.0.1) (2023-04-04)
|
|
2
16
|
|
|
3
17
|
|
package/docs/API.md
CHANGED
|
@@ -19,8 +19,13 @@ automatically swapped out to S3.</p>
|
|
|
19
19
|
## Functions
|
|
20
20
|
|
|
21
21
|
<dl>
|
|
22
|
-
<dt><a href="#
|
|
23
|
-
<dd><p>Retrieves the content bus id
|
|
22
|
+
<dt><a href="#calculateContentBusId">calculateContentBusId(ctx, info)</a> ⇒ <code>Promise.<(string|null)></code></dt>
|
|
23
|
+
<dd><p>Retrieves the content bus id by calculating the hash from the fstab.</p>
|
|
24
|
+
</dd>
|
|
25
|
+
<dt><a href="#getContentBusId">getContentBusId(ctx, info, optional)</a> ⇒ <code>Promise.<string></code></dt>
|
|
26
|
+
<dd><p>Retrieves the content bus id either from the context or by reading fstab entry of
|
|
27
|
+
helix-config.json. If the helix-config.json does contain the information (yet) it will fall back
|
|
28
|
+
to <a href="#calculateContentBusId">#calculateContentBusId</a>.</p>
|
|
24
29
|
</dd>
|
|
25
30
|
<dt><a href="#handleResponse">handleResponse(log, response, key, type)</a> ⇒ <code>Promise.<ConfigAll></code></dt>
|
|
26
31
|
<dd><p>Checks if the response is valid and returns the project config.</p>
|
|
@@ -49,6 +54,12 @@ and stores it in the context as projectConfig.</p>
|
|
|
49
54
|
<dt><a href="#fetchFstab">fetchFstab(ctx, opts, optional)</a> ⇒ <code>Promise.<MountConfig></code></dt>
|
|
50
55
|
<dd><p>Retrieves the fstab from the underlying storage and stores it in the context as mountConfig.</p>
|
|
51
56
|
</dd>
|
|
57
|
+
<dt><a href="#handleResponse">handleResponse(log, response, key, type)</a> ⇒ <code>Promise.<HelixConfig></code></dt>
|
|
58
|
+
<dd><p>Checks if the response is valid and returns the helix config.</p>
|
|
59
|
+
</dd>
|
|
60
|
+
<dt><a href="#fetchHelixConfig">fetchHelixConfig(ctx, info, optional)</a> ⇒ <code>Promise.<HelixConfig></code></dt>
|
|
61
|
+
<dd><p>Retrieves the helix-config.json which is an aggregate from fstab.yaml and head.html.</p>
|
|
62
|
+
</dd>
|
|
52
63
|
<dt><a href="#handleResponse">handleResponse(log, response, key)</a> ⇒ <code>Promise.<MountConfig></code></dt>
|
|
53
64
|
<dd><p>Checks if the response is valid and returns a IgnoreConfig.</p>
|
|
54
65
|
</dd>
|
|
@@ -123,10 +134,26 @@ cnd.1.type: cloudflare
|
|
|
123
134
|
Name of the indexing configuration, subject to be renamed.
|
|
124
135
|
|
|
125
136
|
**Kind**: global constant
|
|
137
|
+
<a name="calculateContentBusId"></a>
|
|
138
|
+
|
|
139
|
+
## calculateContentBusId(ctx, info) ⇒ <code>Promise.<(string\|null)></code>
|
|
140
|
+
Retrieves the content bus id by calculating the hash from the fstab.
|
|
141
|
+
|
|
142
|
+
**Kind**: global function
|
|
143
|
+
**Returns**: <code>Promise.<(string\|null)></code> - the content bus id or {@code null}
|
|
144
|
+
if no fstab or no mountpoint not found in fstab
|
|
145
|
+
|
|
146
|
+
| Param | Type | Description |
|
|
147
|
+
| --- | --- | --- |
|
|
148
|
+
| ctx | <code>AdminContext</code> | the context |
|
|
149
|
+
| info | <code>PathInfo</code> | lookup options |
|
|
150
|
+
|
|
126
151
|
<a name="getContentBusId"></a>
|
|
127
152
|
|
|
128
|
-
## getContentBusId(ctx,
|
|
129
|
-
Retrieves the content bus id either from the context or by reading
|
|
153
|
+
## getContentBusId(ctx, info, optional) ⇒ <code>Promise.<string></code>
|
|
154
|
+
Retrieves the content bus id either from the context or by reading fstab entry of
|
|
155
|
+
helix-config.json. If the helix-config.json does contain the information (yet) it will fall back
|
|
156
|
+
to [#calculateContentBusId](#calculateContentBusId).
|
|
130
157
|
|
|
131
158
|
**Kind**: global function
|
|
132
159
|
**Returns**: <code>Promise.<string></code> - the content bus id
|
|
@@ -134,8 +161,8 @@ Retrieves the content bus id either from the context or by reading the fstab.
|
|
|
134
161
|
| Param | Type | Description |
|
|
135
162
|
| --- | --- | --- |
|
|
136
163
|
| ctx | <code>AdminContext</code> | the context |
|
|
137
|
-
|
|
|
138
|
-
| optional | <code>boolean</code> |
|
|
164
|
+
| info | <code>PathInfo</code> | lookup options |
|
|
165
|
+
| optional | <code>boolean</code> | if {@code true} it will return {@code null} if none of the sources exists. |
|
|
139
166
|
|
|
140
167
|
<a name="handleResponse"></a>
|
|
141
168
|
|
|
@@ -255,6 +282,35 @@ Retrieves the fstab from the underlying storage and stores it in the context as
|
|
|
255
282
|
|
|
256
283
|
<a name="handleResponse"></a>
|
|
257
284
|
|
|
285
|
+
## handleResponse(log, response, key, type) ⇒ <code>Promise.<HelixConfig></code>
|
|
286
|
+
Checks if the response is valid and returns the helix config.
|
|
287
|
+
|
|
288
|
+
**Kind**: global function
|
|
289
|
+
**Returns**: <code>Promise.<HelixConfig></code> - the index config or null
|
|
290
|
+
|
|
291
|
+
| Param | Type | Description |
|
|
292
|
+
| --- | --- | --- |
|
|
293
|
+
| log | <code>Logger</code> | logger |
|
|
294
|
+
| response | <code>Response</code> | content response from the storage |
|
|
295
|
+
| key | <code>string</code> | storage key (logging information) |
|
|
296
|
+
| type | <code>string</code> | type of storage (logging information |
|
|
297
|
+
|
|
298
|
+
<a name="fetchHelixConfig"></a>
|
|
299
|
+
|
|
300
|
+
## fetchHelixConfig(ctx, info, optional) ⇒ <code>Promise.<HelixConfig></code>
|
|
301
|
+
Retrieves the helix-config.json which is an aggregate from fstab.yaml and head.html.
|
|
302
|
+
|
|
303
|
+
**Kind**: global function
|
|
304
|
+
**Returns**: <code>Promise.<HelixConfig></code> - the helix-config or {@code null} if optional and not found.
|
|
305
|
+
|
|
306
|
+
| Param | Type | Description |
|
|
307
|
+
| --- | --- | --- |
|
|
308
|
+
| ctx | <code>AdminContext</code> | the context |
|
|
309
|
+
| info | <code>PathInfo</code> | path info |
|
|
310
|
+
| optional | <code>boolean</code> | if {@code true} returns null if not found |
|
|
311
|
+
|
|
312
|
+
<a name="handleResponse"></a>
|
|
313
|
+
|
|
258
314
|
## handleResponse(log, response, key) ⇒ <code>Promise.<MountConfig></code>
|
|
259
315
|
Checks if the response is valid and returns a IgnoreConfig.
|
|
260
316
|
|
package/docs/README.md
CHANGED
|
@@ -4,6 +4,8 @@
|
|
|
4
4
|
|
|
5
5
|
* [ConfigAll](./project-config-all.md) – `https://ns.adobe.com/helix/config/all`
|
|
6
6
|
|
|
7
|
+
* [HelixConfig](./helix-config.md "Internal configuration aggregate consisting of fstab") – `https://ns.adobe.com/helix/config/helix`
|
|
8
|
+
|
|
7
9
|
* [ProjectCDNConfig](./project-config-cdn.md) – `https://ns.adobe.com/helix/config/cdn`
|
|
8
10
|
|
|
9
11
|
* [ProjectConfig](./project-config.md) – `https://ns.adobe.com/helix/config/project`
|
|
@@ -32,6 +34,12 @@
|
|
|
32
34
|
|
|
33
35
|
* [Untitled object in ConfigAll](./project-config-all-properties-headers.md "Headers modifier (from /") – `https://ns.adobe.com/helix/config/all#/properties/headers`
|
|
34
36
|
|
|
37
|
+
* [Untitled object in HelixConfig](./helix-config-properties-fstab.md "The embedded fstab") – `https://ns.adobe.com/helix/config/helix#/properties/fstab`
|
|
38
|
+
|
|
39
|
+
* [Untitled object in HelixConfig](./helix-config-properties-head.md "The embedded head") – `https://ns.adobe.com/helix/config/helix#/properties/head`
|
|
40
|
+
|
|
41
|
+
* [Untitled object in HelixConfig](./helix-config-properties-head-properties-data.md) – `https://ns.adobe.com/helix/config/helix#/properties/head/properties/data`
|
|
42
|
+
|
|
35
43
|
* [Untitled object in ProjectConfig](./project-config-properties-siteaccessconfig-properties-require.md) – `https://ns.adobe.com/helix/config/project#/properties/access/properties/require`
|
|
36
44
|
|
|
37
45
|
### Arrays
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# Untitled undefined type in HelixConfig Schema
|
|
2
|
+
|
|
3
|
+
```txt
|
|
4
|
+
https://ns.adobe.com/helix/config/helix#/properties/fstab/properties/data
|
|
5
|
+
```
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
| Abstract | Extensible | Status | Identifiable | Custom Properties | Additional Properties | Access Restrictions | Defined In |
|
|
10
|
+
| :------------------ | :--------- | :------------- | :---------------------- | :---------------- | :-------------------- | :------------------ | :---------------------------------------------------------------------------- |
|
|
11
|
+
| Can be instantiated | No | Unknown status | Unknown identifiability | Forbidden | Allowed | none | [helix-config.schema.json\*](helix-config.schema.json "open original schema") |
|
|
12
|
+
|
|
13
|
+
## data Type
|
|
14
|
+
|
|
15
|
+
unknown
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# Untitled string in HelixConfig Schema
|
|
2
|
+
|
|
3
|
+
```txt
|
|
4
|
+
https://ns.adobe.com/helix/config/helix#/properties/fstab/properties/lastModified
|
|
5
|
+
```
|
|
6
|
+
|
|
7
|
+
The last modified date
|
|
8
|
+
|
|
9
|
+
| Abstract | Extensible | Status | Identifiable | Custom Properties | Additional Properties | Access Restrictions | Defined In |
|
|
10
|
+
| :------------------ | :--------- | :------------- | :---------------------- | :---------------- | :-------------------- | :------------------ | :---------------------------------------------------------------------------- |
|
|
11
|
+
| Can be instantiated | No | Unknown status | Unknown identifiability | Forbidden | Allowed | none | [helix-config.schema.json\*](helix-config.schema.json "open original schema") |
|
|
12
|
+
|
|
13
|
+
## lastModified Type
|
|
14
|
+
|
|
15
|
+
`string`
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
# Untitled object in HelixConfig Schema
|
|
2
|
+
|
|
3
|
+
```txt
|
|
4
|
+
https://ns.adobe.com/helix/config/helix#/properties/fstab
|
|
5
|
+
```
|
|
6
|
+
|
|
7
|
+
The embedded fstab.yaml
|
|
8
|
+
|
|
9
|
+
| Abstract | Extensible | Status | Identifiable | Custom Properties | Additional Properties | Access Restrictions | Defined In |
|
|
10
|
+
| :------------------ | :--------- | :------------- | :----------- | :---------------- | :-------------------- | :------------------ | :---------------------------------------------------------------------------- |
|
|
11
|
+
| Can be instantiated | No | Unknown status | No | Forbidden | Forbidden | none | [helix-config.schema.json\*](helix-config.schema.json "open original schema") |
|
|
12
|
+
|
|
13
|
+
## fstab Type
|
|
14
|
+
|
|
15
|
+
`object` ([Details](helix-config-properties-fstab.md))
|
|
16
|
+
|
|
17
|
+
# fstab Properties
|
|
18
|
+
|
|
19
|
+
| Property | Type | Required | Nullable | Defined by |
|
|
20
|
+
| :---------------------------- | :------------ | :------- | :------------- | :---------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
21
|
+
| [lastModified](#lastmodified) | `string` | Required | cannot be null | [HelixConfig](helix-config-properties-fstab-properties-lastmodified.md "https://ns.adobe.com/helix/config/helix#/properties/fstab/properties/lastModified") |
|
|
22
|
+
| [data](#data) | Not specified | Required | cannot be null | [HelixConfig](helix-config-properties-fstab-properties-data.md "https://ns.adobe.com/helix/config/helix#/properties/fstab/properties/data") |
|
|
23
|
+
|
|
24
|
+
## lastModified
|
|
25
|
+
|
|
26
|
+
The last modified date
|
|
27
|
+
|
|
28
|
+
`lastModified`
|
|
29
|
+
|
|
30
|
+
* is required
|
|
31
|
+
|
|
32
|
+
* Type: `string`
|
|
33
|
+
|
|
34
|
+
* cannot be null
|
|
35
|
+
|
|
36
|
+
* defined in: [HelixConfig](helix-config-properties-fstab-properties-lastmodified.md "https://ns.adobe.com/helix/config/helix#/properties/fstab/properties/lastModified")
|
|
37
|
+
|
|
38
|
+
### lastModified Type
|
|
39
|
+
|
|
40
|
+
`string`
|
|
41
|
+
|
|
42
|
+
## data
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
`data`
|
|
47
|
+
|
|
48
|
+
* is required
|
|
49
|
+
|
|
50
|
+
* Type: unknown
|
|
51
|
+
|
|
52
|
+
* cannot be null
|
|
53
|
+
|
|
54
|
+
* defined in: [HelixConfig](helix-config-properties-fstab-properties-data.md "https://ns.adobe.com/helix/config/helix#/properties/fstab/properties/data")
|
|
55
|
+
|
|
56
|
+
### data Type
|
|
57
|
+
|
|
58
|
+
unknown
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# Untitled string in HelixConfig Schema
|
|
2
|
+
|
|
3
|
+
```txt
|
|
4
|
+
https://ns.adobe.com/helix/config/helix#/properties/head/properties/data/properties/html
|
|
5
|
+
```
|
|
6
|
+
|
|
7
|
+
The contents of the head.html
|
|
8
|
+
|
|
9
|
+
| Abstract | Extensible | Status | Identifiable | Custom Properties | Additional Properties | Access Restrictions | Defined In |
|
|
10
|
+
| :------------------ | :--------- | :------------- | :---------------------- | :---------------- | :-------------------- | :------------------ | :---------------------------------------------------------------------------- |
|
|
11
|
+
| Can be instantiated | No | Unknown status | Unknown identifiability | Forbidden | Allowed | none | [helix-config.schema.json\*](helix-config.schema.json "open original schema") |
|
|
12
|
+
|
|
13
|
+
## html Type
|
|
14
|
+
|
|
15
|
+
`string`
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# Untitled object in HelixConfig Schema
|
|
2
|
+
|
|
3
|
+
```txt
|
|
4
|
+
https://ns.adobe.com/helix/config/helix#/properties/head/properties/data
|
|
5
|
+
```
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
| Abstract | Extensible | Status | Identifiable | Custom Properties | Additional Properties | Access Restrictions | Defined In |
|
|
10
|
+
| :------------------ | :--------- | :------------- | :----------- | :---------------- | :-------------------- | :------------------ | :---------------------------------------------------------------------------- |
|
|
11
|
+
| Can be instantiated | No | Unknown status | No | Forbidden | Forbidden | none | [helix-config.schema.json\*](helix-config.schema.json "open original schema") |
|
|
12
|
+
|
|
13
|
+
## data Type
|
|
14
|
+
|
|
15
|
+
`object` ([Details](helix-config-properties-head-properties-data.md))
|
|
16
|
+
|
|
17
|
+
# data Properties
|
|
18
|
+
|
|
19
|
+
| Property | Type | Required | Nullable | Defined by |
|
|
20
|
+
| :------------ | :------- | :------- | :------------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
21
|
+
| [html](#html) | `string` | Optional | cannot be null | [HelixConfig](helix-config-properties-head-properties-data-properties-html.md "https://ns.adobe.com/helix/config/helix#/properties/head/properties/data/properties/html") |
|
|
22
|
+
|
|
23
|
+
## html
|
|
24
|
+
|
|
25
|
+
The contents of the head.html
|
|
26
|
+
|
|
27
|
+
`html`
|
|
28
|
+
|
|
29
|
+
* is optional
|
|
30
|
+
|
|
31
|
+
* Type: `string`
|
|
32
|
+
|
|
33
|
+
* cannot be null
|
|
34
|
+
|
|
35
|
+
* defined in: [HelixConfig](helix-config-properties-head-properties-data-properties-html.md "https://ns.adobe.com/helix/config/helix#/properties/head/properties/data/properties/html")
|
|
36
|
+
|
|
37
|
+
### html Type
|
|
38
|
+
|
|
39
|
+
`string`
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# Untitled string in HelixConfig Schema
|
|
2
|
+
|
|
3
|
+
```txt
|
|
4
|
+
https://ns.adobe.com/helix/config/helix#/properties/head/properties/lastModified
|
|
5
|
+
```
|
|
6
|
+
|
|
7
|
+
The last modified date
|
|
8
|
+
|
|
9
|
+
| Abstract | Extensible | Status | Identifiable | Custom Properties | Additional Properties | Access Restrictions | Defined In |
|
|
10
|
+
| :------------------ | :--------- | :------------- | :---------------------- | :---------------- | :-------------------- | :------------------ | :---------------------------------------------------------------------------- |
|
|
11
|
+
| Can be instantiated | No | Unknown status | Unknown identifiability | Forbidden | Allowed | none | [helix-config.schema.json\*](helix-config.schema.json "open original schema") |
|
|
12
|
+
|
|
13
|
+
## lastModified Type
|
|
14
|
+
|
|
15
|
+
`string`
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
# Untitled object in HelixConfig Schema
|
|
2
|
+
|
|
3
|
+
```txt
|
|
4
|
+
https://ns.adobe.com/helix/config/helix#/properties/head
|
|
5
|
+
```
|
|
6
|
+
|
|
7
|
+
The embedded head.html
|
|
8
|
+
|
|
9
|
+
| Abstract | Extensible | Status | Identifiable | Custom Properties | Additional Properties | Access Restrictions | Defined In |
|
|
10
|
+
| :------------------ | :--------- | :------------- | :----------- | :---------------- | :-------------------- | :------------------ | :---------------------------------------------------------------------------- |
|
|
11
|
+
| Can be instantiated | No | Unknown status | No | Forbidden | Forbidden | none | [helix-config.schema.json\*](helix-config.schema.json "open original schema") |
|
|
12
|
+
|
|
13
|
+
## head Type
|
|
14
|
+
|
|
15
|
+
`object` ([Details](helix-config-properties-head.md))
|
|
16
|
+
|
|
17
|
+
# head Properties
|
|
18
|
+
|
|
19
|
+
| Property | Type | Required | Nullable | Defined by |
|
|
20
|
+
| :---------------------------- | :------- | :------- | :------------- | :-------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
21
|
+
| [lastModified](#lastmodified) | `string` | Required | cannot be null | [HelixConfig](helix-config-properties-head-properties-lastmodified.md "https://ns.adobe.com/helix/config/helix#/properties/head/properties/lastModified") |
|
|
22
|
+
| [data](#data) | `object` | Required | cannot be null | [HelixConfig](helix-config-properties-head-properties-data.md "https://ns.adobe.com/helix/config/helix#/properties/head/properties/data") |
|
|
23
|
+
|
|
24
|
+
## lastModified
|
|
25
|
+
|
|
26
|
+
The last modified date
|
|
27
|
+
|
|
28
|
+
`lastModified`
|
|
29
|
+
|
|
30
|
+
* is required
|
|
31
|
+
|
|
32
|
+
* Type: `string`
|
|
33
|
+
|
|
34
|
+
* cannot be null
|
|
35
|
+
|
|
36
|
+
* defined in: [HelixConfig](helix-config-properties-head-properties-lastmodified.md "https://ns.adobe.com/helix/config/helix#/properties/head/properties/lastModified")
|
|
37
|
+
|
|
38
|
+
### lastModified Type
|
|
39
|
+
|
|
40
|
+
`string`
|
|
41
|
+
|
|
42
|
+
## data
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
`data`
|
|
47
|
+
|
|
48
|
+
* is required
|
|
49
|
+
|
|
50
|
+
* Type: `object` ([Details](helix-config-properties-head-properties-data.md))
|
|
51
|
+
|
|
52
|
+
* cannot be null
|
|
53
|
+
|
|
54
|
+
* defined in: [HelixConfig](helix-config-properties-head-properties-data.md "https://ns.adobe.com/helix/config/helix#/properties/head/properties/data")
|
|
55
|
+
|
|
56
|
+
### data Type
|
|
57
|
+
|
|
58
|
+
`object` ([Details](helix-config-properties-head-properties-data.md))
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
# HelixConfig Schema
|
|
2
|
+
|
|
3
|
+
```txt
|
|
4
|
+
https://ns.adobe.com/helix/config/helix
|
|
5
|
+
```
|
|
6
|
+
|
|
7
|
+
Internal configuration aggregate consisting of fstab.yaml and head.html
|
|
8
|
+
|
|
9
|
+
| Abstract | Extensible | Status | Identifiable | Custom Properties | Additional Properties | Access Restrictions | Defined In |
|
|
10
|
+
| :------------------ | :--------- | :------------- | :----------- | :---------------- | :-------------------- | :------------------ | :-------------------------------------------------------------------------- |
|
|
11
|
+
| Can be instantiated | No | Unknown status | No | Forbidden | Forbidden | none | [helix-config.schema.json](helix-config.schema.json "open original schema") |
|
|
12
|
+
|
|
13
|
+
## HelixConfig Type
|
|
14
|
+
|
|
15
|
+
`object` ([HelixConfig](helix-config.md))
|
|
16
|
+
|
|
17
|
+
# HelixConfig Properties
|
|
18
|
+
|
|
19
|
+
| Property | Type | Required | Nullable | Defined by |
|
|
20
|
+
| :-------------- | :------- | :------- | :------------- | :---------------------------------------------------------------------------------------------------------- |
|
|
21
|
+
| [fstab](#fstab) | `object` | Optional | cannot be null | [HelixConfig](helix-config-properties-fstab.md "https://ns.adobe.com/helix/config/helix#/properties/fstab") |
|
|
22
|
+
| [head](#head) | `object` | Optional | cannot be null | [HelixConfig](helix-config-properties-head.md "https://ns.adobe.com/helix/config/helix#/properties/head") |
|
|
23
|
+
|
|
24
|
+
## fstab
|
|
25
|
+
|
|
26
|
+
The embedded fstab.yaml
|
|
27
|
+
|
|
28
|
+
`fstab`
|
|
29
|
+
|
|
30
|
+
* is optional
|
|
31
|
+
|
|
32
|
+
* Type: `object` ([Details](helix-config-properties-fstab.md))
|
|
33
|
+
|
|
34
|
+
* cannot be null
|
|
35
|
+
|
|
36
|
+
* defined in: [HelixConfig](helix-config-properties-fstab.md "https://ns.adobe.com/helix/config/helix#/properties/fstab")
|
|
37
|
+
|
|
38
|
+
### fstab Type
|
|
39
|
+
|
|
40
|
+
`object` ([Details](helix-config-properties-fstab.md))
|
|
41
|
+
|
|
42
|
+
## head
|
|
43
|
+
|
|
44
|
+
The embedded head.html
|
|
45
|
+
|
|
46
|
+
`head`
|
|
47
|
+
|
|
48
|
+
* is optional
|
|
49
|
+
|
|
50
|
+
* Type: `object` ([Details](helix-config-properties-head.md))
|
|
51
|
+
|
|
52
|
+
* cannot be null
|
|
53
|
+
|
|
54
|
+
* defined in: [HelixConfig](helix-config-properties-head.md "https://ns.adobe.com/helix/config/helix#/properties/head")
|
|
55
|
+
|
|
56
|
+
### head Type
|
|
57
|
+
|
|
58
|
+
`object` ([Details](helix-config-properties-head.md))
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"meta:license":["Copyright 2023 Adobe. All rights reserved.","This file is licensed to you under the Apache License, Version 2.0 (the \"License\");","you may not use this file except in compliance with the License. You may obtain a copy","of the License at http://www.apache.org/licenses/LICENSE-2.0","","Unless required by applicable law or agreed to in writing, software distributed under","the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS","OF ANY KIND, either express or implied. See the License for the specific language","governing permissions and limitations under the License."],"$id":"https://ns.adobe.com/helix/config/helix","$schema":"http://json-schema.org/draft-07/schema#","title":"HelixConfig","description":"Internal configuration aggregate consisting of fstab.yaml and head.html","type":"object","properties":{"fstab":{"type":"object","description":"The embedded fstab.yaml","properties":{"lastModified":{"description":"The last modified date","type":"string"},"data":{"tsType":"MountConfig"}},"required":["data","lastModified"],"additionalProperties":false},"head":{"type":"object","description":"The embedded head.html","properties":{"lastModified":{"description":"The last modified date","type":"string"},"data":{"type":"object","properties":{"html":{"type":"string","description":"The contents of the head.html"}},"additionalProperties":false}},"required":["data","lastModified"],"additionalProperties":false}},"additionalProperties":false}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# Untitled string in ProjectConfig Schema
|
|
2
|
+
|
|
3
|
+
```txt
|
|
4
|
+
https://ns.adobe.com/helix/config/project#/properties/blueprint
|
|
5
|
+
```
|
|
6
|
+
|
|
7
|
+
configuration blueprint repository in the owner/repo format.
|
|
8
|
+
|
|
9
|
+
| Abstract | Extensible | Status | Identifiable | Custom Properties | Additional Properties | Access Restrictions | Defined In |
|
|
10
|
+
| :------------------ | :--------- | :------------- | :---------------------- | :---------------- | :-------------------- | :------------------ | :-------------------------------------------------------------------------------- |
|
|
11
|
+
| Can be instantiated | No | Unknown status | Unknown identifiability | Forbidden | Allowed | none | [project-config.schema.json\*](project-config.schema.json "open original schema") |
|
|
12
|
+
|
|
13
|
+
## blueprint Type
|
|
14
|
+
|
|
15
|
+
`string`
|
|
16
|
+
|
|
17
|
+
## blueprint Examples
|
|
18
|
+
|
|
19
|
+
```yaml
|
|
20
|
+
adobe/helix-website
|
|
21
|
+
|
|
22
|
+
```
|
package/docs/project-config.md
CHANGED
|
@@ -16,16 +16,17 @@ https://ns.adobe.com/helix/config/project
|
|
|
16
16
|
|
|
17
17
|
# ProjectConfig Properties
|
|
18
18
|
|
|
19
|
-
| Property
|
|
20
|
-
|
|
|
21
|
-
| [name](#name)
|
|
22
|
-
| [project](#project)
|
|
23
|
-
| [timezone](#timezone)
|
|
24
|
-
| [host](#host)
|
|
25
|
-
| [
|
|
26
|
-
| [
|
|
27
|
-
| [
|
|
28
|
-
| [
|
|
19
|
+
| Property | Type | Required | Nullable | Defined by |
|
|
20
|
+
| :---------------------- | :------- | :------- | :------------- | :---------------------------------------------------------------------------------------------------------------------------- |
|
|
21
|
+
| [name](#name) | `string` | Optional | cannot be null | [ProjectConfig](project-config-properties-name.md "https://ns.adobe.com/helix/config/project#/properties/name") |
|
|
22
|
+
| [project](#project) | `string` | Optional | cannot be null | [ProjectConfig](project-config-properties-project.md "https://ns.adobe.com/helix/config/project#/properties/project") |
|
|
23
|
+
| [timezone](#timezone) | `string` | Optional | cannot be null | [ProjectConfig](project-config-properties-timezone.md "https://ns.adobe.com/helix/config/project#/properties/timezone") |
|
|
24
|
+
| [host](#host) | `string` | Optional | cannot be null | [ProjectConfig](project-config-properties-host.md "https://ns.adobe.com/helix/config/project#/properties/host") |
|
|
25
|
+
| [blueprint](#blueprint) | `string` | Optional | cannot be null | [ProjectConfig](project-config-properties-blueprint.md "https://ns.adobe.com/helix/config/project#/properties/blueprint") |
|
|
26
|
+
| [slack](#slack) | Merged | Optional | cannot be null | [ProjectConfig](project-config-properties-slack.md "https://ns.adobe.com/helix/config/project#/properties/slack") |
|
|
27
|
+
| [cdn](#cdn) | `object` | Optional | cannot be null | [ProjectConfig](project-config-cdn.md "https://ns.adobe.com/helix/config/cdn#/properties/cdn") |
|
|
28
|
+
| [access](#access) | `object` | Optional | cannot be null | [ProjectConfig](project-config-properties-siteaccessconfig.md "https://ns.adobe.com/helix/config/project#/properties/access") |
|
|
29
|
+
| [admin](#admin) | `object` | Optional | cannot be null | [ProjectConfig](project-config-properties-adminconfig.md "https://ns.adobe.com/helix/config/project#/properties/admin") |
|
|
29
30
|
|
|
30
31
|
## name
|
|
31
32
|
|
|
@@ -106,6 +107,31 @@ Production host use by the slack bot to display project information.
|
|
|
106
107
|
|
|
107
108
|
`string`
|
|
108
109
|
|
|
110
|
+
## blueprint
|
|
111
|
+
|
|
112
|
+
configuration blueprint repository in the owner/repo format.
|
|
113
|
+
|
|
114
|
+
`blueprint`
|
|
115
|
+
|
|
116
|
+
* is optional
|
|
117
|
+
|
|
118
|
+
* Type: `string`
|
|
119
|
+
|
|
120
|
+
* cannot be null
|
|
121
|
+
|
|
122
|
+
* defined in: [ProjectConfig](project-config-properties-blueprint.md "https://ns.adobe.com/helix/config/project#/properties/blueprint")
|
|
123
|
+
|
|
124
|
+
### blueprint Type
|
|
125
|
+
|
|
126
|
+
`string`
|
|
127
|
+
|
|
128
|
+
### blueprint Examples
|
|
129
|
+
|
|
130
|
+
```yaml
|
|
131
|
+
adobe/helix-website
|
|
132
|
+
|
|
133
|
+
```
|
|
134
|
+
|
|
109
135
|
## slack
|
|
110
136
|
|
|
111
137
|
the slack teamId/channelID(s) where the slack bot is used.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"meta:license":["Copyright 2023 Adobe. All rights reserved.","This file is licensed to you under the Apache License, Version 2.0 (the \"License\");","you may not use this file except in compliance with the License. You may obtain a copy","of the License at http://www.apache.org/licenses/LICENSE-2.0","","Unless required by applicable law or agreed to in writing, software distributed under","the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS","OF ANY KIND, either express or implied. See the License for the specific language","governing permissions and limitations under the License."],"$id":"https://ns.adobe.com/helix/config/project","$schema":"http://json-schema.org/draft-07/schema#","$defs":{"emailglob":{"oneOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}],"description":"matches one or several users or group of users"}},"title":"ProjectConfig","type":"object","properties":{"name":{"type":"string","description":"Name of the project used by the slack bot when reporting."},"project":{"type":"string","description":"Name of the project used by the sidekick."},"timezone":{"type":"string","description":"Timezone to be used by the slack bot when reporting times.","examples":["Europe/Zurich"]},"host":{"type":"string","description":"Production host use by the slack bot to display project information."},"slack":{"description":"the slack teamId/channelID(s) where the slack bot is used.","oneOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"cdn":{"description":"The CDN config","$ref":"./project-config-cdn.schema.json"},"access":{"type":"object","title":"SiteAccessConfig","properties":{"allow":{"description":"The email glob of the users that are allowed.","$ref":"#/$defs/emailglob"},"require":{"type":"object","properties":{"repository":{"description":"The list of owner/repo pointers to projects that are allowed to use this content.","examples":["adobe/*","hlxsites/wknd"],"$ref":"#/$defs/emailglob"}},"required":["repository"],"additionalProperties":false}},"required":["allow"],"additionalProperties":false},"admin":{"title":"AdminConfig","type":"object","properties":{"role":{"title":"Role","type":"object","properties":{"author":{"description":"The email glob of the users with author role.","$ref":"#/$defs/emailglob"},"publish":{"description":"The email glob of the users with publish role.","$ref":"#/$defs/emailglob"}},"required":["role"],"additionalProperties":false}},"additionalProperties":false}},"additionalProperties":false}
|
|
1
|
+
{"meta:license":["Copyright 2023 Adobe. All rights reserved.","This file is licensed to you under the Apache License, Version 2.0 (the \"License\");","you may not use this file except in compliance with the License. You may obtain a copy","of the License at http://www.apache.org/licenses/LICENSE-2.0","","Unless required by applicable law or agreed to in writing, software distributed under","the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS","OF ANY KIND, either express or implied. See the License for the specific language","governing permissions and limitations under the License."],"$id":"https://ns.adobe.com/helix/config/project","$schema":"http://json-schema.org/draft-07/schema#","$defs":{"emailglob":{"oneOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}],"description":"matches one or several users or group of users"}},"title":"ProjectConfig","type":"object","properties":{"name":{"type":"string","description":"Name of the project used by the slack bot when reporting."},"project":{"type":"string","description":"Name of the project used by the sidekick."},"timezone":{"type":"string","description":"Timezone to be used by the slack bot when reporting times.","examples":["Europe/Zurich"]},"host":{"type":"string","description":"Production host use by the slack bot to display project information."},"blueprint":{"type":"string","description":"configuration blueprint repository in the owner/repo format.","examples":["adobe/helix-website"]},"slack":{"description":"the slack teamId/channelID(s) where the slack bot is used.","oneOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"cdn":{"description":"The CDN config","$ref":"./project-config-cdn.schema.json"},"access":{"type":"object","title":"SiteAccessConfig","properties":{"allow":{"description":"The email glob of the users that are allowed.","$ref":"#/$defs/emailglob"},"require":{"type":"object","properties":{"repository":{"description":"The list of owner/repo pointers to projects that are allowed to use this content.","examples":["adobe/*","hlxsites/wknd"],"$ref":"#/$defs/emailglob"}},"required":["repository"],"additionalProperties":false}},"required":["allow"],"additionalProperties":false},"admin":{"title":"AdminConfig","type":"object","properties":{"role":{"title":"Role","type":"object","properties":{"author":{"description":"The email glob of the users with author role.","$ref":"#/$defs/emailglob"},"publish":{"description":"The email glob of the users with publish role.","$ref":"#/$defs/emailglob"}},"required":["role"],"additionalProperties":false}},"additionalProperties":false}},"additionalProperties":false}
|
package/package.json
CHANGED
package/src/contentbus.js
CHANGED
|
@@ -10,7 +10,6 @@
|
|
|
10
10
|
* governing permissions and limitations under the License.
|
|
11
11
|
*/
|
|
12
12
|
import crypto from 'crypto';
|
|
13
|
-
import { MountConfig } from '@adobe/helix-shared-config';
|
|
14
13
|
import { fetchFstab } from './fetch-fstab.js';
|
|
15
14
|
import { fetchHelixConfig } from './fetch-helix-config.js';
|
|
16
15
|
|
|
@@ -56,15 +55,8 @@ export async function getContentBusId(ctx, info, optional) {
|
|
|
56
55
|
const fetchId = async () => {
|
|
57
56
|
const { path } = info;
|
|
58
57
|
const helixConfig = await fetchHelixConfig(ctx, info, true);
|
|
59
|
-
if (helixConfig) {
|
|
60
|
-
|
|
61
|
-
// yaml-ish form.
|
|
62
|
-
const fstabJson = { mountpoints: {} };
|
|
63
|
-
for (const mp of helixConfig.fstab.data.mountpoints) {
|
|
64
|
-
fstabJson.mountpoints[mp.path] = mp;
|
|
65
|
-
}
|
|
66
|
-
const fstab = await new MountConfig().withJSON(fstabJson).init();
|
|
67
|
-
const mp = fstab.match(path);
|
|
58
|
+
if (helixConfig?.fstab?.data) {
|
|
59
|
+
const mp = helixConfig.fstab?.data.match(path);
|
|
68
60
|
if (mp && mp.contentBusId) {
|
|
69
61
|
ctx.log.info(`loaded contentBusId: ${mp.contentBusId} for ${mp.url} of ${info.repo}--${info.owner}`);
|
|
70
62
|
return mp.contentBusId;
|
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
* governing permissions and limitations under the License.
|
|
11
11
|
*/
|
|
12
12
|
import { logLevelForStatusCode, propagateStatusCode } from '@adobe/helix-shared-utils';
|
|
13
|
+
import { MountConfig } from '@adobe/helix-shared-config';
|
|
13
14
|
import { fetchS3 } from './fetch-s3.js';
|
|
14
15
|
|
|
15
16
|
/**
|
|
@@ -25,11 +26,32 @@ async function handleResponse(log, response, key, type) {
|
|
|
25
26
|
const text = await response.text();
|
|
26
27
|
if (response.ok) {
|
|
27
28
|
const config = JSON.parse(text);
|
|
28
|
-
//
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
29
|
+
// create mountconfig of the fstab entry
|
|
30
|
+
if (config.fstab?.data) {
|
|
31
|
+
let cfg = await new MountConfig().withSource(JSON.stringify(config.fstab.data)).init();
|
|
32
|
+
|
|
33
|
+
// set contentbus id, if present in header
|
|
34
|
+
const cbid = response.headers.get('x-contentbus-id');
|
|
35
|
+
if (cbid) {
|
|
36
|
+
// we need to create a new expanded config
|
|
37
|
+
const newConfig = cfg.toJSON();
|
|
38
|
+
|
|
39
|
+
const nvps = cbid.split(/;\s+/);
|
|
40
|
+
for (const nv of nvps) {
|
|
41
|
+
const [path, id] = nv.split('=');
|
|
42
|
+
let mp = cfg.mountpoints.find((m) => m.path === path);
|
|
43
|
+
if (mp) {
|
|
44
|
+
mp = { ...mp };
|
|
45
|
+
delete mp.isDocument;
|
|
46
|
+
mp.contentBusId = id.trim();
|
|
47
|
+
newConfig.mountpoints[path] = mp;
|
|
48
|
+
} else {
|
|
49
|
+
log.warn(`mountpoint in x-contentbus-id header not found in fstab: ${nv}`);
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
cfg = await new MountConfig().withSource(JSON.stringify(newConfig)).init();
|
|
53
|
+
}
|
|
54
|
+
config.fstab.data = cfg;
|
|
33
55
|
}
|
|
34
56
|
return config;
|
|
35
57
|
}
|
|
@@ -57,9 +79,13 @@ export async function fetchHelixConfig(ctx, info, optional) {
|
|
|
57
79
|
const { owner, repo, ref } = info;
|
|
58
80
|
|
|
59
81
|
if (!('helixConfig' in attributes)) {
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
82
|
+
if (owner && repo && ref) {
|
|
83
|
+
const key = `${owner}/${repo}/${ref}/helix-config.json`;
|
|
84
|
+
const response = await fetchS3(ctx, 'helix-code-bus', key);
|
|
85
|
+
attributes.helixConfig = await handleResponse(log, response, key, 'code-bus');
|
|
86
|
+
} else {
|
|
87
|
+
attributes.helixConfig = null;
|
|
88
|
+
}
|
|
63
89
|
}
|
|
64
90
|
|
|
65
91
|
if (attributes.helixConfig || optional) {
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"type": "string"
|
|
26
26
|
},
|
|
27
27
|
"data": {
|
|
28
|
-
"
|
|
28
|
+
"tsType": "MountConfig"
|
|
29
29
|
}
|
|
30
30
|
},
|
|
31
31
|
"required": [
|
|
@@ -51,8 +51,7 @@
|
|
|
51
51
|
}
|
|
52
52
|
},
|
|
53
53
|
"additionalProperties": false
|
|
54
|
-
}
|
|
55
|
-
"additionalProperties": false
|
|
54
|
+
}
|
|
56
55
|
},
|
|
57
56
|
"required": [
|
|
58
57
|
"data",
|
package/types/helix-config.d.ts
CHANGED
|
@@ -11,8 +11,7 @@
|
|
|
11
11
|
*/
|
|
12
12
|
|
|
13
13
|
// NOTE: this file is autogenerated via 'npm run docs:types'
|
|
14
|
-
|
|
15
|
-
// by adding the contentBusId to the mountpoints
|
|
14
|
+
import {MountConfig} from '@adobe/helix-shared-config';
|
|
16
15
|
|
|
17
16
|
/**
|
|
18
17
|
* Internal configuration aggregate consisting of fstab.yaml and head.html
|
|
@@ -42,52 +41,5 @@ export interface HelixConfig {
|
|
|
42
41
|
*/
|
|
43
42
|
html?: string;
|
|
44
43
|
};
|
|
45
|
-
additionalProperties?: false;
|
|
46
44
|
};
|
|
47
45
|
}
|
|
48
|
-
/**
|
|
49
|
-
* Defines a mapping between mount points and source URLs. Mount points **must** start with a slash (`/`) but may not end with one.
|
|
50
|
-
*/
|
|
51
|
-
export interface MountConfig {
|
|
52
|
-
mountpoints: MountPoint[];
|
|
53
|
-
/**
|
|
54
|
-
* Mapping from subtrees to single sources for catch-all folder support.
|
|
55
|
-
*/
|
|
56
|
-
folders?: {
|
|
57
|
-
/**
|
|
58
|
-
* This interface was referenced by `undefined`'s JSON-Schema definition
|
|
59
|
-
* via the `patternProperty` "^/.*[^/]$".
|
|
60
|
-
*/
|
|
61
|
-
[k: string]: string;
|
|
62
|
-
};
|
|
63
|
-
}
|
|
64
|
-
/**
|
|
65
|
-
* Defines the target URL where content should be retrieved from.
|
|
66
|
-
*/
|
|
67
|
-
export interface MountPoint {
|
|
68
|
-
/**
|
|
69
|
-
* The mount path
|
|
70
|
-
*/
|
|
71
|
-
path?: string;
|
|
72
|
-
url: string;
|
|
73
|
-
/**
|
|
74
|
-
* mountpoint type
|
|
75
|
-
*/
|
|
76
|
-
type?: 'onedrive' | 'google' | 'markup';
|
|
77
|
-
/**
|
|
78
|
-
* suffix for markup type
|
|
79
|
-
*/
|
|
80
|
-
suffix?: string;
|
|
81
|
-
/**
|
|
82
|
-
* encrypted credentials.
|
|
83
|
-
*/
|
|
84
|
-
credentials?: string[];
|
|
85
|
-
/**
|
|
86
|
-
* Onedrive tenant id. If missing, it is computed from url.
|
|
87
|
-
*/
|
|
88
|
-
tenantId?: string;
|
|
89
|
-
/**
|
|
90
|
-
* computed content-bus id.
|
|
91
|
-
*/
|
|
92
|
-
contentBusId?: string;
|
|
93
|
-
}
|
|
@@ -1,38 +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/fstab",
|
|
14
|
-
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
15
|
-
"type": "object",
|
|
16
|
-
"title": "MountConfig",
|
|
17
|
-
"description": "Defines a mapping between mount points and source URLs. Mount points **must** start with a slash (`/`) but may not end with one.",
|
|
18
|
-
"properties": {
|
|
19
|
-
"mountpoints": {
|
|
20
|
-
"type": "array",
|
|
21
|
-
"items": {
|
|
22
|
-
"$ref": "./mountpoint.schema.json"
|
|
23
|
-
}
|
|
24
|
-
},
|
|
25
|
-
"folders": {
|
|
26
|
-
"type": "object",
|
|
27
|
-
"description": "Mapping from subtrees to single sources for catch-all folder support.",
|
|
28
|
-
"patternProperties": {
|
|
29
|
-
"^/.*[^/]$": {
|
|
30
|
-
"type": "string"
|
|
31
|
-
}
|
|
32
|
-
},
|
|
33
|
-
"additionalProperties": false
|
|
34
|
-
}
|
|
35
|
-
},
|
|
36
|
-
"additionalProperties": false,
|
|
37
|
-
"required": ["mountpoints"]
|
|
38
|
-
}
|
|
@@ -1,56 +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/mountpoint",
|
|
14
|
-
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
15
|
-
"title": "MountPoint",
|
|
16
|
-
"description": "Defines the target URL where content should be retrieved from.",
|
|
17
|
-
"type": "object",
|
|
18
|
-
"required": [
|
|
19
|
-
"url"
|
|
20
|
-
],
|
|
21
|
-
"properties": {
|
|
22
|
-
"path": {
|
|
23
|
-
"type": "string",
|
|
24
|
-
"description": "The mount path"
|
|
25
|
-
},
|
|
26
|
-
"url": {
|
|
27
|
-
"type": "string",
|
|
28
|
-
"format": "uri"
|
|
29
|
-
},
|
|
30
|
-
"type": {
|
|
31
|
-
"type": "string",
|
|
32
|
-
"description": "mountpoint type",
|
|
33
|
-
"enum": ["onedrive", "google", "markup"]
|
|
34
|
-
},
|
|
35
|
-
"suffix": {
|
|
36
|
-
"type": "string",
|
|
37
|
-
"description": "suffix for markup type"
|
|
38
|
-
},
|
|
39
|
-
"credentials": {
|
|
40
|
-
"type": "array",
|
|
41
|
-
"description": "encrypted credentials.",
|
|
42
|
-
"items": {
|
|
43
|
-
"type": "string"
|
|
44
|
-
}
|
|
45
|
-
},
|
|
46
|
-
"tenantId": {
|
|
47
|
-
"type": "string",
|
|
48
|
-
"description": "Onedrive tenant id. If missing, it is computed from url."
|
|
49
|
-
},
|
|
50
|
-
"contentBusId": {
|
|
51
|
-
"type": "string",
|
|
52
|
-
"description": "computed content-bus id."
|
|
53
|
-
}
|
|
54
|
-
},
|
|
55
|
-
"additionalProperties": false
|
|
56
|
-
}
|