@adobe/helix-admin-support 2.0.1 → 2.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 CHANGED
@@ -1,3 +1,10 @@
1
+ ## [2.0.2](https://github.com/adobe/helix-admin-support/compare/v2.0.1...v2.0.2) (2023-04-04)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * validate owner/repo/ref ([#132](https://github.com/adobe/helix-admin-support/issues/132)) ([266a624](https://github.com/adobe/helix-admin-support/commit/266a6240ff1434bf9350c3ca72700297d88e15a8))
7
+
1
8
  ## [2.0.1](https://github.com/adobe/helix-admin-support/compare/v2.0.0...v2.0.1) (2023-04-04)
2
9
 
3
10
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adobe/helix-admin-support",
3
- "version": "2.0.1",
3
+ "version": "2.0.2",
4
4
  "description": "Helix Admin Support Library",
5
5
  "main": "src/index.js",
6
6
  "type": "module",
@@ -57,9 +57,13 @@ export async function fetchHelixConfig(ctx, info, optional) {
57
57
  const { owner, repo, ref } = info;
58
58
 
59
59
  if (!('helixConfig' in attributes)) {
60
- const key = `${owner}/${repo}/${ref}/helix-config.json`;
61
- const response = await fetchS3(ctx, 'helix-code-bus', key);
62
- attributes.helixConfig = await handleResponse(log, response, key, 'code-bus');
60
+ if (owner && repo && ref) {
61
+ const key = `${owner}/${repo}/${ref}/helix-config.json`;
62
+ const response = await fetchS3(ctx, 'helix-code-bus', key);
63
+ attributes.helixConfig = await handleResponse(log, response, key, 'code-bus');
64
+ } else {
65
+ attributes.helixConfig = null;
66
+ }
63
67
  }
64
68
 
65
69
  if (attributes.helixConfig || optional) {