-
-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: prepare & extend env reading for env data-source otions reading
- Loading branch information
Showing
6 changed files
with
394 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
export * from './options'; | ||
export * from './find'; | ||
export * from './singleton'; | ||
export * from './type'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
import type { DataSourceOptions } from 'typeorm'; | ||
|
||
export type DataSourceCacheOption = DataSourceOptions['cache']; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,40 @@ | ||
import type { DataSourceCacheOption } from '../data-source'; | ||
import type { EnvironmentName } from './constants'; | ||
|
||
export interface Environment { | ||
env: `${EnvironmentName}`, | ||
|
||
// Seeder | ||
seeds: string[], | ||
factories: string[] | ||
factories: string[], | ||
|
||
// DataSource | ||
type?: string, | ||
url?: string, | ||
host?: string, | ||
port?: number, | ||
username?: string, | ||
password?: string, | ||
database?: string, | ||
sid?: string, // string ?? | ||
schema?: string, // string ?? | ||
/** | ||
* dropSchema | ||
*/ | ||
schemaDrop?: boolean, | ||
extra?: any, | ||
synchronize?: boolean, | ||
migrations: string[], | ||
migrationsRun?: boolean, | ||
migrationsTableName?: string, | ||
entities: string[], | ||
entityPrefix?: string, | ||
metadataTableName?: string, | ||
subscribers: string[], | ||
logging: string[] | boolean | string, | ||
logger?: string, | ||
maxQueryExecutionTime?: string, | ||
debug?: string, | ||
cache?: DataSourceCacheOption, | ||
uuidExtension?: string | ||
} |
Oops, something went wrong.