drizzle-kit 0.20.17-9f0ea64 → 0.20.17-a1c0ab3
Sign up to get free protection for your applications and to get access to all the features.
- 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/index.d.mts
CHANGED
@@ -1,51 +1,15 @@
|
|
1
|
-
import {
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
} | {
|
14
|
-
driver: "libsql";
|
15
|
-
dbCredentials: {
|
16
|
-
url: string;
|
17
|
-
};
|
18
|
-
} | {
|
19
|
-
driver: "d1";
|
20
|
-
dbCredentials: {
|
21
|
-
wranglerConfigPath: string;
|
22
|
-
dbName: string;
|
23
|
-
};
|
24
|
-
} | {
|
25
|
-
driver: "pg";
|
26
|
-
dbCredentials: {
|
27
|
-
host: string;
|
28
|
-
port?: number;
|
29
|
-
user?: string;
|
30
|
-
password?: string;
|
31
|
-
database: string;
|
32
|
-
ssl?: boolean;
|
33
|
-
} | {
|
34
|
-
connectionString: string;
|
35
|
-
};
|
36
|
-
} | {
|
37
|
-
driver: "mysql2";
|
38
|
-
dbCredentials: {
|
39
|
-
host: string;
|
40
|
-
port?: number;
|
41
|
-
user?: string;
|
42
|
-
password?: string;
|
43
|
-
database: string;
|
44
|
-
} | {
|
45
|
-
uri: string;
|
46
|
-
};
|
47
|
-
};
|
48
|
-
export type Config = {
|
1
|
+
import { SslOptions } from 'mysql2';
|
2
|
+
import * as zod from 'zod';
|
3
|
+
import { TypeOf } from 'zod';
|
4
|
+
|
5
|
+
declare const driver: zod.ZodUnion<[zod.ZodUnion<[zod.ZodLiteral<"better-sqlite">, zod.ZodLiteral<"turso">, zod.ZodLiteral<"libsql">, zod.ZodLiteral<"d1">, zod.ZodLiteral<"expo">]>, zod.ZodLiteral<"aws-data-api">, zod.ZodLiteral<"mysql2">]>;
|
6
|
+
type Driver = TypeOf<typeof driver>;
|
7
|
+
|
8
|
+
declare const dialect: zod.ZodEnum<["postgresql", "mysql", "sqlite"]>;
|
9
|
+
type Dialect = TypeOf<typeof dialect>;
|
10
|
+
|
11
|
+
type Verify<T, U extends T> = U;
|
12
|
+
type Config = {
|
49
13
|
dialect: Dialect;
|
50
14
|
out?: string;
|
51
15
|
breakpoints?: boolean;
|
@@ -54,13 +18,16 @@ export type Config = {
|
|
54
18
|
schema?: string | string[];
|
55
19
|
verbose?: boolean;
|
56
20
|
strict?: boolean;
|
57
|
-
|
21
|
+
migrations?: {
|
22
|
+
table?: string;
|
23
|
+
schema?: string;
|
24
|
+
};
|
58
25
|
introspect?: {
|
59
26
|
casing: "camel" | "preserve";
|
60
27
|
};
|
61
28
|
} & ({
|
62
|
-
dialect: "sqlite"
|
63
|
-
driver: "turso"
|
29
|
+
dialect: Verify<Dialect, "sqlite">;
|
30
|
+
driver: Verify<Driver, "turso">;
|
64
31
|
dbCredentials: {
|
65
32
|
url: string;
|
66
33
|
authToken?: string;
|
@@ -71,7 +38,7 @@ export type Config = {
|
|
71
38
|
url: string;
|
72
39
|
};
|
73
40
|
} | {
|
74
|
-
dialect: "
|
41
|
+
dialect: Verify<Dialect, "postgresql">;
|
75
42
|
dbCredentials: {
|
76
43
|
host: string;
|
77
44
|
port?: number;
|
@@ -80,36 +47,39 @@ export type Config = {
|
|
80
47
|
database: string;
|
81
48
|
ssl?: boolean;
|
82
49
|
} | {
|
83
|
-
|
50
|
+
url: string;
|
84
51
|
};
|
85
52
|
} | {
|
86
|
-
dialect: "
|
87
|
-
driver: "aws-data-api"
|
53
|
+
dialect: Verify<Dialect, "postgresql">;
|
54
|
+
driver: Verify<Driver, "aws-data-api">;
|
88
55
|
dbCredentials: {
|
89
|
-
|
90
|
-
|
91
|
-
|
56
|
+
database: string;
|
57
|
+
secretArn: string;
|
58
|
+
resourceArn: string;
|
92
59
|
};
|
93
60
|
} | {
|
94
|
-
dialect: "mysql"
|
61
|
+
dialect: Verify<Dialect, "mysql">;
|
95
62
|
dbCredentials: {
|
96
63
|
host: string;
|
97
64
|
port?: number;
|
98
65
|
user?: string;
|
99
66
|
password?: string;
|
100
67
|
database: string;
|
68
|
+
ssl?: string | SslOptions;
|
101
69
|
} | {
|
102
|
-
|
70
|
+
url: string;
|
103
71
|
};
|
104
72
|
} | {
|
105
|
-
dialect: "sqlite"
|
106
|
-
driver: "d1
|
73
|
+
dialect: Verify<Dialect, "sqlite">;
|
74
|
+
driver: Verify<Driver, "d1">;
|
107
75
|
dbCredentials: {
|
108
76
|
wranglerConfigPath: string;
|
109
77
|
dbName: string;
|
110
78
|
};
|
111
79
|
} | {
|
112
|
-
dialect: "sqlite"
|
113
|
-
driver: "expo"
|
80
|
+
dialect: Verify<Dialect, "sqlite">;
|
81
|
+
driver: Verify<Driver, "expo">;
|
114
82
|
} | {});
|
115
|
-
|
83
|
+
declare function defineConfig(config: Config): Config;
|
84
|
+
|
85
|
+
export { type Config, defineConfig };
|
package/index.d.ts
CHANGED
@@ -1,51 +1,15 @@
|
|
1
|
-
import {
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
} | {
|
14
|
-
driver: "libsql";
|
15
|
-
dbCredentials: {
|
16
|
-
url: string;
|
17
|
-
};
|
18
|
-
} | {
|
19
|
-
driver: "d1";
|
20
|
-
dbCredentials: {
|
21
|
-
wranglerConfigPath: string;
|
22
|
-
dbName: string;
|
23
|
-
};
|
24
|
-
} | {
|
25
|
-
driver: "pg";
|
26
|
-
dbCredentials: {
|
27
|
-
host: string;
|
28
|
-
port?: number;
|
29
|
-
user?: string;
|
30
|
-
password?: string;
|
31
|
-
database: string;
|
32
|
-
ssl?: boolean;
|
33
|
-
} | {
|
34
|
-
connectionString: string;
|
35
|
-
};
|
36
|
-
} | {
|
37
|
-
driver: "mysql2";
|
38
|
-
dbCredentials: {
|
39
|
-
host: string;
|
40
|
-
port?: number;
|
41
|
-
user?: string;
|
42
|
-
password?: string;
|
43
|
-
database: string;
|
44
|
-
} | {
|
45
|
-
uri: string;
|
46
|
-
};
|
47
|
-
};
|
48
|
-
export type Config = {
|
1
|
+
import { SslOptions } from 'mysql2';
|
2
|
+
import * as zod from 'zod';
|
3
|
+
import { TypeOf } from 'zod';
|
4
|
+
|
5
|
+
declare const driver: zod.ZodUnion<[zod.ZodUnion<[zod.ZodLiteral<"better-sqlite">, zod.ZodLiteral<"turso">, zod.ZodLiteral<"libsql">, zod.ZodLiteral<"d1">, zod.ZodLiteral<"expo">]>, zod.ZodLiteral<"aws-data-api">, zod.ZodLiteral<"mysql2">]>;
|
6
|
+
type Driver = TypeOf<typeof driver>;
|
7
|
+
|
8
|
+
declare const dialect: zod.ZodEnum<["postgresql", "mysql", "sqlite"]>;
|
9
|
+
type Dialect = TypeOf<typeof dialect>;
|
10
|
+
|
11
|
+
type Verify<T, U extends T> = U;
|
12
|
+
type Config = {
|
49
13
|
dialect: Dialect;
|
50
14
|
out?: string;
|
51
15
|
breakpoints?: boolean;
|
@@ -54,13 +18,16 @@ export type Config = {
|
|
54
18
|
schema?: string | string[];
|
55
19
|
verbose?: boolean;
|
56
20
|
strict?: boolean;
|
57
|
-
|
21
|
+
migrations?: {
|
22
|
+
table?: string;
|
23
|
+
schema?: string;
|
24
|
+
};
|
58
25
|
introspect?: {
|
59
26
|
casing: "camel" | "preserve";
|
60
27
|
};
|
61
28
|
} & ({
|
62
|
-
dialect: "sqlite"
|
63
|
-
driver: "turso"
|
29
|
+
dialect: Verify<Dialect, "sqlite">;
|
30
|
+
driver: Verify<Driver, "turso">;
|
64
31
|
dbCredentials: {
|
65
32
|
url: string;
|
66
33
|
authToken?: string;
|
@@ -71,7 +38,7 @@ export type Config = {
|
|
71
38
|
url: string;
|
72
39
|
};
|
73
40
|
} | {
|
74
|
-
dialect: "
|
41
|
+
dialect: Verify<Dialect, "postgresql">;
|
75
42
|
dbCredentials: {
|
76
43
|
host: string;
|
77
44
|
port?: number;
|
@@ -80,36 +47,39 @@ export type Config = {
|
|
80
47
|
database: string;
|
81
48
|
ssl?: boolean;
|
82
49
|
} | {
|
83
|
-
|
50
|
+
url: string;
|
84
51
|
};
|
85
52
|
} | {
|
86
|
-
dialect: "
|
87
|
-
driver: "aws-data-api"
|
53
|
+
dialect: Verify<Dialect, "postgresql">;
|
54
|
+
driver: Verify<Driver, "aws-data-api">;
|
88
55
|
dbCredentials: {
|
89
|
-
|
90
|
-
|
91
|
-
|
56
|
+
database: string;
|
57
|
+
secretArn: string;
|
58
|
+
resourceArn: string;
|
92
59
|
};
|
93
60
|
} | {
|
94
|
-
dialect: "mysql"
|
61
|
+
dialect: Verify<Dialect, "mysql">;
|
95
62
|
dbCredentials: {
|
96
63
|
host: string;
|
97
64
|
port?: number;
|
98
65
|
user?: string;
|
99
66
|
password?: string;
|
100
67
|
database: string;
|
68
|
+
ssl?: string | SslOptions;
|
101
69
|
} | {
|
102
|
-
|
70
|
+
url: string;
|
103
71
|
};
|
104
72
|
} | {
|
105
|
-
dialect: "sqlite"
|
106
|
-
driver: "d1
|
73
|
+
dialect: Verify<Dialect, "sqlite">;
|
74
|
+
driver: Verify<Driver, "d1">;
|
107
75
|
dbCredentials: {
|
108
76
|
wranglerConfigPath: string;
|
109
77
|
dbName: string;
|
110
78
|
};
|
111
79
|
} | {
|
112
|
-
dialect: "sqlite"
|
113
|
-
driver: "expo"
|
80
|
+
dialect: Verify<Dialect, "sqlite">;
|
81
|
+
driver: Verify<Driver, "expo">;
|
114
82
|
} | {});
|
115
|
-
|
83
|
+
declare function defineConfig(config: Config): Config;
|
84
|
+
|
85
|
+
export { type Config, defineConfig };
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "drizzle-kit",
|
3
|
-
"version": "0.20.17-
|
3
|
+
"version": "0.20.17-a1c0ab3",
|
4
4
|
"repository": "https://github.com/drizzle-team/drizzle-kit-mirror",
|
5
5
|
"author": "Drizzle Team",
|
6
6
|
"license": "MIT",
|
@@ -12,8 +12,7 @@
|
|
12
12
|
"migrate:old": "drizzle-kit generate:mysql",
|
13
13
|
"cli": "tsx ./src/cli/index.ts",
|
14
14
|
"test": "vitest",
|
15
|
-
"
|
16
|
-
"build": "rm -rf ./dist && tsc -p tsconfig.cli-types.json && pnpm mts && tsx build.ts",
|
15
|
+
"build": "rm -rf ./dist && tsx build.ts && cp package.json dist/ && attw --pack dist",
|
17
16
|
"build:dev": "rm -rf ./dist && tsx build.dev.ts && tsc -p tsconfig.cli-types.json && chmod +x ./dist/index.cjs",
|
18
17
|
"packit": "pnpm build && cp package.json dist/ && cd dist && pnpm pack",
|
19
18
|
"tsc": "tsc -p tsconfig.build.json",
|
@@ -42,11 +41,14 @@
|
|
42
41
|
"zod": "^3.20.2"
|
43
42
|
},
|
44
43
|
"devDependencies": {
|
44
|
+
"@arethetypeswrong/cli": "^0.15.3",
|
45
|
+
"@aws-sdk/client-rds-data": "^3.556.0",
|
45
46
|
"@cloudflare/workers-types": "^4.20230518.0",
|
46
47
|
"@electric-sql/pglite": "^0.1.3",
|
47
48
|
"@libsql/client": "^0.4.2",
|
48
49
|
"@neondatabase/serverless": "^0.9.1",
|
49
50
|
"@originjs/vite-plugin-commonjs": "^1.0.3",
|
51
|
+
"@planetscale/database": "^1.16.0",
|
50
52
|
"@types/better-sqlite3": "^7.6.4",
|
51
53
|
"@types/dockerode": "^3.3.28",
|
52
54
|
"@types/glob": "^8.1.0",
|
@@ -59,12 +61,13 @@
|
|
59
61
|
"@types/ws": "^8.5.10",
|
60
62
|
"@typescript-eslint/eslint-plugin": "^7.2.0",
|
61
63
|
"@typescript-eslint/parser": "^7.2.0",
|
64
|
+
"@vercel/postgres": "^0.8.0",
|
62
65
|
"ava": "^5.1.0",
|
63
66
|
"better-sqlite3": "^9.4.3",
|
64
67
|
"dockerode": "^3.3.4",
|
65
68
|
"dotenv": "^16.0.3",
|
66
69
|
"drizzle-kit": "0.20.14",
|
67
|
-
"drizzle-orm": "0.30.
|
70
|
+
"drizzle-orm": "0.30.9-f9be0ab",
|
68
71
|
"esbuild-node-externals": "^1.9.0",
|
69
72
|
"eslint": "^8.57.0",
|
70
73
|
"eslint-config-prettier": "^9.1.0",
|
@@ -74,6 +77,7 @@
|
|
74
77
|
"pg": "^8.11.3",
|
75
78
|
"postgres": "^3.4.4",
|
76
79
|
"prettier": "^2.8.1",
|
80
|
+
"tsup": "^8.0.2",
|
77
81
|
"tsx": "^3.12.1",
|
78
82
|
"typescript": "^5.4.3",
|
79
83
|
"uuid": "^9.0.1",
|
@@ -95,18 +99,6 @@
|
|
95
99
|
"types": "./index.d.mts",
|
96
100
|
"default": "./index.mjs"
|
97
101
|
},
|
98
|
-
"./utils-studio": {
|
99
|
-
"import": {
|
100
|
-
"types": "./utils-studio.d.mts",
|
101
|
-
"default": "./utils-studio.mjs"
|
102
|
-
},
|
103
|
-
"require": {
|
104
|
-
"types": "./utils-studio.d.ts",
|
105
|
-
"default": "./utils-studio.js"
|
106
|
-
},
|
107
|
-
"types": "./utils-studio.d.mts",
|
108
|
-
"default": "./utils-studio.mjs"
|
109
|
-
},
|
110
102
|
"./payload": {
|
111
103
|
"import": {
|
112
104
|
"types": "./payload.d.mts",
|