drizzle-kit 0.19.14-039355d → 0.20.0-13160ca

Sign up to get free protection for your applications and to get access to all the features.
Files changed (53) 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/pgConnect.d.ts +5 -0
  5. package/cli/commands/pgIntrospect.d.ts +116 -0
  6. package/cli/commands/pgPushUtils.d.ts +14 -0
  7. package/cli/commands/pgUp.d.ts +4 -0
  8. package/cli/commands/sqliteIntrospect.d.ts +102 -0
  9. package/cli/commands/sqliteUtils.d.ts +162 -0
  10. package/cli/commands/upFolders.d.ts +27 -0
  11. package/cli/commands/utils.d.ts +265 -0
  12. package/cli/selector-ui.d.ts +13 -0
  13. package/cli/utils.d.ts +11 -0
  14. package/cli/validations/common.d.ts +13 -0
  15. package/cli/validations/mysql.d.ts +414 -0
  16. package/cli/validations/outputs.d.ts +40 -0
  17. package/cli/validations/pg.d.ts +438 -0
  18. package/cli/validations/sqlite.d.ts +220 -0
  19. package/cli/validations/studio.d.ts +548 -0
  20. package/cli/views.d.ts +61 -0
  21. package/drivers/index.d.ts +25 -0
  22. package/global.d.ts +2 -0
  23. package/index.cjs +26801 -34902
  24. package/index.d.ts +48 -0
  25. package/introspect.d.ts +4 -0
  26. package/jsonDiffer.d.ts +76 -0
  27. package/jsonStatements.d.ts +349 -0
  28. package/migrationPreparator.d.ts +35 -0
  29. package/orm-extenstions/d1-driver/driver.d.ts +8 -0
  30. package/orm-extenstions/d1-driver/session.d.ts +52 -0
  31. package/orm-extenstions/d1-driver/wrangler-client.d.ts +3 -0
  32. package/package.json +5 -4
  33. package/schemaValidator.d.ts +1306 -0
  34. package/serializer/index.d.ts +9 -0
  35. package/serializer/mysqlImports.d.ts +6 -0
  36. package/serializer/mysqlSchema.d.ts +3833 -0
  37. package/serializer/mysqlSerializer.d.ts +7 -0
  38. package/serializer/pgImports.d.ts +11 -0
  39. package/serializer/pgSchema.d.ts +4244 -0
  40. package/serializer/pgSerializer.d.ts +9 -0
  41. package/serializer/sqliteImports.d.ts +5 -0
  42. package/serializer/sqliteSchema.d.ts +3227 -0
  43. package/serializer/sqliteSerializer.d.ts +8 -0
  44. package/serializer/studioUtils.d.ts +39 -0
  45. package/snapshotsDiffer.d.ts +2660 -0
  46. package/sqlgenerator.d.ts +33 -0
  47. package/sqlite-introspect.d.ts +5 -0
  48. package/utils/words.d.ts +7 -0
  49. package/utils-studio.d.ts +5 -0
  50. package/utils-studio.js +3367 -0
  51. package/utils.d.ts +212 -0
  52. package/utils.js +52487 -11748
  53. package/loader.mjs +0 -57
@@ -0,0 +1,414 @@
1
+ import { TypeOf } from "zod";
2
+ export declare const mysqlConnectionCli: import("zod").ZodUnion<[import("zod").ZodObject<{
3
+ driver: import("zod").ZodLiteral<"mysql2">;
4
+ host: import("zod").ZodString;
5
+ port: import("zod").ZodOptional<import("zod").ZodNumber>;
6
+ user: import("zod").ZodDefault<import("zod").ZodString>;
7
+ password: import("zod").ZodOptional<import("zod").ZodString>;
8
+ database: import("zod").ZodString;
9
+ type: import("zod").ZodDefault<import("zod").ZodLiteral<"params">>;
10
+ }, "strip", import("zod").ZodTypeAny, {
11
+ port?: number | undefined;
12
+ password?: string | undefined;
13
+ type: "params";
14
+ host: string;
15
+ user: string;
16
+ database: string;
17
+ driver: "mysql2";
18
+ }, {
19
+ type?: "params" | undefined;
20
+ port?: number | undefined;
21
+ user?: string | undefined;
22
+ password?: string | undefined;
23
+ host: string;
24
+ database: string;
25
+ driver: "mysql2";
26
+ }>, import("zod").ZodObject<{
27
+ driver: import("zod").ZodLiteral<"mysql2">;
28
+ connectionString: import("zod").ZodString;
29
+ type: import("zod").ZodDefault<import("zod").ZodLiteral<"url">>;
30
+ }, "strip", import("zod").ZodTypeAny, {
31
+ type: "url";
32
+ connectionString: string;
33
+ driver: "mysql2";
34
+ }, {
35
+ type?: "url" | undefined;
36
+ connectionString: string;
37
+ driver: "mysql2";
38
+ }>]>;
39
+ export declare const mysqlConnectionConfig: import("zod").ZodUnion<[import("zod").ZodObject<{
40
+ driver: import("zod").ZodLiteral<"mysql2">;
41
+ dbCredentials: import("zod").ZodObject<{
42
+ host: import("zod").ZodString;
43
+ port: import("zod").ZodOptional<import("zod").ZodNumber>;
44
+ user: import("zod").ZodDefault<import("zod").ZodString>;
45
+ password: import("zod").ZodOptional<import("zod").ZodString>;
46
+ database: import("zod").ZodString;
47
+ type: import("zod").ZodDefault<import("zod").ZodLiteral<"params">>;
48
+ }, "strip", import("zod").ZodTypeAny, {
49
+ port?: number | undefined;
50
+ password?: string | undefined;
51
+ type: "params";
52
+ host: string;
53
+ user: string;
54
+ database: string;
55
+ }, {
56
+ type?: "params" | undefined;
57
+ port?: number | undefined;
58
+ user?: string | undefined;
59
+ password?: string | undefined;
60
+ host: string;
61
+ database: string;
62
+ }>;
63
+ }, "strip", import("zod").ZodTypeAny, {
64
+ driver: "mysql2";
65
+ dbCredentials: {
66
+ port?: number | undefined;
67
+ password?: string | undefined;
68
+ type: "params";
69
+ host: string;
70
+ user: string;
71
+ database: string;
72
+ };
73
+ }, {
74
+ driver: "mysql2";
75
+ dbCredentials: {
76
+ type?: "params" | undefined;
77
+ port?: number | undefined;
78
+ user?: string | undefined;
79
+ password?: string | undefined;
80
+ host: string;
81
+ database: string;
82
+ };
83
+ }>, import("zod").ZodObject<{
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
+ }>]>;
108
+ export declare const mysqlConfigIntrospectSchema: import("zod").ZodIntersection<import("zod").ZodObject<{
109
+ schema: import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodString, import("zod").ZodArray<import("zod").ZodString, "many">]>>;
110
+ out: import("zod").ZodDefault<import("zod").ZodOptional<import("zod").ZodString>>;
111
+ breakpoints: import("zod").ZodDefault<import("zod").ZodBoolean>;
112
+ tablesFilter: import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodString, import("zod").ZodArray<import("zod").ZodString, "many">]>>;
113
+ schemaFilter: import("zod").ZodDefault<import("zod").ZodUnion<[import("zod").ZodString, import("zod").ZodArray<import("zod").ZodString, "many">]>>;
114
+ introspect: import("zod").ZodDefault<import("zod").ZodObject<{
115
+ casing: import("zod").ZodDefault<import("zod").ZodUnion<[import("zod").ZodLiteral<"camel">, import("zod").ZodLiteral<"preserve">]>>;
116
+ }, "strip", import("zod").ZodTypeAny, {
117
+ casing: "camel" | "preserve";
118
+ }, {
119
+ casing?: "camel" | "preserve" | undefined;
120
+ }>>;
121
+ }, "strip", import("zod").ZodTypeAny, {
122
+ schema?: string | string[] | undefined;
123
+ tablesFilter?: string | string[] | undefined;
124
+ out: string;
125
+ breakpoints: boolean;
126
+ schemaFilter: string | string[];
127
+ introspect: {
128
+ casing: "camel" | "preserve";
129
+ };
130
+ }, {
131
+ schema?: string | string[] | undefined;
132
+ out?: string | undefined;
133
+ breakpoints?: boolean | undefined;
134
+ tablesFilter?: string | string[] | undefined;
135
+ schemaFilter?: string | string[] | undefined;
136
+ introspect?: {
137
+ casing?: "camel" | "preserve" | undefined;
138
+ } | undefined;
139
+ }>, import("zod").ZodUnion<[import("zod").ZodObject<{
140
+ driver: import("zod").ZodLiteral<"mysql2">;
141
+ dbCredentials: import("zod").ZodObject<{
142
+ host: import("zod").ZodString;
143
+ port: import("zod").ZodOptional<import("zod").ZodNumber>;
144
+ user: import("zod").ZodDefault<import("zod").ZodString>;
145
+ password: import("zod").ZodOptional<import("zod").ZodString>;
146
+ database: import("zod").ZodString;
147
+ type: import("zod").ZodDefault<import("zod").ZodLiteral<"params">>;
148
+ }, "strip", import("zod").ZodTypeAny, {
149
+ port?: number | undefined;
150
+ password?: string | undefined;
151
+ type: "params";
152
+ host: string;
153
+ user: string;
154
+ database: string;
155
+ }, {
156
+ type?: "params" | undefined;
157
+ port?: number | undefined;
158
+ user?: string | undefined;
159
+ password?: string | undefined;
160
+ host: string;
161
+ database: string;
162
+ }>;
163
+ }, "strip", import("zod").ZodTypeAny, {
164
+ driver: "mysql2";
165
+ dbCredentials: {
166
+ port?: number | undefined;
167
+ password?: string | undefined;
168
+ type: "params";
169
+ host: string;
170
+ user: string;
171
+ database: string;
172
+ };
173
+ }, {
174
+ driver: "mysql2";
175
+ dbCredentials: {
176
+ type?: "params" | undefined;
177
+ port?: number | undefined;
178
+ user?: string | undefined;
179
+ password?: string | undefined;
180
+ host: string;
181
+ database: string;
182
+ };
183
+ }>, import("zod").ZodObject<{
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
+ }>]>>;
208
+ export declare const mysqlCliIntrospectParams: import("zod").ZodIntersection<import("zod").ZodObject<{
209
+ schema: import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodString, import("zod").ZodArray<import("zod").ZodString, "many">]>>;
210
+ out: import("zod").ZodDefault<import("zod").ZodOptional<import("zod").ZodString>>;
211
+ breakpoints: import("zod").ZodDefault<import("zod").ZodBoolean>;
212
+ tablesFilter: import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodString, import("zod").ZodArray<import("zod").ZodString, "many">]>>;
213
+ schemaFilter: import("zod").ZodDefault<import("zod").ZodUnion<[import("zod").ZodString, import("zod").ZodArray<import("zod").ZodString, "many">]>>;
214
+ introspectCasing: import("zod").ZodDefault<import("zod").ZodUnion<[import("zod").ZodLiteral<"camel">, import("zod").ZodLiteral<"preserve">]>>;
215
+ }, "strip", import("zod").ZodTypeAny, {
216
+ schema?: string | string[] | undefined;
217
+ tablesFilter?: string | string[] | undefined;
218
+ out: string;
219
+ breakpoints: boolean;
220
+ schemaFilter: string | string[];
221
+ introspectCasing: "camel" | "preserve";
222
+ }, {
223
+ schema?: string | string[] | undefined;
224
+ out?: string | undefined;
225
+ breakpoints?: boolean | undefined;
226
+ tablesFilter?: string | string[] | undefined;
227
+ schemaFilter?: string | string[] | undefined;
228
+ introspectCasing?: "camel" | "preserve" | undefined;
229
+ }>, import("zod").ZodUnion<[import("zod").ZodObject<{
230
+ driver: import("zod").ZodLiteral<"mysql2">;
231
+ host: import("zod").ZodString;
232
+ port: import("zod").ZodOptional<import("zod").ZodNumber>;
233
+ user: import("zod").ZodDefault<import("zod").ZodString>;
234
+ password: import("zod").ZodOptional<import("zod").ZodString>;
235
+ database: import("zod").ZodString;
236
+ type: import("zod").ZodDefault<import("zod").ZodLiteral<"params">>;
237
+ }, "strip", import("zod").ZodTypeAny, {
238
+ port?: number | undefined;
239
+ password?: string | undefined;
240
+ type: "params";
241
+ host: string;
242
+ user: string;
243
+ database: string;
244
+ driver: "mysql2";
245
+ }, {
246
+ type?: "params" | undefined;
247
+ port?: number | undefined;
248
+ user?: string | undefined;
249
+ password?: string | undefined;
250
+ host: string;
251
+ database: string;
252
+ driver: "mysql2";
253
+ }>, import("zod").ZodObject<{
254
+ driver: import("zod").ZodLiteral<"mysql2">;
255
+ connectionString: import("zod").ZodString;
256
+ type: import("zod").ZodDefault<import("zod").ZodLiteral<"url">>;
257
+ }, "strip", import("zod").ZodTypeAny, {
258
+ type: "url";
259
+ connectionString: string;
260
+ driver: "mysql2";
261
+ }, {
262
+ type?: "url" | undefined;
263
+ connectionString: string;
264
+ driver: "mysql2";
265
+ }>]>>;
266
+ export declare const mysqlCliPushParams: import("zod").ZodIntersection<import("zod").ZodObject<{
267
+ schema: import("zod").ZodUnion<[import("zod").ZodString, import("zod").ZodArray<import("zod").ZodString, "many">]>;
268
+ tablesFilter: import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodString, import("zod").ZodArray<import("zod").ZodString, "many">]>>;
269
+ schemaFilter: import("zod").ZodDefault<import("zod").ZodUnion<[import("zod").ZodString, import("zod").ZodArray<import("zod").ZodString, "many">]>>;
270
+ verbose: import("zod").ZodDefault<import("zod").ZodBoolean>;
271
+ strict: import("zod").ZodDefault<import("zod").ZodBoolean>;
272
+ }, "strip", import("zod").ZodTypeAny, {
273
+ tablesFilter?: string | string[] | undefined;
274
+ strict: boolean;
275
+ schema: string | string[];
276
+ schemaFilter: string | string[];
277
+ verbose: boolean;
278
+ }, {
279
+ strict?: boolean | undefined;
280
+ tablesFilter?: string | string[] | undefined;
281
+ schemaFilter?: string | string[] | undefined;
282
+ verbose?: boolean | undefined;
283
+ schema: string | string[];
284
+ }>, import("zod").ZodUnion<[import("zod").ZodObject<{
285
+ driver: import("zod").ZodLiteral<"mysql2">;
286
+ host: import("zod").ZodString;
287
+ port: import("zod").ZodOptional<import("zod").ZodNumber>;
288
+ user: import("zod").ZodDefault<import("zod").ZodString>;
289
+ password: import("zod").ZodOptional<import("zod").ZodString>;
290
+ database: import("zod").ZodString;
291
+ type: import("zod").ZodDefault<import("zod").ZodLiteral<"params">>;
292
+ }, "strip", import("zod").ZodTypeAny, {
293
+ port?: number | undefined;
294
+ password?: string | undefined;
295
+ type: "params";
296
+ host: string;
297
+ user: string;
298
+ database: string;
299
+ driver: "mysql2";
300
+ }, {
301
+ type?: "params" | undefined;
302
+ port?: number | undefined;
303
+ user?: string | undefined;
304
+ password?: string | undefined;
305
+ host: string;
306
+ database: string;
307
+ driver: "mysql2";
308
+ }>, import("zod").ZodObject<{
309
+ driver: import("zod").ZodLiteral<"mysql2">;
310
+ connectionString: import("zod").ZodString;
311
+ type: import("zod").ZodDefault<import("zod").ZodLiteral<"url">>;
312
+ }, "strip", import("zod").ZodTypeAny, {
313
+ type: "url";
314
+ connectionString: string;
315
+ driver: "mysql2";
316
+ }, {
317
+ type?: "url" | undefined;
318
+ connectionString: string;
319
+ driver: "mysql2";
320
+ }>]>>;
321
+ export declare const mysqlConfigPushParams: import("zod").ZodIntersection<import("zod").ZodObject<{
322
+ schema: import("zod").ZodUnion<[import("zod").ZodString, import("zod").ZodArray<import("zod").ZodString, "many">]>;
323
+ tablesFilter: import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodString, import("zod").ZodArray<import("zod").ZodString, "many">]>>;
324
+ schemaFilter: import("zod").ZodDefault<import("zod").ZodUnion<[import("zod").ZodString, import("zod").ZodArray<import("zod").ZodString, "many">]>>;
325
+ verbose: import("zod").ZodDefault<import("zod").ZodBoolean>;
326
+ strict: import("zod").ZodDefault<import("zod").ZodBoolean>;
327
+ }, "strip", import("zod").ZodTypeAny, {
328
+ tablesFilter?: string | string[] | undefined;
329
+ strict: boolean;
330
+ schema: string | string[];
331
+ schemaFilter: string | string[];
332
+ verbose: boolean;
333
+ }, {
334
+ strict?: boolean | undefined;
335
+ tablesFilter?: string | string[] | undefined;
336
+ schemaFilter?: string | string[] | undefined;
337
+ verbose?: boolean | undefined;
338
+ schema: string | string[];
339
+ }>, import("zod").ZodUnion<[import("zod").ZodObject<{
340
+ driver: import("zod").ZodLiteral<"mysql2">;
341
+ dbCredentials: import("zod").ZodObject<{
342
+ host: import("zod").ZodString;
343
+ port: import("zod").ZodOptional<import("zod").ZodNumber>;
344
+ user: import("zod").ZodDefault<import("zod").ZodString>;
345
+ password: import("zod").ZodOptional<import("zod").ZodString>;
346
+ database: import("zod").ZodString;
347
+ type: import("zod").ZodDefault<import("zod").ZodLiteral<"params">>;
348
+ }, "strip", import("zod").ZodTypeAny, {
349
+ port?: number | undefined;
350
+ password?: string | undefined;
351
+ type: "params";
352
+ host: string;
353
+ user: string;
354
+ database: string;
355
+ }, {
356
+ type?: "params" | undefined;
357
+ port?: number | undefined;
358
+ user?: string | undefined;
359
+ password?: string | undefined;
360
+ host: string;
361
+ database: string;
362
+ }>;
363
+ }, "strip", import("zod").ZodTypeAny, {
364
+ driver: "mysql2";
365
+ dbCredentials: {
366
+ port?: number | undefined;
367
+ password?: string | undefined;
368
+ type: "params";
369
+ host: string;
370
+ user: string;
371
+ database: string;
372
+ };
373
+ }, {
374
+ driver: "mysql2";
375
+ dbCredentials: {
376
+ type?: "params" | undefined;
377
+ port?: number | undefined;
378
+ user?: string | undefined;
379
+ password?: string | undefined;
380
+ host: string;
381
+ database: string;
382
+ };
383
+ }>, import("zod").ZodObject<{
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
+ }>]>>;
408
+ export type MySQLPushConfig = TypeOf<typeof mysqlConfigPushParams>;
409
+ export type MySQLConfigIntrospect = TypeOf<typeof mysqlConfigIntrospectSchema>;
410
+ export type MySQLCliIntrospect = TypeOf<typeof mysqlCliIntrospectParams>;
411
+ export type MySQLConnectionConfig = TypeOf<typeof mysqlConnectionConfig>;
412
+ export declare const printConfigConnectionIssues: (options: any) => void;
413
+ export declare const validateMySqlIntrospect: (options: Record<string, any>) => Promise<MySQLConfigIntrospect>;
414
+ export declare const validateMySqlPush: (options: Record<string, unknown>) => Promise<MySQLPushConfig>;
@@ -0,0 +1,40 @@
1
+ export declare const withStyle: {
2
+ error: (str: string) => string;
3
+ warning: (str: string) => string;
4
+ errorWarning: (str: string) => string;
5
+ fullWarning: (str: string) => string;
6
+ suggestion: (str: string) => string;
7
+ };
8
+ export declare const outputs: {
9
+ studio: {
10
+ drivers: (param: string) => string;
11
+ noCredentials: () => string;
12
+ noDriver: () => string;
13
+ };
14
+ common: {
15
+ ambiguousParams: (command: string) => string;
16
+ schema: (command: string) => string;
17
+ schemaConfig: (command: string) => string;
18
+ };
19
+ postgres: {
20
+ connection: {
21
+ driver: () => string;
22
+ required: () => string;
23
+ };
24
+ };
25
+ mysql: {
26
+ connection: {
27
+ driver: () => string;
28
+ required: () => string;
29
+ };
30
+ };
31
+ sqlite: {
32
+ connection: {
33
+ driver: () => string;
34
+ url: (driver: string) => string;
35
+ authToken: (driver: string) => string;
36
+ };
37
+ introspect: {};
38
+ push: {};
39
+ };
40
+ };