drizzle-kit 0.31.3 → 0.31.4-3d1846f

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.
Files changed (4) hide show
  1. package/api.js +32 -43
  2. package/api.mjs +32 -43
  3. package/bin.cjs +7 -4
  4. package/package.json +1 -1
package/api.js CHANGED
@@ -12649,7 +12649,10 @@ var init_sqlgenerator = __esm({
12649
12649
  "interval minute to second",
12650
12650
  "char",
12651
12651
  "vector",
12652
- "geometry"
12652
+ "geometry",
12653
+ "halfvec",
12654
+ "sparsevec",
12655
+ "bit"
12653
12656
  ];
12654
12657
  const arrayDefinitionRegex = /\[\d*(?:\[\d*\])*\]/g;
12655
12658
  const arrayDefinition = (type.match(arrayDefinitionRegex) ?? []).join("");
@@ -22730,7 +22733,7 @@ var version;
22730
22733
  var init_version = __esm({
22731
22734
  "../drizzle-orm/dist/version.js"() {
22732
22735
  "use strict";
22733
- version = "0.44.2";
22736
+ version = "0.44.5";
22734
22737
  }
22735
22738
  });
22736
22739
 
@@ -23405,7 +23408,7 @@ var init_alias = __esm({
23405
23408
  });
23406
23409
 
23407
23410
  // ../drizzle-orm/dist/errors.js
23408
- var _a31, _b13, DrizzleError, _a32, _b14, TransactionRollbackError;
23411
+ var _a31, _b13, DrizzleError, DrizzleQueryError, _a32, _b14, TransactionRollbackError;
23409
23412
  var init_errors2 = __esm({
23410
23413
  "../drizzle-orm/dist/errors.js"() {
23411
23414
  "use strict";
@@ -23418,6 +23421,17 @@ var init_errors2 = __esm({
23418
23421
  }
23419
23422
  };
23420
23423
  __publicField(DrizzleError, _a31, "DrizzleError");
23424
+ DrizzleQueryError = class _DrizzleQueryError extends Error {
23425
+ constructor(query, params, cause) {
23426
+ super(`Failed query: ${query}
23427
+ params: ${params}`);
23428
+ this.query = query;
23429
+ this.params = params;
23430
+ this.cause = cause;
23431
+ Error.captureStackTrace(this, _DrizzleQueryError);
23432
+ if (cause) this.cause = cause;
23433
+ }
23434
+ };
23421
23435
  TransactionRollbackError = class extends (_b14 = DrizzleError, _a32 = entityKind, _b14) {
23422
23436
  constructor() {
23423
23437
  super({ message: "Rollback" });
@@ -23659,6 +23673,7 @@ function isConfig(data) {
23659
23673
  if (Object.keys(data).length === 0) return true;
23660
23674
  return false;
23661
23675
  }
23676
+ var textDecoder;
23662
23677
  var init_utils2 = __esm({
23663
23678
  "../drizzle-orm/dist/utils.js"() {
23664
23679
  "use strict";
@@ -23668,6 +23683,7 @@ var init_utils2 = __esm({
23668
23683
  init_subquery();
23669
23684
  init_table();
23670
23685
  init_view_common();
23686
+ textDecoder = typeof TextDecoder === "undefined" ? null : new TextDecoder();
23671
23687
  }
23672
23688
  });
23673
23689
 
@@ -26064,6 +26080,7 @@ __export(dist_exports, {
26064
26080
  ConsoleLogWriter: () => ConsoleLogWriter,
26065
26081
  DefaultLogger: () => DefaultLogger,
26066
26082
  DrizzleError: () => DrizzleError,
26083
+ DrizzleQueryError: () => DrizzleQueryError,
26067
26084
  ExtraConfigBuilder: () => ExtraConfigBuilder,
26068
26085
  ExtraConfigColumns: () => ExtraConfigColumns,
26069
26086
  FakePrimitiveParam: () => FakePrimitiveParam,
@@ -26171,7 +26188,8 @@ __export(dist_exports, {
26171
26188
  relations: () => relations,
26172
26189
  sql: () => sql,
26173
26190
  sum: () => sum,
26174
- sumDistinct: () => sumDistinct
26191
+ sumDistinct: () => sumDistinct,
26192
+ textDecoder: () => textDecoder
26175
26193
  });
26176
26194
  var init_dist = __esm({
26177
26195
  "../drizzle-orm/dist/index.js"() {
@@ -30295,25 +30313,6 @@ var init_cache = __esm({
30295
30313
  }
30296
30314
  });
30297
30315
 
30298
- // ../drizzle-orm/dist/errors/index.js
30299
- var DrizzleQueryError;
30300
- var init_errors3 = __esm({
30301
- "../drizzle-orm/dist/errors/index.js"() {
30302
- "use strict";
30303
- DrizzleQueryError = class _DrizzleQueryError extends Error {
30304
- constructor(query, params, cause) {
30305
- super(`Failed query: ${query}
30306
- params: ${params}`);
30307
- this.query = query;
30308
- this.params = params;
30309
- this.cause = cause;
30310
- Error.captureStackTrace(this, _DrizzleQueryError);
30311
- if (cause) this.cause = cause;
30312
- }
30313
- };
30314
- }
30315
- });
30316
-
30317
30316
  // ../drizzle-orm/dist/pg-core/session.js
30318
30317
  var _a167, PgPreparedQuery, _a168, PgSession, _a169, _b120, PgTransaction;
30319
30318
  var init_session = __esm({
@@ -30322,7 +30321,6 @@ var init_session = __esm({
30322
30321
  init_cache();
30323
30322
  init_entity();
30324
30323
  init_errors2();
30325
- init_errors3();
30326
30324
  init_sql2();
30327
30325
  init_tracing();
30328
30326
  init_db();
@@ -31695,7 +31693,7 @@ WHERE
31695
31693
  name: columnName,
31696
31694
  type: (
31697
31695
  // filter vectors, but in future we should filter any extension that was installed by user
31698
- columnAdditionalDT === "USER-DEFINED" && !["vector", "geometry"].includes(enumType2) ? enumType2 : columnTypeMapped
31696
+ columnAdditionalDT === "USER-DEFINED" && !["vector", "geometry", "halfvec", "sparsevec", "bit"].includes(enumType2) ? enumType2 : columnTypeMapped
31699
31697
  ),
31700
31698
  typeSchema: enumsToReturn[`${typeSchema}.${enumType2}`] !== void 0 ? enumsToReturn[`${typeSchema}.${enumType2}`].schema : void 0,
31701
31699
  primaryKey: primaryKey.length === 1 && cprimaryKey.length < 2,
@@ -31930,7 +31928,7 @@ WHERE
31930
31928
  name: columnName,
31931
31929
  type: (
31932
31930
  // filter vectors, but in future we should filter any extension that was installed by user
31933
- columnAdditionalDT === "USER-DEFINED" && !["vector", "geometry"].includes(enumType2) ? enumType2 : columnTypeMapped
31931
+ columnAdditionalDT === "USER-DEFINED" && !["vector", "geometry", "halfvec", "sparsevec", "bit"].includes(enumType2) ? enumType2 : columnTypeMapped
31934
31932
  ),
31935
31933
  typeSchema: enumsToReturn[`${typeSchema}.${enumType2}`] !== void 0 ? enumsToReturn[`${typeSchema}.${enumType2}`].schema : void 0,
31936
31934
  primaryKey,
@@ -32471,14 +32469,11 @@ var init_blob = __esm({
32471
32469
  return "blob";
32472
32470
  }
32473
32471
  mapFromDriverValue(value) {
32474
- if (Buffer.isBuffer(value)) {
32475
- return BigInt(value.toString());
32472
+ if (typeof Buffer !== "undefined" && Buffer.from) {
32473
+ const buf = Buffer.isBuffer(value) ? value : value instanceof ArrayBuffer ? Buffer.from(value) : value.buffer ? Buffer.from(value.buffer, value.byteOffset, value.byteLength) : Buffer.from(value);
32474
+ return BigInt(buf.toString("utf8"));
32476
32475
  }
32477
- if (value instanceof ArrayBuffer) {
32478
- const decoder = new TextDecoder();
32479
- return BigInt(decoder.decode(value));
32480
- }
32481
- return BigInt(String.fromCodePoint(...value));
32476
+ return BigInt(textDecoder.decode(value));
32482
32477
  }
32483
32478
  mapToDriverValue(value) {
32484
32479
  return Buffer.from(value.toString());
@@ -32503,14 +32498,11 @@ var init_blob = __esm({
32503
32498
  return "blob";
32504
32499
  }
32505
32500
  mapFromDriverValue(value) {
32506
- if (Buffer.isBuffer(value)) {
32507
- return JSON.parse(value.toString());
32508
- }
32509
- if (value instanceof ArrayBuffer) {
32510
- const decoder = new TextDecoder();
32511
- return JSON.parse(decoder.decode(value));
32501
+ if (typeof Buffer !== "undefined" && Buffer.from) {
32502
+ const buf = Buffer.isBuffer(value) ? value : value instanceof ArrayBuffer ? Buffer.from(value) : value.buffer ? Buffer.from(value.buffer, value.byteOffset, value.byteLength) : Buffer.from(value);
32503
+ return JSON.parse(buf.toString("utf8"));
32512
32504
  }
32513
- return JSON.parse(String.fromCodePoint(...value));
32505
+ return JSON.parse(textDecoder.decode(value));
32514
32506
  }
32515
32507
  mapToDriverValue(value) {
32516
32508
  return Buffer.from(JSON.stringify(value));
@@ -35663,7 +35655,6 @@ var init_session2 = __esm({
35663
35655
  init_cache();
35664
35656
  init_entity();
35665
35657
  init_errors2();
35666
- init_errors3();
35667
35658
  init_query_promise();
35668
35659
  init_db2();
35669
35660
  ExecuteResultSync = class extends (_b164 = QueryPromise, _a232 = entityKind, _b164) {
@@ -41303,7 +41294,6 @@ var init_session3 = __esm({
41303
41294
  init_cache();
41304
41295
  init_entity();
41305
41296
  init_errors2();
41306
- init_errors3();
41307
41297
  init_sql();
41308
41298
  init_db3();
41309
41299
  _a341 = entityKind;
@@ -46525,7 +46515,6 @@ var init_session4 = __esm({
46525
46515
  init_cache();
46526
46516
  init_entity();
46527
46517
  init_errors2();
46528
- init_errors3();
46529
46518
  init_sql();
46530
46519
  init_db4();
46531
46520
  _a434 = entityKind;
package/api.mjs CHANGED
@@ -12654,7 +12654,10 @@ var init_sqlgenerator = __esm({
12654
12654
  "interval minute to second",
12655
12655
  "char",
12656
12656
  "vector",
12657
- "geometry"
12657
+ "geometry",
12658
+ "halfvec",
12659
+ "sparsevec",
12660
+ "bit"
12658
12661
  ];
12659
12662
  const arrayDefinitionRegex = /\[\d*(?:\[\d*\])*\]/g;
12660
12663
  const arrayDefinition = (type.match(arrayDefinitionRegex) ?? []).join("");
@@ -22735,7 +22738,7 @@ var version;
22735
22738
  var init_version = __esm({
22736
22739
  "../drizzle-orm/dist/version.js"() {
22737
22740
  "use strict";
22738
- version = "0.44.2";
22741
+ version = "0.44.5";
22739
22742
  }
22740
22743
  });
22741
22744
 
@@ -23410,7 +23413,7 @@ var init_alias = __esm({
23410
23413
  });
23411
23414
 
23412
23415
  // ../drizzle-orm/dist/errors.js
23413
- var _a31, _b13, DrizzleError, _a32, _b14, TransactionRollbackError;
23416
+ var _a31, _b13, DrizzleError, DrizzleQueryError, _a32, _b14, TransactionRollbackError;
23414
23417
  var init_errors2 = __esm({
23415
23418
  "../drizzle-orm/dist/errors.js"() {
23416
23419
  "use strict";
@@ -23423,6 +23426,17 @@ var init_errors2 = __esm({
23423
23426
  }
23424
23427
  };
23425
23428
  __publicField(DrizzleError, _a31, "DrizzleError");
23429
+ DrizzleQueryError = class _DrizzleQueryError extends Error {
23430
+ constructor(query, params, cause) {
23431
+ super(`Failed query: ${query}
23432
+ params: ${params}`);
23433
+ this.query = query;
23434
+ this.params = params;
23435
+ this.cause = cause;
23436
+ Error.captureStackTrace(this, _DrizzleQueryError);
23437
+ if (cause) this.cause = cause;
23438
+ }
23439
+ };
23426
23440
  TransactionRollbackError = class extends (_b14 = DrizzleError, _a32 = entityKind, _b14) {
23427
23441
  constructor() {
23428
23442
  super({ message: "Rollback" });
@@ -23664,6 +23678,7 @@ function isConfig(data) {
23664
23678
  if (Object.keys(data).length === 0) return true;
23665
23679
  return false;
23666
23680
  }
23681
+ var textDecoder;
23667
23682
  var init_utils2 = __esm({
23668
23683
  "../drizzle-orm/dist/utils.js"() {
23669
23684
  "use strict";
@@ -23673,6 +23688,7 @@ var init_utils2 = __esm({
23673
23688
  init_subquery();
23674
23689
  init_table();
23675
23690
  init_view_common();
23691
+ textDecoder = typeof TextDecoder === "undefined" ? null : new TextDecoder();
23676
23692
  }
23677
23693
  });
23678
23694
 
@@ -26069,6 +26085,7 @@ __export(dist_exports, {
26069
26085
  ConsoleLogWriter: () => ConsoleLogWriter,
26070
26086
  DefaultLogger: () => DefaultLogger,
26071
26087
  DrizzleError: () => DrizzleError,
26088
+ DrizzleQueryError: () => DrizzleQueryError,
26072
26089
  ExtraConfigBuilder: () => ExtraConfigBuilder,
26073
26090
  ExtraConfigColumns: () => ExtraConfigColumns,
26074
26091
  FakePrimitiveParam: () => FakePrimitiveParam,
@@ -26176,7 +26193,8 @@ __export(dist_exports, {
26176
26193
  relations: () => relations,
26177
26194
  sql: () => sql,
26178
26195
  sum: () => sum,
26179
- sumDistinct: () => sumDistinct
26196
+ sumDistinct: () => sumDistinct,
26197
+ textDecoder: () => textDecoder
26180
26198
  });
26181
26199
  var init_dist = __esm({
26182
26200
  "../drizzle-orm/dist/index.js"() {
@@ -30300,25 +30318,6 @@ var init_cache = __esm({
30300
30318
  }
30301
30319
  });
30302
30320
 
30303
- // ../drizzle-orm/dist/errors/index.js
30304
- var DrizzleQueryError;
30305
- var init_errors3 = __esm({
30306
- "../drizzle-orm/dist/errors/index.js"() {
30307
- "use strict";
30308
- DrizzleQueryError = class _DrizzleQueryError extends Error {
30309
- constructor(query, params, cause) {
30310
- super(`Failed query: ${query}
30311
- params: ${params}`);
30312
- this.query = query;
30313
- this.params = params;
30314
- this.cause = cause;
30315
- Error.captureStackTrace(this, _DrizzleQueryError);
30316
- if (cause) this.cause = cause;
30317
- }
30318
- };
30319
- }
30320
- });
30321
-
30322
30321
  // ../drizzle-orm/dist/pg-core/session.js
30323
30322
  var _a167, PgPreparedQuery, _a168, PgSession, _a169, _b120, PgTransaction;
30324
30323
  var init_session = __esm({
@@ -30327,7 +30326,6 @@ var init_session = __esm({
30327
30326
  init_cache();
30328
30327
  init_entity();
30329
30328
  init_errors2();
30330
- init_errors3();
30331
30329
  init_sql2();
30332
30330
  init_tracing();
30333
30331
  init_db();
@@ -31700,7 +31698,7 @@ WHERE
31700
31698
  name: columnName,
31701
31699
  type: (
31702
31700
  // filter vectors, but in future we should filter any extension that was installed by user
31703
- columnAdditionalDT === "USER-DEFINED" && !["vector", "geometry"].includes(enumType2) ? enumType2 : columnTypeMapped
31701
+ columnAdditionalDT === "USER-DEFINED" && !["vector", "geometry", "halfvec", "sparsevec", "bit"].includes(enumType2) ? enumType2 : columnTypeMapped
31704
31702
  ),
31705
31703
  typeSchema: enumsToReturn[`${typeSchema}.${enumType2}`] !== void 0 ? enumsToReturn[`${typeSchema}.${enumType2}`].schema : void 0,
31706
31704
  primaryKey: primaryKey.length === 1 && cprimaryKey.length < 2,
@@ -31935,7 +31933,7 @@ WHERE
31935
31933
  name: columnName,
31936
31934
  type: (
31937
31935
  // filter vectors, but in future we should filter any extension that was installed by user
31938
- columnAdditionalDT === "USER-DEFINED" && !["vector", "geometry"].includes(enumType2) ? enumType2 : columnTypeMapped
31936
+ columnAdditionalDT === "USER-DEFINED" && !["vector", "geometry", "halfvec", "sparsevec", "bit"].includes(enumType2) ? enumType2 : columnTypeMapped
31939
31937
  ),
31940
31938
  typeSchema: enumsToReturn[`${typeSchema}.${enumType2}`] !== void 0 ? enumsToReturn[`${typeSchema}.${enumType2}`].schema : void 0,
31941
31939
  primaryKey,
@@ -32476,14 +32474,11 @@ var init_blob = __esm({
32476
32474
  return "blob";
32477
32475
  }
32478
32476
  mapFromDriverValue(value) {
32479
- if (Buffer.isBuffer(value)) {
32480
- return BigInt(value.toString());
32477
+ if (typeof Buffer !== "undefined" && Buffer.from) {
32478
+ const buf = Buffer.isBuffer(value) ? value : value instanceof ArrayBuffer ? Buffer.from(value) : value.buffer ? Buffer.from(value.buffer, value.byteOffset, value.byteLength) : Buffer.from(value);
32479
+ return BigInt(buf.toString("utf8"));
32481
32480
  }
32482
- if (value instanceof ArrayBuffer) {
32483
- const decoder = new TextDecoder();
32484
- return BigInt(decoder.decode(value));
32485
- }
32486
- return BigInt(String.fromCodePoint(...value));
32481
+ return BigInt(textDecoder.decode(value));
32487
32482
  }
32488
32483
  mapToDriverValue(value) {
32489
32484
  return Buffer.from(value.toString());
@@ -32508,14 +32503,11 @@ var init_blob = __esm({
32508
32503
  return "blob";
32509
32504
  }
32510
32505
  mapFromDriverValue(value) {
32511
- if (Buffer.isBuffer(value)) {
32512
- return JSON.parse(value.toString());
32513
- }
32514
- if (value instanceof ArrayBuffer) {
32515
- const decoder = new TextDecoder();
32516
- return JSON.parse(decoder.decode(value));
32506
+ if (typeof Buffer !== "undefined" && Buffer.from) {
32507
+ const buf = Buffer.isBuffer(value) ? value : value instanceof ArrayBuffer ? Buffer.from(value) : value.buffer ? Buffer.from(value.buffer, value.byteOffset, value.byteLength) : Buffer.from(value);
32508
+ return JSON.parse(buf.toString("utf8"));
32517
32509
  }
32518
- return JSON.parse(String.fromCodePoint(...value));
32510
+ return JSON.parse(textDecoder.decode(value));
32519
32511
  }
32520
32512
  mapToDriverValue(value) {
32521
32513
  return Buffer.from(JSON.stringify(value));
@@ -35668,7 +35660,6 @@ var init_session2 = __esm({
35668
35660
  init_cache();
35669
35661
  init_entity();
35670
35662
  init_errors2();
35671
- init_errors3();
35672
35663
  init_query_promise();
35673
35664
  init_db2();
35674
35665
  ExecuteResultSync = class extends (_b164 = QueryPromise, _a232 = entityKind, _b164) {
@@ -41308,7 +41299,6 @@ var init_session3 = __esm({
41308
41299
  init_cache();
41309
41300
  init_entity();
41310
41301
  init_errors2();
41311
- init_errors3();
41312
41302
  init_sql();
41313
41303
  init_db3();
41314
41304
  _a341 = entityKind;
@@ -46530,7 +46520,6 @@ var init_session4 = __esm({
46530
46520
  init_cache();
46531
46521
  init_entity();
46532
46522
  init_errors2();
46533
- init_errors3();
46534
46523
  init_sql();
46535
46524
  init_db4();
46536
46525
  _a434 = entityKind;
package/bin.cjs CHANGED
@@ -19650,7 +19650,7 @@ WHERE
19650
19650
  name: columnName,
19651
19651
  type: (
19652
19652
  // filter vectors, but in future we should filter any extension that was installed by user
19653
- columnAdditionalDT === "USER-DEFINED" && !["vector", "geometry"].includes(enumType2) ? enumType2 : columnTypeMapped
19653
+ columnAdditionalDT === "USER-DEFINED" && !["vector", "geometry", "halfvec", "sparsevec", "bit"].includes(enumType2) ? enumType2 : columnTypeMapped
19654
19654
  ),
19655
19655
  typeSchema: enumsToReturn[`${typeSchema}.${enumType2}`] !== void 0 ? enumsToReturn[`${typeSchema}.${enumType2}`].schema : void 0,
19656
19656
  primaryKey: primaryKey.length === 1 && cprimaryKey.length < 2,
@@ -19886,7 +19886,7 @@ WHERE
19886
19886
  name: columnName,
19887
19887
  type: (
19888
19888
  // filter vectors, but in future we should filter any extension that was installed by user
19889
- columnAdditionalDT === "USER-DEFINED" && !["vector", "geometry"].includes(enumType2) ? enumType2 : columnTypeMapped
19889
+ columnAdditionalDT === "USER-DEFINED" && !["vector", "geometry", "halfvec", "sparsevec", "bit"].includes(enumType2) ? enumType2 : columnTypeMapped
19890
19890
  ),
19891
19891
  typeSchema: enumsToReturn[`${typeSchema}.${enumType2}`] !== void 0 ? enumsToReturn[`${typeSchema}.${enumType2}`].schema : void 0,
19892
19892
  primaryKey,
@@ -24617,7 +24617,10 @@ var init_sqlgenerator = __esm({
24617
24617
  "interval minute to second",
24618
24618
  "char",
24619
24619
  "vector",
24620
- "geometry"
24620
+ "geometry",
24621
+ "halfvec",
24622
+ "sparsevec",
24623
+ "bit"
24621
24624
  ];
24622
24625
  const arrayDefinitionRegex = /\[\d*(?:\[\d*\])*\]/g;
24623
24626
  const arrayDefinition = (type.match(arrayDefinitionRegex) ?? []).join("");
@@ -94270,7 +94273,7 @@ init_utils5();
94270
94273
  var version2 = async () => {
94271
94274
  const { npmVersion } = await ormCoreVersions();
94272
94275
  const ormVersion = npmVersion ? `drizzle-orm: v${npmVersion}` : "";
94273
- const envVersion = "0.31.3";
94276
+ const envVersion = "0.31.4-3d1846f";
94274
94277
  const kitVersion = envVersion ? `v${envVersion}` : "--";
94275
94278
  const versions = `drizzle-kit: ${kitVersion}
94276
94279
  ${ormVersion}`;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "drizzle-kit",
3
- "version": "0.31.3",
3
+ "version": "0.31.4-3d1846f",
4
4
  "homepage": "https://orm.drizzle.team",
5
5
  "keywords": [
6
6
  "drizzle",