@nice-code/commander 0.106.0 → 0.108.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/build/cli.cjs CHANGED
@@ -234,8 +234,7 @@ async function recordDaemonAlive(record) {
234
234
  if (error.code !== "EPERM") return false;
235
235
  }
236
236
  if (record.startStamp == null) return true;
237
- const stamp = await (0, _nice_code_process.readProcessStartStamp)(record.pid);
238
- return stamp != null && stamp.stamp === record.startStamp.stamp;
237
+ return await (0, _nice_code_process.matchProcessStartStamp)(record.pid, record.startStamp.stamp) === "match";
239
238
  }
240
239
  /**
241
240
  * Protocol-independent shutdown: verify the record's pid is still the daemon it claims to be
@@ -258,8 +257,7 @@ async function signalDaemonShutdown(target, waitMs = 15e3) {
258
257
  outcome: "identity-unverified",
259
258
  pid
260
259
  };
261
- const stamp = await (0, _nice_code_process.readProcessStartStamp)(pid);
262
- if (stamp == null || stamp.stamp !== startStamp.stamp) return {
260
+ if (await (0, _nice_code_process.matchProcessStartStamp)(pid, startStamp.stamp) !== "match") return {
263
261
  outcome: "identity-unverified",
264
262
  pid
265
263
  };
@@ -784,6 +782,8 @@ function staleOverrides(config, overrides) {
784
782
  }
785
783
  return stale;
786
784
  }
785
+ //#endregion
786
+ //#region src/config/validate.ts
787
787
  const SUITE_PARALLEL_DEFAULT = 4;
788
788
  const SUITE_STAGGER_DEFAULT_MS = 100;
789
789
  /** C0/DEL/C1 control characters have no business in tag keys/values or env keys. */
@@ -26008,8 +26008,7 @@ async function diagnose(ctx, handle) {
26008
26008
  continue;
26009
26009
  }
26010
26010
  if (record.startStamp != null) {
26011
- const stamp = await (0, _nice_code_process.readProcessStartStamp)(record.pid);
26012
- if (stamp == null || stamp.stamp !== record.startStamp) {
26011
+ if (await (0, _nice_code_process.matchProcessStartStamp)(record.pid, record.startStamp) !== "match") {
26013
26012
  report.warnings.push(`ledger "${record.id}": pid ${record.pid} fails the fingerprint check (reuse?) — quarantine-suspect`);
26014
26013
  continue;
26015
26014
  }