@blod-nm/1kuan-act-01-cli 0.2.0 → 0.2.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@blod-nm/1kuan-act-01-cli",
3
- "version": "0.2.0",
3
+ "version": "0.2.1",
4
4
  "type": "module",
5
5
  "description": "Internal operations CLI: invoke preset database functions via a gateway. Zero dependencies, MCP (stdio) support.",
6
6
  "license": "MIT",
package/src/tcb.js CHANGED
@@ -67,7 +67,9 @@ export async function execPgsql(config, apikey, sql) {
67
67
  return { ok: false, status: res.status, raw, message: `HTTP ${res.status}: ${detail}` }
68
68
  }
69
69
 
70
- const rows =
71
- raw && typeof raw === 'object' && Array.isArray(raw.rows) ? raw.rows : undefined
70
+ // exec-pgsql 现在回的是裸数组([{...}]);老形状 { rows: [...] } 也一并兼容
71
+ const rows = Array.isArray(raw)
72
+ ? raw
73
+ : (raw && typeof raw === 'object' && Array.isArray(raw.rows) ? raw.rows : undefined)
72
74
  return { ok: true, status: res.status, rows, raw }
73
75
  }
package/src/version.js CHANGED
@@ -3,4 +3,4 @@
3
3
  * (test/version.test.js 会断言两者一致,防止再漏升)。
4
4
  */
5
5
 
6
- export const VERSION = '0.2.0'
6
+ export const VERSION = '0.2.1'