@mark1russell7/service 0.8.12 → 0.8.13

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/grpc.js CHANGED
@@ -1,4 +1,4 @@
1
- import { B as zeroProblems, C as notSent, D as readyWait, F as timeProblems, G as immediate, H as NEVER, L as wholeProblems, M as sendWithReissue, N as socketEnds, P as stepChecks, R as withinBound, S as ms, U as WHAT, V as MANIFESTATIONS, W as firstDetector, X as unwatched, Y as kernelGiveUp, _ as inFlight, a as helloDial, b as message, c as ageProblems, d as clientProblems, f as clientRecorder, g as idleCloseProblem, h as finiteMs, i as authority, j as roundTripCheck, k as retryProblems, l as attachClient, m as dialCheck, n as closeTimer, r as transition, s as STARTING_POLL, t as clientKnob, u as clientBounds, w as operationTable, y as localStateCheck, z as wrapperTimerProblems } from "./machine-mIW1qgEE.js";
1
+ import { B as zeroProblems, C as notSent, D as readyWait, F as timeProblems, G as immediate, H as NEVER, L as wholeProblems, M as sendWithReissue, N as socketEnds, P as stepChecks, R as withinBound, S as ms, U as WHAT, V as MANIFESTATIONS, W as firstDetector, X as unwatched, Y as kernelGiveUp, _ as inFlight, a as helloDial, b as message, c as ageProblems, d as clientProblems, f as clientRecorder, g as idleCloseProblem, h as finiteMs, i as authority, j as roundTripCheck, k as retryProblems, l as attachClient, m as dialCheck, n as closeTimer, r as transition, s as STARTING_POLL, t as clientKnob, u as clientBounds, w as operationTable, y as localStateCheck, z as wrapperTimerProblems } from "./machine-BhVeHr_m.js";
2
2
  import { realClock } from "./clock.js";
3
3
  import { i as heartbeatDetection } from "./timing-DZl36uXs.js";
4
4
  // src/grpc/connection.ts
package/build/host.js CHANGED
@@ -1,8 +1,9 @@
1
1
  import { d as poller, f as latch, s as isMessageShape } from "./process-7R9M29wN.js";
2
2
  import { backoffProblems } from "./backoff.js";
3
- import { t as retrier } from "./retrier-BObZq10-.js";
3
+ import { t as retrier } from "./retrier-Dnjhvxol.js";
4
4
  import { realClock } from "./clock.js";
5
5
  import { convertible, formatDuration, isQuantity, valueIn } from "@mark1russell7/quantity";
6
+ import { delay } from "@mark1russell7/algebra/clock";
6
7
  import { connect } from "node:net";
7
8
  import { escapeAttribute } from "@mark1russell7/text";
8
9
  import { execFile, spawn } from "node:child_process";
@@ -342,7 +343,6 @@ const parseLockOwner = (text) => {
342
343
  const lockText = (owner) => `${JSON.stringify(owner)}\n`;
343
344
  /** This function tells if the owner of a lock is alive: its process, or its child. */
344
345
  const ownerAlive = async (owner, ports) => await sameProcess(owner, ports) || owner.child !== void 0 && await sameProcess(owner.child, ports);
345
- const sleep = (ports, ms) => new Promise((resolve) => ports.clock.after(ms, resolve));
346
346
  /**
347
347
  * This function removes a file only when it has this text: a lock file or a discovery file. The
348
348
  * removal holds the removal lock `<path>.rm` for its read and its delete. Thus two processes that find
@@ -433,7 +433,7 @@ const acquireInstanceLock = async (path, ports, options = {}) => {
433
433
  if (other === null) {
434
434
  malformed += 1;
435
435
  if (malformed < tries) {
436
- await sleep(ports, pause);
436
+ await delay(ports.clock, pause);
437
437
  continue;
438
438
  }
439
439
  if (await removeIfSame(path, found, ports)) recovered = "the lock file was not a lock record";