@adobe/helix-admin-support 2.6.0 → 2.7.0
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/package.json +6 -6
- package/src/fetch-index.js +3 -5
- package/src/fetch-sitemap.js +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
# [2.7.0](https://github.com/adobe/helix-admin-support/compare/v2.6.1...v2.7.0) (2024-04-06)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Features
|
|
5
|
+
|
|
6
|
+
* always fetch index and sitemap config from main ([#246](https://github.com/adobe/helix-admin-support/issues/246)) ([476d9a2](https://github.com/adobe/helix-admin-support/commit/476d9a25a7e52c184a06c2ce411371263dc3cf7a))
|
|
7
|
+
|
|
8
|
+
## [2.6.1](https://github.com/adobe/helix-admin-support/compare/v2.6.0...v2.6.1) (2024-03-23)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
* **deps:** update external fixes ([a785dc5](https://github.com/adobe/helix-admin-support/commit/a785dc512955887673213c9b54340ce14993c8e0))
|
|
14
|
+
|
|
1
15
|
# [2.6.0](https://github.com/adobe/helix-admin-support/compare/v2.5.2...v2.6.0) (2024-03-21)
|
|
2
16
|
|
|
3
17
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@adobe/helix-admin-support",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.7.0",
|
|
4
4
|
"description": "Helix Admin Support Library",
|
|
5
5
|
"main": "src/index.js",
|
|
6
6
|
"type": "module",
|
|
@@ -37,13 +37,13 @@
|
|
|
37
37
|
"@adobe/fetch": "4.1.1",
|
|
38
38
|
"@adobe/helix-shared-config": "10.4.0",
|
|
39
39
|
"@adobe/helix-shared-utils": "3.0.1",
|
|
40
|
-
"@aws-sdk/client-s3": "3.
|
|
41
|
-
"@aws-sdk/client-sqs": "3.
|
|
42
|
-
"@aws-sdk/node-http-handler": "3.
|
|
40
|
+
"@aws-sdk/client-s3": "3.540.0",
|
|
41
|
+
"@aws-sdk/client-sqs": "3.540.0",
|
|
42
|
+
"@aws-sdk/node-http-handler": "3.374.0"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
45
45
|
"@adobe/eslint-config-helix": "2.0.6",
|
|
46
|
-
"@adobe/jsonschema2md": "
|
|
46
|
+
"@adobe/jsonschema2md": "8.0.1",
|
|
47
47
|
"@semantic-release/changelog": "6.0.3",
|
|
48
48
|
"@semantic-release/git": "10.0.1",
|
|
49
49
|
"@semantic-release/npm": "12.0.0",
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
"json-schema-to-typescript": "13.1.2",
|
|
55
55
|
"junit-report-builder": "3.2.1",
|
|
56
56
|
"lint-staged": "15.2.2",
|
|
57
|
-
"mocha": "10.
|
|
57
|
+
"mocha": "10.4.0",
|
|
58
58
|
"mocha-multi-reporters": "1.5.1",
|
|
59
59
|
"nock": "13.5.4",
|
|
60
60
|
"semantic-release": "22.0.12",
|
package/src/fetch-index.js
CHANGED
|
@@ -56,15 +56,13 @@ async function handleResponse(log, response, key, type) {
|
|
|
56
56
|
*/
|
|
57
57
|
export async function fetchIndex(ctx, opts, optional) {
|
|
58
58
|
const { attributes, log, env = {} } = ctx;
|
|
59
|
-
const {
|
|
60
|
-
owner, repo, ref, branch,
|
|
61
|
-
} = opts;
|
|
59
|
+
const { owner, repo } = opts;
|
|
62
60
|
|
|
63
61
|
if (attributes.indexConfig !== undefined) {
|
|
64
62
|
return attributes.indexConfig;
|
|
65
63
|
}
|
|
66
64
|
|
|
67
|
-
const key = `${owner}/${repo}/${
|
|
65
|
+
const key = `${owner}/${repo}/main/${INDEX_CONFIGURATION_NAME}`;
|
|
68
66
|
let response = await fetchS3(ctx, 'helix-code-bus', key);
|
|
69
67
|
attributes.indexConfig = await handleResponse(log, response, key, 'code-bus');
|
|
70
68
|
if (attributes.indexConfig) {
|
|
@@ -88,7 +86,7 @@ export async function fetchIndex(ctx, opts, optional) {
|
|
|
88
86
|
return attributes.indexConfig;
|
|
89
87
|
}
|
|
90
88
|
|
|
91
|
-
const err = new Error(`no index configuration for ${owner}/${repo}
|
|
89
|
+
const err = new Error(`no index configuration for ${owner}/${repo}/main`);
|
|
92
90
|
err.status = 404;
|
|
93
91
|
throw err;
|
|
94
92
|
}
|
package/src/fetch-sitemap.js
CHANGED
|
@@ -52,19 +52,19 @@ async function handleResponse(log, response, key, type) {
|
|
|
52
52
|
*/
|
|
53
53
|
export async function fetchSitemap(ctx, opts, optional) {
|
|
54
54
|
const { attributes, log } = ctx;
|
|
55
|
-
const { owner, repo
|
|
55
|
+
const { owner, repo } = opts;
|
|
56
56
|
|
|
57
57
|
if (attributes.sitemapConfig !== undefined) {
|
|
58
58
|
return attributes.sitemapConfig;
|
|
59
59
|
}
|
|
60
60
|
|
|
61
|
-
const key = `${owner}/${repo}
|
|
61
|
+
const key = `${owner}/${repo}/main/helix-sitemap.yaml`;
|
|
62
62
|
const response = await fetchS3(ctx, 'helix-code-bus', key);
|
|
63
63
|
attributes.sitemapConfig = await handleResponse(log, response, key, 'code-bus');
|
|
64
64
|
if (attributes.sitemapConfig || optional) {
|
|
65
65
|
return attributes.sitemapConfig;
|
|
66
66
|
}
|
|
67
|
-
const err = new Error(`no sitemap configuration for ${
|
|
67
|
+
const err = new Error(`no sitemap configuration for ${owner}/${repo}/main`);
|
|
68
68
|
err.status = 404;
|
|
69
69
|
throw err;
|
|
70
70
|
}
|