drizzle-kit 0.20.0-5198fb7 → 0.20.0-8d6aad7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -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/utilsR";
6
+ import { Journal } from "src/utils";
7
7
  import { GenerateConfig } from "./utils";
8
8
  export type Named = {
9
9
  name: string;
@@ -0,0 +1,5 @@
1
+ import type { PgConnectionConfig } from "../validations/pg";
2
+ import { PgPostgres } from "src/drivers";
3
+ export declare const connectToPg: (config: PgConnectionConfig) => Promise<{
4
+ client: PgPostgres;
5
+ }>;
@@ -1,8 +1,5 @@
1
- import { PgConfigIntrospect, PgConnectionConfig } from "../validations/pg";
2
- import { DrizzleDbClient, PgPostgres } from "src/drivers";
3
- export declare const connectToPg: (config: PgConnectionConfig) => Promise<{
4
- client: PgPostgres;
5
- }>;
1
+ import type { PgConfigIntrospect } from "../validations/pg";
2
+ import type { DrizzleDbClient } from "src/drivers";
6
3
  export declare const pgPushIntrospect: (connection: {
7
4
  client: DrizzleDbClient;
8
5
  }, filters: string[], schemaFilters: string[]) => Promise<{
@@ -1,7 +1,7 @@
1
- import { SQLiteCliConfig, SQLiteConnectionConfig } from "./sqliteUtils";
2
- import { BetterSqlite, DrizzleDbClient } from "src/drivers";
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
  }>;
@@ -1,7 +1,7 @@
1
1
  import { TypeOf } from "zod";
2
- export declare const safeRegister: () => {
2
+ export declare const safeRegister: () => Promise<{
3
3
  unregister(): void;
4
- };
4
+ }>;
5
5
  export type GenerateConfig = {
6
6
  schema: string | string[];
7
7
  out: string;
@@ -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: "url";
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: "url";
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: "url";
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: "url";
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: "url";
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: "url";
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: "url";
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: "url";
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: "url";
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: "url";
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: "url";
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;
@@ -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);