@prisma/adapter-neon 6.15.0-dev.4 → 6.15.0-dev.6
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 +2 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +10 -1
- package/dist/index.mjs +10 -1
- package/package.json +2 -2
package/dist/index.d.mts
CHANGED
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -606,6 +606,10 @@ var PrismaNeonAdapter = class extends NeonWsQueryable {
|
|
|
606
606
|
const tag = "[js::startTransaction]";
|
|
607
607
|
debug("%s options: %O", tag, options);
|
|
608
608
|
const conn = await this.client.connect().catch((error) => this.onError(error));
|
|
609
|
+
conn.on("error", (err) => {
|
|
610
|
+
debug(`Error from pool connection: ${err.message} %O`, err);
|
|
611
|
+
this.options?.onConnectionError?.(err);
|
|
612
|
+
});
|
|
609
613
|
try {
|
|
610
614
|
const tx = new NeonTransaction(conn, options);
|
|
611
615
|
await tx.executeRaw({ sql: "BEGIN", args: [], argTypes: [] });
|
|
@@ -646,7 +650,12 @@ var PrismaNeonAdapterFactory = class {
|
|
|
646
650
|
provider = "postgres";
|
|
647
651
|
adapterName = name;
|
|
648
652
|
async connect() {
|
|
649
|
-
|
|
653
|
+
const pool = new neon.Pool(this.config);
|
|
654
|
+
pool.on("error", (err) => {
|
|
655
|
+
debug(`Error from pool client: ${err.message} %O`, err);
|
|
656
|
+
this.options?.onPoolError?.(err);
|
|
657
|
+
});
|
|
658
|
+
return new PrismaNeonAdapter(pool, this.options);
|
|
650
659
|
}
|
|
651
660
|
};
|
|
652
661
|
var PrismaNeonHTTPAdapter = class extends NeonQueryable {
|
package/dist/index.mjs
CHANGED
|
@@ -569,6 +569,10 @@ var PrismaNeonAdapter = class extends NeonWsQueryable {
|
|
|
569
569
|
const tag = "[js::startTransaction]";
|
|
570
570
|
debug("%s options: %O", tag, options);
|
|
571
571
|
const conn = await this.client.connect().catch((error) => this.onError(error));
|
|
572
|
+
conn.on("error", (err) => {
|
|
573
|
+
debug(`Error from pool connection: ${err.message} %O`, err);
|
|
574
|
+
this.options?.onConnectionError?.(err);
|
|
575
|
+
});
|
|
572
576
|
try {
|
|
573
577
|
const tx = new NeonTransaction(conn, options);
|
|
574
578
|
await tx.executeRaw({ sql: "BEGIN", args: [], argTypes: [] });
|
|
@@ -609,7 +613,12 @@ var PrismaNeonAdapterFactory = class {
|
|
|
609
613
|
provider = "postgres";
|
|
610
614
|
adapterName = name;
|
|
611
615
|
async connect() {
|
|
612
|
-
|
|
616
|
+
const pool = new neon.Pool(this.config);
|
|
617
|
+
pool.on("error", (err) => {
|
|
618
|
+
debug(`Error from pool client: ${err.message} %O`, err);
|
|
619
|
+
this.options?.onPoolError?.(err);
|
|
620
|
+
});
|
|
621
|
+
return new PrismaNeonAdapter(pool, this.options);
|
|
613
622
|
}
|
|
614
623
|
};
|
|
615
624
|
var PrismaNeonHTTPAdapter = class extends NeonQueryable {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@prisma/adapter-neon",
|
|
3
|
-
"version": "6.15.0-dev.
|
|
3
|
+
"version": "6.15.0-dev.6",
|
|
4
4
|
"description": "Prisma's driver adapter for \"@neondatabase/serverless\"",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.mjs",
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
"dependencies": {
|
|
34
34
|
"postgres-array": "3.0.4",
|
|
35
35
|
"@neondatabase/serverless": ">0.6.0 <2",
|
|
36
|
-
"@prisma/driver-adapter-utils": "6.15.0-dev.
|
|
36
|
+
"@prisma/driver-adapter-utils": "6.15.0-dev.6"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
39
|
"@swc/core": "1.11.5",
|