drizzle-kit 0.20.18 → 0.21.0-5196c95
Sign up to get free protection for your applications and to get access to all the features.
- package/bin.cjs +105330 -56873
- package/index.d.mts +232 -68
- package/index.d.ts +232 -68
- package/index.js +1 -0
- package/package.json +44 -72
- package/payload.d.mts +1052 -18
- package/payload.d.ts +1052 -18
- package/payload.js +22129 -34534
- package/payload.mjs +22174 -34562
- package/utils-studio.js +4580 -805
- package/utils-studio.mjs +4556 -784
- package/utils.js +4410 -6940
- package/utils.mjs +4852 -7382
- package/@types/utils.d.ts +0 -12
- package/cli/commands/migrate.d.ts +0 -270
- package/cli/commands/mysqlIntrospect.d.ts +0 -119
- package/cli/commands/mysqlPushUtils.d.ts +0 -18
- package/cli/commands/mysqlUp.d.ts +0 -4
- package/cli/commands/pgConnect.d.ts +0 -5
- package/cli/commands/pgIntrospect.d.ts +0 -123
- package/cli/commands/pgPushUtils.d.ts +0 -14
- package/cli/commands/pgUp.d.ts +0 -4
- package/cli/commands/sqliteIntrospect.d.ts +0 -107
- package/cli/commands/sqlitePushUtils.d.ts +0 -21
- package/cli/commands/sqliteUtils.d.ts +0 -162
- package/cli/commands/upFolders.d.ts +0 -27
- package/cli/commands/utils.d.ts +0 -274
- package/cli/selector-ui.d.ts +0 -13
- package/cli/validations/common.d.ts +0 -13
- package/cli/validations/mysql.d.ts +0 -365
- package/cli/validations/outputs.d.ts +0 -40
- package/cli/validations/pg.d.ts +0 -438
- package/cli/views.d.ts +0 -61
- package/drivers/index.d.ts +0 -39
- package/global.d.ts +0 -4
- package/introspect-mysql.d.ts +0 -9
- package/introspect-pg.d.ts +0 -12
- package/introspect-sqlite.d.ts +0 -10
- package/jsonDiffer.d.ts +0 -76
- package/jsonStatements.d.ts +0 -349
- package/migrationPreparator.d.ts +0 -35
- package/schemaValidator.d.ts +0 -1313
- package/serializer/index.d.ts +0 -9
- package/serializer/mysqlImports.d.ts +0 -11
- package/serializer/mysqlSchema.d.ts +0 -3833
- package/serializer/mysqlSerializer.d.ts +0 -7
- package/serializer/pgImports.d.ts +0 -11
- package/serializer/pgSchema.d.ts +0 -4333
- package/serializer/pgSerializer.d.ts +0 -7
- package/serializer/schemaToDrizzle.d.ts +0 -7
- package/serializer/sqliteImports.d.ts +0 -9
- package/serializer/sqliteSchema.d.ts +0 -3227
- package/serializer/sqliteSerializer.d.ts +0 -6
- package/snapshotsDiffer.d.ts +0 -2660
- package/sqlgenerator.d.ts +0 -33
- package/utils/words.d.ts +0 -7
- package/utils-studio.d.mts +0 -5
- package/utils-studio.d.ts +0 -5
- package/utils.d.ts +0 -199
@@ -1,21 +0,0 @@
|
|
1
|
-
import { DrizzleDbClient } from "src/drivers";
|
2
|
-
import { JsonStatement } from "src/jsonStatements";
|
3
|
-
import { SQLiteSchemaInternal, SQLiteSchemaSquashed } from "src/serializer/sqliteSchema";
|
4
|
-
export declare const _moveDataStatements: (tableName: string, json: SQLiteSchemaSquashed, dataLoss?: boolean) => string[];
|
5
|
-
export declare const getOldTableName: (tableName: string, meta: SQLiteSchemaInternal["_meta"]) => string;
|
6
|
-
export declare const getNewTableName: (tableName: string, meta: SQLiteSchemaInternal["_meta"]) => string;
|
7
|
-
export declare const logSuggestionsAndReturn: ({ connection, statements, json1, json2, meta, }: {
|
8
|
-
statements: JsonStatement[];
|
9
|
-
connection: DrizzleDbClient;
|
10
|
-
json1: SQLiteSchemaSquashed;
|
11
|
-
json2: SQLiteSchemaSquashed;
|
12
|
-
meta: SQLiteSchemaInternal["_meta"];
|
13
|
-
}) => Promise<{
|
14
|
-
statementsToExecute: string[];
|
15
|
-
shouldAskForApprove: boolean;
|
16
|
-
infoToPrint: string[];
|
17
|
-
columnsToRemove: string[];
|
18
|
-
schemasToRemove: string[];
|
19
|
-
tablesToTruncate: string[];
|
20
|
-
tablesToRemove: string[];
|
21
|
-
}>;
|
@@ -1,162 +0,0 @@
|
|
1
|
-
import { TypeOf } from "zod";
|
2
|
-
import { configIntrospectSchema } from "./utils";
|
3
|
-
export declare const sqliteConnectionSchema: import("zod").ZodUnion<[import("zod").ZodObject<{
|
4
|
-
driver: import("zod").ZodLiteral<"turso">;
|
5
|
-
dbCredentials: import("zod").ZodObject<{
|
6
|
-
url: import("zod").ZodString;
|
7
|
-
authToken: import("zod").ZodOptional<import("zod").ZodString>;
|
8
|
-
}, "strip", import("zod").ZodTypeAny, {
|
9
|
-
authToken?: string | undefined;
|
10
|
-
url: string;
|
11
|
-
}, {
|
12
|
-
authToken?: string | undefined;
|
13
|
-
url: string;
|
14
|
-
}>;
|
15
|
-
}, "strip", import("zod").ZodTypeAny, {
|
16
|
-
driver: "turso";
|
17
|
-
dbCredentials: {
|
18
|
-
authToken?: string | undefined;
|
19
|
-
url: string;
|
20
|
-
};
|
21
|
-
}, {
|
22
|
-
driver: "turso";
|
23
|
-
dbCredentials: {
|
24
|
-
authToken?: string | undefined;
|
25
|
-
url: string;
|
26
|
-
};
|
27
|
-
}>, import("zod").ZodObject<{
|
28
|
-
driver: import("zod").ZodLiteral<"libsql">;
|
29
|
-
dbCredentials: import("zod").ZodObject<{
|
30
|
-
url: import("zod").ZodString;
|
31
|
-
}, "strip", import("zod").ZodTypeAny, {
|
32
|
-
url: string;
|
33
|
-
}, {
|
34
|
-
url: string;
|
35
|
-
}>;
|
36
|
-
}, "strip", import("zod").ZodTypeAny, {
|
37
|
-
driver: "libsql";
|
38
|
-
dbCredentials: {
|
39
|
-
url: string;
|
40
|
-
};
|
41
|
-
}, {
|
42
|
-
driver: "libsql";
|
43
|
-
dbCredentials: {
|
44
|
-
url: string;
|
45
|
-
};
|
46
|
-
}>, import("zod").ZodObject<{
|
47
|
-
driver: import("zod").ZodLiteral<"better-sqlite">;
|
48
|
-
dbCredentials: import("zod").ZodObject<{
|
49
|
-
url: import("zod").ZodString;
|
50
|
-
}, "strip", import("zod").ZodTypeAny, {
|
51
|
-
url: string;
|
52
|
-
}, {
|
53
|
-
url: string;
|
54
|
-
}>;
|
55
|
-
}, "strip", import("zod").ZodTypeAny, {
|
56
|
-
driver: "better-sqlite";
|
57
|
-
dbCredentials: {
|
58
|
-
url: string;
|
59
|
-
};
|
60
|
-
}, {
|
61
|
-
driver: "better-sqlite";
|
62
|
-
dbCredentials: {
|
63
|
-
url: string;
|
64
|
-
};
|
65
|
-
}>]>;
|
66
|
-
export declare const sqliteCliConfigSchema: import("zod").ZodIntersection<import("zod").ZodObject<{
|
67
|
-
schema: import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodString, import("zod").ZodArray<import("zod").ZodString, "many">]>>;
|
68
|
-
out: import("zod").ZodDefault<import("zod").ZodOptional<import("zod").ZodString>>;
|
69
|
-
breakpoints: import("zod").ZodDefault<import("zod").ZodBoolean>;
|
70
|
-
tablesFilter: import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodString, import("zod").ZodArray<import("zod").ZodString, "many">]>>;
|
71
|
-
schemaFilter: import("zod").ZodDefault<import("zod").ZodUnion<[import("zod").ZodString, import("zod").ZodArray<import("zod").ZodString, "many">]>>;
|
72
|
-
introspect: import("zod").ZodDefault<import("zod").ZodObject<{
|
73
|
-
casing: import("zod").ZodDefault<import("zod").ZodUnion<[import("zod").ZodLiteral<"camel">, import("zod").ZodLiteral<"preserve">]>>;
|
74
|
-
}, "strip", import("zod").ZodTypeAny, {
|
75
|
-
casing: "camel" | "preserve";
|
76
|
-
}, {
|
77
|
-
casing?: "camel" | "preserve" | undefined;
|
78
|
-
}>>;
|
79
|
-
}, "strip", import("zod").ZodTypeAny, {
|
80
|
-
schema?: string | string[] | undefined;
|
81
|
-
tablesFilter?: string | string[] | undefined;
|
82
|
-
out: string;
|
83
|
-
breakpoints: boolean;
|
84
|
-
schemaFilter: string | string[];
|
85
|
-
introspect: {
|
86
|
-
casing: "camel" | "preserve";
|
87
|
-
};
|
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
|
-
introspect?: {
|
95
|
-
casing?: "camel" | "preserve" | undefined;
|
96
|
-
} | undefined;
|
97
|
-
}>, import("zod").ZodUnion<[import("zod").ZodObject<{
|
98
|
-
driver: import("zod").ZodLiteral<"turso">;
|
99
|
-
dbCredentials: import("zod").ZodObject<{
|
100
|
-
url: import("zod").ZodString;
|
101
|
-
authToken: import("zod").ZodOptional<import("zod").ZodString>;
|
102
|
-
}, "strip", import("zod").ZodTypeAny, {
|
103
|
-
authToken?: string | undefined;
|
104
|
-
url: string;
|
105
|
-
}, {
|
106
|
-
authToken?: string | undefined;
|
107
|
-
url: string;
|
108
|
-
}>;
|
109
|
-
}, "strip", import("zod").ZodTypeAny, {
|
110
|
-
driver: "turso";
|
111
|
-
dbCredentials: {
|
112
|
-
authToken?: string | undefined;
|
113
|
-
url: string;
|
114
|
-
};
|
115
|
-
}, {
|
116
|
-
driver: "turso";
|
117
|
-
dbCredentials: {
|
118
|
-
authToken?: string | undefined;
|
119
|
-
url: string;
|
120
|
-
};
|
121
|
-
}>, import("zod").ZodObject<{
|
122
|
-
driver: import("zod").ZodLiteral<"libsql">;
|
123
|
-
dbCredentials: import("zod").ZodObject<{
|
124
|
-
url: import("zod").ZodString;
|
125
|
-
}, "strip", import("zod").ZodTypeAny, {
|
126
|
-
url: string;
|
127
|
-
}, {
|
128
|
-
url: string;
|
129
|
-
}>;
|
130
|
-
}, "strip", import("zod").ZodTypeAny, {
|
131
|
-
driver: "libsql";
|
132
|
-
dbCredentials: {
|
133
|
-
url: string;
|
134
|
-
};
|
135
|
-
}, {
|
136
|
-
driver: "libsql";
|
137
|
-
dbCredentials: {
|
138
|
-
url: string;
|
139
|
-
};
|
140
|
-
}>, import("zod").ZodObject<{
|
141
|
-
driver: import("zod").ZodLiteral<"better-sqlite">;
|
142
|
-
dbCredentials: import("zod").ZodObject<{
|
143
|
-
url: import("zod").ZodString;
|
144
|
-
}, "strip", import("zod").ZodTypeAny, {
|
145
|
-
url: string;
|
146
|
-
}, {
|
147
|
-
url: string;
|
148
|
-
}>;
|
149
|
-
}, "strip", import("zod").ZodTypeAny, {
|
150
|
-
driver: "better-sqlite";
|
151
|
-
dbCredentials: {
|
152
|
-
url: string;
|
153
|
-
};
|
154
|
-
}, {
|
155
|
-
driver: "better-sqlite";
|
156
|
-
dbCredentials: {
|
157
|
-
url: string;
|
158
|
-
};
|
159
|
-
}>]>>;
|
160
|
-
export type SQLiteCliConfig = TypeOf<typeof sqliteCliConfigSchema>;
|
161
|
-
export type SQLiteConnectionConfig = TypeOf<typeof sqliteConnectionSchema>;
|
162
|
-
export { configIntrospectSchema };
|
@@ -1,27 +0,0 @@
|
|
1
|
-
import { Dialect } from "src/schemaValidator";
|
2
|
-
import { Named, NamedWithSchema } from "./migrate";
|
3
|
-
export declare const resolveSchemas: <T extends Named>(missingSchemas: T[], newSchemas: T[], predicate: (leftMissing: T[], created: T) => T | undefined) => {
|
4
|
-
created: T[];
|
5
|
-
renamed: {
|
6
|
-
from: T;
|
7
|
-
to: T;
|
8
|
-
}[];
|
9
|
-
deleted: T[];
|
10
|
-
};
|
11
|
-
export declare const resolveTables: <T extends NamedWithSchema>(missingTables: T[], newTables: T[], resolver: (leftMissing: T[], created: T) => T | undefined) => {
|
12
|
-
created: T[];
|
13
|
-
renamed: {
|
14
|
-
from: T;
|
15
|
-
to: T;
|
16
|
-
}[];
|
17
|
-
deleted: T[];
|
18
|
-
};
|
19
|
-
export declare const resolveColumns: <T extends Named>(missingColumns: T[], newColumns: T[], predicate: (leftMissing: T[], created: T) => T | undefined) => {
|
20
|
-
created: T[];
|
21
|
-
renamed: {
|
22
|
-
from: T;
|
23
|
-
to: T;
|
24
|
-
}[];
|
25
|
-
deleted: T[];
|
26
|
-
};
|
27
|
-
export declare const upgradeFolders: (dialect: Dialect, out: string) => void;
|
package/cli/commands/utils.d.ts
DELETED
@@ -1,274 +0,0 @@
|
|
1
|
-
import { TypeOf } from "zod";
|
2
|
-
export declare const safeRegister: () => Promise<{
|
3
|
-
unregister: () => void;
|
4
|
-
}>;
|
5
|
-
export type GenerateConfig = {
|
6
|
-
schema: string | string[];
|
7
|
-
out: string;
|
8
|
-
breakpoints: boolean;
|
9
|
-
custom: boolean;
|
10
|
-
bundle: boolean;
|
11
|
-
};
|
12
|
-
export declare const prepareGenerateConfig: (options: {
|
13
|
-
schema?: string | string[];
|
14
|
-
out?: string;
|
15
|
-
config?: string;
|
16
|
-
breakpoints: boolean;
|
17
|
-
custom: boolean;
|
18
|
-
}) => Promise<GenerateConfig>;
|
19
|
-
export declare const assertOutFolder: (it: {
|
20
|
-
config?: string;
|
21
|
-
} | {
|
22
|
-
out: string;
|
23
|
-
}) => Promise<string>;
|
24
|
-
export declare const driver: import("zod").ZodUnion<[import("zod").ZodLiteral<"better-sqlite">, import("zod").ZodLiteral<"turso">, import("zod").ZodLiteral<"libsql">, import("zod").ZodLiteral<"d1">, import("zod").ZodLiteral<"expo">, import("zod").ZodLiteral<"pg">, import("zod").ZodLiteral<"mysql2">]>;
|
25
|
-
export declare const configCommonSchema: import("zod").ZodObject<{
|
26
|
-
schema: import("zod").ZodUnion<[import("zod").ZodString, import("zod").ZodArray<import("zod").ZodString, "many">]>;
|
27
|
-
out: import("zod").ZodOptional<import("zod").ZodString>;
|
28
|
-
breakpoints: import("zod").ZodDefault<import("zod").ZodBoolean>;
|
29
|
-
driver: import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodLiteral<"better-sqlite">, import("zod").ZodLiteral<"turso">, import("zod").ZodLiteral<"libsql">, import("zod").ZodLiteral<"d1">, import("zod").ZodLiteral<"expo">, import("zod").ZodLiteral<"pg">, import("zod").ZodLiteral<"mysql2">]>>;
|
30
|
-
tablesFilter: import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodString, import("zod").ZodArray<import("zod").ZodString, "many">]>>;
|
31
|
-
schemaFilter: import("zod").ZodDefault<import("zod").ZodUnion<[import("zod").ZodString, import("zod").ZodArray<import("zod").ZodString, "many">]>>;
|
32
|
-
}, "strip", import("zod").ZodTypeAny, {
|
33
|
-
out?: string | undefined;
|
34
|
-
driver?: "turso" | "better-sqlite" | "libsql" | "d1" | "pg" | "mysql2" | "expo" | undefined;
|
35
|
-
tablesFilter?: string | string[] | undefined;
|
36
|
-
schema: string | string[];
|
37
|
-
breakpoints: boolean;
|
38
|
-
schemaFilter: string | string[];
|
39
|
-
}, {
|
40
|
-
out?: string | undefined;
|
41
|
-
breakpoints?: boolean | undefined;
|
42
|
-
driver?: "turso" | "better-sqlite" | "libsql" | "d1" | "pg" | "mysql2" | "expo" | undefined;
|
43
|
-
tablesFilter?: string | string[] | undefined;
|
44
|
-
schemaFilter?: string | string[] | undefined;
|
45
|
-
schema: string | string[];
|
46
|
-
}>;
|
47
|
-
export declare const introspectCasing: import("zod").ZodDefault<import("zod").ZodObject<{
|
48
|
-
casing: import("zod").ZodDefault<import("zod").ZodUnion<[import("zod").ZodLiteral<"camel">, import("zod").ZodLiteral<"preserve">]>>;
|
49
|
-
}, "strip", import("zod").ZodTypeAny, {
|
50
|
-
casing: "camel" | "preserve";
|
51
|
-
}, {
|
52
|
-
casing?: "camel" | "preserve" | undefined;
|
53
|
-
}>>;
|
54
|
-
export declare const configIntrospectSchema: import("zod").ZodObject<{
|
55
|
-
schema: import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodString, import("zod").ZodArray<import("zod").ZodString, "many">]>>;
|
56
|
-
out: import("zod").ZodDefault<import("zod").ZodOptional<import("zod").ZodString>>;
|
57
|
-
breakpoints: import("zod").ZodDefault<import("zod").ZodBoolean>;
|
58
|
-
tablesFilter: import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodString, import("zod").ZodArray<import("zod").ZodString, "many">]>>;
|
59
|
-
schemaFilter: import("zod").ZodDefault<import("zod").ZodUnion<[import("zod").ZodString, import("zod").ZodArray<import("zod").ZodString, "many">]>>;
|
60
|
-
introspect: import("zod").ZodDefault<import("zod").ZodObject<{
|
61
|
-
casing: import("zod").ZodDefault<import("zod").ZodUnion<[import("zod").ZodLiteral<"camel">, import("zod").ZodLiteral<"preserve">]>>;
|
62
|
-
}, "strip", import("zod").ZodTypeAny, {
|
63
|
-
casing: "camel" | "preserve";
|
64
|
-
}, {
|
65
|
-
casing?: "camel" | "preserve" | undefined;
|
66
|
-
}>>;
|
67
|
-
}, "strip", import("zod").ZodTypeAny, {
|
68
|
-
schema?: string | string[] | undefined;
|
69
|
-
tablesFilter?: string | string[] | undefined;
|
70
|
-
out: string;
|
71
|
-
breakpoints: boolean;
|
72
|
-
schemaFilter: string | string[];
|
73
|
-
introspect: {
|
74
|
-
casing: "camel" | "preserve";
|
75
|
-
};
|
76
|
-
}, {
|
77
|
-
schema?: string | string[] | undefined;
|
78
|
-
out?: string | undefined;
|
79
|
-
breakpoints?: boolean | undefined;
|
80
|
-
tablesFilter?: string | string[] | undefined;
|
81
|
-
schemaFilter?: string | string[] | undefined;
|
82
|
-
introspect?: {
|
83
|
-
casing?: "camel" | "preserve" | undefined;
|
84
|
-
} | undefined;
|
85
|
-
}>;
|
86
|
-
export type ConfigIntrospectSchema = TypeOf<typeof configIntrospectSchema>;
|
87
|
-
export type ConfigIntrospectCasing = TypeOf<typeof introspectCasing>;
|
88
|
-
export declare const configIntrospectCliSchema: import("zod").ZodObject<{
|
89
|
-
schema: import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodString, import("zod").ZodArray<import("zod").ZodString, "many">]>>;
|
90
|
-
out: import("zod").ZodDefault<import("zod").ZodOptional<import("zod").ZodString>>;
|
91
|
-
breakpoints: import("zod").ZodDefault<import("zod").ZodBoolean>;
|
92
|
-
tablesFilter: import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodString, import("zod").ZodArray<import("zod").ZodString, "many">]>>;
|
93
|
-
schemaFilter: import("zod").ZodDefault<import("zod").ZodUnion<[import("zod").ZodString, import("zod").ZodArray<import("zod").ZodString, "many">]>>;
|
94
|
-
introspectCasing: import("zod").ZodDefault<import("zod").ZodUnion<[import("zod").ZodLiteral<"camel">, import("zod").ZodLiteral<"preserve">]>>;
|
95
|
-
}, "strip", import("zod").ZodTypeAny, {
|
96
|
-
schema?: string | string[] | undefined;
|
97
|
-
tablesFilter?: string | string[] | undefined;
|
98
|
-
out: string;
|
99
|
-
breakpoints: boolean;
|
100
|
-
schemaFilter: string | string[];
|
101
|
-
introspectCasing: "camel" | "preserve";
|
102
|
-
}, {
|
103
|
-
schema?: string | string[] | undefined;
|
104
|
-
out?: string | undefined;
|
105
|
-
breakpoints?: boolean | undefined;
|
106
|
-
tablesFilter?: string | string[] | undefined;
|
107
|
-
schemaFilter?: string | string[] | undefined;
|
108
|
-
introspectCasing?: "camel" | "preserve" | undefined;
|
109
|
-
}>;
|
110
|
-
export declare const configGenerateSchema: import("zod").ZodObject<{
|
111
|
-
schema: import("zod").ZodUnion<[import("zod").ZodString, import("zod").ZodArray<import("zod").ZodString, "many">]>;
|
112
|
-
out: import("zod").ZodDefault<import("zod").ZodOptional<import("zod").ZodString>>;
|
113
|
-
breakpoints: import("zod").ZodDefault<import("zod").ZodBoolean>;
|
114
|
-
}, "strip", import("zod").ZodTypeAny, {
|
115
|
-
schema: string | string[];
|
116
|
-
out: string;
|
117
|
-
breakpoints: boolean;
|
118
|
-
}, {
|
119
|
-
out?: string | undefined;
|
120
|
-
breakpoints?: boolean | undefined;
|
121
|
-
schema: string | string[];
|
122
|
-
}>;
|
123
|
-
export type GenerateSchema = TypeOf<typeof configGenerateSchema>;
|
124
|
-
export declare const configPushSchema: import("zod").ZodObject<{
|
125
|
-
schema: import("zod").ZodUnion<[import("zod").ZodString, import("zod").ZodArray<import("zod").ZodString, "many">]>;
|
126
|
-
tablesFilter: import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodString, import("zod").ZodArray<import("zod").ZodString, "many">]>>;
|
127
|
-
schemaFilter: import("zod").ZodDefault<import("zod").ZodUnion<[import("zod").ZodString, import("zod").ZodArray<import("zod").ZodString, "many">]>>;
|
128
|
-
verbose: import("zod").ZodDefault<import("zod").ZodBoolean>;
|
129
|
-
strict: import("zod").ZodDefault<import("zod").ZodBoolean>;
|
130
|
-
}, "strip", import("zod").ZodTypeAny, {
|
131
|
-
tablesFilter?: string | string[] | undefined;
|
132
|
-
strict: boolean;
|
133
|
-
schema: string | string[];
|
134
|
-
schemaFilter: string | string[];
|
135
|
-
verbose: boolean;
|
136
|
-
}, {
|
137
|
-
strict?: boolean | undefined;
|
138
|
-
tablesFilter?: string | string[] | undefined;
|
139
|
-
schemaFilter?: string | string[] | undefined;
|
140
|
-
verbose?: boolean | undefined;
|
141
|
-
schema: string | string[];
|
142
|
-
}>;
|
143
|
-
export declare const mysqlConnectionSchema: import("zod").ZodUnion<[import("zod").ZodObject<{
|
144
|
-
host: import("zod").ZodString;
|
145
|
-
port: import("zod").ZodOptional<import("zod").ZodNumber>;
|
146
|
-
user: import("zod").ZodDefault<import("zod").ZodString>;
|
147
|
-
password: import("zod").ZodOptional<import("zod").ZodString>;
|
148
|
-
database: import("zod").ZodString;
|
149
|
-
}, "strip", import("zod").ZodTypeAny, {
|
150
|
-
port?: number | undefined;
|
151
|
-
password?: string | undefined;
|
152
|
-
host: string;
|
153
|
-
user: string;
|
154
|
-
database: string;
|
155
|
-
}, {
|
156
|
-
port?: number | undefined;
|
157
|
-
user?: string | undefined;
|
158
|
-
password?: string | undefined;
|
159
|
-
host: string;
|
160
|
-
database: string;
|
161
|
-
}>, import("zod").ZodObject<{
|
162
|
-
connectionString: import("zod").ZodString;
|
163
|
-
}, "strip", import("zod").ZodTypeAny, {
|
164
|
-
connectionString: string;
|
165
|
-
}, {
|
166
|
-
connectionString: string;
|
167
|
-
}>, import("zod").ZodObject<{}, "strip", import("zod").ZodTypeAny, {}, {}>]>;
|
168
|
-
export declare const mySqlCliConfigSchema: import("zod").ZodIntersection<import("zod").ZodObject<{
|
169
|
-
schema: import("zod").ZodUnion<[import("zod").ZodString, import("zod").ZodArray<import("zod").ZodString, "many">]>;
|
170
|
-
out: import("zod").ZodOptional<import("zod").ZodString>;
|
171
|
-
breakpoints: import("zod").ZodDefault<import("zod").ZodBoolean>;
|
172
|
-
driver: import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodLiteral<"better-sqlite">, import("zod").ZodLiteral<"turso">, import("zod").ZodLiteral<"libsql">, import("zod").ZodLiteral<"d1">, import("zod").ZodLiteral<"expo">, import("zod").ZodLiteral<"pg">, import("zod").ZodLiteral<"mysql2">]>>;
|
173
|
-
tablesFilter: import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodString, import("zod").ZodArray<import("zod").ZodString, "many">]>>;
|
174
|
-
schemaFilter: import("zod").ZodDefault<import("zod").ZodUnion<[import("zod").ZodString, import("zod").ZodArray<import("zod").ZodString, "many">]>>;
|
175
|
-
}, "strip", import("zod").ZodTypeAny, {
|
176
|
-
out?: string | undefined;
|
177
|
-
driver?: "turso" | "better-sqlite" | "libsql" | "d1" | "pg" | "mysql2" | "expo" | undefined;
|
178
|
-
tablesFilter?: string | string[] | undefined;
|
179
|
-
schema: string | string[];
|
180
|
-
breakpoints: boolean;
|
181
|
-
schemaFilter: string | string[];
|
182
|
-
}, {
|
183
|
-
out?: string | undefined;
|
184
|
-
breakpoints?: boolean | undefined;
|
185
|
-
driver?: "turso" | "better-sqlite" | "libsql" | "d1" | "pg" | "mysql2" | "expo" | undefined;
|
186
|
-
tablesFilter?: string | string[] | undefined;
|
187
|
-
schemaFilter?: string | string[] | undefined;
|
188
|
-
schema: string | string[];
|
189
|
-
}>, import("zod").ZodUnion<[import("zod").ZodObject<{
|
190
|
-
host: import("zod").ZodString;
|
191
|
-
port: import("zod").ZodOptional<import("zod").ZodNumber>;
|
192
|
-
user: import("zod").ZodDefault<import("zod").ZodString>;
|
193
|
-
password: import("zod").ZodOptional<import("zod").ZodString>;
|
194
|
-
database: import("zod").ZodString;
|
195
|
-
}, "strip", import("zod").ZodTypeAny, {
|
196
|
-
port?: number | undefined;
|
197
|
-
password?: string | undefined;
|
198
|
-
host: string;
|
199
|
-
user: string;
|
200
|
-
database: string;
|
201
|
-
}, {
|
202
|
-
port?: number | undefined;
|
203
|
-
user?: string | undefined;
|
204
|
-
password?: string | undefined;
|
205
|
-
host: string;
|
206
|
-
database: string;
|
207
|
-
}>, import("zod").ZodObject<{
|
208
|
-
connectionString: import("zod").ZodString;
|
209
|
-
}, "strip", import("zod").ZodTypeAny, {
|
210
|
-
connectionString: string;
|
211
|
-
}, {
|
212
|
-
connectionString: string;
|
213
|
-
}>, import("zod").ZodObject<{}, "strip", import("zod").ZodTypeAny, {}, {}>]>>;
|
214
|
-
export declare const mySqlIntrospectConfigSchema: import("zod").ZodIntersection<import("zod").ZodObject<{
|
215
|
-
schema: import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodString, import("zod").ZodArray<import("zod").ZodString, "many">]>>;
|
216
|
-
out: import("zod").ZodDefault<import("zod").ZodOptional<import("zod").ZodString>>;
|
217
|
-
breakpoints: import("zod").ZodDefault<import("zod").ZodBoolean>;
|
218
|
-
tablesFilter: import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodString, import("zod").ZodArray<import("zod").ZodString, "many">]>>;
|
219
|
-
schemaFilter: import("zod").ZodDefault<import("zod").ZodUnion<[import("zod").ZodString, import("zod").ZodArray<import("zod").ZodString, "many">]>>;
|
220
|
-
introspect: import("zod").ZodDefault<import("zod").ZodObject<{
|
221
|
-
casing: import("zod").ZodDefault<import("zod").ZodUnion<[import("zod").ZodLiteral<"camel">, import("zod").ZodLiteral<"preserve">]>>;
|
222
|
-
}, "strip", import("zod").ZodTypeAny, {
|
223
|
-
casing: "camel" | "preserve";
|
224
|
-
}, {
|
225
|
-
casing?: "camel" | "preserve" | undefined;
|
226
|
-
}>>;
|
227
|
-
}, "strip", import("zod").ZodTypeAny, {
|
228
|
-
schema?: string | string[] | undefined;
|
229
|
-
tablesFilter?: string | string[] | undefined;
|
230
|
-
out: string;
|
231
|
-
breakpoints: boolean;
|
232
|
-
schemaFilter: string | string[];
|
233
|
-
introspect: {
|
234
|
-
casing: "camel" | "preserve";
|
235
|
-
};
|
236
|
-
}, {
|
237
|
-
schema?: string | string[] | undefined;
|
238
|
-
out?: string | undefined;
|
239
|
-
breakpoints?: boolean | undefined;
|
240
|
-
tablesFilter?: string | string[] | undefined;
|
241
|
-
schemaFilter?: string | string[] | undefined;
|
242
|
-
introspect?: {
|
243
|
-
casing?: "camel" | "preserve" | undefined;
|
244
|
-
} | undefined;
|
245
|
-
}>, import("zod").ZodUnion<[import("zod").ZodObject<{
|
246
|
-
host: import("zod").ZodString;
|
247
|
-
port: import("zod").ZodOptional<import("zod").ZodNumber>;
|
248
|
-
user: import("zod").ZodDefault<import("zod").ZodString>;
|
249
|
-
password: import("zod").ZodOptional<import("zod").ZodString>;
|
250
|
-
database: import("zod").ZodString;
|
251
|
-
}, "strip", import("zod").ZodTypeAny, {
|
252
|
-
port?: number | undefined;
|
253
|
-
password?: string | undefined;
|
254
|
-
host: string;
|
255
|
-
user: string;
|
256
|
-
database: string;
|
257
|
-
}, {
|
258
|
-
port?: number | undefined;
|
259
|
-
user?: string | undefined;
|
260
|
-
password?: string | undefined;
|
261
|
-
host: string;
|
262
|
-
database: string;
|
263
|
-
}>, import("zod").ZodObject<{
|
264
|
-
connectionString: import("zod").ZodString;
|
265
|
-
}, "strip", import("zod").ZodTypeAny, {
|
266
|
-
connectionString: string;
|
267
|
-
}, {
|
268
|
-
connectionString: string;
|
269
|
-
}>, import("zod").ZodObject<{}, "strip", import("zod").ZodTypeAny, {}, {}>]>>;
|
270
|
-
export type MySqlCliConfig = TypeOf<typeof mySqlCliConfigSchema>;
|
271
|
-
export type CliConfig = MySqlCliConfig;
|
272
|
-
export type Driver = TypeOf<typeof driver>;
|
273
|
-
export declare const drizzleConfigFromFile: (configPath?: string) => Promise<CliConfig>;
|
274
|
-
export declare const readDrizzleConfig: (configPath?: string) => Promise<any>;
|
package/cli/selector-ui.d.ts
DELETED
@@ -1,13 +0,0 @@
|
|
1
|
-
import { Prompt } from "hanji";
|
2
|
-
export declare class Select extends Prompt<{
|
3
|
-
index: number;
|
4
|
-
value: string;
|
5
|
-
}> {
|
6
|
-
private readonly data;
|
7
|
-
constructor(items: string[]);
|
8
|
-
render(status: "idle" | "submitted" | "aborted"): string;
|
9
|
-
result(): {
|
10
|
-
index: number;
|
11
|
-
value: string;
|
12
|
-
};
|
13
|
-
}
|
@@ -1,13 +0,0 @@
|
|
1
|
-
export type CollusionCheckOutput = {
|
2
|
-
success: boolean;
|
3
|
-
message?: string;
|
4
|
-
action: "config" | "cli" | "error";
|
5
|
-
};
|
6
|
-
export type Commands = "push:sqlite" | "introspect:sqlite" | "introspect:pg" | "generate:pg" | "generate:sqlite" | "generate:mysql" | "check:pg" | "check:mysql" | "check:sqlite" | "up:pg" | "up:mysql" | "up:sqlite" | "drop" | "introspect:mysql" | "push:mysql" | "push:pg";
|
7
|
-
/**
|
8
|
-
* This function checks an input from a user and if there are any params together with config path - return true
|
9
|
-
* @param options - user input
|
10
|
-
* @param inputWhitelist - whitelist some cli options that can be used together with config option
|
11
|
-
* @returns true if there was a collision, false if everything is valid
|
12
|
-
*/
|
13
|
-
export declare const checkCollisions: (options: Record<string, unknown>, command: Commands, inputWhitelist?: string[]) => CollusionCheckOutput;
|