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 44 DEFAULT_POOL_CONFIG ,
55 EXPORT_DOCS ,
66 GENERATE_TYPES ,
7- GENERATE_TYPES_EXCLUDED_SCHEMAS ,
7+ GENERATE_TYPES_INCLUDED_SCHEMAS ,
88 PG_CONNECTION ,
99 PG_META_PORT ,
1010 PG_META_REQ_HEADER ,
@@ -86,7 +86,11 @@ if (EXPORT_DOCS) {
8686
8787 console . log (
8888 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+ ) ,
9094 tables,
9195 functions,
9296 types,
Original file line number Diff line number Diff line change @@ -17,8 +17,8 @@ export const PG_CONNECTION =
1717export const EXPORT_DOCS = process . argv [ 2 ] === 'docs' && process . argv [ 3 ] === 'export'
1818export const GENERATE_TYPES =
1919 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 ( ',' ) ?? [ ] : [ ]
2222
2323export const DEFAULT_POOL_CONFIG = { max : 1 , connectionTimeoutMillis : PG_CONN_TIMEOUT_SECS * 1000 }
2424export 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