drizzle-kit 0.20.0-3aac705 → 0.20.0-3d76318
Sign up to get free protection for your applications and to get access to all the features.
- package/cli/commands/migrate.d.ts +1 -1
- package/cli/commands/pgConnect.d.ts +5 -0
- package/cli/commands/pgIntrospect.d.ts +3 -5
- package/cli/commands/sqliteIntrospect.d.ts +3 -3
- package/cli/commands/utils.d.ts +2 -2
- package/cli/utils.d.ts +11 -0
- package/cli/validations/mysql.d.ts +77 -126
- package/cli/validations/studio.d.ts +118 -73
- package/cli/views.d.ts +2 -2
- package/drivers/index.d.ts +3 -3
- package/global.d.ts +1 -0
- package/index.cjs +6578 -6246
- package/orm-extenstions/d1-driver/session.d.ts +2 -3
- package/package.json +7 -6
- package/serializer/index.d.ts +4 -4
- package/serializer/pgSchema.d.ts +16 -16
- package/serializer/pgSerializer.d.ts +4 -4
- package/serializer/sqliteSerializer.d.ts +3 -3
- package/serializer/studioUtils.d.ts +19 -1
- package/sqlite-introspect.d.ts +2 -2
- package/utils-studio.d.ts +5 -0
- package/utils-studio.js +3367 -0
- package/utils.d.ts +204 -25
- package/utils.js +6891 -6028
- package/loader.mjs +0 -57
- package/utilsR.d.ts +0 -232
@@ -24,75 +24,143 @@ export declare const studioSpecificConnections: import("zod").ZodObject<{
|
|
24
24
|
dbName: string;
|
25
25
|
};
|
26
26
|
}>;
|
27
|
-
export declare const
|
28
|
-
driver: import("zod").ZodLiteral<"
|
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">;
|
29
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;
|
@@ -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").
|
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;
|
@@ -488,6 +537,7 @@ 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
|
} & ({
|
@@ -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;
|
package/drivers/index.d.ts
CHANGED
@@ -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