@adobe/helix-admin-support 1.1.23 → 1.1.24
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 +7 -0
- package/package.json +1 -1
- package/src/fetch-config.d.ts +29 -31
- package/src/index.d.ts +13 -10
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
## [1.1.24](https://github.com/adobe/helix-admin-support/compare/v1.1.23...v1.1.24) (2022-05-31)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* update types ([#38](https://github.com/adobe/helix-admin-support/issues/38)) ([a33bd8b](https://github.com/adobe/helix-admin-support/commit/a33bd8bfa152d6fae3451f09f605eda748c7da9f))
|
|
7
|
+
|
|
1
8
|
## [1.1.23](https://github.com/adobe/helix-admin-support/compare/v1.1.22...v1.1.23) (2022-05-28)
|
|
2
9
|
|
|
3
10
|
|
package/package.json
CHANGED
package/src/fetch-config.d.ts
CHANGED
|
@@ -10,10 +10,12 @@
|
|
|
10
10
|
* governing permissions and limitations under the License.
|
|
11
11
|
*/
|
|
12
12
|
|
|
13
|
+
import {AdminContext, PathInfo} from './index';
|
|
14
|
+
|
|
13
15
|
/**
|
|
14
16
|
* Project CDN Config
|
|
15
17
|
*/
|
|
16
|
-
declare interface ProjectCDNProductionConfig {
|
|
18
|
+
export declare interface ProjectCDNProductionConfig {
|
|
17
19
|
/**
|
|
18
20
|
* cnd type
|
|
19
21
|
* @enum 'fastly', 'cloudflare', 'akamai'
|
|
@@ -26,38 +28,15 @@ declare interface ProjectCDNProductionConfig {
|
|
|
26
28
|
host:string,
|
|
27
29
|
|
|
28
30
|
/**
|
|
29
|
-
*
|
|
30
|
-
*/
|
|
31
|
-
origin:string,
|
|
32
|
-
|
|
33
|
-
/**
|
|
34
|
-
* cloudflare specific: plan
|
|
31
|
+
* Route or routes on the CDN that are rendered with helix
|
|
35
32
|
*/
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
/**
|
|
39
|
-
* cloudflare specific: zoneId
|
|
40
|
-
*/
|
|
41
|
-
zoneId:string,
|
|
42
|
-
|
|
43
|
-
/**
|
|
44
|
-
* cloudflare specific: apiToken
|
|
45
|
-
*/
|
|
46
|
-
apiToken:string,
|
|
47
|
-
// fastly
|
|
48
|
-
serviceId:string,
|
|
49
|
-
authToken:string,
|
|
50
|
-
// akamai
|
|
51
|
-
endpoint:string,
|
|
52
|
-
clientSecret:string,
|
|
53
|
-
clientToken:string,
|
|
54
|
-
accessToken:string,
|
|
33
|
+
route: (string|string[]),
|
|
55
34
|
}
|
|
56
35
|
|
|
57
36
|
/**
|
|
58
37
|
* Cloudflare Config
|
|
59
38
|
*/
|
|
60
|
-
declare interface CloudflareConfig extends ProjectCDNProductionConfig {
|
|
39
|
+
export declare interface CloudflareConfig extends ProjectCDNProductionConfig {
|
|
61
40
|
origin:string,
|
|
62
41
|
plan:string,
|
|
63
42
|
zoneId:string,
|
|
@@ -67,7 +46,7 @@ declare interface CloudflareConfig extends ProjectCDNProductionConfig {
|
|
|
67
46
|
/**
|
|
68
47
|
* Fastly Config
|
|
69
48
|
*/
|
|
70
|
-
declare interface FastlyConfig extends ProjectCDNProductionConfig {
|
|
49
|
+
export declare interface FastlyConfig extends ProjectCDNProductionConfig {
|
|
71
50
|
serviceId:string,
|
|
72
51
|
authToken:string,
|
|
73
52
|
}
|
|
@@ -75,7 +54,7 @@ declare interface FastlyConfig extends ProjectCDNProductionConfig {
|
|
|
75
54
|
/**
|
|
76
55
|
* Akamai Config
|
|
77
56
|
*/
|
|
78
|
-
declare interface AkamaiConfig extends ProjectCDNProductionConfig {
|
|
57
|
+
export declare interface AkamaiConfig extends ProjectCDNProductionConfig {
|
|
79
58
|
endpoint:string,
|
|
80
59
|
clientSecret:string,
|
|
81
60
|
clientToken:string,
|
|
@@ -85,16 +64,35 @@ declare interface AkamaiConfig extends ProjectCDNProductionConfig {
|
|
|
85
64
|
/**
|
|
86
65
|
* Project CDN Config
|
|
87
66
|
*/
|
|
88
|
-
declare interface ProjectCDNConfig {
|
|
67
|
+
export declare interface ProjectCDNConfig {
|
|
89
68
|
prod?: (FastlyConfig|AkamaiConfig|CloudflareConfig),
|
|
90
69
|
}
|
|
91
70
|
|
|
92
71
|
/**
|
|
93
72
|
* Project Config
|
|
94
73
|
*/
|
|
95
|
-
declare interface ProjectConfig {
|
|
74
|
+
export declare interface ProjectConfig {
|
|
96
75
|
/**
|
|
97
76
|
* CDN Configuration
|
|
98
77
|
*/
|
|
99
78
|
cdn?:ProjectCDNConfig;
|
|
79
|
+
|
|
80
|
+
/**
|
|
81
|
+
* project title
|
|
82
|
+
*/
|
|
83
|
+
project?: string;
|
|
84
|
+
|
|
85
|
+
/**
|
|
86
|
+
* slack specific config
|
|
87
|
+
*/
|
|
88
|
+
slack?: (string|string[]);
|
|
100
89
|
}
|
|
90
|
+
|
|
91
|
+
/**
|
|
92
|
+
* Retrieves the project config from the underlying storage
|
|
93
|
+
* and stores it in the context as projectConfig.
|
|
94
|
+
* @param {AdminContext} ctx the context
|
|
95
|
+
* @param {PathInfo} info path info
|
|
96
|
+
* @returns {Promise<object>} the project configuration
|
|
97
|
+
*/
|
|
98
|
+
export function fetchProjectConfig(ctx: AdminContext, info:PathInfo): Promise<ProjectConfig>;
|
package/src/index.d.ts
CHANGED
|
@@ -9,17 +9,25 @@
|
|
|
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 {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {ProjectConfig} from "./support/fetch-config";
|
|
16
|
-
import {OneDrive} from "@adobe/helix-onedrive-support";
|
|
12
|
+
import {OneDrive} from '@adobe/helix-onedrive-support';
|
|
13
|
+
import {UniversalContext} from '@adobe/helix-universal';
|
|
14
|
+
import {ProjectConfig} from './fetch-config';
|
|
17
15
|
|
|
16
|
+
declare interface AuthInfo {}
|
|
18
17
|
declare interface MountConfig {}
|
|
19
18
|
declare interface IgnoreConfig {}
|
|
20
19
|
declare interface IndexConfig {}
|
|
21
20
|
declare interface SitemapConfig {}
|
|
22
21
|
|
|
22
|
+
export * from './fetch-config'
|
|
23
|
+
export * from './fetch-crontab'
|
|
24
|
+
export * from './fetch-fstab'
|
|
25
|
+
export * from './fetch-ignore'
|
|
26
|
+
export * from './fetch-index'
|
|
27
|
+
export * from './fetch-s3'
|
|
28
|
+
export * from './fetch-sitemap'
|
|
29
|
+
export * from './flatJson2Object'
|
|
30
|
+
|
|
23
31
|
declare interface ErrorResponse {
|
|
24
32
|
/**
|
|
25
33
|
* http like status code
|
|
@@ -134,11 +142,6 @@ declare interface PathInfo {
|
|
|
134
142
|
|
|
135
143
|
declare interface ContextAttributes {
|
|
136
144
|
|
|
137
|
-
/**
|
|
138
|
-
* optional credentials, once computed
|
|
139
|
-
*/
|
|
140
|
-
credentials?:Credentials;
|
|
141
|
-
|
|
142
145
|
/**
|
|
143
146
|
* optional mount config, once fetched
|
|
144
147
|
*/
|