@nestjs/common 11.1.10 → 11.1.12

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/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  (The MIT License)
2
2
 
3
- Copyright (c) 2017-2025 Kamil Mysliwiec <https://kamilmysliwiec.com>
3
+ Copyright (c) 2017-present Kamil Mysliwiec <https://kamilmysliwiec.com>
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining
6
6
  a copy of this software and associated documentation files (the
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nestjs/common",
3
- "version": "11.1.10",
3
+ "version": "11.1.12",
4
4
  "description": "Nest - modern, fast, powerful node.js web framework (@common)",
5
5
  "author": "Kamil Mysliwiec",
6
6
  "homepage": "https://nestjs.com",
@@ -18,7 +18,7 @@
18
18
  },
19
19
  "license": "MIT",
20
20
  "dependencies": {
21
- "file-type": "21.1.1",
21
+ "file-type": "21.3.0",
22
22
  "iterare": "1.2.1",
23
23
  "load-esm": "1.0.3",
24
24
  "tslib": "2.8.1",
@@ -38,5 +38,5 @@
38
38
  "optional": true
39
39
  }
40
40
  },
41
- "gitHead": "8ea5aaef561c87065bf0b358771de8c8b62e7835"
41
+ "gitHead": "96932ad073cc417e26f0bdea8f58d58145b1ca19"
42
42
  }
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.FileTypeValidator = void 0;
4
+ const url_1 = require("url");
4
5
  const logger_service_1 = require("../../services/logger.service");
5
6
  const file_validator_interface_1 = require("./file-validator.interface");
6
7
  const load_esm_1 = require("load-esm");
@@ -56,14 +57,15 @@ class FileTypeValidator extends file_validator_interface_1.FileValidator {
56
57
  return false;
57
58
  }
58
59
  try {
59
- let fileTypePath;
60
+ let fileTypeModule;
60
61
  try {
61
- fileTypePath = require.resolve('file-type');
62
+ const resolvedPath = require.resolve('file-type');
63
+ fileTypeModule = (0, url_1.pathToFileURL)(resolvedPath).href;
62
64
  }
63
65
  catch {
64
- fileTypePath = 'file-type';
66
+ fileTypeModule = 'file-type';
65
67
  }
66
- const { fileTypeFromBuffer } = await (0, load_esm_1.loadEsm)(fileTypePath);
68
+ const { fileTypeFromBuffer } = await (0, load_esm_1.loadEsm)(fileTypeModule);
67
69
  const fileType = await fileTypeFromBuffer(file.buffer);
68
70
  if (fileType) {
69
71
  // Match detected mime type against allowed type