drizzle-docs-generator 0.2.0 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (61) hide show
  1. package/README.ja.md +50 -13
  2. package/README.md +45 -8
  3. package/dist/adapter/index.d.ts +10 -0
  4. package/dist/adapter/index.d.ts.map +1 -0
  5. package/dist/adapter/types.d.ts +40 -0
  6. package/dist/adapter/types.d.ts.map +1 -0
  7. package/dist/adapter/v0-adapter.d.ts +73 -0
  8. package/dist/adapter/v0-adapter.d.ts.map +1 -0
  9. package/dist/adapter/v0-adapter.js +136 -0
  10. package/dist/adapter/v0-adapter.js.map +1 -0
  11. package/dist/adapter/v1-adapter.d.ts +40 -0
  12. package/dist/adapter/v1-adapter.d.ts.map +1 -0
  13. package/dist/adapter/v1-adapter.js +83 -0
  14. package/dist/adapter/v1-adapter.js.map +1 -0
  15. package/dist/cli/index.js +198 -66
  16. package/dist/cli/index.js.map +1 -1
  17. package/dist/cli/integration-test-utils.d.ts +19 -0
  18. package/dist/cli/integration-test-utils.d.ts.map +1 -0
  19. package/dist/formatter/dbml-builder.d.ts +29 -0
  20. package/dist/formatter/dbml-builder.d.ts.map +1 -0
  21. package/dist/formatter/dbml-builder.js +39 -0
  22. package/dist/formatter/dbml-builder.js.map +1 -0
  23. package/dist/formatter/dbml.d.ts +81 -0
  24. package/dist/formatter/dbml.d.ts.map +1 -0
  25. package/dist/formatter/dbml.js +163 -0
  26. package/dist/formatter/dbml.js.map +1 -0
  27. package/dist/formatter/index.d.ts +7 -0
  28. package/dist/formatter/index.d.ts.map +1 -0
  29. package/dist/formatter/markdown.d.ts +125 -0
  30. package/dist/formatter/markdown.d.ts.map +1 -0
  31. package/dist/formatter/markdown.js +235 -0
  32. package/dist/formatter/markdown.js.map +1 -0
  33. package/dist/formatter/mermaid.d.ts +102 -0
  34. package/dist/formatter/mermaid.d.ts.map +1 -0
  35. package/dist/formatter/mermaid.js +177 -0
  36. package/dist/formatter/mermaid.js.map +1 -0
  37. package/dist/formatter/types.d.ts +37 -0
  38. package/dist/formatter/types.d.ts.map +1 -0
  39. package/dist/generator/common.d.ts +109 -211
  40. package/dist/generator/common.d.ts.map +1 -1
  41. package/dist/generator/common.js +252 -481
  42. package/dist/generator/common.js.map +1 -1
  43. package/dist/generator/index.d.ts +2 -1
  44. package/dist/generator/index.d.ts.map +1 -1
  45. package/dist/generator/mysql.js +3 -3
  46. package/dist/generator/pg.d.ts +8 -7
  47. package/dist/generator/pg.d.ts.map +1 -1
  48. package/dist/generator/pg.js +29 -31
  49. package/dist/generator/pg.js.map +1 -1
  50. package/dist/generator/sqlite.js +3 -3
  51. package/dist/index.d.ts +3 -0
  52. package/dist/index.d.ts.map +1 -1
  53. package/dist/index.js +16 -9
  54. package/dist/index.js.map +1 -1
  55. package/dist/test-utils/cli-runner.d.ts +4 -0
  56. package/dist/test-utils/cli-runner.d.ts.map +1 -1
  57. package/dist/test-utils/dbml-validator.d.ts +37 -0
  58. package/dist/test-utils/dbml-validator.d.ts.map +1 -1
  59. package/dist/types.d.ts +132 -0
  60. package/dist/types.d.ts.map +1 -1
  61. package/package.json +3 -2
@@ -1,60 +1,71 @@
1
1
  import { AnyColumn, Table } from 'drizzle-orm';
2
2
  import { TableRelationalConfig } from 'drizzle-orm/relations';
3
- import { GeneratedRef, GenerateOptions } from '../types';
3
+ import { GeneratedRef, GenerateOptions, IntermediateSchema, TableDefinition, ColumnDefinition, IndexDefinition, ConstraintDefinition, RelationDefinition, EnumDefinition, DatabaseType } from '../types';
4
4
  import { SchemaComments } from '../parser/comments';
5
5
  import { SchemaRelations } from '../parser/relations';
6
6
  /**
7
- * Legacy v0 Relations type (for backward compatibility with relations())
8
- * This is a simplified type - the actual structure is more complex
7
+ * Configuration for different database dialects
9
8
  */
10
- type LegacyRelations = {
11
- table: Table;
12
- config: Record<string, unknown>;
13
- };
9
+ export interface DialectConfig {
10
+ escapeName: (name: string) => string;
11
+ isIncrement: (column: AnyColumn) => boolean;
12
+ }
14
13
  /**
15
- * Simple DBML string builder
14
+ * Configuration for an index definition
16
15
  */
17
- export declare class DbmlBuilder {
18
- private lines;
19
- private indentLevel;
20
- /**
21
- * Increase the indentation level by one
22
- * @returns This instance for method chaining
23
- */
24
- indent(): this;
25
- /**
26
- * Decrease the indentation level by one (minimum 0)
27
- * @returns This instance for method chaining
28
- */
29
- dedent(): this;
30
- /**
31
- * Add a line with the current indentation level
32
- * @param content - The content to add (empty string adds a blank line)
33
- * @returns This instance for method chaining
34
- */
35
- line(content?: string): this;
36
- /**
37
- * Build the final DBML string from all added lines
38
- * @returns The complete DBML content as a string
39
- */
40
- build(): string;
16
+ export interface IndexConfig {
17
+ config: {
18
+ columns: Array<{
19
+ name: string;
20
+ }>;
21
+ name?: string;
22
+ unique: boolean;
23
+ using?: string;
24
+ };
41
25
  }
42
26
  /**
43
- * Configuration for different database dialects
27
+ * Configuration for a primary key constraint
44
28
  */
45
- export interface DialectConfig {
46
- escapeName: (name: string) => string;
47
- isIncrement: (column: AnyColumn) => boolean;
29
+ export interface PrimaryKeyConfig {
30
+ columns: Array<{
31
+ name: string;
32
+ }>;
33
+ name?: string;
34
+ }
35
+ /**
36
+ * Configuration for a unique constraint
37
+ */
38
+ export interface UniqueConstraintConfig {
39
+ columns: Array<{
40
+ name: string;
41
+ }>;
42
+ name?: string;
43
+ }
44
+ /**
45
+ * Configuration for a foreign key constraint
46
+ */
47
+ export interface ForeignKeyConfig {
48
+ reference: () => {
49
+ columns: Array<{
50
+ name: string;
51
+ }>;
52
+ foreignColumns: Array<{
53
+ name: string;
54
+ }>;
55
+ foreignTable: Table;
56
+ };
57
+ name?: string;
58
+ onDelete?: string;
59
+ onUpdate?: string;
48
60
  }
49
61
  /**
50
62
  * Table configuration extracted from Drizzle tables
51
- * Using 'any' types for dialect-agnostic handling
52
63
  */
53
64
  export interface TableConfig {
54
- indexes: unknown[];
55
- primaryKeys: unknown[];
56
- uniqueConstraints: unknown[];
57
- foreignKeys: unknown[];
65
+ indexes: IndexConfig[];
66
+ primaryKeys: PrimaryKeyConfig[];
67
+ uniqueConstraints: UniqueConstraintConfig[];
68
+ foreignKeys: ForeignKeyConfig[];
58
69
  }
59
70
  /**
60
71
  * Base generator class for DBML generation
@@ -102,24 +113,6 @@ export declare abstract class BaseGenerator<TSchema extends Record<string, unkno
102
113
  * @returns True if value is a Drizzle table
103
114
  */
104
115
  protected isTable(value: unknown): boolean;
105
- /**
106
- * Get all v0 relations from schema (legacy relations() API)
107
- *
108
- * Extracts legacy relations defined using the old relations() API.
109
- * These are identified by having 'table' and 'config' properties.
110
- *
111
- * @returns Array of legacy relation objects
112
- */
113
- protected getV0Relations(): LegacyRelations[];
114
- /**
115
- * Check if a value is a Drizzle v0 relations object (from relations())
116
- *
117
- * Validates the legacy relations() format by checking for 'table' and 'config' properties.
118
- *
119
- * @param value - The value to check
120
- * @returns True if value is a legacy relations object
121
- */
122
- protected isV0Relations(value: unknown): boolean;
123
116
  /**
124
117
  * Check if a value is a v1 relation entry (from defineRelations())
125
118
  *
@@ -149,16 +142,6 @@ export declare abstract class BaseGenerator<TSchema extends Record<string, unkno
149
142
  * @returns True if value is a full defineRelations() result
150
143
  */
151
144
  protected isV1DefineRelationsResult(value: unknown): boolean;
152
- /**
153
- * Generate a table definition in DBML format
154
- *
155
- * Creates the complete table definition including columns, indexes, constraints,
156
- * and table-level comments. Also collects foreign keys if not in relational mode.
157
- *
158
- * @param dbml - The DBML builder to add the table to
159
- * @param table - The Drizzle table to generate
160
- */
161
- protected generateTable(dbml: DbmlBuilder, table: Table): void;
162
145
  /**
163
146
  * Get table configuration from a Drizzle table
164
147
  *
@@ -170,41 +153,13 @@ export declare abstract class BaseGenerator<TSchema extends Record<string, unkno
170
153
  */
171
154
  protected getTableConfig(table: Table): TableConfig | undefined;
172
155
  /**
173
- * Generate a column definition in DBML format
174
- *
175
- * Creates a column line with type and attributes (primary key, not null, unique, etc.)
176
- * and includes column-level comments if available.
177
- *
178
- * @param dbml - The DBML builder to add the column to
179
- * @param column - The Drizzle column to generate
180
- * @param tableName - Optional table name for looking up comments
181
- */
182
- protected generateColumn(dbml: DbmlBuilder, column: AnyColumn, tableName?: string): void;
183
- /**
184
- * Get the SQL type for a column
185
- *
186
- * @param column - The column to get the SQL type from
187
- * @returns The SQL type string (e.g., "varchar", "integer")
188
- */
189
- protected getColumnType(column: AnyColumn): string;
190
- /**
191
- * Get column attributes for DBML
192
- *
193
- * Extracts attributes like primary key, not null, unique, increment, default value,
194
- * and note from the column. Uses column metadata and comments if available.
195
- *
196
- * @param column - The column to get attributes from
197
- * @param tableName - Optional table name for looking up comments
198
- * @returns Array of attribute strings for DBML format
199
- */
200
- protected getColumnAttributes(column: AnyColumn, tableName?: string): string[];
201
- /**
202
- * Format attributes into a string
156
+ * Map Drizzle's internal table config to our typed TableConfig
203
157
  *
204
- * @param attrs - Array of attribute strings
205
- * @returns Comma-separated attribute string
158
+ * Note: Drizzle ORM's columns type is `SQL<unknown> | IndexedColumn` union,
159
+ * so we use `{ name?: string }` and cast to access the name property.
160
+ * This is unavoidable due to Drizzle's internal type structure.
206
161
  */
207
- protected formatAttributes(attrs: string[]): string;
162
+ private mapTableConfig;
208
163
  /**
209
164
  * Get the default value for a column
210
165
  *
@@ -215,16 +170,6 @@ export declare abstract class BaseGenerator<TSchema extends Record<string, unkno
215
170
  * @returns Formatted default value string or undefined
216
171
  */
217
172
  protected getDefaultValue(column: AnyColumn): string | undefined;
218
- /**
219
- * Generate indexes block from table configuration
220
- *
221
- * Creates the indexes block containing primary keys, unique constraints,
222
- * and regular indexes with their respective attributes.
223
- *
224
- * @param dbml - The DBML builder to add the indexes block to
225
- * @param tableConfig - The table configuration containing index information
226
- */
227
- protected generateIndexesBlock(dbml: DbmlBuilder, tableConfig: TableConfig): void;
228
173
  /**
229
174
  * Collect foreign keys from table configuration
230
175
  *
@@ -234,7 +179,7 @@ export declare abstract class BaseGenerator<TSchema extends Record<string, unkno
234
179
  * @param tableName - The name of the source table
235
180
  * @param foreignKeys - Array of foreign key definitions from table config
236
181
  */
237
- protected collectForeignKeysFromConfig(tableName: string, foreignKeys: unknown[]): void;
182
+ protected collectForeignKeysFromConfig(tableName: string, foreignKeys: ForeignKeyConfig[]): void;
238
183
  /**
239
184
  * Parse a foreign key into a GeneratedRef
240
185
  *
@@ -243,141 +188,95 @@ export declare abstract class BaseGenerator<TSchema extends Record<string, unkno
243
188
  *
244
189
  * @param tableName - The name of the source table
245
190
  * @param fk - The foreign key definition to parse
246
- * @returns GeneratedRef object or undefined if parsing fails
247
- */
248
- protected parseForeignKey(tableName: string, fk: unknown): GeneratedRef | undefined;
249
- /**
250
- * Get a mapping from variable names to table names in the schema
251
- *
252
- * Creates a map from TypeScript variable names (e.g., "usersTable") to
253
- * actual database table names (e.g., "users").
254
- *
255
- * @returns Map of variable names to table names
191
+ * @returns GeneratedRef object
256
192
  */
257
- protected getTableNameMapping(): Map<string, string>;
193
+ protected parseForeignKey(tableName: string, fk: ForeignKeyConfig): GeneratedRef;
258
194
  /**
259
- * Get a mapping from TypeScript property names to database column names for a table
195
+ * Create the appropriate relation adapter based on schema contents
260
196
  *
261
- * Creates a map from TypeScript property names (e.g., "authorId") to
262
- * actual database column names (e.g., "author_id").
197
+ * Detects whether v1 or v0 relations are present and returns the
198
+ * corresponding adapter implementation.
263
199
  *
264
- * @param tableVarName - The variable name of the table in the schema
265
- * @returns Map of property names to column names
200
+ * @returns RelationAdapter instance (V1RelationAdapter or V0RelationAdapter)
266
201
  */
267
- protected getColumnNameMapping(tableVarName: string): Map<string, string>;
202
+ private createRelationAdapter;
268
203
  /**
269
- * Check if there's a reverse one() relation (B->A when we have A->B)
204
+ * Convert a UnifiedRelation to a RelationDefinition
270
205
  *
271
- * Used to detect one-to-one relationships by checking if both tables
272
- * have one() relations pointing to each other.
273
- *
274
- * @param sourceTable - The source table variable name
275
- * @param targetTable - The target table variable name
276
- * @param sourceFields - The source table's field names
277
- * @param targetReferences - The target table's reference column names
278
- * @returns True if a reverse one() relation exists
279
- */
280
- protected hasReverseOneRelation(sourceTable: string, targetTable: string, sourceFields: string[], targetReferences: string[]): boolean;
281
- /**
282
- * Helper to check if two arrays are equal
206
+ * Maps the unified relation format from adapters to the intermediate
207
+ * schema's RelationDefinition format.
283
208
  *
284
- * @param a - First array
285
- * @param b - Second array
286
- * @returns True if arrays have same length and same elements in order
209
+ * @param unified - The unified relation from adapter
210
+ * @returns RelationDefinition for intermediate schema
287
211
  */
288
- private arraysEqual;
212
+ private unifiedRelationToDefinition;
289
213
  /**
290
- * Generate references from v0 relations() API
214
+ * Convert the Drizzle schema to an intermediate schema representation
291
215
  *
292
- * Uses TypeScript Compiler API to parse relations() definitions from source file
293
- * and extract fields/references to generate DBML Ref lines.
216
+ * Creates a database-agnostic intermediate representation that can be
217
+ * used to generate various output formats (DBML, Markdown, JSON, etc.)
294
218
  *
295
- * Detects one-to-one relationships when bidirectional one() relations exist.
219
+ * @returns The intermediate schema representation
296
220
  */
297
- protected generateRelationalRefsFromV0(): void;
221
+ toIntermediateSchema(): IntermediateSchema;
298
222
  /**
299
- * Generate references from v1 defineRelations() entries
300
- *
301
- * Uses official Drizzle v1 types (TableRelationalConfig, Relation, One).
302
- * Processes One relations to extract foreign key information and generates
303
- * DBML Ref lines. Detects one-to-one relationships with bidirectional checks.
223
+ * Determine the database type from a Drizzle table
304
224
  *
305
- * @param entries - Array of v1 relation entries from defineRelations()
225
+ * @param table - The table to check (can be undefined for empty schemas)
226
+ * @returns The database type
306
227
  */
307
- protected generateRelationalRefsFromV1(entries: TableRelationalConfig[]): void;
228
+ protected getDatabaseType(table: Table | undefined): DatabaseType;
308
229
  /**
309
- * Check if there's a reverse One relation in v1 entries
230
+ * Convert a Drizzle table to a TableDefinition
310
231
  *
311
- * Detects one-to-one relationships by checking if the target table
312
- * has a matching One relation pointing back to the source table.
313
- *
314
- * @param entries - All v1 relation entries
315
- * @param fromTableName - The table to search for reverse relation
316
- * @param toTableName - The expected target table of the reverse relation
317
- * @param fromColumns - The expected source columns of the reverse relation
318
- * @param toColumns - The expected target columns of the reverse relation
319
- * @returns True if a matching reverse One relation exists
232
+ * @param table - The Drizzle table to convert
233
+ * @returns The table definition
320
234
  */
321
- protected hasV1ReverseOneRelation(entries: TableRelationalConfig[], fromTableName: string, toTableName: string, fromColumns: string[], toColumns: string[]): boolean;
235
+ protected tableToDefinition(table: Table): TableDefinition;
322
236
  /**
323
- * Get unique key for a relation to avoid duplicates
324
- *
325
- * Creates a consistent key by sorting table names alphabetically.
237
+ * Convert a Drizzle column to a ColumnDefinition
326
238
  *
327
- * @param tableName - The source table name
328
- * @param relation - The relation object
329
- * @returns A unique key string for the relation
239
+ * @param column - The Drizzle column to convert
240
+ * @param tableName - The name of the table containing the column
241
+ * @returns The column definition
330
242
  */
331
- protected getRelationKey(tableName: string, relation: unknown): string;
243
+ protected columnToDefinition(column: AnyColumn, tableName: string): ColumnDefinition;
332
244
  /**
333
- * Parse a relation into a GeneratedRef
245
+ * Extract index definitions from table config
334
246
  *
335
- * Extracts relation information from a legacy relation object and converts
336
- * it to a GeneratedRef for DBML output.
337
- *
338
- * @param tableName - The source table name
339
- * @param relation - The relation object to parse
340
- * @returns GeneratedRef object or undefined if parsing fails
247
+ * @param tableConfig - The table configuration
248
+ * @returns Array of index definitions
341
249
  */
342
- protected parseRelation(tableName: string, relation: unknown): GeneratedRef | undefined;
250
+ protected extractIndexDefinitions(tableConfig: TableConfig | undefined): IndexDefinition[];
343
251
  /**
344
- * Generate a reference line in DBML format
345
- *
346
- * Creates a Ref line showing the relationship between tables with optional
347
- * onDelete and onUpdate actions.
252
+ * Extract constraint definitions from table config
348
253
  *
349
- * @param dbml - The DBML builder to add the reference to
350
- * @param ref - The reference definition to generate
254
+ * @param tableConfig - The table configuration
255
+ * @returns Array of constraint definitions
351
256
  */
352
- protected generateRef(dbml: DbmlBuilder, ref: GeneratedRef): void;
257
+ protected extractConstraintDefinitions(tableConfig: TableConfig | undefined): ConstraintDefinition[];
353
258
  /**
354
- * Get column names from an index definition
259
+ * Parse a foreign key into a ConstraintDefinition
355
260
  *
356
- * @param idx - The index definition to extract columns from
357
- * @returns Array of column names in the index
261
+ * @param fk - The foreign key definition
262
+ * @returns ConstraintDefinition
358
263
  */
359
- protected getIndexColumns(idx: unknown): string[];
264
+ protected parseForeignKeyForConstraint(fk: ForeignKeyConfig): ConstraintDefinition;
360
265
  /**
361
- * Check if an index is unique
266
+ * Convert a GeneratedRef to a RelationDefinition
362
267
  *
363
- * @param idx - The index definition to check
364
- * @returns True if the index has the unique flag
268
+ * @param ref - The generated reference
269
+ * @returns The relation definition
365
270
  */
366
- protected isUniqueIndex(idx: unknown): boolean;
271
+ protected refToRelationDefinition(ref: GeneratedRef): RelationDefinition;
367
272
  /**
368
- * Get column names from a primary key constraint
273
+ * Collect enum definitions from the schema
369
274
  *
370
- * @param pk - The primary key definition to extract columns from
371
- * @returns Array of column names in the primary key
372
- */
373
- protected getPrimaryKeyColumns(pk: unknown): string[];
374
- /**
375
- * Get column names from a unique constraint
275
+ * Override in subclasses for dialect-specific enum handling (e.g., PostgreSQL)
376
276
  *
377
- * @param uc - The unique constraint definition to extract columns from
378
- * @returns Array of column names in the unique constraint
277
+ * @returns Array of enum definitions (empty by default)
379
278
  */
380
- protected getUniqueConstraintColumns(uc: unknown): string[];
279
+ protected collectEnumDefinitions(): EnumDefinition[];
381
280
  }
382
281
  /**
383
282
  * Write DBML content to a file
@@ -389,5 +288,4 @@ export declare abstract class BaseGenerator<TSchema extends Record<string, unkno
389
288
  * @param content - The DBML content to write
390
289
  */
391
290
  export declare function writeDbmlFile(filePath: string, content: string): void;
392
- export {};
393
291
  //# sourceMappingURL=common.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../../src/generator/common.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,SAAS,EACd,KAAK,KAAK,EAMX,MAAM,aAAa,CAAC;AACrB,OAAO,KAAK,EAAe,qBAAqB,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