Skip to content

Commit

Permalink
fix: export env sub module
Browse files Browse the repository at this point in the history
  • Loading branch information
tada5hi committed Apr 1, 2023
1 parent 56a30e4 commit fc9090d
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 3 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,4 @@ npm-debug.log*
.idea
reports
db.sqlite
.env
1 change: 0 additions & 1 deletion src/env/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
export * from './constants';
export * from './module';
export * from './type';
export * from './utils';
6 changes: 4 additions & 2 deletions src/env/module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
1 change: 1 addition & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';

0 comments on commit fc9090d

Please sign in to comment.