@nestjs/common 11.1.5 → 11.1.6

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nestjs/common",
3
- "version": "11.1.5",
3
+ "version": "11.1.6",
4
4
  "description": "Nest - modern, fast, powerful node.js web framework (@common)",
5
5
  "author": "Kamil Mysliwiec",
6
6
  "homepage": "https://nestjs.com",
@@ -7,17 +7,17 @@ const is_log_level_util_1 = require("./is-log-level.util");
7
7
  * @publicApi
8
8
  */
9
9
  function filterLogLevels(parseableString = '') {
10
- const sanitizedSring = parseableString.replaceAll(' ', '').toLowerCase();
11
- if (sanitizedSring[0] === '>') {
12
- const orEqual = sanitizedSring[1] === '=';
13
- const logLevelIndex = logger_service_1.LOG_LEVELS.indexOf(sanitizedSring.substring(orEqual ? 2 : 1));
10
+ const sanitizedString = parseableString.replaceAll(' ', '').toLowerCase();
11
+ if (sanitizedString[0] === '>') {
12
+ const orEqual = sanitizedString[1] === '=';
13
+ const logLevelIndex = logger_service_1.LOG_LEVELS.indexOf(sanitizedString.substring(orEqual ? 2 : 1));
14
14
  if (logLevelIndex === -1) {
15
- throw new Error(`parse error (unknown log level): ${sanitizedSring}`);
15
+ throw new Error(`parse error (unknown log level): ${sanitizedString}`);
16
16
  }
17
17
  return logger_service_1.LOG_LEVELS.slice(orEqual ? logLevelIndex : logLevelIndex + 1);
18
18
  }
19
- else if (sanitizedSring.includes(',')) {
20
- return sanitizedSring.split(',').filter(is_log_level_util_1.isLogLevel);
19
+ else if (sanitizedString.includes(',')) {
20
+ return sanitizedString.split(',').filter(is_log_level_util_1.isLogLevel);
21
21
  }
22
- return (0, is_log_level_util_1.isLogLevel)(sanitizedSring) ? [sanitizedSring] : logger_service_1.LOG_LEVELS;
22
+ return (0, is_log_level_util_1.isLogLevel)(sanitizedString) ? [sanitizedString] : logger_service_1.LOG_LEVELS;
23
23
  }