@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 +1 -1
- package/src/tcb.js +4 -2
- package/src/version.js +1 -1
package/package.json
CHANGED
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
|
-
|
|
71
|
-
|
|
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