drizzle-kit 0.20.0-f28522c → 0.20.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -24,75 +24,143 @@ export declare const studioSpecificConnections: import("zod").ZodObject<{
24
24
  dbName: string;
25
25
  };
26
26
  }>;
27
- export declare const studioConfidConnections: import("zod").ZodUnion<[import("zod").ZodUnion<[import("zod").ZodObject<{
28
- driver: import("zod").ZodLiteral<"mysql2">;
27
+ export declare const stuioSqliteConnectionConfig: import("zod").ZodUnion<[import("zod").ZodUnion<[import("zod").ZodObject<{
28
+ driver: import("zod").ZodLiteral<"turso">;
29
+ dbCredentials: import("zod").ZodObject<{
30
+ url: import("zod").ZodString;
31
+ authToken: import("zod").ZodOptional<import("zod").ZodString>;
32
+ }, "strip", import("zod").ZodTypeAny, {
33
+ authToken?: string | undefined;
34
+ url: string;
35
+ }, {
36
+ authToken?: string | undefined;
37
+ url: string;
38
+ }>;
39
+ }, "strip", import("zod").ZodTypeAny, {
40
+ driver: "turso";
41
+ dbCredentials: {
42
+ authToken?: string | undefined;
43
+ url: string;
44
+ };
45
+ }, {
46
+ driver: "turso";
47
+ dbCredentials: {
48
+ authToken?: string | undefined;
49
+ url: string;
50
+ };
51
+ }>, import("zod").ZodObject<{
52
+ driver: import("zod").ZodLiteral<"libsql">;
29
53
  dbCredentials: import("zod").ZodObject<{
54
+ url: import("zod").ZodString;
55
+ }, "strip", import("zod").ZodTypeAny, {
56
+ url: string;
57
+ }, {
58
+ url: string;
59
+ }>;
60
+ }, "strip", import("zod").ZodTypeAny, {
61
+ driver: "libsql";
62
+ dbCredentials: {
63
+ url: string;
64
+ };
65
+ }, {
66
+ driver: "libsql";
67
+ dbCredentials: {
68
+ url: string;
69
+ };
70
+ }>, import("zod").ZodObject<{
71
+ driver: import("zod").ZodLiteral<"better-sqlite">;
72
+ dbCredentials: import("zod").ZodObject<{
73
+ url: import("zod").ZodString;
74
+ }, "strip", import("zod").ZodTypeAny, {
75
+ url: string;
76
+ }, {
77
+ url: string;
78
+ }>;
79
+ }, "strip", import("zod").ZodTypeAny, {
80
+ driver: "better-sqlite";
81
+ dbCredentials: {
82
+ url: string;
83
+ };
84
+ }, {
85
+ driver: "better-sqlite";
86
+ dbCredentials: {
87
+ url: string;
88
+ };
89
+ }>]>, import("zod").ZodObject<{
90
+ driver: import("zod").ZodLiteral<"d1">;
91
+ dbCredentials: import("zod").ZodObject<{
92
+ wranglerConfigPath: import("zod").ZodString;
93
+ dbName: import("zod").ZodString;
94
+ }, "strip", import("zod").ZodTypeAny, {
95
+ wranglerConfigPath: string;
96
+ dbName: string;
97
+ }, {
98
+ wranglerConfigPath: string;
99
+ dbName: string;
100
+ }>;
101
+ }, "strip", import("zod").ZodTypeAny, {
102
+ driver: "d1";
103
+ dbCredentials: {
104
+ wranglerConfigPath: string;
105
+ dbName: string;
106
+ };
107
+ }, {
108
+ driver: "d1";
109
+ dbCredentials: {
110
+ wranglerConfigPath: string;
111
+ dbName: string;
112
+ };
113
+ }>]>;
114
+ export declare const studioConfidConnections: import("zod").ZodUnion<[import("zod").ZodObject<{
115
+ driver: import("zod").ZodLiteral<"mysql2">;
116
+ dbCredentials: import("zod").ZodUnion<[import("zod").ZodObject<{
30
117
  host: import("zod").ZodString;
31
118
  port: import("zod").ZodOptional<import("zod").ZodNumber>;
32
119
  user: import("zod").ZodDefault<import("zod").ZodString>;
33
120
  password: import("zod").ZodOptional<import("zod").ZodString>;
34
121
  database: import("zod").ZodString;
35
- type: import("zod").ZodDefault<import("zod").ZodLiteral<"params">>;
36
122
  }, "strip", import("zod").ZodTypeAny, {
37
123
  port?: number | undefined;
38
124
  password?: string | undefined;
39
- type: "params";
40
125
  host: string;
41
126
  user: string;
42
127
  database: string;
43
128
  }, {
44
- type?: "params" | undefined;
45
129
  port?: number | undefined;
46
130
  user?: string | undefined;
47
131
  password?: string | undefined;
48
132
  host: string;
49
133
  database: string;
50
- }>;
134
+ }>, import("zod").ZodObject<{
135
+ uri: import("zod").ZodString;
136
+ }, "strip", import("zod").ZodTypeAny, {
137
+ uri: string;
138
+ }, {
139
+ uri: string;
140
+ }>]>;
51
141
  }, "strip", import("zod").ZodTypeAny, {
52
142
  driver: "mysql2";
53
143
  dbCredentials: {
54
144
  port?: number | undefined;
55
145
  password?: string | undefined;
56
- type: "params";
57
146
  host: string;
58
147
  user: string;
59
148
  database: string;
149
+ } | {
150
+ uri: string;
60
151
  };
61
152
  }, {
62
153
  driver: "mysql2";
63
154
  dbCredentials: {
64
- type?: "params" | undefined;
65
155
  port?: number | undefined;
66
156
  user?: string | undefined;
67
157
  password?: string | undefined;
68
158
  host: string;
69
159
  database: string;
160
+ } | {
161
+ uri: string;
70
162
  };
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<{
163
+ }>, import("zod").ZodUnion<[import("zod").ZodObject<{
96
164
  driver: import("zod").ZodLiteral<"pg">;
97
165
  dbCredentials: import("zod").ZodObject<{
98
166
  host: import("zod").ZodString;
@@ -101,12 +169,12 @@ export declare const studioConfidConnections: import("zod").ZodUnion<[import("zo
101
169
  password: import("zod").ZodOptional<import("zod").ZodString>;
102
170
  database: import("zod").ZodString;
103
171
  ssl: import("zod").ZodOptional<import("zod").ZodBoolean>;
104
- type: import("zod").ZodDefault<import("zod").ZodLiteral<"params">>;
172
+ type: import("zod").ZodOptional<import("zod").ZodDefault<import("zod").ZodLiteral<"params">>>;
105
173
  }, "strip", import("zod").ZodTypeAny, {
174
+ type?: "params" | undefined;
106
175
  port?: number | undefined;
107
176
  password?: string | undefined;
108
177
  ssl?: boolean | undefined;
109
- type: "params";
110
178
  host: string;
111
179
  user: string;
112
180
  database: string;
@@ -122,10 +190,10 @@ export declare const studioConfidConnections: import("zod").ZodUnion<[import("zo
122
190
  }, "strip", import("zod").ZodTypeAny, {
123
191
  driver: "pg";
124
192
  dbCredentials: {
193
+ type?: "params" | undefined;
125
194
  port?: number | undefined;
126
195
  password?: string | undefined;
127
196
  ssl?: boolean | undefined;
128
- type: "params";
129
197
  host: string;
130
198
  user: string;
131
199
  database: string;
@@ -145,9 +213,9 @@ export declare const studioConfidConnections: import("zod").ZodUnion<[import("zo
145
213
  driver: import("zod").ZodLiteral<"pg">;
146
214
  dbCredentials: import("zod").ZodObject<{
147
215
  connectionString: import("zod").ZodString;
148
- type: import("zod").ZodDefault<import("zod").ZodLiteral<"url">>;
216
+ type: import("zod").ZodOptional<import("zod").ZodDefault<import("zod").ZodLiteral<"url">>>;
149
217
  }, "strip", import("zod").ZodTypeAny, {
150
- type: "url";
218
+ type?: "url" | undefined;
151
219
  connectionString: string;
152
220
  }, {
153
221
  type?: "url" | undefined;
@@ -156,7 +224,7 @@ export declare const studioConfidConnections: import("zod").ZodUnion<[import("zo
156
224
  }, "strip", import("zod").ZodTypeAny, {
157
225
  driver: "pg";
158
226
  dbCredentials: {
159
- type: "url";
227
+ type?: "url" | undefined;
160
228
  connectionString: string;
161
229
  };
162
230
  }, {
@@ -258,75 +326,56 @@ export declare const studioConfigSchema: import("zod").ZodIntersection<import("z
258
326
  schema: string | string[];
259
327
  }, {
260
328
  schema: string | string[];
261
- }>, import("zod").ZodUnion<[import("zod").ZodUnion<[import("zod").ZodObject<{
329
+ }>, import("zod").ZodUnion<[import("zod").ZodObject<{
262
330
  driver: import("zod").ZodLiteral<"mysql2">;
263
- dbCredentials: import("zod").ZodObject<{
331
+ dbCredentials: import("zod").ZodUnion<[import("zod").ZodObject<{
264
332
  host: import("zod").ZodString;
265
333
  port: import("zod").ZodOptional<import("zod").ZodNumber>;
266
334
  user: import("zod").ZodDefault<import("zod").ZodString>;
267
335
  password: import("zod").ZodOptional<import("zod").ZodString>;
268
336
  database: import("zod").ZodString;
269
- type: import("zod").ZodDefault<import("zod").ZodLiteral<"params">>;
270
337
  }, "strip", import("zod").ZodTypeAny, {
271
338
  port?: number | undefined;
272
339
  password?: string | undefined;
273
- type: "params";
274
340
  host: string;
275
341
  user: string;
276
342
  database: string;
277
343
  }, {
278
- type?: "params" | undefined;
279
344
  port?: number | undefined;
280
345
  user?: string | undefined;
281
346
  password?: string | undefined;
282
347
  host: string;
283
348
  database: string;
284
- }>;
349
+ }>, import("zod").ZodObject<{
350
+ uri: import("zod").ZodString;
351
+ }, "strip", import("zod").ZodTypeAny, {
352
+ uri: string;
353
+ }, {
354
+ uri: string;
355
+ }>]>;
285
356
  }, "strip", import("zod").ZodTypeAny, {
286
357
  driver: "mysql2";
287
358
  dbCredentials: {
288
359
  port?: number | undefined;
289
360
  password?: string | undefined;
290
- type: "params";
291
361
  host: string;
292
362
  user: string;
293
363
  database: string;
364
+ } | {
365
+ uri: string;
294
366
  };
295
367
  }, {
296
368
  driver: "mysql2";
297
369
  dbCredentials: {
298
- type?: "params" | undefined;
299
370
  port?: number | undefined;
300
371
  user?: string | undefined;
301
372
  password?: string | undefined;
302
373
  host: string;
303
374
  database: string;
375
+ } | {
376
+ uri: string;
304
377
  };
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<{
378
+ }>, import("zod").ZodUnion<[import("zod").ZodObject<{
330
379
  driver: import("zod").ZodLiteral<"pg">;
331
380
  dbCredentials: import("zod").ZodObject<{
332
381
  host: import("zod").ZodString;
@@ -335,12 +384,12 @@ export declare const studioConfigSchema: import("zod").ZodIntersection<import("z
335
384
  password: import("zod").ZodOptional<import("zod").ZodString>;
336
385
  database: import("zod").ZodString;
337
386
  ssl: import("zod").ZodOptional<import("zod").ZodBoolean>;
338
- type: import("zod").ZodDefault<import("zod").ZodLiteral<"params">>;
387
+ type: import("zod").ZodOptional<import("zod").ZodDefault<import("zod").ZodLiteral<"params">>>;
339
388
  }, "strip", import("zod").ZodTypeAny, {
389
+ type?: "params" | undefined;
340
390
  port?: number | undefined;
341
391
  password?: string | undefined;
342
392
  ssl?: boolean | undefined;
343
- type: "params";
344
393
  host: string;
345
394
  user: string;
346
395
  database: string;
@@ -356,10 +405,10 @@ export declare const studioConfigSchema: import("zod").ZodIntersection<import("z
356
405
  }, "strip", import("zod").ZodTypeAny, {
357
406
  driver: "pg";
358
407
  dbCredentials: {
408
+ type?: "params" | undefined;
359
409
  port?: number | undefined;
360
410
  password?: string | undefined;
361
411
  ssl?: boolean | undefined;
362
- type: "params";
363
412
  host: string;
364
413
  user: string;
365
414
  database: string;
@@ -379,9 +428,9 @@ export declare const studioConfigSchema: import("zod").ZodIntersection<import("z
379
428
  driver: import("zod").ZodLiteral<"pg">;
380
429
  dbCredentials: import("zod").ZodObject<{
381
430
  connectionString: import("zod").ZodString;
382
- type: import("zod").ZodDefault<import("zod").ZodLiteral<"url">>;
431
+ type: import("zod").ZodOptional<import("zod").ZodDefault<import("zod").ZodLiteral<"url">>>;
383
432
  }, "strip", import("zod").ZodTypeAny, {
384
- type: "url";
433
+ type?: "url" | undefined;
385
434
  connectionString: string;
386
435
  }, {
387
436
  type?: "url" | undefined;
@@ -390,7 +439,7 @@ export declare const studioConfigSchema: import("zod").ZodIntersection<import("z
390
439
  }, "strip", import("zod").ZodTypeAny, {
391
440
  driver: "pg";
392
441
  dbCredentials: {
393
- type: "url";
442
+ type?: "url" | undefined;
394
443
  connectionString: string;
395
444
  };
396
445
  }, {
@@ -488,15 +537,16 @@ export declare const studioConfigSchema: import("zod").ZodIntersection<import("z
488
537
  }>]>>;
489
538
  export type StudioConfig = TypeOf<typeof studioConfigSchema>;
490
539
  export type StudioConfigConnections = TypeOf<typeof studioConfidConnections>;
540
+ export type StudioSqliteConnectionConfig = TypeOf<typeof stuioSqliteConnectionConfig>;
491
541
  export declare const validateStudio: (options: any) => Promise<{
492
542
  schema: string | string[];
493
543
  } & ({
494
544
  driver: "pg";
495
545
  dbCredentials: {
546
+ type?: "params" | undefined;
496
547
  port?: number | undefined;
497
548
  password?: string | undefined;
498
549
  ssl?: boolean | undefined;
499
- type: "params";
500
550
  host: string;
501
551
  user: string;
502
552
  database: string;
@@ -504,7 +554,7 @@ export declare const validateStudio: (options: any) => Promise<{
504
554
  } | {
505
555
  driver: "pg";
506
556
  dbCredentials: {
507
- type: "url";
557
+ type?: "url" | undefined;
508
558
  connectionString: string;
509
559
  };
510
560
  } | {
@@ -528,16 +578,11 @@ export declare const validateStudio: (options: any) => Promise<{
528
578
  dbCredentials: {
529
579
  port?: number | undefined;
530
580
  password?: string | undefined;
531
- type: "params";
532
581
  host: string;
533
582
  user: string;
534
583
  database: string;
535
- };
536
- } | {
537
- driver: "mysql2";
538
- dbCredentials: {
539
- type: "url";
540
- connectionString: string;
584
+ } | {
585
+ uri: string;
541
586
  };
542
587
  } | {
543
588
  driver: "d1";
package/cli/views.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { Prompt, TaskView } from "hanji";
2
- import { CommonSchema } from "src/schemaValidator";
3
- import { Named } from "./commands/migrate";
2
+ import type { CommonSchema } from "src/schemaValidator";
3
+ import type { Named } from "./commands/migrate";
4
4
  export declare const warning: (msg: string) => void;
5
5
  export declare const err: (msg: string) => void;
6
6
  export declare const info: (msg: string, greyMsg?: string) => string;
@@ -1,6 +1,6 @@
1
- import { Client } from "@libsql/client";
2
- import { PgDatabase } from "drizzle-orm/pg-core";
3
- import { Client as PgClient } from "pg";
1
+ import type { Client } from "@libsql/client";
2
+ import type { PgDatabase } from "drizzle-orm/pg-core";
3
+ import type { Client as PgClient } from "pg";
4
4
  export declare abstract class DrizzleDbClient<T = any> {
5
5
  protected db: T;
6
6
  constructor(db: T);
package/global.d.ts CHANGED
@@ -1,2 +1,3 @@
1
1
  export declare const originUUID = "00000000-0000-0000-0000-000000000000";
2
2
  export declare const snapshotVersion = "5";
3
+ export declare function assertUnreachable(x: never): never;