@adobe/helix-admin-support 1.1.21 → 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 CHANGED
@@ -1,3 +1,24 @@
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
+
8
+ ## [1.1.23](https://github.com/adobe/helix-admin-support/compare/v1.1.22...v1.1.23) (2022-05-28)
9
+
10
+
11
+ ### Bug Fixes
12
+
13
+ * **deps:** update external fixes ([#37](https://github.com/adobe/helix-admin-support/issues/37)) ([55abe16](https://github.com/adobe/helix-admin-support/commit/55abe1677700a339596f9ea682fef2897ce2e69a))
14
+
15
+ ## [1.1.22](https://github.com/adobe/helix-admin-support/compare/v1.1.21...v1.1.22) (2022-05-23)
16
+
17
+
18
+ ### Bug Fixes
19
+
20
+ * use new shared config ([50ef2ee](https://github.com/adobe/helix-admin-support/commit/50ef2ee96f465509e0821e5fc9b52994f3baf4ee))
21
+
1
22
  ## [1.1.21](https://github.com/adobe/helix-admin-support/compare/v1.1.20...v1.1.21) (2022-05-21)
2
23
 
3
24
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adobe/helix-admin-support",
3
- "version": "1.1.21",
3
+ "version": "1.1.24",
4
4
  "description": "Helix Admin Support Library",
5
5
  "main": "src/index.js",
6
6
  "type": "module",
@@ -33,9 +33,9 @@
33
33
  },
34
34
  "dependencies": {
35
35
  "@adobe/helix-fetch": "3.0.10",
36
- "@adobe/helix-shared-config": "2.1.0",
36
+ "@adobe/helix-shared-config": "2.1.1",
37
37
  "@adobe/helix-shared-utils": "2.0.10",
38
- "@aws-sdk/client-s3": "3.95.0"
38
+ "@aws-sdk/client-s3": "3.100.0"
39
39
  },
40
40
  "devDependencies": {
41
41
  "@adobe/eslint-config-helix": "1.3.2",
@@ -52,7 +52,7 @@
52
52
  "husky": "8.0.1",
53
53
  "jsdoc-to-markdown": "7.1.1",
54
54
  "junit-report-builder": "3.0.0",
55
- "lint-staged": "12.4.1",
55
+ "lint-staged": "12.4.2",
56
56
  "mocha": "10.0.0",
57
57
  "mocha-multi-reporters": "1.5.1",
58
58
  "nock": "13.2.4",
@@ -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
- * cloudflare specific: origin
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
- plan:string,
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 {UniversalContext} from "@adobe/helix-universal";
13
- import {Credentials} from "./support/credentials";
14
- import {AuthInfo} from "./support/auth";
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
  */