@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.
Files changed (2) hide show
  1. package/dist/index.mjs +6 -5
  2. 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
- if (!Number.isSafeInteger(group) || !fields[19]) throw new Error(`Cannot read process identity for ${pid}`);
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: fields[19],
787
- state: fields[0]
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 (let index = 0; index < queue.length; index++) {
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.7",
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": "edbead512639304013f5386111711912e45d0679",
30
- "mergedAt": "2026-11-04T12:32:11-08:00"
29
+ "sourceSha": "c9c94777cfcfd997fa2b5913e42c8c622fcd0850",
30
+ "mergedAt": "2026-11-05T14:40:47-08:00"
31
31
  },
32
32
  "scripts": {
33
33
  "build": "tsdown",