drizzle-kit 0.20.17-9f0ea64 → 0.20.17-a1c0ab3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin.cjs +71994 -35815
- package/index.d.mts +35 -65
- package/index.d.ts +35 -65
- package/package.json +8 -16
- package/payload.d.mts +1052 -18
- package/payload.d.ts +1052 -18
- package/payload.js +18757 -34176
- package/payload.mjs +17495 -32894
- package/utils-studio.js +1039 -3348
- package/utils-studio.mjs +1012 -3321
- package/utils.js +864 -223
- package/utils.mjs +839 -198
- package/@types/utils.d.ts +0 -12
- package/cli/commands/migrate.d.ts +0 -287
- package/cli/commands/mysqlIntrospect.d.ts +0 -55
- package/cli/commands/mysqlPushUtils.d.ts +0 -14
- package/cli/commands/pgIntrospect.d.ts +0 -59
- package/cli/commands/pgPushUtils.d.ts +0 -11
- package/cli/commands/sqliteIntrospect.d.ts +0 -104
- package/cli/commands/sqlitePushUtils.d.ts +0 -15
- package/cli/commands/utils.d.ts +0 -58
- package/cli/selector-ui.d.ts +0 -13
- package/cli/utils.d.ts +0 -13
- package/cli/validations/cli.d.ts +0 -169
- package/cli/validations/common.d.ts +0 -214
- package/cli/validations/mysql.d.ts +0 -35
- package/cli/validations/outputs.d.ts +0 -41
- package/cli/validations/pg.d.ts +0 -31
- package/cli/validations/sqlite.d.ts +0 -34
- package/cli/views.d.ts +0 -63
- package/global.d.ts +0 -6
- package/introspect-sqlite.d.ts +0 -10
- package/jsonDiffer.d.ts +0 -61
- package/jsonStatements.d.ts +0 -376
- package/migrationPreparator.d.ts +0 -35
- package/schemaValidator.d.ts +0 -1316
- package/serializer/index.d.ts +0 -9
- package/serializer/mysqlImports.d.ts +0 -7
- package/serializer/mysqlSchema.d.ts +0 -4650
- package/serializer/mysqlSerializer.d.ts +0 -7
- package/serializer/pgImports.d.ts +0 -11
- package/serializer/pgSchema.d.ts +0 -4792
- package/serializer/pgSerializer.d.ts +0 -7
- package/serializer/schemaToDrizzle.d.ts +0 -7
- package/serializer/sqliteImports.d.ts +0 -7
- package/serializer/sqliteSchema.d.ts +0 -2801
- package/serializer/sqliteSerializer.d.ts +0 -6
- package/snapshotsDiffer.d.ts +0 -3937
- package/sqlgenerator.d.ts +0 -33
- package/utils/words.d.ts +0 -7
- package/utils-studio.d.mts +0 -4
- package/utils-studio.d.ts +0 -4
- package/utils.d.ts +0 -72
package/cli/validations/cli.d.ts
DELETED
|
@@ -1,169 +0,0 @@
|
|
|
1
|
-
import { TypeOf } from "zod";
|
|
2
|
-
export declare const cliConfigGenerate: import("zod").ZodObject<{
|
|
3
|
-
dialect: import("zod").ZodOptional<import("zod").ZodEnum<["pg", "mysql", "sqlite"]>>;
|
|
4
|
-
schema: import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodString, import("zod").ZodArray<import("zod").ZodString, "many">]>>;
|
|
5
|
-
out: import("zod").ZodDefault<import("zod").ZodOptional<import("zod").ZodString>>;
|
|
6
|
-
config: import("zod").ZodOptional<import("zod").ZodString>;
|
|
7
|
-
name: import("zod").ZodOptional<import("zod").ZodString>;
|
|
8
|
-
breakpoints: import("zod").ZodDefault<import("zod").ZodOptional<import("zod").ZodBoolean>>;
|
|
9
|
-
custom: import("zod").ZodDefault<import("zod").ZodOptional<import("zod").ZodBoolean>>;
|
|
10
|
-
}, "strict", import("zod").ZodTypeAny, {
|
|
11
|
-
name?: string | undefined;
|
|
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
|
-
name?: string | undefined;
|
|
20
|
-
custom?: boolean | undefined;
|
|
21
|
-
schema?: string | string[] | undefined;
|
|
22
|
-
dialect?: "mysql" | "pg" | "sqlite" | undefined;
|
|
23
|
-
config?: string | undefined;
|
|
24
|
-
out?: string | undefined;
|
|
25
|
-
breakpoints?: boolean | undefined;
|
|
26
|
-
}>;
|
|
27
|
-
export type CliConfigGenerate = TypeOf<typeof cliConfigGenerate>;
|
|
28
|
-
export declare const pushParams: import("zod").ZodObject<{
|
|
29
|
-
dialect: import("zod").ZodEnum<["pg", "mysql", "sqlite"]>;
|
|
30
|
-
schema: import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodString, import("zod").ZodArray<import("zod").ZodString, "many">]>>;
|
|
31
|
-
tablesFilter: import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodString, import("zod").ZodArray<import("zod").ZodString, "many">]>>;
|
|
32
|
-
schemaFilters: import("zod").ZodDefault<import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodString, import("zod").ZodArray<import("zod").ZodString, "many">]>>>;
|
|
33
|
-
driver: import("zod").ZodString;
|
|
34
|
-
connectionString: import("zod").ZodOptional<import("zod").ZodString>;
|
|
35
|
-
uri: import("zod").ZodOptional<import("zod").ZodString>;
|
|
36
|
-
url: import("zod").ZodOptional<import("zod").ZodString>;
|
|
37
|
-
host: import("zod").ZodOptional<import("zod").ZodString>;
|
|
38
|
-
port: import("zod").ZodOptional<import("zod").ZodString>;
|
|
39
|
-
user: import("zod").ZodOptional<import("zod").ZodString>;
|
|
40
|
-
password: import("zod").ZodOptional<import("zod").ZodString>;
|
|
41
|
-
database: import("zod").ZodOptional<import("zod").ZodString>;
|
|
42
|
-
ssl: import("zod").ZodOptional<import("zod").ZodString>;
|
|
43
|
-
authToken: import("zod").ZodOptional<import("zod").ZodString>;
|
|
44
|
-
verbose: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
45
|
-
strict: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
46
|
-
}, "strip", import("zod").ZodTypeAny, {
|
|
47
|
-
strict?: boolean | undefined;
|
|
48
|
-
schema?: string | string[] | undefined;
|
|
49
|
-
url?: string | undefined;
|
|
50
|
-
tablesFilter?: string | string[] | undefined;
|
|
51
|
-
verbose?: boolean | undefined;
|
|
52
|
-
host?: string | undefined;
|
|
53
|
-
port?: string | undefined;
|
|
54
|
-
user?: string | undefined;
|
|
55
|
-
password?: string | undefined;
|
|
56
|
-
database?: string | undefined;
|
|
57
|
-
connectionString?: string | undefined;
|
|
58
|
-
uri?: string | undefined;
|
|
59
|
-
ssl?: string | undefined;
|
|
60
|
-
authToken?: string | undefined;
|
|
61
|
-
dialect: "mysql" | "pg" | "sqlite";
|
|
62
|
-
driver: string;
|
|
63
|
-
schemaFilters: string | string[];
|
|
64
|
-
}, {
|
|
65
|
-
strict?: boolean | undefined;
|
|
66
|
-
schema?: string | string[] | undefined;
|
|
67
|
-
url?: string | undefined;
|
|
68
|
-
tablesFilter?: string | string[] | undefined;
|
|
69
|
-
verbose?: boolean | undefined;
|
|
70
|
-
host?: string | undefined;
|
|
71
|
-
port?: string | undefined;
|
|
72
|
-
user?: string | undefined;
|
|
73
|
-
password?: string | undefined;
|
|
74
|
-
database?: string | undefined;
|
|
75
|
-
connectionString?: string | undefined;
|
|
76
|
-
schemaFilters?: string | string[] | undefined;
|
|
77
|
-
uri?: string | undefined;
|
|
78
|
-
ssl?: string | undefined;
|
|
79
|
-
authToken?: string | undefined;
|
|
80
|
-
dialect: "mysql" | "pg" | "sqlite";
|
|
81
|
-
driver: string;
|
|
82
|
-
}>;
|
|
83
|
-
export type PushParams = TypeOf<typeof pushParams>;
|
|
84
|
-
export declare const pullParams: import("zod").ZodObject<{
|
|
85
|
-
config: import("zod").ZodOptional<import("zod").ZodString>;
|
|
86
|
-
dialect: import("zod").ZodOptional<import("zod").ZodEnum<["pg", "mysql", "sqlite"]>>;
|
|
87
|
-
out: import("zod").ZodDefault<import("zod").ZodOptional<import("zod").ZodString>>;
|
|
88
|
-
tablesFilter: import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodString, import("zod").ZodArray<import("zod").ZodString, "many">]>>;
|
|
89
|
-
schemaFilter: import("zod").ZodDefault<import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodString, import("zod").ZodArray<import("zod").ZodString, "many">]>>>;
|
|
90
|
-
driver: import("zod").ZodOptional<import("zod").ZodString>;
|
|
91
|
-
connectionString: import("zod").ZodOptional<import("zod").ZodString>;
|
|
92
|
-
uri: import("zod").ZodOptional<import("zod").ZodString>;
|
|
93
|
-
host: import("zod").ZodOptional<import("zod").ZodString>;
|
|
94
|
-
port: import("zod").ZodOptional<import("zod").ZodString>;
|
|
95
|
-
user: import("zod").ZodOptional<import("zod").ZodString>;
|
|
96
|
-
password: import("zod").ZodOptional<import("zod").ZodString>;
|
|
97
|
-
database: import("zod").ZodOptional<import("zod").ZodString>;
|
|
98
|
-
ssl: import("zod").ZodOptional<import("zod").ZodString>;
|
|
99
|
-
url: import("zod").ZodOptional<import("zod").ZodString>;
|
|
100
|
-
authToken: import("zod").ZodOptional<import("zod").ZodString>;
|
|
101
|
-
"introspect-casing": import("zod").ZodDefault<import("zod").ZodUnion<[import("zod").ZodLiteral<"camel">, import("zod").ZodLiteral<"preserve">]>>;
|
|
102
|
-
breakpoints: import("zod").ZodDefault<import("zod").ZodOptional<import("zod").ZodBoolean>>;
|
|
103
|
-
}, "strip", import("zod").ZodTypeAny, {
|
|
104
|
-
dialect?: "mysql" | "pg" | "sqlite" | undefined;
|
|
105
|
-
url?: string | undefined;
|
|
106
|
-
config?: string | undefined;
|
|
107
|
-
driver?: string | undefined;
|
|
108
|
-
tablesFilter?: string | string[] | undefined;
|
|
109
|
-
host?: string | undefined;
|
|
110
|
-
port?: string | undefined;
|
|
111
|
-
user?: string | undefined;
|
|
112
|
-
password?: string | undefined;
|
|
113
|
-
database?: string | undefined;
|
|
114
|
-
connectionString?: string | undefined;
|
|
115
|
-
uri?: string | undefined;
|
|
116
|
-
ssl?: string | undefined;
|
|
117
|
-
authToken?: string | undefined;
|
|
118
|
-
out: string;
|
|
119
|
-
breakpoints: boolean;
|
|
120
|
-
schemaFilter: string | string[];
|
|
121
|
-
"introspect-casing": "camel" | "preserve";
|
|
122
|
-
}, {
|
|
123
|
-
dialect?: "mysql" | "pg" | "sqlite" | undefined;
|
|
124
|
-
url?: string | undefined;
|
|
125
|
-
config?: string | undefined;
|
|
126
|
-
out?: string | undefined;
|
|
127
|
-
breakpoints?: boolean | undefined;
|
|
128
|
-
driver?: string | undefined;
|
|
129
|
-
tablesFilter?: string | string[] | undefined;
|
|
130
|
-
schemaFilter?: string | string[] | undefined;
|
|
131
|
-
host?: string | undefined;
|
|
132
|
-
port?: string | undefined;
|
|
133
|
-
user?: string | undefined;
|
|
134
|
-
password?: string | undefined;
|
|
135
|
-
database?: string | undefined;
|
|
136
|
-
connectionString?: string | undefined;
|
|
137
|
-
uri?: string | undefined;
|
|
138
|
-
ssl?: string | undefined;
|
|
139
|
-
authToken?: string | undefined;
|
|
140
|
-
"introspect-casing"?: "camel" | "preserve" | undefined;
|
|
141
|
-
}>;
|
|
142
|
-
export type PullParams = TypeOf<typeof pullParams>;
|
|
143
|
-
export declare const configCheck: import("zod").ZodObject<{
|
|
144
|
-
dialect: import("zod").ZodOptional<import("zod").ZodEnum<["pg", "mysql", "sqlite"]>>;
|
|
145
|
-
out: import("zod").ZodOptional<import("zod").ZodString>;
|
|
146
|
-
}, "strip", import("zod").ZodTypeAny, {
|
|
147
|
-
dialect?: "mysql" | "pg" | "sqlite" | undefined;
|
|
148
|
-
out?: string | undefined;
|
|
149
|
-
}, {
|
|
150
|
-
dialect?: "mysql" | "pg" | "sqlite" | undefined;
|
|
151
|
-
out?: string | undefined;
|
|
152
|
-
}>;
|
|
153
|
-
export declare const cliConfigCheck: import("zod").ZodIntersection<import("zod").ZodObject<{
|
|
154
|
-
config: import("zod").ZodOptional<import("zod").ZodString>;
|
|
155
|
-
}, "strip", import("zod").ZodTypeAny, {
|
|
156
|
-
config?: string | undefined;
|
|
157
|
-
}, {
|
|
158
|
-
config?: string | undefined;
|
|
159
|
-
}>, import("zod").ZodObject<{
|
|
160
|
-
dialect: import("zod").ZodOptional<import("zod").ZodEnum<["pg", "mysql", "sqlite"]>>;
|
|
161
|
-
out: import("zod").ZodOptional<import("zod").ZodString>;
|
|
162
|
-
}, "strip", import("zod").ZodTypeAny, {
|
|
163
|
-
dialect?: "mysql" | "pg" | "sqlite" | undefined;
|
|
164
|
-
out?: string | undefined;
|
|
165
|
-
}, {
|
|
166
|
-
dialect?: "mysql" | "pg" | "sqlite" | undefined;
|
|
167
|
-
out?: string | undefined;
|
|
168
|
-
}>>;
|
|
169
|
-
export type CliCheckConfig = TypeOf<typeof cliConfigCheck>;
|
|
@@ -1,214 +0,0 @@
|
|
|
1
|
-
import { TypeOf } from "zod";
|
|
2
|
-
export type Commands = "introspect" | "generate" | "check" | "up" | "drop" | "push";
|
|
3
|
-
/**
|
|
4
|
-
* This function checks an input from a user and if there are any params together with config path - return true
|
|
5
|
-
* @param options - user input
|
|
6
|
-
* @param inputWhitelist - whitelist some cli options that can be used together with config option
|
|
7
|
-
* @returns true if there was a collision, false if everything is valid
|
|
8
|
-
*/
|
|
9
|
-
export declare const assertCollisions: (options: Record<string, unknown>, command: Commands, inputWhitelist?: string[]) => "config" | "cli";
|
|
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
|
-
out?: string | undefined;
|
|
24
|
-
driver?: "pg" | "turso" | "better-sqlite" | "libsql" | "d1" | "mysql2" | "expo" | undefined;
|
|
25
|
-
tablesFilter?: string | string[] | undefined;
|
|
26
|
-
schema: string | string[];
|
|
27
|
-
dialect: "mysql" | "pg" | "sqlite";
|
|
28
|
-
breakpoints: boolean;
|
|
29
|
-
schemaFilter: string | string[];
|
|
30
|
-
}, {
|
|
31
|
-
out?: string | undefined;
|
|
32
|
-
breakpoints?: boolean | undefined;
|
|
33
|
-
driver?: "pg" | "turso" | "better-sqlite" | "libsql" | "d1" | "mysql2" | "expo" | undefined;
|
|
34
|
-
tablesFilter?: string | string[] | undefined;
|
|
35
|
-
schemaFilter?: string | string[] | undefined;
|
|
36
|
-
schema: string | string[];
|
|
37
|
-
dialect: "mysql" | "pg" | "sqlite";
|
|
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
|
-
schema?: string | string[] | undefined;
|
|
55
|
-
tablesFilter?: string | string[] | undefined;
|
|
56
|
-
introspect: {
|
|
57
|
-
casing: "camel" | "preserve";
|
|
58
|
-
};
|
|
59
|
-
out: string;
|
|
60
|
-
breakpoints: boolean;
|
|
61
|
-
schemaFilter: string | string[];
|
|
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
|
-
schema?: string | string[] | undefined;
|
|
83
|
-
tablesFilter?: string | string[] | undefined;
|
|
84
|
-
out: string;
|
|
85
|
-
breakpoints: boolean;
|
|
86
|
-
schemaFilter: string | string[];
|
|
87
|
-
introspectCasing: "camel" | "preserve";
|
|
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
|
-
out?: string | undefined;
|
|
106
|
-
breakpoints?: boolean | undefined;
|
|
107
|
-
schema: string | string[];
|
|
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
|
-
out?: string | undefined;
|
|
120
|
-
tablesFilter?: string | string[] | undefined;
|
|
121
|
-
strict: boolean;
|
|
122
|
-
schema: string | string[];
|
|
123
|
-
dialect: "mysql" | "pg" | "sqlite";
|
|
124
|
-
schemaFilter: string | string[];
|
|
125
|
-
verbose: boolean;
|
|
126
|
-
}, {
|
|
127
|
-
strict?: boolean | undefined;
|
|
128
|
-
out?: string | 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").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 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>;
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import { TypeOf } from "zod";
|
|
2
|
-
export declare const mysqlCredentials: import("zod").ZodUnion<[import("zod").ZodObject<{
|
|
3
|
-
host: import("zod").ZodString;
|
|
4
|
-
port: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
5
|
-
user: import("zod").ZodDefault<import("zod").ZodString>;
|
|
6
|
-
password: import("zod").ZodOptional<import("zod").ZodString>;
|
|
7
|
-
database: import("zod").ZodString;
|
|
8
|
-
}, "strip", import("zod").ZodTypeAny, {
|
|
9
|
-
port?: number | undefined;
|
|
10
|
-
password?: string | undefined;
|
|
11
|
-
host: string;
|
|
12
|
-
user: string;
|
|
13
|
-
database: string;
|
|
14
|
-
}, {
|
|
15
|
-
port?: number | undefined;
|
|
16
|
-
user?: string | undefined;
|
|
17
|
-
password?: string | undefined;
|
|
18
|
-
host: string;
|
|
19
|
-
database: string;
|
|
20
|
-
}>, import("zod").ZodObject<{
|
|
21
|
-
uri: import("zod").ZodString;
|
|
22
|
-
}, "strip", import("zod").ZodTypeAny, {
|
|
23
|
-
uri: string;
|
|
24
|
-
}, {
|
|
25
|
-
uri: string;
|
|
26
|
-
}>, import("zod").ZodObject<{
|
|
27
|
-
connectionString: import("zod").ZodString;
|
|
28
|
-
}, "strip", import("zod").ZodTypeAny, {
|
|
29
|
-
connectionString: string;
|
|
30
|
-
}, {
|
|
31
|
-
connectionString: string;
|
|
32
|
-
}>]>;
|
|
33
|
-
export type MysqlCredentials = TypeOf<typeof mysqlCredentials>;
|
|
34
|
-
export declare const printCliConnectionIssues: (options: any) => void;
|
|
35
|
-
export declare const printConfigConnectionIssues: (options: Record<string, unknown>) => void;
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
export declare const withStyle: {
|
|
2
|
-
error: (str: string) => string;
|
|
3
|
-
warning: (str: string) => string;
|
|
4
|
-
errorWarning: (str: string) => string;
|
|
5
|
-
fullWarning: (str: string) => string;
|
|
6
|
-
suggestion: (str: string) => string;
|
|
7
|
-
};
|
|
8
|
-
export declare const outputs: {
|
|
9
|
-
studio: {
|
|
10
|
-
drivers: (param: string) => string;
|
|
11
|
-
noCredentials: () => string;
|
|
12
|
-
noDriver: () => string;
|
|
13
|
-
noDialect: () => string;
|
|
14
|
-
};
|
|
15
|
-
common: {
|
|
16
|
-
ambiguousParams: (command: string) => string;
|
|
17
|
-
schema: (command: string) => string;
|
|
18
|
-
schemaConfig: (command: string) => string;
|
|
19
|
-
};
|
|
20
|
-
postgres: {
|
|
21
|
-
connection: {
|
|
22
|
-
driver: () => string;
|
|
23
|
-
required: () => string;
|
|
24
|
-
};
|
|
25
|
-
};
|
|
26
|
-
mysql: {
|
|
27
|
-
connection: {
|
|
28
|
-
driver: () => string;
|
|
29
|
-
required: () => string;
|
|
30
|
-
};
|
|
31
|
-
};
|
|
32
|
-
sqlite: {
|
|
33
|
-
connection: {
|
|
34
|
-
driver: () => string;
|
|
35
|
-
url: (driver: string) => string;
|
|
36
|
-
authToken: (driver: string) => string;
|
|
37
|
-
};
|
|
38
|
-
introspect: {};
|
|
39
|
-
push: {};
|
|
40
|
-
};
|
|
41
|
-
};
|
package/cli/validations/pg.d.ts
DELETED
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import { TypeOf } from "zod";
|
|
2
|
-
export declare const postgresCredentials: import("zod").ZodUnion<[import("zod").ZodObject<{
|
|
3
|
-
host: import("zod").ZodString;
|
|
4
|
-
port: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
5
|
-
user: import("zod").ZodDefault<import("zod").ZodString>;
|
|
6
|
-
password: import("zod").ZodOptional<import("zod").ZodString>;
|
|
7
|
-
database: import("zod").ZodString;
|
|
8
|
-
ssl: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
9
|
-
}, "strip", import("zod").ZodTypeAny, {
|
|
10
|
-
port?: number | undefined;
|
|
11
|
-
password?: string | undefined;
|
|
12
|
-
ssl?: boolean | undefined;
|
|
13
|
-
host: string;
|
|
14
|
-
user: string;
|
|
15
|
-
database: string;
|
|
16
|
-
}, {
|
|
17
|
-
port?: number | undefined;
|
|
18
|
-
user?: string | undefined;
|
|
19
|
-
password?: string | undefined;
|
|
20
|
-
ssl?: boolean | undefined;
|
|
21
|
-
host: string;
|
|
22
|
-
database: string;
|
|
23
|
-
}>, import("zod").ZodObject<{
|
|
24
|
-
connectionString: import("zod").ZodString;
|
|
25
|
-
}, "strip", import("zod").ZodTypeAny, {
|
|
26
|
-
connectionString: string;
|
|
27
|
-
}, {
|
|
28
|
-
connectionString: string;
|
|
29
|
-
}>]>;
|
|
30
|
-
export type PostgresCredentials = TypeOf<typeof postgresCredentials>;
|
|
31
|
-
export declare const printConfigConnectionIssues: (options: Record<string, unknown>) => void;
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import { TypeOf } from "zod";
|
|
2
|
-
export declare const sqliteCredentials: import("zod").ZodUnion<[import("zod").ZodObject<{
|
|
3
|
-
driver: import("zod").ZodLiteral<"turso">;
|
|
4
|
-
url: import("zod").ZodString;
|
|
5
|
-
authToken: import("zod").ZodString;
|
|
6
|
-
}, "strip", import("zod").ZodTypeAny, {
|
|
7
|
-
url: string;
|
|
8
|
-
driver: "turso";
|
|
9
|
-
authToken: string;
|
|
10
|
-
}, {
|
|
11
|
-
url: string;
|
|
12
|
-
driver: "turso";
|
|
13
|
-
authToken: string;
|
|
14
|
-
}>, import("zod").ZodObject<{
|
|
15
|
-
driver: import("zod").ZodLiteral<"better-sqlite">;
|
|
16
|
-
url: import("zod").ZodString;
|
|
17
|
-
}, "strip", import("zod").ZodTypeAny, {
|
|
18
|
-
url: string;
|
|
19
|
-
driver: "better-sqlite";
|
|
20
|
-
}, {
|
|
21
|
-
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
|
-
}>]>;
|
|
33
|
-
export type SqliteCredentials = TypeOf<typeof sqliteCredentials>;
|
|
34
|
-
export declare const printConfigConnectionIssues: (options: Record<string, unknown>) => void;
|
package/cli/views.d.ts
DELETED
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
import { Prompt, TaskView } from "hanji";
|
|
2
|
-
import type { CommonSchema } from "../schemaValidator";
|
|
3
|
-
import type { Named, NamedWithSchema } from "./commands/migrate";
|
|
4
|
-
export declare const warning: (msg: string) => void;
|
|
5
|
-
export declare const err: (msg: string) => void;
|
|
6
|
-
export declare const info: (msg: string, greyMsg?: string) => string;
|
|
7
|
-
export declare const error: (error: string, greyMsg?: string) => string;
|
|
8
|
-
export declare const schema: (schema: CommonSchema) => string;
|
|
9
|
-
export interface RenamePropmtItem<T> {
|
|
10
|
-
from: T;
|
|
11
|
-
to: T;
|
|
12
|
-
}
|
|
13
|
-
export declare const isRenamePromptItem: <T extends Named>(item: RenamePropmtItem<T> | T) => item is RenamePropmtItem<T>;
|
|
14
|
-
export declare class ResolveColumnSelect<T extends Named> extends Prompt<RenamePropmtItem<T> | T> {
|
|
15
|
-
private readonly tableName;
|
|
16
|
-
private readonly base;
|
|
17
|
-
private readonly data;
|
|
18
|
-
constructor(tableName: string, base: Named, data: (RenamePropmtItem<T> | T)[]);
|
|
19
|
-
render(status: "idle" | "submitted" | "aborted"): string;
|
|
20
|
-
result(): RenamePropmtItem<T> | T;
|
|
21
|
-
}
|
|
22
|
-
export declare const tableKey: (it: NamedWithSchema) => string;
|
|
23
|
-
export declare class ResolveSelect<T extends NamedWithSchema> extends Prompt<RenamePropmtItem<T> | T> {
|
|
24
|
-
private readonly base;
|
|
25
|
-
private readonly entityType;
|
|
26
|
-
private readonly state;
|
|
27
|
-
constructor(base: T, data: (RenamePropmtItem<T> | T)[], entityType: "table" | "enum");
|
|
28
|
-
render(status: "idle" | "submitted" | "aborted"): string;
|
|
29
|
-
result(): RenamePropmtItem<T> | T;
|
|
30
|
-
}
|
|
31
|
-
export declare class ResolveSchemasSelect<T extends Named> extends Prompt<RenamePropmtItem<T> | T> {
|
|
32
|
-
private readonly base;
|
|
33
|
-
private readonly state;
|
|
34
|
-
constructor(base: Named, data: (RenamePropmtItem<T> | T)[]);
|
|
35
|
-
render(status: "idle" | "submitted" | "aborted"): string;
|
|
36
|
-
result(): RenamePropmtItem<T> | T;
|
|
37
|
-
}
|
|
38
|
-
export type IntrospectStatus = "fetching" | "done";
|
|
39
|
-
export type IntrospectStage = "tables" | "columns" | "enums" | "indexes" | "fks";
|
|
40
|
-
export declare class IntrospectProgress extends TaskView {
|
|
41
|
-
private readonly spinner;
|
|
42
|
-
private timeout;
|
|
43
|
-
private state;
|
|
44
|
-
constructor();
|
|
45
|
-
update(stage: IntrospectStage, count: number, status: IntrospectStatus): void;
|
|
46
|
-
private formatCount;
|
|
47
|
-
private statusText;
|
|
48
|
-
render(): string;
|
|
49
|
-
}
|
|
50
|
-
export declare class DropMigrationView<T extends {
|
|
51
|
-
tag: string;
|
|
52
|
-
}> extends Prompt<T> {
|
|
53
|
-
private readonly data;
|
|
54
|
-
constructor(data: T[]);
|
|
55
|
-
render(status: "idle" | "submitted" | "aborted"): string;
|
|
56
|
-
result(): T;
|
|
57
|
-
}
|
|
58
|
-
export declare const trimmedRange: <T>(arr: T[], index: number, limitLines: number) => {
|
|
59
|
-
trimmed: T[];
|
|
60
|
-
offset: number;
|
|
61
|
-
startTrimmed: boolean;
|
|
62
|
-
endTrimmed: boolean;
|
|
63
|
-
};
|
package/global.d.ts
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
export declare const originUUID = "00000000-0000-0000-0000-000000000000";
|
|
2
|
-
export declare const snapshotVersion = "6";
|
|
3
|
-
export declare function assertUnreachable(x: never): never;
|
|
4
|
-
export declare const mapValues: <IN, OUT>(obj: Record<string, IN>, map: (input: IN) => OUT) => Record<string, OUT>;
|
|
5
|
-
export declare const mapKeys: <T>(obj: Record<string, T>, map: (key: string, value: T) => string) => Record<string, T>;
|
|
6
|
-
export declare const mapEntries: <T>(obj: Record<string, T>, map: (key: string, value: T) => [string, T]) => Record<string, T>;
|
package/introspect-sqlite.d.ts
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import "./@types/utils";
|
|
2
|
-
import type { Casing } from "./cli/validations/common";
|
|
3
|
-
import type { SQLiteSchemaInternal } from "./serializer/sqliteSchema";
|
|
4
|
-
export declare const indexName: (tableName: string, columns: string[]) => string;
|
|
5
|
-
export declare const schemaToTypeScript: (schema: SQLiteSchemaInternal, casing: Casing) => {
|
|
6
|
-
file: string;
|
|
7
|
-
imports: string;
|
|
8
|
-
decalrations: string;
|
|
9
|
-
schemaEntry: string;
|
|
10
|
-
};
|