drizzle-kit 0.20.18 → 0.21.0-57cc2fe
Sign up to get free protection for your applications and to get access to all the features.
- package/bin.cjs +104693 -56664
- package/index.d.mts +232 -68
- package/index.d.ts +232 -68
- package/index.js +1 -0
- package/package.json +44 -72
- package/payload.d.mts +1052 -18
- package/payload.d.ts +1052 -18
- package/payload.js +22129 -34534
- package/payload.mjs +22174 -34562
- package/utils-studio.js +4580 -805
- package/utils-studio.mjs +4556 -784
- package/utils.js +4410 -6940
- package/utils.mjs +4852 -7382
- package/@types/utils.d.ts +0 -12
- package/cli/commands/migrate.d.ts +0 -270
- package/cli/commands/mysqlIntrospect.d.ts +0 -119
- package/cli/commands/mysqlPushUtils.d.ts +0 -18
- package/cli/commands/mysqlUp.d.ts +0 -4
- package/cli/commands/pgConnect.d.ts +0 -5
- package/cli/commands/pgIntrospect.d.ts +0 -123
- package/cli/commands/pgPushUtils.d.ts +0 -14
- package/cli/commands/pgUp.d.ts +0 -4
- package/cli/commands/sqliteIntrospect.d.ts +0 -107
- package/cli/commands/sqlitePushUtils.d.ts +0 -21
- package/cli/commands/sqliteUtils.d.ts +0 -162
- package/cli/commands/upFolders.d.ts +0 -27
- package/cli/commands/utils.d.ts +0 -274
- package/cli/selector-ui.d.ts +0 -13
- package/cli/validations/common.d.ts +0 -13
- package/cli/validations/mysql.d.ts +0 -365
- package/cli/validations/outputs.d.ts +0 -40
- package/cli/validations/pg.d.ts +0 -438
- package/cli/views.d.ts +0 -61
- package/drivers/index.d.ts +0 -39
- package/global.d.ts +0 -4
- package/introspect-mysql.d.ts +0 -9
- package/introspect-pg.d.ts +0 -12
- package/introspect-sqlite.d.ts +0 -10
- package/jsonDiffer.d.ts +0 -76
- package/jsonStatements.d.ts +0 -349
- package/migrationPreparator.d.ts +0 -35
- package/schemaValidator.d.ts +0 -1313
- package/serializer/index.d.ts +0 -9
- package/serializer/mysqlImports.d.ts +0 -11
- package/serializer/mysqlSchema.d.ts +0 -3833
- package/serializer/mysqlSerializer.d.ts +0 -7
- package/serializer/pgImports.d.ts +0 -11
- package/serializer/pgSchema.d.ts +0 -4333
- package/serializer/pgSerializer.d.ts +0 -7
- package/serializer/schemaToDrizzle.d.ts +0 -7
- package/serializer/sqliteImports.d.ts +0 -9
- package/serializer/sqliteSchema.d.ts +0 -3227
- package/serializer/sqliteSerializer.d.ts +0 -6
- package/snapshotsDiffer.d.ts +0 -2660
- package/sqlgenerator.d.ts +0 -33
- package/utils/words.d.ts +0 -7
- package/utils-studio.d.mts +0 -5
- package/utils-studio.d.ts +0 -5
- package/utils.d.ts +0 -199
package/cli/validations/pg.d.ts
DELETED
@@ -1,438 +0,0 @@
|
|
1
|
-
import { TypeOf } from "zod";
|
2
|
-
export declare const pgConnectionCli: import("zod").ZodUnion<[import("zod").ZodObject<{
|
3
|
-
driver: import("zod").ZodLiteral<"pg">;
|
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
|
-
ssl: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
10
|
-
type: import("zod").ZodDefault<import("zod").ZodLiteral<"params">>;
|
11
|
-
}, "strip", import("zod").ZodTypeAny, {
|
12
|
-
port?: number | undefined;
|
13
|
-
password?: string | undefined;
|
14
|
-
ssl?: boolean | undefined;
|
15
|
-
type: "params";
|
16
|
-
driver: "pg";
|
17
|
-
host: string;
|
18
|
-
user: string;
|
19
|
-
database: string;
|
20
|
-
}, {
|
21
|
-
type?: "params" | undefined;
|
22
|
-
port?: number | undefined;
|
23
|
-
user?: string | undefined;
|
24
|
-
password?: string | undefined;
|
25
|
-
ssl?: boolean | undefined;
|
26
|
-
driver: "pg";
|
27
|
-
host: string;
|
28
|
-
database: string;
|
29
|
-
}>, import("zod").ZodObject<{
|
30
|
-
driver: import("zod").ZodLiteral<"pg">;
|
31
|
-
connectionString: import("zod").ZodString;
|
32
|
-
type: import("zod").ZodDefault<import("zod").ZodLiteral<"url">>;
|
33
|
-
}, "strip", import("zod").ZodTypeAny, {
|
34
|
-
type: "url";
|
35
|
-
driver: "pg";
|
36
|
-
connectionString: string;
|
37
|
-
}, {
|
38
|
-
type?: "url" | undefined;
|
39
|
-
driver: "pg";
|
40
|
-
connectionString: string;
|
41
|
-
}>]>;
|
42
|
-
export declare const pgConnectionConfig: import("zod").ZodUnion<[import("zod").ZodObject<{
|
43
|
-
driver: import("zod").ZodLiteral<"pg">;
|
44
|
-
dbCredentials: import("zod").ZodObject<{
|
45
|
-
host: import("zod").ZodString;
|
46
|
-
port: import("zod").ZodOptional<import("zod").ZodNumber>;
|
47
|
-
user: import("zod").ZodDefault<import("zod").ZodString>;
|
48
|
-
password: import("zod").ZodOptional<import("zod").ZodString>;
|
49
|
-
database: import("zod").ZodString;
|
50
|
-
ssl: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
51
|
-
type: import("zod").ZodOptional<import("zod").ZodDefault<import("zod").ZodLiteral<"params">>>;
|
52
|
-
}, "strip", import("zod").ZodTypeAny, {
|
53
|
-
type?: "params" | undefined;
|
54
|
-
port?: number | undefined;
|
55
|
-
password?: string | undefined;
|
56
|
-
ssl?: boolean | undefined;
|
57
|
-
host: string;
|
58
|
-
user: string;
|
59
|
-
database: string;
|
60
|
-
}, {
|
61
|
-
type?: "params" | undefined;
|
62
|
-
port?: number | undefined;
|
63
|
-
user?: string | undefined;
|
64
|
-
password?: string | undefined;
|
65
|
-
ssl?: boolean | undefined;
|
66
|
-
host: string;
|
67
|
-
database: string;
|
68
|
-
}>;
|
69
|
-
}, "strip", import("zod").ZodTypeAny, {
|
70
|
-
driver: "pg";
|
71
|
-
dbCredentials: {
|
72
|
-
type?: "params" | undefined;
|
73
|
-
port?: number | undefined;
|
74
|
-
password?: string | undefined;
|
75
|
-
ssl?: boolean | undefined;
|
76
|
-
host: string;
|
77
|
-
user: string;
|
78
|
-
database: string;
|
79
|
-
};
|
80
|
-
}, {
|
81
|
-
driver: "pg";
|
82
|
-
dbCredentials: {
|
83
|
-
type?: "params" | undefined;
|
84
|
-
port?: number | undefined;
|
85
|
-
user?: string | undefined;
|
86
|
-
password?: string | undefined;
|
87
|
-
ssl?: boolean | undefined;
|
88
|
-
host: string;
|
89
|
-
database: string;
|
90
|
-
};
|
91
|
-
}>, import("zod").ZodObject<{
|
92
|
-
driver: import("zod").ZodLiteral<"pg">;
|
93
|
-
dbCredentials: import("zod").ZodObject<{
|
94
|
-
connectionString: import("zod").ZodString;
|
95
|
-
type: import("zod").ZodOptional<import("zod").ZodDefault<import("zod").ZodLiteral<"url">>>;
|
96
|
-
}, "strip", import("zod").ZodTypeAny, {
|
97
|
-
type?: "url" | undefined;
|
98
|
-
connectionString: string;
|
99
|
-
}, {
|
100
|
-
type?: "url" | undefined;
|
101
|
-
connectionString: string;
|
102
|
-
}>;
|
103
|
-
}, "strip", import("zod").ZodTypeAny, {
|
104
|
-
driver: "pg";
|
105
|
-
dbCredentials: {
|
106
|
-
type?: "url" | undefined;
|
107
|
-
connectionString: string;
|
108
|
-
};
|
109
|
-
}, {
|
110
|
-
driver: "pg";
|
111
|
-
dbCredentials: {
|
112
|
-
type?: "url" | undefined;
|
113
|
-
connectionString: string;
|
114
|
-
};
|
115
|
-
}>]>;
|
116
|
-
export declare const pgConfigIntrospectSchema: import("zod").ZodIntersection<import("zod").ZodObject<{
|
117
|
-
schema: import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodString, import("zod").ZodArray<import("zod").ZodString, "many">]>>;
|
118
|
-
out: import("zod").ZodDefault<import("zod").ZodOptional<import("zod").ZodString>>;
|
119
|
-
breakpoints: import("zod").ZodDefault<import("zod").ZodBoolean>;
|
120
|
-
tablesFilter: import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodString, import("zod").ZodArray<import("zod").ZodString, "many">]>>;
|
121
|
-
schemaFilter: import("zod").ZodDefault<import("zod").ZodUnion<[import("zod").ZodString, import("zod").ZodArray<import("zod").ZodString, "many">]>>;
|
122
|
-
introspect: import("zod").ZodDefault<import("zod").ZodObject<{
|
123
|
-
casing: import("zod").ZodDefault<import("zod").ZodUnion<[import("zod").ZodLiteral<"camel">, import("zod").ZodLiteral<"preserve">]>>;
|
124
|
-
}, "strip", import("zod").ZodTypeAny, {
|
125
|
-
casing: "camel" | "preserve";
|
126
|
-
}, {
|
127
|
-
casing?: "camel" | "preserve" | undefined;
|
128
|
-
}>>;
|
129
|
-
}, "strip", import("zod").ZodTypeAny, {
|
130
|
-
schema?: string | string[] | undefined;
|
131
|
-
tablesFilter?: string | string[] | undefined;
|
132
|
-
out: string;
|
133
|
-
breakpoints: boolean;
|
134
|
-
schemaFilter: string | string[];
|
135
|
-
introspect: {
|
136
|
-
casing: "camel" | "preserve";
|
137
|
-
};
|
138
|
-
}, {
|
139
|
-
schema?: string | string[] | undefined;
|
140
|
-
out?: string | undefined;
|
141
|
-
breakpoints?: boolean | undefined;
|
142
|
-
tablesFilter?: string | string[] | undefined;
|
143
|
-
schemaFilter?: string | string[] | undefined;
|
144
|
-
introspect?: {
|
145
|
-
casing?: "camel" | "preserve" | undefined;
|
146
|
-
} | undefined;
|
147
|
-
}>, import("zod").ZodUnion<[import("zod").ZodObject<{
|
148
|
-
driver: import("zod").ZodLiteral<"pg">;
|
149
|
-
dbCredentials: import("zod").ZodObject<{
|
150
|
-
host: import("zod").ZodString;
|
151
|
-
port: import("zod").ZodOptional<import("zod").ZodNumber>;
|
152
|
-
user: import("zod").ZodDefault<import("zod").ZodString>;
|
153
|
-
password: import("zod").ZodOptional<import("zod").ZodString>;
|
154
|
-
database: import("zod").ZodString;
|
155
|
-
ssl: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
156
|
-
type: import("zod").ZodOptional<import("zod").ZodDefault<import("zod").ZodLiteral<"params">>>;
|
157
|
-
}, "strip", import("zod").ZodTypeAny, {
|
158
|
-
type?: "params" | undefined;
|
159
|
-
port?: number | undefined;
|
160
|
-
password?: string | undefined;
|
161
|
-
ssl?: boolean | undefined;
|
162
|
-
host: string;
|
163
|
-
user: string;
|
164
|
-
database: string;
|
165
|
-
}, {
|
166
|
-
type?: "params" | undefined;
|
167
|
-
port?: number | undefined;
|
168
|
-
user?: string | undefined;
|
169
|
-
password?: string | undefined;
|
170
|
-
ssl?: boolean | undefined;
|
171
|
-
host: string;
|
172
|
-
database: string;
|
173
|
-
}>;
|
174
|
-
}, "strip", import("zod").ZodTypeAny, {
|
175
|
-
driver: "pg";
|
176
|
-
dbCredentials: {
|
177
|
-
type?: "params" | undefined;
|
178
|
-
port?: number | undefined;
|
179
|
-
password?: string | undefined;
|
180
|
-
ssl?: boolean | undefined;
|
181
|
-
host: string;
|
182
|
-
user: string;
|
183
|
-
database: string;
|
184
|
-
};
|
185
|
-
}, {
|
186
|
-
driver: "pg";
|
187
|
-
dbCredentials: {
|
188
|
-
type?: "params" | undefined;
|
189
|
-
port?: number | undefined;
|
190
|
-
user?: string | undefined;
|
191
|
-
password?: string | undefined;
|
192
|
-
ssl?: boolean | undefined;
|
193
|
-
host: string;
|
194
|
-
database: string;
|
195
|
-
};
|
196
|
-
}>, import("zod").ZodObject<{
|
197
|
-
driver: import("zod").ZodLiteral<"pg">;
|
198
|
-
dbCredentials: import("zod").ZodObject<{
|
199
|
-
connectionString: import("zod").ZodString;
|
200
|
-
type: import("zod").ZodOptional<import("zod").ZodDefault<import("zod").ZodLiteral<"url">>>;
|
201
|
-
}, "strip", import("zod").ZodTypeAny, {
|
202
|
-
type?: "url" | undefined;
|
203
|
-
connectionString: string;
|
204
|
-
}, {
|
205
|
-
type?: "url" | undefined;
|
206
|
-
connectionString: string;
|
207
|
-
}>;
|
208
|
-
}, "strip", import("zod").ZodTypeAny, {
|
209
|
-
driver: "pg";
|
210
|
-
dbCredentials: {
|
211
|
-
type?: "url" | undefined;
|
212
|
-
connectionString: string;
|
213
|
-
};
|
214
|
-
}, {
|
215
|
-
driver: "pg";
|
216
|
-
dbCredentials: {
|
217
|
-
type?: "url" | undefined;
|
218
|
-
connectionString: string;
|
219
|
-
};
|
220
|
-
}>]>>;
|
221
|
-
export declare const pgCliIntrospectParams: import("zod").ZodIntersection<import("zod").ZodObject<{
|
222
|
-
schema: import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodString, import("zod").ZodArray<import("zod").ZodString, "many">]>>;
|
223
|
-
out: import("zod").ZodDefault<import("zod").ZodOptional<import("zod").ZodString>>;
|
224
|
-
breakpoints: import("zod").ZodDefault<import("zod").ZodBoolean>;
|
225
|
-
tablesFilter: import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodString, import("zod").ZodArray<import("zod").ZodString, "many">]>>;
|
226
|
-
schemaFilter: import("zod").ZodDefault<import("zod").ZodUnion<[import("zod").ZodString, import("zod").ZodArray<import("zod").ZodString, "many">]>>;
|
227
|
-
introspectCasing: import("zod").ZodDefault<import("zod").ZodUnion<[import("zod").ZodLiteral<"camel">, import("zod").ZodLiteral<"preserve">]>>;
|
228
|
-
}, "strip", import("zod").ZodTypeAny, {
|
229
|
-
schema?: string | string[] | undefined;
|
230
|
-
tablesFilter?: string | string[] | undefined;
|
231
|
-
out: string;
|
232
|
-
breakpoints: boolean;
|
233
|
-
schemaFilter: string | string[];
|
234
|
-
introspectCasing: "camel" | "preserve";
|
235
|
-
}, {
|
236
|
-
schema?: string | string[] | undefined;
|
237
|
-
out?: string | undefined;
|
238
|
-
breakpoints?: boolean | undefined;
|
239
|
-
tablesFilter?: string | string[] | undefined;
|
240
|
-
schemaFilter?: string | string[] | undefined;
|
241
|
-
introspectCasing?: "camel" | "preserve" | undefined;
|
242
|
-
}>, import("zod").ZodUnion<[import("zod").ZodObject<{
|
243
|
-
driver: import("zod").ZodLiteral<"pg">;
|
244
|
-
host: import("zod").ZodString;
|
245
|
-
port: import("zod").ZodOptional<import("zod").ZodNumber>;
|
246
|
-
user: import("zod").ZodDefault<import("zod").ZodString>;
|
247
|
-
password: import("zod").ZodOptional<import("zod").ZodString>;
|
248
|
-
database: import("zod").ZodString;
|
249
|
-
ssl: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
250
|
-
type: import("zod").ZodDefault<import("zod").ZodLiteral<"params">>;
|
251
|
-
}, "strip", import("zod").ZodTypeAny, {
|
252
|
-
port?: number | undefined;
|
253
|
-
password?: string | undefined;
|
254
|
-
ssl?: boolean | undefined;
|
255
|
-
type: "params";
|
256
|
-
driver: "pg";
|
257
|
-
host: string;
|
258
|
-
user: string;
|
259
|
-
database: string;
|
260
|
-
}, {
|
261
|
-
type?: "params" | undefined;
|
262
|
-
port?: number | undefined;
|
263
|
-
user?: string | undefined;
|
264
|
-
password?: string | undefined;
|
265
|
-
ssl?: boolean | undefined;
|
266
|
-
driver: "pg";
|
267
|
-
host: string;
|
268
|
-
database: string;
|
269
|
-
}>, import("zod").ZodObject<{
|
270
|
-
driver: import("zod").ZodLiteral<"pg">;
|
271
|
-
connectionString: import("zod").ZodString;
|
272
|
-
type: import("zod").ZodDefault<import("zod").ZodLiteral<"url">>;
|
273
|
-
}, "strip", import("zod").ZodTypeAny, {
|
274
|
-
type: "url";
|
275
|
-
driver: "pg";
|
276
|
-
connectionString: string;
|
277
|
-
}, {
|
278
|
-
type?: "url" | undefined;
|
279
|
-
driver: "pg";
|
280
|
-
connectionString: string;
|
281
|
-
}>]>>;
|
282
|
-
export declare const pgCliPushParams: import("zod").ZodIntersection<import("zod").ZodObject<{
|
283
|
-
schema: import("zod").ZodUnion<[import("zod").ZodString, import("zod").ZodArray<import("zod").ZodString, "many">]>;
|
284
|
-
tablesFilter: import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodString, import("zod").ZodArray<import("zod").ZodString, "many">]>>;
|
285
|
-
schemaFilter: import("zod").ZodDefault<import("zod").ZodUnion<[import("zod").ZodString, import("zod").ZodArray<import("zod").ZodString, "many">]>>;
|
286
|
-
verbose: import("zod").ZodDefault<import("zod").ZodBoolean>;
|
287
|
-
strict: import("zod").ZodDefault<import("zod").ZodBoolean>;
|
288
|
-
}, "strip", import("zod").ZodTypeAny, {
|
289
|
-
tablesFilter?: string | string[] | undefined;
|
290
|
-
strict: boolean;
|
291
|
-
schema: string | string[];
|
292
|
-
schemaFilter: string | string[];
|
293
|
-
verbose: boolean;
|
294
|
-
}, {
|
295
|
-
strict?: boolean | undefined;
|
296
|
-
tablesFilter?: string | string[] | undefined;
|
297
|
-
schemaFilter?: string | string[] | undefined;
|
298
|
-
verbose?: boolean | undefined;
|
299
|
-
schema: string | string[];
|
300
|
-
}>, import("zod").ZodUnion<[import("zod").ZodObject<{
|
301
|
-
driver: import("zod").ZodLiteral<"pg">;
|
302
|
-
host: import("zod").ZodString;
|
303
|
-
port: import("zod").ZodOptional<import("zod").ZodNumber>;
|
304
|
-
user: import("zod").ZodDefault<import("zod").ZodString>;
|
305
|
-
password: import("zod").ZodOptional<import("zod").ZodString>;
|
306
|
-
database: import("zod").ZodString;
|
307
|
-
ssl: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
308
|
-
type: import("zod").ZodDefault<import("zod").ZodLiteral<"params">>;
|
309
|
-
}, "strip", import("zod").ZodTypeAny, {
|
310
|
-
port?: number | undefined;
|
311
|
-
password?: string | undefined;
|
312
|
-
ssl?: boolean | undefined;
|
313
|
-
type: "params";
|
314
|
-
driver: "pg";
|
315
|
-
host: string;
|
316
|
-
user: string;
|
317
|
-
database: string;
|
318
|
-
}, {
|
319
|
-
type?: "params" | undefined;
|
320
|
-
port?: number | undefined;
|
321
|
-
user?: string | undefined;
|
322
|
-
password?: string | undefined;
|
323
|
-
ssl?: boolean | undefined;
|
324
|
-
driver: "pg";
|
325
|
-
host: string;
|
326
|
-
database: string;
|
327
|
-
}>, import("zod").ZodObject<{
|
328
|
-
driver: import("zod").ZodLiteral<"pg">;
|
329
|
-
connectionString: import("zod").ZodString;
|
330
|
-
type: import("zod").ZodDefault<import("zod").ZodLiteral<"url">>;
|
331
|
-
}, "strip", import("zod").ZodTypeAny, {
|
332
|
-
type: "url";
|
333
|
-
driver: "pg";
|
334
|
-
connectionString: string;
|
335
|
-
}, {
|
336
|
-
type?: "url" | undefined;
|
337
|
-
driver: "pg";
|
338
|
-
connectionString: string;
|
339
|
-
}>]>>;
|
340
|
-
export declare const pgConfigPushParams: import("zod").ZodIntersection<import("zod").ZodObject<{
|
341
|
-
schema: import("zod").ZodUnion<[import("zod").ZodString, import("zod").ZodArray<import("zod").ZodString, "many">]>;
|
342
|
-
tablesFilter: import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodString, import("zod").ZodArray<import("zod").ZodString, "many">]>>;
|
343
|
-
schemaFilter: import("zod").ZodDefault<import("zod").ZodUnion<[import("zod").ZodString, import("zod").ZodArray<import("zod").ZodString, "many">]>>;
|
344
|
-
verbose: import("zod").ZodDefault<import("zod").ZodBoolean>;
|
345
|
-
strict: import("zod").ZodDefault<import("zod").ZodBoolean>;
|
346
|
-
}, "strip", import("zod").ZodTypeAny, {
|
347
|
-
tablesFilter?: string | string[] | undefined;
|
348
|
-
strict: boolean;
|
349
|
-
schema: string | string[];
|
350
|
-
schemaFilter: string | string[];
|
351
|
-
verbose: boolean;
|
352
|
-
}, {
|
353
|
-
strict?: boolean | undefined;
|
354
|
-
tablesFilter?: string | string[] | undefined;
|
355
|
-
schemaFilter?: string | string[] | undefined;
|
356
|
-
verbose?: boolean | undefined;
|
357
|
-
schema: string | string[];
|
358
|
-
}>, import("zod").ZodUnion<[import("zod").ZodObject<{
|
359
|
-
driver: import("zod").ZodLiteral<"pg">;
|
360
|
-
dbCredentials: import("zod").ZodObject<{
|
361
|
-
host: import("zod").ZodString;
|
362
|
-
port: import("zod").ZodOptional<import("zod").ZodNumber>;
|
363
|
-
user: import("zod").ZodDefault<import("zod").ZodString>;
|
364
|
-
password: import("zod").ZodOptional<import("zod").ZodString>;
|
365
|
-
database: import("zod").ZodString;
|
366
|
-
ssl: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
367
|
-
type: import("zod").ZodOptional<import("zod").ZodDefault<import("zod").ZodLiteral<"params">>>;
|
368
|
-
}, "strip", import("zod").ZodTypeAny, {
|
369
|
-
type?: "params" | undefined;
|
370
|
-
port?: number | undefined;
|
371
|
-
password?: string | undefined;
|
372
|
-
ssl?: boolean | undefined;
|
373
|
-
host: string;
|
374
|
-
user: string;
|
375
|
-
database: string;
|
376
|
-
}, {
|
377
|
-
type?: "params" | undefined;
|
378
|
-
port?: number | undefined;
|
379
|
-
user?: string | undefined;
|
380
|
-
password?: string | undefined;
|
381
|
-
ssl?: boolean | undefined;
|
382
|
-
host: string;
|
383
|
-
database: string;
|
384
|
-
}>;
|
385
|
-
}, "strip", import("zod").ZodTypeAny, {
|
386
|
-
driver: "pg";
|
387
|
-
dbCredentials: {
|
388
|
-
type?: "params" | undefined;
|
389
|
-
port?: number | undefined;
|
390
|
-
password?: string | undefined;
|
391
|
-
ssl?: boolean | undefined;
|
392
|
-
host: string;
|
393
|
-
user: string;
|
394
|
-
database: string;
|
395
|
-
};
|
396
|
-
}, {
|
397
|
-
driver: "pg";
|
398
|
-
dbCredentials: {
|
399
|
-
type?: "params" | undefined;
|
400
|
-
port?: number | undefined;
|
401
|
-
user?: string | undefined;
|
402
|
-
password?: string | undefined;
|
403
|
-
ssl?: boolean | undefined;
|
404
|
-
host: string;
|
405
|
-
database: string;
|
406
|
-
};
|
407
|
-
}>, import("zod").ZodObject<{
|
408
|
-
driver: import("zod").ZodLiteral<"pg">;
|
409
|
-
dbCredentials: import("zod").ZodObject<{
|
410
|
-
connectionString: import("zod").ZodString;
|
411
|
-
type: import("zod").ZodOptional<import("zod").ZodDefault<import("zod").ZodLiteral<"url">>>;
|
412
|
-
}, "strip", import("zod").ZodTypeAny, {
|
413
|
-
type?: "url" | undefined;
|
414
|
-
connectionString: string;
|
415
|
-
}, {
|
416
|
-
type?: "url" | undefined;
|
417
|
-
connectionString: string;
|
418
|
-
}>;
|
419
|
-
}, "strip", import("zod").ZodTypeAny, {
|
420
|
-
driver: "pg";
|
421
|
-
dbCredentials: {
|
422
|
-
type?: "url" | undefined;
|
423
|
-
connectionString: string;
|
424
|
-
};
|
425
|
-
}, {
|
426
|
-
driver: "pg";
|
427
|
-
dbCredentials: {
|
428
|
-
type?: "url" | undefined;
|
429
|
-
connectionString: string;
|
430
|
-
};
|
431
|
-
}>]>>;
|
432
|
-
export type PgPushConfig = TypeOf<typeof pgConfigPushParams>;
|
433
|
-
export type PgConfigIntrospect = TypeOf<typeof pgConfigIntrospectSchema>;
|
434
|
-
export type PgCliIntrospect = TypeOf<typeof pgCliIntrospectParams>;
|
435
|
-
export type PgConnectionConfig = TypeOf<typeof pgConnectionConfig>;
|
436
|
-
export declare const printConfigConnectionIssues: (options: any) => void;
|
437
|
-
export declare const validatePgIntrospect: (options: Record<string, any>) => Promise<PgConfigIntrospect>;
|
438
|
-
export declare const validatePgPush: (options: Record<string, unknown>) => Promise<PgPushConfig>;
|
package/cli/views.d.ts
DELETED
@@ -1,61 +0,0 @@
|
|
1
|
-
import { Prompt, TaskView } from "hanji";
|
2
|
-
import type { CommonSchema } from "src/schemaValidator";
|
3
|
-
import type { Named } from "./commands/migrate";
|
4
|
-
export declare const warning: (msg: string) => void;
|
5
|
-
export declare const err: (msg: string) => void;
|
6
|
-
export declare const info: (msg: string, greyMsg?: string) => string;
|
7
|
-
export declare const error: (error: string, greyMsg?: string) => string;
|
8
|
-
export declare const schema: (schema: CommonSchema) => string;
|
9
|
-
export interface RenamePropmtItem<T> {
|
10
|
-
from: T;
|
11
|
-
to: T;
|
12
|
-
}
|
13
|
-
export declare const isRenamePromptItem: <T extends Named>(item: T | RenamePropmtItem<T>) => item is RenamePropmtItem<T>;
|
14
|
-
export declare class ResolveColumnSelect<T extends Named> extends Prompt<RenamePropmtItem<T> | T> {
|
15
|
-
private readonly tableName;
|
16
|
-
private readonly base;
|
17
|
-
private readonly data;
|
18
|
-
constructor(tableName: string, base: Named, data: (RenamePropmtItem<T> | T)[]);
|
19
|
-
render(status: "idle" | "submitted" | "aborted"): string;
|
20
|
-
result(): RenamePropmtItem<T> | T;
|
21
|
-
}
|
22
|
-
export declare class ResolveTableSelect<T extends Named> extends Prompt<RenamePropmtItem<T> | T> {
|
23
|
-
private readonly base;
|
24
|
-
private readonly state;
|
25
|
-
constructor(base: Named, data: (RenamePropmtItem<T> | T)[]);
|
26
|
-
render(status: "idle" | "submitted" | "aborted"): string;
|
27
|
-
result(): RenamePropmtItem<T> | T;
|
28
|
-
}
|
29
|
-
export declare class ResolveSchemasSelect<T extends Named> extends Prompt<RenamePropmtItem<T> | T> {
|
30
|
-
private readonly base;
|
31
|
-
private readonly state;
|
32
|
-
constructor(base: Named, data: (RenamePropmtItem<T> | T)[]);
|
33
|
-
render(status: "idle" | "submitted" | "aborted"): string;
|
34
|
-
result(): RenamePropmtItem<T> | T;
|
35
|
-
}
|
36
|
-
export type IntrospectStatus = "fetching" | "done";
|
37
|
-
export type IntrospectStage = "tables" | "columns" | "enums" | "indexes" | "fks";
|
38
|
-
export declare class IntrospectProgress extends TaskView {
|
39
|
-
private readonly spinner;
|
40
|
-
private timeout;
|
41
|
-
private state;
|
42
|
-
constructor();
|
43
|
-
update(stage: IntrospectStage, count: number, status: IntrospectStatus): void;
|
44
|
-
private formatCount;
|
45
|
-
private statusText;
|
46
|
-
render(): string;
|
47
|
-
}
|
48
|
-
export declare class DropMigrationView<T extends {
|
49
|
-
tag: string;
|
50
|
-
}> extends Prompt<T> {
|
51
|
-
private readonly data;
|
52
|
-
constructor(data: T[]);
|
53
|
-
render(status: "idle" | "submitted" | "aborted"): string;
|
54
|
-
result(): T;
|
55
|
-
}
|
56
|
-
export declare const trimmedRange: <T>(arr: T[], index: number, limitLines: number) => {
|
57
|
-
trimmed: T[];
|
58
|
-
offset: number;
|
59
|
-
startTrimmed: boolean;
|
60
|
-
endTrimmed: boolean;
|
61
|
-
};
|
package/drivers/index.d.ts
DELETED
@@ -1,39 +0,0 @@
|
|
1
|
-
import type { Client } from "@libsql/client";
|
2
|
-
import { BetterSQLite3Database } from "drizzle-orm/better-sqlite3";
|
3
|
-
import { MySql2Database } from "drizzle-orm/mysql2";
|
4
|
-
import type { PgDatabase } from "drizzle-orm/pg-core";
|
5
|
-
import type { Client as PgClient } from "pg";
|
6
|
-
export declare abstract class DrizzleDbClient<T = any> {
|
7
|
-
protected db: T;
|
8
|
-
constructor(db: T);
|
9
|
-
abstract query<K = any>(query: string, values?: any[]): Promise<K[]>;
|
10
|
-
abstract run(query: string): Promise<void>;
|
11
|
-
}
|
12
|
-
export declare class DrizzleORMPgClient extends DrizzleDbClient<PgDatabase<any>> {
|
13
|
-
query<K = any>(query: string, values?: any[] | undefined): Promise<K[]>;
|
14
|
-
run(query: string): Promise<void>;
|
15
|
-
}
|
16
|
-
export declare class DrizzleORMMySQLClient extends DrizzleDbClient<MySql2Database<any>> {
|
17
|
-
query<K = any>(query: string, values?: any[] | undefined): Promise<K[]>;
|
18
|
-
run(query: string): Promise<void>;
|
19
|
-
}
|
20
|
-
export declare class DrizzleORMSQLiteClient extends DrizzleDbClient<BetterSQLite3Database<any>> {
|
21
|
-
query<K = any>(query: string, values?: any[] | undefined): Promise<K[]>;
|
22
|
-
run(query: string): Promise<void>;
|
23
|
-
}
|
24
|
-
export declare class BetterSqlite extends DrizzleDbClient {
|
25
|
-
run(query: string): Promise<void>;
|
26
|
-
query(query: string): Promise<any[]>;
|
27
|
-
}
|
28
|
-
export declare class MySQL2Client extends DrizzleDbClient {
|
29
|
-
run(query: string): Promise<void>;
|
30
|
-
query(query: string): Promise<any>;
|
31
|
-
}
|
32
|
-
export declare class TursoSqlite extends DrizzleDbClient<Client> {
|
33
|
-
run(query: string): Promise<void>;
|
34
|
-
query(query: string): Promise<any[]>;
|
35
|
-
}
|
36
|
-
export declare class PgPostgres extends DrizzleDbClient<PgClient> {
|
37
|
-
query<K = any>(query: string, values?: any[]): Promise<K[]>;
|
38
|
-
run(query: string): Promise<void>;
|
39
|
-
}
|
package/global.d.ts
DELETED
@@ -1,4 +0,0 @@
|
|
1
|
-
export declare const originUUID = "00000000-0000-0000-0000-000000000000";
|
2
|
-
export declare const snapshotVersion = "5";
|
3
|
-
export declare function assertUnreachable(x: never): never;
|
4
|
-
export declare const mapValues: <IN, OUT>(obj: Record<string, IN>, map: (input: IN) => OUT) => Record<string, OUT>;
|
package/introspect-mysql.d.ts
DELETED
@@ -1,9 +0,0 @@
|
|
1
|
-
import "./@types/utils";
|
2
|
-
import { ConfigIntrospectCasing } from "./cli/commands/utils";
|
3
|
-
import { MySqlSchemaInternal } from "./serializer/mysqlSchema";
|
4
|
-
export declare const schemaToTypeScript: (schema: MySqlSchemaInternal, casing: ConfigIntrospectCasing["casing"]) => {
|
5
|
-
file: string;
|
6
|
-
imports: string;
|
7
|
-
decalrations: string;
|
8
|
-
schemaEntry: string;
|
9
|
-
};
|
package/introspect-pg.d.ts
DELETED
@@ -1,12 +0,0 @@
|
|
1
|
-
import { AnyPgTable } from "drizzle-orm/pg-core";
|
2
|
-
import { Relation, Relations } from "drizzle-orm/relations";
|
3
|
-
import "./@types/utils";
|
4
|
-
import { ConfigIntrospectCasing } from "./cli/commands/utils";
|
5
|
-
import { PgSchemaInternal } from "./serializer/pgSchema";
|
6
|
-
export declare const relationsToTypeScript: (schema: Record<string, Record<string, AnyPgTable<{}>>>, relations: Record<string, Relations<string, Record<string, Relation<string>>>>) => string;
|
7
|
-
export declare const schemaToTypeScript: (schema: PgSchemaInternal, casing: ConfigIntrospectCasing) => {
|
8
|
-
file: string;
|
9
|
-
imports: string;
|
10
|
-
decalrations: string;
|
11
|
-
schemaEntry: string;
|
12
|
-
};
|
package/introspect-sqlite.d.ts
DELETED
@@ -1,10 +0,0 @@
|
|
1
|
-
import "./@types/utils";
|
2
|
-
import type { ConfigIntrospectCasing } from "./cli/commands/utils";
|
3
|
-
import type { SQLiteSchemaInternal } from "./serializer/sqliteSchema";
|
4
|
-
export declare const indexName: (tableName: string, columns: string[]) => string;
|
5
|
-
export declare const schemaToTypeScript: (schema: SQLiteSchemaInternal, casing: ConfigIntrospectCasing["casing"]) => {
|
6
|
-
file: string;
|
7
|
-
imports: string;
|
8
|
-
decalrations: string;
|
9
|
-
schemaEntry: string;
|
10
|
-
};
|
package/jsonDiffer.d.ts
DELETED
@@ -1,76 +0,0 @@
|
|
1
|
-
export function diffForRenamedTables(pairs: any): any;
|
2
|
-
export function diffForRenamedColumn(t1: any, t2: any): any;
|
3
|
-
export function applyJsonDiff(json1: any, json2: any): {
|
4
|
-
addedTables?: undefined;
|
5
|
-
deletedTables?: undefined;
|
6
|
-
alteredTablesWithColumns?: undefined;
|
7
|
-
addedEnums?: undefined;
|
8
|
-
deletedEnums?: undefined;
|
9
|
-
alteredEnums?: undefined;
|
10
|
-
addedSchemas?: undefined;
|
11
|
-
deletedSchemas?: undefined;
|
12
|
-
} | {
|
13
|
-
addedTables: any[];
|
14
|
-
deletedTables: any[];
|
15
|
-
alteredTablesWithColumns: {
|
16
|
-
name: any;
|
17
|
-
schema: {
|
18
|
-
type: string;
|
19
|
-
value: any;
|
20
|
-
};
|
21
|
-
deleted: any[];
|
22
|
-
added: any[];
|
23
|
-
altered: any[];
|
24
|
-
addedIndexes: {
|
25
|
-
[k: string]: any;
|
26
|
-
};
|
27
|
-
deletedIndexes: {
|
28
|
-
[k: string]: any;
|
29
|
-
};
|
30
|
-
alteredIndexes: {
|
31
|
-
[k: string]: any;
|
32
|
-
};
|
33
|
-
addedForeignKeys: {
|
34
|
-
[k: string]: any;
|
35
|
-
};
|
36
|
-
deletedForeignKeys: {
|
37
|
-
[k: string]: any;
|
38
|
-
};
|
39
|
-
alteredForeignKeys: {
|
40
|
-
[k: string]: any;
|
41
|
-
};
|
42
|
-
addedCompositePKs: {
|
43
|
-
[k: string]: any;
|
44
|
-
};
|
45
|
-
deletedCompositePKs: {
|
46
|
-
[k: string]: any;
|
47
|
-
};
|
48
|
-
alteredCompositePKs: {
|
49
|
-
[k: string]: any;
|
50
|
-
};
|
51
|
-
addedUniqueConstraints: {
|
52
|
-
[k: string]: any;
|
53
|
-
};
|
54
|
-
deletedUniqueConstraints: {
|
55
|
-
[k: string]: any;
|
56
|
-
};
|
57
|
-
alteredUniqueConstraints: {
|
58
|
-
[k: string]: any;
|
59
|
-
};
|
60
|
-
}[];
|
61
|
-
addedEnums: {
|
62
|
-
name: any;
|
63
|
-
values: any[];
|
64
|
-
}[];
|
65
|
-
deletedEnums: {
|
66
|
-
name: any;
|
67
|
-
values: any[];
|
68
|
-
}[];
|
69
|
-
alteredEnums: {
|
70
|
-
name: string;
|
71
|
-
addedValues: any[];
|
72
|
-
deletedValues: any[];
|
73
|
-
}[];
|
74
|
-
addedSchemas: any[];
|
75
|
-
deletedSchemas: any[];
|
76
|
-
};
|