@adobe/helix-config-storage 2.1.1 → 2.1.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.1.2](https://github.com/adobe/helix-config-storage/compare/v2.1.1...v2.1.2) (2025-03-20)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * sanitize repo names ([#107](https://github.com/adobe/helix-config-storage/issues/107)) ([d3bed9f](https://github.com/adobe/helix-config-storage/commit/d3bed9fee8e63814b430ed844ebb8d2e25c30a14))
7
+
1
8
  ## [2.1.1](https://github.com/adobe/helix-config-storage/compare/v2.1.0...v2.1.1) (2025-03-17)
2
9
 
3
10
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adobe/helix-config-storage",
3
- "version": "2.1.1",
3
+ "version": "2.1.2",
4
4
  "description": "Helix Config Storage",
5
5
  "main": "src/index.js",
6
6
  "types": "src/index.d.ts",
@@ -63,6 +63,7 @@
63
63
  "@adobe/helix-shared-config": "11.1.0",
64
64
  "@adobe/helix-shared-git": "3.0.17",
65
65
  "@adobe/helix-shared-storage": "1.2.0",
66
+ "@adobe/helix-shared-string": "2.1.0",
66
67
  "@adobe/helix-shared-utils": "3.0.2",
67
68
  "ajv": "8.17.1",
68
69
  "ajv-formats": "3.0.1",
package/src/utils.js CHANGED
@@ -12,6 +12,7 @@
12
12
  /* eslint-disable no-param-reassign */
13
13
  import crypto from 'crypto';
14
14
  import { GitUrl } from '@adobe/helix-shared-git';
15
+ import { sanitizeName } from '@adobe/helix-shared-string';
15
16
  import { decodeJwt } from 'jose';
16
17
  import { StatusCodeError } from './status-code-error.js';
17
18
  import { ValidationError } from './ValidationError.js';
@@ -87,8 +88,8 @@ export function updateCodeSource(ctx, code) {
87
88
  owner = `${hash}-${owner}`;
88
89
  } else {
89
90
  const gitUrl = new GitUrl(code.source.url);
90
- owner = gitUrl.owner.toLowerCase();
91
- repo = gitUrl.repo.toLowerCase();
91
+ owner = sanitizeName(gitUrl.owner);
92
+ repo = sanitizeName(gitUrl.repo);
92
93
  }
93
94
 
94
95
  if (owner !== code.owner) {
@@ -100,8 +101,8 @@ export function updateCodeSource(ctx, code) {
100
101
  modified ||= true;
101
102
  }
102
103
  } else if (code?.owner && code?.repo) {
103
- code.owner = code.owner.toLowerCase();
104
- code.repo = code.repo.toLowerCase();
104
+ code.owner = sanitizeName(code.owner);
105
+ code.repo = sanitizeName(code.repo);
105
106
  code.source = {
106
107
  type: 'github',
107
108
  url: `https://github.com/${code.owner}/${code.repo}`,