aws-architect 6.6.42 → 6.6.44

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.
@@ -74,7 +74,7 @@ class BucketManager {
74
74
  putObjectParams.Key = `${this.unixify(path.join(version, redirectFileUrl))}`;
75
75
  } else {
76
76
  const redirectFile = await fs.readFile(path.join(__dirname, './appRedirect.html'));
77
- const updatedRedirectFile = redirectFile.toString().replace('{{PATH}}', redirectFileUrl);
77
+ const updatedRedirectFile = redirectFile.toString().replace('{{PATH}}', redirectFileUrl[0] === '/' ? redirectFileUrl : `/${redirectFileUrl}`);
78
78
  putObjectParams.Body = Buffer.from(updatedRedirectFile);
79
79
  putObjectParams.Key = this.unixify(path.join(version, redirectFileUrl));
80
80
  putObjectParams.ContentMD5 = createHash('md5').update(updatedRedirectFile).digest('base64');
package/lib/server.js CHANGED
@@ -108,8 +108,7 @@ function Server(contentDirectory, lambdaApi, logger) {
108
108
  const sortedPathKeys = Object.keys(lambdaApi.Routes[method]).sort((a, b) => a.split('/').length - b.split('/').length || a.split('{').length - b.split('{').length);
109
109
  sortedPathKeys.map(resource => {
110
110
  let isProxy = resource.match(/{proxy\+}/);
111
- // eslint-disable-next-line no-useless-escape
112
- let expressResource = resource.replace(/{proxy\+}/, '*').replace(/{([^\{\}]+)}/g, ':$1');
111
+ let expressResource = resource.replace(/{proxy\+}/, '*').replace(/{([^{}]+)}/g, ':$1');
113
112
  api.all(expressResource, async (req, res) => {
114
113
  let event = {
115
114
  resource: resource,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aws-architect",
3
- "version": "6.6.42",
3
+ "version": "6.6.44",
4
4
  "description": "AWS Architect is a node based tool to configure and deploy AWS-based microservices.",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",