drizzle-kit 0.19.14-039355d → 0.20.0-3aac705

Sign up to get free protection for your applications and to get access to all the features.
Files changed (49) hide show
  1. package/@types/utils.d.ts +12 -0
  2. package/cli/commands/migrate.d.ts +260 -0
  3. package/cli/commands/mysqlUp.d.ts +4 -0
  4. package/cli/commands/pgIntrospect.d.ts +118 -0
  5. package/cli/commands/pgPushUtils.d.ts +14 -0
  6. package/cli/commands/pgUp.d.ts +4 -0
  7. package/cli/commands/sqliteIntrospect.d.ts +102 -0
  8. package/cli/commands/sqliteUtils.d.ts +162 -0
  9. package/cli/commands/upFolders.d.ts +27 -0
  10. package/cli/commands/utils.d.ts +265 -0
  11. package/cli/selector-ui.d.ts +13 -0
  12. package/cli/validations/common.d.ts +13 -0
  13. package/cli/validations/mysql.d.ts +414 -0
  14. package/cli/validations/outputs.d.ts +40 -0
  15. package/cli/validations/pg.d.ts +438 -0
  16. package/cli/validations/sqlite.d.ts +220 -0
  17. package/cli/validations/studio.d.ts +548 -0
  18. package/cli/views.d.ts +61 -0
  19. package/drivers/index.d.ts +25 -0
  20. package/global.d.ts +2 -0
  21. package/index.cjs +28898 -37071
  22. package/index.d.ts +48 -0
  23. package/introspect.d.ts +4 -0
  24. package/jsonDiffer.d.ts +76 -0
  25. package/jsonStatements.d.ts +349 -0
  26. package/migrationPreparator.d.ts +35 -0
  27. package/orm-extenstions/d1-driver/driver.d.ts +8 -0
  28. package/orm-extenstions/d1-driver/session.d.ts +52 -0
  29. package/orm-extenstions/d1-driver/wrangler-client.d.ts +3 -0
  30. package/package.json +5 -4
  31. package/schemaValidator.d.ts +1306 -0
  32. package/serializer/index.d.ts +9 -0
  33. package/serializer/mysqlImports.d.ts +6 -0
  34. package/serializer/mysqlSchema.d.ts +3833 -0
  35. package/serializer/mysqlSerializer.d.ts +7 -0
  36. package/serializer/pgImports.d.ts +11 -0
  37. package/serializer/pgSchema.d.ts +4244 -0
  38. package/serializer/pgSerializer.d.ts +9 -0
  39. package/serializer/sqliteImports.d.ts +5 -0
  40. package/serializer/sqliteSchema.d.ts +3227 -0
  41. package/serializer/sqliteSerializer.d.ts +8 -0
  42. package/serializer/studioUtils.d.ts +35 -0
  43. package/snapshotsDiffer.d.ts +2660 -0
  44. package/sqlgenerator.d.ts +33 -0
  45. package/sqlite-introspect.d.ts +5 -0
  46. package/utils/words.d.ts +7 -0
  47. package/utils.d.ts +33 -0
  48. package/utils.js +51709 -11732
  49. package/utilsR.d.ts +232 -0
@@ -0,0 +1,548 @@
1
+ import { TypeOf } from "zod";
2
+ export declare const studioSpecificConnections: import("zod").ZodObject<{
3
+ driver: import("zod").ZodLiteral<"d1">;
4
+ dbCredentials: import("zod").ZodObject<{
5
+ wranglerConfigPath: import("zod").ZodString;
6
+ dbName: import("zod").ZodString;
7
+ }, "strip", import("zod").ZodTypeAny, {
8
+ wranglerConfigPath: string;
9
+ dbName: string;
10
+ }, {
11
+ wranglerConfigPath: string;
12
+ dbName: string;
13
+ }>;
14
+ }, "strip", import("zod").ZodTypeAny, {
15
+ driver: "d1";
16
+ dbCredentials: {
17
+ wranglerConfigPath: string;
18
+ dbName: string;
19
+ };
20
+ }, {
21
+ driver: "d1";
22
+ dbCredentials: {
23
+ wranglerConfigPath: string;
24
+ dbName: string;
25
+ };
26
+ }>;
27
+ export declare const studioConfidConnections: import("zod").ZodUnion<[import("zod").ZodUnion<[import("zod").ZodObject<{
28
+ driver: import("zod").ZodLiteral<"mysql2">;
29
+ dbCredentials: import("zod").ZodObject<{
30
+ host: import("zod").ZodString;
31
+ port: import("zod").ZodOptional<import("zod").ZodNumber>;
32
+ user: import("zod").ZodDefault<import("zod").ZodString>;
33
+ password: import("zod").ZodOptional<import("zod").ZodString>;
34
+ database: import("zod").ZodString;
35
+ type: import("zod").ZodDefault<import("zod").ZodLiteral<"params">>;
36
+ }, "strip", import("zod").ZodTypeAny, {
37
+ port?: number | undefined;
38
+ password?: string | undefined;
39
+ type: "params";
40
+ host: string;
41
+ user: string;
42
+ database: string;
43
+ }, {
44
+ type?: "params" | undefined;
45
+ port?: number | undefined;
46
+ user?: string | undefined;
47
+ password?: string | undefined;
48
+ host: string;
49
+ database: string;
50
+ }>;
51
+ }, "strip", import("zod").ZodTypeAny, {
52
+ driver: "mysql2";
53
+ dbCredentials: {
54
+ port?: number | undefined;
55
+ password?: string | undefined;
56
+ type: "params";
57
+ host: string;
58
+ user: string;
59
+ database: string;
60
+ };
61
+ }, {
62
+ driver: "mysql2";
63
+ dbCredentials: {
64
+ type?: "params" | undefined;
65
+ port?: number | undefined;
66
+ user?: string | undefined;
67
+ password?: string | undefined;
68
+ host: string;
69
+ database: string;
70
+ };
71
+ }>, import("zod").ZodObject<{
72
+ driver: import("zod").ZodLiteral<"mysql2">;
73
+ dbCredentials: import("zod").ZodObject<{
74
+ connectionString: import("zod").ZodString;
75
+ type: import("zod").ZodDefault<import("zod").ZodLiteral<"url">>;
76
+ }, "strip", import("zod").ZodTypeAny, {
77
+ type: "url";
78
+ connectionString: string;
79
+ }, {
80
+ type?: "url" | undefined;
81
+ connectionString: string;
82
+ }>;
83
+ }, "strip", import("zod").ZodTypeAny, {
84
+ driver: "mysql2";
85
+ dbCredentials: {
86
+ type: "url";
87
+ connectionString: string;
88
+ };
89
+ }, {
90
+ driver: "mysql2";
91
+ dbCredentials: {
92
+ type?: "url" | undefined;
93
+ connectionString: string;
94
+ };
95
+ }>]>, import("zod").ZodUnion<[import("zod").ZodObject<{
96
+ driver: import("zod").ZodLiteral<"pg">;
97
+ dbCredentials: import("zod").ZodObject<{
98
+ host: import("zod").ZodString;
99
+ port: import("zod").ZodOptional<import("zod").ZodNumber>;
100
+ user: import("zod").ZodDefault<import("zod").ZodString>;
101
+ password: import("zod").ZodOptional<import("zod").ZodString>;
102
+ database: import("zod").ZodString;
103
+ ssl: import("zod").ZodOptional<import("zod").ZodBoolean>;
104
+ type: import("zod").ZodOptional<import("zod").ZodDefault<import("zod").ZodLiteral<"params">>>;
105
+ }, "strip", import("zod").ZodTypeAny, {
106
+ type?: "params" | undefined;
107
+ port?: number | undefined;
108
+ password?: string | undefined;
109
+ ssl?: boolean | undefined;
110
+ host: string;
111
+ user: string;
112
+ database: string;
113
+ }, {
114
+ type?: "params" | undefined;
115
+ port?: number | undefined;
116
+ user?: string | undefined;
117
+ password?: string | undefined;
118
+ ssl?: boolean | undefined;
119
+ host: string;
120
+ database: string;
121
+ }>;
122
+ }, "strip", import("zod").ZodTypeAny, {
123
+ driver: "pg";
124
+ dbCredentials: {
125
+ type?: "params" | undefined;
126
+ port?: number | undefined;
127
+ password?: string | undefined;
128
+ ssl?: boolean | undefined;
129
+ host: string;
130
+ user: string;
131
+ database: string;
132
+ };
133
+ }, {
134
+ driver: "pg";
135
+ dbCredentials: {
136
+ type?: "params" | undefined;
137
+ port?: number | undefined;
138
+ user?: string | undefined;
139
+ password?: string | undefined;
140
+ ssl?: boolean | undefined;
141
+ host: string;
142
+ database: string;
143
+ };
144
+ }>, import("zod").ZodObject<{
145
+ driver: import("zod").ZodLiteral<"pg">;
146
+ dbCredentials: import("zod").ZodObject<{
147
+ connectionString: import("zod").ZodString;
148
+ type: import("zod").ZodOptional<import("zod").ZodDefault<import("zod").ZodLiteral<"url">>>;
149
+ }, "strip", import("zod").ZodTypeAny, {
150
+ type?: "url" | undefined;
151
+ connectionString: string;
152
+ }, {
153
+ type?: "url" | undefined;
154
+ connectionString: string;
155
+ }>;
156
+ }, "strip", import("zod").ZodTypeAny, {
157
+ driver: "pg";
158
+ dbCredentials: {
159
+ type?: "url" | undefined;
160
+ connectionString: string;
161
+ };
162
+ }, {
163
+ driver: "pg";
164
+ dbCredentials: {
165
+ type?: "url" | undefined;
166
+ connectionString: string;
167
+ };
168
+ }>]>, import("zod").ZodUnion<[import("zod").ZodObject<{
169
+ driver: import("zod").ZodLiteral<"turso">;
170
+ dbCredentials: import("zod").ZodObject<{
171
+ url: import("zod").ZodString;
172
+ authToken: import("zod").ZodOptional<import("zod").ZodString>;
173
+ }, "strip", import("zod").ZodTypeAny, {
174
+ authToken?: string | undefined;
175
+ url: string;
176
+ }, {
177
+ authToken?: string | undefined;
178
+ url: string;
179
+ }>;
180
+ }, "strip", import("zod").ZodTypeAny, {
181
+ driver: "turso";
182
+ dbCredentials: {
183
+ authToken?: string | undefined;
184
+ url: string;
185
+ };
186
+ }, {
187
+ driver: "turso";
188
+ dbCredentials: {
189
+ authToken?: string | undefined;
190
+ url: string;
191
+ };
192
+ }>, import("zod").ZodObject<{
193
+ driver: import("zod").ZodLiteral<"libsql">;
194
+ dbCredentials: import("zod").ZodObject<{
195
+ url: import("zod").ZodString;
196
+ }, "strip", import("zod").ZodTypeAny, {
197
+ url: string;
198
+ }, {
199
+ url: string;
200
+ }>;
201
+ }, "strip", import("zod").ZodTypeAny, {
202
+ driver: "libsql";
203
+ dbCredentials: {
204
+ url: string;
205
+ };
206
+ }, {
207
+ driver: "libsql";
208
+ dbCredentials: {
209
+ url: string;
210
+ };
211
+ }>, import("zod").ZodObject<{
212
+ driver: import("zod").ZodLiteral<"better-sqlite">;
213
+ dbCredentials: import("zod").ZodObject<{
214
+ url: import("zod").ZodString;
215
+ }, "strip", import("zod").ZodTypeAny, {
216
+ url: string;
217
+ }, {
218
+ url: string;
219
+ }>;
220
+ }, "strip", import("zod").ZodTypeAny, {
221
+ driver: "better-sqlite";
222
+ dbCredentials: {
223
+ url: string;
224
+ };
225
+ }, {
226
+ driver: "better-sqlite";
227
+ dbCredentials: {
228
+ url: string;
229
+ };
230
+ }>]>, import("zod").ZodObject<{
231
+ driver: import("zod").ZodLiteral<"d1">;
232
+ dbCredentials: import("zod").ZodObject<{
233
+ wranglerConfigPath: import("zod").ZodString;
234
+ dbName: import("zod").ZodString;
235
+ }, "strip", import("zod").ZodTypeAny, {
236
+ wranglerConfigPath: string;
237
+ dbName: string;
238
+ }, {
239
+ wranglerConfigPath: string;
240
+ dbName: string;
241
+ }>;
242
+ }, "strip", import("zod").ZodTypeAny, {
243
+ driver: "d1";
244
+ dbCredentials: {
245
+ wranglerConfigPath: string;
246
+ dbName: string;
247
+ };
248
+ }, {
249
+ driver: "d1";
250
+ dbCredentials: {
251
+ wranglerConfigPath: string;
252
+ dbName: string;
253
+ };
254
+ }>]>;
255
+ export declare const studioConfigSchema: import("zod").ZodIntersection<import("zod").ZodObject<{
256
+ schema: import("zod").ZodUnion<[import("zod").ZodString, import("zod").ZodArray<import("zod").ZodString, "many">]>;
257
+ }, "strip", import("zod").ZodTypeAny, {
258
+ schema: string | string[];
259
+ }, {
260
+ schema: string | string[];
261
+ }>, import("zod").ZodUnion<[import("zod").ZodUnion<[import("zod").ZodObject<{
262
+ driver: import("zod").ZodLiteral<"mysql2">;
263
+ dbCredentials: import("zod").ZodObject<{
264
+ host: import("zod").ZodString;
265
+ port: import("zod").ZodOptional<import("zod").ZodNumber>;
266
+ user: import("zod").ZodDefault<import("zod").ZodString>;
267
+ password: import("zod").ZodOptional<import("zod").ZodString>;
268
+ database: import("zod").ZodString;
269
+ type: import("zod").ZodDefault<import("zod").ZodLiteral<"params">>;
270
+ }, "strip", import("zod").ZodTypeAny, {
271
+ port?: number | undefined;
272
+ password?: string | undefined;
273
+ type: "params";
274
+ host: string;
275
+ user: string;
276
+ database: string;
277
+ }, {
278
+ type?: "params" | undefined;
279
+ port?: number | undefined;
280
+ user?: string | undefined;
281
+ password?: string | undefined;
282
+ host: string;
283
+ database: string;
284
+ }>;
285
+ }, "strip", import("zod").ZodTypeAny, {
286
+ driver: "mysql2";
287
+ dbCredentials: {
288
+ port?: number | undefined;
289
+ password?: string | undefined;
290
+ type: "params";
291
+ host: string;
292
+ user: string;
293
+ database: string;
294
+ };
295
+ }, {
296
+ driver: "mysql2";
297
+ dbCredentials: {
298
+ type?: "params" | undefined;
299
+ port?: number | undefined;
300
+ user?: string | undefined;
301
+ password?: string | undefined;
302
+ host: string;
303
+ database: string;
304
+ };
305
+ }>, import("zod").ZodObject<{
306
+ driver: import("zod").ZodLiteral<"mysql2">;
307
+ dbCredentials: import("zod").ZodObject<{
308
+ connectionString: import("zod").ZodString;
309
+ type: import("zod").ZodDefault<import("zod").ZodLiteral<"url">>;
310
+ }, "strip", import("zod").ZodTypeAny, {
311
+ type: "url";
312
+ connectionString: string;
313
+ }, {
314
+ type?: "url" | undefined;
315
+ connectionString: string;
316
+ }>;
317
+ }, "strip", import("zod").ZodTypeAny, {
318
+ driver: "mysql2";
319
+ dbCredentials: {
320
+ type: "url";
321
+ connectionString: string;
322
+ };
323
+ }, {
324
+ driver: "mysql2";
325
+ dbCredentials: {
326
+ type?: "url" | undefined;
327
+ connectionString: string;
328
+ };
329
+ }>]>, import("zod").ZodUnion<[import("zod").ZodObject<{
330
+ driver: import("zod").ZodLiteral<"pg">;
331
+ dbCredentials: import("zod").ZodObject<{
332
+ host: import("zod").ZodString;
333
+ port: import("zod").ZodOptional<import("zod").ZodNumber>;
334
+ user: import("zod").ZodDefault<import("zod").ZodString>;
335
+ password: import("zod").ZodOptional<import("zod").ZodString>;
336
+ database: import("zod").ZodString;
337
+ ssl: import("zod").ZodOptional<import("zod").ZodBoolean>;
338
+ type: import("zod").ZodOptional<import("zod").ZodDefault<import("zod").ZodLiteral<"params">>>;
339
+ }, "strip", import("zod").ZodTypeAny, {
340
+ type?: "params" | undefined;
341
+ port?: number | undefined;
342
+ password?: string | undefined;
343
+ ssl?: boolean | undefined;
344
+ host: string;
345
+ user: string;
346
+ database: string;
347
+ }, {
348
+ type?: "params" | undefined;
349
+ port?: number | undefined;
350
+ user?: string | undefined;
351
+ password?: string | undefined;
352
+ ssl?: boolean | undefined;
353
+ host: string;
354
+ database: string;
355
+ }>;
356
+ }, "strip", import("zod").ZodTypeAny, {
357
+ driver: "pg";
358
+ dbCredentials: {
359
+ type?: "params" | undefined;
360
+ port?: number | undefined;
361
+ password?: string | undefined;
362
+ ssl?: boolean | undefined;
363
+ host: string;
364
+ user: string;
365
+ database: string;
366
+ };
367
+ }, {
368
+ driver: "pg";
369
+ dbCredentials: {
370
+ type?: "params" | undefined;
371
+ port?: number | undefined;
372
+ user?: string | undefined;
373
+ password?: string | undefined;
374
+ ssl?: boolean | undefined;
375
+ host: string;
376
+ database: string;
377
+ };
378
+ }>, import("zod").ZodObject<{
379
+ driver: import("zod").ZodLiteral<"pg">;
380
+ dbCredentials: import("zod").ZodObject<{
381
+ connectionString: import("zod").ZodString;
382
+ type: import("zod").ZodOptional<import("zod").ZodDefault<import("zod").ZodLiteral<"url">>>;
383
+ }, "strip", import("zod").ZodTypeAny, {
384
+ type?: "url" | undefined;
385
+ connectionString: string;
386
+ }, {
387
+ type?: "url" | undefined;
388
+ connectionString: string;
389
+ }>;
390
+ }, "strip", import("zod").ZodTypeAny, {
391
+ driver: "pg";
392
+ dbCredentials: {
393
+ type?: "url" | undefined;
394
+ connectionString: string;
395
+ };
396
+ }, {
397
+ driver: "pg";
398
+ dbCredentials: {
399
+ type?: "url" | undefined;
400
+ connectionString: string;
401
+ };
402
+ }>]>, import("zod").ZodUnion<[import("zod").ZodObject<{
403
+ driver: import("zod").ZodLiteral<"turso">;
404
+ dbCredentials: import("zod").ZodObject<{
405
+ url: import("zod").ZodString;
406
+ authToken: import("zod").ZodOptional<import("zod").ZodString>;
407
+ }, "strip", import("zod").ZodTypeAny, {
408
+ authToken?: string | undefined;
409
+ url: string;
410
+ }, {
411
+ authToken?: string | undefined;
412
+ url: string;
413
+ }>;
414
+ }, "strip", import("zod").ZodTypeAny, {
415
+ driver: "turso";
416
+ dbCredentials: {
417
+ authToken?: string | undefined;
418
+ url: string;
419
+ };
420
+ }, {
421
+ driver: "turso";
422
+ dbCredentials: {
423
+ authToken?: string | undefined;
424
+ url: string;
425
+ };
426
+ }>, import("zod").ZodObject<{
427
+ driver: import("zod").ZodLiteral<"libsql">;
428
+ dbCredentials: import("zod").ZodObject<{
429
+ url: import("zod").ZodString;
430
+ }, "strip", import("zod").ZodTypeAny, {
431
+ url: string;
432
+ }, {
433
+ url: string;
434
+ }>;
435
+ }, "strip", import("zod").ZodTypeAny, {
436
+ driver: "libsql";
437
+ dbCredentials: {
438
+ url: string;
439
+ };
440
+ }, {
441
+ driver: "libsql";
442
+ dbCredentials: {
443
+ url: string;
444
+ };
445
+ }>, import("zod").ZodObject<{
446
+ driver: import("zod").ZodLiteral<"better-sqlite">;
447
+ dbCredentials: import("zod").ZodObject<{
448
+ url: import("zod").ZodString;
449
+ }, "strip", import("zod").ZodTypeAny, {
450
+ url: string;
451
+ }, {
452
+ url: string;
453
+ }>;
454
+ }, "strip", import("zod").ZodTypeAny, {
455
+ driver: "better-sqlite";
456
+ dbCredentials: {
457
+ url: string;
458
+ };
459
+ }, {
460
+ driver: "better-sqlite";
461
+ dbCredentials: {
462
+ url: string;
463
+ };
464
+ }>]>, import("zod").ZodObject<{
465
+ driver: import("zod").ZodLiteral<"d1">;
466
+ dbCredentials: import("zod").ZodObject<{
467
+ wranglerConfigPath: import("zod").ZodString;
468
+ dbName: import("zod").ZodString;
469
+ }, "strip", import("zod").ZodTypeAny, {
470
+ wranglerConfigPath: string;
471
+ dbName: string;
472
+ }, {
473
+ wranglerConfigPath: string;
474
+ dbName: string;
475
+ }>;
476
+ }, "strip", import("zod").ZodTypeAny, {
477
+ driver: "d1";
478
+ dbCredentials: {
479
+ wranglerConfigPath: string;
480
+ dbName: string;
481
+ };
482
+ }, {
483
+ driver: "d1";
484
+ dbCredentials: {
485
+ wranglerConfigPath: string;
486
+ dbName: string;
487
+ };
488
+ }>]>>;
489
+ export type StudioConfig = TypeOf<typeof studioConfigSchema>;
490
+ export type StudioConfigConnections = TypeOf<typeof studioConfidConnections>;
491
+ export declare const validateStudio: (options: any) => Promise<{
492
+ schema: string | string[];
493
+ } & ({
494
+ driver: "pg";
495
+ dbCredentials: {
496
+ type?: "params" | undefined;
497
+ port?: number | undefined;
498
+ password?: string | undefined;
499
+ ssl?: boolean | undefined;
500
+ host: string;
501
+ user: string;
502
+ database: string;
503
+ };
504
+ } | {
505
+ driver: "pg";
506
+ dbCredentials: {
507
+ type?: "url" | undefined;
508
+ connectionString: string;
509
+ };
510
+ } | {
511
+ driver: "turso";
512
+ dbCredentials: {
513
+ authToken?: string | undefined;
514
+ url: string;
515
+ };
516
+ } | {
517
+ driver: "libsql";
518
+ dbCredentials: {
519
+ url: string;
520
+ };
521
+ } | {
522
+ driver: "better-sqlite";
523
+ dbCredentials: {
524
+ url: string;
525
+ };
526
+ } | {
527
+ driver: "mysql2";
528
+ dbCredentials: {
529
+ port?: number | undefined;
530
+ password?: string | undefined;
531
+ type: "params";
532
+ host: string;
533
+ user: string;
534
+ database: string;
535
+ };
536
+ } | {
537
+ driver: "mysql2";
538
+ dbCredentials: {
539
+ type: "url";
540
+ connectionString: string;
541
+ };
542
+ } | {
543
+ driver: "d1";
544
+ dbCredentials: {
545
+ wranglerConfigPath: string;
546
+ dbName: string;
547
+ };
548
+ })>;
package/cli/views.d.ts ADDED
@@ -0,0 +1,61 @@
1
+ import { Prompt, TaskView } from "hanji";
2
+ import { CommonSchema } from "src/schemaValidator";
3
+ import { Named } from "./commands/migrate";
4
+ export declare const warning: (msg: string) => void;
5
+ export declare const err: (msg: string) => void;
6
+ export declare const info: (msg: string, greyMsg?: string) => string;
7
+ export declare const error: (error: string, greyMsg?: string) => string;
8
+ export declare const schema: (schema: CommonSchema) => string;
9
+ export interface RenamePropmtItem<T> {
10
+ from: T;
11
+ to: T;
12
+ }
13
+ export declare const isRenamePromptItem: <T extends Named>(item: T | RenamePropmtItem<T>) => item is RenamePropmtItem<T>;
14
+ export declare class ResolveColumnSelect<T extends Named> extends Prompt<RenamePropmtItem<T> | T> {
15
+ private readonly tableName;
16
+ private readonly base;
17
+ private readonly data;
18
+ constructor(tableName: string, base: Named, data: (RenamePropmtItem<T> | T)[]);
19
+ render(status: "idle" | "submitted" | "aborted"): string;
20
+ result(): RenamePropmtItem<T> | T;
21
+ }
22
+ export declare class ResolveTableSelect<T extends Named> extends Prompt<RenamePropmtItem<T> | T> {
23
+ private readonly base;
24
+ private readonly state;
25
+ constructor(base: Named, data: (RenamePropmtItem<T> | T)[]);
26
+ render(status: "idle" | "submitted" | "aborted"): string;
27
+ result(): RenamePropmtItem<T> | T;
28
+ }
29
+ export declare class ResolveSchemasSelect<T extends Named> extends Prompt<RenamePropmtItem<T> | T> {
30
+ private readonly base;
31
+ private readonly state;
32
+ constructor(base: Named, data: (RenamePropmtItem<T> | T)[]);
33
+ render(status: "idle" | "submitted" | "aborted"): string;
34
+ result(): RenamePropmtItem<T> | T;
35
+ }
36
+ export type IntrospectStatus = "fetching" | "done";
37
+ export type IntrospectStage = "tables" | "columns" | "enums" | "indexes" | "fks";
38
+ export declare class IntrospectProgress extends TaskView {
39
+ private readonly spinner;
40
+ private timeout;
41
+ private state;
42
+ constructor();
43
+ update(stage: IntrospectStage, count: number, status: IntrospectStatus): void;
44
+ private formatCount;
45
+ private statusText;
46
+ render(): string;
47
+ }
48
+ export declare class DropMigrationView<T extends {
49
+ tag: string;
50
+ }> extends Prompt<T> {
51
+ private readonly data;
52
+ constructor(data: T[]);
53
+ render(status: "idle" | "submitted" | "aborted"): string;
54
+ result(): T;
55
+ }
56
+ export declare const trimmedRange: <T>(arr: T[], index: number, limitLines: number) => {
57
+ trimmed: T[];
58
+ offset: number;
59
+ startTrimmed: boolean;
60
+ endTrimmed: boolean;
61
+ };
@@ -0,0 +1,25 @@
1
+ import { Client } from "@libsql/client";
2
+ import { PgDatabase } from "drizzle-orm/pg-core";
3
+ import { Client as PgClient } from "pg";
4
+ export declare abstract class DrizzleDbClient<T = any> {
5
+ protected db: T;
6
+ constructor(db: T);
7
+ abstract query<K = any>(query: string, values?: any[]): Promise<K[]>;
8
+ abstract run(query: string): Promise<void>;
9
+ }
10
+ export declare class DrizzleORMPgClient extends DrizzleDbClient<PgDatabase<any>> {
11
+ query<K = any>(query: string, values?: any[] | undefined): Promise<K[]>;
12
+ run(query: string): Promise<void>;
13
+ }
14
+ export declare class BetterSqlite extends DrizzleDbClient {
15
+ run(query: string): Promise<void>;
16
+ query(query: string): Promise<any[]>;
17
+ }
18
+ export declare class TursoSqlite extends DrizzleDbClient<Client> {
19
+ run(query: string): Promise<void>;
20
+ query(query: string): Promise<any[]>;
21
+ }
22
+ export declare class PgPostgres extends DrizzleDbClient<PgClient> {
23
+ query<K = any>(query: string, values?: any[]): Promise<K[]>;
24
+ run(query: string): Promise<void>;
25
+ }
package/global.d.ts ADDED
@@ -0,0 +1,2 @@
1
+ export declare const originUUID = "00000000-0000-0000-0000-000000000000";
2
+ export declare const snapshotVersion = "5";