drizzle-kit 0.28.1-166fb8d → 0.28.1-3d262cd
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.
- package/api.d.mts +1 -1
- package/api.d.ts +1 -1
- package/api.js +18 -3
- package/api.mjs +18 -3
- package/bin.cjs +35 -17
- package/{index-BfiZoTqG.d.mts → index-DcNyKHhJ.d.mts} +4 -1
- package/{index-BfiZoTqG.d.ts → index-DcNyKHhJ.d.ts} +4 -1
- package/index.d.mts +1 -1
- package/index.d.ts +1 -1
- package/package.json +1 -1
package/api.d.mts
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
import { LibSQLDatabase } from 'drizzle-orm/libsql';
|
2
2
|
import { MySql2Database } from 'drizzle-orm/mysql2';
|
3
3
|
import { PgDatabase } from 'drizzle-orm/pg-core';
|
4
|
-
import { C as CasingType, a as Config } from './index-
|
4
|
+
import { C as CasingType, a as Config } from './index-DcNyKHhJ.mjs';
|
5
5
|
import * as zod from 'zod';
|
6
6
|
import { TypeOf } from 'zod';
|
7
7
|
import 'tls';
|
package/api.d.ts
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
import { LibSQLDatabase } from 'drizzle-orm/libsql';
|
2
2
|
import { MySql2Database } from 'drizzle-orm/mysql2';
|
3
3
|
import { PgDatabase } from 'drizzle-orm/pg-core';
|
4
|
-
import { C as CasingType, a as Config } from './index-
|
4
|
+
import { C as CasingType, a as Config } from './index-DcNyKHhJ.js';
|
5
5
|
import * as zod from 'zod';
|
6
6
|
import { TypeOf } from 'zod';
|
7
7
|
import 'tls';
|
package/api.js
CHANGED
@@ -18829,7 +18829,8 @@ var init_common = __esm({
|
|
18829
18829
|
init_outputs();
|
18830
18830
|
sqliteDriversLiterals = [
|
18831
18831
|
literalType("d1-http"),
|
18832
|
-
literalType("expo")
|
18832
|
+
literalType("expo"),
|
18833
|
+
literalType("durable-sqlite")
|
18833
18834
|
];
|
18834
18835
|
postgresqlDriversLiterals = [
|
18835
18836
|
literalType("aws-data-api"),
|
@@ -30484,7 +30485,14 @@ var init_blob = __esm({
|
|
30484
30485
|
return "blob";
|
30485
30486
|
}
|
30486
30487
|
mapFromDriverValue(value) {
|
30487
|
-
|
30488
|
+
if (Buffer.isBuffer(value)) {
|
30489
|
+
return BigInt(value.toString());
|
30490
|
+
}
|
30491
|
+
if (value instanceof ArrayBuffer) {
|
30492
|
+
const decoder = new TextDecoder();
|
30493
|
+
return BigInt(decoder.decode(value));
|
30494
|
+
}
|
30495
|
+
return BigInt(String.fromCodePoint(...value));
|
30488
30496
|
}
|
30489
30497
|
mapToDriverValue(value) {
|
30490
30498
|
return Buffer.from(value.toString());
|
@@ -30509,7 +30517,14 @@ var init_blob = __esm({
|
|
30509
30517
|
return "blob";
|
30510
30518
|
}
|
30511
30519
|
mapFromDriverValue(value) {
|
30512
|
-
|
30520
|
+
if (Buffer.isBuffer(value)) {
|
30521
|
+
return JSON.parse(value.toString());
|
30522
|
+
}
|
30523
|
+
if (value instanceof ArrayBuffer) {
|
30524
|
+
const decoder = new TextDecoder();
|
30525
|
+
return JSON.parse(decoder.decode(value));
|
30526
|
+
}
|
30527
|
+
return JSON.parse(String.fromCodePoint(...value));
|
30513
30528
|
}
|
30514
30529
|
mapToDriverValue(value) {
|
30515
30530
|
return Buffer.from(JSON.stringify(value));
|
package/api.mjs
CHANGED
@@ -18834,7 +18834,8 @@ var init_common = __esm({
|
|
18834
18834
|
init_outputs();
|
18835
18835
|
sqliteDriversLiterals = [
|
18836
18836
|
literalType("d1-http"),
|
18837
|
-
literalType("expo")
|
18837
|
+
literalType("expo"),
|
18838
|
+
literalType("durable-sqlite")
|
18838
18839
|
];
|
18839
18840
|
postgresqlDriversLiterals = [
|
18840
18841
|
literalType("aws-data-api"),
|
@@ -30489,7 +30490,14 @@ var init_blob = __esm({
|
|
30489
30490
|
return "blob";
|
30490
30491
|
}
|
30491
30492
|
mapFromDriverValue(value) {
|
30492
|
-
|
30493
|
+
if (Buffer.isBuffer(value)) {
|
30494
|
+
return BigInt(value.toString());
|
30495
|
+
}
|
30496
|
+
if (value instanceof ArrayBuffer) {
|
30497
|
+
const decoder = new TextDecoder();
|
30498
|
+
return BigInt(decoder.decode(value));
|
30499
|
+
}
|
30500
|
+
return BigInt(String.fromCodePoint(...value));
|
30493
30501
|
}
|
30494
30502
|
mapToDriverValue(value) {
|
30495
30503
|
return Buffer.from(value.toString());
|
@@ -30514,7 +30522,14 @@ var init_blob = __esm({
|
|
30514
30522
|
return "blob";
|
30515
30523
|
}
|
30516
30524
|
mapFromDriverValue(value) {
|
30517
|
-
|
30525
|
+
if (Buffer.isBuffer(value)) {
|
30526
|
+
return JSON.parse(value.toString());
|
30527
|
+
}
|
30528
|
+
if (value instanceof ArrayBuffer) {
|
30529
|
+
const decoder = new TextDecoder();
|
30530
|
+
return JSON.parse(decoder.decode(value));
|
30531
|
+
}
|
30532
|
+
return JSON.parse(String.fromCodePoint(...value));
|
30518
30533
|
}
|
30519
30534
|
mapToDriverValue(value) {
|
30520
30535
|
return Buffer.from(JSON.stringify(value));
|
package/bin.cjs
CHANGED
@@ -11589,7 +11589,8 @@ var init_common = __esm({
|
|
11589
11589
|
};
|
11590
11590
|
sqliteDriversLiterals = [
|
11591
11591
|
literalType("d1-http"),
|
11592
|
-
literalType("expo")
|
11592
|
+
literalType("expo"),
|
11593
|
+
literalType("durable-sqlite")
|
11593
11594
|
];
|
11594
11595
|
postgresqlDriversLiterals = [
|
11595
11596
|
literalType("aws-data-api"),
|
@@ -11666,7 +11667,7 @@ var init_common = __esm({
|
|
11666
11667
|
strict: booleanType().default(false),
|
11667
11668
|
out: stringType().optional()
|
11668
11669
|
});
|
11669
|
-
drivers = ["d1-http", "expo", "aws-data-api", "pglite"];
|
11670
|
+
drivers = ["d1-http", "expo", "aws-data-api", "pglite", "durable-sqlite"];
|
11670
11671
|
wrapParam = (name, param, optional = false, type) => {
|
11671
11672
|
const check2 = `[${source_default.green("\u2713")}]`;
|
11672
11673
|
const cross = `[${source_default.red("x")}]`;
|
@@ -11982,13 +11983,27 @@ var init_sqlite = __esm({
|
|
11982
11983
|
console.log(wrapParam("databaseId", options.databaseId));
|
11983
11984
|
console.log(wrapParam("token", options.token, false, "secret"));
|
11984
11985
|
process.exit(1);
|
11985
|
-
} else if (driver2 === "
|
11986
|
-
|
11987
|
-
|
11988
|
-
|
11989
|
-
|
11990
|
-
|
11991
|
-
|
11986
|
+
} else if (driver2 === "durable-sqlite") {
|
11987
|
+
if (command === "migrate") {
|
11988
|
+
console.log(
|
11989
|
+
error(
|
11990
|
+
`You can't use 'migrate' command with SQLite Durable Objects`
|
11991
|
+
)
|
11992
|
+
);
|
11993
|
+
} else if (command === "studio") {
|
11994
|
+
console.log(
|
11995
|
+
error(
|
11996
|
+
`You can't use 'migrate' command with SQLite Durable Objects`
|
11997
|
+
)
|
11998
|
+
);
|
11999
|
+
} else if (command === "pull") {
|
12000
|
+
console.log(error("You can't use 'pull' command with SQLite Durable Objects"));
|
12001
|
+
} else if (command === "push") {
|
12002
|
+
console.log(error("You can't use 'push' command with SQLite Durable Objects"));
|
12003
|
+
} else {
|
12004
|
+
console.log(error("Unexpected error with SQLite Durable Object driver \u{1F914}"));
|
12005
|
+
}
|
12006
|
+
process.exit(1);
|
11992
12007
|
} else {
|
11993
12008
|
softAssertUnreachable(driver2);
|
11994
12009
|
}
|
@@ -17763,8 +17778,9 @@ var init_utils4 = __esm({
|
|
17763
17778
|
breakpoints: breakpoints ?? true,
|
17764
17779
|
schema: schema5,
|
17765
17780
|
out: out || "drizzle",
|
17766
|
-
bundle: driver2 === "expo",
|
17767
|
-
casing: casing2
|
17781
|
+
bundle: driver2 === "expo" || driver2 === "durable-sqlite",
|
17782
|
+
casing: casing2,
|
17783
|
+
driver: driver2
|
17768
17784
|
};
|
17769
17785
|
};
|
17770
17786
|
flattenDatabaseCredentials = (config) => {
|
@@ -33253,7 +33269,8 @@ var init_migrate = __esm({
|
|
33253
33269
|
name: config.name,
|
33254
33270
|
breakpoints: config.breakpoints,
|
33255
33271
|
bundle: config.bundle,
|
33256
|
-
prefixMode: config.prefix
|
33272
|
+
prefixMode: config.prefix,
|
33273
|
+
driver: config.driver
|
33257
33274
|
});
|
33258
33275
|
} catch (e2) {
|
33259
33276
|
console.error(e2);
|
@@ -33583,7 +33600,8 @@ var init_migrate = __esm({
|
|
33583
33600
|
name,
|
33584
33601
|
bundle = false,
|
33585
33602
|
type = "none",
|
33586
|
-
prefixMode
|
33603
|
+
prefixMode,
|
33604
|
+
driver: driver2
|
33587
33605
|
}) => {
|
33588
33606
|
if (type === "none") {
|
33589
33607
|
console.log(schema(cur));
|
@@ -33626,7 +33644,7 @@ ${sql}
|
|
33626
33644
|
import_fs5.default.writeFileSync(metaJournal, JSON.stringify(journal, null, 2));
|
33627
33645
|
import_fs5.default.writeFileSync(`${outFolder}/${tag}.sql`, sql);
|
33628
33646
|
if (bundle) {
|
33629
|
-
const js = embeddedMigrations(journal);
|
33647
|
+
const js = embeddedMigrations(journal, driver2);
|
33630
33648
|
import_fs5.default.writeFileSync(`${outFolder}/migrations.js`, js);
|
33631
33649
|
}
|
33632
33650
|
(0, import_hanji3.render)(
|
@@ -33637,8 +33655,8 @@ ${sql}
|
|
33637
33655
|
)} \u{1F680}`
|
33638
33656
|
);
|
33639
33657
|
};
|
33640
|
-
embeddedMigrations = (journal) => {
|
33641
|
-
let content = "// This file is required for Expo/React Native SQLite migrations - https://orm.drizzle.team/quick-sqlite/expo\n\n";
|
33658
|
+
embeddedMigrations = (journal, driver2) => {
|
33659
|
+
let content = driver2 === "expo" ? "// This file is required for Expo/React Native SQLite migrations - https://orm.drizzle.team/quick-sqlite/expo\n\n" : "";
|
33642
33660
|
content += "import journal from './meta/_journal.json';\n";
|
33643
33661
|
journal.entries.forEach((entry) => {
|
33644
33662
|
content += `import m${entry.idx.toString().padStart(4, "0")} from './${entry.tag}.sql';
|
@@ -89644,7 +89662,7 @@ init_utils2();
|
|
89644
89662
|
var version2 = async () => {
|
89645
89663
|
const { npmVersion } = await ormCoreVersions();
|
89646
89664
|
const ormVersion = npmVersion ? `drizzle-orm: v${npmVersion}` : "";
|
89647
|
-
const envVersion = "0.28.1-
|
89665
|
+
const envVersion = "0.28.1-3d262cd";
|
89648
89666
|
const kitVersion = envVersion ? `v${envVersion}` : "--";
|
89649
89667
|
const versions = `drizzle-kit: ${kitVersion}
|
89650
89668
|
${ormVersion}`;
|
@@ -4,7 +4,7 @@ declare const prefixes: readonly ["index", "timestamp", "supabase", "unix", "non
|
|
4
4
|
type Prefix = (typeof prefixes)[number];
|
5
5
|
declare const casingTypes: readonly ["snake_case", "camelCase"];
|
6
6
|
type CasingType = (typeof casingTypes)[number];
|
7
|
-
declare const drivers: readonly ["d1-http", "expo", "aws-data-api", "pglite"];
|
7
|
+
declare const drivers: readonly ["d1-http", "expo", "aws-data-api", "pglite", "durable-sqlite"];
|
8
8
|
type Driver = (typeof drivers)[number];
|
9
9
|
|
10
10
|
declare const dialects: readonly ["postgresql", "mysql", "sqlite", "turso"];
|
@@ -197,6 +197,9 @@ type Config = {
|
|
197
197
|
} | {
|
198
198
|
dialect: Verify<Dialect, 'sqlite'>;
|
199
199
|
driver: Verify<Driver, 'expo'>;
|
200
|
+
} | {
|
201
|
+
dialect: Verify<Dialect, 'sqlite'>;
|
202
|
+
driver: Verify<Driver, 'durable-sqlite'>;
|
200
203
|
} | {});
|
201
204
|
/**
|
202
205
|
* **You are currently using version 0.21.0+ of drizzle-kit. If you have just upgraded to this version, please make sure to read the changelog to understand what changes have been made and what
|
@@ -4,7 +4,7 @@ declare const prefixes: readonly ["index", "timestamp", "supabase", "unix", "non
|
|
4
4
|
type Prefix = (typeof prefixes)[number];
|
5
5
|
declare const casingTypes: readonly ["snake_case", "camelCase"];
|
6
6
|
type CasingType = (typeof casingTypes)[number];
|
7
|
-
declare const drivers: readonly ["d1-http", "expo", "aws-data-api", "pglite"];
|
7
|
+
declare const drivers: readonly ["d1-http", "expo", "aws-data-api", "pglite", "durable-sqlite"];
|
8
8
|
type Driver = (typeof drivers)[number];
|
9
9
|
|
10
10
|
declare const dialects: readonly ["postgresql", "mysql", "sqlite", "turso"];
|
@@ -197,6 +197,9 @@ type Config = {
|
|
197
197
|
} | {
|
198
198
|
dialect: Verify<Dialect, 'sqlite'>;
|
199
199
|
driver: Verify<Driver, 'expo'>;
|
200
|
+
} | {
|
201
|
+
dialect: Verify<Dialect, 'sqlite'>;
|
202
|
+
driver: Verify<Driver, 'durable-sqlite'>;
|
200
203
|
} | {});
|
201
204
|
/**
|
202
205
|
* **You are currently using version 0.21.0+ of drizzle-kit. If you have just upgraded to this version, please make sure to read the changelog to understand what changes have been made and what
|
package/index.d.mts
CHANGED
@@ -1,2 +1,2 @@
|
|
1
1
|
import 'tls';
|
2
|
-
export { a as Config, d as defineConfig } from './index-
|
2
|
+
export { a as Config, d as defineConfig } from './index-DcNyKHhJ.mjs';
|
package/index.d.ts
CHANGED
@@ -1,2 +1,2 @@
|
|
1
1
|
import 'tls';
|
2
|
-
export { a as Config, d as defineConfig } from './index-
|
2
|
+
export { a as Config, d as defineConfig } from './index-DcNyKHhJ.js';
|