drizzle-kit 0.20.17-8b4d89e → 0.20.17-92ad3af

Sign up to get free protection for your applications and to get access to all the features.
@@ -122,7 +122,7 @@ export declare const prepareMySQLPush: (schemaPath: string | string[], snapshot:
122
122
  }>;
123
123
  id: string;
124
124
  prevId: string;
125
- version: "6";
125
+ version: "5";
126
126
  dialect: "mysql";
127
127
  _meta: {
128
128
  columns: Record<string, string>;
@@ -176,7 +176,7 @@ export declare const prepareMySQLPush: (schemaPath: string | string[], snapshot:
176
176
  }>;
177
177
  id: string;
178
178
  prevId: string;
179
- version: "6";
179
+ version: "5";
180
180
  dialect: "mysql";
181
181
  _meta: {
182
182
  columns: Record<string, string>;
@@ -1,9 +1,4 @@
1
- import type { MysqlCredentials } from "../validations/mysql";
2
1
  import type { DB } from "../../utils";
3
- export declare const connectToMySQL: (credentials: MysqlCredentials) => Promise<{
4
- db: DB;
5
- database: string;
6
- }>;
7
2
  export declare const mysqlPushIntrospect: (db: DB, databaseName: string, filters: string[]) => Promise<{
8
3
  schema: {
9
4
  tables: Record<string, {
@@ -45,7 +40,7 @@ export declare const mysqlPushIntrospect: (db: DB, databaseName: string, filters
45
40
  }>;
46
41
  id: string;
47
42
  prevId: string;
48
- version: "6";
43
+ version: "5";
49
44
  dialect: "mysql";
50
45
  _meta: {
51
46
  columns: Record<string, string>;
@@ -1,7 +1,6 @@
1
1
  import type { SqliteCredentials } from "../validations/sqlite";
2
2
  import type { SQLiteDB } from "../../utils";
3
3
  import { Casing } from "../validations/common";
4
- export declare const connectToSQLite: (credentials: SqliteCredentials) => Promise<SQLiteDB>;
5
4
  export declare const sqliteIntrospect: (credentials: SqliteCredentials, filters: string[], casing: Casing) => Promise<{
6
5
  schema: {
7
6
  tables: Record<string, {
@@ -1,10 +1,10 @@
1
1
  import { SQLiteSchemaInternal, SQLiteSchemaSquashed } from "../../serializer/sqliteSchema";
2
2
  import type { JsonStatement } from "../../jsonStatements";
3
- import type { DB } from "../../utils";
3
+ import type { SQLiteDB } 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: (connection: DB, statements: JsonStatement[], json1: SQLiteSchemaSquashed, json2: SQLiteSchemaSquashed, meta: SQLiteSchemaInternal["_meta"]) => Promise<{
7
+ export declare const logSuggestionsAndReturn: (connection: SQLiteDB, statements: JsonStatement[], json1: SQLiteSchemaSquashed, json2: SQLiteSchemaSquashed, meta: SQLiteSchemaInternal["_meta"]) => Promise<{
8
8
  statementsToExecute: string[];
9
9
  shouldAskForApprove: boolean;
10
10
  infoToPrint: string[];
@@ -0,0 +1,13 @@
1
+ import type { DB, Proxy, SQLiteDB, SqliteProxy } from "../utils";
2
+ import type { PostgresCredentials } from "./validations/pg";
3
+ import type { MysqlCredentials } from "./validations/mysql";
4
+ import { SqliteCredentials } from "./validations/sqlite";
5
+ export declare const preparePostgresDB: (credentials: PostgresCredentials) => Promise<DB & {
6
+ proxy: Proxy;
7
+ }>;
8
+ export declare const connectToMySQL: (it: MysqlCredentials) => Promise<{
9
+ db: DB;
10
+ proxy: Proxy;
11
+ database: string;
12
+ }>;
13
+ export declare const connectToSQLite: (credentials: SqliteCredentials) => Promise<SQLiteDB & SqliteProxy>;
package/cli/utils.d.ts CHANGED
@@ -1,5 +1,6 @@
1
1
  export declare const assertExists: (it?: any) => void;
2
2
  export declare const assertStudioNodeVersion: () => void;
3
+ export declare const checkPackage: (it: string) => Promise<boolean>;
3
4
  export declare const assertPackages: (...pkgs: string[]) => Promise<void>;
4
5
  export declare const assertEitherPackage: (...pkgs: string[]) => Promise<string[]>;
5
6
  export declare const assertOrmCoreVersion: () => Promise<void>;
@@ -50,35 +50,35 @@ export declare const pushParams: import("zod").ZodObject<{
50
50
  strict?: boolean | undefined;
51
51
  schema?: string | string[] | undefined;
52
52
  url?: string | undefined;
53
- tablesFilter?: string | string[] | undefined;
54
- verbose?: boolean | undefined;
55
53
  host?: string | undefined;
56
54
  port?: string | undefined;
57
55
  user?: string | undefined;
58
56
  password?: string | undefined;
59
57
  database?: string | undefined;
60
- connectionString?: string | undefined;
61
58
  uri?: string | undefined;
59
+ connectionString?: string | undefined;
62
60
  ssl?: string | undefined;
63
61
  authToken?: string | undefined;
62
+ tablesFilter?: string | string[] | undefined;
63
+ verbose?: boolean | undefined;
64
64
  }, {
65
65
  dialect: "mysql" | "pg" | "sqlite";
66
66
  driver: string;
67
67
  strict?: boolean | undefined;
68
68
  schema?: string | string[] | undefined;
69
69
  url?: string | undefined;
70
- tablesFilter?: string | string[] | undefined;
71
- verbose?: boolean | undefined;
72
70
  host?: string | undefined;
73
71
  port?: string | undefined;
74
72
  user?: string | undefined;
75
73
  password?: string | undefined;
76
74
  database?: string | undefined;
77
- connectionString?: string | undefined;
78
- schemaFilters?: string | string[] | undefined;
79
75
  uri?: string | undefined;
76
+ connectionString?: string | undefined;
80
77
  ssl?: string | undefined;
81
78
  authToken?: string | undefined;
79
+ tablesFilter?: string | string[] | undefined;
80
+ verbose?: boolean | undefined;
81
+ schemaFilters?: string | string[] | undefined;
82
82
  }>;
83
83
  export type PushParams = TypeOf<typeof pushParams>;
84
84
  export declare const pullParams: import("zod").ZodObject<{
@@ -98,46 +98,46 @@ export declare const pullParams: import("zod").ZodObject<{
98
98
  ssl: import("zod").ZodOptional<import("zod").ZodString>;
99
99
  url: import("zod").ZodOptional<import("zod").ZodString>;
100
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">]>>;
101
+ introspectCasing: import("zod").ZodDefault<import("zod").ZodUnion<[import("zod").ZodLiteral<"camel">, import("zod").ZodLiteral<"preserve">]>>;
102
102
  breakpoints: import("zod").ZodDefault<import("zod").ZodOptional<import("zod").ZodBoolean>>;
103
103
  }, "strip", import("zod").ZodTypeAny, {
104
104
  out: string;
105
105
  breakpoints: boolean;
106
106
  schemaFilter: string | string[];
107
- "introspect-casing": "camel" | "preserve";
107
+ introspectCasing: "camel" | "preserve";
108
108
  dialect?: "mysql" | "pg" | "sqlite" | undefined;
109
109
  url?: string | undefined;
110
- config?: string | undefined;
111
- driver?: string | undefined;
112
- tablesFilter?: string | string[] | undefined;
113
110
  host?: string | undefined;
114
111
  port?: string | undefined;
115
112
  user?: string | undefined;
116
113
  password?: string | undefined;
117
114
  database?: string | undefined;
118
- connectionString?: string | undefined;
119
115
  uri?: string | undefined;
116
+ driver?: string | undefined;
117
+ connectionString?: string | undefined;
120
118
  ssl?: string | undefined;
121
119
  authToken?: string | undefined;
120
+ config?: string | undefined;
121
+ tablesFilter?: string | string[] | undefined;
122
122
  }, {
123
123
  dialect?: "mysql" | "pg" | "sqlite" | undefined;
124
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
125
  host?: string | undefined;
132
126
  port?: string | undefined;
133
127
  user?: string | undefined;
134
128
  password?: string | undefined;
135
129
  database?: string | undefined;
136
- connectionString?: string | undefined;
137
130
  uri?: string | undefined;
131
+ driver?: string | undefined;
132
+ connectionString?: string | undefined;
138
133
  ssl?: string | undefined;
139
134
  authToken?: string | undefined;
140
- "introspect-casing"?: "camel" | "preserve" | undefined;
135
+ config?: string | undefined;
136
+ out?: string | undefined;
137
+ breakpoints?: boolean | undefined;
138
+ tablesFilter?: string | string[] | undefined;
139
+ schemaFilter?: string | string[] | undefined;
140
+ introspectCasing?: "camel" | "preserve" | undefined;
141
141
  }>;
142
142
  export type PullParams = TypeOf<typeof pullParams>;
143
143
  export declare const configCheck: import("zod").ZodObject<{
@@ -24,15 +24,15 @@ export declare const configCommonSchema: import("zod").ZodObject<{
24
24
  dialect: "mysql" | "pg" | "sqlite";
25
25
  breakpoints: boolean;
26
26
  schemaFilter: string | string[];
27
- out?: string | undefined;
28
27
  driver?: "pg" | "turso" | "better-sqlite" | "libsql" | "d1" | "mysql2" | "expo" | undefined;
28
+ out?: string | undefined;
29
29
  tablesFilter?: string | string[] | undefined;
30
30
  }, {
31
31
  schema: string | string[];
32
32
  dialect: "mysql" | "pg" | "sqlite";
33
+ driver?: "pg" | "turso" | "better-sqlite" | "libsql" | "d1" | "mysql2" | "expo" | undefined;
33
34
  out?: string | undefined;
34
35
  breakpoints?: boolean | undefined;
35
- driver?: "pg" | "turso" | "better-sqlite" | "libsql" | "d1" | "mysql2" | "expo" | undefined;
36
36
  tablesFilter?: string | string[] | undefined;
37
37
  schemaFilter?: string | string[] | undefined;
38
38
  }>;
@@ -170,15 +170,15 @@ export declare const mySqlCliConfigSchema: import("zod").ZodIntersection<import(
170
170
  dialect: "mysql" | "pg" | "sqlite";
171
171
  breakpoints: boolean;
172
172
  schemaFilter: string | string[];
173
- out?: string | undefined;
174
173
  driver?: "pg" | "turso" | "better-sqlite" | "libsql" | "d1" | "mysql2" | "expo" | undefined;
174
+ out?: string | undefined;
175
175
  tablesFilter?: string | string[] | undefined;
176
176
  }, {
177
177
  schema: string | string[];
178
178
  dialect: "mysql" | "pg" | "sqlite";
179
+ driver?: "pg" | "turso" | "better-sqlite" | "libsql" | "d1" | "mysql2" | "expo" | undefined;
179
180
  out?: string | undefined;
180
181
  breakpoints?: boolean | undefined;
181
- driver?: "pg" | "turso" | "better-sqlite" | "libsql" | "d1" | "mysql2" | "expo" | undefined;
182
182
  tablesFilter?: string | string[] | undefined;
183
183
  schemaFilter?: string | string[] | undefined;
184
184
  }>, import("zod").ZodUnion<[import("zod").ZodObject<{
@@ -18,17 +18,11 @@ export declare const mysqlCredentials: import("zod").ZodUnion<[import("zod").Zod
18
18
  user?: string | undefined;
19
19
  password?: string | undefined;
20
20
  }>, import("zod").ZodObject<{
21
- uri: import("zod").ZodString;
21
+ url: import("zod").ZodString;
22
22
  }, "strip", import("zod").ZodTypeAny, {
23
- uri: string;
23
+ url: string;
24
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;
25
+ url: string;
32
26
  }>]>;
33
27
  export type MysqlCredentials = TypeOf<typeof mysqlCredentials>;
34
28
  export declare const printCliConnectionIssues: (options: any) => void;
@@ -21,6 +21,7 @@ export declare const outputs: {
21
21
  connection: {
22
22
  driver: () => string;
23
23
  required: () => string;
24
+ awsDataApi: () => void;
24
25
  };
25
26
  };
26
27
  mysql: {
@@ -1,6 +1,5 @@
1
1
  import { TypeOf } from "zod";
2
2
  export declare const postgresCredentials: import("zod").ZodUnion<[import("zod").ZodObject<{
3
- driver: import("zod").ZodLiteral<"pg">;
4
3
  host: import("zod").ZodString;
5
4
  port: import("zod").ZodOptional<import("zod").ZodNumber>;
6
5
  user: import("zod").ZodDefault<import("zod").ZodString>;
@@ -8,7 +7,6 @@ export declare const postgresCredentials: import("zod").ZodUnion<[import("zod").
8
7
  database: import("zod").ZodString;
9
8
  ssl: import("zod").ZodOptional<import("zod").ZodBoolean>;
10
9
  }, "strip", import("zod").ZodTypeAny, {
11
- driver: "pg";
12
10
  host: string;
13
11
  user: string;
14
12
  database: string;
@@ -16,7 +14,6 @@ export declare const postgresCredentials: import("zod").ZodUnion<[import("zod").
16
14
  password?: string | undefined;
17
15
  ssl?: boolean | undefined;
18
16
  }, {
19
- driver: "pg";
20
17
  host: string;
21
18
  database: string;
22
19
  port?: number | undefined;
@@ -24,14 +21,26 @@ export declare const postgresCredentials: import("zod").ZodUnion<[import("zod").
24
21
  password?: string | undefined;
25
22
  ssl?: boolean | undefined;
26
23
  }>, import("zod").ZodObject<{
27
- driver: import("zod").ZodLiteral<"pg">;
28
- connectionString: import("zod").ZodString;
24
+ url: import("zod").ZodString;
29
25
  }, "strip", import("zod").ZodTypeAny, {
30
- driver: "pg";
31
- connectionString: string;
26
+ url: string;
32
27
  }, {
33
- driver: "pg";
34
- connectionString: string;
28
+ url: string;
29
+ }>, import("zod").ZodObject<{
30
+ driver: import("zod").ZodLiteral<"aws-data-api">;
31
+ database: import("zod").ZodString;
32
+ secretArn: import("zod").ZodString;
33
+ resourceArn: import("zod").ZodString;
34
+ }, "strip", import("zod").ZodTypeAny, {
35
+ database: string;
36
+ driver: "aws-data-api";
37
+ secretArn: string;
38
+ resourceArn: string;
39
+ }, {
40
+ database: string;
41
+ driver: "aws-data-api";
42
+ secretArn: string;
43
+ resourceArn: string;
35
44
  }>]>;
36
45
  export type PostgresCredentials = TypeOf<typeof postgresCredentials>;
37
46
  export declare const printConfigConnectionIssues: (options: Record<string, unknown>) => void;
@@ -12,23 +12,11 @@ export declare const sqliteCredentials: import("zod").ZodUnion<[import("zod").Zo
12
12
  driver: "turso";
13
13
  authToken: string;
14
14
  }>, import("zod").ZodObject<{
15
- driver: import("zod").ZodLiteral<"better-sqlite">;
16
15
  url: import("zod").ZodString;
17
16
  }, "strip", import("zod").ZodTypeAny, {
18
17
  url: string;
19
- driver: "better-sqlite";
20
18
  }, {
21
19
  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
20
  }>]>;
33
21
  export type SqliteCredentials = TypeOf<typeof sqliteCredentials>;
34
22
  export declare const printConfigConnectionIssues: (options: Record<string, unknown>) => void;
package/index.d.mts CHANGED
@@ -59,23 +59,19 @@ export type Config = {
59
59
  casing: "camel" | "preserve";
60
60
  };
61
61
  } & ({
62
+ dialect: "sqlite";
62
63
  driver: "turso";
63
64
  dbCredentials: {
64
65
  url: string;
65
66
  authToken?: string;
66
67
  };
67
68
  } | {
68
- driver: "better-sqlite";
69
+ dialect: "sqlite";
69
70
  dbCredentials: {
70
71
  url: string;
71
72
  };
72
73
  } | {
73
- driver: "libsql";
74
- dbCredentials: {
75
- url: string;
76
- };
77
- } | {
78
- driver: "pg";
74
+ dialect: "pg";
79
75
  dbCredentials: {
80
76
  host: string;
81
77
  port?: number;
@@ -84,10 +80,18 @@ export type Config = {
84
80
  database: string;
85
81
  ssl?: boolean;
86
82
  } | {
87
- connectionString: string;
83
+ url: string;
88
84
  };
89
85
  } | {
90
- driver: "mysql2";
86
+ dialect: "pg";
87
+ driver: "aws-data-api";
88
+ dbCredentials: {
89
+ database: string;
90
+ secretArn: string;
91
+ resourceArn: string;
92
+ };
93
+ } | {
94
+ dialect: "mysql";
91
95
  dbCredentials: {
92
96
  host: string;
93
97
  port?: number;
@@ -95,15 +99,17 @@ export type Config = {
95
99
  password?: string;
96
100
  database: string;
97
101
  } | {
98
- uri: string;
102
+ url: string;
99
103
  };
100
104
  } | {
101
- driver: "d1";
105
+ dialect: "sqlite";
106
+ driver: "d1-http";
102
107
  dbCredentials: {
103
108
  wranglerConfigPath: string;
104
109
  dbName: string;
105
110
  };
106
111
  } | {
112
+ dialect: "sqlite";
107
113
  driver: "expo";
108
114
  } | {});
109
115
  export declare function defineConfig(config: Config): Config;
package/index.d.ts CHANGED
@@ -59,23 +59,19 @@ export type Config = {
59
59
  casing: "camel" | "preserve";
60
60
  };
61
61
  } & ({
62
+ dialect: "sqlite";
62
63
  driver: "turso";
63
64
  dbCredentials: {
64
65
  url: string;
65
66
  authToken?: string;
66
67
  };
67
68
  } | {
68
- driver: "better-sqlite";
69
+ dialect: "sqlite";
69
70
  dbCredentials: {
70
71
  url: string;
71
72
  };
72
73
  } | {
73
- driver: "libsql";
74
- dbCredentials: {
75
- url: string;
76
- };
77
- } | {
78
- driver: "pg";
74
+ dialect: "pg";
79
75
  dbCredentials: {
80
76
  host: string;
81
77
  port?: number;
@@ -84,10 +80,18 @@ export type Config = {
84
80
  database: string;
85
81
  ssl?: boolean;
86
82
  } | {
87
- connectionString: string;
83
+ url: string;
88
84
  };
89
85
  } | {
90
- driver: "mysql2";
86
+ dialect: "pg";
87
+ driver: "aws-data-api";
88
+ dbCredentials: {
89
+ database: string;
90
+ secretArn: string;
91
+ resourceArn: string;
92
+ };
93
+ } | {
94
+ dialect: "mysql";
91
95
  dbCredentials: {
92
96
  host: string;
93
97
  port?: number;
@@ -95,15 +99,17 @@ export type Config = {
95
99
  password?: string;
96
100
  database: string;
97
101
  } | {
98
- uri: string;
102
+ url: string;
99
103
  };
100
104
  } | {
101
- driver: "d1";
105
+ dialect: "sqlite";
106
+ driver: "d1-http";
102
107
  dbCredentials: {
103
108
  wranglerConfigPath: string;
104
109
  dbName: string;
105
110
  };
106
111
  } | {
112
+ dialect: "sqlite";
107
113
  driver: "expo";
108
114
  } | {});
109
115
  export declare function defineConfig(config: Config): Config;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "drizzle-kit",
3
- "version": "0.20.17-8b4d89e",
3
+ "version": "0.20.17-92ad3af",
4
4
  "repository": "https://github.com/drizzle-team/drizzle-kit-mirror",
5
5
  "author": "Drizzle Team",
6
6
  "license": "MIT",
@@ -21,9 +21,9 @@
21
21
  },
22
22
  "dependencies": {
23
23
  "@esbuild-kit/esm-loader": "^2.5.5",
24
- "@types/json-diff": "^1.0.3",
25
24
  "@hono/node-server": "^1.9.0",
26
25
  "@hono/zod-validator": "^0.2.0",
26
+ "@types/json-diff": "^1.0.3",
27
27
  "camelcase": "^7.0.1",
28
28
  "chalk": "^5.2.0",
29
29
  "commander": "^9.4.1",
@@ -38,13 +38,17 @@
38
38
  "pluralize": "^8.0.0",
39
39
  "semver": "^7.5.4",
40
40
  "superjson": "^2.2.1",
41
+ "ws": "^8.16.0",
41
42
  "zod": "^3.20.2"
42
43
  },
43
44
  "devDependencies": {
45
+ "@aws-sdk/client-rds-data": "^3.556.0",
44
46
  "@cloudflare/workers-types": "^4.20230518.0",
45
47
  "@electric-sql/pglite": "^0.1.3",
46
48
  "@libsql/client": "^0.4.2",
49
+ "@neondatabase/serverless": "^0.9.1",
47
50
  "@originjs/vite-plugin-commonjs": "^1.0.3",
51
+ "@planetscale/database": "^1.16.0",
48
52
  "@types/better-sqlite3": "^7.6.4",
49
53
  "@types/dockerode": "^3.3.28",
50
54
  "@types/glob": "^8.1.0",
@@ -54,14 +58,16 @@
54
58
  "@types/pluralize": "^0.0.33",
55
59
  "@types/semver": "^7.5.5",
56
60
  "@types/uuid": "^9.0.8",
61
+ "@types/ws": "^8.5.10",
57
62
  "@typescript-eslint/eslint-plugin": "^7.2.0",
58
63
  "@typescript-eslint/parser": "^7.2.0",
59
- "dockerode": "^3.3.4",
60
- "dotenv": "^16.0.3",
61
- "drizzle-orm": "0.30.5-ab9feb7",
64
+ "@vercel/postgres": "^0.8.0",
62
65
  "ava": "^5.1.0",
63
66
  "better-sqlite3": "^9.4.3",
67
+ "dockerode": "^3.3.4",
68
+ "dotenv": "^16.0.3",
64
69
  "drizzle-kit": "0.20.14",
70
+ "drizzle-orm": "0.30.5-ab9feb7",
65
71
  "esbuild-node-externals": "^1.9.0",
66
72
  "eslint": "^8.57.0",
67
73
  "eslint-config-prettier": "^9.1.0",
@@ -69,7 +75,7 @@
69
75
  "get-port": "^6.1.2",
70
76
  "mysql2": "2.3.3",
71
77
  "pg": "^8.11.3",
72
- "postgres": "^3.3.5",
78
+ "postgres": "^3.4.4",
73
79
  "prettier": "^2.8.1",
74
80
  "tsx": "^3.12.1",
75
81
  "typescript": "^5.4.3",