File tree Expand file tree Collapse file tree 2 files changed +8
-4
lines changed Expand file tree Collapse file tree 2 files changed +8
-4
lines changed Original file line number Diff line number Diff line change 4
4
DEFAULT_POOL_CONFIG ,
5
5
EXPORT_DOCS ,
6
6
GENERATE_TYPES ,
7
- GENERATE_TYPES_EXCLUDED_SCHEMAS ,
7
+ GENERATE_TYPES_INCLUDED_SCHEMAS ,
8
8
PG_CONNECTION ,
9
9
PG_META_PORT ,
10
10
PG_META_REQ_HEADER ,
@@ -86,7 +86,11 @@ if (EXPORT_DOCS) {
86
86
87
87
console . log (
88
88
applyTypescriptTemplate ( {
89
- schemas : schemas . filter ( ( { name } ) => ! GENERATE_TYPES_EXCLUDED_SCHEMAS . includes ( name ) ) ,
89
+ schemas : schemas . filter (
90
+ ( { name } ) =>
91
+ GENERATE_TYPES_INCLUDED_SCHEMAS . length === 0 ||
92
+ GENERATE_TYPES_INCLUDED_SCHEMAS . includes ( name )
93
+ ) ,
90
94
tables,
91
95
functions,
92
96
types,
Original file line number Diff line number Diff line change @@ -17,8 +17,8 @@ export const PG_CONNECTION =
17
17
export const EXPORT_DOCS = process . argv [ 2 ] === 'docs' && process . argv [ 3 ] === 'export'
18
18
export const GENERATE_TYPES =
19
19
process . argv [ 2 ] === 'gen' && process . argv [ 3 ] === 'types' ? process . argv [ 4 ] : undefined
20
- export const GENERATE_TYPES_EXCLUDED_SCHEMAS =
21
- GENERATE_TYPES && process . argv [ 5 ] === '--exclude -schemas' ? process . argv [ 6 ] ?. split ( ',' ) ?? [ ] : [ ]
20
+ export const GENERATE_TYPES_INCLUDED_SCHEMAS =
21
+ GENERATE_TYPES && process . argv [ 5 ] === '--include -schemas' ? process . argv [ 6 ] ?. split ( ',' ) ?? [ ] : [ ]
22
22
23
23
export const DEFAULT_POOL_CONFIG = { max : 1 , connectionTimeoutMillis : PG_CONN_TIMEOUT_SECS * 1000 }
24
24
export const PG_META_REQ_HEADER = process . env . PG_META_REQ_HEADER || 'request-id'
You can’t perform that action at this time.
0 commit comments