@nestjs/common 10.4.20 → 10.4.22

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.
@@ -0,0 +1,21 @@
1
+ /**
2
+ * Options for configuring shutdown hooks behavior.
3
+ *
4
+ * @publicApi
5
+ */
6
+ export interface ShutdownHooksOptions {
7
+ /**
8
+ * If true, uses `process.exit()` instead of `process.kill(process.pid, signal)`
9
+ * after shutdown hooks complete. This ensures the 'exit' event is properly
10
+ * triggered, which is required for async loggers (like Pino with transports)
11
+ * to flush their buffers before the process terminates.
12
+ *
13
+ * Note: Using `process.exit()` will:
14
+ * - Change the exit code (e.g., SIGTERM: 143 → 0)
15
+ * - May not trigger other signal handlers from third-party libraries
16
+ * - May affect orchestrator (Kubernetes, Docker) behavior
17
+ *
18
+ * @default false
19
+ */
20
+ useProcessExit?: boolean;
21
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nestjs/common",
3
- "version": "10.4.20",
3
+ "version": "10.4.22",
4
4
  "description": "Nest - modern, fast, powerful node.js web framework (@common)",
5
5
  "author": "Kamil Mysliwiec",
6
6
  "homepage": "https://nestjs.com",
@@ -36,5 +36,6 @@
36
36
  "class-transformer": {
37
37
  "optional": true
38
38
  }
39
- }
39
+ },
40
+ "gitHead": "e88b270cb5497d122183d7cad423dcbaaae037f0"
40
41
  }
@@ -0,0 +1,5 @@
1
+ import { IFile } from './interfaces';
2
+ export type FileValidatorContext<TConfig> = {
3
+ file?: IFile;
4
+ config: TConfig;
5
+ };
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -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
  }