@mark1russell7/service 0.5.5 → 0.5.7

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/index.js CHANGED
@@ -3,9 +3,9 @@ import { detectionTime, heartbeat } from "./heartbeat.js";
3
3
  import { a as recoverSpan, i as heartbeatDetection, n as asWindow, r as failSpan, t as asDebounce } from "./timing-DGRi3XCI.js";
4
4
  import { n as operationProblems, t as mayReissue } from "./operation-DL5RxFds.js";
5
5
  import { a as limiterProblems, i as limitRule, n as freeAt, o as longestRetryAfter, r as idleSpan, s as retryAfterSeconds, t as decide } from "./policy-CgS4y94U.js";
6
- import { a as lateHolds, n as countOf, r as millisecondsOf, t as boundedMillisecondsOf } from "./knobs-BZAsgb5H.js";
6
+ import { a as lateHolds, l as takeOutside, n as countOf, r as millisecondsOf, s as ownStream, t as boundedMillisecondsOf } from "./knobs-D2ClI68I.js";
7
7
  import { backoffBand, backoffDelay, backoffProblems } from "./backoff.js";
8
- import { n as memoryStore, t as keyedLimiter } from "./limiter-wv0uXDk9.js";
8
+ import { a as keyedLimiter, i as limiterStateOf, n as TOKEN_BUCKET_MACHINE, o as memoryStore, r as limiterMachine, t as SLIDING_WINDOW_MACHINE } from "./limiter-pkBZUp-t.js";
9
9
  import { convertExact, convertible, quantity, rationals, valueIn } from "@mark1russell7/quantity";
10
10
  import { replay } from "@mark1russell7/algebra/replay";
11
11
  //#region src/description.ts
@@ -1285,7 +1285,9 @@ const lifecycle = (description, runtime, components, options = {}, bind = () =>
1285
1285
  cancelAbort();
1286
1286
  if (!inTime && excused === null) fail(`the phase ${phase.name} did not end in its cap of ${valueIn(phase.cap, "s")} s`);
1287
1287
  on = inTime ? "phase.done" : "phase.cap";
1288
- detail = inTime || excused === null ? void 0 : excused;
1288
+ const outsideCount = phase.name === "drain" ? takeOutside(life) : 0;
1289
+ const parts = [inTime ? null : excused, outsideCount > 0 ? `streams outside the lifecycle: ${outsideCount}` : null].filter((part) => part !== null);
1290
+ detail = parts.length > 0 ? parts.join(", ") : void 0;
1289
1291
  }
1290
1292
  if (exitState !== "exited") moveDrain("done", on, detail);
1291
1293
  abortService();
@@ -1312,7 +1314,7 @@ const lifecycle = (description, runtime, components, options = {}, bind = () =>
1312
1314
  done,
1313
1315
  signal: service.signal,
1314
1316
  shutdown,
1315
- request: (controller, route, work, request) => requests.request(controller, route, work, request),
1317
+ request: (controller, route, work, request) => ownStream(requests.request(controller, route, work, request), life),
1316
1318
  inFlight: (controller) => requests.inFlight(controller),
1317
1319
  keepAlive: () => state === "running" && runtime.verdict().ready
1318
1320
  };
@@ -3387,6 +3389,6 @@ const MACHINES = {
3387
3389
  watchdog: WATCHDOG_MACHINE
3388
3390
  };
3389
3391
  //#endregion
3390
- export { DECLARATION_RULE, EXIT_MACHINE, EXIT_SIGNALS, FORMAT, GATE_MACHINE, LATCH_MACHINE, LIMITER_RULES, MACHINES, POLLER_MACHINE, PROCESS_TRIGGERS, SERVICE_RULES, STAGES, WATCHDOG_MACHINE, WINDOW_MACHINE, asDebounce, asWindow, backoffBand, backoffDelay, backoffProblems, capKnob, cooperativeAbortAt, daemon, decide, detectionTime, drainMachine, embeddedProcess, ephemeral, evaluate, failSpan, freeAt, heartbeat, heartbeatDetection, idleSpan, inequalities, isExitCode, isExitSignal, isMessageShape, keyedLimiter, kubernetes, limitRule, limiterProblems, lint, localDev, longestRetryAfter, matchesMessage, mayReissue, memoryStore, nodeProcess, platformClock, processPortOf, queueDrain, realClock, recoverSpan, redeliverOnce, replay, retryAfterSeconds, service, serviceBindings, stageRank, symbolsOf, verdictOf, watchdog, workerLoop };
3392
+ export { DECLARATION_RULE, EXIT_MACHINE, EXIT_SIGNALS, FORMAT, GATE_MACHINE, LATCH_MACHINE, LIMITER_RULES, MACHINES, POLLER_MACHINE, PROCESS_TRIGGERS, SERVICE_RULES, SLIDING_WINDOW_MACHINE, STAGES, TOKEN_BUCKET_MACHINE, WATCHDOG_MACHINE, WINDOW_MACHINE, asDebounce, asWindow, backoffBand, backoffDelay, backoffProblems, capKnob, cooperativeAbortAt, daemon, decide, detectionTime, drainMachine, embeddedProcess, ephemeral, evaluate, failSpan, freeAt, heartbeat, heartbeatDetection, idleSpan, inequalities, isExitCode, isExitSignal, isMessageShape, keyedLimiter, kubernetes, limitRule, limiterMachine, limiterProblems, limiterStateOf, lint, localDev, longestRetryAfter, matchesMessage, mayReissue, memoryStore, nodeProcess, platformClock, processPortOf, queueDrain, realClock, recoverSpan, redeliverOnce, replay, retryAfterSeconds, service, serviceBindings, stageRank, symbolsOf, verdictOf, watchdog, workerLoop };
3391
3393
 
3392
3394
  //# sourceMappingURL=index.js.map