drizzle-kit 0.28.1-375ed28 → 0.28.1-440c1ee

Sign up to get free protection for your applications and to get access to all the features.
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-BfiZoTqG.mjs';
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-BfiZoTqG.js';
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
- return BigInt(Buffer.isBuffer(value) ? value.toString() : String.fromCodePoint(...value));
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
- return JSON.parse(Buffer.isBuffer(value) ? value.toString() : String.fromCodePoint(...value));
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
- return BigInt(Buffer.isBuffer(value) ? value.toString() : String.fromCodePoint(...value));
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
- return JSON.parse(Buffer.isBuffer(value) ? value.toString() : String.fromCodePoint(...value));
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 === "turso") {
11986
- let text2 = `Please provide required params for Turso driver:
11987
- `;
11988
- console.log(error(text2));
11989
- console.log(wrapParam("url", options.url));
11990
- console.log(wrapParam("authToken", options.authToken, false, "secret"));
11991
- return;
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,7 +17778,7 @@ var init_utils4 = __esm({
17763
17778
  breakpoints: breakpoints ?? true,
17764
17779
  schema: schema5,
17765
17780
  out: out || "drizzle",
17766
- bundle: driver2 === "expo",
17781
+ bundle: driver2 === "expo" || driver2 === "durable-sqlite",
17767
17782
  casing: casing2
17768
17783
  };
17769
17784
  };
@@ -89644,7 +89659,7 @@ init_utils2();
89644
89659
  var version2 = async () => {
89645
89660
  const { npmVersion } = await ormCoreVersions();
89646
89661
  const ormVersion = npmVersion ? `drizzle-orm: v${npmVersion}` : "";
89647
- const envVersion = "0.28.1-375ed28";
89662
+ const envVersion = "0.28.1-440c1ee";
89648
89663
  const kitVersion = envVersion ? `v${envVersion}` : "--";
89649
89664
  const versions = `drizzle-kit: ${kitVersion}
89650
89665
  ${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-BfiZoTqG.mjs';
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-BfiZoTqG.js';
2
+ export { a as Config, d as defineConfig } from './index-DcNyKHhJ.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "drizzle-kit",
3
- "version": "0.28.1-375ed28",
3
+ "version": "0.28.1-440c1ee",
4
4
  "homepage": "https://orm.drizzle.team",
5
5
  "keywords": [
6
6
  "drizzle",