@prisma/adapter-better-sqlite3 7.3.0-integration-prisma6-fix-cloudflare-engine.2 → 7.3.0-integration-engines-7-3-0-10-fix-fix-mapped-enum-issue-0b7e6564db7dc3dac7f9312aa84e9ed81d805521.1
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/dist/index.d.mts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +6 -13
- package/dist/index.mjs +5 -12
- package/package.json +3 -3
package/dist/index.d.mts
CHANGED
|
@@ -6,16 +6,16 @@ declare type BetterSQLite3InputParams = Options & {
|
|
|
6
6
|
url: ':memory:' | (string & {});
|
|
7
7
|
};
|
|
8
8
|
|
|
9
|
-
export declare class
|
|
9
|
+
export declare class PrismaBetterSqlite3 implements SqlMigrationAwareDriverAdapterFactory {
|
|
10
10
|
#private;
|
|
11
11
|
readonly provider = "sqlite";
|
|
12
12
|
readonly adapterName: string;
|
|
13
|
-
constructor(config: BetterSQLite3InputParams, options?:
|
|
13
|
+
constructor(config: BetterSQLite3InputParams, options?: PrismaBetterSqlite3Options);
|
|
14
14
|
connect(): Promise<SqlDriverAdapter>;
|
|
15
15
|
connectToShadowDb(): Promise<SqlDriverAdapter>;
|
|
16
16
|
}
|
|
17
17
|
|
|
18
|
-
declare type
|
|
18
|
+
declare type PrismaBetterSqlite3Options = {
|
|
19
19
|
shadowDatabaseUrl?: string;
|
|
20
20
|
timestampFormat?: 'iso8601' | 'unixepoch-ms';
|
|
21
21
|
};
|
package/dist/index.d.ts
CHANGED
|
@@ -6,16 +6,16 @@ declare type BetterSQLite3InputParams = Options & {
|
|
|
6
6
|
url: ':memory:' | (string & {});
|
|
7
7
|
};
|
|
8
8
|
|
|
9
|
-
export declare class
|
|
9
|
+
export declare class PrismaBetterSqlite3 implements SqlMigrationAwareDriverAdapterFactory {
|
|
10
10
|
#private;
|
|
11
11
|
readonly provider = "sqlite";
|
|
12
12
|
readonly adapterName: string;
|
|
13
|
-
constructor(config: BetterSQLite3InputParams, options?:
|
|
13
|
+
constructor(config: BetterSQLite3InputParams, options?: PrismaBetterSqlite3Options);
|
|
14
14
|
connect(): Promise<SqlDriverAdapter>;
|
|
15
15
|
connectToShadowDb(): Promise<SqlDriverAdapter>;
|
|
16
16
|
}
|
|
17
17
|
|
|
18
|
-
declare type
|
|
18
|
+
declare type PrismaBetterSqlite3Options = {
|
|
19
19
|
shadowDatabaseUrl?: string;
|
|
20
20
|
timestampFormat?: 'iso8601' | 'unixepoch-ms';
|
|
21
21
|
};
|
package/dist/index.js
CHANGED
|
@@ -30,7 +30,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
30
30
|
// src/index.ts
|
|
31
31
|
var index_exports = {};
|
|
32
32
|
__export(index_exports, {
|
|
33
|
-
|
|
33
|
+
PrismaBetterSqlite3: () => PrismaBetterSqlite3AdapterFactory
|
|
34
34
|
});
|
|
35
35
|
module.exports = __toCommonJS(index_exports);
|
|
36
36
|
|
|
@@ -369,10 +369,6 @@ function mapRow(row, columnTypes) {
|
|
|
369
369
|
const result = [];
|
|
370
370
|
for (let i = 0; i < row.length; i++) {
|
|
371
371
|
const value = row[i];
|
|
372
|
-
if (value instanceof ArrayBuffer || value instanceof Buffer) {
|
|
373
|
-
result[i] = Array.from(new Uint8Array(value));
|
|
374
|
-
continue;
|
|
375
|
-
}
|
|
376
372
|
if (typeof value === "number" && (columnTypes[i] === import_driver_adapter_utils.ColumnTypeEnum.Int32 || columnTypes[i] === import_driver_adapter_utils.ColumnTypeEnum.Int64) && !Number.isInteger(value)) {
|
|
377
373
|
result[i] = Math.trunc(value);
|
|
378
374
|
continue;
|
|
@@ -425,9 +421,6 @@ function mapArg(arg, argType, options) {
|
|
|
425
421
|
if (typeof arg === "string" && argType.scalarType === "bytes") {
|
|
426
422
|
return Buffer.from(arg, "base64");
|
|
427
423
|
}
|
|
428
|
-
if (Array.isArray(arg) && argType.scalarType === "bytes") {
|
|
429
|
-
return Buffer.from(arg);
|
|
430
|
-
}
|
|
431
424
|
return arg;
|
|
432
425
|
}
|
|
433
426
|
|
|
@@ -593,7 +586,7 @@ var BetterSQLite3Transaction = class extends BetterSQLite3Queryable {
|
|
|
593
586
|
return Promise.resolve();
|
|
594
587
|
}
|
|
595
588
|
};
|
|
596
|
-
var
|
|
589
|
+
var PrismaBetterSqlite3Adapter = class extends BetterSQLite3Queryable {
|
|
597
590
|
#mutex = new Mutex();
|
|
598
591
|
constructor(client, adapterOptions) {
|
|
599
592
|
super(client, adapterOptions);
|
|
@@ -631,7 +624,7 @@ var PrismaBetterSQLite3Adapter = class extends BetterSQLite3Queryable {
|
|
|
631
624
|
return Promise.resolve();
|
|
632
625
|
}
|
|
633
626
|
};
|
|
634
|
-
var
|
|
627
|
+
var PrismaBetterSqlite3AdapterFactory = class {
|
|
635
628
|
provider = "sqlite";
|
|
636
629
|
adapterName = name;
|
|
637
630
|
#config;
|
|
@@ -641,12 +634,12 @@ var PrismaBetterSQLite3AdapterFactory = class {
|
|
|
641
634
|
this.#options = options;
|
|
642
635
|
}
|
|
643
636
|
connect() {
|
|
644
|
-
return Promise.resolve(new
|
|
637
|
+
return Promise.resolve(new PrismaBetterSqlite3Adapter(createBetterSQLite3Client(this.#config), this.#options));
|
|
645
638
|
}
|
|
646
639
|
connectToShadowDb() {
|
|
647
640
|
const url = this.#options?.shadowDatabaseUrl ?? ":memory:";
|
|
648
641
|
return Promise.resolve(
|
|
649
|
-
new
|
|
642
|
+
new PrismaBetterSqlite3Adapter(createBetterSQLite3Client({ ...this.#config, url }), this.#options)
|
|
650
643
|
);
|
|
651
644
|
}
|
|
652
645
|
};
|
|
@@ -659,5 +652,5 @@ function createBetterSQLite3Client(input) {
|
|
|
659
652
|
}
|
|
660
653
|
// Annotate the CommonJS export names for ESM import in node:
|
|
661
654
|
0 && (module.exports = {
|
|
662
|
-
|
|
655
|
+
PrismaBetterSqlite3
|
|
663
656
|
});
|
package/dist/index.mjs
CHANGED
|
@@ -333,10 +333,6 @@ function mapRow(row, columnTypes) {
|
|
|
333
333
|
const result = [];
|
|
334
334
|
for (let i = 0; i < row.length; i++) {
|
|
335
335
|
const value = row[i];
|
|
336
|
-
if (value instanceof ArrayBuffer || value instanceof Buffer) {
|
|
337
|
-
result[i] = Array.from(new Uint8Array(value));
|
|
338
|
-
continue;
|
|
339
|
-
}
|
|
340
336
|
if (typeof value === "number" && (columnTypes[i] === ColumnTypeEnum.Int32 || columnTypes[i] === ColumnTypeEnum.Int64) && !Number.isInteger(value)) {
|
|
341
337
|
result[i] = Math.trunc(value);
|
|
342
338
|
continue;
|
|
@@ -389,9 +385,6 @@ function mapArg(arg, argType, options) {
|
|
|
389
385
|
if (typeof arg === "string" && argType.scalarType === "bytes") {
|
|
390
386
|
return Buffer.from(arg, "base64");
|
|
391
387
|
}
|
|
392
|
-
if (Array.isArray(arg) && argType.scalarType === "bytes") {
|
|
393
|
-
return Buffer.from(arg);
|
|
394
|
-
}
|
|
395
388
|
return arg;
|
|
396
389
|
}
|
|
397
390
|
|
|
@@ -557,7 +550,7 @@ var BetterSQLite3Transaction = class extends BetterSQLite3Queryable {
|
|
|
557
550
|
return Promise.resolve();
|
|
558
551
|
}
|
|
559
552
|
};
|
|
560
|
-
var
|
|
553
|
+
var PrismaBetterSqlite3Adapter = class extends BetterSQLite3Queryable {
|
|
561
554
|
#mutex = new Mutex();
|
|
562
555
|
constructor(client, adapterOptions) {
|
|
563
556
|
super(client, adapterOptions);
|
|
@@ -595,7 +588,7 @@ var PrismaBetterSQLite3Adapter = class extends BetterSQLite3Queryable {
|
|
|
595
588
|
return Promise.resolve();
|
|
596
589
|
}
|
|
597
590
|
};
|
|
598
|
-
var
|
|
591
|
+
var PrismaBetterSqlite3AdapterFactory = class {
|
|
599
592
|
provider = "sqlite";
|
|
600
593
|
adapterName = name;
|
|
601
594
|
#config;
|
|
@@ -605,12 +598,12 @@ var PrismaBetterSQLite3AdapterFactory = class {
|
|
|
605
598
|
this.#options = options;
|
|
606
599
|
}
|
|
607
600
|
connect() {
|
|
608
|
-
return Promise.resolve(new
|
|
601
|
+
return Promise.resolve(new PrismaBetterSqlite3Adapter(createBetterSQLite3Client(this.#config), this.#options));
|
|
609
602
|
}
|
|
610
603
|
connectToShadowDb() {
|
|
611
604
|
const url = this.#options?.shadowDatabaseUrl ?? ":memory:";
|
|
612
605
|
return Promise.resolve(
|
|
613
|
-
new
|
|
606
|
+
new PrismaBetterSqlite3Adapter(createBetterSQLite3Client({ ...this.#config, url }), this.#options)
|
|
614
607
|
);
|
|
615
608
|
}
|
|
616
609
|
};
|
|
@@ -622,5 +615,5 @@ function createBetterSQLite3Client(input) {
|
|
|
622
615
|
return db;
|
|
623
616
|
}
|
|
624
617
|
export {
|
|
625
|
-
|
|
618
|
+
PrismaBetterSqlite3AdapterFactory as PrismaBetterSqlite3
|
|
626
619
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@prisma/adapter-better-sqlite3",
|
|
3
|
-
"version": "7.3.0-integration-
|
|
3
|
+
"version": "7.3.0-integration-engines-7-3-0-10-fix-fix-mapped-enum-issue-0b7e6564db7dc3dac7f9312aa84e9ed81d805521.1",
|
|
4
4
|
"description": "Prisma's driver adapter for better-sqlite3, a fast SQLite3 driver for JavaScript runtimes",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.mjs",
|
|
@@ -31,8 +31,8 @@
|
|
|
31
31
|
"license": "Apache-2.0",
|
|
32
32
|
"sideEffects": false,
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"better-sqlite3": "^
|
|
35
|
-
"@prisma/driver-adapter-utils": "7.3.0-integration-
|
|
34
|
+
"better-sqlite3": "^12.4.5",
|
|
35
|
+
"@prisma/driver-adapter-utils": "7.3.0-integration-engines-7-3-0-10-fix-fix-mapped-enum-issue-0b7e6564db7dc3dac7f9312aa84e9ed81d805521.1"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
38
|
"@types/better-sqlite3": "7.6.12",
|