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