@niledatabase/server 3.0.0-alpha.53 → 3.0.0-alpha.55

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 CHANGED
@@ -312,6 +312,7 @@ declare class Server {
312
312
  get token(): string | undefined | null;
313
313
  set token(token: string | undefined | null);
314
314
  get db(): pg.Pool;
315
+ clearConnections(): void;
315
316
  /**
316
317
  * A convenience function that applies a config and ensures whatever was passed is set properly
317
318
  */
package/dist/index.d.ts CHANGED
@@ -312,6 +312,7 @@ declare class Server {
312
312
  get token(): string | undefined | null;
313
313
  set token(token: string | undefined | null);
314
314
  get db(): pg.Pool;
315
+ clearConnections(): void;
315
316
  /**
316
317
  * A convenience function that applies a config and ensures whatever was passed is set properly
317
318
  */
package/dist/index.js CHANGED
@@ -867,6 +867,9 @@ var DBManager = class {
867
867
  const { info } = Logger(config, "[DBManager]");
868
868
  info(`Clearing all connections ${this.connections.size}`);
869
869
  this.cleared = true;
870
+ this.connections.forEach((connection) => {
871
+ connection.shutdown();
872
+ });
870
873
  this.connections.clear();
871
874
  };
872
875
  };
@@ -2345,6 +2348,9 @@ var Server = class {
2345
2348
  get db() {
2346
2349
  return this.manager.getConnection(this.config);
2347
2350
  }
2351
+ clearConnections() {
2352
+ this.manager.clear(this.config);
2353
+ }
2348
2354
  /**
2349
2355
  * A convenience function that applies a config and ensures whatever was passed is set properly
2350
2356
  */