@neat.is/core 0.10.2 → 0.10.3-dev.20260930

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.cjs CHANGED
@@ -18999,14 +18999,12 @@ async function readLockPid(lockPath) {
18999
18999
  async function classifyLockHolder(lockPath, probe = defaultLockHolderProbe) {
19000
19000
  const lockPid = await readLockPid(lockPath);
19001
19001
  const daemonPid = await probe.daemonPidFromFile();
19002
- if (daemonPid !== void 0 && daemonPid !== process.pid && probe.isPidAlive(daemonPid) && // The lock already names the daemon, or the daemon answers on its port.
19003
- // Either confirms a live daemon is in the picture (the second guards
19004
- // against a stale pidfile whose PID got reused).
19005
- (daemonPid === lockPid || await probe.daemonResponds())) {
19006
- return { kind: "daemon", pid: daemonPid };
19007
- }
19008
19002
  if (lockPid !== void 0 && lockPid !== process.pid && probe.isPidAlive(lockPid)) {
19009
- return { kind: "command", pid: lockPid };
19003
+ return { kind: lockPid === daemonPid ? "daemon" : "command", pid: lockPid };
19004
+ }
19005
+ if (daemonPid !== void 0 && daemonPid !== process.pid && probe.isPidAlive(daemonPid) && // Guards against a stale pidfile whose PID got reused.
19006
+ await probe.daemonResponds()) {
19007
+ return { kind: "daemon", pid: daemonPid };
19010
19008
  }
19011
19009
  return { kind: "stale" };
19012
19010
  }