drizzle-kit 0.20.14-6ce9d1f → 0.20.14-a183d8b

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,4 +1,4 @@
1
- import type { SQLiteCliConfig, SQLiteConnectionConfig } from "./sqliteUtils";
1
+ import type { SQLiteCliConfig, SQLiteConnectionConfig } from "../validations/sqlite";
2
2
  import type { DrizzleDbClient } from "../../drivers";
3
3
  export declare const connectToSQLite: (config: SQLiteConnectionConfig) => Promise<{
4
4
  client: import("../../drivers").BetterSqlite;
@@ -1,25 +1,21 @@
1
- import { TypeOf } from "zod";
2
- import { CliParamsPush } from "..";
1
+ import { CliConfigGenerate, CliParamsPush } from "..";
3
2
  import { MySQLPushConfig } from "../validations/mysql";
4
3
  import { PgPushConfig } from "../validations/pg";
5
4
  import { SQLitePushConfig } from "../validations/sqlite";
5
+ import { CliConfig } from "../validations/common";
6
+ import { Dialect } from "src/schemaValidator";
6
7
  export declare const safeRegister: () => Promise<{
7
8
  unregister: () => void;
8
9
  }>;
9
10
  export type GenerateConfig = {
11
+ dialect: Dialect;
10
12
  schema: string | string[];
11
13
  out: string;
12
14
  breakpoints: boolean;
13
15
  custom: boolean;
14
16
  bundle: boolean;
15
17
  };
16
- export declare const prepareGenerateConfig: (options: {
17
- schema?: string | string[];
18
- out?: string;
19
- config?: string;
20
- breakpoints: boolean;
21
- custom: boolean;
22
- }) => Promise<GenerateConfig>;
18
+ export declare const prepareGenerateConfig: (options: CliConfigGenerate) => Promise<GenerateConfig>;
23
19
  export declare const preparePushConfig: (options: CliParamsPush) => Promise<{
24
20
  config: MySQLPushConfig | PgPushConfig | SQLitePushConfig;
25
21
  schemaFiles: string[];
@@ -30,254 +26,5 @@ export declare const assertOutFolder: (it: {
30
26
  } | {
31
27
  out: string;
32
28
  }) => Promise<string>;
33
- 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">]>;
34
- export declare const configCommonSchema: import("zod").ZodObject<{
35
- schema: import("zod").ZodUnion<[import("zod").ZodString, import("zod").ZodArray<import("zod").ZodString, "many">]>;
36
- out: import("zod").ZodOptional<import("zod").ZodString>;
37
- breakpoints: import("zod").ZodDefault<import("zod").ZodBoolean>;
38
- 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">]>>;
39
- tablesFilter: import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodString, import("zod").ZodArray<import("zod").ZodString, "many">]>>;
40
- schemaFilter: import("zod").ZodDefault<import("zod").ZodUnion<[import("zod").ZodString, import("zod").ZodArray<import("zod").ZodString, "many">]>>;
41
- }, "strip", import("zod").ZodTypeAny, {
42
- out?: string | undefined;
43
- driver?: "pg" | "turso" | "better-sqlite" | "libsql" | "d1" | "mysql2" | "expo" | undefined;
44
- tablesFilter?: string | string[] | undefined;
45
- schema: string | string[];
46
- breakpoints: boolean;
47
- schemaFilter: string | string[];
48
- }, {
49
- out?: string | undefined;
50
- driver?: "pg" | "turso" | "better-sqlite" | "libsql" | "d1" | "mysql2" | "expo" | undefined;
51
- breakpoints?: boolean | undefined;
52
- tablesFilter?: string | string[] | undefined;
53
- schemaFilter?: string | string[] | undefined;
54
- schema: string | string[];
55
- }>;
56
- export declare const introspectCasing: import("zod").ZodDefault<import("zod").ZodObject<{
57
- casing: import("zod").ZodDefault<import("zod").ZodUnion<[import("zod").ZodLiteral<"camel">, import("zod").ZodLiteral<"preserve">]>>;
58
- }, "strip", import("zod").ZodTypeAny, {
59
- casing: "camel" | "preserve";
60
- }, {
61
- casing?: "camel" | "preserve" | undefined;
62
- }>>;
63
- export declare const configIntrospectSchema: import("zod").ZodObject<{
64
- schema: import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodString, import("zod").ZodArray<import("zod").ZodString, "many">]>>;
65
- out: import("zod").ZodDefault<import("zod").ZodOptional<import("zod").ZodString>>;
66
- breakpoints: import("zod").ZodDefault<import("zod").ZodBoolean>;
67
- tablesFilter: import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodString, import("zod").ZodArray<import("zod").ZodString, "many">]>>;
68
- schemaFilter: import("zod").ZodDefault<import("zod").ZodUnion<[import("zod").ZodString, import("zod").ZodArray<import("zod").ZodString, "many">]>>;
69
- introspect: import("zod").ZodDefault<import("zod").ZodObject<{
70
- casing: import("zod").ZodDefault<import("zod").ZodUnion<[import("zod").ZodLiteral<"camel">, import("zod").ZodLiteral<"preserve">]>>;
71
- }, "strip", import("zod").ZodTypeAny, {
72
- casing: "camel" | "preserve";
73
- }, {
74
- casing?: "camel" | "preserve" | undefined;
75
- }>>;
76
- }, "strip", import("zod").ZodTypeAny, {
77
- schema?: string | string[] | undefined;
78
- tablesFilter?: string | string[] | undefined;
79
- out: string;
80
- breakpoints: boolean;
81
- schemaFilter: string | string[];
82
- introspect: {
83
- casing: "camel" | "preserve";
84
- };
85
- }, {
86
- schema?: string | string[] | undefined;
87
- out?: string | undefined;
88
- breakpoints?: boolean | undefined;
89
- tablesFilter?: string | string[] | undefined;
90
- schemaFilter?: string | string[] | undefined;
91
- introspect?: {
92
- casing?: "camel" | "preserve" | undefined;
93
- } | undefined;
94
- }>;
95
- export type ConfigIntrospectSchema = TypeOf<typeof configIntrospectSchema>;
96
- export type ConfigIntrospectCasing = TypeOf<typeof introspectCasing>;
97
- export declare const configIntrospectCliSchema: import("zod").ZodObject<{
98
- schema: import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodString, import("zod").ZodArray<import("zod").ZodString, "many">]>>;
99
- out: import("zod").ZodDefault<import("zod").ZodOptional<import("zod").ZodString>>;
100
- breakpoints: import("zod").ZodDefault<import("zod").ZodBoolean>;
101
- tablesFilter: import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodString, import("zod").ZodArray<import("zod").ZodString, "many">]>>;
102
- schemaFilter: import("zod").ZodDefault<import("zod").ZodUnion<[import("zod").ZodString, import("zod").ZodArray<import("zod").ZodString, "many">]>>;
103
- introspectCasing: import("zod").ZodDefault<import("zod").ZodUnion<[import("zod").ZodLiteral<"camel">, import("zod").ZodLiteral<"preserve">]>>;
104
- }, "strip", import("zod").ZodTypeAny, {
105
- schema?: string | string[] | undefined;
106
- tablesFilter?: string | string[] | undefined;
107
- out: string;
108
- breakpoints: boolean;
109
- schemaFilter: string | string[];
110
- introspectCasing: "camel" | "preserve";
111
- }, {
112
- schema?: string | string[] | undefined;
113
- out?: string | undefined;
114
- breakpoints?: boolean | undefined;
115
- tablesFilter?: string | string[] | undefined;
116
- schemaFilter?: string | string[] | undefined;
117
- introspectCasing?: "camel" | "preserve" | undefined;
118
- }>;
119
- export declare const configGenerateSchema: import("zod").ZodObject<{
120
- schema: import("zod").ZodUnion<[import("zod").ZodString, import("zod").ZodArray<import("zod").ZodString, "many">]>;
121
- out: import("zod").ZodDefault<import("zod").ZodOptional<import("zod").ZodString>>;
122
- breakpoints: import("zod").ZodDefault<import("zod").ZodBoolean>;
123
- }, "strip", import("zod").ZodTypeAny, {
124
- schema: string | string[];
125
- out: string;
126
- breakpoints: boolean;
127
- }, {
128
- out?: string | undefined;
129
- breakpoints?: boolean | undefined;
130
- schema: string | string[];
131
- }>;
132
- export type GenerateSchema = TypeOf<typeof configGenerateSchema>;
133
- export declare const configPushSchema: import("zod").ZodObject<{
134
- schema: import("zod").ZodUnion<[import("zod").ZodString, import("zod").ZodArray<import("zod").ZodString, "many">]>;
135
- tablesFilter: import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodString, import("zod").ZodArray<import("zod").ZodString, "many">]>>;
136
- schemaFilter: import("zod").ZodDefault<import("zod").ZodUnion<[import("zod").ZodString, import("zod").ZodArray<import("zod").ZodString, "many">]>>;
137
- verbose: import("zod").ZodDefault<import("zod").ZodBoolean>;
138
- strict: import("zod").ZodDefault<import("zod").ZodBoolean>;
139
- }, "strip", import("zod").ZodTypeAny, {
140
- tablesFilter?: string | string[] | undefined;
141
- strict: boolean;
142
- schema: string | string[];
143
- schemaFilter: string | string[];
144
- verbose: boolean;
145
- }, {
146
- strict?: boolean | undefined;
147
- tablesFilter?: string | string[] | undefined;
148
- schemaFilter?: string | string[] | undefined;
149
- verbose?: boolean | undefined;
150
- schema: string | string[];
151
- }>;
152
- export declare const mysqlConnectionSchema: import("zod").ZodUnion<[import("zod").ZodObject<{
153
- host: import("zod").ZodString;
154
- port: import("zod").ZodOptional<import("zod").ZodNumber>;
155
- user: import("zod").ZodDefault<import("zod").ZodString>;
156
- password: import("zod").ZodOptional<import("zod").ZodString>;
157
- database: import("zod").ZodString;
158
- }, "strip", import("zod").ZodTypeAny, {
159
- port?: number | undefined;
160
- password?: string | undefined;
161
- host: string;
162
- user: string;
163
- database: string;
164
- }, {
165
- port?: number | undefined;
166
- user?: string | undefined;
167
- password?: string | undefined;
168
- host: string;
169
- database: string;
170
- }>, import("zod").ZodObject<{
171
- connectionString: import("zod").ZodString;
172
- }, "strip", import("zod").ZodTypeAny, {
173
- connectionString: string;
174
- }, {
175
- connectionString: string;
176
- }>, import("zod").ZodObject<{}, "strip", import("zod").ZodTypeAny, {}, {}>]>;
177
- export declare const mySqlCliConfigSchema: import("zod").ZodIntersection<import("zod").ZodObject<{
178
- schema: import("zod").ZodUnion<[import("zod").ZodString, import("zod").ZodArray<import("zod").ZodString, "many">]>;
179
- out: import("zod").ZodOptional<import("zod").ZodString>;
180
- breakpoints: import("zod").ZodDefault<import("zod").ZodBoolean>;
181
- 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">]>>;
182
- tablesFilter: import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodString, import("zod").ZodArray<import("zod").ZodString, "many">]>>;
183
- schemaFilter: import("zod").ZodDefault<import("zod").ZodUnion<[import("zod").ZodString, import("zod").ZodArray<import("zod").ZodString, "many">]>>;
184
- }, "strip", import("zod").ZodTypeAny, {
185
- out?: string | undefined;
186
- driver?: "pg" | "turso" | "better-sqlite" | "libsql" | "d1" | "mysql2" | "expo" | undefined;
187
- tablesFilter?: string | string[] | undefined;
188
- schema: string | string[];
189
- breakpoints: boolean;
190
- schemaFilter: string | string[];
191
- }, {
192
- out?: string | undefined;
193
- driver?: "pg" | "turso" | "better-sqlite" | "libsql" | "d1" | "mysql2" | "expo" | undefined;
194
- breakpoints?: boolean | undefined;
195
- tablesFilter?: string | string[] | undefined;
196
- schemaFilter?: string | string[] | undefined;
197
- schema: string | string[];
198
- }>, import("zod").ZodUnion<[import("zod").ZodObject<{
199
- host: import("zod").ZodString;
200
- port: import("zod").ZodOptional<import("zod").ZodNumber>;
201
- user: import("zod").ZodDefault<import("zod").ZodString>;
202
- password: import("zod").ZodOptional<import("zod").ZodString>;
203
- database: import("zod").ZodString;
204
- }, "strip", import("zod").ZodTypeAny, {
205
- port?: number | undefined;
206
- password?: string | undefined;
207
- host: string;
208
- user: string;
209
- database: string;
210
- }, {
211
- port?: number | undefined;
212
- user?: string | undefined;
213
- password?: string | undefined;
214
- host: string;
215
- database: string;
216
- }>, import("zod").ZodObject<{
217
- connectionString: import("zod").ZodString;
218
- }, "strip", import("zod").ZodTypeAny, {
219
- connectionString: string;
220
- }, {
221
- connectionString: string;
222
- }>, import("zod").ZodObject<{}, "strip", import("zod").ZodTypeAny, {}, {}>]>>;
223
- export declare const mySqlIntrospectConfigSchema: import("zod").ZodIntersection<import("zod").ZodObject<{
224
- schema: import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodString, import("zod").ZodArray<import("zod").ZodString, "many">]>>;
225
- out: import("zod").ZodDefault<import("zod").ZodOptional<import("zod").ZodString>>;
226
- breakpoints: import("zod").ZodDefault<import("zod").ZodBoolean>;
227
- tablesFilter: import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodString, import("zod").ZodArray<import("zod").ZodString, "many">]>>;
228
- schemaFilter: import("zod").ZodDefault<import("zod").ZodUnion<[import("zod").ZodString, import("zod").ZodArray<import("zod").ZodString, "many">]>>;
229
- introspect: import("zod").ZodDefault<import("zod").ZodObject<{
230
- casing: import("zod").ZodDefault<import("zod").ZodUnion<[import("zod").ZodLiteral<"camel">, import("zod").ZodLiteral<"preserve">]>>;
231
- }, "strip", import("zod").ZodTypeAny, {
232
- casing: "camel" | "preserve";
233
- }, {
234
- casing?: "camel" | "preserve" | undefined;
235
- }>>;
236
- }, "strip", import("zod").ZodTypeAny, {
237
- schema?: string | string[] | undefined;
238
- tablesFilter?: string | string[] | undefined;
239
- out: string;
240
- breakpoints: boolean;
241
- schemaFilter: string | string[];
242
- introspect: {
243
- casing: "camel" | "preserve";
244
- };
245
- }, {
246
- schema?: string | string[] | undefined;
247
- out?: string | undefined;
248
- breakpoints?: boolean | undefined;
249
- tablesFilter?: string | string[] | undefined;
250
- schemaFilter?: string | string[] | undefined;
251
- introspect?: {
252
- casing?: "camel" | "preserve" | undefined;
253
- } | undefined;
254
- }>, import("zod").ZodUnion<[import("zod").ZodObject<{
255
- host: import("zod").ZodString;
256
- port: import("zod").ZodOptional<import("zod").ZodNumber>;
257
- user: import("zod").ZodDefault<import("zod").ZodString>;
258
- password: import("zod").ZodOptional<import("zod").ZodString>;
259
- database: import("zod").ZodString;
260
- }, "strip", import("zod").ZodTypeAny, {
261
- port?: number | undefined;
262
- password?: string | undefined;
263
- host: string;
264
- user: string;
265
- database: string;
266
- }, {
267
- port?: number | undefined;
268
- user?: string | undefined;
269
- password?: string | undefined;
270
- host: string;
271
- database: string;
272
- }>, import("zod").ZodObject<{
273
- connectionString: import("zod").ZodString;
274
- }, "strip", import("zod").ZodTypeAny, {
275
- connectionString: string;
276
- }, {
277
- connectionString: string;
278
- }>, import("zod").ZodObject<{}, "strip", import("zod").ZodTypeAny, {}, {}>]>>;
279
- export type MySqlCliConfig = TypeOf<typeof mySqlCliConfigSchema>;
280
- export type CliConfig = MySqlCliConfig;
281
- export type Driver = TypeOf<typeof driver>;
282
29
  export declare const drizzleConfigFromFile: (configPath?: string) => Promise<CliConfig>;
283
30
  export declare const readDrizzleConfig: (configPath?: string) => Promise<any>;
package/cli/index.d.ts CHANGED
@@ -1,12 +1,35 @@
1
1
  import { TypeOf } from "zod";
2
2
  import "../@types/utils";
3
3
  import "dotenv/config";
4
+ declare const cliConfigGenerate: import("zod").ZodObject<{
5
+ dialect: import("zod").ZodOptional<import("zod").ZodEnum<["pg", "mysql", "sqlite"]>>;
6
+ schema: import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodString, import("zod").ZodArray<import("zod").ZodString, "many">]>>;
7
+ out: import("zod").ZodDefault<import("zod").ZodOptional<import("zod").ZodString>>;
8
+ config: import("zod").ZodOptional<import("zod").ZodString>;
9
+ breakpoints: import("zod").ZodDefault<import("zod").ZodOptional<import("zod").ZodBoolean>>;
10
+ custom: import("zod").ZodDefault<import("zod").ZodOptional<import("zod").ZodBoolean>>;
11
+ }, "strict", import("zod").ZodTypeAny, {
12
+ schema?: string | string[] | undefined;
13
+ dialect?: "mysql" | "pg" | "sqlite" | undefined;
14
+ config?: string | undefined;
15
+ custom: boolean;
16
+ out: string;
17
+ breakpoints: boolean;
18
+ }, {
19
+ custom?: boolean | undefined;
20
+ schema?: string | string[] | undefined;
21
+ dialect?: "mysql" | "pg" | "sqlite" | undefined;
22
+ out?: string | undefined;
23
+ config?: string | undefined;
24
+ breakpoints?: boolean | undefined;
25
+ }>;
26
+ export type CliConfigGenerate = TypeOf<typeof cliConfigGenerate>;
4
27
  declare const cliParamsPush: import("zod").ZodObject<{
5
28
  config: import("zod").ZodOptional<import("zod").ZodString>;
6
- dialect: import("zod").ZodEnum<["pg", "mysql", "sqlite"]>;
29
+ dialect: import("zod").ZodOptional<import("zod").ZodEnum<["pg", "mysql", "sqlite"]>>;
7
30
  schema: import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodString, import("zod").ZodArray<import("zod").ZodString, "many">]>>;
8
31
  tablesFilter: import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodString, import("zod").ZodArray<import("zod").ZodString, "many">]>>;
9
- driver: import("zod").ZodString;
32
+ driver: import("zod").ZodOptional<import("zod").ZodString>;
10
33
  connectionString: import("zod").ZodOptional<import("zod").ZodString>;
11
34
  host: import("zod").ZodOptional<import("zod").ZodString>;
12
35
  port: import("zod").ZodOptional<import("zod").ZodString>;
@@ -16,42 +39,42 @@ declare const cliParamsPush: import("zod").ZodObject<{
16
39
  ssl: import("zod").ZodOptional<import("zod").ZodString>;
17
40
  uri: import("zod").ZodOptional<import("zod").ZodString>;
18
41
  authToken: import("zod").ZodOptional<import("zod").ZodString>;
19
- verbose: import("zod").ZodDefault<import("zod").ZodBoolean>;
20
- strict: import("zod").ZodDefault<import("zod").ZodBoolean>;
42
+ verbose: import("zod").ZodOptional<import("zod").ZodBoolean>;
43
+ strict: import("zod").ZodOptional<import("zod").ZodBoolean>;
21
44
  }, "strict", import("zod").ZodTypeAny, {
45
+ strict?: boolean | undefined;
22
46
  schema?: string | string[] | undefined;
23
- authToken?: string | undefined;
24
- tablesFilter?: string | string[] | undefined;
47
+ dialect?: "mysql" | "pg" | "sqlite" | undefined;
25
48
  config?: string | undefined;
49
+ driver?: string | undefined;
50
+ tablesFilter?: string | string[] | undefined;
51
+ verbose?: boolean | undefined;
26
52
  host?: string | undefined;
27
53
  port?: string | undefined;
28
54
  user?: string | undefined;
29
55
  password?: string | undefined;
30
56
  database?: string | undefined;
31
- ssl?: string | undefined;
32
57
  connectionString?: string | undefined;
58
+ authToken?: string | undefined;
59
+ ssl?: string | undefined;
33
60
  uri?: string | undefined;
34
- strict: boolean;
35
- dialect: "mysql" | "pg" | "sqlite";
36
- driver: string;
37
- verbose: boolean;
38
61
  }, {
39
62
  strict?: boolean | undefined;
40
63
  schema?: string | string[] | undefined;
41
- authToken?: string | undefined;
42
- tablesFilter?: string | string[] | undefined;
64
+ dialect?: "mysql" | "pg" | "sqlite" | undefined;
43
65
  config?: string | undefined;
66
+ driver?: string | undefined;
67
+ tablesFilter?: string | string[] | undefined;
44
68
  verbose?: boolean | undefined;
45
69
  host?: string | undefined;
46
70
  port?: string | undefined;
47
71
  user?: string | undefined;
48
72
  password?: string | undefined;
49
73
  database?: string | undefined;
50
- ssl?: string | undefined;
51
74
  connectionString?: string | undefined;
75
+ authToken?: string | undefined;
76
+ ssl?: string | undefined;
52
77
  uri?: string | undefined;
53
- dialect: "mysql" | "pg" | "sqlite";
54
- driver: string;
55
78
  }>;
56
79
  export type CliParamsPush = TypeOf<typeof cliParamsPush>;
57
80
  export declare const checkSchema: import("zod").ZodObject<{
@@ -60,12 +83,12 @@ export declare const checkSchema: import("zod").ZodObject<{
60
83
  driver: import("zod").ZodOptional<import("zod").ZodString>;
61
84
  }, "strict", import("zod").ZodTypeAny, {
62
85
  out?: string | undefined;
63
- driver?: string | undefined;
64
86
  config?: string | undefined;
87
+ driver?: string | undefined;
65
88
  }, {
66
89
  out?: string | undefined;
67
- driver?: string | undefined;
68
90
  config?: string | undefined;
91
+ driver?: string | undefined;
69
92
  }>;
70
93
  export type CheckConfig = TypeOf<typeof checkSchema>;
71
94
  export {};
@@ -1,13 +1,211 @@
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" | "check:pg" | "check:mysql" | "check:sqlite" | "up:pg" | "up:mysql" | "up:sqlite" | "drop" | "introspect:mysql" | "push:mysql" | "push:pg";
1
+ import { TypeOf } from "zod";
2
+ export type Commands = "introspect:sqlite" | "introspect:pg" | "generate" | "check:pg" | "check:mysql" | "check:sqlite" | "up:pg" | "up:mysql" | "up:sqlite" | "drop" | "introspect:mysql" | "push";
7
3
  /**
8
4
  * This function checks an input from a user and if there are any params together with config path - return true
9
5
  * @param options - user input
10
6
  * @param inputWhitelist - whitelist some cli options that can be used together with config option
11
7
  * @returns true if there was a collision, false if everything is valid
12
8
  */
13
- export declare const checkCollisions: (options: Record<string, unknown>, command: Commands, inputWhitelist?: string[]) => CollusionCheckOutput;
9
+ export declare const assertCollisions: (options: Record<string, unknown>, command: Commands, inputWhitelist?: string[]) => "config" | "cli";
10
+ 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">]>;
11
+ export declare const configCommonSchema: import("zod").ZodObject<{
12
+ dialect: import("zod").ZodEnum<["pg", "mysql", "sqlite"]>;
13
+ schema: import("zod").ZodUnion<[import("zod").ZodString, import("zod").ZodArray<import("zod").ZodString, "many">]>;
14
+ out: import("zod").ZodOptional<import("zod").ZodString>;
15
+ breakpoints: import("zod").ZodDefault<import("zod").ZodBoolean>;
16
+ 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">]>>;
17
+ tablesFilter: import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodString, import("zod").ZodArray<import("zod").ZodString, "many">]>>;
18
+ schemaFilter: import("zod").ZodDefault<import("zod").ZodUnion<[import("zod").ZodString, import("zod").ZodArray<import("zod").ZodString, "many">]>>;
19
+ }, "strip", import("zod").ZodTypeAny, {
20
+ out?: string | undefined;
21
+ driver?: "pg" | "turso" | "better-sqlite" | "libsql" | "d1" | "mysql2" | "expo" | undefined;
22
+ tablesFilter?: string | string[] | undefined;
23
+ schema: string | string[];
24
+ dialect: "mysql" | "pg" | "sqlite";
25
+ breakpoints: boolean;
26
+ schemaFilter: string | string[];
27
+ }, {
28
+ out?: string | undefined;
29
+ breakpoints?: boolean | undefined;
30
+ driver?: "pg" | "turso" | "better-sqlite" | "libsql" | "d1" | "mysql2" | "expo" | undefined;
31
+ tablesFilter?: string | string[] | undefined;
32
+ schemaFilter?: string | string[] | undefined;
33
+ schema: string | string[];
34
+ dialect: "mysql" | "pg" | "sqlite";
35
+ }>;
36
+ export declare const introspectCasing: import("zod").ZodDefault<import("zod").ZodObject<{
37
+ casing: import("zod").ZodDefault<import("zod").ZodUnion<[import("zod").ZodLiteral<"camel">, import("zod").ZodLiteral<"preserve">]>>;
38
+ }, "strip", import("zod").ZodTypeAny, {
39
+ casing: "camel" | "preserve";
40
+ }, {
41
+ casing?: "camel" | "preserve" | undefined;
42
+ }>>;
43
+ export declare const configIntrospectSchema: import("zod").ZodObject<{
44
+ schema: import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodString, import("zod").ZodArray<import("zod").ZodString, "many">]>>;
45
+ out: import("zod").ZodDefault<import("zod").ZodOptional<import("zod").ZodString>>;
46
+ breakpoints: import("zod").ZodDefault<import("zod").ZodBoolean>;
47
+ tablesFilter: import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodString, import("zod").ZodArray<import("zod").ZodString, "many">]>>;
48
+ schemaFilter: import("zod").ZodDefault<import("zod").ZodUnion<[import("zod").ZodString, import("zod").ZodArray<import("zod").ZodString, "many">]>>;
49
+ introspect: import("zod").ZodDefault<import("zod").ZodObject<{
50
+ casing: import("zod").ZodDefault<import("zod").ZodUnion<[import("zod").ZodLiteral<"camel">, import("zod").ZodLiteral<"preserve">]>>;
51
+ }, "strip", import("zod").ZodTypeAny, {
52
+ casing: "camel" | "preserve";
53
+ }, {
54
+ casing?: "camel" | "preserve" | undefined;
55
+ }>>;
56
+ }, "strip", import("zod").ZodTypeAny, {
57
+ schema?: string | string[] | undefined;
58
+ tablesFilter?: string | string[] | undefined;
59
+ out: string;
60
+ breakpoints: boolean;
61
+ schemaFilter: string | string[];
62
+ introspect: {
63
+ casing: "camel" | "preserve";
64
+ };
65
+ }, {
66
+ schema?: string | string[] | undefined;
67
+ out?: string | undefined;
68
+ breakpoints?: boolean | undefined;
69
+ tablesFilter?: string | string[] | undefined;
70
+ schemaFilter?: string | string[] | undefined;
71
+ introspect?: {
72
+ casing?: "camel" | "preserve" | undefined;
73
+ } | undefined;
74
+ }>;
75
+ export type ConfigIntrospectSchema = TypeOf<typeof configIntrospectSchema>;
76
+ export type ConfigIntrospectCasing = TypeOf<typeof introspectCasing>;
77
+ export declare const configIntrospectCliSchema: import("zod").ZodObject<{
78
+ schema: import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodString, import("zod").ZodArray<import("zod").ZodString, "many">]>>;
79
+ out: import("zod").ZodDefault<import("zod").ZodOptional<import("zod").ZodString>>;
80
+ breakpoints: import("zod").ZodDefault<import("zod").ZodBoolean>;
81
+ tablesFilter: import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodString, import("zod").ZodArray<import("zod").ZodString, "many">]>>;
82
+ schemaFilter: import("zod").ZodDefault<import("zod").ZodUnion<[import("zod").ZodString, import("zod").ZodArray<import("zod").ZodString, "many">]>>;
83
+ introspectCasing: import("zod").ZodDefault<import("zod").ZodUnion<[import("zod").ZodLiteral<"camel">, import("zod").ZodLiteral<"preserve">]>>;
84
+ }, "strip", import("zod").ZodTypeAny, {
85
+ schema?: string | string[] | undefined;
86
+ tablesFilter?: string | string[] | undefined;
87
+ out: string;
88
+ breakpoints: boolean;
89
+ schemaFilter: string | string[];
90
+ introspectCasing: "camel" | "preserve";
91
+ }, {
92
+ schema?: string | string[] | undefined;
93
+ out?: string | undefined;
94
+ breakpoints?: boolean | undefined;
95
+ tablesFilter?: string | string[] | undefined;
96
+ schemaFilter?: string | string[] | undefined;
97
+ introspectCasing?: "camel" | "preserve" | undefined;
98
+ }>;
99
+ export declare const configGenerateSchema: import("zod").ZodObject<{
100
+ schema: import("zod").ZodUnion<[import("zod").ZodString, import("zod").ZodArray<import("zod").ZodString, "many">]>;
101
+ out: import("zod").ZodDefault<import("zod").ZodOptional<import("zod").ZodString>>;
102
+ breakpoints: import("zod").ZodDefault<import("zod").ZodBoolean>;
103
+ }, "strip", import("zod").ZodTypeAny, {
104
+ schema: string | string[];
105
+ out: string;
106
+ breakpoints: boolean;
107
+ }, {
108
+ out?: string | undefined;
109
+ breakpoints?: boolean | undefined;
110
+ schema: string | string[];
111
+ }>;
112
+ export type GenerateSchema = TypeOf<typeof configGenerateSchema>;
113
+ export declare const configPushSchema: import("zod").ZodObject<{
114
+ dialect: import("zod").ZodEnum<["pg", "mysql", "sqlite"]>;
115
+ schema: import("zod").ZodUnion<[import("zod").ZodString, import("zod").ZodArray<import("zod").ZodString, "many">]>;
116
+ tablesFilter: import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodString, import("zod").ZodArray<import("zod").ZodString, "many">]>>;
117
+ schemaFilter: import("zod").ZodDefault<import("zod").ZodUnion<[import("zod").ZodString, import("zod").ZodArray<import("zod").ZodString, "many">]>>;
118
+ verbose: import("zod").ZodDefault<import("zod").ZodBoolean>;
119
+ strict: import("zod").ZodDefault<import("zod").ZodBoolean>;
120
+ }, "strip", import("zod").ZodTypeAny, {
121
+ tablesFilter?: string | string[] | undefined;
122
+ strict: boolean;
123
+ schema: string | string[];
124
+ dialect: "mysql" | "pg" | "sqlite";
125
+ schemaFilter: string | string[];
126
+ verbose: boolean;
127
+ }, {
128
+ strict?: boolean | undefined;
129
+ tablesFilter?: string | string[] | undefined;
130
+ schemaFilter?: string | string[] | undefined;
131
+ verbose?: boolean | undefined;
132
+ schema: string | string[];
133
+ dialect: "mysql" | "pg" | "sqlite";
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
+ port?: number | undefined;
143
+ password?: string | undefined;
144
+ host: string;
145
+ user: string;
146
+ database: string;
147
+ }, {
148
+ port?: number | undefined;
149
+ user?: string | undefined;
150
+ password?: string | undefined;
151
+ host: string;
152
+ database: string;
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").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
+ out?: string | undefined;
170
+ driver?: "pg" | "turso" | "better-sqlite" | "libsql" | "d1" | "mysql2" | "expo" | undefined;
171
+ tablesFilter?: string | string[] | undefined;
172
+ schema: string | string[];
173
+ dialect: "mysql" | "pg" | "sqlite";
174
+ breakpoints: boolean;
175
+ schemaFilter: string | string[];
176
+ }, {
177
+ out?: string | undefined;
178
+ breakpoints?: boolean | undefined;
179
+ driver?: "pg" | "turso" | "better-sqlite" | "libsql" | "d1" | "mysql2" | "expo" | undefined;
180
+ tablesFilter?: string | string[] | undefined;
181
+ schemaFilter?: string | string[] | undefined;
182
+ schema: string | string[];
183
+ dialect: "mysql" | "pg" | "sqlite";
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
+ port?: number | undefined;
192
+ password?: string | undefined;
193
+ host: string;
194
+ user: string;
195
+ database: string;
196
+ }, {
197
+ port?: number | undefined;
198
+ user?: string | undefined;
199
+ password?: string | undefined;
200
+ host: string;
201
+ database: string;
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 Driver = TypeOf<typeof driver>;