@adobe/helix-admin-support 1.1.17 → 1.1.20

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.20](https://github.com/adobe/helix-admin-support/compare/v1.1.19...v1.1.20) (2022-05-20)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * **deps:** update dependency @adobe/helix-shared-config to v2.1.0 ([2d52ecc](https://github.com/adobe/helix-admin-support/commit/2d52ecc561b1df233331f0a798503e12901af2d8))
7
+
8
+ ## [1.1.19](https://github.com/adobe/helix-admin-support/compare/v1.1.18...v1.1.19) (2022-05-19)
9
+
10
+
11
+ ### Bug Fixes
12
+
13
+ * add optional for fetch index ([#33](https://github.com/adobe/helix-admin-support/issues/33)) ([dd0055c](https://github.com/adobe/helix-admin-support/commit/dd0055cd4ed8ea492b2f1a306b7d883e8a1a8eec))
14
+
15
+ ## [1.1.18](https://github.com/adobe/helix-admin-support/compare/v1.1.17...v1.1.18) (2022-05-14)
16
+
17
+
18
+ ### Bug Fixes
19
+
20
+ * **deps:** update adobe fixes ([4b671c7](https://github.com/adobe/helix-admin-support/commit/4b671c75373104785768b6586302487079bc73e6))
21
+
1
22
  ## [1.1.17](https://github.com/adobe/helix-admin-support/compare/v1.1.16...v1.1.17) (2022-05-14)
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.17",
3
+ "version": "1.1.20",
4
4
  "description": "Helix Admin Support Library",
5
5
  "main": "src/index.js",
6
6
  "type": "module",
@@ -33,8 +33,8 @@
33
33
  },
34
34
  "dependencies": {
35
35
  "@adobe/helix-fetch": "3.0.10",
36
- "@adobe/helix-shared-config": "2.0.6",
37
- "@adobe/helix-shared-utils": "2.0.9",
36
+ "@adobe/helix-shared-config": "2.1.0",
37
+ "@adobe/helix-shared-utils": "2.0.10",
38
38
  "@aws-sdk/client-s3": "3.88.0"
39
39
  },
40
40
  "devDependencies": {
@@ -51,9 +51,10 @@ async function handleResponse(log, response, key, type) {
51
51
  *
52
52
  * @param {AdminContext} ctx the context
53
53
  * @param {LookupOptions} opts lookup options
54
+ * @param {boolean} optional if {@code true}, no error is thrown if the config can't be retrieved
54
55
  * @returns {Promise<IndexConfig>} the index config
55
56
  */
56
- export async function fetchIndex(ctx, opts) {
57
+ export async function fetchIndex(ctx, opts, optional) {
57
58
  const { attributes, log } = ctx;
58
59
  const {
59
60
  owner, repo, ref, branch,
@@ -80,7 +81,8 @@ export async function fetchIndex(ctx, opts) {
80
81
  headers,
81
82
  });
82
83
  attributes.indexConfig = await handleResponse(log, response, key, 'github');
83
- if (attributes.indexConfig) {
84
+
85
+ if (attributes.indexConfig || optional) {
84
86
  return attributes.indexConfig;
85
87
  }
86
88