drizzle-kit 0.20.0-5198fb7 → 0.20.0-572b8ee
Sign up to get free protection for your applications and to get access to all the features.
- package/cli/commands/migrate.d.ts +1 -1
- package/cli/commands/pgConnect.d.ts +5 -0
- package/cli/commands/pgIntrospect.d.ts +3 -5
- package/cli/commands/sqliteIntrospect.d.ts +3 -3
- package/cli/commands/utils.d.ts +2 -2
- package/cli/validations/pg.d.ts +18 -18
- package/cli/validations/studio.d.ts +14 -14
- package/cli/views.d.ts +2 -2
- package/drivers/index.d.ts +3 -3
- package/index.cjs +6210 -6075
- package/index.d.ts +1 -0
- package/package.json +2 -2
- package/serializer/index.d.ts +4 -4
- package/serializer/pgSchema.d.ts +16 -16
- package/serializer/pgSerializer.d.ts +5 -3
- package/serializer/sqliteSerializer.d.ts +3 -3
- package/serializer/studioUtils.d.ts +6 -5
- package/sqlite-introspect.d.ts +2 -2
- package/utils-studio.d.ts +5 -0
- package/utils-studio.js +3367 -0
- package/utils.d.ts +204 -25
- package/utils.js +6556 -5692
- package/loader.mjs +0 -57
- package/utilsR.d.ts +0 -232
@@ -3,7 +3,7 @@ import { schema } from "../views";
|
|
3
3
|
import { PgSchema } from "src/serializer/pgSchema";
|
4
4
|
import { SQLiteSchema } from "src/serializer/sqliteSchema";
|
5
5
|
import { MySqlSchema } from "src/serializer/mysqlSchema";
|
6
|
-
import { Journal } from "src/
|
6
|
+
import { Journal } from "src/utils";
|
7
7
|
import { GenerateConfig } from "./utils";
|
8
8
|
export type Named = {
|
9
9
|
name: string;
|
@@ -1,8 +1,6 @@
|
|
1
|
-
import { PgConfigIntrospect
|
2
|
-
import { DrizzleDbClient
|
3
|
-
export declare const
|
4
|
-
client: PgPostgres;
|
5
|
-
}>;
|
1
|
+
import type { PgConfigIntrospect } from "../validations/pg";
|
2
|
+
import type { DrizzleDbClient } from "src/drivers";
|
3
|
+
export declare const pgSchemas: (client: DrizzleDbClient) => Promise<string[]>;
|
6
4
|
export declare const pgPushIntrospect: (connection: {
|
7
5
|
client: DrizzleDbClient;
|
8
6
|
}, filters: string[], schemaFilters: string[]) => Promise<{
|
@@ -1,7 +1,7 @@
|
|
1
|
-
import { SQLiteCliConfig, SQLiteConnectionConfig } from "./sqliteUtils";
|
2
|
-
import {
|
1
|
+
import type { SQLiteCliConfig, SQLiteConnectionConfig } from "./sqliteUtils";
|
2
|
+
import type { DrizzleDbClient } from "../../drivers";
|
3
3
|
export declare const connectToSQLite: (config: SQLiteConnectionConfig) => Promise<{
|
4
|
-
client: BetterSqlite;
|
4
|
+
client: import("../../drivers").BetterSqlite;
|
5
5
|
} | {
|
6
6
|
client?: undefined;
|
7
7
|
}>;
|
package/cli/commands/utils.d.ts
CHANGED
package/cli/validations/pg.d.ts
CHANGED
@@ -48,12 +48,12 @@ export declare const pgConnectionConfig: import("zod").ZodUnion<[import("zod").Z
|
|
48
48
|
password: import("zod").ZodOptional<import("zod").ZodString>;
|
49
49
|
database: import("zod").ZodString;
|
50
50
|
ssl: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
51
|
-
type: import("zod").ZodDefault<import("zod").ZodLiteral<"params"
|
51
|
+
type: import("zod").ZodOptional<import("zod").ZodDefault<import("zod").ZodLiteral<"params">>>;
|
52
52
|
}, "strip", import("zod").ZodTypeAny, {
|
53
|
+
type?: "params" | undefined;
|
53
54
|
port?: number | undefined;
|
54
55
|
password?: string | undefined;
|
55
56
|
ssl?: boolean | undefined;
|
56
|
-
type: "params";
|
57
57
|
host: string;
|
58
58
|
user: string;
|
59
59
|
database: string;
|
@@ -69,10 +69,10 @@ export declare const pgConnectionConfig: import("zod").ZodUnion<[import("zod").Z
|
|
69
69
|
}, "strip", import("zod").ZodTypeAny, {
|
70
70
|
driver: "pg";
|
71
71
|
dbCredentials: {
|
72
|
+
type?: "params" | undefined;
|
72
73
|
port?: number | undefined;
|
73
74
|
password?: string | undefined;
|
74
75
|
ssl?: boolean | undefined;
|
75
|
-
type: "params";
|
76
76
|
host: string;
|
77
77
|
user: string;
|
78
78
|
database: string;
|
@@ -92,9 +92,9 @@ export declare const pgConnectionConfig: import("zod").ZodUnion<[import("zod").Z
|
|
92
92
|
driver: import("zod").ZodLiteral<"pg">;
|
93
93
|
dbCredentials: import("zod").ZodObject<{
|
94
94
|
connectionString: import("zod").ZodString;
|
95
|
-
type: import("zod").ZodDefault<import("zod").ZodLiteral<"url"
|
95
|
+
type: import("zod").ZodOptional<import("zod").ZodDefault<import("zod").ZodLiteral<"url">>>;
|
96
96
|
}, "strip", import("zod").ZodTypeAny, {
|
97
|
-
type
|
97
|
+
type?: "url" | undefined;
|
98
98
|
connectionString: string;
|
99
99
|
}, {
|
100
100
|
type?: "url" | undefined;
|
@@ -103,7 +103,7 @@ export declare const pgConnectionConfig: import("zod").ZodUnion<[import("zod").Z
|
|
103
103
|
}, "strip", import("zod").ZodTypeAny, {
|
104
104
|
driver: "pg";
|
105
105
|
dbCredentials: {
|
106
|
-
type
|
106
|
+
type?: "url" | undefined;
|
107
107
|
connectionString: string;
|
108
108
|
};
|
109
109
|
}, {
|
@@ -153,12 +153,12 @@ export declare const pgConfigIntrospectSchema: import("zod").ZodIntersection<imp
|
|
153
153
|
password: import("zod").ZodOptional<import("zod").ZodString>;
|
154
154
|
database: import("zod").ZodString;
|
155
155
|
ssl: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
156
|
-
type: import("zod").ZodDefault<import("zod").ZodLiteral<"params"
|
156
|
+
type: import("zod").ZodOptional<import("zod").ZodDefault<import("zod").ZodLiteral<"params">>>;
|
157
157
|
}, "strip", import("zod").ZodTypeAny, {
|
158
|
+
type?: "params" | undefined;
|
158
159
|
port?: number | undefined;
|
159
160
|
password?: string | undefined;
|
160
161
|
ssl?: boolean | undefined;
|
161
|
-
type: "params";
|
162
162
|
host: string;
|
163
163
|
user: string;
|
164
164
|
database: string;
|
@@ -174,10 +174,10 @@ export declare const pgConfigIntrospectSchema: import("zod").ZodIntersection<imp
|
|
174
174
|
}, "strip", import("zod").ZodTypeAny, {
|
175
175
|
driver: "pg";
|
176
176
|
dbCredentials: {
|
177
|
+
type?: "params" | undefined;
|
177
178
|
port?: number | undefined;
|
178
179
|
password?: string | undefined;
|
179
180
|
ssl?: boolean | undefined;
|
180
|
-
type: "params";
|
181
181
|
host: string;
|
182
182
|
user: string;
|
183
183
|
database: string;
|
@@ -197,9 +197,9 @@ export declare const pgConfigIntrospectSchema: import("zod").ZodIntersection<imp
|
|
197
197
|
driver: import("zod").ZodLiteral<"pg">;
|
198
198
|
dbCredentials: import("zod").ZodObject<{
|
199
199
|
connectionString: import("zod").ZodString;
|
200
|
-
type: import("zod").ZodDefault<import("zod").ZodLiteral<"url"
|
200
|
+
type: import("zod").ZodOptional<import("zod").ZodDefault<import("zod").ZodLiteral<"url">>>;
|
201
201
|
}, "strip", import("zod").ZodTypeAny, {
|
202
|
-
type
|
202
|
+
type?: "url" | undefined;
|
203
203
|
connectionString: string;
|
204
204
|
}, {
|
205
205
|
type?: "url" | undefined;
|
@@ -208,7 +208,7 @@ export declare const pgConfigIntrospectSchema: import("zod").ZodIntersection<imp
|
|
208
208
|
}, "strip", import("zod").ZodTypeAny, {
|
209
209
|
driver: "pg";
|
210
210
|
dbCredentials: {
|
211
|
-
type
|
211
|
+
type?: "url" | undefined;
|
212
212
|
connectionString: string;
|
213
213
|
};
|
214
214
|
}, {
|
@@ -364,12 +364,12 @@ export declare const pgConfigPushParams: import("zod").ZodIntersection<import("z
|
|
364
364
|
password: import("zod").ZodOptional<import("zod").ZodString>;
|
365
365
|
database: import("zod").ZodString;
|
366
366
|
ssl: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
367
|
-
type: import("zod").ZodDefault<import("zod").ZodLiteral<"params"
|
367
|
+
type: import("zod").ZodOptional<import("zod").ZodDefault<import("zod").ZodLiteral<"params">>>;
|
368
368
|
}, "strip", import("zod").ZodTypeAny, {
|
369
|
+
type?: "params" | undefined;
|
369
370
|
port?: number | undefined;
|
370
371
|
password?: string | undefined;
|
371
372
|
ssl?: boolean | undefined;
|
372
|
-
type: "params";
|
373
373
|
host: string;
|
374
374
|
user: string;
|
375
375
|
database: string;
|
@@ -385,10 +385,10 @@ export declare const pgConfigPushParams: import("zod").ZodIntersection<import("z
|
|
385
385
|
}, "strip", import("zod").ZodTypeAny, {
|
386
386
|
driver: "pg";
|
387
387
|
dbCredentials: {
|
388
|
+
type?: "params" | undefined;
|
388
389
|
port?: number | undefined;
|
389
390
|
password?: string | undefined;
|
390
391
|
ssl?: boolean | undefined;
|
391
|
-
type: "params";
|
392
392
|
host: string;
|
393
393
|
user: string;
|
394
394
|
database: string;
|
@@ -408,9 +408,9 @@ export declare const pgConfigPushParams: import("zod").ZodIntersection<import("z
|
|
408
408
|
driver: import("zod").ZodLiteral<"pg">;
|
409
409
|
dbCredentials: import("zod").ZodObject<{
|
410
410
|
connectionString: import("zod").ZodString;
|
411
|
-
type: import("zod").ZodDefault<import("zod").ZodLiteral<"url"
|
411
|
+
type: import("zod").ZodOptional<import("zod").ZodDefault<import("zod").ZodLiteral<"url">>>;
|
412
412
|
}, "strip", import("zod").ZodTypeAny, {
|
413
|
-
type
|
413
|
+
type?: "url" | undefined;
|
414
414
|
connectionString: string;
|
415
415
|
}, {
|
416
416
|
type?: "url" | undefined;
|
@@ -419,7 +419,7 @@ export declare const pgConfigPushParams: import("zod").ZodIntersection<import("z
|
|
419
419
|
}, "strip", import("zod").ZodTypeAny, {
|
420
420
|
driver: "pg";
|
421
421
|
dbCredentials: {
|
422
|
-
type
|
422
|
+
type?: "url" | undefined;
|
423
423
|
connectionString: string;
|
424
424
|
};
|
425
425
|
}, {
|
@@ -101,12 +101,12 @@ export declare const studioConfidConnections: import("zod").ZodUnion<[import("zo
|
|
101
101
|
password: import("zod").ZodOptional<import("zod").ZodString>;
|
102
102
|
database: import("zod").ZodString;
|
103
103
|
ssl: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
104
|
-
type: import("zod").ZodDefault<import("zod").ZodLiteral<"params"
|
104
|
+
type: import("zod").ZodOptional<import("zod").ZodDefault<import("zod").ZodLiteral<"params">>>;
|
105
105
|
}, "strip", import("zod").ZodTypeAny, {
|
106
|
+
type?: "params" | undefined;
|
106
107
|
port?: number | undefined;
|
107
108
|
password?: string | undefined;
|
108
109
|
ssl?: boolean | undefined;
|
109
|
-
type: "params";
|
110
110
|
host: string;
|
111
111
|
user: string;
|
112
112
|
database: string;
|
@@ -122,10 +122,10 @@ export declare const studioConfidConnections: import("zod").ZodUnion<[import("zo
|
|
122
122
|
}, "strip", import("zod").ZodTypeAny, {
|
123
123
|
driver: "pg";
|
124
124
|
dbCredentials: {
|
125
|
+
type?: "params" | undefined;
|
125
126
|
port?: number | undefined;
|
126
127
|
password?: string | undefined;
|
127
128
|
ssl?: boolean | undefined;
|
128
|
-
type: "params";
|
129
129
|
host: string;
|
130
130
|
user: string;
|
131
131
|
database: string;
|
@@ -145,9 +145,9 @@ export declare const studioConfidConnections: import("zod").ZodUnion<[import("zo
|
|
145
145
|
driver: import("zod").ZodLiteral<"pg">;
|
146
146
|
dbCredentials: import("zod").ZodObject<{
|
147
147
|
connectionString: import("zod").ZodString;
|
148
|
-
type: import("zod").ZodDefault<import("zod").ZodLiteral<"url"
|
148
|
+
type: import("zod").ZodOptional<import("zod").ZodDefault<import("zod").ZodLiteral<"url">>>;
|
149
149
|
}, "strip", import("zod").ZodTypeAny, {
|
150
|
-
type
|
150
|
+
type?: "url" | undefined;
|
151
151
|
connectionString: string;
|
152
152
|
}, {
|
153
153
|
type?: "url" | undefined;
|
@@ -156,7 +156,7 @@ export declare const studioConfidConnections: import("zod").ZodUnion<[import("zo
|
|
156
156
|
}, "strip", import("zod").ZodTypeAny, {
|
157
157
|
driver: "pg";
|
158
158
|
dbCredentials: {
|
159
|
-
type
|
159
|
+
type?: "url" | undefined;
|
160
160
|
connectionString: string;
|
161
161
|
};
|
162
162
|
}, {
|
@@ -335,12 +335,12 @@ export declare const studioConfigSchema: import("zod").ZodIntersection<import("z
|
|
335
335
|
password: import("zod").ZodOptional<import("zod").ZodString>;
|
336
336
|
database: import("zod").ZodString;
|
337
337
|
ssl: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
338
|
-
type: import("zod").ZodDefault<import("zod").ZodLiteral<"params"
|
338
|
+
type: import("zod").ZodOptional<import("zod").ZodDefault<import("zod").ZodLiteral<"params">>>;
|
339
339
|
}, "strip", import("zod").ZodTypeAny, {
|
340
|
+
type?: "params" | undefined;
|
340
341
|
port?: number | undefined;
|
341
342
|
password?: string | undefined;
|
342
343
|
ssl?: boolean | undefined;
|
343
|
-
type: "params";
|
344
344
|
host: string;
|
345
345
|
user: string;
|
346
346
|
database: string;
|
@@ -356,10 +356,10 @@ export declare const studioConfigSchema: import("zod").ZodIntersection<import("z
|
|
356
356
|
}, "strip", import("zod").ZodTypeAny, {
|
357
357
|
driver: "pg";
|
358
358
|
dbCredentials: {
|
359
|
+
type?: "params" | undefined;
|
359
360
|
port?: number | undefined;
|
360
361
|
password?: string | undefined;
|
361
362
|
ssl?: boolean | undefined;
|
362
|
-
type: "params";
|
363
363
|
host: string;
|
364
364
|
user: string;
|
365
365
|
database: string;
|
@@ -379,9 +379,9 @@ export declare const studioConfigSchema: import("zod").ZodIntersection<import("z
|
|
379
379
|
driver: import("zod").ZodLiteral<"pg">;
|
380
380
|
dbCredentials: import("zod").ZodObject<{
|
381
381
|
connectionString: import("zod").ZodString;
|
382
|
-
type: import("zod").ZodDefault<import("zod").ZodLiteral<"url"
|
382
|
+
type: import("zod").ZodOptional<import("zod").ZodDefault<import("zod").ZodLiteral<"url">>>;
|
383
383
|
}, "strip", import("zod").ZodTypeAny, {
|
384
|
-
type
|
384
|
+
type?: "url" | undefined;
|
385
385
|
connectionString: string;
|
386
386
|
}, {
|
387
387
|
type?: "url" | undefined;
|
@@ -390,7 +390,7 @@ export declare const studioConfigSchema: import("zod").ZodIntersection<import("z
|
|
390
390
|
}, "strip", import("zod").ZodTypeAny, {
|
391
391
|
driver: "pg";
|
392
392
|
dbCredentials: {
|
393
|
-
type
|
393
|
+
type?: "url" | undefined;
|
394
394
|
connectionString: string;
|
395
395
|
};
|
396
396
|
}, {
|
@@ -493,10 +493,10 @@ export declare const validateStudio: (options: any) => Promise<{
|
|
493
493
|
} & ({
|
494
494
|
driver: "pg";
|
495
495
|
dbCredentials: {
|
496
|
+
type?: "params" | undefined;
|
496
497
|
port?: number | undefined;
|
497
498
|
password?: string | undefined;
|
498
499
|
ssl?: boolean | undefined;
|
499
|
-
type: "params";
|
500
500
|
host: string;
|
501
501
|
user: string;
|
502
502
|
database: string;
|
@@ -504,7 +504,7 @@ export declare const validateStudio: (options: any) => Promise<{
|
|
504
504
|
} | {
|
505
505
|
driver: "pg";
|
506
506
|
dbCredentials: {
|
507
|
-
type
|
507
|
+
type?: "url" | undefined;
|
508
508
|
connectionString: string;
|
509
509
|
};
|
510
510
|
} | {
|
package/cli/views.d.ts
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
import { Prompt, TaskView } from "hanji";
|
2
|
-
import { CommonSchema } from "src/schemaValidator";
|
3
|
-
import { Named } from "./commands/migrate";
|
2
|
+
import type { CommonSchema } from "src/schemaValidator";
|
3
|
+
import type { Named } 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;
|
package/drivers/index.d.ts
CHANGED
@@ -1,6 +1,6 @@
|
|
1
|
-
import { Client } from "@libsql/client";
|
2
|
-
import { PgDatabase } from "drizzle-orm/pg-core";
|
3
|
-
import { Client as PgClient } from "pg";
|
1
|
+
import type { Client } from "@libsql/client";
|
2
|
+
import type { PgDatabase } from "drizzle-orm/pg-core";
|
3
|
+
import type { Client as PgClient } from "pg";
|
4
4
|
export declare abstract class DrizzleDbClient<T = any> {
|
5
5
|
protected db: T;
|
6
6
|
constructor(db: T);
|