@levr-one/cli 0.10.8 → 0.10.9
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
CHANGED
|
@@ -616,14 +616,14 @@ Examples:
|
|
|
616
616
|
}
|
|
617
617
|
},
|
|
618
618
|
loader: async () => {
|
|
619
|
-
const { gatesRunHandler } = await import("./runHandler-
|
|
619
|
+
const { gatesRunHandler } = await import("./runHandler-D3tX1Com.js");
|
|
620
620
|
return gatesRunHandler;
|
|
621
621
|
}
|
|
622
622
|
});
|
|
623
623
|
|
|
624
624
|
//#endregion
|
|
625
625
|
//#region package.json
|
|
626
|
-
var version = "0.10.
|
|
626
|
+
var version = "0.10.9";
|
|
627
627
|
|
|
628
628
|
//#endregion
|
|
629
629
|
//#region src/app.ts
|
|
@@ -5,6 +5,7 @@ import { resolveWorkspace } from "./resolve-workspace-Bn3j_U7W.js";
|
|
|
5
5
|
import "./token-refresh-Cu5RpkLJ.js";
|
|
6
6
|
import { resolveToken } from "./resolve-token-DbQsmn03.js";
|
|
7
7
|
import { existsSync } from "node:fs";
|
|
8
|
+
import { constants } from "node:os";
|
|
8
9
|
import { spawnSync } from "node:child_process";
|
|
9
10
|
|
|
10
11
|
//#region src/commands/gates/gate-runner.ts
|
|
@@ -98,8 +99,12 @@ function shellExists(shell) {
|
|
|
98
99
|
}
|
|
99
100
|
/**
|
|
100
101
|
* Run one command with the chosen shell (`chooseShell`), synchronously, in
|
|
101
|
-
* the current directory. A command killed
|
|
102
|
-
*
|
|
102
|
+
* the current directory. A command that was killed (a signal, our timeout,
|
|
103
|
+
* ENOBUFS) or never started reports 128 + the signal number, else 126, and
|
|
104
|
+
* says why at the END of stderr, where the reported tail keeps it — never 0
|
|
105
|
+
* and never 1. A 1 reads as "grep matched nothing" on the server, and Node
|
|
106
|
+
* can report ENOBUFS with a numeric status (ENG-5106 L1 review round 4
|
|
107
|
+
* F-010/F-011).
|
|
103
108
|
*/
|
|
104
109
|
const runInShell = (command) => {
|
|
105
110
|
const shell = chooseShell();
|
|
@@ -109,8 +114,10 @@ const runInShell = (command) => {
|
|
|
109
114
|
timeout: GATE_COMMAND_TIMEOUT_MS
|
|
110
115
|
});
|
|
111
116
|
const stderr = (r.stderr ?? "") + (r.error ? `\n[runner] ${r.error.message}` : "") + (r.signal ? `\n[runner] killed by ${r.signal}` : "");
|
|
117
|
+
const killed = r.error !== void 0 || r.signal !== null;
|
|
118
|
+
const signalNumber = r.signal ? constants.signals[r.signal] : void 0;
|
|
112
119
|
return {
|
|
113
|
-
exitCode: typeof
|
|
120
|
+
exitCode: killed ? typeof signalNumber === "number" ? 128 + signalNumber : 126 : r.status ?? 126,
|
|
114
121
|
stdout: r.stdout ?? "",
|
|
115
122
|
stderr
|
|
116
123
|
};
|