@adobe/helix-admin-support 5.0.0 → 5.0.2
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 +9 -9
- package/src/fetch-s3.js +8 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
## [5.0.2](https://github.com/adobe/helix-admin-support/compare/v5.0.1...v5.0.2) (2025-10-20)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* update semantic-release to v25 and node to 24.x for OIDC ([#448](https://github.com/adobe/helix-admin-support/issues/448)) ([1c9b49e](https://github.com/adobe/helix-admin-support/commit/1c9b49ee2f6d97b3d6d7d3a5e47d4256edbc93c8))
|
|
7
|
+
|
|
8
|
+
## [5.0.1](https://github.com/adobe/helix-admin-support/compare/v5.0.0...v5.0.1) (2025-10-13)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
* **s3:** throw when bucket name is not mapped ([#445](https://github.com/adobe/helix-admin-support/issues/445)) ([6576357](https://github.com/adobe/helix-admin-support/commit/65763572e389aab6114763958dcf095699e4fec2))
|
|
14
|
+
|
|
1
15
|
# [5.0.0](https://github.com/adobe/helix-admin-support/compare/v4.0.0...v5.0.0) (2025-10-13)
|
|
2
16
|
|
|
3
17
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@adobe/helix-admin-support",
|
|
3
|
-
"version": "5.0.
|
|
3
|
+
"version": "5.0.2",
|
|
4
4
|
"description": "Helix Admin Support Library",
|
|
5
5
|
"main": "src/index.js",
|
|
6
6
|
"type": "module",
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
},
|
|
19
19
|
"repository": {
|
|
20
20
|
"type": "git",
|
|
21
|
-
"url": "https://github.com/adobe/helix-admin-support"
|
|
21
|
+
"url": "https://github.com/adobe/helix-admin-support.git"
|
|
22
22
|
},
|
|
23
23
|
"author": "",
|
|
24
24
|
"license": "Apache-2.0",
|
|
@@ -45,24 +45,24 @@
|
|
|
45
45
|
"@smithy/node-http-handler": "^4.0.0"
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|
|
48
|
-
"@adobe/eslint-config-helix": "3.0.
|
|
49
|
-
"@adobe/jsonschema2md": "8.0.
|
|
48
|
+
"@adobe/eslint-config-helix": "3.0.12",
|
|
49
|
+
"@adobe/jsonschema2md": "8.0.7",
|
|
50
50
|
"@eslint/config-helpers": "0.4.0",
|
|
51
51
|
"@semantic-release/changelog": "6.0.3",
|
|
52
52
|
"@semantic-release/git": "10.0.1",
|
|
53
|
-
"@semantic-release/npm": "
|
|
53
|
+
"@semantic-release/npm": "13.0.0",
|
|
54
54
|
"c8": "10.1.3",
|
|
55
55
|
"eslint": "9.4.0",
|
|
56
56
|
"husky": "9.1.7",
|
|
57
|
-
"jsdoc-to-markdown": "9.1.
|
|
57
|
+
"jsdoc-to-markdown": "9.1.3",
|
|
58
58
|
"json-schema-to-typescript": "15.0.4",
|
|
59
59
|
"junit-report-builder": "5.1.1",
|
|
60
|
-
"lint-staged": "16.2.
|
|
61
|
-
"mocha": "11.7.
|
|
60
|
+
"lint-staged": "16.2.3",
|
|
61
|
+
"mocha": "11.7.4",
|
|
62
62
|
"mocha-multi-reporters": "1.5.1",
|
|
63
63
|
"mocha-suppress-logs": "0.6.0",
|
|
64
64
|
"nock": "13.5.6",
|
|
65
|
-
"semantic-release": "
|
|
65
|
+
"semantic-release": "25.0.0",
|
|
66
66
|
"xml2js": "0.6.2",
|
|
67
67
|
"yaml": "2.8.1"
|
|
68
68
|
},
|
package/src/fetch-s3.js
CHANGED
|
@@ -46,6 +46,11 @@ export async function fetchS3(context, bucketId, key, head = false) {
|
|
|
46
46
|
HELIX_BUCKET_NAMES = null,
|
|
47
47
|
} = env;
|
|
48
48
|
|
|
49
|
+
const bucketName = parseBucketNames(HELIX_BUCKET_NAMES)[bucketId];
|
|
50
|
+
if (!bucketName) {
|
|
51
|
+
throw new Error(`Bucket id is not mapped: ${bucketId}`);
|
|
52
|
+
}
|
|
53
|
+
|
|
49
54
|
try {
|
|
50
55
|
// the client initialization is a bit picky with undefined properties.
|
|
51
56
|
// so we omit the credentials when we provide them via context.env
|
|
@@ -68,9 +73,8 @@ export async function fetchS3(context, bucketId, key, head = false) {
|
|
|
68
73
|
let res;
|
|
69
74
|
let buffer = '';
|
|
70
75
|
try {
|
|
71
|
-
const bucket = parseBucketNames(HELIX_BUCKET_NAMES)[bucketId];
|
|
72
76
|
res = await s3.send(new Command({
|
|
73
|
-
Bucket:
|
|
77
|
+
Bucket: bucketName,
|
|
74
78
|
Key: key,
|
|
75
79
|
}));
|
|
76
80
|
if (!head) {
|
|
@@ -104,12 +108,12 @@ export async function fetchS3(context, bucketId, key, head = false) {
|
|
|
104
108
|
} catch (e) {
|
|
105
109
|
const code = e.Code ?? e.$metadata?.httpStatusCode ?? 500;
|
|
106
110
|
if (code === 'AccessDenied' || code === 404 || e instanceof NoSuchKey) {
|
|
107
|
-
log.info(`Could not find file at ${
|
|
111
|
+
log.info(`Could not find file at ${bucketName}/${key}: ${code}`);
|
|
108
112
|
return new Response('', {
|
|
109
113
|
status: 404,
|
|
110
114
|
});
|
|
111
115
|
} else {
|
|
112
|
-
log.error(`Error while fetching file from ${
|
|
116
|
+
log.error(`Error while fetching file from ${bucketName}/${key}: ${code} (${e.message})`);
|
|
113
117
|
return new Response('', {
|
|
114
118
|
status: 502,
|
|
115
119
|
headers: {
|