@adobe/helix-admin-support 4.0.0 → 5.0.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 +12 -0
- package/package.json +2 -1
- package/src/fetch-config-all.js +1 -1
- package/src/fetch-config.js +1 -1
- package/src/fetch-crontab.js +1 -1
- package/src/fetch-fstab.js +1 -1
- package/src/fetch-helix-config.js +1 -1
- package/src/fetch-index.js +2 -2
- package/src/fetch-s3.js +4 -1
- package/src/fetch-sitemap.js +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,15 @@
|
|
|
1
|
+
# [5.0.0](https://github.com/adobe/helix-admin-support/compare/v4.0.0...v5.0.0) (2025-10-13)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Features
|
|
5
|
+
|
|
6
|
+
* **s3:** use bucket mapping ([#444](https://github.com/adobe/helix-admin-support/issues/444)) ([0f25acc](https://github.com/adobe/helix-admin-support/commit/0f25acc34417f1d057ab7584d75ef783386eea7d))
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### BREAKING CHANGES
|
|
10
|
+
|
|
11
|
+
* **s3:** fetchS3 now needs a symbolic name, e.g. content instead of helix-content-bus
|
|
12
|
+
|
|
1
13
|
# [4.0.0](https://github.com/adobe/helix-admin-support/compare/v3.4.2...v4.0.0) (2025-10-09)
|
|
2
14
|
|
|
3
15
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@adobe/helix-admin-support",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "5.0.0",
|
|
4
4
|
"description": "Helix Admin Support Library",
|
|
5
5
|
"main": "src/index.js",
|
|
6
6
|
"type": "module",
|
|
@@ -38,6 +38,7 @@
|
|
|
38
38
|
"dependencies": {
|
|
39
39
|
"@adobe/fetch": "^4.1.10",
|
|
40
40
|
"@adobe/helix-shared-config": "^11.0.11",
|
|
41
|
+
"@adobe/helix-shared-storage": "^1.5.0",
|
|
41
42
|
"@adobe/helix-shared-utils": "^3.0.2",
|
|
42
43
|
"@aws-sdk/client-s3": "^3.705.0",
|
|
43
44
|
"@aws-sdk/client-sqs": "^3.699.0",
|
package/src/fetch-config-all.js
CHANGED
|
@@ -62,7 +62,7 @@ export async function fetchConfigAll(ctx, opts) {
|
|
|
62
62
|
return null;
|
|
63
63
|
}
|
|
64
64
|
const key = `${contentBusId}/${partition}/.helix/config-all.json`;
|
|
65
|
-
const response = await fetchS3(ctx, '
|
|
65
|
+
const response = await fetchS3(ctx, 'content', key);
|
|
66
66
|
return handleResponse(log, response, key, 'content-bus');
|
|
67
67
|
};
|
|
68
68
|
|
package/src/fetch-config.js
CHANGED
|
@@ -67,7 +67,7 @@ export async function fetchProjectConfig(ctx, opts) {
|
|
|
67
67
|
return null;
|
|
68
68
|
}
|
|
69
69
|
const key = `${contentBusId}/preview/.helix/config.json`;
|
|
70
|
-
const response = await fetchS3(ctx, '
|
|
70
|
+
const response = await fetchS3(ctx, 'content', key);
|
|
71
71
|
return handleResponse(log, response, key, 'content-bus');
|
|
72
72
|
};
|
|
73
73
|
|
package/src/fetch-crontab.js
CHANGED
|
@@ -67,7 +67,7 @@ export async function fetchCrontab(ctx, opts) {
|
|
|
67
67
|
return null;
|
|
68
68
|
}
|
|
69
69
|
const key = `${contentBusId}/preview/.helix/crontab.json`;
|
|
70
|
-
const response = await fetchS3(ctx, '
|
|
70
|
+
const response = await fetchS3(ctx, 'content', key);
|
|
71
71
|
return handleResponse(log, response, key, 'content-bus');
|
|
72
72
|
};
|
|
73
73
|
|
package/src/fetch-fstab.js
CHANGED
|
@@ -59,7 +59,7 @@ export async function fetchFstab(ctx, opts, optional) {
|
|
|
59
59
|
}
|
|
60
60
|
|
|
61
61
|
let key = `${owner}/${repo}/main/fstab.yaml`;
|
|
62
|
-
let response = await fetchS3(ctx, '
|
|
62
|
+
let response = await fetchS3(ctx, 'code', key);
|
|
63
63
|
const cfg = await handleResponse(log, response, key, 'code-bus');
|
|
64
64
|
if (cfg) {
|
|
65
65
|
return cfg;
|
|
@@ -78,7 +78,7 @@ export async function fetchHelixConfig(ctx, info, optional) {
|
|
|
78
78
|
if (!('helixConfig' in attributes)) {
|
|
79
79
|
if (owner && repo) {
|
|
80
80
|
const key = `${owner}/${repo}/main/helix-config.json`;
|
|
81
|
-
const response = await fetchS3(ctx, '
|
|
81
|
+
const response = await fetchS3(ctx, 'code', key);
|
|
82
82
|
attributes.helixConfig = await handleResponse(log, response, key, 'code-bus');
|
|
83
83
|
} else {
|
|
84
84
|
attributes.helixConfig = null;
|
package/src/fetch-index.js
CHANGED
|
@@ -73,14 +73,14 @@ export async function fetchIndex(ctx, opts, optional) {
|
|
|
73
73
|
}
|
|
74
74
|
|
|
75
75
|
let key = `${contentBusId}/${INDEX_LOCATION}`;
|
|
76
|
-
let response = await fetchS3(ctx, '
|
|
76
|
+
let response = await fetchS3(ctx, 'content', key);
|
|
77
77
|
attributes.indexConfig = await handleResponse(log, response, key, 'content-bus');
|
|
78
78
|
if (attributes.indexConfig) {
|
|
79
79
|
return attributes.indexConfig;
|
|
80
80
|
}
|
|
81
81
|
|
|
82
82
|
key = `${owner}/${repo}/main/${INDEX_CONFIGURATION_NAME}`;
|
|
83
|
-
response = await fetchS3(ctx, '
|
|
83
|
+
response = await fetchS3(ctx, 'code', key);
|
|
84
84
|
attributes.indexConfig = await handleResponse(log, response, key, 'code-bus');
|
|
85
85
|
if (attributes.indexConfig || optional) {
|
|
86
86
|
return attributes.indexConfig;
|
package/src/fetch-s3.js
CHANGED
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
import { promisify } from 'util';
|
|
13
13
|
import zlib from 'zlib';
|
|
14
14
|
import { Response } from '@adobe/fetch';
|
|
15
|
+
import { parseBucketNames } from '@adobe/helix-shared-storage';
|
|
15
16
|
import {
|
|
16
17
|
S3Client,
|
|
17
18
|
GetObjectCommand,
|
|
@@ -42,6 +43,7 @@ export async function fetchS3(context, bucketId, key, head = false) {
|
|
|
42
43
|
const {
|
|
43
44
|
HELIX_HTTP_CONNECTION_TIMEOUT = 5000,
|
|
44
45
|
HELIX_HTTP_SOCKET_TIMEOUT = 15000,
|
|
46
|
+
HELIX_BUCKET_NAMES = null,
|
|
45
47
|
} = env;
|
|
46
48
|
|
|
47
49
|
try {
|
|
@@ -66,8 +68,9 @@ export async function fetchS3(context, bucketId, key, head = false) {
|
|
|
66
68
|
let res;
|
|
67
69
|
let buffer = '';
|
|
68
70
|
try {
|
|
71
|
+
const bucket = parseBucketNames(HELIX_BUCKET_NAMES)[bucketId];
|
|
69
72
|
res = await s3.send(new Command({
|
|
70
|
-
Bucket:
|
|
73
|
+
Bucket: bucket,
|
|
71
74
|
Key: key,
|
|
72
75
|
}));
|
|
73
76
|
if (!head) {
|
package/src/fetch-sitemap.js
CHANGED
|
@@ -70,14 +70,14 @@ export async function fetchSitemap(ctx, opts, optional) {
|
|
|
70
70
|
}
|
|
71
71
|
|
|
72
72
|
let key = `${contentBusId}/${SITEMAP_LOCATION}`;
|
|
73
|
-
let response = await fetchS3(ctx, '
|
|
73
|
+
let response = await fetchS3(ctx, 'content', key);
|
|
74
74
|
attributes.sitemapConfig = await handleResponse(log, response, key, 'content-bus');
|
|
75
75
|
if (attributes.sitemapConfig) {
|
|
76
76
|
return attributes.sitemapConfig;
|
|
77
77
|
}
|
|
78
78
|
|
|
79
79
|
key = `${owner}/${repo}/main/helix-sitemap.yaml`;
|
|
80
|
-
response = await fetchS3(ctx, '
|
|
80
|
+
response = await fetchS3(ctx, 'code', key);
|
|
81
81
|
attributes.sitemapConfig = await handleResponse(log, response, key, 'code-bus');
|
|
82
82
|
if (attributes.sitemapConfig || optional) {
|
|
83
83
|
return attributes.sitemapConfig;
|