terminal-pilot 0.0.21 → 0.0.22
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/dist/cli.js +467 -193
- package/dist/cli.js.map +4 -4
- package/dist/commands/close-session.js +6 -4
- package/dist/commands/close-session.js.map +3 -3
- package/dist/commands/create-session.js +6 -4
- package/dist/commands/create-session.js.map +3 -3
- package/dist/commands/fill.js +6 -4
- package/dist/commands/fill.js.map +3 -3
- package/dist/commands/get-session.js +6 -4
- package/dist/commands/get-session.js.map +3 -3
- package/dist/commands/index.js +79 -33
- package/dist/commands/index.js.map +4 -4
- package/dist/commands/install.js +64 -20
- package/dist/commands/install.js.map +4 -4
- package/dist/commands/installer.js +36 -2
- package/dist/commands/installer.js.map +4 -4
- package/dist/commands/list-sessions.js +6 -4
- package/dist/commands/list-sessions.js.map +3 -3
- package/dist/commands/press-key.js +6 -4
- package/dist/commands/press-key.js.map +3 -3
- package/dist/commands/read-history.js +6 -4
- package/dist/commands/read-history.js.map +3 -3
- package/dist/commands/read-screen.js +6 -4
- package/dist/commands/read-screen.js.map +3 -3
- package/dist/commands/resize.js +6 -4
- package/dist/commands/resize.js.map +3 -3
- package/dist/commands/runtime.js +6 -4
- package/dist/commands/runtime.js.map +3 -3
- package/dist/commands/screenshot.js +17 -8
- package/dist/commands/screenshot.js.map +3 -3
- package/dist/commands/send-signal.js +6 -4
- package/dist/commands/send-signal.js.map +3 -3
- package/dist/commands/type.js +6 -4
- package/dist/commands/type.js.map +3 -3
- package/dist/commands/uninstall.js +39 -5
- package/dist/commands/uninstall.js.map +4 -4
- package/dist/commands/wait-for-exit.js +6 -4
- package/dist/commands/wait-for-exit.js.map +3 -3
- package/dist/commands/wait-for.js +6 -4
- package/dist/commands/wait-for.js.map +3 -3
- package/dist/errors.d.ts +1 -0
- package/dist/errors.js +8 -0
- package/dist/errors.js.map +7 -0
- package/dist/index.js +8 -4
- package/dist/index.js.map +3 -3
- package/dist/terminal-pilot.js +6 -4
- package/dist/terminal-pilot.js.map +3 -3
- package/dist/terminal-session.js +6 -4
- package/dist/terminal-session.js.map +3 -3
- package/dist/testing/cli-repl.js +467 -193
- package/dist/testing/cli-repl.js.map +4 -4
- package/dist/testing/qa-cli.js +467 -193
- package/dist/testing/qa-cli.js.map +4 -4
- package/node_modules/@poe-code/agent-skill-config/dist/apply.js +4 -1
- package/node_modules/@poe-code/agent-skill-config/dist/bridge-active-skills.js +1 -1
- package/node_modules/@poe-code/agent-skill-config/dist/git-exclude.js +17 -9
- package/node_modules/@poe-code/agent-skill-config/dist/templates.js +4 -1
- package/package.json +1 -1
|
@@ -1353,20 +1353,27 @@ async function renderTerminalPng(ansiText, options = {}) {
|
|
|
1353
1353
|
const png = renderPng(svg);
|
|
1354
1354
|
if (options.output) {
|
|
1355
1355
|
const temporaryPath = `${options.output}.${randomUUID()}.tmp`;
|
|
1356
|
+
let temporaryCreated = false;
|
|
1356
1357
|
try {
|
|
1357
1358
|
await writeFile(temporaryPath, png, { flag: "wx" });
|
|
1359
|
+
temporaryCreated = true;
|
|
1358
1360
|
await rename(temporaryPath, options.output);
|
|
1359
1361
|
} catch (error) {
|
|
1360
|
-
|
|
1361
|
-
|
|
1362
|
-
|
|
1363
|
-
|
|
1362
|
+
if (temporaryCreated || !isAlreadyExistsError(error)) {
|
|
1363
|
+
try {
|
|
1364
|
+
await rm(temporaryPath, { force: true });
|
|
1365
|
+
} catch (cleanupError) {
|
|
1366
|
+
void cleanupError;
|
|
1367
|
+
}
|
|
1364
1368
|
}
|
|
1365
1369
|
throw error;
|
|
1366
1370
|
}
|
|
1367
1371
|
}
|
|
1368
1372
|
return png;
|
|
1369
1373
|
}
|
|
1374
|
+
function isAlreadyExistsError(error) {
|
|
1375
|
+
return error instanceof Error && Object.prototype.hasOwnProperty.call(error, "code") && error.code === "EEXIST";
|
|
1376
|
+
}
|
|
1370
1377
|
|
|
1371
1378
|
// src/terminal-pilot.ts
|
|
1372
1379
|
import { randomUUID as randomUUID2 } from "node:crypto";
|
|
@@ -1451,6 +1458,11 @@ function consumeTerminatedString(input, index, allowBellTerminator) {
|
|
|
1451
1458
|
return input.length;
|
|
1452
1459
|
}
|
|
1453
1460
|
|
|
1461
|
+
// src/errors.ts
|
|
1462
|
+
function hasOwnErrorCode(error, code) {
|
|
1463
|
+
return error instanceof Error && Object.prototype.hasOwnProperty.call(error, "code") && error.code === code;
|
|
1464
|
+
}
|
|
1465
|
+
|
|
1454
1466
|
// src/terminal-buffer.ts
|
|
1455
1467
|
var RESET_SGR = "\x1B[0m";
|
|
1456
1468
|
var DEC_SPECIAL_GRAPHICS = {
|
|
@@ -2550,10 +2562,7 @@ function ensureSpawnHelperExecutable() {
|
|
|
2550
2562
|
}
|
|
2551
2563
|
}
|
|
2552
2564
|
function isMissingFileError(error) {
|
|
2553
|
-
|
|
2554
|
-
return false;
|
|
2555
|
-
}
|
|
2556
|
-
return "code" in error && error.code === "ENOENT";
|
|
2565
|
+
return hasOwnErrorCode(error, "ENOENT");
|
|
2557
2566
|
}
|
|
2558
2567
|
function matchPattern(buffer, pattern) {
|
|
2559
2568
|
const clean = normalizeHistoryBuffer(stripAnsi(buffer));
|