@staff0rd/assist 0.415.1 → 0.416.0
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/commands/sessions/web/bundle.js +353 -353
- package/dist/index.js +2 -27
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -6,7 +6,7 @@ import { Command } from "commander";
|
|
|
6
6
|
// package.json
|
|
7
7
|
var package_default = {
|
|
8
8
|
name: "@staff0rd/assist",
|
|
9
|
-
version: "0.
|
|
9
|
+
version: "0.416.0",
|
|
10
10
|
type: "module",
|
|
11
11
|
main: "dist/index.js",
|
|
12
12
|
bin: {
|
|
@@ -24833,7 +24833,6 @@ function toSessionInfo({
|
|
|
24833
24833
|
cwd,
|
|
24834
24834
|
restored,
|
|
24835
24835
|
error,
|
|
24836
|
-
errorOutput,
|
|
24837
24836
|
activity: activity2,
|
|
24838
24837
|
autoRun,
|
|
24839
24838
|
autoAdvance,
|
|
@@ -24861,7 +24860,6 @@ function toSessionInfo({
|
|
|
24861
24860
|
cwd,
|
|
24862
24861
|
restored,
|
|
24863
24862
|
error,
|
|
24864
|
-
errorOutput,
|
|
24865
24863
|
activity: activity2,
|
|
24866
24864
|
autoRun,
|
|
24867
24865
|
autoAdvance,
|
|
@@ -25520,26 +25518,6 @@ function makeStatusChangeHandler(dismiss, notify2, reuseForRun) {
|
|
|
25520
25518
|
return (s, status3, exitCode) => applyStatusChange(s, status3, exitCode, dismiss, notify2, reuseForRun);
|
|
25521
25519
|
}
|
|
25522
25520
|
|
|
25523
|
-
// src/commands/sessions/daemon/errorTail.ts
|
|
25524
|
-
var ESC3 = String.fromCharCode(27);
|
|
25525
|
-
var CSI = String.fromCharCode(155);
|
|
25526
|
-
var BEL = String.fromCharCode(7);
|
|
25527
|
-
var ANSI = new RegExp(
|
|
25528
|
-
String.raw`[${ESC3}${CSI}][[\]()#;?]*(?:(?:[a-zA-Z\d]*(?:;[a-zA-Z\d]*)*)?${BEL}|(?:\d{1,4}(?:;\d{0,4})*)?[\dA-PR-TZcf-ntqry=><~])`,
|
|
25529
|
-
"g"
|
|
25530
|
-
);
|
|
25531
|
-
var MAX_TAIL_LINES = 40;
|
|
25532
|
-
var MAX_TAIL_CHARS = 4e3;
|
|
25533
|
-
function stripAnsi(text17) {
|
|
25534
|
-
return text17.replace(ANSI, "");
|
|
25535
|
-
}
|
|
25536
|
-
function errorTail(scrollback) {
|
|
25537
|
-
const clean = stripAnsi(scrollback).replace(/\r\n?/g, "\n").replace(/[ \t]+\n/g, "\n").trimEnd();
|
|
25538
|
-
if (clean.length === 0) return "";
|
|
25539
|
-
const tail = clean.split("\n").slice(-MAX_TAIL_LINES).join("\n");
|
|
25540
|
-
return tail.length > MAX_TAIL_CHARS ? tail.slice(-MAX_TAIL_CHARS) : tail;
|
|
25541
|
-
}
|
|
25542
|
-
|
|
25543
25521
|
// src/commands/sessions/daemon/handleFailedResume.ts
|
|
25544
25522
|
function handleFailedResume(session, exitCode, onStatusChange) {
|
|
25545
25523
|
const failed2 = session.restored === true && exitCode !== 0 && session.scrollback.length === 0;
|
|
@@ -25673,12 +25651,9 @@ function handlePtyExit(session, exitCode, onStatusChange) {
|
|
|
25673
25651
|
if (handleFailedResume(session, exitCode, onStatusChange)) return;
|
|
25674
25652
|
const priorStatus = session.status;
|
|
25675
25653
|
if (exitCode !== 0) {
|
|
25676
|
-
const tail = errorTail(session.scrollback);
|
|
25677
25654
|
session.error = `process exited with code ${exitCode}`;
|
|
25678
|
-
session.errorOutput = tail || void 0;
|
|
25679
25655
|
daemonLog(
|
|
25680
|
-
`session ${session.id} ("${session.name}") pty exited with code ${exitCode} from status "${priorStatus}" \u2014 unexpected exit, marking error
|
|
25681
|
-
${tail || "(no output captured)"}`
|
|
25656
|
+
`session ${session.id} ("${session.name}") pty exited with code ${exitCode} from status "${priorStatus}" \u2014 unexpected exit, marking error`
|
|
25682
25657
|
);
|
|
25683
25658
|
onStatusChange(session, "error", exitCode);
|
|
25684
25659
|
return;
|