@staff0rd/assist 0.224.0 → 0.224.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.
Files changed (2) hide show
  1. package/dist/index.js +15 -2
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -6,7 +6,7 @@ import { Command } from "commander";
6
6
  // package.json
7
7
  var package_default = {
8
8
  name: "@staff0rd/assist",
9
- version: "0.224.0",
9
+ version: "0.224.1",
10
10
  type: "module",
11
11
  main: "dist/index.js",
12
12
  bin: {
@@ -909,11 +909,13 @@ function getDatabaseUrl() {
909
909
  }
910
910
  var _db;
911
911
  var _connecting;
912
+ var _pool;
912
913
  function getBacklogDb() {
913
914
  if (_db) return Promise.resolve(_db);
914
915
  if (_connecting) return _connecting;
915
916
  _connecting = (async () => {
916
917
  const pool = new Pool({ connectionString: getDatabaseUrl() });
918
+ _pool = pool;
917
919
  const db = makeBacklogDb(
918
920
  { query: (sql2, params) => pool.query(sql2, params) },
919
921
  pool
@@ -924,6 +926,14 @@ function getBacklogDb() {
924
926
  })();
925
927
  return _connecting;
926
928
  }
929
+ async function closeBacklogDb() {
930
+ const pool = _pool;
931
+ if (!pool) return;
932
+ _pool = void 0;
933
+ _db = void 0;
934
+ _connecting = void 0;
935
+ await pool.end();
936
+ }
927
937
 
928
938
  // src/commands/backlog/getCurrentOrigin.ts
929
939
  import { execSync as execSync2 } from "child_process";
@@ -16440,4 +16450,7 @@ program.command("draft").alias("feat").description("Launch Claude in /draft mode
16440
16450
  program.command("bug").description("Launch Claude in /bug mode, chain into next on /next signal").action(() => launchMode("bug"));
16441
16451
  program.command("refine").argument("[id]", "Backlog item ID").description("Launch Claude in /refine mode to refine a backlog item").action((id) => refine(id));
16442
16452
  registerSignal(program);
16443
- program.parse();
16453
+ program.parseAsync().catch((error) => {
16454
+ console.error(error);
16455
+ process.exitCode = 1;
16456
+ }).finally(() => closeBacklogDb());
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@staff0rd/assist",
3
- "version": "0.224.0",
3
+ "version": "0.224.1",
4
4
  "type": "module",
5
5
  "main": "dist/index.js",
6
6
  "bin": {