@nice-code/commander 0.106.0 → 0.107.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
  };
@@ -26008,8 +26006,7 @@ async function diagnose(ctx, handle) {
26008
26006
  continue;
26009
26007
  }
26010
26008
  if (record.startStamp != null) {
26011
- const stamp = await (0, _nice_code_process.readProcessStartStamp)(record.pid);
26012
- if (stamp == null || stamp.stamp !== record.startStamp) {
26009
+ if (await (0, _nice_code_process.matchProcessStartStamp)(record.pid, record.startStamp) !== "match") {
26013
26010
  report.warnings.push(`ledger "${record.id}": pid ${record.pid} fails the fingerprint check (reuse?) — quarantine-suspect`);
26014
26011
  continue;
26015
26012
  }