@adobe/helix-admin-support 3.1.54 → 3.3.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 CHANGED
@@ -1,3 +1,17 @@
1
+ # [3.3.0](https://github.com/adobe/helix-admin-support/compare/v3.2.0...v3.3.0) (2025-05-28)
2
+
3
+
4
+ ### Features
5
+
6
+ * add more fstab details ([#399](https://github.com/adobe/helix-admin-support/issues/399)) ([4672dba](https://github.com/adobe/helix-admin-support/commit/4672dba230c04447be2943a0e68edb74df47df01))
7
+
8
+ # [3.2.0](https://github.com/adobe/helix-admin-support/compare/v3.1.54...v3.2.0) (2025-05-28)
9
+
10
+
11
+ ### Features
12
+
13
+ * add fallback to github api to load fstab ([#398](https://github.com/adobe/helix-admin-support/issues/398)) ([3ec2d51](https://github.com/adobe/helix-admin-support/commit/3ec2d5182045388cd851e42fb4c4a09213d99b36))
14
+
1
15
  ## [3.1.54](https://github.com/adobe/helix-admin-support/compare/v3.1.53...v3.1.54) (2025-05-26)
2
16
 
3
17
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adobe/helix-admin-support",
3
- "version": "3.1.54",
3
+ "version": "3.3.0",
4
4
  "description": "Helix Admin Support Library",
5
5
  "main": "src/index.js",
6
6
  "type": "module",
@@ -59,13 +59,13 @@ export async function fetchFstab(ctx, opts, optional) {
59
59
 
60
60
  let key = `${owner}/${repo}/main/fstab.yaml`;
61
61
  let response = await fetchS3(ctx, 'helix-code-bus', key);
62
- const cfg = await handleResponse(log, response, key, 'code-bus');
62
+ let cfg = await handleResponse(log, response, key, 'code-bus');
63
63
  if (cfg) {
64
64
  return cfg;
65
65
  }
66
66
 
67
67
  // try loading from github for non helix-3 repos
68
- const headers = {};
68
+ let headers = {};
69
69
  key = `${owner}/${repo}/main/fstab.yaml`;
70
70
  if (ctx.githubToken) {
71
71
  headers.authorization = `token ${ctx.githubToken}`;
@@ -77,7 +77,25 @@ export async function fetchFstab(ctx, opts, optional) {
77
77
  cache: 'no-store',
78
78
  headers,
79
79
  });
80
- return handleResponse(log, response, key, 'github');
80
+ cfg = await handleResponse(log, response, key, ctx.githubToken ? 'github (authed)' : 'github');
81
+ if (cfg) {
82
+ return cfg;
83
+ }
84
+
85
+ // try loading it from github using the content api
86
+ const { GH_BASE_URL = 'https://api.github.com' } = env;
87
+ headers = {
88
+ 'X-GitHub-Api-Version': '2022-11-28',
89
+ accept: 'application/vnd.github.raw+json',
90
+ };
91
+ if (ctx.githubToken) {
92
+ headers.authorization = `Bearer ${ctx.githubToken}`;
93
+ }
94
+ response = await fetch(`${GH_BASE_URL}/repos/${owner}/${repo}/contents/fstab.yaml`, {
95
+ cache: 'no-store',
96
+ headers,
97
+ });
98
+ return handleResponse(log, response, key, ctx.githubToken ? 'github-api (authed)' : 'github-api');
81
99
  };
82
100
 
83
101
  if (!('mountConfig' in attributes)) {