drizzle-kit 0.20.17-5938f5d → 0.20.17-7446198

Sign up to get free protection for your applications and to get access to all the features.
@@ -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;
@@ -0,0 +1,92 @@
1
+ import { TypeOf } from "zod";
2
+ export declare const credentials: import("zod").ZodIntersection<import("zod").ZodUnion<[import("zod").ZodObject<{
3
+ host: import("zod").ZodString;
4
+ port: import("zod").ZodOptional<import("zod").ZodNumber>;
5
+ user: import("zod").ZodDefault<import("zod").ZodString>;
6
+ password: import("zod").ZodOptional<import("zod").ZodString>;
7
+ database: import("zod").ZodString;
8
+ ssl: import("zod").ZodOptional<import("zod").ZodBoolean>;
9
+ }, "strip", import("zod").ZodTypeAny, {
10
+ host: string;
11
+ user: string;
12
+ database: string;
13
+ port?: number | undefined;
14
+ password?: string | undefined;
15
+ ssl?: boolean | undefined;
16
+ }, {
17
+ host: string;
18
+ database: string;
19
+ port?: number | undefined;
20
+ user?: string | undefined;
21
+ password?: string | undefined;
22
+ ssl?: boolean | undefined;
23
+ }>, import("zod").ZodObject<{
24
+ url: import("zod").ZodString;
25
+ }, "strip", import("zod").ZodTypeAny, {
26
+ url: string;
27
+ }, {
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;
44
+ }>]>, import("zod").ZodUnion<[import("zod").ZodObject<{
45
+ host: import("zod").ZodString;
46
+ port: import("zod").ZodOptional<import("zod").ZodNumber>;
47
+ user: import("zod").ZodDefault<import("zod").ZodString>;
48
+ password: import("zod").ZodOptional<import("zod").ZodString>;
49
+ database: import("zod").ZodString;
50
+ }, "strip", import("zod").ZodTypeAny, {
51
+ host: string;
52
+ user: string;
53
+ database: string;
54
+ port?: number | undefined;
55
+ password?: string | undefined;
56
+ }, {
57
+ host: string;
58
+ database: string;
59
+ port?: number | undefined;
60
+ user?: string | undefined;
61
+ password?: string | undefined;
62
+ }>, import("zod").ZodObject<{
63
+ url: import("zod").ZodString;
64
+ }, "strip", import("zod").ZodTypeAny, {
65
+ url: string;
66
+ }, {
67
+ url: string;
68
+ }>]>>;
69
+ export type Credentials = TypeOf<typeof credentials>;
70
+ export declare const studioCliParams: import("zod").ZodObject<{
71
+ port: import("zod").ZodDefault<import("zod").ZodOptional<import("zod").ZodNumber>>;
72
+ host: import("zod").ZodDefault<import("zod").ZodOptional<import("zod").ZodString>>;
73
+ config: import("zod").ZodOptional<import("zod").ZodString>;
74
+ }, "strip", import("zod").ZodTypeAny, {
75
+ host: string;
76
+ port: number;
77
+ config?: string | undefined;
78
+ }, {
79
+ host?: string | undefined;
80
+ port?: number | undefined;
81
+ config?: string | undefined;
82
+ }>;
83
+ export declare const studioConfig: import("zod").ZodObject<{
84
+ dialect: import("zod").ZodEnum<["postgresql", "mysql", "sqlite"]>;
85
+ schema: import("zod").ZodUnion<[import("zod").ZodString, import("zod").ZodArray<import("zod").ZodString, "many">]>;
86
+ }, "strip", import("zod").ZodTypeAny, {
87
+ schema: string | string[];
88
+ dialect: "postgresql" | "mysql" | "sqlite";
89
+ }, {
90
+ schema: string | string[];
91
+ dialect: "postgresql" | "mysql" | "sqlite";
92
+ }>;
package/cli/views.d.ts CHANGED
@@ -4,6 +4,7 @@ import type { Named, NamedWithSchema } from "./commands/migrate";
4
4
  export declare const warning: (msg: string) => void;
5
5
  export declare const err: (msg: string) => void;
6
6
  export declare const info: (msg: string, greyMsg?: string) => string;
7
+ export declare const grey: (msg: string) => string;
7
8
  export declare const error: (error: string, greyMsg?: string) => string;
8
9
  export declare const schema: (schema: CommonSchema) => string;
9
10
  export interface RenamePropmtItem<T> {
@@ -47,6 +48,12 @@ export declare class IntrospectProgress extends TaskView {
47
48
  private statusText;
48
49
  render(): string;
49
50
  }
51
+ export declare class MigrateProgress extends TaskView {
52
+ private readonly spinner;
53
+ private timeout;
54
+ constructor();
55
+ render(status: "pending" | "done"): string;
56
+ }
50
57
  export declare class DropMigrationView<T extends {
51
58
  tag: string;
52
59
  }> extends Prompt<T> {
package/index.d.mts CHANGED
@@ -1,52 +1,5 @@
1
- import { Dialect } from "./schemaValidator";
2
- export type DbConnection = {
3
- driver: "turso";
4
- dbCredentials: {
5
- url: string;
6
- authToken?: string;
7
- };
8
- } | {
9
- driver: "better-sqlite";
10
- dbCredentials: {
11
- url: string;
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
1
  export type Config = {
49
- dialect: Dialect;
2
+ dialect: "postgresql" | "mysql" | "sqlite";
50
3
  out?: string;
51
4
  breakpoints?: boolean;
52
5
  tablesFilter?: string | string[];
@@ -54,7 +7,10 @@ export type Config = {
54
7
  schema?: string | string[];
55
8
  verbose?: boolean;
56
9
  strict?: boolean;
57
- } & {
10
+ migrations?: {
11
+ table?: string;
12
+ schema?: string;
13
+ };
58
14
  introspect?: {
59
15
  casing: "camel" | "preserve";
60
16
  };
@@ -71,7 +27,7 @@ export type Config = {
71
27
  url: string;
72
28
  };
73
29
  } | {
74
- dialect: "pg";
30
+ dialect: "postgresql";
75
31
  dbCredentials: {
76
32
  host: string;
77
33
  port?: number;
@@ -80,15 +36,15 @@ export type Config = {
80
36
  database: string;
81
37
  ssl?: boolean;
82
38
  } | {
83
- connectionString: string;
39
+ url: string;
84
40
  };
85
41
  } | {
86
- dialect: "pg";
42
+ dialect: "postgresql";
87
43
  driver: "aws-data-api";
88
44
  dbCredentials: {
89
- key: string;
90
- secret: string;
91
- id: string;
45
+ database: string;
46
+ secretArn: string;
47
+ resourceArn: string;
92
48
  };
93
49
  } | {
94
50
  dialect: "mysql";
@@ -99,7 +55,7 @@ export type Config = {
99
55
  password?: string;
100
56
  database: string;
101
57
  } | {
102
- uri: string;
58
+ url: string;
103
59
  };
104
60
  } | {
105
61
  dialect: "sqlite";
package/index.d.ts CHANGED
@@ -1,52 +1,5 @@
1
- import { Dialect } from "./schemaValidator";
2
- export type DbConnection = {
3
- driver: "turso";
4
- dbCredentials: {
5
- url: string;
6
- authToken?: string;
7
- };
8
- } | {
9
- driver: "better-sqlite";
10
- dbCredentials: {
11
- url: string;
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
1
  export type Config = {
49
- dialect: Dialect;
2
+ dialect: "postgresql" | "mysql" | "sqlite";
50
3
  out?: string;
51
4
  breakpoints?: boolean;
52
5
  tablesFilter?: string | string[];
@@ -54,7 +7,10 @@ export type Config = {
54
7
  schema?: string | string[];
55
8
  verbose?: boolean;
56
9
  strict?: boolean;
57
- } & {
10
+ migrations?: {
11
+ table?: string;
12
+ schema?: string;
13
+ };
58
14
  introspect?: {
59
15
  casing: "camel" | "preserve";
60
16
  };
@@ -71,7 +27,7 @@ export type Config = {
71
27
  url: string;
72
28
  };
73
29
  } | {
74
- dialect: "pg";
30
+ dialect: "postgresql";
75
31
  dbCredentials: {
76
32
  host: string;
77
33
  port?: number;
@@ -80,15 +36,15 @@ export type Config = {
80
36
  database: string;
81
37
  ssl?: boolean;
82
38
  } | {
83
- connectionString: string;
39
+ url: string;
84
40
  };
85
41
  } | {
86
- dialect: "pg";
42
+ dialect: "postgresql";
87
43
  driver: "aws-data-api";
88
44
  dbCredentials: {
89
- key: string;
90
- secret: string;
91
- id: string;
45
+ database: string;
46
+ secretArn: string;
47
+ resourceArn: string;
92
48
  };
93
49
  } | {
94
50
  dialect: "mysql";
@@ -99,7 +55,7 @@ export type Config = {
99
55
  password?: string;
100
56
  database: string;
101
57
  } | {
102
- uri: string;
58
+ url: string;
103
59
  };
104
60
  } | {
105
61
  dialect: "sqlite";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "drizzle-kit",
3
- "version": "0.20.17-5938f5d",
3
+ "version": "0.20.17-7446198",
4
4
  "repository": "https://github.com/drizzle-team/drizzle-kit-mirror",
5
5
  "author": "Drizzle Team",
6
6
  "license": "MIT",
@@ -42,11 +42,13 @@
42
42
  "zod": "^3.20.2"
43
43
  },
44
44
  "devDependencies": {
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.5-ab9feb7",
70
+ "drizzle-orm": "0.30.9",
68
71
  "esbuild-node-externals": "^1.9.0",
69
72
  "eslint": "^8.57.0",
70
73
  "eslint-config-prettier": "^9.1.0",