drizzle-kit 0.20.17-aec19bb → 0.20.17-b2e8c7f
Sign up to get free protection for your applications and to get access to all the features.
- package/bin.cjs +51043 -12205
- package/cli/commands/migrate.d.ts +43 -43
- package/cli/commands/mysqlIntrospect.d.ts +9 -14
- package/cli/commands/pgIntrospect.d.ts +8 -8
- package/cli/commands/sqliteIntrospect.d.ts +12 -13
- package/cli/commands/sqlitePushUtils.d.ts +2 -2
- package/cli/commands/utils.d.ts +2 -2
- package/cli/connections.d.ts +13 -0
- package/cli/utils.d.ts +1 -0
- package/cli/validations/cli.d.ts +48 -48
- package/cli/validations/common.d.ts +35 -35
- package/cli/validations/mysql.d.ts +7 -13
- package/cli/validations/outputs.d.ts +2 -2
- package/cli/validations/pg.d.ts +22 -13
- package/cli/validations/sqlite.d.ts +0 -12
- package/index.d.mts +17 -57
- package/index.d.ts +17 -57
- package/package.json +12 -6
- package/payload.js +1658 -20683
- package/payload.mjs +1479 -20504
- package/schemaValidator.d.ts +228 -228
- package/serializer/mysqlSchema.d.ts +910 -1224
- package/serializer/pgSchema.d.ts +745 -745
- package/serializer/sqliteSchema.d.ts +457 -457
- package/serializer/studio.d.ts +51 -0
- package/snapshotsDiffer.d.ts +315 -316
- package/utils-studio.js +887 -3448
- package/utils-studio.mjs +852 -3413
- package/utils.d.ts +6 -0
- package/utils.js +222 -857
- package/utils.mjs +197 -832
package/cli/validations/cli.d.ts
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
import { TypeOf } from "zod";
|
2
2
|
export declare const cliConfigGenerate: import("zod").ZodObject<{
|
3
|
-
dialect: import("zod").ZodOptional<import("zod").ZodEnum<["
|
3
|
+
dialect: import("zod").ZodOptional<import("zod").ZodEnum<["postgresql", "mysql", "sqlite"]>>;
|
4
4
|
schema: import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodString, import("zod").ZodArray<import("zod").ZodString, "many">]>>;
|
5
5
|
out: import("zod").ZodDefault<import("zod").ZodOptional<import("zod").ZodString>>;
|
6
6
|
config: import("zod").ZodOptional<import("zod").ZodString>;
|
@@ -8,29 +8,29 @@ export declare const cliConfigGenerate: import("zod").ZodObject<{
|
|
8
8
|
breakpoints: import("zod").ZodDefault<import("zod").ZodOptional<import("zod").ZodBoolean>>;
|
9
9
|
custom: import("zod").ZodDefault<import("zod").ZodOptional<import("zod").ZodBoolean>>;
|
10
10
|
}, "strict", import("zod").ZodTypeAny, {
|
11
|
-
custom: boolean;
|
12
|
-
out: string;
|
13
|
-
breakpoints: boolean;
|
14
11
|
name?: string | undefined;
|
15
12
|
schema?: string | string[] | undefined;
|
16
|
-
dialect?: "mysql" | "
|
13
|
+
dialect?: "mysql" | "postgresql" | "sqlite" | undefined;
|
17
14
|
config?: string | undefined;
|
15
|
+
custom: boolean;
|
16
|
+
out: string;
|
17
|
+
breakpoints: boolean;
|
18
18
|
}, {
|
19
19
|
name?: string | undefined;
|
20
20
|
custom?: boolean | undefined;
|
21
21
|
schema?: string | string[] | undefined;
|
22
|
-
dialect?: "mysql" | "
|
22
|
+
dialect?: "mysql" | "postgresql" | "sqlite" | undefined;
|
23
23
|
config?: string | undefined;
|
24
24
|
out?: string | undefined;
|
25
25
|
breakpoints?: boolean | undefined;
|
26
26
|
}>;
|
27
27
|
export type CliConfigGenerate = TypeOf<typeof cliConfigGenerate>;
|
28
28
|
export declare const pushParams: import("zod").ZodObject<{
|
29
|
-
dialect: import("zod").ZodEnum<["
|
29
|
+
dialect: import("zod").ZodEnum<["postgresql", "mysql", "sqlite"]>;
|
30
30
|
schema: import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodString, import("zod").ZodArray<import("zod").ZodString, "many">]>>;
|
31
31
|
tablesFilter: import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodString, import("zod").ZodArray<import("zod").ZodString, "many">]>>;
|
32
|
-
|
33
|
-
driver: import("zod").ZodString
|
32
|
+
schemaFilter: import("zod").ZodDefault<import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodString, import("zod").ZodArray<import("zod").ZodString, "many">]>>>;
|
33
|
+
driver: import("zod").ZodOptional<import("zod").ZodString>;
|
34
34
|
connectionString: import("zod").ZodOptional<import("zod").ZodString>;
|
35
35
|
uri: import("zod").ZodOptional<import("zod").ZodString>;
|
36
36
|
url: import("zod").ZodOptional<import("zod").ZodString>;
|
@@ -43,47 +43,47 @@ export declare const pushParams: import("zod").ZodObject<{
|
|
43
43
|
authToken: import("zod").ZodOptional<import("zod").ZodString>;
|
44
44
|
verbose: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
45
45
|
strict: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
46
|
-
}, "
|
47
|
-
dialect: "mysql" | "pg" | "sqlite";
|
48
|
-
driver: string;
|
49
|
-
schemaFilters: string | string[];
|
46
|
+
}, "strip", import("zod").ZodTypeAny, {
|
50
47
|
strict?: boolean | undefined;
|
51
48
|
schema?: string | string[] | undefined;
|
52
49
|
url?: string | undefined;
|
53
|
-
tablesFilter?: string | string[] | undefined;
|
54
|
-
verbose?: boolean | undefined;
|
55
50
|
host?: string | undefined;
|
56
51
|
port?: string | undefined;
|
57
52
|
user?: string | undefined;
|
58
53
|
password?: string | undefined;
|
59
54
|
database?: string | undefined;
|
60
|
-
connectionString?: string | undefined;
|
61
55
|
uri?: string | undefined;
|
56
|
+
driver?: string | undefined;
|
57
|
+
connectionString?: string | undefined;
|
62
58
|
ssl?: string | undefined;
|
63
59
|
authToken?: string | undefined;
|
60
|
+
tablesFilter?: string | string[] | undefined;
|
61
|
+
verbose?: boolean | undefined;
|
62
|
+
dialect: "mysql" | "postgresql" | "sqlite";
|
63
|
+
schemaFilter: string | string[];
|
64
64
|
}, {
|
65
|
-
dialect: "mysql" | "pg" | "sqlite";
|
66
|
-
driver: string;
|
67
65
|
strict?: boolean | undefined;
|
68
66
|
schema?: string | string[] | undefined;
|
69
67
|
url?: string | undefined;
|
70
|
-
tablesFilter?: string | string[] | undefined;
|
71
|
-
verbose?: boolean | undefined;
|
72
68
|
host?: string | undefined;
|
73
69
|
port?: string | undefined;
|
74
70
|
user?: string | undefined;
|
75
71
|
password?: string | undefined;
|
76
72
|
database?: string | undefined;
|
77
|
-
connectionString?: string | undefined;
|
78
|
-
schemaFilters?: string | string[] | undefined;
|
79
73
|
uri?: string | undefined;
|
74
|
+
driver?: string | undefined;
|
75
|
+
connectionString?: string | undefined;
|
80
76
|
ssl?: string | undefined;
|
81
77
|
authToken?: string | undefined;
|
78
|
+
tablesFilter?: string | string[] | undefined;
|
79
|
+
schemaFilter?: string | string[] | undefined;
|
80
|
+
verbose?: boolean | undefined;
|
81
|
+
dialect: "mysql" | "postgresql" | "sqlite";
|
82
82
|
}>;
|
83
83
|
export type PushParams = TypeOf<typeof pushParams>;
|
84
84
|
export declare const pullParams: import("zod").ZodObject<{
|
85
85
|
config: import("zod").ZodOptional<import("zod").ZodString>;
|
86
|
-
dialect: import("zod").ZodOptional<import("zod").ZodEnum<["
|
86
|
+
dialect: import("zod").ZodOptional<import("zod").ZodEnum<["postgresql", "mysql", "sqlite"]>>;
|
87
87
|
out: import("zod").ZodDefault<import("zod").ZodOptional<import("zod").ZodString>>;
|
88
88
|
tablesFilter: import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodString, import("zod").ZodArray<import("zod").ZodString, "many">]>>;
|
89
89
|
schemaFilter: import("zod").ZodDefault<import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodString, import("zod").ZodArray<import("zod").ZodString, "many">]>>>;
|
@@ -98,56 +98,56 @@ export declare const pullParams: import("zod").ZodObject<{
|
|
98
98
|
ssl: import("zod").ZodOptional<import("zod").ZodString>;
|
99
99
|
url: import("zod").ZodOptional<import("zod").ZodString>;
|
100
100
|
authToken: import("zod").ZodOptional<import("zod").ZodString>;
|
101
|
-
|
101
|
+
introspectCasing: import("zod").ZodDefault<import("zod").ZodUnion<[import("zod").ZodLiteral<"camel">, import("zod").ZodLiteral<"preserve">]>>;
|
102
102
|
breakpoints: import("zod").ZodDefault<import("zod").ZodOptional<import("zod").ZodBoolean>>;
|
103
103
|
}, "strip", import("zod").ZodTypeAny, {
|
104
|
-
|
105
|
-
breakpoints: boolean;
|
106
|
-
schemaFilter: string | string[];
|
107
|
-
"introspect-casing": "camel" | "preserve";
|
108
|
-
dialect?: "mysql" | "pg" | "sqlite" | undefined;
|
104
|
+
dialect?: "mysql" | "postgresql" | "sqlite" | undefined;
|
109
105
|
url?: string | undefined;
|
110
|
-
config?: string | undefined;
|
111
|
-
driver?: string | undefined;
|
112
|
-
tablesFilter?: string | string[] | undefined;
|
113
106
|
host?: string | undefined;
|
114
107
|
port?: string | undefined;
|
115
108
|
user?: string | undefined;
|
116
109
|
password?: string | undefined;
|
117
110
|
database?: string | undefined;
|
118
|
-
connectionString?: string | undefined;
|
119
111
|
uri?: string | undefined;
|
112
|
+
driver?: string | undefined;
|
113
|
+
connectionString?: string | undefined;
|
120
114
|
ssl?: string | undefined;
|
121
115
|
authToken?: string | undefined;
|
122
|
-
}, {
|
123
|
-
dialect?: "mysql" | "pg" | "sqlite" | undefined;
|
124
|
-
url?: string | undefined;
|
125
116
|
config?: string | undefined;
|
126
|
-
out?: string | undefined;
|
127
|
-
breakpoints?: boolean | undefined;
|
128
|
-
driver?: string | undefined;
|
129
117
|
tablesFilter?: string | string[] | undefined;
|
130
|
-
|
118
|
+
out: string;
|
119
|
+
breakpoints: boolean;
|
120
|
+
schemaFilter: string | string[];
|
121
|
+
introspectCasing: "camel" | "preserve";
|
122
|
+
}, {
|
123
|
+
dialect?: "mysql" | "postgresql" | "sqlite" | undefined;
|
124
|
+
url?: string | undefined;
|
131
125
|
host?: string | undefined;
|
132
126
|
port?: string | undefined;
|
133
127
|
user?: string | undefined;
|
134
128
|
password?: string | undefined;
|
135
129
|
database?: string | undefined;
|
136
|
-
connectionString?: string | undefined;
|
137
130
|
uri?: string | undefined;
|
131
|
+
driver?: string | undefined;
|
132
|
+
connectionString?: string | undefined;
|
138
133
|
ssl?: string | undefined;
|
139
134
|
authToken?: string | undefined;
|
140
|
-
|
135
|
+
config?: string | undefined;
|
136
|
+
out?: string | undefined;
|
137
|
+
breakpoints?: boolean | undefined;
|
138
|
+
tablesFilter?: string | string[] | undefined;
|
139
|
+
schemaFilter?: string | string[] | undefined;
|
140
|
+
introspectCasing?: "camel" | "preserve" | undefined;
|
141
141
|
}>;
|
142
142
|
export type PullParams = TypeOf<typeof pullParams>;
|
143
143
|
export declare const configCheck: import("zod").ZodObject<{
|
144
|
-
dialect: import("zod").ZodOptional<import("zod").ZodEnum<["
|
144
|
+
dialect: import("zod").ZodOptional<import("zod").ZodEnum<["postgresql", "mysql", "sqlite"]>>;
|
145
145
|
out: import("zod").ZodOptional<import("zod").ZodString>;
|
146
146
|
}, "strip", import("zod").ZodTypeAny, {
|
147
|
-
dialect?: "mysql" | "
|
147
|
+
dialect?: "mysql" | "postgresql" | "sqlite" | undefined;
|
148
148
|
out?: string | undefined;
|
149
149
|
}, {
|
150
|
-
dialect?: "mysql" | "
|
150
|
+
dialect?: "mysql" | "postgresql" | "sqlite" | undefined;
|
151
151
|
out?: string | undefined;
|
152
152
|
}>;
|
153
153
|
export declare const cliConfigCheck: import("zod").ZodIntersection<import("zod").ZodObject<{
|
@@ -157,13 +157,13 @@ export declare const cliConfigCheck: import("zod").ZodIntersection<import("zod")
|
|
157
157
|
}, {
|
158
158
|
config?: string | undefined;
|
159
159
|
}>, import("zod").ZodObject<{
|
160
|
-
dialect: import("zod").ZodOptional<import("zod").ZodEnum<["
|
160
|
+
dialect: import("zod").ZodOptional<import("zod").ZodEnum<["postgresql", "mysql", "sqlite"]>>;
|
161
161
|
out: import("zod").ZodOptional<import("zod").ZodString>;
|
162
162
|
}, "strip", import("zod").ZodTypeAny, {
|
163
|
-
dialect?: "mysql" | "
|
163
|
+
dialect?: "mysql" | "postgresql" | "sqlite" | undefined;
|
164
164
|
out?: string | undefined;
|
165
165
|
}, {
|
166
|
-
dialect?: "mysql" | "
|
166
|
+
dialect?: "mysql" | "postgresql" | "sqlite" | undefined;
|
167
167
|
out?: string | undefined;
|
168
168
|
}>>;
|
169
169
|
export type CliCheckConfig = TypeOf<typeof cliConfigCheck>;
|
@@ -12,7 +12,7 @@ export declare const postgresDriver: import("zod").ZodLiteral<"pg">;
|
|
12
12
|
export declare const mysqlDriver: import("zod").ZodLiteral<"mysql2">;
|
13
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
14
|
export declare const configCommonSchema: import("zod").ZodObject<{
|
15
|
-
dialect: import("zod").ZodEnum<["
|
15
|
+
dialect: import("zod").ZodEnum<["postgresql", "mysql", "sqlite"]>;
|
16
16
|
schema: import("zod").ZodUnion<[import("zod").ZodString, import("zod").ZodArray<import("zod").ZodString, "many">]>;
|
17
17
|
out: import("zod").ZodOptional<import("zod").ZodString>;
|
18
18
|
breakpoints: import("zod").ZodDefault<import("zod").ZodBoolean>;
|
@@ -20,21 +20,21 @@ export declare const configCommonSchema: import("zod").ZodObject<{
|
|
20
20
|
tablesFilter: import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodString, import("zod").ZodArray<import("zod").ZodString, "many">]>>;
|
21
21
|
schemaFilter: import("zod").ZodDefault<import("zod").ZodUnion<[import("zod").ZodString, import("zod").ZodArray<import("zod").ZodString, "many">]>>;
|
22
22
|
}, "strip", import("zod").ZodTypeAny, {
|
23
|
+
driver?: "pg" | "turso" | "expo" | "mysql2" | "libsql" | "better-sqlite" | "d1" | undefined;
|
24
|
+
out?: string | undefined;
|
25
|
+
tablesFilter?: string | string[] | undefined;
|
23
26
|
schema: string | string[];
|
24
|
-
dialect: "mysql" | "
|
27
|
+
dialect: "mysql" | "postgresql" | "sqlite";
|
25
28
|
breakpoints: boolean;
|
26
29
|
schemaFilter: string | string[];
|
27
|
-
out?: string | undefined;
|
28
|
-
driver?: "pg" | "turso" | "better-sqlite" | "libsql" | "d1" | "mysql2" | "expo" | undefined;
|
29
|
-
tablesFilter?: string | string[] | undefined;
|
30
30
|
}, {
|
31
|
-
|
32
|
-
dialect: "mysql" | "pg" | "sqlite";
|
31
|
+
driver?: "pg" | "turso" | "expo" | "mysql2" | "libsql" | "better-sqlite" | "d1" | undefined;
|
33
32
|
out?: string | undefined;
|
34
33
|
breakpoints?: boolean | undefined;
|
35
|
-
driver?: "pg" | "turso" | "better-sqlite" | "libsql" | "d1" | "mysql2" | "expo" | undefined;
|
36
34
|
tablesFilter?: string | string[] | undefined;
|
37
35
|
schemaFilter?: string | string[] | undefined;
|
36
|
+
schema: string | string[];
|
37
|
+
dialect: "mysql" | "postgresql" | "sqlite";
|
38
38
|
}>;
|
39
39
|
export declare const casing: import("zod").ZodDefault<import("zod").ZodUnion<[import("zod").ZodLiteral<"camel">, import("zod").ZodLiteral<"preserve">]>>;
|
40
40
|
export declare const introspectParams: import("zod").ZodObject<{
|
@@ -51,14 +51,14 @@ export declare const introspectParams: import("zod").ZodObject<{
|
|
51
51
|
casing?: "camel" | "preserve" | undefined;
|
52
52
|
}>>;
|
53
53
|
}, "strip", import("zod").ZodTypeAny, {
|
54
|
+
schema?: string | string[] | undefined;
|
55
|
+
tablesFilter?: string | string[] | undefined;
|
54
56
|
introspect: {
|
55
57
|
casing: "camel" | "preserve";
|
56
58
|
};
|
57
59
|
out: string;
|
58
60
|
breakpoints: boolean;
|
59
61
|
schemaFilter: string | string[];
|
60
|
-
schema?: string | string[] | undefined;
|
61
|
-
tablesFilter?: string | string[] | undefined;
|
62
62
|
}, {
|
63
63
|
schema?: string | string[] | undefined;
|
64
64
|
introspect?: {
|
@@ -79,12 +79,12 @@ export declare const configIntrospectCliSchema: import("zod").ZodObject<{
|
|
79
79
|
schemaFilter: import("zod").ZodDefault<import("zod").ZodUnion<[import("zod").ZodString, import("zod").ZodArray<import("zod").ZodString, "many">]>>;
|
80
80
|
introspectCasing: import("zod").ZodDefault<import("zod").ZodUnion<[import("zod").ZodLiteral<"camel">, import("zod").ZodLiteral<"preserve">]>>;
|
81
81
|
}, "strip", import("zod").ZodTypeAny, {
|
82
|
+
schema?: string | string[] | undefined;
|
83
|
+
tablesFilter?: string | string[] | undefined;
|
82
84
|
out: string;
|
83
85
|
breakpoints: boolean;
|
84
86
|
schemaFilter: string | string[];
|
85
87
|
introspectCasing: "camel" | "preserve";
|
86
|
-
schema?: string | string[] | undefined;
|
87
|
-
tablesFilter?: string | string[] | undefined;
|
88
88
|
}, {
|
89
89
|
schema?: string | string[] | undefined;
|
90
90
|
out?: string | undefined;
|
@@ -102,13 +102,13 @@ export declare const configGenerateSchema: import("zod").ZodObject<{
|
|
102
102
|
out: string;
|
103
103
|
breakpoints: boolean;
|
104
104
|
}, {
|
105
|
-
schema: string | string[];
|
106
105
|
out?: string | undefined;
|
107
106
|
breakpoints?: boolean | undefined;
|
107
|
+
schema: string | string[];
|
108
108
|
}>;
|
109
109
|
export type GenerateSchema = TypeOf<typeof configGenerateSchema>;
|
110
110
|
export declare const configPushSchema: import("zod").ZodObject<{
|
111
|
-
dialect: import("zod").ZodEnum<["
|
111
|
+
dialect: import("zod").ZodEnum<["postgresql", "mysql", "sqlite"]>;
|
112
112
|
schema: import("zod").ZodUnion<[import("zod").ZodString, import("zod").ZodArray<import("zod").ZodString, "many">]>;
|
113
113
|
tablesFilter: import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodString, import("zod").ZodArray<import("zod").ZodString, "many">]>>;
|
114
114
|
schemaFilter: import("zod").ZodDefault<import("zod").ZodUnion<[import("zod").ZodString, import("zod").ZodArray<import("zod").ZodString, "many">]>>;
|
@@ -116,21 +116,21 @@ export declare const configPushSchema: import("zod").ZodObject<{
|
|
116
116
|
strict: import("zod").ZodDefault<import("zod").ZodBoolean>;
|
117
117
|
out: import("zod").ZodOptional<import("zod").ZodString>;
|
118
118
|
}, "strip", import("zod").ZodTypeAny, {
|
119
|
+
out?: string | undefined;
|
120
|
+
tablesFilter?: string | string[] | undefined;
|
119
121
|
strict: boolean;
|
120
122
|
schema: string | string[];
|
121
|
-
dialect: "mysql" | "
|
123
|
+
dialect: "mysql" | "postgresql" | "sqlite";
|
122
124
|
schemaFilter: string | string[];
|
123
125
|
verbose: boolean;
|
124
|
-
out?: string | undefined;
|
125
|
-
tablesFilter?: string | string[] | undefined;
|
126
126
|
}, {
|
127
|
-
schema: string | string[];
|
128
|
-
dialect: "mysql" | "pg" | "sqlite";
|
129
127
|
strict?: boolean | undefined;
|
130
128
|
out?: string | undefined;
|
131
129
|
tablesFilter?: string | string[] | undefined;
|
132
130
|
schemaFilter?: string | string[] | undefined;
|
133
131
|
verbose?: boolean | undefined;
|
132
|
+
schema: string | string[];
|
133
|
+
dialect: "mysql" | "postgresql" | "sqlite";
|
134
134
|
}>;
|
135
135
|
export declare const mysqlConnectionSchema: import("zod").ZodUnion<[import("zod").ZodObject<{
|
136
136
|
host: import("zod").ZodString;
|
@@ -139,17 +139,17 @@ export declare const mysqlConnectionSchema: import("zod").ZodUnion<[import("zod"
|
|
139
139
|
password: import("zod").ZodOptional<import("zod").ZodString>;
|
140
140
|
database: import("zod").ZodString;
|
141
141
|
}, "strip", import("zod").ZodTypeAny, {
|
142
|
-
host: string;
|
143
|
-
user: string;
|
144
|
-
database: string;
|
145
142
|
port?: number | undefined;
|
146
143
|
password?: string | undefined;
|
147
|
-
}, {
|
148
144
|
host: string;
|
145
|
+
user: string;
|
149
146
|
database: string;
|
147
|
+
}, {
|
150
148
|
port?: number | undefined;
|
151
149
|
user?: string | undefined;
|
152
150
|
password?: string | undefined;
|
151
|
+
host: string;
|
152
|
+
database: string;
|
153
153
|
}>, import("zod").ZodObject<{
|
154
154
|
connectionString: import("zod").ZodString;
|
155
155
|
}, "strip", import("zod").ZodTypeAny, {
|
@@ -158,7 +158,7 @@ export declare const mysqlConnectionSchema: import("zod").ZodUnion<[import("zod"
|
|
158
158
|
connectionString: string;
|
159
159
|
}>, import("zod").ZodObject<{}, "strip", import("zod").ZodTypeAny, {}, {}>]>;
|
160
160
|
export declare const mySqlCliConfigSchema: import("zod").ZodIntersection<import("zod").ZodObject<{
|
161
|
-
dialect: import("zod").ZodEnum<["
|
161
|
+
dialect: import("zod").ZodEnum<["postgresql", "mysql", "sqlite"]>;
|
162
162
|
schema: import("zod").ZodUnion<[import("zod").ZodString, import("zod").ZodArray<import("zod").ZodString, "many">]>;
|
163
163
|
out: import("zod").ZodOptional<import("zod").ZodString>;
|
164
164
|
breakpoints: import("zod").ZodDefault<import("zod").ZodBoolean>;
|
@@ -166,21 +166,21 @@ export declare const mySqlCliConfigSchema: import("zod").ZodIntersection<import(
|
|
166
166
|
tablesFilter: import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodString, import("zod").ZodArray<import("zod").ZodString, "many">]>>;
|
167
167
|
schemaFilter: import("zod").ZodDefault<import("zod").ZodUnion<[import("zod").ZodString, import("zod").ZodArray<import("zod").ZodString, "many">]>>;
|
168
168
|
}, "strip", import("zod").ZodTypeAny, {
|
169
|
+
driver?: "pg" | "turso" | "expo" | "mysql2" | "libsql" | "better-sqlite" | "d1" | undefined;
|
170
|
+
out?: string | undefined;
|
171
|
+
tablesFilter?: string | string[] | undefined;
|
169
172
|
schema: string | string[];
|
170
|
-
dialect: "mysql" | "
|
173
|
+
dialect: "mysql" | "postgresql" | "sqlite";
|
171
174
|
breakpoints: boolean;
|
172
175
|
schemaFilter: string | string[];
|
173
|
-
out?: string | undefined;
|
174
|
-
driver?: "pg" | "turso" | "better-sqlite" | "libsql" | "d1" | "mysql2" | "expo" | undefined;
|
175
|
-
tablesFilter?: string | string[] | undefined;
|
176
176
|
}, {
|
177
|
-
|
178
|
-
dialect: "mysql" | "pg" | "sqlite";
|
177
|
+
driver?: "pg" | "turso" | "expo" | "mysql2" | "libsql" | "better-sqlite" | "d1" | undefined;
|
179
178
|
out?: string | undefined;
|
180
179
|
breakpoints?: boolean | undefined;
|
181
|
-
driver?: "pg" | "turso" | "better-sqlite" | "libsql" | "d1" | "mysql2" | "expo" | undefined;
|
182
180
|
tablesFilter?: string | string[] | undefined;
|
183
181
|
schemaFilter?: string | string[] | undefined;
|
182
|
+
schema: string | string[];
|
183
|
+
dialect: "mysql" | "postgresql" | "sqlite";
|
184
184
|
}>, import("zod").ZodUnion<[import("zod").ZodObject<{
|
185
185
|
host: import("zod").ZodString;
|
186
186
|
port: import("zod").ZodOptional<import("zod").ZodNumber>;
|
@@ -188,17 +188,17 @@ export declare const mySqlCliConfigSchema: import("zod").ZodIntersection<import(
|
|
188
188
|
password: import("zod").ZodOptional<import("zod").ZodString>;
|
189
189
|
database: import("zod").ZodString;
|
190
190
|
}, "strip", import("zod").ZodTypeAny, {
|
191
|
-
host: string;
|
192
|
-
user: string;
|
193
|
-
database: string;
|
194
191
|
port?: number | undefined;
|
195
192
|
password?: string | undefined;
|
196
|
-
}, {
|
197
193
|
host: string;
|
194
|
+
user: string;
|
198
195
|
database: string;
|
196
|
+
}, {
|
199
197
|
port?: number | undefined;
|
200
198
|
user?: string | undefined;
|
201
199
|
password?: string | undefined;
|
200
|
+
host: string;
|
201
|
+
database: string;
|
202
202
|
}>, import("zod").ZodObject<{
|
203
203
|
connectionString: import("zod").ZodString;
|
204
204
|
}, "strip", import("zod").ZodTypeAny, {
|
@@ -6,29 +6,23 @@ export declare const mysqlCredentials: import("zod").ZodUnion<[import("zod").Zod
|
|
6
6
|
password: import("zod").ZodOptional<import("zod").ZodString>;
|
7
7
|
database: import("zod").ZodString;
|
8
8
|
}, "strip", import("zod").ZodTypeAny, {
|
9
|
-
host: string;
|
10
|
-
user: string;
|
11
|
-
database: string;
|
12
9
|
port?: number | undefined;
|
13
10
|
password?: string | undefined;
|
14
|
-
}, {
|
15
11
|
host: string;
|
12
|
+
user: string;
|
16
13
|
database: string;
|
14
|
+
}, {
|
17
15
|
port?: number | undefined;
|
18
16
|
user?: string | undefined;
|
19
17
|
password?: string | undefined;
|
18
|
+
host: string;
|
19
|
+
database: string;
|
20
20
|
}>, import("zod").ZodObject<{
|
21
|
-
|
22
|
-
}, "strip", import("zod").ZodTypeAny, {
|
23
|
-
uri: string;
|
24
|
-
}, {
|
25
|
-
uri: string;
|
26
|
-
}>, import("zod").ZodObject<{
|
27
|
-
connectionString: import("zod").ZodString;
|
21
|
+
url: import("zod").ZodString;
|
28
22
|
}, "strip", import("zod").ZodTypeAny, {
|
29
|
-
|
23
|
+
url: string;
|
30
24
|
}, {
|
31
|
-
|
25
|
+
url: string;
|
32
26
|
}>]>;
|
33
27
|
export type MysqlCredentials = TypeOf<typeof mysqlCredentials>;
|
34
28
|
export declare const printCliConnectionIssues: (options: any) => void;
|
@@ -4,6 +4,7 @@ export declare const withStyle: {
|
|
4
4
|
errorWarning: (str: string) => string;
|
5
5
|
fullWarning: (str: string) => string;
|
6
6
|
suggestion: (str: string) => string;
|
7
|
+
info: (str: string) => string;
|
7
8
|
};
|
8
9
|
export declare const outputs: {
|
9
10
|
studio: {
|
@@ -15,12 +16,11 @@ export declare const outputs: {
|
|
15
16
|
common: {
|
16
17
|
ambiguousParams: (command: string) => string;
|
17
18
|
schema: (command: string) => string;
|
18
|
-
schemaConfig: (command: string) => string;
|
19
19
|
};
|
20
20
|
postgres: {
|
21
21
|
connection: {
|
22
|
-
driver: () => string;
|
23
22
|
required: () => string;
|
23
|
+
awsDataApi: () => void;
|
24
24
|
};
|
25
25
|
};
|
26
26
|
mysql: {
|
package/cli/validations/pg.d.ts
CHANGED
@@ -1,6 +1,5 @@
|
|
1
1
|
import { TypeOf } from "zod";
|
2
2
|
export declare const postgresCredentials: import("zod").ZodUnion<[import("zod").ZodObject<{
|
3
|
-
driver: import("zod").ZodLiteral<"pg">;
|
4
3
|
host: import("zod").ZodString;
|
5
4
|
port: import("zod").ZodOptional<import("zod").ZodNumber>;
|
6
5
|
user: import("zod").ZodDefault<import("zod").ZodString>;
|
@@ -8,30 +7,40 @@ export declare const postgresCredentials: import("zod").ZodUnion<[import("zod").
|
|
8
7
|
database: import("zod").ZodString;
|
9
8
|
ssl: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
10
9
|
}, "strip", import("zod").ZodTypeAny, {
|
11
|
-
driver: "pg";
|
12
|
-
host: string;
|
13
|
-
user: string;
|
14
|
-
database: string;
|
15
10
|
port?: number | undefined;
|
16
11
|
password?: string | undefined;
|
17
12
|
ssl?: boolean | undefined;
|
18
|
-
}, {
|
19
|
-
driver: "pg";
|
20
13
|
host: string;
|
14
|
+
user: string;
|
21
15
|
database: string;
|
16
|
+
}, {
|
22
17
|
port?: number | undefined;
|
23
18
|
user?: string | undefined;
|
24
19
|
password?: string | undefined;
|
25
20
|
ssl?: boolean | undefined;
|
21
|
+
host: string;
|
22
|
+
database: string;
|
26
23
|
}>, import("zod").ZodObject<{
|
27
|
-
|
28
|
-
connectionString: import("zod").ZodString;
|
24
|
+
url: import("zod").ZodString;
|
29
25
|
}, "strip", import("zod").ZodTypeAny, {
|
30
|
-
|
31
|
-
connectionString: string;
|
26
|
+
url: string;
|
32
27
|
}, {
|
33
|
-
|
34
|
-
|
28
|
+
url: string;
|
29
|
+
}>, import("zod").ZodObject<{
|
30
|
+
driver: import("zod").ZodLiteral<"aws-data-api">;
|
31
|
+
database: import("zod").ZodString;
|
32
|
+
secretArn: import("zod").ZodString;
|
33
|
+
resourceArn: import("zod").ZodString;
|
34
|
+
}, "strip", import("zod").ZodTypeAny, {
|
35
|
+
database: string;
|
36
|
+
driver: "aws-data-api";
|
37
|
+
secretArn: string;
|
38
|
+
resourceArn: string;
|
39
|
+
}, {
|
40
|
+
database: string;
|
41
|
+
driver: "aws-data-api";
|
42
|
+
secretArn: string;
|
43
|
+
resourceArn: string;
|
35
44
|
}>]>;
|
36
45
|
export type PostgresCredentials = TypeOf<typeof postgresCredentials>;
|
37
46
|
export declare const printConfigConnectionIssues: (options: Record<string, unknown>) => void;
|
@@ -12,23 +12,11 @@ export declare const sqliteCredentials: import("zod").ZodUnion<[import("zod").Zo
|
|
12
12
|
driver: "turso";
|
13
13
|
authToken: string;
|
14
14
|
}>, import("zod").ZodObject<{
|
15
|
-
driver: import("zod").ZodLiteral<"better-sqlite">;
|
16
15
|
url: import("zod").ZodString;
|
17
16
|
}, "strip", import("zod").ZodTypeAny, {
|
18
17
|
url: string;
|
19
|
-
driver: "better-sqlite";
|
20
18
|
}, {
|
21
19
|
url: string;
|
22
|
-
driver: "better-sqlite";
|
23
|
-
}>, import("zod").ZodObject<{
|
24
|
-
driver: import("zod").ZodLiteral<"libsql">;
|
25
|
-
url: import("zod").ZodString;
|
26
|
-
}, "strip", import("zod").ZodTypeAny, {
|
27
|
-
url: string;
|
28
|
-
driver: "libsql";
|
29
|
-
}, {
|
30
|
-
url: string;
|
31
|
-
driver: "libsql";
|
32
20
|
}>]>;
|
33
21
|
export type SqliteCredentials = TypeOf<typeof sqliteCredentials>;
|
34
22
|
export declare const printConfigConnectionIssues: (options: Record<string, unknown>) => void;
|
package/index.d.mts
CHANGED
@@ -1,50 +1,4 @@
|
|
1
1
|
import { Dialect } from "./schemaValidator";
|
2
|
-
export type DbConnection = {
|
3
|
-
driver: "turso";
|
4
|
-
dbCredentials: {
|
5
|
-
url: string;
|
6
|
-
authToken?: string;
|
7
|
-
};
|
8
|
-
} | {
|
9
|
-
driver: "better-sqlite";
|
10
|
-
dbCredentials: {
|
11
|
-
url: string;
|
12
|
-
};
|
13
|
-
} | {
|
14
|
-
driver: "libsql";
|
15
|
-
dbCredentials: {
|
16
|
-
url: string;
|
17
|
-
};
|
18
|
-
} | {
|
19
|
-
driver: "d1";
|
20
|
-
dbCredentials: {
|
21
|
-
wranglerConfigPath: string;
|
22
|
-
dbName: string;
|
23
|
-
};
|
24
|
-
} | {
|
25
|
-
driver: "pg";
|
26
|
-
dbCredentials: {
|
27
|
-
host: string;
|
28
|
-
port?: number;
|
29
|
-
user?: string;
|
30
|
-
password?: string;
|
31
|
-
database: string;
|
32
|
-
ssl?: boolean;
|
33
|
-
} | {
|
34
|
-
connectionString: string;
|
35
|
-
};
|
36
|
-
} | {
|
37
|
-
driver: "mysql2";
|
38
|
-
dbCredentials: {
|
39
|
-
host: string;
|
40
|
-
port?: number;
|
41
|
-
user?: string;
|
42
|
-
password?: string;
|
43
|
-
database: string;
|
44
|
-
} | {
|
45
|
-
uri: string;
|
46
|
-
};
|
47
|
-
};
|
48
2
|
export type Config = {
|
49
3
|
dialect: Dialect;
|
50
4
|
out?: string;
|
@@ -59,23 +13,19 @@ export type Config = {
|
|
59
13
|
casing: "camel" | "preserve";
|
60
14
|
};
|
61
15
|
} & ({
|
16
|
+
dialect: "sqlite";
|
62
17
|
driver: "turso";
|
63
18
|
dbCredentials: {
|
64
19
|
url: string;
|
65
20
|
authToken?: string;
|
66
21
|
};
|
67
22
|
} | {
|
68
|
-
|
69
|
-
dbCredentials: {
|
70
|
-
url: string;
|
71
|
-
};
|
72
|
-
} | {
|
73
|
-
driver: "libsql";
|
23
|
+
dialect: "sqlite";
|
74
24
|
dbCredentials: {
|
75
25
|
url: string;
|
76
26
|
};
|
77
27
|
} | {
|
78
|
-
|
28
|
+
dialect: "postgresql";
|
79
29
|
dbCredentials: {
|
80
30
|
host: string;
|
81
31
|
port?: number;
|
@@ -84,10 +34,18 @@ export type Config = {
|
|
84
34
|
database: string;
|
85
35
|
ssl?: boolean;
|
86
36
|
} | {
|
87
|
-
|
37
|
+
url: string;
|
88
38
|
};
|
89
39
|
} | {
|
90
|
-
|
40
|
+
dialect: "postgresql";
|
41
|
+
driver: "aws-data-api";
|
42
|
+
dbCredentials: {
|
43
|
+
database: string;
|
44
|
+
secretArn: string;
|
45
|
+
resourceArn: string;
|
46
|
+
};
|
47
|
+
} | {
|
48
|
+
dialect: "mysql";
|
91
49
|
dbCredentials: {
|
92
50
|
host: string;
|
93
51
|
port?: number;
|
@@ -95,15 +53,17 @@ export type Config = {
|
|
95
53
|
password?: string;
|
96
54
|
database: string;
|
97
55
|
} | {
|
98
|
-
|
56
|
+
url: string;
|
99
57
|
};
|
100
58
|
} | {
|
101
|
-
|
59
|
+
dialect: "sqlite";
|
60
|
+
driver: "d1-http";
|
102
61
|
dbCredentials: {
|
103
62
|
wranglerConfigPath: string;
|
104
63
|
dbName: string;
|
105
64
|
};
|
106
65
|
} | {
|
66
|
+
dialect: "sqlite";
|
107
67
|
driver: "expo";
|
108
68
|
} | {});
|
109
69
|
export declare function defineConfig(config: Config): Config;
|