@hienlh/ppm 0.12.5 → 0.12.6

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/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.12.6] - 2026-04-20
4
+
5
+ ### Fixed
6
+ - **CLI db commands hang (postgres)**: Close postgres connection pool after CLI operations — cached pool's 5min idle timer was keeping the process alive
7
+ - **CLI db commands hang (sqlite)**: Same issue — close sqlite cached connections after CLI operations
8
+
3
9
  ## [0.12.5] - 2026-04-20
4
10
 
5
11
  ### Fixed
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hienlh/ppm",
3
- "version": "0.12.5",
3
+ "version": "0.12.6",
4
4
  "description": "Personal Project Manager — mobile-first web IDE with AI assistance",
5
5
  "author": "hienlh",
6
6
  "license": "MIT",
@@ -181,6 +181,7 @@ export function registerDbCommands(program: Command): void {
181
181
  // Try opening the file
182
182
  const { sqliteService } = await import("../../services/sqlite.service.ts");
183
183
  sqliteService.getTables(cfg.path!, cfg.path!);
184
+ sqliteService.closeAll();
184
185
  console.log(`${C.green}✓${C.reset} SQLite file accessible: ${conn.name}`);
185
186
  } else {
186
187
  console.error(`${C.red}✗${C.reset} File not found: ${cfg.path}`);
@@ -221,6 +222,7 @@ export function registerDbCommands(program: Command): void {
221
222
  } else {
222
223
  const { sqliteService } = await import("../../services/sqlite.service.ts");
223
224
  const tables = sqliteService.getTables(cfg.path!, cfg.path!);
225
+ sqliteService.closeAll();
224
226
  if (tables.length === 0) {
225
227
  console.log(`${C.dim}No tables found.${C.reset}`);
226
228
  return;
@@ -261,6 +263,7 @@ export function registerDbCommands(program: Command): void {
261
263
  } else {
262
264
  const { sqliteService } = await import("../../services/sqlite.service.ts");
263
265
  const cols = sqliteService.getTableSchema(cfg.path!, cfg.path!, table);
266
+ sqliteService.closeAll();
264
267
  printTable(
265
268
  ["Column", "Type", "Not Null", "PK", "Default"],
266
269
  cols.map((c) => [c.name, c.type, c.notnull ? "YES" : "NO", c.pk ? "PK" : "", c.dflt_value ?? ""]),
@@ -306,6 +309,7 @@ export function registerDbCommands(program: Command): void {
306
309
  const result = sqliteService.getTableData(
307
310
  cfg.path!, cfg.path!, table, page, limit, options.order, orderDir,
308
311
  );
312
+ sqliteService.closeAll();
309
313
  console.log(`${C.cyan}${table}${C.reset} — page ${result.page}, ${result.total} total rows\n`);
310
314
  formatRows(result.columns, result.rows, limit);
311
315
  }
@@ -347,6 +351,7 @@ export function registerDbCommands(program: Command): void {
347
351
  } else {
348
352
  const { sqliteService } = await import("../../services/sqlite.service.ts");
349
353
  const result = sqliteService.executeQuery(cfg.path!, cfg.path!, sql);
354
+ sqliteService.closeAll();
350
355
  if (result.changeType === "select") {
351
356
  formatRows(result.columns, result.rows);
352
357
  } else {