@nestjs/core 10.0.2 → 10.0.3

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.
@@ -64,13 +64,18 @@ MiddlewareBuilder.ConfigProxy = class {
64
64
  const routesWithRegex = routes
65
65
  .filter(route => route.path.includes(':'))
66
66
  .map(route => ({
67
+ method: route.method,
67
68
  path: route.path,
68
69
  regex: new RegExp('^(' + route.path.replace(regexMatchParams, wildcard) + ')$', 'g'),
69
70
  }));
70
71
  return routes.filter(route => {
71
- const isOverlapped = (v) => {
72
+ const isOverlapped = (item) => {
73
+ if (route.method !== item.method) {
74
+ return false;
75
+ }
72
76
  const normalizedRoutePath = (0, shared_utils_1.stripEndSlash)(route.path);
73
- return (normalizedRoutePath !== v.path && v.regex.test(normalizedRoutePath));
77
+ return (normalizedRoutePath !== item.path &&
78
+ item.regex.test(normalizedRoutePath));
74
79
  };
75
80
  const routeMatch = routesWithRegex.find(isOverlapped);
76
81
  return routeMatch === undefined;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nestjs/core",
3
- "version": "10.0.2",
3
+ "version": "10.0.3",
4
4
  "description": "Nest - modern, fast, powerful node.js web framework (@core)",
5
5
  "author": "Kamil Mysliwiec",
6
6
  "license": "MIT",
@@ -36,7 +36,7 @@
36
36
  "uid": "2.0.2"
37
37
  },
38
38
  "devDependencies": {
39
- "@nestjs/common": "10.0.2"
39
+ "@nestjs/common": "10.0.3"
40
40
  },
41
41
  "peerDependencies": {
42
42
  "@nestjs/common": "^10.0.0",