@adobe/helix-admin-support 3.3.0 → 3.3.1

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,10 @@
1
+ ## [3.3.1](https://github.com/adobe/helix-admin-support/compare/v3.3.0...v3.3.1) (2025-05-28)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * fix source type ([#400](https://github.com/adobe/helix-admin-support/issues/400)) ([e5d5fbd](https://github.com/adobe/helix-admin-support/commit/e5d5fbd9e1f02d45d21f3d02ea9289dc825e016f))
7
+
1
8
  # [3.3.0](https://github.com/adobe/helix-admin-support/compare/v3.2.0...v3.3.0) (2025-05-28)
2
9
 
3
10
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adobe/helix-admin-support",
3
- "version": "3.3.0",
3
+ "version": "3.3.1",
4
4
  "description": "Helix Admin Support Library",
5
5
  "main": "src/index.js",
6
6
  "type": "module",
@@ -20,10 +20,11 @@ import { fetch } from './utils.js';
20
20
  * @param {Logger} log logger
21
21
  * @param {Response} response content response from the storage
22
22
  * @param {string} key storage key (logging information)
23
- * @param {string} type type of storage (logging information
23
+ * @param {string} type type of storage (logging information)
24
+ * @param {string} source source information
24
25
  * @returns {Promise<MountConfig>} the mount config or null
25
26
  */
26
- async function handleResponse(log, response, key, type) {
27
+ async function handleResponse(log, response, key, type, source = type) {
27
28
  const text = await response.text();
28
29
  if (response.ok) {
29
30
  const cfg = await new MountConfig().withSource(text).init();
@@ -32,11 +33,11 @@ async function handleResponse(log, response, key, type) {
32
33
  }
33
34
 
34
35
  if (response.status === 404) {
35
- log.info(`No fstab.yaml found in ${type} ${key}, ${text}`);
36
+ log.info(`No fstab.yaml found in ${source} ${key}, ${text}`);
36
37
  return null;
37
38
  }
38
39
 
39
- log[logLevelForStatusCode(response.status)](`Invalid response (${response.status}) when fetching fstab from ${type} ${key}`);
40
+ log[logLevelForStatusCode(response.status)](`Invalid response (${response.status}) when fetching fstab from ${source} ${key}`);
40
41
  const err = new Error(`Unable to fetch fstab: ${response.status} ${text}`);
41
42
  err.status = propagateStatusCode(response.status);
42
43
  throw err;
@@ -77,7 +78,7 @@ export async function fetchFstab(ctx, opts, optional) {
77
78
  cache: 'no-store',
78
79
  headers,
79
80
  });
80
- cfg = await handleResponse(log, response, key, ctx.githubToken ? 'github (authed)' : 'github');
81
+ cfg = await handleResponse(log, response, key, 'github', ctx.githubToken ? 'github (authed)' : 'github');
81
82
  if (cfg) {
82
83
  return cfg;
83
84
  }
@@ -95,7 +96,7 @@ export async function fetchFstab(ctx, opts, optional) {
95
96
  cache: 'no-store',
96
97
  headers,
97
98
  });
98
- return handleResponse(log, response, key, ctx.githubToken ? 'github-api (authed)' : 'github-api');
99
+ return handleResponse(log, response, key, 'github', ctx.githubToken ? 'github-api (authed)' : 'github-api');
99
100
  };
100
101
 
101
102
  if (!('mountConfig' in attributes)) {