aws-architect 6.6.41 → 6.6.42

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.
Files changed (2) hide show
  1. package/lib/server.js +2 -1
  2. package/package.json +1 -1
package/lib/server.js CHANGED
@@ -105,7 +105,8 @@ function Server(contentDirectory, lambdaApi, logger) {
105
105
  });
106
106
 
107
107
  Object.keys(lambdaApi.Routes || []).map(method => {
108
- Object.keys(lambdaApi.Routes[method]).map(resource => {
108
+ const sortedPathKeys = Object.keys(lambdaApi.Routes[method]).sort((a, b) => a.split('/').length - b.split('/').length || a.split('{').length - b.split('{').length);
109
+ sortedPathKeys.map(resource => {
109
110
  let isProxy = resource.match(/{proxy\+}/);
110
111
  // eslint-disable-next-line no-useless-escape
111
112
  let expressResource = resource.replace(/{proxy\+}/, '*').replace(/{([^\{\}]+)}/g, ':$1');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aws-architect",
3
- "version": "6.6.41",
3
+ "version": "6.6.42",
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",