drizzle-kit 0.20.17-7776aba → 0.20.17-8b4d89e
Sign up to get free protection for your applications and to get access to all the features.
- package/bin.cjs +28055 -26868
- package/cli/commands/migrate.d.ts +152 -135
- package/cli/commands/mysqlIntrospect.d.ts +15 -79
- package/cli/commands/mysqlPushUtils.d.ts +4 -8
- package/cli/commands/pgIntrospect.d.ts +12 -76
- package/cli/commands/pgPushUtils.d.ts +3 -6
- package/cli/commands/sqliteIntrospect.d.ts +26 -29
- package/cli/commands/sqlitePushUtils.d.ts +4 -10
- package/cli/commands/utils.d.ts +39 -255
- package/cli/utils.d.ts +12 -0
- package/cli/validations/cli.d.ts +169 -0
- package/cli/validations/common.d.ts +208 -7
- package/cli/validations/mysql.d.ts +7 -337
- package/cli/validations/outputs.d.ts +1 -0
- package/cli/validations/pg.d.ts +4 -405
- package/cli/validations/sqlite.d.ts +34 -0
- package/cli/views.d.ts +7 -5
- package/global.d.ts +3 -1
- package/index.d.mts +8 -6
- package/index.d.ts +8 -6
- package/index.js +1 -0
- package/introspect-sqlite.d.ts +2 -2
- package/jsonDiffer.d.ts +14 -29
- package/jsonStatements.d.ts +38 -11
- package/package.json +24 -52
- package/payload.d.mts +5 -5
- package/payload.d.ts +5 -5
- package/payload.js +34054 -32232
- package/payload.mjs +26477 -24666
- package/schemaValidator.d.ts +289 -286
- package/serializer/mysqlImports.d.ts +3 -7
- package/serializer/mysqlSchema.d.ts +2501 -1370
- package/serializer/mysqlSerializer.d.ts +6 -6
- package/serializer/pgImports.d.ts +2 -2
- package/serializer/pgSchema.d.ts +1741 -1282
- package/serializer/pgSerializer.d.ts +2 -2
- package/serializer/sqliteImports.d.ts +2 -4
- package/serializer/sqliteSchema.d.ts +553 -979
- package/serializer/sqliteSerializer.d.ts +4 -4
- package/snapshotsDiffer.d.ts +2486 -1209
- package/utils/words.d.ts +1 -1
- package/utils-studio.d.mts +0 -1
- package/utils-studio.d.ts +0 -1
- package/utils-studio.js +7056 -847
- package/utils-studio.mjs +7034 -828
- package/utils.d.ts +14 -141
- package/utils.js +4380 -6916
- package/utils.mjs +4593 -7129
- package/cli/commands/mysqlUp.d.ts +0 -4
- package/cli/commands/pgConnect.d.ts +0 -5
- package/cli/commands/pgUp.d.ts +0 -4
- package/cli/commands/sqliteUtils.d.ts +0 -162
- package/cli/commands/upFolders.d.ts +0 -27
- package/drivers/index.d.ts +0 -39
- package/introspect-mysql.d.ts +0 -9
- package/introspect-pg.d.ts +0 -12
@@ -1,81 +1,18 @@
|
|
1
|
-
import type {
|
2
|
-
|
3
|
-
export declare const pgSchemas: (client: DrizzleDbClient) => Promise<string[]>;
|
4
|
-
export declare const pgPushIntrospect: (connection: {
|
5
|
-
client: DrizzleDbClient;
|
6
|
-
}, filters: string[], schemaFilters: string[]) => Promise<{
|
1
|
+
import type { DB } from "../../utils";
|
2
|
+
export declare const pgPushIntrospect: (db: DB, filters: string[], schemaFilters: string[]) => Promise<{
|
7
3
|
schema: {
|
8
|
-
id: string;
|
9
|
-
prevId: string;
|
10
|
-
version: "5";
|
11
|
-
dialect: "pg";
|
12
4
|
tables: Record<string, {
|
13
5
|
name: string;
|
14
6
|
columns: Record<string, {
|
15
|
-
isUnique?: any;
|
16
|
-
default?: any;
|
17
|
-
uniqueName?: string | undefined;
|
18
|
-
nullsNotDistinct?: boolean | undefined;
|
19
7
|
name: string;
|
20
8
|
type: string;
|
21
9
|
primaryKey: boolean;
|
22
10
|
notNull: boolean;
|
23
|
-
}>;
|
24
|
-
indexes: Record<string, {
|
25
|
-
name: string;
|
26
|
-
columns: string[];
|
27
|
-
isUnique: boolean;
|
28
|
-
}>;
|
29
|
-
foreignKeys: Record<string, {
|
30
|
-
onUpdate?: string | undefined;
|
31
|
-
onDelete?: string | undefined;
|
32
|
-
schemaTo?: string | undefined;
|
33
|
-
name: string;
|
34
|
-
tableFrom: string;
|
35
|
-
columnsFrom: string[];
|
36
|
-
tableTo: string;
|
37
|
-
columnsTo: string[];
|
38
|
-
}>;
|
39
|
-
schema: string;
|
40
|
-
compositePrimaryKeys: Record<string, {
|
41
|
-
name: string;
|
42
|
-
columns: string[];
|
43
|
-
}>;
|
44
|
-
uniqueConstraints: Record<string, {
|
45
|
-
name: string;
|
46
|
-
columns: string[];
|
47
|
-
nullsNotDistinct: boolean;
|
48
|
-
}>;
|
49
|
-
}>;
|
50
|
-
schemas: Record<string, string>;
|
51
|
-
_meta: {
|
52
|
-
columns: Record<string, string>;
|
53
|
-
tables: Record<string, string>;
|
54
|
-
schemas: Record<string, string>;
|
55
|
-
};
|
56
|
-
enums: Record<string, {
|
57
|
-
name: string;
|
58
|
-
values: Record<string, string>;
|
59
|
-
}>;
|
60
|
-
};
|
61
|
-
}>;
|
62
|
-
export declare const pgIntrospect: (config: PgConfigIntrospect, filters: string[], schemaFilters: string[]) => Promise<{
|
63
|
-
schema: {
|
64
|
-
id: string;
|
65
|
-
prevId: string;
|
66
|
-
version: "5";
|
67
|
-
dialect: "pg";
|
68
|
-
tables: Record<string, {
|
69
|
-
name: string;
|
70
|
-
columns: Record<string, {
|
71
11
|
isUnique?: any;
|
72
12
|
default?: any;
|
13
|
+
typeSchema?: string | undefined;
|
73
14
|
uniqueName?: string | undefined;
|
74
15
|
nullsNotDistinct?: boolean | undefined;
|
75
|
-
name: string;
|
76
|
-
type: string;
|
77
|
-
primaryKey: boolean;
|
78
|
-
notNull: boolean;
|
79
16
|
}>;
|
80
17
|
indexes: Record<string, {
|
81
18
|
name: string;
|
@@ -83,14 +20,14 @@ export declare const pgIntrospect: (config: PgConfigIntrospect, filters: string[
|
|
83
20
|
isUnique: boolean;
|
84
21
|
}>;
|
85
22
|
foreignKeys: Record<string, {
|
86
|
-
onUpdate?: string | undefined;
|
87
|
-
onDelete?: string | undefined;
|
88
|
-
schemaTo?: string | undefined;
|
89
23
|
name: string;
|
90
24
|
tableFrom: string;
|
91
25
|
columnsFrom: string[];
|
92
26
|
tableTo: string;
|
93
27
|
columnsTo: string[];
|
28
|
+
onUpdate?: string | undefined;
|
29
|
+
onDelete?: string | undefined;
|
30
|
+
schemaTo?: string | undefined;
|
94
31
|
}>;
|
95
32
|
schema: string;
|
96
33
|
compositePrimaryKeys: Record<string, {
|
@@ -103,6 +40,10 @@ export declare const pgIntrospect: (config: PgConfigIntrospect, filters: string[
|
|
103
40
|
nullsNotDistinct: boolean;
|
104
41
|
}>;
|
105
42
|
}>;
|
43
|
+
id: string;
|
44
|
+
prevId: string;
|
45
|
+
version: "6";
|
46
|
+
dialect: "pg";
|
106
47
|
schemas: Record<string, string>;
|
107
48
|
_meta: {
|
108
49
|
columns: Record<string, string>;
|
@@ -111,13 +52,8 @@ export declare const pgIntrospect: (config: PgConfigIntrospect, filters: string[
|
|
111
52
|
};
|
112
53
|
enums: Record<string, {
|
113
54
|
name: string;
|
114
|
-
values:
|
55
|
+
values: string[];
|
56
|
+
schema: string;
|
115
57
|
}>;
|
116
58
|
};
|
117
|
-
ts: {
|
118
|
-
file: string;
|
119
|
-
imports: string;
|
120
|
-
decalrations: string;
|
121
|
-
schemaEntry: string;
|
122
|
-
};
|
123
59
|
}>;
|
@@ -1,9 +1,6 @@
|
|
1
|
-
import {
|
2
|
-
import { JsonStatement } from "
|
3
|
-
export declare const pgSuggestions: (
|
4
|
-
statements: JsonStatement[];
|
5
|
-
connection: DrizzleDbClient;
|
6
|
-
}) => Promise<{
|
1
|
+
import type { DB } from "../../utils";
|
2
|
+
import type { JsonStatement } from "../../jsonStatements";
|
3
|
+
export declare const pgSuggestions: (db: DB, statements: JsonStatement[]) => Promise<{
|
7
4
|
statementsToExecute: string[];
|
8
5
|
shouldAskForApprove: boolean;
|
9
6
|
infoToPrint: string[];
|
@@ -1,50 +1,47 @@
|
|
1
|
-
import type {
|
2
|
-
import type {
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
client?: undefined;
|
7
|
-
}>;
|
8
|
-
export declare const sqliteIntrospect: (config: SQLiteCliConfig, filters: string[]) => Promise<{
|
1
|
+
import type { SqliteCredentials } from "../validations/sqlite";
|
2
|
+
import type { SQLiteDB } from "../../utils";
|
3
|
+
import { Casing } from "../validations/common";
|
4
|
+
export declare const connectToSQLite: (credentials: SqliteCredentials) => Promise<SQLiteDB>;
|
5
|
+
export declare const sqliteIntrospect: (credentials: SqliteCredentials, filters: string[], casing: Casing) => Promise<{
|
9
6
|
schema: {
|
10
|
-
id: string;
|
11
|
-
prevId: string;
|
12
|
-
version: "5";
|
13
|
-
dialect: "sqlite";
|
14
7
|
tables: Record<string, {
|
15
8
|
name: string;
|
16
9
|
columns: Record<string, {
|
17
|
-
default?: any;
|
18
|
-
autoincrement?: boolean | undefined;
|
19
10
|
name: string;
|
20
11
|
type: string;
|
21
12
|
primaryKey: boolean;
|
22
13
|
notNull: boolean;
|
14
|
+
default?: any;
|
15
|
+
autoincrement?: boolean | undefined;
|
23
16
|
}>;
|
24
17
|
indexes: Record<string, {
|
25
|
-
where?: string | undefined;
|
26
18
|
name: string;
|
27
19
|
columns: string[];
|
28
20
|
isUnique: boolean;
|
21
|
+
where?: string | undefined;
|
29
22
|
}>;
|
30
23
|
foreignKeys: Record<string, {
|
31
|
-
onUpdate?: string | undefined;
|
32
|
-
onDelete?: string | undefined;
|
33
24
|
name: string;
|
34
25
|
tableFrom: string;
|
35
26
|
columnsFrom: string[];
|
36
27
|
tableTo: string;
|
37
28
|
columnsTo: string[];
|
29
|
+
onUpdate?: string | undefined;
|
30
|
+
onDelete?: string | undefined;
|
38
31
|
}>;
|
39
32
|
compositePrimaryKeys: Record<string, {
|
40
|
-
name?: string | undefined;
|
41
33
|
columns: string[];
|
34
|
+
name?: string | undefined;
|
42
35
|
}>;
|
43
36
|
uniqueConstraints: Record<string, {
|
44
37
|
name: string;
|
45
38
|
columns: string[];
|
46
39
|
}>;
|
47
40
|
}>;
|
41
|
+
id: string;
|
42
|
+
prevId: string;
|
43
|
+
version: "5";
|
44
|
+
dialect: "sqlite";
|
48
45
|
_meta: {
|
49
46
|
columns: Record<string, string>;
|
50
47
|
tables: Record<string, string>;
|
@@ -58,46 +55,46 @@ export declare const sqliteIntrospect: (config: SQLiteCliConfig, filters: string
|
|
58
55
|
schemaEntry: string;
|
59
56
|
};
|
60
57
|
}>;
|
61
|
-
export declare const sqlitePushIntrospect: (
|
58
|
+
export declare const sqlitePushIntrospect: (db: SQLiteDB, filters: string[]) => Promise<{
|
62
59
|
schema: {
|
63
|
-
id: string;
|
64
|
-
prevId: string;
|
65
|
-
version: "5";
|
66
|
-
dialect: "sqlite";
|
67
60
|
tables: Record<string, {
|
68
61
|
name: string;
|
69
62
|
columns: Record<string, {
|
70
|
-
default?: any;
|
71
|
-
autoincrement?: boolean | undefined;
|
72
63
|
name: string;
|
73
64
|
type: string;
|
74
65
|
primaryKey: boolean;
|
75
66
|
notNull: boolean;
|
67
|
+
default?: any;
|
68
|
+
autoincrement?: boolean | undefined;
|
76
69
|
}>;
|
77
70
|
indexes: Record<string, {
|
78
|
-
where?: string | undefined;
|
79
71
|
name: string;
|
80
72
|
columns: string[];
|
81
73
|
isUnique: boolean;
|
74
|
+
where?: string | undefined;
|
82
75
|
}>;
|
83
76
|
foreignKeys: Record<string, {
|
84
|
-
onUpdate?: string | undefined;
|
85
|
-
onDelete?: string | undefined;
|
86
77
|
name: string;
|
87
78
|
tableFrom: string;
|
88
79
|
columnsFrom: string[];
|
89
80
|
tableTo: string;
|
90
81
|
columnsTo: string[];
|
82
|
+
onUpdate?: string | undefined;
|
83
|
+
onDelete?: string | undefined;
|
91
84
|
}>;
|
92
85
|
compositePrimaryKeys: Record<string, {
|
93
|
-
name?: string | undefined;
|
94
86
|
columns: string[];
|
87
|
+
name?: string | undefined;
|
95
88
|
}>;
|
96
89
|
uniqueConstraints: Record<string, {
|
97
90
|
name: string;
|
98
91
|
columns: string[];
|
99
92
|
}>;
|
100
93
|
}>;
|
94
|
+
id: string;
|
95
|
+
prevId: string;
|
96
|
+
version: "5";
|
97
|
+
dialect: "sqlite";
|
101
98
|
_meta: {
|
102
99
|
columns: Record<string, string>;
|
103
100
|
tables: Record<string, string>;
|
@@ -1,16 +1,10 @@
|
|
1
|
-
import {
|
2
|
-
import { JsonStatement } from "
|
3
|
-
import {
|
1
|
+
import { SQLiteSchemaInternal, SQLiteSchemaSquashed } from "../../serializer/sqliteSchema";
|
2
|
+
import type { JsonStatement } from "../../jsonStatements";
|
3
|
+
import type { DB } from "../../utils";
|
4
4
|
export declare const _moveDataStatements: (tableName: string, json: SQLiteSchemaSquashed, dataLoss?: boolean) => string[];
|
5
5
|
export declare const getOldTableName: (tableName: string, meta: SQLiteSchemaInternal["_meta"]) => string;
|
6
6
|
export declare const getNewTableName: (tableName: string, meta: SQLiteSchemaInternal["_meta"]) => string;
|
7
|
-
export declare const logSuggestionsAndReturn: (
|
8
|
-
statements: JsonStatement[];
|
9
|
-
connection: DrizzleDbClient;
|
10
|
-
json1: SQLiteSchemaSquashed;
|
11
|
-
json2: SQLiteSchemaSquashed;
|
12
|
-
meta: SQLiteSchemaInternal["_meta"];
|
13
|
-
}) => Promise<{
|
7
|
+
export declare const logSuggestionsAndReturn: (connection: DB, statements: JsonStatement[], json1: SQLiteSchemaSquashed, json2: SQLiteSchemaSquashed, meta: SQLiteSchemaInternal["_meta"]) => Promise<{
|
14
8
|
statementsToExecute: string[];
|
15
9
|
shouldAskForApprove: boolean;
|
16
10
|
infoToPrint: string[];
|
package/cli/commands/utils.d.ts
CHANGED
@@ -1,274 +1,58 @@
|
|
1
|
-
import {
|
1
|
+
import { MysqlCredentials } from "../validations/mysql";
|
2
|
+
import { PostgresCredentials } from "../validations/pg";
|
3
|
+
import { SqliteCredentials } from "../validations/sqlite";
|
4
|
+
import { Casing, CliConfig } from "../validations/common";
|
5
|
+
import type { Dialect } from "../../schemaValidator";
|
6
|
+
import { CliCheckConfig, CliConfigGenerate } from "../validations/cli";
|
2
7
|
export declare const safeRegister: () => Promise<{
|
3
8
|
unregister: () => void;
|
4
9
|
}>;
|
5
10
|
export type GenerateConfig = {
|
11
|
+
dialect: Dialect;
|
6
12
|
schema: string | string[];
|
7
13
|
out: string;
|
8
14
|
breakpoints: boolean;
|
15
|
+
name?: string;
|
9
16
|
custom: boolean;
|
10
17
|
bundle: boolean;
|
11
18
|
};
|
12
|
-
export declare const prepareGenerateConfig: (options:
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
custom: boolean;
|
18
|
-
}) => Promise<GenerateConfig>;
|
19
|
-
export declare const assertOutFolder: (it: {
|
20
|
-
config?: string;
|
19
|
+
export declare const prepareGenerateConfig: (options: CliConfigGenerate) => Promise<GenerateConfig>;
|
20
|
+
export declare const flattenDatabaseCredentials: (config: any) => any;
|
21
|
+
export declare const preparePushConfig: (options: Record<string, unknown>) => Promise<({
|
22
|
+
dialect: "mysql";
|
23
|
+
credentials: MysqlCredentials;
|
21
24
|
} | {
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
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[];
|
25
|
+
dialect: "pg";
|
26
|
+
credentials: PostgresCredentials;
|
27
|
+
} | {
|
28
|
+
dialect: "sqlite";
|
29
|
+
credentials: SqliteCredentials;
|
30
|
+
}) & {
|
31
|
+
schemaPath: string | string[];
|
32
|
+
verbose: boolean;
|
33
|
+
strict: boolean;
|
34
|
+
tablesFilter: string[];
|
35
|
+
schemasFilter: string[];
|
46
36
|
}>;
|
47
|
-
export declare const
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
}
|
54
|
-
|
55
|
-
|
56
|
-
|
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;
|
37
|
+
export declare const preparePullConfig: (options: Record<string, unknown>) => Promise<({
|
38
|
+
dialect: "mysql";
|
39
|
+
credentials: MysqlCredentials;
|
40
|
+
} | {
|
41
|
+
dialect: "pg";
|
42
|
+
credentials: PostgresCredentials;
|
43
|
+
} | {
|
44
|
+
dialect: "sqlite";
|
45
|
+
credentials: SqliteCredentials;
|
46
|
+
}) & {
|
70
47
|
out: string;
|
71
48
|
breakpoints: boolean;
|
72
|
-
|
73
|
-
|
74
|
-
|
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;
|
49
|
+
casing: Casing;
|
50
|
+
tablesFilter: string[];
|
51
|
+
schemasFilter: string[];
|
85
52
|
}>;
|
86
|
-
export
|
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;
|
53
|
+
export declare const assertOutFolder: (it: CliCheckConfig) => Promise<{
|
98
54
|
out: string;
|
99
|
-
|
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;
|
55
|
+
dialect: Dialect;
|
109
56
|
}>;
|
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
57
|
export declare const drizzleConfigFromFile: (configPath?: string) => Promise<CliConfig>;
|
274
58
|
export declare const readDrizzleConfig: (configPath?: string) => Promise<any>;
|
package/cli/utils.d.ts
ADDED
@@ -0,0 +1,12 @@
|
|
1
|
+
export declare const assertExists: (it?: any) => void;
|
2
|
+
export declare const assertStudioNodeVersion: () => void;
|
3
|
+
export declare const assertPackages: (...pkgs: string[]) => Promise<void>;
|
4
|
+
export declare const assertEitherPackage: (...pkgs: string[]) => Promise<string[]>;
|
5
|
+
export declare const assertOrmCoreVersion: () => Promise<void>;
|
6
|
+
export declare const ormCoreVersions: () => Promise<{
|
7
|
+
compatibilityVersion: number;
|
8
|
+
npmVersion: string;
|
9
|
+
} | {
|
10
|
+
compatibilityVersion?: undefined;
|
11
|
+
npmVersion?: undefined;
|
12
|
+
}>;
|