From fc9090d6e4f8c306da2f7456f7afa653cff7c6d2 Mon Sep 17 00:00:00 2001 From: tada5hi Date: Sat, 1 Apr 2023 11:16:02 +0200 Subject: [PATCH] fix: export env sub module --- .gitignore | 1 + src/env/index.ts | 1 - src/env/module.ts | 6 ++++-- src/index.ts | 1 + 4 files changed, 6 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 5b1e0141..767d991d 100644 --- a/.gitignore +++ b/.gitignore @@ -10,3 +10,4 @@ npm-debug.log* .idea reports db.sqlite +.env diff --git a/src/env/index.ts b/src/env/index.ts index 654ac1e5..77c9ebea 100644 --- a/src/env/index.ts +++ b/src/env/index.ts @@ -1,4 +1,3 @@ export * from './constants'; export * from './module'; export * from './type'; -export * from './utils'; diff --git a/src/env/module.ts b/src/env/module.ts index 894ede5f..bd8098fd 100644 --- a/src/env/module.ts +++ b/src/env/module.ts @@ -88,10 +88,12 @@ export function useEnv(key?: string) : any { ]), entities: transformStringToArray(readFromProcessEnv([ EnvironmentVariableName.ENTITIES, - EnvironmentVariableName.ENTITIES_ALT])), + EnvironmentVariableName.ENTITIES_ALT, + ])), migrations: transformStringToArray(readFromProcessEnv([ EnvironmentVariableName.MIGRATIONS, - EnvironmentVariableName.MIGRATIONS_ALT])), + EnvironmentVariableName.MIGRATIONS_ALT, + ])), migrationsTableName: readFromProcessEnv([ EnvironmentVariableName.MIGRATIONS_TABLE_NAME, EnvironmentVariableName.MIGRATIONS_TABLE_NAME_ALT, diff --git a/src/index.ts b/src/index.ts index 9509b48b..6abd8925 100644 --- a/src/index.ts +++ b/src/index.ts @@ -2,6 +2,7 @@ export * from './errors'; export * from './query'; export * from './cli/commands'; export * from './data-source'; +export * from './env'; export * from './database'; export * from './seeder'; export * from './utils';