drizzle-kit 0.20.17-c347d7b → 0.20.17-c50cacb
Sign up to get free protection for your applications and to get access to all the features.
- package/bin.cjs +8046 -1215
- package/index.d.mts +25 -13
- package/index.d.ts +25 -13
- package/package.json +5 -16
- package/payload.d.mts +987 -18
- package/payload.d.ts +987 -18
- package/payload.js +19076 -16849
- package/payload.mjs +19093 -16841
- package/utils-studio.js +9 -6
- package/utils-studio.mjs +9 -6
- package/utils.js +8 -5
- package/utils.mjs +8 -5
- package/@types/utils.d.ts +0 -13
- package/cli/commands/migrate.d.ts +0 -287
- package/cli/commands/mysqlIntrospect.d.ts +0 -50
- 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 -103
- package/cli/commands/sqlitePushUtils.d.ts +0 -15
- package/cli/commands/utils.d.ts +0 -180
- package/cli/connections.d.ts +0 -18
- 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 -29
- package/cli/validations/outputs.d.ts +0 -41
- package/cli/validations/pg.d.ts +0 -46
- package/cli/validations/sqlite.d.ts +0 -22
- package/cli/validations/studio.d.ts +0 -92
- package/cli/views.d.ts +0 -70
- 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/serializer/studio.d.ts +0 -53
- package/snapshotsDiffer.d.ts +0 -3936
- 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 -78
package/index.d.mts
CHANGED
@@ -1,5 +1,15 @@
|
|
1
|
-
|
2
|
-
|
1
|
+
import * as zod from 'zod';
|
2
|
+
import { TypeOf } from 'zod';
|
3
|
+
|
4
|
+
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">]>;
|
5
|
+
type Driver = TypeOf<typeof driver>;
|
6
|
+
|
7
|
+
declare const dialect: zod.ZodEnum<["postgresql", "mysql", "sqlite"]>;
|
8
|
+
type Dialect = TypeOf<typeof dialect>;
|
9
|
+
|
10
|
+
type Verify<T, U extends T> = U;
|
11
|
+
type Config = {
|
12
|
+
dialect: Dialect;
|
3
13
|
out?: string;
|
4
14
|
breakpoints?: boolean;
|
5
15
|
tablesFilter?: string | string[];
|
@@ -15,8 +25,8 @@ export type Config = {
|
|
15
25
|
casing: "camel" | "preserve";
|
16
26
|
};
|
17
27
|
} & ({
|
18
|
-
dialect: "sqlite"
|
19
|
-
driver: "turso"
|
28
|
+
dialect: Verify<Dialect, "sqlite">;
|
29
|
+
driver: Verify<Driver, "turso">;
|
20
30
|
dbCredentials: {
|
21
31
|
url: string;
|
22
32
|
authToken?: string;
|
@@ -27,7 +37,7 @@ export type Config = {
|
|
27
37
|
url: string;
|
28
38
|
};
|
29
39
|
} | {
|
30
|
-
dialect: "postgresql"
|
40
|
+
dialect: Verify<Dialect, "postgresql">;
|
31
41
|
dbCredentials: {
|
32
42
|
host: string;
|
33
43
|
port?: number;
|
@@ -39,15 +49,15 @@ export type Config = {
|
|
39
49
|
url: string;
|
40
50
|
};
|
41
51
|
} | {
|
42
|
-
dialect: "postgresql"
|
43
|
-
driver: "aws-data-api"
|
52
|
+
dialect: Verify<Dialect, "postgresql">;
|
53
|
+
driver: Verify<Driver, "aws-data-api">;
|
44
54
|
dbCredentials: {
|
45
55
|
database: string;
|
46
56
|
secretArn: string;
|
47
57
|
resourceArn: string;
|
48
58
|
};
|
49
59
|
} | {
|
50
|
-
dialect: "mysql"
|
60
|
+
dialect: Verify<Dialect, "mysql">;
|
51
61
|
dbCredentials: {
|
52
62
|
host: string;
|
53
63
|
port?: number;
|
@@ -58,14 +68,16 @@ export type Config = {
|
|
58
68
|
url: string;
|
59
69
|
};
|
60
70
|
} | {
|
61
|
-
dialect: "sqlite"
|
62
|
-
driver: "d1
|
71
|
+
dialect: Verify<Dialect, "sqlite">;
|
72
|
+
driver: Verify<Driver, "d1">;
|
63
73
|
dbCredentials: {
|
64
74
|
wranglerConfigPath: string;
|
65
75
|
dbName: string;
|
66
76
|
};
|
67
77
|
} | {
|
68
|
-
dialect: "sqlite"
|
69
|
-
driver: "expo"
|
78
|
+
dialect: Verify<Dialect, "sqlite">;
|
79
|
+
driver: Verify<Driver, "expo">;
|
70
80
|
} | {});
|
71
|
-
|
81
|
+
declare function defineConfig(config: Config): Config;
|
82
|
+
|
83
|
+
export { type Config, defineConfig };
|
package/index.d.ts
CHANGED
@@ -1,5 +1,15 @@
|
|
1
|
-
|
2
|
-
|
1
|
+
import * as zod from 'zod';
|
2
|
+
import { TypeOf } from 'zod';
|
3
|
+
|
4
|
+
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">]>;
|
5
|
+
type Driver = TypeOf<typeof driver>;
|
6
|
+
|
7
|
+
declare const dialect: zod.ZodEnum<["postgresql", "mysql", "sqlite"]>;
|
8
|
+
type Dialect = TypeOf<typeof dialect>;
|
9
|
+
|
10
|
+
type Verify<T, U extends T> = U;
|
11
|
+
type Config = {
|
12
|
+
dialect: Dialect;
|
3
13
|
out?: string;
|
4
14
|
breakpoints?: boolean;
|
5
15
|
tablesFilter?: string | string[];
|
@@ -15,8 +25,8 @@ export type Config = {
|
|
15
25
|
casing: "camel" | "preserve";
|
16
26
|
};
|
17
27
|
} & ({
|
18
|
-
dialect: "sqlite"
|
19
|
-
driver: "turso"
|
28
|
+
dialect: Verify<Dialect, "sqlite">;
|
29
|
+
driver: Verify<Driver, "turso">;
|
20
30
|
dbCredentials: {
|
21
31
|
url: string;
|
22
32
|
authToken?: string;
|
@@ -27,7 +37,7 @@ export type Config = {
|
|
27
37
|
url: string;
|
28
38
|
};
|
29
39
|
} | {
|
30
|
-
dialect: "postgresql"
|
40
|
+
dialect: Verify<Dialect, "postgresql">;
|
31
41
|
dbCredentials: {
|
32
42
|
host: string;
|
33
43
|
port?: number;
|
@@ -39,15 +49,15 @@ export type Config = {
|
|
39
49
|
url: string;
|
40
50
|
};
|
41
51
|
} | {
|
42
|
-
dialect: "postgresql"
|
43
|
-
driver: "aws-data-api"
|
52
|
+
dialect: Verify<Dialect, "postgresql">;
|
53
|
+
driver: Verify<Driver, "aws-data-api">;
|
44
54
|
dbCredentials: {
|
45
55
|
database: string;
|
46
56
|
secretArn: string;
|
47
57
|
resourceArn: string;
|
48
58
|
};
|
49
59
|
} | {
|
50
|
-
dialect: "mysql"
|
60
|
+
dialect: Verify<Dialect, "mysql">;
|
51
61
|
dbCredentials: {
|
52
62
|
host: string;
|
53
63
|
port?: number;
|
@@ -58,14 +68,16 @@ export type Config = {
|
|
58
68
|
url: string;
|
59
69
|
};
|
60
70
|
} | {
|
61
|
-
dialect: "sqlite"
|
62
|
-
driver: "d1
|
71
|
+
dialect: Verify<Dialect, "sqlite">;
|
72
|
+
driver: Verify<Driver, "d1">;
|
63
73
|
dbCredentials: {
|
64
74
|
wranglerConfigPath: string;
|
65
75
|
dbName: string;
|
66
76
|
};
|
67
77
|
} | {
|
68
|
-
dialect: "sqlite"
|
69
|
-
driver: "expo"
|
78
|
+
dialect: Verify<Dialect, "sqlite">;
|
79
|
+
driver: Verify<Driver, "expo">;
|
70
80
|
} | {});
|
71
|
-
|
81
|
+
declare function defineConfig(config: Config): Config;
|
82
|
+
|
83
|
+
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-c50cacb",
|
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,6 +41,7 @@
|
|
42
41
|
"zod": "^3.20.2"
|
43
42
|
},
|
44
43
|
"devDependencies": {
|
44
|
+
"@arethetypeswrong/cli": "^0.15.3",
|
45
45
|
"@aws-sdk/client-rds-data": "^3.556.0",
|
46
46
|
"@cloudflare/workers-types": "^4.20230518.0",
|
47
47
|
"@electric-sql/pglite": "^0.1.3",
|
@@ -67,7 +67,7 @@
|
|
67
67
|
"dockerode": "^3.3.4",
|
68
68
|
"dotenv": "^16.0.3",
|
69
69
|
"drizzle-kit": "0.20.14",
|
70
|
-
"drizzle-orm": "0.30.9",
|
70
|
+
"drizzle-orm": "0.30.9-f9be0ab",
|
71
71
|
"esbuild-node-externals": "^1.9.0",
|
72
72
|
"eslint": "^8.57.0",
|
73
73
|
"eslint-config-prettier": "^9.1.0",
|
@@ -77,6 +77,7 @@
|
|
77
77
|
"pg": "^8.11.3",
|
78
78
|
"postgres": "^3.4.4",
|
79
79
|
"prettier": "^2.8.1",
|
80
|
+
"tsup": "^8.0.2",
|
80
81
|
"tsx": "^3.12.1",
|
81
82
|
"typescript": "^5.4.3",
|
82
83
|
"uuid": "^9.0.1",
|
@@ -98,18 +99,6 @@
|
|
98
99
|
"types": "./index.d.mts",
|
99
100
|
"default": "./index.mjs"
|
100
101
|
},
|
101
|
-
"./utils-studio": {
|
102
|
-
"import": {
|
103
|
-
"types": "./utils-studio.d.mts",
|
104
|
-
"default": "./utils-studio.mjs"
|
105
|
-
},
|
106
|
-
"require": {
|
107
|
-
"types": "./utils-studio.d.ts",
|
108
|
-
"default": "./utils-studio.js"
|
109
|
-
},
|
110
|
-
"types": "./utils-studio.d.mts",
|
111
|
-
"default": "./utils-studio.mjs"
|
112
|
-
},
|
113
102
|
"./payload": {
|
114
103
|
"import": {
|
115
104
|
"types": "./payload.d.mts",
|