@maioradv/nestjs-core 1.8.10 → 1.9.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.
@@ -13,7 +13,7 @@ const LoggerFactory = (appName) => {
13
13
  };
14
14
  exports.LoggerFactory = LoggerFactory;
15
15
  const LoggerFactoryOptions = (appName) => {
16
- const relativePath = `../logs/${appName}`;
16
+ const relativePath = `../logs/${process.env.LOGS_PATH ?? 'default'}/${appName}`;
17
17
  return {
18
18
  transports: [
19
19
  new winston_daily_rotate_file_1.default({
@@ -44,7 +44,12 @@ let StorageService = class StorageService {
44
44
  }
45
45
  async createDir(relativePath) {
46
46
  const realPath = this.realPath(relativePath);
47
- await this.safeDirectory(realPath);
47
+ try {
48
+ await fs_1.promises.stat(realPath);
49
+ }
50
+ catch (e) {
51
+ await fs_1.promises.mkdir(realPath, { recursive: true });
52
+ }
48
53
  }
49
54
  realPath(relativePath) {
50
55
  return this.useRealPath ? relativePath : (0, path_1.join)(this.rootPath, relativePath);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@maioradv/nestjs-core",
3
- "version": "1.8.10",
3
+ "version": "1.9.1",
4
4
  "description": "NestJS helpers by MaiorADV",
5
5
  "repository": "https://github.com/maioradv/nestjs-core.git",
6
6
  "author": "Maior ADV Srl",