@mark1russell7/service 0.6.6 → 0.7.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.
Files changed (39) hide show
  1. package/README.md +14 -6
  2. package/build/{builder-bXJqMe2p.d.ts → builder-DPsy9XVN.d.ts} +4 -4
  3. package/build/{core-B1zbS4WY.d.ts → core-BkdE4pz1.d.ts} +4 -4
  4. package/build/{dial-CSGKVlZe.d.ts → dial-CyVazFF-.d.ts} +2 -2
  5. package/build/grpc.d.ts +3 -3
  6. package/build/host.d.ts +5 -3
  7. package/build/host.js +13 -3
  8. package/build/host.js.map +1 -1
  9. package/build/http-client.d.ts +3 -3
  10. package/build/http.d.ts +8 -6
  11. package/build/http.js +19 -5
  12. package/build/http.js.map +1 -1
  13. package/build/index.d.ts +26 -8
  14. package/build/index.js +45 -3
  15. package/build/index.js.map +1 -1
  16. package/build/{lifecycle-Ks9Yd5CM.d.ts → lifecycle-BuFfbY3s.d.ts} +2 -2
  17. package/build/{limiter-CmC4vCjk.js → limiter-BTgM4aXZ.js} +19 -8
  18. package/build/limiter-BTgM4aXZ.js.map +1 -0
  19. package/build/{limiter-BoZkXIxk.d.ts → limiter-CkJ_QVFj.d.ts} +3 -3
  20. package/build/limiter.d.ts +4 -4
  21. package/build/limiter.js +3 -3
  22. package/build/{logger-DhFgh48y.d.ts → logger-BY1RFLzq.d.ts} +2 -2
  23. package/build/mongodb.d.ts +3 -3
  24. package/build/pg.d.ts +2 -2
  25. package/build/{policy-G4QJ1ZZq.d.ts → policy-CwYR95Sz.d.ts} +51 -15
  26. package/build/{policy-CgS4y94U.js → policy-G-Y3Meku.js} +55 -14
  27. package/build/policy-G-Y3Meku.js.map +1 -0
  28. package/build/{ports-CZLzYK5d.d.ts → ports-D1U2EHmR.d.ts} +2 -2
  29. package/build/{queue-BjiGodqh.d.ts → queue-CDYBywuU.d.ts} +3 -3
  30. package/build/rabbitmq.d.ts +4 -4
  31. package/build/redis.d.ts +9 -6
  32. package/build/redis.js +17 -8
  33. package/build/redis.js.map +1 -1
  34. package/build/{store-Cwuepb-z.d.ts → store-KWQVA3mp.d.ts} +23 -12
  35. package/build/testing.d.ts +4 -4
  36. package/build/websocket.d.ts +3 -3
  37. package/package.json +3 -3
  38. package/build/limiter-CmC4vCjk.js.map +0 -1
  39. package/build/policy-CgS4y94U.js.map +0 -1
package/build/index.js CHANGED
@@ -2,14 +2,14 @@ import { platformClock, realClock } from "./clock.js";
2
2
  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
- 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";
5
+ import { a as limitRule, c as overCapacity, i as idleSpan, l as retryAfterSeconds, n as decide, o as limiterProblems, r as freeAt, s as longestRetryAfter, t as capacityOf, u as unitsOf } from "./policy-G-Y3Meku.js";
6
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 { a as isExitCode, c as matchesMessage, i as embeddedProcess, l as nodeProcess, n as PROCESS_TRIGGERS, o as isExitSignal, r as UNCAUGHT_ORIGINS, s as isMessageShape, t as EXIT_SIGNALS, u as processPortOf } from "./process-DG_im2zc.js";
8
8
  import { a as runUnit, c as untilAbort, i as retryOf, l as routePatternProblems, n as boundProblems, o as settleWithin, r as flights, s as sleeper, t as tracker } from "./requests-BIq9Tr4P.js";
9
9
  import { backoffBand, backoffDelay, backoffProblems } from "./backoff.js";
10
10
  import { DRAIN_RULES, O04, O09, O10, O16 } from "./rules.js";
11
11
  import { i as retryAfterDelay, r as retry, t as retrier } from "./retrier-Nt6r4r6R.js";
12
- 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-CmC4vCjk.js";
12
+ 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-BTgM4aXZ.js";
13
13
  import { convertExact, convertible, rationals, valueIn } from "@mark1russell7/quantity";
14
14
  import { replay } from "@mark1russell7/algebra/replay";
15
15
  //#region src/description.ts
@@ -2519,6 +2519,48 @@ const lintStop = (svc, scenario, rules, way) => {
2519
2519
  }];
2520
2520
  };
2521
2521
  //#endregion
2522
+ //#region src/identity.ts
2523
+ /**
2524
+ * The exported type names that hold or reach a value that service knows by identity. A package
2525
+ * whose public API takes or gives a value of one of these types has service as a peer dependency.
2526
+ * A plain dependency is not sufficient. Then the package and its caller use one copy of service.
2527
+ *
2528
+ * The roots are `Lifecycle` and `RequestStream`, the keys of the maps, and `TransportImpl` and
2529
+ * `RequestHandler`, whose values write to the maps of their own copy. The list is each exported type
2530
+ * that names a root, or names a type of the list, in its declaration. A type can be on the list
2531
+ * although its own use crosses copies safely: for that type, a peer is the safe choice.
2532
+ *
2533
+ * `identity.test.ts` calculates this list from the sources and from the maps, thus the list stays
2534
+ * current.
2535
+ */
2536
+ const IDENTITY_TYPES = [
2537
+ "Client",
2538
+ "GrpcClient",
2539
+ "HttpClient",
2540
+ "HttpTransport",
2541
+ "IterationContext",
2542
+ "JobContext",
2543
+ "Lifecycle",
2544
+ "MongoClient",
2545
+ "MountContext",
2546
+ "PgClient",
2547
+ "QueueDrain",
2548
+ "QueueDrainOptions",
2549
+ "RabbitClient",
2550
+ "RedisClient",
2551
+ "RedisSender",
2552
+ "RequestHandler",
2553
+ "RequestStream",
2554
+ "ServiceBuilder",
2555
+ "SubjectFactory",
2556
+ "TransportImpl",
2557
+ "TransportSubject",
2558
+ "UpgradeHandler",
2559
+ "WorkerLoop",
2560
+ "WorkerLoopOptions",
2561
+ "WsClient"
2562
+ ];
2563
+ //#endregion
2522
2564
  //#region src/profiles.ts
2523
2565
  const s = (value) => ({
2524
2566
  value,
@@ -3505,6 +3547,6 @@ const MACHINES = {
3505
3547
  watchdog: WATCHDOG_MACHINE
3506
3548
  };
3507
3549
  //#endregion
3508
- export { BOUND_RULES, CLOSE_BOUND_RULE, DECLARATION_RULE, DRAIN_RULES, DRAIN_RULE_IDS, DURATION_FRACTIONS, EPISODES_KEPT, EXIT_MACHINE, EXIT_SIGNALS, FORMAT, GATE_MACHINE, LATCH_MACHINE, LAW_STATISTIC, LIMITER_RULES, LOG_LEVELS, MACHINES, NAME_RULE, O04, O09, O10, O16, PLATFORM_MARKS, POLLER_MACHINE, PROCESS_TRIGGERS, PROGRESS_RULE, SERVICE_RULES, SLIDING_WINDOW_MACHINE, STAGES, STOPS, STOP_RULE, TOKEN_BUCKET_MACHINE, UNCAUGHT_ORIGINS, UNIT_BOUND_RULE, WATCHDOG_MACHINE, WINDOW_MACHINE, asDebounce, asWindow, atLeast, backoffBand, backoffDelay, backoffProblems, capKnob, compress, compression, compressionOf, consoleLogger, cooperativeAbortAt, daemon, decide, detectionTime, drainMachine, embeddedProcess, ephemeral, evaluate, failSpan, freeAt, heartbeat, heartbeatDetection, idleSpan, inequalities, isExitCode, isExitSignal, isMessageShape, keyedLimiter, kubernetes, limitRule, limiterMachine, limiterProblems, limiterStateOf, lint, lintStop, localDev, logEvents, longestRetryAfter, matchesMessage, mayReissue, memoryStore, nodeProcess, platformClock, processPortOf, queueDrain, realClock, recoverSpan, redact, redeliverOnce, replay, retrier, retry, retryAfterDelay, retryAfterSeconds, service, serviceBindings, stageRank, symbolsOf, verdictOf, watchdog, workerLoop };
3550
+ export { BOUND_RULES, CLOSE_BOUND_RULE, DECLARATION_RULE, DRAIN_RULES, DRAIN_RULE_IDS, DURATION_FRACTIONS, EPISODES_KEPT, EXIT_MACHINE, EXIT_SIGNALS, FORMAT, GATE_MACHINE, IDENTITY_TYPES, LATCH_MACHINE, LAW_STATISTIC, LIMITER_RULES, LOG_LEVELS, MACHINES, NAME_RULE, O04, O09, O10, O16, PLATFORM_MARKS, POLLER_MACHINE, PROCESS_TRIGGERS, PROGRESS_RULE, SERVICE_RULES, SLIDING_WINDOW_MACHINE, STAGES, STOPS, STOP_RULE, TOKEN_BUCKET_MACHINE, UNCAUGHT_ORIGINS, UNIT_BOUND_RULE, WATCHDOG_MACHINE, WINDOW_MACHINE, asDebounce, asWindow, atLeast, backoffBand, backoffDelay, backoffProblems, capKnob, capacityOf, compress, compression, compressionOf, consoleLogger, cooperativeAbortAt, daemon, decide, detectionTime, drainMachine, embeddedProcess, ephemeral, evaluate, failSpan, freeAt, heartbeat, heartbeatDetection, idleSpan, inequalities, isExitCode, isExitSignal, isMessageShape, keyedLimiter, kubernetes, limitRule, limiterMachine, limiterProblems, limiterStateOf, lint, lintStop, localDev, logEvents, longestRetryAfter, matchesMessage, mayReissue, memoryStore, nodeProcess, overCapacity, platformClock, processPortOf, queueDrain, realClock, recoverSpan, redact, redeliverOnce, replay, retrier, retry, retryAfterDelay, retryAfterSeconds, service, serviceBindings, stageRank, symbolsOf, unitsOf, verdictOf, watchdog, workerLoop };
3509
3551
 
3510
3552
  //# sourceMappingURL=index.js.map