@cadenza.io/service 2.2.2 → 2.2.3

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.js CHANGED
@@ -2462,11 +2462,8 @@ var DatabaseController = class _DatabaseController {
2462
2462
  constructor() {
2463
2463
  this.databaseName = "";
2464
2464
  this.dbClient = new import_pg.Pool({
2465
- user: process.env.DATABASE_USER ?? "postgres",
2466
- host: process.env.DATABASE_ADDRESS ?? "localhost",
2467
- port: parseInt(process.env.DATABASE_PORT ?? "5432"),
2465
+ connectionString: process.env.DATABASE_ADDRESS ?? "",
2468
2466
  database: "postgres",
2469
- password: process.env.DATABASE_PASSWORD ?? "03gibnEF",
2470
2467
  ssl: {
2471
2468
  rejectUnauthorized: false
2472
2469
  // ← This bypasses the chain validation error
@@ -2489,20 +2486,15 @@ var DatabaseController = class _DatabaseController {
2489
2486
  );
2490
2487
  }
2491
2488
  console.log(`Creating database ${databaseName}`, {
2492
- user: process.env.DATABASE_USER ?? "postgres",
2493
- host: process.env.DATABASE_ADDRESS ?? "localhost",
2494
- port: parseInt(process.env.DATABASE_PORT ?? "5432"),
2489
+ connectionString: process.env.DATABASE_ADDRESS ?? "",
2495
2490
  database: "postgres",
2496
2491
  password: process.env.DATABASE_PASSWORD ?? "03gibnEF"
2497
2492
  });
2498
2493
  await this.dbClient.query(`CREATE DATABASE ${databaseName}`);
2499
2494
  console.log(`Database ${databaseName} created`);
2500
2495
  this.dbClient = new import_pg.Pool({
2501
- user: process.env.DATABASE_USER ?? "postgres",
2502
- host: process.env.DATABASE_ADDRESS ?? "localhost",
2503
- port: parseInt(process.env.DATABASE_PORT ?? "5432"),
2496
+ connectionString: process.env.DATABASE_ADDRESS ?? "",
2504
2497
  database: databaseName,
2505
- password: process.env.DATABASE_PASSWORD ?? "03gibnEF",
2506
2498
  ssl: {
2507
2499
  rejectUnauthorized: false
2508
2500
  // ← This bypasses the chain validation error