drizzle-kit 0.20.14-5df59eb → 0.20.14-6ce9d1f
Sign up to get free protection for your applications and to get access to all the features.
- package/bin.cjs +6 -14
- package/cli/commands/utils.d.ts +4 -4
- package/cli/index.d.ts +2 -2
- package/index.d.mts +8 -6
- package/index.d.ts +8 -6
- package/package.json +1 -1
package/bin.cjs
CHANGED
@@ -21834,8 +21834,10 @@ var init_utils3 = __esm({
|
|
21834
21834
|
assertOrmCoreVersion = async () => {
|
21835
21835
|
try {
|
21836
21836
|
const { compatibilityVersion } = await import("drizzle-orm/version");
|
21837
|
-
|
21837
|
+
await import("drizzle-orm/relations");
|
21838
|
+
if (compatibilityVersion && compatibilityVersion === requiredApiVersion) {
|
21838
21839
|
return;
|
21840
|
+
}
|
21839
21841
|
if (!compatibilityVersion || compatibilityVersion < requiredApiVersion) {
|
21840
21842
|
console.log(
|
21841
21843
|
"This version of drizzle-kit requires newer version of drizzle-orm\nPlease update drizzle-orm package to the latest version \u{1F44D}"
|
@@ -63202,15 +63204,6 @@ var dbPushCommand = new import_commander.Command("push").option(
|
|
63202
63204
|
}
|
63203
63205
|
process.exit(0);
|
63204
63206
|
});
|
63205
|
-
var dbPushSqliteCommand = new import_commander.Command("push:sqlite").option(
|
63206
|
-
"--config <config>",
|
63207
|
-
"Path to a config.ts file, drizzle.config.ts by default"
|
63208
|
-
).option("--schema <schema>", "Path to a schema file or folder").option("--tablesFilter", `Table name filters`).option("--connectionString <connectionString>", "SQLite connection string").option("--driver <driver>", "Driver used for querying the database").option("--url <url>", "SQLite database path").option("--auth-token <authToken>", "SQLite database path").option("--verbose", "Print all statements for each push").option("--strict", "Always ask for confirmation").action(async (options) => {
|
63209
|
-
printVersions();
|
63210
|
-
assertPackages("drizzle-orm");
|
63211
|
-
assertOrmCoreVersion();
|
63212
|
-
process.exit(0);
|
63213
|
-
});
|
63214
63207
|
var checkSchema = objectType({
|
63215
63208
|
out: stringType().optional(),
|
63216
63209
|
config: stringType().optional(),
|
@@ -63434,9 +63427,9 @@ var introspectSQLiteCommand = new import_commander.Command("introspect:sqlite").
|
|
63434
63427
|
"--introspect-casing <introspectCasing>",
|
63435
63428
|
"Column object keys naming strategy"
|
63436
63429
|
).option("--tablesFilter", `Table name filters`).option("--schema <schema>", `Migrations folder`).option("--out <out>", `Migrations folder`).option("--breakpoints", `Prepare SQL statements with breakpoints`).option("--driver <driver>", "Driver used for querying the database").option("--url <url>", "SQLite database url").option("--auth-token <authToken>", "SQLite database path").action(async (options) => {
|
63437
|
-
printVersions();
|
63438
|
-
assertPackages("drizzle-orm");
|
63439
|
-
assertOrmCoreVersion();
|
63430
|
+
await printVersions();
|
63431
|
+
await assertPackages("drizzle-orm");
|
63432
|
+
await assertOrmCoreVersion();
|
63440
63433
|
const { sqliteIntrospect: sqliteIntrospect2 } = await Promise.resolve().then(() => (init_sqliteIntrospect(), sqliteIntrospect_exports));
|
63441
63434
|
const res = await validateIntrospect(options);
|
63442
63435
|
const out = res.out;
|
@@ -63639,7 +63632,6 @@ var main = async () => {
|
|
63639
63632
|
import_commander.program.addCommand(dropCommand);
|
63640
63633
|
import_commander.program.addCommand(dbPushCommand);
|
63641
63634
|
import_commander.program.addCommand(introspectSQLiteCommand);
|
63642
|
-
import_commander.program.addCommand(dbPushSqliteCommand);
|
63643
63635
|
import_commander.program.addCommand(checkMySqlCommand);
|
63644
63636
|
import_commander.program.addCommand(studioCommand);
|
63645
63637
|
import_commander.program.parse();
|
package/cli/commands/utils.d.ts
CHANGED
@@ -40,14 +40,14 @@ export declare const configCommonSchema: import("zod").ZodObject<{
|
|
40
40
|
schemaFilter: import("zod").ZodDefault<import("zod").ZodUnion<[import("zod").ZodString, import("zod").ZodArray<import("zod").ZodString, "many">]>>;
|
41
41
|
}, "strip", import("zod").ZodTypeAny, {
|
42
42
|
out?: string | undefined;
|
43
|
-
driver?: "turso" | "better-sqlite" | "libsql" | "d1" | "
|
43
|
+
driver?: "pg" | "turso" | "better-sqlite" | "libsql" | "d1" | "mysql2" | "expo" | undefined;
|
44
44
|
tablesFilter?: string | string[] | undefined;
|
45
45
|
schema: string | string[];
|
46
46
|
breakpoints: boolean;
|
47
47
|
schemaFilter: string | string[];
|
48
48
|
}, {
|
49
49
|
out?: string | undefined;
|
50
|
-
driver?: "turso" | "better-sqlite" | "libsql" | "d1" | "
|
50
|
+
driver?: "pg" | "turso" | "better-sqlite" | "libsql" | "d1" | "mysql2" | "expo" | undefined;
|
51
51
|
breakpoints?: boolean | undefined;
|
52
52
|
tablesFilter?: string | string[] | undefined;
|
53
53
|
schemaFilter?: string | string[] | undefined;
|
@@ -183,14 +183,14 @@ export declare const mySqlCliConfigSchema: import("zod").ZodIntersection<import(
|
|
183
183
|
schemaFilter: import("zod").ZodDefault<import("zod").ZodUnion<[import("zod").ZodString, import("zod").ZodArray<import("zod").ZodString, "many">]>>;
|
184
184
|
}, "strip", import("zod").ZodTypeAny, {
|
185
185
|
out?: string | undefined;
|
186
|
-
driver?: "turso" | "better-sqlite" | "libsql" | "d1" | "
|
186
|
+
driver?: "pg" | "turso" | "better-sqlite" | "libsql" | "d1" | "mysql2" | "expo" | undefined;
|
187
187
|
tablesFilter?: string | string[] | undefined;
|
188
188
|
schema: string | string[];
|
189
189
|
breakpoints: boolean;
|
190
190
|
schemaFilter: string | string[];
|
191
191
|
}, {
|
192
192
|
out?: string | undefined;
|
193
|
-
driver?: "turso" | "better-sqlite" | "libsql" | "d1" | "
|
193
|
+
driver?: "pg" | "turso" | "better-sqlite" | "libsql" | "d1" | "mysql2" | "expo" | undefined;
|
194
194
|
breakpoints?: boolean | undefined;
|
195
195
|
tablesFilter?: string | string[] | undefined;
|
196
196
|
schemaFilter?: string | string[] | undefined;
|
package/cli/index.d.ts
CHANGED
@@ -32,7 +32,7 @@ declare const cliParamsPush: import("zod").ZodObject<{
|
|
32
32
|
connectionString?: string | undefined;
|
33
33
|
uri?: string | undefined;
|
34
34
|
strict: boolean;
|
35
|
-
dialect: "
|
35
|
+
dialect: "mysql" | "pg" | "sqlite";
|
36
36
|
driver: string;
|
37
37
|
verbose: boolean;
|
38
38
|
}, {
|
@@ -50,7 +50,7 @@ declare const cliParamsPush: import("zod").ZodObject<{
|
|
50
50
|
ssl?: string | undefined;
|
51
51
|
connectionString?: string | undefined;
|
52
52
|
uri?: string | undefined;
|
53
|
-
dialect: "
|
53
|
+
dialect: "mysql" | "pg" | "sqlite";
|
54
54
|
driver: string;
|
55
55
|
}>;
|
56
56
|
export type CliParamsPush = TypeOf<typeof cliParamsPush>;
|
package/index.d.mts
CHANGED
@@ -1,3 +1,4 @@
|
|
1
|
+
import { Dialect } from "./schemaValidator";
|
1
2
|
export type DbConnection = {
|
2
3
|
driver: "turso";
|
3
4
|
dbCredentials: {
|
@@ -45,13 +46,14 @@ export type DbConnection = {
|
|
45
46
|
};
|
46
47
|
};
|
47
48
|
export type Config = {
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
49
|
+
dialect?: Dialect;
|
50
|
+
out?: string;
|
51
|
+
breakpoints?: boolean;
|
52
|
+
tablesFilter?: string | string[];
|
53
|
+
schemaFilter?: string | string[];
|
52
54
|
schema?: string | string[];
|
53
|
-
verbose?: boolean
|
54
|
-
strict?: boolean
|
55
|
+
verbose?: boolean;
|
56
|
+
strict?: boolean;
|
55
57
|
} & {
|
56
58
|
introspect?: {
|
57
59
|
casing: "camel" | "preserve";
|
package/index.d.ts
CHANGED
@@ -1,3 +1,4 @@
|
|
1
|
+
import { Dialect } from "./schemaValidator";
|
1
2
|
export type DbConnection = {
|
2
3
|
driver: "turso";
|
3
4
|
dbCredentials: {
|
@@ -45,13 +46,14 @@ export type DbConnection = {
|
|
45
46
|
};
|
46
47
|
};
|
47
48
|
export type Config = {
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
49
|
+
dialect?: Dialect;
|
50
|
+
out?: string;
|
51
|
+
breakpoints?: boolean;
|
52
|
+
tablesFilter?: string | string[];
|
53
|
+
schemaFilter?: string | string[];
|
52
54
|
schema?: string | string[];
|
53
|
-
verbose?: boolean
|
54
|
-
strict?: boolean
|
55
|
+
verbose?: boolean;
|
56
|
+
strict?: boolean;
|
55
57
|
} & {
|
56
58
|
introspect?: {
|
57
59
|
casing: "camel" | "preserve";
|