drizzle-kit 0.20.14-a183d8b → 0.20.14-b6f235e

Sign up to get free protection for your applications and to get access to all the features.
Files changed (47) hide show
  1. package/bin.cjs +20571 -19934
  2. package/cli/commands/migrate.d.ts +114 -90
  3. package/cli/commands/mysqlIntrospect.d.ts +8 -14
  4. package/cli/commands/pgIntrospect.d.ts +17 -10
  5. package/cli/commands/sqliteIntrospect.d.ts +8 -8
  6. package/cli/commands/utils.d.ts +5 -5
  7. package/cli/{index.d.ts → validations/cli.d.ts} +33 -20
  8. package/cli/validations/common.d.ts +1 -1
  9. package/cli/views.d.ts +6 -4
  10. package/global.d.ts +3 -1
  11. package/index.js +1 -0
  12. package/introspect-pg.d.ts +4 -1
  13. package/jsonDiffer.d.ts +14 -29
  14. package/jsonStatements.d.ts +38 -11
  15. package/package.json +18 -50
  16. package/payload.js +7697 -8205
  17. package/payload.mjs +6841 -7355
  18. package/schemaValidator.d.ts +72 -69
  19. package/serializer/mysqlImports.d.ts +3 -7
  20. package/serializer/mysqlSchema.d.ts +1624 -493
  21. package/serializer/mysqlSerializer.d.ts +2 -2
  22. package/serializer/pgImports.d.ts +2 -2
  23. package/serializer/pgSchema.d.ts +1260 -801
  24. package/serializer/sqliteImports.d.ts +2 -4
  25. package/serializer/sqliteSchema.d.ts +144 -570
  26. package/serializer/sqliteSerializer.d.ts +1 -1
  27. package/snapshotsDiffer.d.ts +1908 -1050
  28. package/utils/words.d.ts +1 -1
  29. package/utils-studio.js +4144 -85
  30. package/utils-studio.mjs +4144 -85
  31. package/utils.d.ts +6 -140
  32. package/utils.js +4112 -7326
  33. package/utils.mjs +4195 -7409
  34. package/cli/commands/check.d.ts +0 -2
  35. package/cli/commands/drop.d.ts +0 -4
  36. package/cli/commands/mysqlUp.d.ts +0 -4
  37. package/cli/commands/pgUp.d.ts +0 -4
  38. package/cli/commands/push.d.ts +0 -6
  39. package/cli/commands/sqliteUp.d.ts +0 -2
  40. package/cli/commands/upFolders.d.ts +0 -27
  41. package/cli/utils.d.ts +0 -12
  42. package/cli/validations/studio.d.ts +0 -593
  43. package/orm-extenstions/d1-driver/driver.d.ts +0 -8
  44. package/orm-extenstions/d1-driver/session.d.ts +0 -51
  45. package/orm-extenstions/d1-driver/wrangler-client.d.ts +0 -3
  46. package/serializer/studioUtils.d.ts +0 -65
  47. package/utils/certs.d.ts +0 -4
@@ -1,2 +0,0 @@
1
- import { Dialect } from "../../schemaValidator";
2
- export declare const checkHandler: (out: string, dialect: Dialect) => void;
@@ -1,4 +0,0 @@
1
- export declare const dropMigration: ({ out, bundle, }: {
2
- out: string;
3
- bundle?: boolean | undefined;
4
- }) => Promise<void>;
@@ -1,4 +0,0 @@
1
- import { MySqlSchema, MySqlSchemaV4 } from "../../serializer/mysqlSchema";
2
- export declare const upMysqlHandler: (out: string) => void;
3
- export declare const upMySqlHandlerV4toV5: (obj: MySqlSchemaV4) => MySqlSchema;
4
- export declare const upMysqlHandlerV4: (out: string) => void;
@@ -1,4 +0,0 @@
1
- import { PgSchema, PgSchemaV4 } from "../../serializer/pgSchema";
2
- export declare const upPgHandlerV4toV5: (obj: PgSchemaV4) => PgSchema;
3
- export declare const upPgHandler: (out: string) => void;
4
- export declare const upPgHandlerV4: (out: string) => void;
@@ -1,6 +0,0 @@
1
- import { MySQLPushConfig } from "../validations/mysql";
2
- import { PgPushConfig } from "../validations/pg";
3
- import { SQLitePushConfig } from "../validations/sqlite";
4
- export declare const mysqlPush: (drizzleConfig: MySQLPushConfig, tablesFilter: string[]) => Promise<void>;
5
- export declare const pgPush: (drizzleConfig: PgPushConfig, tablesFilter: string[]) => Promise<void>;
6
- export declare const sqlitePush: (drizzleConfig: SQLitePushConfig, tablesFilter: string[]) => Promise<void>;
@@ -1,2 +0,0 @@
1
- export declare const upSqliteHandler: (out: string) => void;
2
- export declare const upSqliteHandlerV4: (out: string) => void;
@@ -1,27 +0,0 @@
1
- import { Dialect } from "../../schemaValidator";
2
- import { Named, NamedWithSchema } from "./migrate";
3
- export declare const resolveSchemas: <T extends Named>(missingSchemas: T[], newSchemas: T[], predicate: (leftMissing: T[], created: T) => T | undefined) => {
4
- created: T[];
5
- renamed: {
6
- from: T;
7
- to: T;
8
- }[];
9
- deleted: T[];
10
- };
11
- export declare const resolveTables: <T extends NamedWithSchema>(missingTables: T[], newTables: T[], resolver: (leftMissing: T[], created: T) => T | undefined) => {
12
- created: T[];
13
- renamed: {
14
- from: T;
15
- to: T;
16
- }[];
17
- deleted: T[];
18
- };
19
- export declare const resolveColumns: <T extends Named>(missingColumns: T[], newColumns: T[], predicate: (leftMissing: T[], created: T) => T | undefined) => {
20
- created: T[];
21
- renamed: {
22
- from: T;
23
- to: T;
24
- }[];
25
- deleted: T[];
26
- };
27
- export declare const upgradeFolders: (dialect: Dialect, out: string) => void;
package/cli/utils.d.ts DELETED
@@ -1,12 +0,0 @@
1
- export declare const assertExists: (it?: any) => void;
2
- export declare const assertStudioNodeVersion: () => void;
3
- export declare const assertPackages: (...pkgs: string[]) => Promise<void>;
4
- export declare const assertEitherPackage: (...pkgs: string[]) => Promise<string[]>;
5
- export declare const assertOrmCoreVersion: () => Promise<void>;
6
- export declare const ormCoreVersions: () => Promise<{
7
- compatibilityVersion: number;
8
- npmVersion: string;
9
- } | {
10
- compatibilityVersion?: undefined;
11
- npmVersion?: undefined;
12
- }>;
@@ -1,593 +0,0 @@
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 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">;
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<{
117
- host: import("zod").ZodString;
118
- port: import("zod").ZodOptional<import("zod").ZodNumber>;
119
- user: import("zod").ZodDefault<import("zod").ZodString>;
120
- password: import("zod").ZodOptional<import("zod").ZodString>;
121
- database: import("zod").ZodString;
122
- }, "strip", import("zod").ZodTypeAny, {
123
- port?: number | undefined;
124
- password?: string | undefined;
125
- host: string;
126
- user: string;
127
- database: string;
128
- }, {
129
- port?: number | undefined;
130
- user?: string | undefined;
131
- password?: string | undefined;
132
- host: string;
133
- database: string;
134
- }>, import("zod").ZodObject<{
135
- uri: import("zod").ZodString;
136
- }, "strip", import("zod").ZodTypeAny, {
137
- uri: string;
138
- }, {
139
- uri: string;
140
- }>]>;
141
- }, "strip", import("zod").ZodTypeAny, {
142
- driver: "mysql2";
143
- dbCredentials: {
144
- port?: number | undefined;
145
- password?: string | undefined;
146
- host: string;
147
- user: string;
148
- database: string;
149
- } | {
150
- uri: string;
151
- };
152
- }, {
153
- driver: "mysql2";
154
- dbCredentials: {
155
- port?: number | undefined;
156
- user?: string | undefined;
157
- password?: string | undefined;
158
- host: string;
159
- database: string;
160
- } | {
161
- uri: string;
162
- };
163
- }>, import("zod").ZodUnion<[import("zod").ZodObject<{
164
- driver: import("zod").ZodLiteral<"pg">;
165
- dbCredentials: import("zod").ZodObject<{
166
- host: import("zod").ZodString;
167
- port: import("zod").ZodOptional<import("zod").ZodNumber>;
168
- user: import("zod").ZodDefault<import("zod").ZodString>;
169
- password: import("zod").ZodOptional<import("zod").ZodString>;
170
- database: import("zod").ZodString;
171
- ssl: import("zod").ZodOptional<import("zod").ZodBoolean>;
172
- type: import("zod").ZodOptional<import("zod").ZodDefault<import("zod").ZodLiteral<"params">>>;
173
- }, "strip", import("zod").ZodTypeAny, {
174
- type?: "params" | undefined;
175
- port?: number | undefined;
176
- password?: string | undefined;
177
- ssl?: boolean | undefined;
178
- host: string;
179
- user: string;
180
- database: string;
181
- }, {
182
- type?: "params" | undefined;
183
- port?: number | undefined;
184
- user?: string | undefined;
185
- password?: string | undefined;
186
- ssl?: boolean | undefined;
187
- host: string;
188
- database: string;
189
- }>;
190
- }, "strip", import("zod").ZodTypeAny, {
191
- driver: "pg";
192
- dbCredentials: {
193
- type?: "params" | undefined;
194
- port?: number | undefined;
195
- password?: string | undefined;
196
- ssl?: boolean | undefined;
197
- host: string;
198
- user: string;
199
- database: string;
200
- };
201
- }, {
202
- driver: "pg";
203
- dbCredentials: {
204
- type?: "params" | undefined;
205
- port?: number | undefined;
206
- user?: string | undefined;
207
- password?: string | undefined;
208
- ssl?: boolean | undefined;
209
- host: string;
210
- database: string;
211
- };
212
- }>, import("zod").ZodObject<{
213
- driver: import("zod").ZodLiteral<"pg">;
214
- dbCredentials: import("zod").ZodObject<{
215
- connectionString: import("zod").ZodString;
216
- type: import("zod").ZodOptional<import("zod").ZodDefault<import("zod").ZodLiteral<"url">>>;
217
- }, "strip", import("zod").ZodTypeAny, {
218
- type?: "url" | undefined;
219
- connectionString: string;
220
- }, {
221
- type?: "url" | undefined;
222
- connectionString: string;
223
- }>;
224
- }, "strip", import("zod").ZodTypeAny, {
225
- driver: "pg";
226
- dbCredentials: {
227
- type?: "url" | undefined;
228
- connectionString: string;
229
- };
230
- }, {
231
- driver: "pg";
232
- dbCredentials: {
233
- type?: "url" | undefined;
234
- connectionString: string;
235
- };
236
- }>]>, import("zod").ZodUnion<[import("zod").ZodObject<{
237
- driver: import("zod").ZodLiteral<"turso">;
238
- dbCredentials: import("zod").ZodObject<{
239
- url: import("zod").ZodString;
240
- authToken: import("zod").ZodOptional<import("zod").ZodString>;
241
- }, "strip", import("zod").ZodTypeAny, {
242
- authToken?: string | undefined;
243
- url: string;
244
- }, {
245
- authToken?: string | undefined;
246
- url: string;
247
- }>;
248
- }, "strip", import("zod").ZodTypeAny, {
249
- driver: "turso";
250
- dbCredentials: {
251
- authToken?: string | undefined;
252
- url: string;
253
- };
254
- }, {
255
- driver: "turso";
256
- dbCredentials: {
257
- authToken?: string | undefined;
258
- url: string;
259
- };
260
- }>, import("zod").ZodObject<{
261
- driver: import("zod").ZodLiteral<"libsql">;
262
- dbCredentials: import("zod").ZodObject<{
263
- url: import("zod").ZodString;
264
- }, "strip", import("zod").ZodTypeAny, {
265
- url: string;
266
- }, {
267
- url: string;
268
- }>;
269
- }, "strip", import("zod").ZodTypeAny, {
270
- driver: "libsql";
271
- dbCredentials: {
272
- url: string;
273
- };
274
- }, {
275
- driver: "libsql";
276
- dbCredentials: {
277
- url: string;
278
- };
279
- }>, import("zod").ZodObject<{
280
- driver: import("zod").ZodLiteral<"better-sqlite">;
281
- dbCredentials: import("zod").ZodObject<{
282
- url: import("zod").ZodString;
283
- }, "strip", import("zod").ZodTypeAny, {
284
- url: string;
285
- }, {
286
- url: string;
287
- }>;
288
- }, "strip", import("zod").ZodTypeAny, {
289
- driver: "better-sqlite";
290
- dbCredentials: {
291
- url: string;
292
- };
293
- }, {
294
- driver: "better-sqlite";
295
- dbCredentials: {
296
- url: string;
297
- };
298
- }>]>, import("zod").ZodObject<{
299
- driver: import("zod").ZodLiteral<"d1">;
300
- dbCredentials: import("zod").ZodObject<{
301
- wranglerConfigPath: import("zod").ZodString;
302
- dbName: import("zod").ZodString;
303
- }, "strip", import("zod").ZodTypeAny, {
304
- wranglerConfigPath: string;
305
- dbName: string;
306
- }, {
307
- wranglerConfigPath: string;
308
- dbName: string;
309
- }>;
310
- }, "strip", import("zod").ZodTypeAny, {
311
- driver: "d1";
312
- dbCredentials: {
313
- wranglerConfigPath: string;
314
- dbName: string;
315
- };
316
- }, {
317
- driver: "d1";
318
- dbCredentials: {
319
- wranglerConfigPath: string;
320
- dbName: string;
321
- };
322
- }>]>;
323
- export declare const studioConfigSchema: import("zod").ZodIntersection<import("zod").ZodObject<{
324
- schema: import("zod").ZodUnion<[import("zod").ZodString, import("zod").ZodArray<import("zod").ZodString, "many">]>;
325
- }, "strip", import("zod").ZodTypeAny, {
326
- schema: string | string[];
327
- }, {
328
- schema: string | string[];
329
- }>, import("zod").ZodUnion<[import("zod").ZodObject<{
330
- driver: import("zod").ZodLiteral<"mysql2">;
331
- dbCredentials: import("zod").ZodUnion<[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
- }, "strip", import("zod").ZodTypeAny, {
338
- port?: number | undefined;
339
- password?: string | undefined;
340
- host: string;
341
- user: string;
342
- database: string;
343
- }, {
344
- port?: number | undefined;
345
- user?: string | undefined;
346
- password?: string | undefined;
347
- host: string;
348
- database: string;
349
- }>, import("zod").ZodObject<{
350
- uri: import("zod").ZodString;
351
- }, "strip", import("zod").ZodTypeAny, {
352
- uri: string;
353
- }, {
354
- uri: string;
355
- }>]>;
356
- }, "strip", import("zod").ZodTypeAny, {
357
- driver: "mysql2";
358
- dbCredentials: {
359
- port?: number | undefined;
360
- password?: string | undefined;
361
- host: string;
362
- user: string;
363
- database: string;
364
- } | {
365
- uri: string;
366
- };
367
- }, {
368
- driver: "mysql2";
369
- dbCredentials: {
370
- port?: number | undefined;
371
- user?: string | undefined;
372
- password?: string | undefined;
373
- host: string;
374
- database: string;
375
- } | {
376
- uri: string;
377
- };
378
- }>, import("zod").ZodUnion<[import("zod").ZodObject<{
379
- driver: import("zod").ZodLiteral<"pg">;
380
- dbCredentials: import("zod").ZodObject<{
381
- host: import("zod").ZodString;
382
- port: import("zod").ZodOptional<import("zod").ZodNumber>;
383
- user: import("zod").ZodDefault<import("zod").ZodString>;
384
- password: import("zod").ZodOptional<import("zod").ZodString>;
385
- database: import("zod").ZodString;
386
- ssl: import("zod").ZodOptional<import("zod").ZodBoolean>;
387
- type: import("zod").ZodOptional<import("zod").ZodDefault<import("zod").ZodLiteral<"params">>>;
388
- }, "strip", import("zod").ZodTypeAny, {
389
- type?: "params" | undefined;
390
- port?: number | undefined;
391
- password?: string | undefined;
392
- ssl?: boolean | undefined;
393
- host: string;
394
- user: string;
395
- database: string;
396
- }, {
397
- type?: "params" | undefined;
398
- port?: number | undefined;
399
- user?: string | undefined;
400
- password?: string | undefined;
401
- ssl?: boolean | undefined;
402
- host: string;
403
- database: string;
404
- }>;
405
- }, "strip", import("zod").ZodTypeAny, {
406
- driver: "pg";
407
- dbCredentials: {
408
- type?: "params" | undefined;
409
- port?: number | undefined;
410
- password?: string | undefined;
411
- ssl?: boolean | undefined;
412
- host: string;
413
- user: string;
414
- database: string;
415
- };
416
- }, {
417
- driver: "pg";
418
- dbCredentials: {
419
- type?: "params" | undefined;
420
- port?: number | undefined;
421
- user?: string | undefined;
422
- password?: string | undefined;
423
- ssl?: boolean | undefined;
424
- host: string;
425
- database: string;
426
- };
427
- }>, import("zod").ZodObject<{
428
- driver: import("zod").ZodLiteral<"pg">;
429
- dbCredentials: import("zod").ZodObject<{
430
- connectionString: import("zod").ZodString;
431
- type: import("zod").ZodOptional<import("zod").ZodDefault<import("zod").ZodLiteral<"url">>>;
432
- }, "strip", import("zod").ZodTypeAny, {
433
- type?: "url" | undefined;
434
- connectionString: string;
435
- }, {
436
- type?: "url" | undefined;
437
- connectionString: string;
438
- }>;
439
- }, "strip", import("zod").ZodTypeAny, {
440
- driver: "pg";
441
- dbCredentials: {
442
- type?: "url" | undefined;
443
- connectionString: string;
444
- };
445
- }, {
446
- driver: "pg";
447
- dbCredentials: {
448
- type?: "url" | undefined;
449
- connectionString: string;
450
- };
451
- }>]>, import("zod").ZodUnion<[import("zod").ZodObject<{
452
- driver: import("zod").ZodLiteral<"turso">;
453
- dbCredentials: import("zod").ZodObject<{
454
- url: import("zod").ZodString;
455
- authToken: import("zod").ZodOptional<import("zod").ZodString>;
456
- }, "strip", import("zod").ZodTypeAny, {
457
- authToken?: string | undefined;
458
- url: string;
459
- }, {
460
- authToken?: string | undefined;
461
- url: string;
462
- }>;
463
- }, "strip", import("zod").ZodTypeAny, {
464
- driver: "turso";
465
- dbCredentials: {
466
- authToken?: string | undefined;
467
- url: string;
468
- };
469
- }, {
470
- driver: "turso";
471
- dbCredentials: {
472
- authToken?: string | undefined;
473
- url: string;
474
- };
475
- }>, import("zod").ZodObject<{
476
- driver: import("zod").ZodLiteral<"libsql">;
477
- dbCredentials: import("zod").ZodObject<{
478
- url: import("zod").ZodString;
479
- }, "strip", import("zod").ZodTypeAny, {
480
- url: string;
481
- }, {
482
- url: string;
483
- }>;
484
- }, "strip", import("zod").ZodTypeAny, {
485
- driver: "libsql";
486
- dbCredentials: {
487
- url: string;
488
- };
489
- }, {
490
- driver: "libsql";
491
- dbCredentials: {
492
- url: string;
493
- };
494
- }>, import("zod").ZodObject<{
495
- driver: import("zod").ZodLiteral<"better-sqlite">;
496
- dbCredentials: import("zod").ZodObject<{
497
- url: import("zod").ZodString;
498
- }, "strip", import("zod").ZodTypeAny, {
499
- url: string;
500
- }, {
501
- url: string;
502
- }>;
503
- }, "strip", import("zod").ZodTypeAny, {
504
- driver: "better-sqlite";
505
- dbCredentials: {
506
- url: string;
507
- };
508
- }, {
509
- driver: "better-sqlite";
510
- dbCredentials: {
511
- url: string;
512
- };
513
- }>]>, import("zod").ZodObject<{
514
- driver: import("zod").ZodLiteral<"d1">;
515
- dbCredentials: import("zod").ZodObject<{
516
- wranglerConfigPath: import("zod").ZodString;
517
- dbName: import("zod").ZodString;
518
- }, "strip", import("zod").ZodTypeAny, {
519
- wranglerConfigPath: string;
520
- dbName: string;
521
- }, {
522
- wranglerConfigPath: string;
523
- dbName: string;
524
- }>;
525
- }, "strip", import("zod").ZodTypeAny, {
526
- driver: "d1";
527
- dbCredentials: {
528
- wranglerConfigPath: string;
529
- dbName: string;
530
- };
531
- }, {
532
- driver: "d1";
533
- dbCredentials: {
534
- wranglerConfigPath: string;
535
- dbName: string;
536
- };
537
- }>]>>;
538
- export type StudioConfig = TypeOf<typeof studioConfigSchema>;
539
- export type StudioConfigConnections = TypeOf<typeof studioConfidConnections>;
540
- export type StudioSqliteConnectionConfig = TypeOf<typeof stuioSqliteConnectionConfig>;
541
- export declare const validateStudio: (options: any) => Promise<{
542
- schema: string | string[];
543
- } & ({
544
- driver: "turso";
545
- dbCredentials: {
546
- authToken?: string | undefined;
547
- url: string;
548
- };
549
- } | {
550
- driver: "libsql";
551
- dbCredentials: {
552
- url: string;
553
- };
554
- } | {
555
- driver: "better-sqlite";
556
- dbCredentials: {
557
- url: string;
558
- };
559
- } | {
560
- driver: "pg";
561
- dbCredentials: {
562
- type?: "params" | undefined;
563
- port?: number | undefined;
564
- password?: string | undefined;
565
- ssl?: boolean | undefined;
566
- host: string;
567
- user: string;
568
- database: string;
569
- };
570
- } | {
571
- driver: "pg";
572
- dbCredentials: {
573
- type?: "url" | undefined;
574
- connectionString: string;
575
- };
576
- } | {
577
- driver: "mysql2";
578
- dbCredentials: {
579
- port?: number | undefined;
580
- password?: string | undefined;
581
- host: string;
582
- user: string;
583
- database: string;
584
- } | {
585
- uri: string;
586
- };
587
- } | {
588
- driver: "d1";
589
- dbCredentials: {
590
- wranglerConfigPath: string;
591
- dbName: string;
592
- };
593
- })>;
@@ -1,8 +0,0 @@
1
- import { type DrizzleConfig, QueryWithTypings, SQL } from "drizzle-orm";
2
- import { BaseSQLiteDatabase, SQLiteAsyncDialect } from "drizzle-orm/sqlite-core";
3
- import { D1WranglerResults } from "./session";
4
- export type DrizzleD1WranglerDatabase<TSchema extends Record<string, unknown> = Record<string, never>> = BaseSQLiteDatabase<"async", D1WranglerResults, TSchema>;
5
- export declare class WranglerDialect extends SQLiteAsyncDialect {
6
- sqlToQuery(sql: SQL): QueryWithTypings;
7
- }
8
- export declare function drizzle<TSchema extends Record<string, unknown> = Record<string, never>>(client: (query: string, configPath: string, dbName: string) => Promise<any>, configPath: string, dbName: string, config?: DrizzleConfig<TSchema>): DrizzleD1WranglerDatabase<TSchema>;