@nestjs/platform-express 11.0.0 → 11.0.1

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.
@@ -12,6 +12,7 @@ const cors = require("cors");
12
12
  const express = require("express");
13
13
  const http = require("http");
14
14
  const https = require("https");
15
+ const path_to_regexp_1 = require("path-to-regexp");
15
16
  const stream_1 = require("stream");
16
17
  const get_body_parser_options_util_1 = require("./utils/get-body-parser-options.util");
17
18
  /**
@@ -95,6 +96,8 @@ class ExpressAdapter extends http_adapter_1.AbstractHttpAdapter {
95
96
  normalizePath(path) {
96
97
  try {
97
98
  const convertedPath = legacy_route_converter_1.LegacyRouteConverter.tryConvert(path);
99
+ // Call "pathToRegexp" to trigger a TypeError if the path is invalid
100
+ (0, path_to_regexp_1.pathToRegexp)(convertedPath);
98
101
  return convertedPath;
99
102
  }
100
103
  catch (e) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nestjs/platform-express",
3
- "version": "11.0.0",
3
+ "version": "11.0.1",
4
4
  "description": "Nest - modern, fast, powerful node.js web framework (@platform-express)",
5
5
  "author": "Kamil Mysliwiec",
6
6
  "license": "MIT",
@@ -25,8 +25,8 @@
25
25
  "tslib": "2.8.1"
26
26
  },
27
27
  "devDependencies": {
28
- "@nestjs/common": "^11.0.0",
29
- "@nestjs/core": "^11.0.0"
28
+ "@nestjs/common": "11.0.1",
29
+ "@nestjs/core": "11.0.1"
30
30
  },
31
31
  "peerDependencies": {
32
32
  "@nestjs/common": "^11.0.0",