@adobe/helix-config-storage 2.1.0 → 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 +14 -0
- package/package.json +4 -3
- package/src/utils.js +5 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,17 @@
|
|
|
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
|
+
|
|
8
|
+
## [2.1.1](https://github.com/adobe/helix-config-storage/compare/v2.1.0...v2.1.1) (2025-03-17)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
* **deps:** update external fixes ([#105](https://github.com/adobe/helix-config-storage/issues/105)) ([9547e3f](https://github.com/adobe/helix-config-storage/commit/9547e3f421cb07b009611bf3d6186b9cccdceba7))
|
|
14
|
+
|
|
1
15
|
# [2.1.0](https://github.com/adobe/helix-config-storage/compare/v2.0.6...v2.1.0) (2025-03-13)
|
|
2
16
|
|
|
3
17
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@adobe/helix-config-storage",
|
|
3
|
-
"version": "2.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",
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
"husky": "9.1.7",
|
|
47
47
|
"json-schema-to-typescript": "15.0.4",
|
|
48
48
|
"junit-report-builder": "5.1.1",
|
|
49
|
-
"lint-staged": "15.
|
|
49
|
+
"lint-staged": "15.5.0",
|
|
50
50
|
"mocha": "11.1.0",
|
|
51
51
|
"mocha-multi-reporters": "1.5.1",
|
|
52
52
|
"mocha-suppress-logs": "0.5.1",
|
|
@@ -63,9 +63,10 @@
|
|
|
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",
|
|
69
|
-
"jose": "6.0.
|
|
70
|
+
"jose": "6.0.10"
|
|
70
71
|
}
|
|
71
72
|
}
|
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
|
|
91
|
-
repo = gitUrl.repo
|
|
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
|
|
104
|
-
code.repo = code.repo
|
|
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}`,
|