wcz-test 6.12.1 → 6.12.2
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/client.d.ts +0 -6
- package/dist/client.js +1 -5
- package/dist/client.js.map +1 -1
- package/dist/hooks.d.ts +0 -3
- package/dist/hooks.js +0 -2
- package/dist/hooks.js.map +1 -1
- package/dist/server.d.ts +0 -2
- package/dist/server.js +3 -5
- package/dist/server.js.map +1 -1
- package/package.json +1 -1
package/dist/server.d.ts
CHANGED
package/dist/server.js
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import pg, { Pool as Pool$1 } from "pg";
|
|
2
|
-
import { Pool } from "pg";
|
|
3
2
|
import { s as serverEnv } from "./env-CoxTjaDr.js";
|
|
4
3
|
import { betterAuth } from "better-auth";
|
|
5
4
|
import { B as BetterAuthError, l as logger, T as TTY_COLORS, g as getColorDepth } from "./error-BhAKg8LX-X0sdNXNa.js";
|
|
@@ -6313,7 +6312,7 @@ class PgTransaction extends PgDatabase {
|
|
|
6313
6312
|
return this.session.execute(sql`set transaction ${this.getTransactionConfigSQL(config)}`);
|
|
6314
6313
|
}
|
|
6315
6314
|
}
|
|
6316
|
-
const { Pool
|
|
6315
|
+
const { Pool, types } = pg;
|
|
6317
6316
|
class NodePgPreparedQuery extends PgPreparedQuery {
|
|
6318
6317
|
constructor(client, queryString, params, logger2, cache, queryMetadata, cacheConfig, fields, name, _isResponseInArrayMode, customResultMapper) {
|
|
6319
6318
|
super({ sql: queryString, params }, cache, queryMetadata, cacheConfig);
|
|
@@ -6484,7 +6483,7 @@ class NodePgSession extends PgSession {
|
|
|
6484
6483
|
);
|
|
6485
6484
|
}
|
|
6486
6485
|
async transaction(transaction, config) {
|
|
6487
|
-
const session2 = this.client instanceof
|
|
6486
|
+
const session2 = this.client instanceof Pool ? new NodePgSession(await this.client.connect(), this.dialect, this.schema, this.options) : this;
|
|
6488
6487
|
const tx = new NodePgTransaction(this.dialect, session2, this.schema);
|
|
6489
6488
|
await tx.execute(sql`begin${config ? sql` ${tx.getTransactionConfigSQL(config)}` : void 0}`);
|
|
6490
6489
|
try {
|
|
@@ -6495,7 +6494,7 @@ class NodePgSession extends PgSession {
|
|
|
6495
6494
|
await tx.execute(sql`rollback`);
|
|
6496
6495
|
throw error;
|
|
6497
6496
|
} finally {
|
|
6498
|
-
if (this.client instanceof
|
|
6497
|
+
if (this.client instanceof Pool) {
|
|
6499
6498
|
session2.client.release();
|
|
6500
6499
|
}
|
|
6501
6500
|
}
|
|
@@ -8729,7 +8728,6 @@ const auth = betterAuth({
|
|
|
8729
8728
|
plugins: [tanstackStartCookies()]
|
|
8730
8729
|
});
|
|
8731
8730
|
export {
|
|
8732
|
-
Pool,
|
|
8733
8731
|
auth,
|
|
8734
8732
|
db
|
|
8735
8733
|
};
|