@nest-omni/core 1.0.42 → 1.0.43

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": "@nest-omni/core",
3
- "version": "1.0.42",
3
+ "version": "1.0.43",
4
4
  "description": "framework",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",
@@ -42,21 +42,23 @@ function findValidRootPath() {
42
42
  const possibleRootPaths = [process.cwd(), __dirname];
43
43
  const envFile = `${process.env.NODE_ENV || ''}.env`;
44
44
  for (const rootPath of possibleRootPaths) {
45
- const envFilePath = path.join(rootPath, 'config', envFile);
46
- console.log('Checking for env file:', envFilePath);
45
+ const configPath = path.join(rootPath, 'config');
46
+ const baseEnvFilePath = path.join(configPath, 'base.env');
47
+ const envFilePath = path.join(configPath, envFile);
47
48
  if ((0, fs_1.existsSync)(envFilePath)) {
48
- return { rootPath, envFilePath };
49
+ return { rootPath, baseEnvFilePath, envFilePath };
49
50
  }
50
51
  }
51
52
  throw new Error(`No valid .env file: ${envFilePath}`);
52
53
  }
53
- const { envFilePath, rootPath } = findValidRootPath();
54
+ const { envFilePath, rootPath, baseEnvFilePath } = findValidRootPath();
54
55
  services_1.ApiConfigService.rootPath = rootPath;
55
56
  const modules = [
56
57
  config_1.ConfigModule.forRoot({
57
58
  isGlobal: true,
59
+ cache: true,
58
60
  expandVariables: true,
59
- envFilePath: envFilePath,
61
+ envFilePath: [envFilePath, baseEnvFilePath],
60
62
  }),
61
63
  nestjs_sentry_1.SentryModule.forRootAsync({
62
64
  inject: [services_1.ApiConfigService],