@adobe/helix-config 4.14.4 → 5.0.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 +12 -0
- package/package.json +1 -1
- package/src/S3Loader.d.ts +9 -0
- package/src/config-legacy.js +1 -1
- package/src/config-view.js +7 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,15 @@
|
|
|
1
|
+
# [5.0.0](https://github.com/adobe/helix-config/compare/v4.14.4...v5.0.0) (2025-04-03)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* 404 for refs/branches that don't exist ([#254](https://github.com/adobe/helix-config/issues/254)) ([aa4a6fe](https://github.com/adobe/helix-config/commit/aa4a6fe99cb843ef61afa118a891b0d0c8c0382f))
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### BREAKING CHANGES
|
|
10
|
+
|
|
11
|
+
* support for dirExists
|
|
12
|
+
|
|
1
13
|
## [4.14.4](https://github.com/adobe/helix-config/compare/v4.14.3...v4.14.4) (2025-03-31)
|
|
2
14
|
|
|
3
15
|
|
package/package.json
CHANGED
package/src/S3Loader.d.ts
CHANGED
|
@@ -29,4 +29,13 @@ export declare interface S3Loader {
|
|
|
29
29
|
* @param {string} key
|
|
30
30
|
*/
|
|
31
31
|
headObject(bucketId, key): Promise<PipelineResponse>;
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* Check whether a directory (or prefix) exists in S3. Returns a 200
|
|
35
|
+
* status if it exists, or 404 if it doesn't.
|
|
36
|
+
* @param {string} bucketId
|
|
37
|
+
* @param {string} prefix
|
|
38
|
+
* @return {Promise<PipelineResponse>}
|
|
39
|
+
*/
|
|
40
|
+
dirExists(bucketId: string, key: string): Promise<PipelineResponse>;
|
|
32
41
|
}
|
package/src/config-legacy.js
CHANGED
|
@@ -113,7 +113,7 @@ async function resolveAdminAccess(ctx, admin) {
|
|
|
113
113
|
|
|
114
114
|
/**
|
|
115
115
|
* Loads the content from a helix 4 project.
|
|
116
|
-
* @param {ConfigContext} ctx
|
|
116
|
+
* @param {import('./ConfigContext.js)'.ConfigContext} ctx
|
|
117
117
|
* @param {RSO} rso
|
|
118
118
|
* @param {string} scope
|
|
119
119
|
* @returns {Promise<ConfigObject|null>} the config object or {@code null} if not found.
|
package/src/config-view.js
CHANGED
|
@@ -297,6 +297,13 @@ async function resolveConfig(ctx, rso, scope) {
|
|
|
297
297
|
}
|
|
298
298
|
const site = new ConfigObject();
|
|
299
299
|
site.data = res.json();
|
|
300
|
+
|
|
301
|
+
const { code } = site.data;
|
|
302
|
+
const res2 = await ctx.loader.dirExists(HELIX_CODE_BUS, `${code.owner}/${code.repo}/${rso.ref}`);
|
|
303
|
+
if (res2.status !== 200) {
|
|
304
|
+
return null;
|
|
305
|
+
}
|
|
306
|
+
|
|
300
307
|
site.updateLastModified(res.headers);
|
|
301
308
|
|
|
302
309
|
// always load default profile if available
|