@elench/testkit 0.1.123 → 0.1.124
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/lib/config-api/database-steps.mjs +26 -3
- package/node_modules/@elench/next-analysis/package.json +1 -1
- package/node_modules/@elench/testkit-bridge/package.json +2 -2
- package/node_modules/@elench/testkit-protocol/package.json +1 -1
- package/node_modules/@elench/ts-analysis/package.json +1 -1
- package/package.json +5 -5
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { spawn } from "node:child_process";
|
|
2
2
|
|
|
3
3
|
export async function verifySeed(context = {}) {
|
|
4
4
|
const args = context.args || {};
|
|
@@ -150,7 +150,7 @@ async function runScalar(databaseUrl, query, context) {
|
|
|
150
150
|
}
|
|
151
151
|
|
|
152
152
|
async function runPsql(databaseUrl, query, context) {
|
|
153
|
-
const result = await
|
|
153
|
+
const result = await runProcess(
|
|
154
154
|
"psql",
|
|
155
155
|
[
|
|
156
156
|
databaseUrl,
|
|
@@ -172,11 +172,34 @@ async function runPsql(databaseUrl, query, context) {
|
|
|
172
172
|
}
|
|
173
173
|
);
|
|
174
174
|
if (result.exitCode !== 0) {
|
|
175
|
-
throw new Error(result.stderr ||
|
|
175
|
+
throw new Error(result.stderr || `psql failed with exit code ${result.exitCode}`);
|
|
176
176
|
}
|
|
177
177
|
return result;
|
|
178
178
|
}
|
|
179
179
|
|
|
180
|
+
function runProcess(command, args, options) {
|
|
181
|
+
return new Promise((resolve, reject) => {
|
|
182
|
+
const child = spawn(command, args, {
|
|
183
|
+
cwd: options.cwd,
|
|
184
|
+
env: options.env,
|
|
185
|
+
stdio: ["ignore", "pipe", "pipe"],
|
|
186
|
+
});
|
|
187
|
+
const stdout = [];
|
|
188
|
+
const stderr = [];
|
|
189
|
+
|
|
190
|
+
child.stdout.on("data", (chunk) => stdout.push(Buffer.from(chunk)));
|
|
191
|
+
child.stderr.on("data", (chunk) => stderr.push(Buffer.from(chunk)));
|
|
192
|
+
child.on("error", reject);
|
|
193
|
+
child.on("close", (exitCode) => {
|
|
194
|
+
resolve({
|
|
195
|
+
exitCode: exitCode ?? 1,
|
|
196
|
+
stderr: Buffer.concat(stderr).toString("utf8"),
|
|
197
|
+
stdout: Buffer.concat(stdout).toString("utf8"),
|
|
198
|
+
});
|
|
199
|
+
});
|
|
200
|
+
});
|
|
201
|
+
}
|
|
202
|
+
|
|
180
203
|
function normalizeStatementList(value, label) {
|
|
181
204
|
const values = Array.isArray(value) ? value : value == null ? [] : [value];
|
|
182
205
|
if (values.length === 0) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elench/testkit-bridge",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.124",
|
|
4
4
|
"description": "Browser bridge helpers for testkit",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
"typecheck": "tsc -p tsconfig.json --noEmit"
|
|
23
23
|
},
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"@elench/testkit-protocol": "0.1.
|
|
25
|
+
"@elench/testkit-protocol": "0.1.124"
|
|
26
26
|
},
|
|
27
27
|
"private": false
|
|
28
28
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elench/testkit",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.124",
|
|
4
4
|
"description": "Assistant-first CLI for running, inspecting, and debugging local testkit suites",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"workspaces": [
|
|
@@ -95,10 +95,10 @@
|
|
|
95
95
|
},
|
|
96
96
|
"dependencies": {
|
|
97
97
|
"@babel/code-frame": "^7.29.0",
|
|
98
|
-
"@elench/next-analysis": "0.1.
|
|
99
|
-
"@elench/testkit-bridge": "0.1.
|
|
100
|
-
"@elench/testkit-protocol": "0.1.
|
|
101
|
-
"@elench/ts-analysis": "0.1.
|
|
98
|
+
"@elench/next-analysis": "0.1.124",
|
|
99
|
+
"@elench/testkit-bridge": "0.1.124",
|
|
100
|
+
"@elench/testkit-protocol": "0.1.124",
|
|
101
|
+
"@elench/ts-analysis": "0.1.124",
|
|
102
102
|
"@oclif/core": "^4.10.6",
|
|
103
103
|
"@playwright/test": "^1.52.0",
|
|
104
104
|
"esbuild": "^0.25.11",
|