Skip to content

Commit 880a1be

Browse files
committed
feat: Do not export all schemas in index
1 parent 765a51d commit 880a1be

File tree

1 file changed

+1
-13
lines changed
  • src/lib/file-generators/generated

1 file changed

+1
-13
lines changed

src/lib/file-generators/generated/index.ts

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,9 @@ export const createGeneratedIndexFile = (
1616
config: Config,
1717
): SourceFile => {
1818
const { project, schemas } = args
19-
const { output_dir, main_schema = 'public' } = config
19+
const { output_dir } = config
2020

2121
const schema_import_statements: StatementedNodeStructure['statements'] = []
22-
const schema_export_statements: StatementedNodeStructure['statements'] = []
2322
const schemas_tables: string[] = []
2423

2524
for (const schema of schemas) {
@@ -32,15 +31,6 @@ export const createGeneratedIndexFile = (
3231
namedImports: [`${pascal_schema_name}Tables`],
3332
})
3433
schemas_tables.push(`${pascal_schema_name}Tables`)
35-
schema_export_statements.push({
36-
kind: StructureKind.ExportDeclaration,
37-
moduleSpecifier: `./${schema.name}`,
38-
...(schema.name === main_schema
39-
? {}
40-
: {
41-
namespaceExport: schema.name,
42-
}),
43-
})
4434
}
4535

4636
const statements: StatementedNodeStructure['statements'] = [
@@ -74,8 +64,6 @@ export const createGeneratedIndexFile = (
7464
type: 'DatabaseTables[number]',
7565
},
7666
(writer) => writer.newLine(),
77-
...schema_export_statements,
78-
(writer) => writer.newLine(),
7967
{
8068
kind: StructureKind.ExportDeclaration,
8169
namespaceExport: 'kysely',

0 commit comments

Comments
 (0)