drizzle-kit 0.20.0-c31f6ba → 0.20.0-e84b695
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.
- 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 +6577 -6245
- package/orm-extenstions/d1-driver/session.d.ts +2 -3
- package/package.json +7 -6
- package/serializer/index.d.ts +4 -4
- 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 +2 -22
- package/utils.js +6885 -6022
- package/loader.mjs +0 -57
@@ -1,8 +1,6 @@
|
|
1
|
-
import { PgConfigIntrospect
|
2
|
-
import { DrizzleDbClient
|
3
|
-
export declare const
|
4
|
-
client: PgPostgres;
|
5
|
-
}>;
|
1
|
+
import type { PgConfigIntrospect } from "../validations/pg";
|
2
|
+
import type { DrizzleDbClient } from "src/drivers";
|
3
|
+
export declare const pgSchemas: (client: DrizzleDbClient) => Promise<string[]>;
|
6
4
|
export declare const pgPushIntrospect: (connection: {
|
7
5
|
client: DrizzleDbClient;
|
8
6
|
}, filters: string[], schemaFilters: string[]) => Promise<{
|
@@ -1,7 +1,7 @@
|
|
1
|
-
import { SQLiteCliConfig, SQLiteConnectionConfig } from "./sqliteUtils";
|
2
|
-
import {
|
1
|
+
import type { SQLiteCliConfig, SQLiteConnectionConfig } from "./sqliteUtils";
|
2
|
+
import type { DrizzleDbClient } from "../../drivers";
|
3
3
|
export declare const connectToSQLite: (config: SQLiteConnectionConfig) => Promise<{
|
4
|
-
client: BetterSqlite;
|
4
|
+
client: import("../../drivers").BetterSqlite;
|
5
5
|
} | {
|
6
6
|
client?: undefined;
|
7
7
|
}>;
|
package/cli/commands/utils.d.ts
CHANGED
package/cli/utils.d.ts
ADDED
@@ -0,0 +1,11 @@
|
|
1
|
+
export declare const assertExists: (it?: any) => void;
|
2
|
+
export declare const assertPackages: (...pkgs: string[]) => Promise<void>;
|
3
|
+
export declare const assertEitherPackage: (...pkgs: string[]) => Promise<string[]>;
|
4
|
+
export declare const assertOrmCoreVersion: () => Promise<void>;
|
5
|
+
export declare const ormCoreVersions: () => Promise<{
|
6
|
+
compatibilityVersion: number;
|
7
|
+
npmVersion: string;
|
8
|
+
} | {
|
9
|
+
compatibilityVersion?: undefined;
|
10
|
+
npmVersion?: undefined;
|
11
|
+
}>;
|
@@ -6,17 +6,14 @@ export declare const mysqlConnectionCli: import("zod").ZodUnion<[import("zod").Z
|
|
6
6
|
user: import("zod").ZodDefault<import("zod").ZodString>;
|
7
7
|
password: import("zod").ZodOptional<import("zod").ZodString>;
|
8
8
|
database: import("zod").ZodString;
|
9
|
-
type: import("zod").ZodDefault<import("zod").ZodLiteral<"params">>;
|
10
9
|
}, "strip", import("zod").ZodTypeAny, {
|
11
10
|
port?: number | undefined;
|
12
11
|
password?: string | undefined;
|
13
|
-
type: "params";
|
14
12
|
host: string;
|
15
13
|
user: string;
|
16
14
|
database: string;
|
17
15
|
driver: "mysql2";
|
18
16
|
}, {
|
19
|
-
type?: "params" | undefined;
|
20
17
|
port?: number | undefined;
|
21
18
|
user?: string | undefined;
|
22
19
|
password?: string | undefined;
|
@@ -25,86 +22,89 @@ export declare const mysqlConnectionCli: import("zod").ZodUnion<[import("zod").Z
|
|
25
22
|
driver: "mysql2";
|
26
23
|
}>, import("zod").ZodObject<{
|
27
24
|
driver: import("zod").ZodLiteral<"mysql2">;
|
28
|
-
|
29
|
-
type: import("zod").ZodDefault<import("zod").ZodLiteral<"url">>;
|
25
|
+
uri: import("zod").ZodString;
|
30
26
|
}, "strip", import("zod").ZodTypeAny, {
|
31
|
-
type: "url";
|
32
|
-
connectionString: string;
|
33
27
|
driver: "mysql2";
|
28
|
+
uri: string;
|
34
29
|
}, {
|
35
|
-
type?: "url" | undefined;
|
36
|
-
connectionString: string;
|
37
30
|
driver: "mysql2";
|
31
|
+
uri: string;
|
38
32
|
}>]>;
|
39
|
-
export declare const
|
33
|
+
export declare const mysql2credentials: import("zod").ZodUnion<[import("zod").ZodObject<{
|
34
|
+
host: import("zod").ZodString;
|
35
|
+
port: import("zod").ZodOptional<import("zod").ZodNumber>;
|
36
|
+
user: import("zod").ZodDefault<import("zod").ZodString>;
|
37
|
+
password: import("zod").ZodOptional<import("zod").ZodString>;
|
38
|
+
database: import("zod").ZodString;
|
39
|
+
}, "strip", import("zod").ZodTypeAny, {
|
40
|
+
port?: number | undefined;
|
41
|
+
password?: string | undefined;
|
42
|
+
host: string;
|
43
|
+
user: string;
|
44
|
+
database: string;
|
45
|
+
}, {
|
46
|
+
port?: number | undefined;
|
47
|
+
user?: string | undefined;
|
48
|
+
password?: string | undefined;
|
49
|
+
host: string;
|
50
|
+
database: string;
|
51
|
+
}>, import("zod").ZodObject<{
|
52
|
+
uri: import("zod").ZodString;
|
53
|
+
}, "strip", import("zod").ZodTypeAny, {
|
54
|
+
uri: string;
|
55
|
+
}, {
|
56
|
+
uri: string;
|
57
|
+
}>]>;
|
58
|
+
export declare const mysqlConnectionConfig: import("zod").ZodObject<{
|
40
59
|
driver: import("zod").ZodLiteral<"mysql2">;
|
41
|
-
dbCredentials: import("zod").ZodObject<{
|
60
|
+
dbCredentials: import("zod").ZodUnion<[import("zod").ZodObject<{
|
42
61
|
host: import("zod").ZodString;
|
43
62
|
port: import("zod").ZodOptional<import("zod").ZodNumber>;
|
44
63
|
user: import("zod").ZodDefault<import("zod").ZodString>;
|
45
64
|
password: import("zod").ZodOptional<import("zod").ZodString>;
|
46
65
|
database: import("zod").ZodString;
|
47
|
-
type: import("zod").ZodDefault<import("zod").ZodLiteral<"params">>;
|
48
66
|
}, "strip", import("zod").ZodTypeAny, {
|
49
67
|
port?: number | undefined;
|
50
68
|
password?: string | undefined;
|
51
|
-
type: "params";
|
52
69
|
host: string;
|
53
70
|
user: string;
|
54
71
|
database: string;
|
55
72
|
}, {
|
56
|
-
type?: "params" | undefined;
|
57
73
|
port?: number | undefined;
|
58
74
|
user?: string | undefined;
|
59
75
|
password?: string | undefined;
|
60
76
|
host: string;
|
61
77
|
database: string;
|
62
|
-
}
|
78
|
+
}>, import("zod").ZodObject<{
|
79
|
+
uri: import("zod").ZodString;
|
80
|
+
}, "strip", import("zod").ZodTypeAny, {
|
81
|
+
uri: string;
|
82
|
+
}, {
|
83
|
+
uri: string;
|
84
|
+
}>]>;
|
63
85
|
}, "strip", import("zod").ZodTypeAny, {
|
64
86
|
driver: "mysql2";
|
65
87
|
dbCredentials: {
|
66
88
|
port?: number | undefined;
|
67
89
|
password?: string | undefined;
|
68
|
-
type: "params";
|
69
90
|
host: string;
|
70
91
|
user: string;
|
71
92
|
database: string;
|
93
|
+
} | {
|
94
|
+
uri: string;
|
72
95
|
};
|
73
96
|
}, {
|
74
97
|
driver: "mysql2";
|
75
98
|
dbCredentials: {
|
76
|
-
type?: "params" | undefined;
|
77
99
|
port?: number | undefined;
|
78
100
|
user?: string | undefined;
|
79
101
|
password?: string | undefined;
|
80
102
|
host: string;
|
81
103
|
database: string;
|
104
|
+
} | {
|
105
|
+
uri: string;
|
82
106
|
};
|
83
|
-
}
|
84
|
-
driver: import("zod").ZodLiteral<"mysql2">;
|
85
|
-
dbCredentials: import("zod").ZodObject<{
|
86
|
-
connectionString: import("zod").ZodString;
|
87
|
-
type: import("zod").ZodDefault<import("zod").ZodLiteral<"url">>;
|
88
|
-
}, "strip", import("zod").ZodTypeAny, {
|
89
|
-
type: "url";
|
90
|
-
connectionString: string;
|
91
|
-
}, {
|
92
|
-
type?: "url" | undefined;
|
93
|
-
connectionString: string;
|
94
|
-
}>;
|
95
|
-
}, "strip", import("zod").ZodTypeAny, {
|
96
|
-
driver: "mysql2";
|
97
|
-
dbCredentials: {
|
98
|
-
type: "url";
|
99
|
-
connectionString: string;
|
100
|
-
};
|
101
|
-
}, {
|
102
|
-
driver: "mysql2";
|
103
|
-
dbCredentials: {
|
104
|
-
type?: "url" | undefined;
|
105
|
-
connectionString: string;
|
106
|
-
};
|
107
|
-
}>]>;
|
107
|
+
}>;
|
108
108
|
export declare const mysqlConfigIntrospectSchema: import("zod").ZodIntersection<import("zod").ZodObject<{
|
109
109
|
schema: import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodString, import("zod").ZodArray<import("zod").ZodString, "many">]>>;
|
110
110
|
out: import("zod").ZodDefault<import("zod").ZodOptional<import("zod").ZodString>>;
|
@@ -136,75 +136,56 @@ export declare const mysqlConfigIntrospectSchema: import("zod").ZodIntersection<
|
|
136
136
|
introspect?: {
|
137
137
|
casing?: "camel" | "preserve" | undefined;
|
138
138
|
} | undefined;
|
139
|
-
}>, import("zod").
|
139
|
+
}>, import("zod").ZodObject<{
|
140
140
|
driver: import("zod").ZodLiteral<"mysql2">;
|
141
|
-
dbCredentials: import("zod").ZodObject<{
|
141
|
+
dbCredentials: import("zod").ZodUnion<[import("zod").ZodObject<{
|
142
142
|
host: import("zod").ZodString;
|
143
143
|
port: import("zod").ZodOptional<import("zod").ZodNumber>;
|
144
144
|
user: import("zod").ZodDefault<import("zod").ZodString>;
|
145
145
|
password: import("zod").ZodOptional<import("zod").ZodString>;
|
146
146
|
database: import("zod").ZodString;
|
147
|
-
type: import("zod").ZodDefault<import("zod").ZodLiteral<"params">>;
|
148
147
|
}, "strip", import("zod").ZodTypeAny, {
|
149
148
|
port?: number | undefined;
|
150
149
|
password?: string | undefined;
|
151
|
-
type: "params";
|
152
150
|
host: string;
|
153
151
|
user: string;
|
154
152
|
database: string;
|
155
153
|
}, {
|
156
|
-
type?: "params" | undefined;
|
157
154
|
port?: number | undefined;
|
158
155
|
user?: string | undefined;
|
159
156
|
password?: string | undefined;
|
160
157
|
host: string;
|
161
158
|
database: string;
|
162
|
-
}
|
159
|
+
}>, import("zod").ZodObject<{
|
160
|
+
uri: import("zod").ZodString;
|
161
|
+
}, "strip", import("zod").ZodTypeAny, {
|
162
|
+
uri: string;
|
163
|
+
}, {
|
164
|
+
uri: string;
|
165
|
+
}>]>;
|
163
166
|
}, "strip", import("zod").ZodTypeAny, {
|
164
167
|
driver: "mysql2";
|
165
168
|
dbCredentials: {
|
166
169
|
port?: number | undefined;
|
167
170
|
password?: string | undefined;
|
168
|
-
type: "params";
|
169
171
|
host: string;
|
170
172
|
user: string;
|
171
173
|
database: string;
|
174
|
+
} | {
|
175
|
+
uri: string;
|
172
176
|
};
|
173
177
|
}, {
|
174
178
|
driver: "mysql2";
|
175
179
|
dbCredentials: {
|
176
|
-
type?: "params" | undefined;
|
177
180
|
port?: number | undefined;
|
178
181
|
user?: string | undefined;
|
179
182
|
password?: string | undefined;
|
180
183
|
host: string;
|
181
184
|
database: string;
|
185
|
+
} | {
|
186
|
+
uri: string;
|
182
187
|
};
|
183
|
-
}
|
184
|
-
driver: import("zod").ZodLiteral<"mysql2">;
|
185
|
-
dbCredentials: import("zod").ZodObject<{
|
186
|
-
connectionString: import("zod").ZodString;
|
187
|
-
type: import("zod").ZodDefault<import("zod").ZodLiteral<"url">>;
|
188
|
-
}, "strip", import("zod").ZodTypeAny, {
|
189
|
-
type: "url";
|
190
|
-
connectionString: string;
|
191
|
-
}, {
|
192
|
-
type?: "url" | undefined;
|
193
|
-
connectionString: string;
|
194
|
-
}>;
|
195
|
-
}, "strip", import("zod").ZodTypeAny, {
|
196
|
-
driver: "mysql2";
|
197
|
-
dbCredentials: {
|
198
|
-
type: "url";
|
199
|
-
connectionString: string;
|
200
|
-
};
|
201
|
-
}, {
|
202
|
-
driver: "mysql2";
|
203
|
-
dbCredentials: {
|
204
|
-
type?: "url" | undefined;
|
205
|
-
connectionString: string;
|
206
|
-
};
|
207
|
-
}>]>>;
|
188
|
+
}>>;
|
208
189
|
export declare const mysqlCliIntrospectParams: import("zod").ZodIntersection<import("zod").ZodObject<{
|
209
190
|
schema: import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodString, import("zod").ZodArray<import("zod").ZodString, "many">]>>;
|
210
191
|
out: import("zod").ZodDefault<import("zod").ZodOptional<import("zod").ZodString>>;
|
@@ -233,17 +214,14 @@ export declare const mysqlCliIntrospectParams: import("zod").ZodIntersection<imp
|
|
233
214
|
user: import("zod").ZodDefault<import("zod").ZodString>;
|
234
215
|
password: import("zod").ZodOptional<import("zod").ZodString>;
|
235
216
|
database: import("zod").ZodString;
|
236
|
-
type: import("zod").ZodDefault<import("zod").ZodLiteral<"params">>;
|
237
217
|
}, "strip", import("zod").ZodTypeAny, {
|
238
218
|
port?: number | undefined;
|
239
219
|
password?: string | undefined;
|
240
|
-
type: "params";
|
241
220
|
host: string;
|
242
221
|
user: string;
|
243
222
|
database: string;
|
244
223
|
driver: "mysql2";
|
245
224
|
}, {
|
246
|
-
type?: "params" | undefined;
|
247
225
|
port?: number | undefined;
|
248
226
|
user?: string | undefined;
|
249
227
|
password?: string | undefined;
|
@@ -252,16 +230,13 @@ export declare const mysqlCliIntrospectParams: import("zod").ZodIntersection<imp
|
|
252
230
|
driver: "mysql2";
|
253
231
|
}>, import("zod").ZodObject<{
|
254
232
|
driver: import("zod").ZodLiteral<"mysql2">;
|
255
|
-
|
256
|
-
type: import("zod").ZodDefault<import("zod").ZodLiteral<"url">>;
|
233
|
+
uri: import("zod").ZodString;
|
257
234
|
}, "strip", import("zod").ZodTypeAny, {
|
258
|
-
type: "url";
|
259
|
-
connectionString: string;
|
260
235
|
driver: "mysql2";
|
236
|
+
uri: string;
|
261
237
|
}, {
|
262
|
-
type?: "url" | undefined;
|
263
|
-
connectionString: string;
|
264
238
|
driver: "mysql2";
|
239
|
+
uri: string;
|
265
240
|
}>]>>;
|
266
241
|
export declare const mysqlCliPushParams: import("zod").ZodIntersection<import("zod").ZodObject<{
|
267
242
|
schema: import("zod").ZodUnion<[import("zod").ZodString, import("zod").ZodArray<import("zod").ZodString, "many">]>;
|
@@ -288,17 +263,14 @@ export declare const mysqlCliPushParams: import("zod").ZodIntersection<import("z
|
|
288
263
|
user: import("zod").ZodDefault<import("zod").ZodString>;
|
289
264
|
password: import("zod").ZodOptional<import("zod").ZodString>;
|
290
265
|
database: import("zod").ZodString;
|
291
|
-
type: import("zod").ZodDefault<import("zod").ZodLiteral<"params">>;
|
292
266
|
}, "strip", import("zod").ZodTypeAny, {
|
293
267
|
port?: number | undefined;
|
294
268
|
password?: string | undefined;
|
295
|
-
type: "params";
|
296
269
|
host: string;
|
297
270
|
user: string;
|
298
271
|
database: string;
|
299
272
|
driver: "mysql2";
|
300
273
|
}, {
|
301
|
-
type?: "params" | undefined;
|
302
274
|
port?: number | undefined;
|
303
275
|
user?: string | undefined;
|
304
276
|
password?: string | undefined;
|
@@ -307,16 +279,13 @@ export declare const mysqlCliPushParams: import("zod").ZodIntersection<import("z
|
|
307
279
|
driver: "mysql2";
|
308
280
|
}>, import("zod").ZodObject<{
|
309
281
|
driver: import("zod").ZodLiteral<"mysql2">;
|
310
|
-
|
311
|
-
type: import("zod").ZodDefault<import("zod").ZodLiteral<"url">>;
|
282
|
+
uri: import("zod").ZodString;
|
312
283
|
}, "strip", import("zod").ZodTypeAny, {
|
313
|
-
type: "url";
|
314
|
-
connectionString: string;
|
315
284
|
driver: "mysql2";
|
285
|
+
uri: string;
|
316
286
|
}, {
|
317
|
-
type?: "url" | undefined;
|
318
|
-
connectionString: string;
|
319
287
|
driver: "mysql2";
|
288
|
+
uri: string;
|
320
289
|
}>]>>;
|
321
290
|
export declare const mysqlConfigPushParams: import("zod").ZodIntersection<import("zod").ZodObject<{
|
322
291
|
schema: import("zod").ZodUnion<[import("zod").ZodString, import("zod").ZodArray<import("zod").ZodString, "many">]>;
|
@@ -336,79 +305,61 @@ export declare const mysqlConfigPushParams: import("zod").ZodIntersection<import
|
|
336
305
|
schemaFilter?: string | string[] | undefined;
|
337
306
|
verbose?: boolean | undefined;
|
338
307
|
schema: string | string[];
|
339
|
-
}>, import("zod").
|
308
|
+
}>, import("zod").ZodObject<{
|
340
309
|
driver: import("zod").ZodLiteral<"mysql2">;
|
341
|
-
dbCredentials: import("zod").ZodObject<{
|
310
|
+
dbCredentials: import("zod").ZodUnion<[import("zod").ZodObject<{
|
342
311
|
host: import("zod").ZodString;
|
343
312
|
port: import("zod").ZodOptional<import("zod").ZodNumber>;
|
344
313
|
user: import("zod").ZodDefault<import("zod").ZodString>;
|
345
314
|
password: import("zod").ZodOptional<import("zod").ZodString>;
|
346
315
|
database: import("zod").ZodString;
|
347
|
-
type: import("zod").ZodDefault<import("zod").ZodLiteral<"params">>;
|
348
316
|
}, "strip", import("zod").ZodTypeAny, {
|
349
317
|
port?: number | undefined;
|
350
318
|
password?: string | undefined;
|
351
|
-
type: "params";
|
352
319
|
host: string;
|
353
320
|
user: string;
|
354
321
|
database: string;
|
355
322
|
}, {
|
356
|
-
type?: "params" | undefined;
|
357
323
|
port?: number | undefined;
|
358
324
|
user?: string | undefined;
|
359
325
|
password?: string | undefined;
|
360
326
|
host: string;
|
361
327
|
database: string;
|
362
|
-
}
|
328
|
+
}>, import("zod").ZodObject<{
|
329
|
+
uri: import("zod").ZodString;
|
330
|
+
}, "strip", import("zod").ZodTypeAny, {
|
331
|
+
uri: string;
|
332
|
+
}, {
|
333
|
+
uri: string;
|
334
|
+
}>]>;
|
363
335
|
}, "strip", import("zod").ZodTypeAny, {
|
364
336
|
driver: "mysql2";
|
365
337
|
dbCredentials: {
|
366
338
|
port?: number | undefined;
|
367
339
|
password?: string | undefined;
|
368
|
-
type: "params";
|
369
340
|
host: string;
|
370
341
|
user: string;
|
371
342
|
database: string;
|
343
|
+
} | {
|
344
|
+
uri: string;
|
372
345
|
};
|
373
346
|
}, {
|
374
347
|
driver: "mysql2";
|
375
348
|
dbCredentials: {
|
376
|
-
type?: "params" | undefined;
|
377
349
|
port?: number | undefined;
|
378
350
|
user?: string | undefined;
|
379
351
|
password?: string | undefined;
|
380
352
|
host: string;
|
381
353
|
database: string;
|
354
|
+
} | {
|
355
|
+
uri: string;
|
382
356
|
};
|
383
|
-
}
|
384
|
-
driver: import("zod").ZodLiteral<"mysql2">;
|
385
|
-
dbCredentials: import("zod").ZodObject<{
|
386
|
-
connectionString: import("zod").ZodString;
|
387
|
-
type: import("zod").ZodDefault<import("zod").ZodLiteral<"url">>;
|
388
|
-
}, "strip", import("zod").ZodTypeAny, {
|
389
|
-
type: "url";
|
390
|
-
connectionString: string;
|
391
|
-
}, {
|
392
|
-
type?: "url" | undefined;
|
393
|
-
connectionString: string;
|
394
|
-
}>;
|
395
|
-
}, "strip", import("zod").ZodTypeAny, {
|
396
|
-
driver: "mysql2";
|
397
|
-
dbCredentials: {
|
398
|
-
type: "url";
|
399
|
-
connectionString: string;
|
400
|
-
};
|
401
|
-
}, {
|
402
|
-
driver: "mysql2";
|
403
|
-
dbCredentials: {
|
404
|
-
type?: "url" | undefined;
|
405
|
-
connectionString: string;
|
406
|
-
};
|
407
|
-
}>]>>;
|
357
|
+
}>>;
|
408
358
|
export type MySQLPushConfig = TypeOf<typeof mysqlConfigPushParams>;
|
409
359
|
export type MySQLConfigIntrospect = TypeOf<typeof mysqlConfigIntrospectSchema>;
|
410
360
|
export type MySQLCliIntrospect = TypeOf<typeof mysqlCliIntrospectParams>;
|
411
361
|
export type MySQLConnectionConfig = TypeOf<typeof mysqlConnectionConfig>;
|
362
|
+
export declare const printCliConnectionIssues: (options: any) => void;
|
412
363
|
export declare const printConfigConnectionIssues: (options: any) => void;
|
413
364
|
export declare const validateMySqlIntrospect: (options: Record<string, any>) => Promise<MySQLConfigIntrospect>;
|
414
365
|
export declare const validateMySqlPush: (options: Record<string, unknown>) => Promise<MySQLPushConfig>;
|