drizzle-kit 0.20.17-4e262b7 → 0.20.17-7776aba
Sign up to get free protection for your applications and to get access to all the features.
- package/bin.cjs +22248 -23435
- package/cli/commands/migrate.d.ts +135 -152
- package/cli/commands/mysqlIntrospect.d.ts +79 -15
- package/cli/commands/mysqlPushUtils.d.ts +8 -4
- package/cli/commands/mysqlUp.d.ts +4 -0
- package/cli/commands/pgConnect.d.ts +5 -0
- package/cli/commands/pgIntrospect.d.ts +76 -12
- package/cli/commands/pgPushUtils.d.ts +6 -3
- package/cli/commands/pgUp.d.ts +4 -0
- package/cli/commands/sqliteIntrospect.d.ts +29 -26
- package/cli/commands/sqlitePushUtils.d.ts +10 -4
- package/cli/commands/sqliteUtils.d.ts +162 -0
- package/cli/commands/upFolders.d.ts +27 -0
- package/cli/commands/utils.d.ts +255 -39
- package/cli/validations/common.d.ts +7 -208
- package/cli/validations/mysql.d.ts +337 -7
- package/cli/validations/outputs.d.ts +0 -1
- package/cli/validations/pg.d.ts +405 -4
- package/cli/views.d.ts +5 -7
- package/drivers/index.d.ts +39 -0
- package/global.d.ts +1 -3
- package/index.d.mts +6 -8
- package/index.d.ts +6 -8
- package/index.js +0 -1
- package/introspect-mysql.d.ts +9 -0
- package/introspect-pg.d.ts +12 -0
- package/introspect-sqlite.d.ts +2 -2
- package/jsonDiffer.d.ts +29 -14
- package/jsonStatements.d.ts +11 -38
- package/package.json +52 -24
- package/payload.d.mts +5 -5
- package/payload.d.ts +5 -5
- package/payload.js +24222 -26044
- package/payload.mjs +19956 -21767
- package/schemaValidator.d.ts +286 -289
- package/serializer/mysqlImports.d.ts +7 -3
- package/serializer/mysqlSchema.d.ts +1323 -2454
- package/serializer/mysqlSerializer.d.ts +6 -6
- package/serializer/pgImports.d.ts +2 -2
- package/serializer/pgSchema.d.ts +1283 -1742
- package/serializer/pgSerializer.d.ts +2 -2
- package/serializer/sqliteImports.d.ts +4 -2
- package/serializer/sqliteSchema.d.ts +979 -553
- package/serializer/sqliteSerializer.d.ts +4 -4
- package/snapshotsDiffer.d.ts +1209 -2486
- package/utils/words.d.ts +1 -1
- package/utils-studio.d.mts +1 -0
- package/utils-studio.d.ts +1 -0
- package/utils-studio.js +849 -7058
- package/utils-studio.mjs +829 -7035
- package/utils.d.ts +141 -14
- package/utils.js +7161 -4625
- package/utils.mjs +7121 -4585
- package/cli/utils.d.ts +0 -12
- package/cli/validations/cli.d.ts +0 -169
- package/cli/validations/sqlite.d.ts +0 -34
package/cli/commands/utils.d.ts
CHANGED
@@ -1,58 +1,274 @@
|
|
1
|
-
import {
|
2
|
-
import { PostgresCredentials } from "../validations/pg";
|
3
|
-
import { SqliteCredentials } from "../validations/sqlite";
|
4
|
-
import { Casing, CliConfig } from "../validations/common";
|
5
|
-
import type { Dialect } from "../../schemaValidator";
|
6
|
-
import { CliCheckConfig, CliConfigGenerate } from "../validations/cli";
|
1
|
+
import { TypeOf } from "zod";
|
7
2
|
export declare const safeRegister: () => Promise<{
|
8
3
|
unregister: () => void;
|
9
4
|
}>;
|
10
5
|
export type GenerateConfig = {
|
11
|
-
dialect: Dialect;
|
12
6
|
schema: string | string[];
|
13
7
|
out: string;
|
14
8
|
breakpoints: boolean;
|
15
|
-
name?: string;
|
16
9
|
custom: boolean;
|
17
10
|
bundle: boolean;
|
18
11
|
};
|
19
|
-
export declare const prepareGenerateConfig: (options:
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
12
|
+
export declare const prepareGenerateConfig: (options: {
|
13
|
+
schema?: string | string[];
|
14
|
+
out?: string;
|
15
|
+
config?: string;
|
16
|
+
breakpoints: boolean;
|
17
|
+
custom: boolean;
|
18
|
+
}) => Promise<GenerateConfig>;
|
19
|
+
export declare const assertOutFolder: (it: {
|
20
|
+
config?: string;
|
27
21
|
} | {
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
22
|
+
out: string;
|
23
|
+
}) => Promise<string>;
|
24
|
+
export declare const driver: import("zod").ZodUnion<[import("zod").ZodLiteral<"better-sqlite">, import("zod").ZodLiteral<"turso">, import("zod").ZodLiteral<"libsql">, import("zod").ZodLiteral<"d1">, import("zod").ZodLiteral<"expo">, import("zod").ZodLiteral<"pg">, import("zod").ZodLiteral<"mysql2">]>;
|
25
|
+
export declare const configCommonSchema: import("zod").ZodObject<{
|
26
|
+
schema: import("zod").ZodUnion<[import("zod").ZodString, import("zod").ZodArray<import("zod").ZodString, "many">]>;
|
27
|
+
out: import("zod").ZodOptional<import("zod").ZodString>;
|
28
|
+
breakpoints: import("zod").ZodDefault<import("zod").ZodBoolean>;
|
29
|
+
driver: import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodLiteral<"better-sqlite">, import("zod").ZodLiteral<"turso">, import("zod").ZodLiteral<"libsql">, import("zod").ZodLiteral<"d1">, import("zod").ZodLiteral<"expo">, import("zod").ZodLiteral<"pg">, import("zod").ZodLiteral<"mysql2">]>>;
|
30
|
+
tablesFilter: import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodString, import("zod").ZodArray<import("zod").ZodString, "many">]>>;
|
31
|
+
schemaFilter: import("zod").ZodDefault<import("zod").ZodUnion<[import("zod").ZodString, import("zod").ZodArray<import("zod").ZodString, "many">]>>;
|
32
|
+
}, "strip", import("zod").ZodTypeAny, {
|
33
|
+
out?: string | undefined;
|
34
|
+
driver?: "turso" | "better-sqlite" | "libsql" | "d1" | "pg" | "mysql2" | "expo" | undefined;
|
35
|
+
tablesFilter?: string | string[] | undefined;
|
36
|
+
schema: string | string[];
|
37
|
+
breakpoints: boolean;
|
38
|
+
schemaFilter: string | string[];
|
39
|
+
}, {
|
40
|
+
out?: string | undefined;
|
41
|
+
breakpoints?: boolean | undefined;
|
42
|
+
driver?: "turso" | "better-sqlite" | "libsql" | "d1" | "pg" | "mysql2" | "expo" | undefined;
|
43
|
+
tablesFilter?: string | string[] | undefined;
|
44
|
+
schemaFilter?: string | string[] | undefined;
|
45
|
+
schema: string | string[];
|
36
46
|
}>;
|
37
|
-
export declare const
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
}
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
+
export declare const introspectCasing: import("zod").ZodDefault<import("zod").ZodObject<{
|
48
|
+
casing: import("zod").ZodDefault<import("zod").ZodUnion<[import("zod").ZodLiteral<"camel">, import("zod").ZodLiteral<"preserve">]>>;
|
49
|
+
}, "strip", import("zod").ZodTypeAny, {
|
50
|
+
casing: "camel" | "preserve";
|
51
|
+
}, {
|
52
|
+
casing?: "camel" | "preserve" | undefined;
|
53
|
+
}>>;
|
54
|
+
export declare const configIntrospectSchema: import("zod").ZodObject<{
|
55
|
+
schema: import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodString, import("zod").ZodArray<import("zod").ZodString, "many">]>>;
|
56
|
+
out: import("zod").ZodDefault<import("zod").ZodOptional<import("zod").ZodString>>;
|
57
|
+
breakpoints: import("zod").ZodDefault<import("zod").ZodBoolean>;
|
58
|
+
tablesFilter: import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodString, import("zod").ZodArray<import("zod").ZodString, "many">]>>;
|
59
|
+
schemaFilter: import("zod").ZodDefault<import("zod").ZodUnion<[import("zod").ZodString, import("zod").ZodArray<import("zod").ZodString, "many">]>>;
|
60
|
+
introspect: import("zod").ZodDefault<import("zod").ZodObject<{
|
61
|
+
casing: import("zod").ZodDefault<import("zod").ZodUnion<[import("zod").ZodLiteral<"camel">, import("zod").ZodLiteral<"preserve">]>>;
|
62
|
+
}, "strip", import("zod").ZodTypeAny, {
|
63
|
+
casing: "camel" | "preserve";
|
64
|
+
}, {
|
65
|
+
casing?: "camel" | "preserve" | undefined;
|
66
|
+
}>>;
|
67
|
+
}, "strip", import("zod").ZodTypeAny, {
|
68
|
+
schema?: string | string[] | undefined;
|
69
|
+
tablesFilter?: string | string[] | undefined;
|
47
70
|
out: string;
|
48
71
|
breakpoints: boolean;
|
49
|
-
|
50
|
-
|
51
|
-
|
72
|
+
schemaFilter: string | string[];
|
73
|
+
introspect: {
|
74
|
+
casing: "camel" | "preserve";
|
75
|
+
};
|
76
|
+
}, {
|
77
|
+
schema?: string | string[] | undefined;
|
78
|
+
out?: string | undefined;
|
79
|
+
breakpoints?: boolean | undefined;
|
80
|
+
tablesFilter?: string | string[] | undefined;
|
81
|
+
schemaFilter?: string | string[] | undefined;
|
82
|
+
introspect?: {
|
83
|
+
casing?: "camel" | "preserve" | undefined;
|
84
|
+
} | undefined;
|
52
85
|
}>;
|
53
|
-
export
|
86
|
+
export type ConfigIntrospectSchema = TypeOf<typeof configIntrospectSchema>;
|
87
|
+
export type ConfigIntrospectCasing = TypeOf<typeof introspectCasing>;
|
88
|
+
export declare const configIntrospectCliSchema: import("zod").ZodObject<{
|
89
|
+
schema: import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodString, import("zod").ZodArray<import("zod").ZodString, "many">]>>;
|
90
|
+
out: import("zod").ZodDefault<import("zod").ZodOptional<import("zod").ZodString>>;
|
91
|
+
breakpoints: import("zod").ZodDefault<import("zod").ZodBoolean>;
|
92
|
+
tablesFilter: import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodString, import("zod").ZodArray<import("zod").ZodString, "many">]>>;
|
93
|
+
schemaFilter: import("zod").ZodDefault<import("zod").ZodUnion<[import("zod").ZodString, import("zod").ZodArray<import("zod").ZodString, "many">]>>;
|
94
|
+
introspectCasing: import("zod").ZodDefault<import("zod").ZodUnion<[import("zod").ZodLiteral<"camel">, import("zod").ZodLiteral<"preserve">]>>;
|
95
|
+
}, "strip", import("zod").ZodTypeAny, {
|
96
|
+
schema?: string | string[] | undefined;
|
97
|
+
tablesFilter?: string | string[] | undefined;
|
54
98
|
out: string;
|
55
|
-
|
99
|
+
breakpoints: boolean;
|
100
|
+
schemaFilter: string | string[];
|
101
|
+
introspectCasing: "camel" | "preserve";
|
102
|
+
}, {
|
103
|
+
schema?: string | string[] | undefined;
|
104
|
+
out?: string | undefined;
|
105
|
+
breakpoints?: boolean | undefined;
|
106
|
+
tablesFilter?: string | string[] | undefined;
|
107
|
+
schemaFilter?: string | string[] | undefined;
|
108
|
+
introspectCasing?: "camel" | "preserve" | undefined;
|
56
109
|
}>;
|
110
|
+
export declare const configGenerateSchema: import("zod").ZodObject<{
|
111
|
+
schema: import("zod").ZodUnion<[import("zod").ZodString, import("zod").ZodArray<import("zod").ZodString, "many">]>;
|
112
|
+
out: import("zod").ZodDefault<import("zod").ZodOptional<import("zod").ZodString>>;
|
113
|
+
breakpoints: import("zod").ZodDefault<import("zod").ZodBoolean>;
|
114
|
+
}, "strip", import("zod").ZodTypeAny, {
|
115
|
+
schema: string | string[];
|
116
|
+
out: string;
|
117
|
+
breakpoints: boolean;
|
118
|
+
}, {
|
119
|
+
out?: string | undefined;
|
120
|
+
breakpoints?: boolean | undefined;
|
121
|
+
schema: string | string[];
|
122
|
+
}>;
|
123
|
+
export type GenerateSchema = TypeOf<typeof configGenerateSchema>;
|
124
|
+
export declare const configPushSchema: import("zod").ZodObject<{
|
125
|
+
schema: import("zod").ZodUnion<[import("zod").ZodString, import("zod").ZodArray<import("zod").ZodString, "many">]>;
|
126
|
+
tablesFilter: import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodString, import("zod").ZodArray<import("zod").ZodString, "many">]>>;
|
127
|
+
schemaFilter: import("zod").ZodDefault<import("zod").ZodUnion<[import("zod").ZodString, import("zod").ZodArray<import("zod").ZodString, "many">]>>;
|
128
|
+
verbose: import("zod").ZodDefault<import("zod").ZodBoolean>;
|
129
|
+
strict: import("zod").ZodDefault<import("zod").ZodBoolean>;
|
130
|
+
}, "strip", import("zod").ZodTypeAny, {
|
131
|
+
tablesFilter?: string | string[] | undefined;
|
132
|
+
strict: boolean;
|
133
|
+
schema: string | string[];
|
134
|
+
schemaFilter: string | string[];
|
135
|
+
verbose: boolean;
|
136
|
+
}, {
|
137
|
+
strict?: boolean | undefined;
|
138
|
+
tablesFilter?: string | string[] | undefined;
|
139
|
+
schemaFilter?: string | string[] | undefined;
|
140
|
+
verbose?: boolean | undefined;
|
141
|
+
schema: string | string[];
|
142
|
+
}>;
|
143
|
+
export declare const mysqlConnectionSchema: import("zod").ZodUnion<[import("zod").ZodObject<{
|
144
|
+
host: import("zod").ZodString;
|
145
|
+
port: import("zod").ZodOptional<import("zod").ZodNumber>;
|
146
|
+
user: import("zod").ZodDefault<import("zod").ZodString>;
|
147
|
+
password: import("zod").ZodOptional<import("zod").ZodString>;
|
148
|
+
database: import("zod").ZodString;
|
149
|
+
}, "strip", import("zod").ZodTypeAny, {
|
150
|
+
port?: number | undefined;
|
151
|
+
password?: string | undefined;
|
152
|
+
host: string;
|
153
|
+
user: string;
|
154
|
+
database: string;
|
155
|
+
}, {
|
156
|
+
port?: number | undefined;
|
157
|
+
user?: string | undefined;
|
158
|
+
password?: string | undefined;
|
159
|
+
host: string;
|
160
|
+
database: string;
|
161
|
+
}>, import("zod").ZodObject<{
|
162
|
+
connectionString: import("zod").ZodString;
|
163
|
+
}, "strip", import("zod").ZodTypeAny, {
|
164
|
+
connectionString: string;
|
165
|
+
}, {
|
166
|
+
connectionString: string;
|
167
|
+
}>, import("zod").ZodObject<{}, "strip", import("zod").ZodTypeAny, {}, {}>]>;
|
168
|
+
export declare const mySqlCliConfigSchema: import("zod").ZodIntersection<import("zod").ZodObject<{
|
169
|
+
schema: import("zod").ZodUnion<[import("zod").ZodString, import("zod").ZodArray<import("zod").ZodString, "many">]>;
|
170
|
+
out: import("zod").ZodOptional<import("zod").ZodString>;
|
171
|
+
breakpoints: import("zod").ZodDefault<import("zod").ZodBoolean>;
|
172
|
+
driver: import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodLiteral<"better-sqlite">, import("zod").ZodLiteral<"turso">, import("zod").ZodLiteral<"libsql">, import("zod").ZodLiteral<"d1">, import("zod").ZodLiteral<"expo">, import("zod").ZodLiteral<"pg">, import("zod").ZodLiteral<"mysql2">]>>;
|
173
|
+
tablesFilter: import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodString, import("zod").ZodArray<import("zod").ZodString, "many">]>>;
|
174
|
+
schemaFilter: import("zod").ZodDefault<import("zod").ZodUnion<[import("zod").ZodString, import("zod").ZodArray<import("zod").ZodString, "many">]>>;
|
175
|
+
}, "strip", import("zod").ZodTypeAny, {
|
176
|
+
out?: string | undefined;
|
177
|
+
driver?: "turso" | "better-sqlite" | "libsql" | "d1" | "pg" | "mysql2" | "expo" | undefined;
|
178
|
+
tablesFilter?: string | string[] | undefined;
|
179
|
+
schema: string | string[];
|
180
|
+
breakpoints: boolean;
|
181
|
+
schemaFilter: string | string[];
|
182
|
+
}, {
|
183
|
+
out?: string | undefined;
|
184
|
+
breakpoints?: boolean | undefined;
|
185
|
+
driver?: "turso" | "better-sqlite" | "libsql" | "d1" | "pg" | "mysql2" | "expo" | undefined;
|
186
|
+
tablesFilter?: string | string[] | undefined;
|
187
|
+
schemaFilter?: string | string[] | undefined;
|
188
|
+
schema: string | string[];
|
189
|
+
}>, import("zod").ZodUnion<[import("zod").ZodObject<{
|
190
|
+
host: import("zod").ZodString;
|
191
|
+
port: import("zod").ZodOptional<import("zod").ZodNumber>;
|
192
|
+
user: import("zod").ZodDefault<import("zod").ZodString>;
|
193
|
+
password: import("zod").ZodOptional<import("zod").ZodString>;
|
194
|
+
database: import("zod").ZodString;
|
195
|
+
}, "strip", import("zod").ZodTypeAny, {
|
196
|
+
port?: number | undefined;
|
197
|
+
password?: string | undefined;
|
198
|
+
host: string;
|
199
|
+
user: string;
|
200
|
+
database: string;
|
201
|
+
}, {
|
202
|
+
port?: number | undefined;
|
203
|
+
user?: string | undefined;
|
204
|
+
password?: string | undefined;
|
205
|
+
host: string;
|
206
|
+
database: string;
|
207
|
+
}>, import("zod").ZodObject<{
|
208
|
+
connectionString: import("zod").ZodString;
|
209
|
+
}, "strip", import("zod").ZodTypeAny, {
|
210
|
+
connectionString: string;
|
211
|
+
}, {
|
212
|
+
connectionString: string;
|
213
|
+
}>, import("zod").ZodObject<{}, "strip", import("zod").ZodTypeAny, {}, {}>]>>;
|
214
|
+
export declare const mySqlIntrospectConfigSchema: import("zod").ZodIntersection<import("zod").ZodObject<{
|
215
|
+
schema: import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodString, import("zod").ZodArray<import("zod").ZodString, "many">]>>;
|
216
|
+
out: import("zod").ZodDefault<import("zod").ZodOptional<import("zod").ZodString>>;
|
217
|
+
breakpoints: import("zod").ZodDefault<import("zod").ZodBoolean>;
|
218
|
+
tablesFilter: import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodString, import("zod").ZodArray<import("zod").ZodString, "many">]>>;
|
219
|
+
schemaFilter: import("zod").ZodDefault<import("zod").ZodUnion<[import("zod").ZodString, import("zod").ZodArray<import("zod").ZodString, "many">]>>;
|
220
|
+
introspect: import("zod").ZodDefault<import("zod").ZodObject<{
|
221
|
+
casing: import("zod").ZodDefault<import("zod").ZodUnion<[import("zod").ZodLiteral<"camel">, import("zod").ZodLiteral<"preserve">]>>;
|
222
|
+
}, "strip", import("zod").ZodTypeAny, {
|
223
|
+
casing: "camel" | "preserve";
|
224
|
+
}, {
|
225
|
+
casing?: "camel" | "preserve" | undefined;
|
226
|
+
}>>;
|
227
|
+
}, "strip", import("zod").ZodTypeAny, {
|
228
|
+
schema?: string | string[] | undefined;
|
229
|
+
tablesFilter?: string | string[] | undefined;
|
230
|
+
out: string;
|
231
|
+
breakpoints: boolean;
|
232
|
+
schemaFilter: string | string[];
|
233
|
+
introspect: {
|
234
|
+
casing: "camel" | "preserve";
|
235
|
+
};
|
236
|
+
}, {
|
237
|
+
schema?: string | string[] | undefined;
|
238
|
+
out?: string | undefined;
|
239
|
+
breakpoints?: boolean | undefined;
|
240
|
+
tablesFilter?: string | string[] | undefined;
|
241
|
+
schemaFilter?: string | string[] | undefined;
|
242
|
+
introspect?: {
|
243
|
+
casing?: "camel" | "preserve" | undefined;
|
244
|
+
} | undefined;
|
245
|
+
}>, import("zod").ZodUnion<[import("zod").ZodObject<{
|
246
|
+
host: import("zod").ZodString;
|
247
|
+
port: import("zod").ZodOptional<import("zod").ZodNumber>;
|
248
|
+
user: import("zod").ZodDefault<import("zod").ZodString>;
|
249
|
+
password: import("zod").ZodOptional<import("zod").ZodString>;
|
250
|
+
database: import("zod").ZodString;
|
251
|
+
}, "strip", import("zod").ZodTypeAny, {
|
252
|
+
port?: number | undefined;
|
253
|
+
password?: string | undefined;
|
254
|
+
host: string;
|
255
|
+
user: string;
|
256
|
+
database: string;
|
257
|
+
}, {
|
258
|
+
port?: number | undefined;
|
259
|
+
user?: string | undefined;
|
260
|
+
password?: string | undefined;
|
261
|
+
host: string;
|
262
|
+
database: string;
|
263
|
+
}>, import("zod").ZodObject<{
|
264
|
+
connectionString: import("zod").ZodString;
|
265
|
+
}, "strip", import("zod").ZodTypeAny, {
|
266
|
+
connectionString: string;
|
267
|
+
}, {
|
268
|
+
connectionString: string;
|
269
|
+
}>, import("zod").ZodObject<{}, "strip", import("zod").ZodTypeAny, {}, {}>]>>;
|
270
|
+
export type MySqlCliConfig = TypeOf<typeof mySqlCliConfigSchema>;
|
271
|
+
export type CliConfig = MySqlCliConfig;
|
272
|
+
export type Driver = TypeOf<typeof driver>;
|
57
273
|
export declare const drizzleConfigFromFile: (configPath?: string) => Promise<CliConfig>;
|
58
274
|
export declare const readDrizzleConfig: (configPath?: string) => Promise<any>;
|
@@ -1,214 +1,13 @@
|
|
1
|
-
|
2
|
-
|
1
|
+
export type CollusionCheckOutput = {
|
2
|
+
success: boolean;
|
3
|
+
message?: string;
|
4
|
+
action: "config" | "cli" | "error";
|
5
|
+
};
|
6
|
+
export type Commands = "push:sqlite" | "introspect:sqlite" | "introspect:pg" | "generate:pg" | "generate:sqlite" | "generate:mysql" | "check:pg" | "check:mysql" | "check:sqlite" | "up:pg" | "up:mysql" | "up:sqlite" | "drop" | "introspect:mysql" | "push:mysql" | "push:pg";
|
3
7
|
/**
|
4
8
|
* This function checks an input from a user and if there are any params together with config path - return true
|
5
9
|
* @param options - user input
|
6
10
|
* @param inputWhitelist - whitelist some cli options that can be used together with config option
|
7
11
|
* @returns true if there was a collision, false if everything is valid
|
8
12
|
*/
|
9
|
-
export declare const
|
10
|
-
export declare const sqliteDriver: import("zod").ZodUnion<[import("zod").ZodLiteral<"better-sqlite">, import("zod").ZodLiteral<"turso">, import("zod").ZodLiteral<"libsql">, import("zod").ZodLiteral<"d1">, import("zod").ZodLiteral<"expo">]>;
|
11
|
-
export declare const postgresDriver: import("zod").ZodLiteral<"pg">;
|
12
|
-
export declare const mysqlDriver: import("zod").ZodLiteral<"mysql2">;
|
13
|
-
export declare const driver: import("zod").ZodUnion<[import("zod").ZodUnion<[import("zod").ZodLiteral<"better-sqlite">, import("zod").ZodLiteral<"turso">, import("zod").ZodLiteral<"libsql">, import("zod").ZodLiteral<"d1">, import("zod").ZodLiteral<"expo">]>, import("zod").ZodLiteral<"pg">, import("zod").ZodLiteral<"mysql2">]>;
|
14
|
-
export declare const configCommonSchema: import("zod").ZodObject<{
|
15
|
-
dialect: import("zod").ZodEnum<["pg", "mysql", "sqlite"]>;
|
16
|
-
schema: import("zod").ZodUnion<[import("zod").ZodString, import("zod").ZodArray<import("zod").ZodString, "many">]>;
|
17
|
-
out: import("zod").ZodOptional<import("zod").ZodString>;
|
18
|
-
breakpoints: import("zod").ZodDefault<import("zod").ZodBoolean>;
|
19
|
-
driver: import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodUnion<[import("zod").ZodLiteral<"better-sqlite">, import("zod").ZodLiteral<"turso">, import("zod").ZodLiteral<"libsql">, import("zod").ZodLiteral<"d1">, import("zod").ZodLiteral<"expo">]>, import("zod").ZodLiteral<"pg">, import("zod").ZodLiteral<"mysql2">]>>;
|
20
|
-
tablesFilter: import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodString, import("zod").ZodArray<import("zod").ZodString, "many">]>>;
|
21
|
-
schemaFilter: import("zod").ZodDefault<import("zod").ZodUnion<[import("zod").ZodString, import("zod").ZodArray<import("zod").ZodString, "many">]>>;
|
22
|
-
}, "strip", import("zod").ZodTypeAny, {
|
23
|
-
schema: string | string[];
|
24
|
-
dialect: "mysql" | "pg" | "sqlite";
|
25
|
-
breakpoints: boolean;
|
26
|
-
schemaFilter: string | string[];
|
27
|
-
out?: string | undefined;
|
28
|
-
driver?: "pg" | "turso" | "better-sqlite" | "libsql" | "d1" | "mysql2" | "expo" | undefined;
|
29
|
-
tablesFilter?: string | string[] | undefined;
|
30
|
-
}, {
|
31
|
-
schema: string | string[];
|
32
|
-
dialect: "mysql" | "pg" | "sqlite";
|
33
|
-
out?: string | undefined;
|
34
|
-
breakpoints?: boolean | undefined;
|
35
|
-
driver?: "pg" | "turso" | "better-sqlite" | "libsql" | "d1" | "mysql2" | "expo" | undefined;
|
36
|
-
tablesFilter?: string | string[] | undefined;
|
37
|
-
schemaFilter?: string | string[] | undefined;
|
38
|
-
}>;
|
39
|
-
export declare const casing: import("zod").ZodDefault<import("zod").ZodUnion<[import("zod").ZodLiteral<"camel">, import("zod").ZodLiteral<"preserve">]>>;
|
40
|
-
export declare const introspectParams: import("zod").ZodObject<{
|
41
|
-
schema: import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodString, import("zod").ZodArray<import("zod").ZodString, "many">]>>;
|
42
|
-
out: import("zod").ZodDefault<import("zod").ZodOptional<import("zod").ZodString>>;
|
43
|
-
breakpoints: import("zod").ZodDefault<import("zod").ZodBoolean>;
|
44
|
-
tablesFilter: import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodString, import("zod").ZodArray<import("zod").ZodString, "many">]>>;
|
45
|
-
schemaFilter: import("zod").ZodDefault<import("zod").ZodUnion<[import("zod").ZodString, import("zod").ZodArray<import("zod").ZodString, "many">]>>;
|
46
|
-
introspect: import("zod").ZodDefault<import("zod").ZodObject<{
|
47
|
-
casing: import("zod").ZodDefault<import("zod").ZodUnion<[import("zod").ZodLiteral<"camel">, import("zod").ZodLiteral<"preserve">]>>;
|
48
|
-
}, "strip", import("zod").ZodTypeAny, {
|
49
|
-
casing: "camel" | "preserve";
|
50
|
-
}, {
|
51
|
-
casing?: "camel" | "preserve" | undefined;
|
52
|
-
}>>;
|
53
|
-
}, "strip", import("zod").ZodTypeAny, {
|
54
|
-
introspect: {
|
55
|
-
casing: "camel" | "preserve";
|
56
|
-
};
|
57
|
-
out: string;
|
58
|
-
breakpoints: boolean;
|
59
|
-
schemaFilter: string | string[];
|
60
|
-
schema?: string | string[] | undefined;
|
61
|
-
tablesFilter?: string | string[] | undefined;
|
62
|
-
}, {
|
63
|
-
schema?: string | string[] | undefined;
|
64
|
-
introspect?: {
|
65
|
-
casing?: "camel" | "preserve" | undefined;
|
66
|
-
} | undefined;
|
67
|
-
out?: string | undefined;
|
68
|
-
breakpoints?: boolean | undefined;
|
69
|
-
tablesFilter?: string | string[] | undefined;
|
70
|
-
schemaFilter?: string | string[] | undefined;
|
71
|
-
}>;
|
72
|
-
export type IntrospectParams = TypeOf<typeof introspectParams>;
|
73
|
-
export type Casing = TypeOf<typeof casing>;
|
74
|
-
export declare const configIntrospectCliSchema: import("zod").ZodObject<{
|
75
|
-
schema: import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodString, import("zod").ZodArray<import("zod").ZodString, "many">]>>;
|
76
|
-
out: import("zod").ZodDefault<import("zod").ZodOptional<import("zod").ZodString>>;
|
77
|
-
breakpoints: import("zod").ZodDefault<import("zod").ZodBoolean>;
|
78
|
-
tablesFilter: import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodString, import("zod").ZodArray<import("zod").ZodString, "many">]>>;
|
79
|
-
schemaFilter: import("zod").ZodDefault<import("zod").ZodUnion<[import("zod").ZodString, import("zod").ZodArray<import("zod").ZodString, "many">]>>;
|
80
|
-
introspectCasing: import("zod").ZodDefault<import("zod").ZodUnion<[import("zod").ZodLiteral<"camel">, import("zod").ZodLiteral<"preserve">]>>;
|
81
|
-
}, "strip", import("zod").ZodTypeAny, {
|
82
|
-
out: string;
|
83
|
-
breakpoints: boolean;
|
84
|
-
schemaFilter: string | string[];
|
85
|
-
introspectCasing: "camel" | "preserve";
|
86
|
-
schema?: string | string[] | undefined;
|
87
|
-
tablesFilter?: string | string[] | undefined;
|
88
|
-
}, {
|
89
|
-
schema?: string | string[] | undefined;
|
90
|
-
out?: string | undefined;
|
91
|
-
breakpoints?: boolean | undefined;
|
92
|
-
tablesFilter?: string | string[] | undefined;
|
93
|
-
schemaFilter?: string | string[] | undefined;
|
94
|
-
introspectCasing?: "camel" | "preserve" | undefined;
|
95
|
-
}>;
|
96
|
-
export declare const configGenerateSchema: import("zod").ZodObject<{
|
97
|
-
schema: import("zod").ZodUnion<[import("zod").ZodString, import("zod").ZodArray<import("zod").ZodString, "many">]>;
|
98
|
-
out: import("zod").ZodDefault<import("zod").ZodOptional<import("zod").ZodString>>;
|
99
|
-
breakpoints: import("zod").ZodDefault<import("zod").ZodBoolean>;
|
100
|
-
}, "strip", import("zod").ZodTypeAny, {
|
101
|
-
schema: string | string[];
|
102
|
-
out: string;
|
103
|
-
breakpoints: boolean;
|
104
|
-
}, {
|
105
|
-
schema: string | string[];
|
106
|
-
out?: string | undefined;
|
107
|
-
breakpoints?: boolean | undefined;
|
108
|
-
}>;
|
109
|
-
export type GenerateSchema = TypeOf<typeof configGenerateSchema>;
|
110
|
-
export declare const configPushSchema: import("zod").ZodObject<{
|
111
|
-
dialect: import("zod").ZodEnum<["pg", "mysql", "sqlite"]>;
|
112
|
-
schema: import("zod").ZodUnion<[import("zod").ZodString, import("zod").ZodArray<import("zod").ZodString, "many">]>;
|
113
|
-
tablesFilter: import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodString, import("zod").ZodArray<import("zod").ZodString, "many">]>>;
|
114
|
-
schemaFilter: import("zod").ZodDefault<import("zod").ZodUnion<[import("zod").ZodString, import("zod").ZodArray<import("zod").ZodString, "many">]>>;
|
115
|
-
verbose: import("zod").ZodDefault<import("zod").ZodBoolean>;
|
116
|
-
strict: import("zod").ZodDefault<import("zod").ZodBoolean>;
|
117
|
-
out: import("zod").ZodOptional<import("zod").ZodString>;
|
118
|
-
}, "strip", import("zod").ZodTypeAny, {
|
119
|
-
strict: boolean;
|
120
|
-
schema: string | string[];
|
121
|
-
dialect: "mysql" | "pg" | "sqlite";
|
122
|
-
schemaFilter: string | string[];
|
123
|
-
verbose: boolean;
|
124
|
-
out?: string | undefined;
|
125
|
-
tablesFilter?: string | string[] | undefined;
|
126
|
-
}, {
|
127
|
-
schema: string | string[];
|
128
|
-
dialect: "mysql" | "pg" | "sqlite";
|
129
|
-
strict?: boolean | undefined;
|
130
|
-
out?: string | undefined;
|
131
|
-
tablesFilter?: string | string[] | undefined;
|
132
|
-
schemaFilter?: string | string[] | undefined;
|
133
|
-
verbose?: boolean | undefined;
|
134
|
-
}>;
|
135
|
-
export declare const mysqlConnectionSchema: import("zod").ZodUnion<[import("zod").ZodObject<{
|
136
|
-
host: import("zod").ZodString;
|
137
|
-
port: import("zod").ZodOptional<import("zod").ZodNumber>;
|
138
|
-
user: import("zod").ZodDefault<import("zod").ZodString>;
|
139
|
-
password: import("zod").ZodOptional<import("zod").ZodString>;
|
140
|
-
database: import("zod").ZodString;
|
141
|
-
}, "strip", import("zod").ZodTypeAny, {
|
142
|
-
host: string;
|
143
|
-
user: string;
|
144
|
-
database: string;
|
145
|
-
port?: number | undefined;
|
146
|
-
password?: string | undefined;
|
147
|
-
}, {
|
148
|
-
host: string;
|
149
|
-
database: string;
|
150
|
-
port?: number | undefined;
|
151
|
-
user?: string | undefined;
|
152
|
-
password?: string | undefined;
|
153
|
-
}>, import("zod").ZodObject<{
|
154
|
-
connectionString: import("zod").ZodString;
|
155
|
-
}, "strip", import("zod").ZodTypeAny, {
|
156
|
-
connectionString: string;
|
157
|
-
}, {
|
158
|
-
connectionString: string;
|
159
|
-
}>, import("zod").ZodObject<{}, "strip", import("zod").ZodTypeAny, {}, {}>]>;
|
160
|
-
export declare const mySqlCliConfigSchema: import("zod").ZodIntersection<import("zod").ZodObject<{
|
161
|
-
dialect: import("zod").ZodEnum<["pg", "mysql", "sqlite"]>;
|
162
|
-
schema: import("zod").ZodUnion<[import("zod").ZodString, import("zod").ZodArray<import("zod").ZodString, "many">]>;
|
163
|
-
out: import("zod").ZodOptional<import("zod").ZodString>;
|
164
|
-
breakpoints: import("zod").ZodDefault<import("zod").ZodBoolean>;
|
165
|
-
driver: import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodUnion<[import("zod").ZodLiteral<"better-sqlite">, import("zod").ZodLiteral<"turso">, import("zod").ZodLiteral<"libsql">, import("zod").ZodLiteral<"d1">, import("zod").ZodLiteral<"expo">]>, import("zod").ZodLiteral<"pg">, import("zod").ZodLiteral<"mysql2">]>>;
|
166
|
-
tablesFilter: import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodString, import("zod").ZodArray<import("zod").ZodString, "many">]>>;
|
167
|
-
schemaFilter: import("zod").ZodDefault<import("zod").ZodUnion<[import("zod").ZodString, import("zod").ZodArray<import("zod").ZodString, "many">]>>;
|
168
|
-
}, "strip", import("zod").ZodTypeAny, {
|
169
|
-
schema: string | string[];
|
170
|
-
dialect: "mysql" | "pg" | "sqlite";
|
171
|
-
breakpoints: boolean;
|
172
|
-
schemaFilter: string | string[];
|
173
|
-
out?: string | undefined;
|
174
|
-
driver?: "pg" | "turso" | "better-sqlite" | "libsql" | "d1" | "mysql2" | "expo" | undefined;
|
175
|
-
tablesFilter?: string | string[] | undefined;
|
176
|
-
}, {
|
177
|
-
schema: string | string[];
|
178
|
-
dialect: "mysql" | "pg" | "sqlite";
|
179
|
-
out?: string | undefined;
|
180
|
-
breakpoints?: boolean | undefined;
|
181
|
-
driver?: "pg" | "turso" | "better-sqlite" | "libsql" | "d1" | "mysql2" | "expo" | undefined;
|
182
|
-
tablesFilter?: string | string[] | undefined;
|
183
|
-
schemaFilter?: string | string[] | undefined;
|
184
|
-
}>, import("zod").ZodUnion<[import("zod").ZodObject<{
|
185
|
-
host: import("zod").ZodString;
|
186
|
-
port: import("zod").ZodOptional<import("zod").ZodNumber>;
|
187
|
-
user: import("zod").ZodDefault<import("zod").ZodString>;
|
188
|
-
password: import("zod").ZodOptional<import("zod").ZodString>;
|
189
|
-
database: import("zod").ZodString;
|
190
|
-
}, "strip", import("zod").ZodTypeAny, {
|
191
|
-
host: string;
|
192
|
-
user: string;
|
193
|
-
database: string;
|
194
|
-
port?: number | undefined;
|
195
|
-
password?: string | undefined;
|
196
|
-
}, {
|
197
|
-
host: string;
|
198
|
-
database: string;
|
199
|
-
port?: number | undefined;
|
200
|
-
user?: string | undefined;
|
201
|
-
password?: string | undefined;
|
202
|
-
}>, import("zod").ZodObject<{
|
203
|
-
connectionString: import("zod").ZodString;
|
204
|
-
}, "strip", import("zod").ZodTypeAny, {
|
205
|
-
connectionString: string;
|
206
|
-
}, {
|
207
|
-
connectionString: string;
|
208
|
-
}>, import("zod").ZodObject<{}, "strip", import("zod").ZodTypeAny, {}, {}>]>>;
|
209
|
-
export type MySqlCliConfig = TypeOf<typeof mySqlCliConfigSchema>;
|
210
|
-
export type CliConfig = MySqlCliConfig;
|
211
|
-
export type SqliteDriver = TypeOf<typeof sqliteDriver>;
|
212
|
-
export type MysqlDriver = TypeOf<typeof mysqlDriver>;
|
213
|
-
export type PostgresDriver = TypeOf<typeof postgresDriver>;
|
214
|
-
export type Driver = TypeOf<typeof driver>;
|
13
|
+
export declare const checkCollisions: (options: Record<string, unknown>, command: Commands, inputWhitelist?: string[]) => CollusionCheckOutput;
|