@tangle-network/sdk-cli-runner 0.3.7 → 0.3.8
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/index.mjs +6 -5
- package/package.json +3 -3
package/dist/index.mjs
CHANGED
|
@@ -778,13 +778,15 @@ function readProcessIdentity(pid) {
|
|
|
778
778
|
const stat = readFileSync(`/proc/${pid}/stat`, "utf8");
|
|
779
779
|
const fields = stat.slice(stat.lastIndexOf(")") + 2).trim().split(/\s+/);
|
|
780
780
|
const group = Number(fields[2]);
|
|
781
|
-
|
|
781
|
+
const state = fields[0];
|
|
782
|
+
const start = fields[19];
|
|
783
|
+
if (!Number.isSafeInteger(group) || !start || !state) throw new Error(`Cannot read process identity for ${pid}`);
|
|
782
784
|
return {
|
|
783
785
|
pid,
|
|
784
786
|
parent: Number(fields[1]),
|
|
785
787
|
group,
|
|
786
|
-
start
|
|
787
|
-
state
|
|
788
|
+
start,
|
|
789
|
+
state
|
|
788
790
|
};
|
|
789
791
|
} catch (error) {
|
|
790
792
|
if (["ENOENT", "ESRCH"].includes(error.code ?? "")) return void 0;
|
|
@@ -807,8 +809,7 @@ var OwnedProcessTree = class {
|
|
|
807
809
|
capture() {
|
|
808
810
|
const queue = [...this.processes.values()];
|
|
809
811
|
const seen = /* @__PURE__ */ new Set();
|
|
810
|
-
for (
|
|
811
|
-
const expected = queue[index];
|
|
812
|
+
for (const expected of queue) {
|
|
812
813
|
const key = `${expected.pid}:${expected.start}`;
|
|
813
814
|
if (seen.has(key)) continue;
|
|
814
815
|
seen.add(key);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tangle-network/sdk-cli-runner",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.8",
|
|
4
4
|
"description": "Generic CLI process spawning with stdin/stdout streaming and JSONL parsing",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.mjs",
|
|
@@ -26,8 +26,8 @@
|
|
|
26
26
|
"registry": "https://registry.npmjs.org"
|
|
27
27
|
},
|
|
28
28
|
"tangleRelease": {
|
|
29
|
-
"sourceSha": "
|
|
30
|
-
"mergedAt": "2026-11-
|
|
29
|
+
"sourceSha": "c9c94777cfcfd997fa2b5913e42c8c622fcd0850",
|
|
30
|
+
"mergedAt": "2026-11-05T14:40:47-08:00"
|
|
31
31
|
},
|
|
32
32
|
"scripts": {
|
|
33
33
|
"build": "tsdown",
|