aws-architect 6.7.61 → 6.7.64
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 +1 -0
- package/lib/BucketManager.js +2 -2
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,7 @@ This is the changelog for [AWS Architect](readme.md).
|
|
|
7
7
|
* Remove invalid regions from organizational deployment [eu-central-2, ap-south-2, eu-south-2, me-central-1, ap-southeast-4]
|
|
8
8
|
* Support pnpm lock files
|
|
9
9
|
* Support the new version of openapi-factory 5.4.
|
|
10
|
+
* Duplicate all .html files as cleaned files. `file.html` => `file` and `file/`, all three will work
|
|
10
11
|
|
|
11
12
|
## 6.6 ##
|
|
12
13
|
* Add support to `deleteWebsiteVersion(version)`
|
package/lib/BucketManager.js
CHANGED
|
@@ -60,10 +60,10 @@ class BucketManager {
|
|
|
60
60
|
console.log(`====> ${fileUrl}`);
|
|
61
61
|
// Also upload a redirect file pointing one place below and duplicate the file at /
|
|
62
62
|
const unixifiedIndexFilePath = this.unixify(relativePath);
|
|
63
|
-
if (unixifiedIndexFilePath.match(
|
|
63
|
+
if (unixifiedIndexFilePath.match(/\.html$/) && unixifiedIndexFilePath !== 'index.html') {
|
|
64
64
|
// First duplicate the file at the "/" location
|
|
65
65
|
// Then add a redirect from the base location to the "/" by duplicating the file again, this way `/route`, `/route/`, and `/route/index.html` all point to `/route/index.html`
|
|
66
|
-
const redirectFileUrl = unixifiedIndexFilePath.replace(/\/index.html$/, '');
|
|
66
|
+
const redirectFileUrl = unixifiedIndexFilePath.replace(/\/index.html$/, '').replace(/\.html$/, '');
|
|
67
67
|
putObjectParams.Body = fileData;
|
|
68
68
|
putObjectParams.Key = `${this.unixify(path.join(version, redirectFileUrl))}/`;
|
|
69
69
|
await this.putObjectIfDifferent(putObjectParams);
|