@entifix/transactions 0.11.0 → 0.12.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 (53) hide show
  1. package/dist/contracts/flow-messages.d.ts +3 -2
  2. package/dist/contracts/flow-messages.d.ts.map +1 -1
  3. package/dist/contracts/flow-messages.js.map +1 -1
  4. package/dist/contracts/outbox.d.ts +18 -0
  5. package/dist/contracts/outbox.d.ts.map +1 -1
  6. package/dist/contracts/outbox.js +16 -0
  7. package/dist/contracts/outbox.js.map +1 -1
  8. package/dist/engine/in-memory-bulkhead.d.ts +20 -0
  9. package/dist/engine/in-memory-bulkhead.d.ts.map +1 -0
  10. package/dist/engine/in-memory-bulkhead.js +38 -0
  11. package/dist/engine/in-memory-bulkhead.js.map +1 -0
  12. package/dist/engine/in-memory-circuit-breaker.d.ts +28 -0
  13. package/dist/engine/in-memory-circuit-breaker.d.ts.map +1 -0
  14. package/dist/engine/in-memory-circuit-breaker.js +151 -0
  15. package/dist/engine/in-memory-circuit-breaker.js.map +1 -0
  16. package/dist/engine/index.d.ts +4 -0
  17. package/dist/engine/index.d.ts.map +1 -1
  18. package/dist/engine/index.js +4 -0
  19. package/dist/engine/index.js.map +1 -1
  20. package/dist/engine/outbox-metrics.d.ts +47 -0
  21. package/dist/engine/outbox-metrics.d.ts.map +1 -0
  22. package/dist/engine/outbox-metrics.js +68 -0
  23. package/dist/engine/outbox-metrics.js.map +1 -0
  24. package/dist/engine/outbox-relay.d.ts +102 -0
  25. package/dist/engine/outbox-relay.d.ts.map +1 -0
  26. package/dist/engine/outbox-relay.js +111 -0
  27. package/dist/engine/outbox-relay.js.map +1 -0
  28. package/dist/index.d.ts +3 -0
  29. package/dist/index.d.ts.map +1 -1
  30. package/dist/index.js +3 -0
  31. package/dist/index.js.map +1 -1
  32. package/dist/ports/bulkhead.d.ts +28 -0
  33. package/dist/ports/bulkhead.d.ts.map +1 -0
  34. package/dist/ports/bulkhead.js +18 -0
  35. package/dist/ports/bulkhead.js.map +1 -0
  36. package/dist/ports/circuit-breaker.d.ts +62 -0
  37. package/dist/ports/circuit-breaker.d.ts.map +1 -0
  38. package/dist/ports/circuit-breaker.js +42 -0
  39. package/dist/ports/circuit-breaker.js.map +1 -0
  40. package/dist/ports/event-bus.d.ts +10 -0
  41. package/dist/ports/event-bus.d.ts.map +1 -1
  42. package/dist/ports/event-bus.js.map +1 -1
  43. package/dist/ports/flow-engine.d.ts +6 -0
  44. package/dist/ports/flow-engine.d.ts.map +1 -1
  45. package/dist/ports/flow-engine.js.map +1 -1
  46. package/dist/ports/participant-client.d.ts +32 -0
  47. package/dist/ports/participant-client.d.ts.map +1 -0
  48. package/dist/ports/participant-client.js +5 -0
  49. package/dist/ports/participant-client.js.map +1 -0
  50. package/dist/reactions/on.d.ts.map +1 -1
  51. package/dist/reactions/on.js +2 -1
  52. package/dist/reactions/on.js.map +1 -1
  53. package/package.json +3 -3
@@ -0,0 +1,32 @@
1
+ import type { SlipStep } from '@entifix/business/flow';
2
+ import type { EntifixFailure } from '@entifix/core';
3
+ import { Context, type Effect } from 'effect';
4
+ /** One call a flow makes to a participant, for a step or for its undoing. */
5
+ export interface ParticipantCall {
6
+ readonly step: SlipStep;
7
+ /** `action` runs the step's call, `compensation` the call that undoes it. */
8
+ readonly kind: 'action' | 'compensation';
9
+ /**
10
+ * `<flowId>:<step>`, with `:compensation` for an undoing — the participant's
11
+ * `Idempotency-Key`, stable across every redelivery and resume.
12
+ */
13
+ readonly idempotencyKey: string;
14
+ /** What earlier steps answered, by step — the inputs a step may name. */
15
+ readonly outputs: Readonly<Record<string, unknown>>;
16
+ }
17
+ /**
18
+ * How a flow reaches its participants
19
+ * ([ADR 0016](../../../../../docs/adr/0016-a-flow-engine-port-and-a-durable-workflow-adapter.md)).
20
+ * The interpreter calls this and nothing else, so the transport — HTTP with a
21
+ * crossing token, or an in-process double — is the composition root's choice.
22
+ * A refusal is the participant's typed failure; anything that kept the call
23
+ * from being answered is a technical one.
24
+ */
25
+ export interface ParticipantClient {
26
+ readonly call: (request: ParticipantCall) => Effect.Effect<unknown, EntifixFailure>;
27
+ }
28
+ declare const ParticipantClientTag_base: Context.ServiceClass<ParticipantClientTag, "@entifix/transactions/ParticipantClient", ParticipantClient>;
29
+ export declare class ParticipantClientTag extends ParticipantClientTag_base {
30
+ }
31
+ export {};
32
+ //# sourceMappingURL=participant-client.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"participant-client.d.ts","sourceRoot":"","sources":["../../src/ports/participant-client.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AACvD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AACpD,OAAO,EAAE,OAAO,EAAE,KAAK,MAAM,EAAE,MAAM,QAAQ,CAAC;AAE9C,6EAA6E;AAC7E,MAAM,WAAW,eAAe;IAC9B,QAAQ,CAAC,IAAI,EAAE,QAAQ,CAAC;IACxB,6EAA6E;IAC7E,QAAQ,CAAC,IAAI,EAAE,QAAQ,GAAG,cAAc,CAAC;IACzC;;;OAGG;IACH,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAC;IAChC,yEAAyE;IACzE,QAAQ,CAAC,OAAO,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;CACrD;AAED;;;;;;;GAOG;AACH,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,IAAI,EAAE,CACb,OAAO,EAAE,eAAe,KACrB,MAAM,CAAC,MAAM,CAAC,OAAO,EAAE,cAAc,CAAC,CAAC;CAC7C;;AAED,qBAAa,oBAAqB,SAAQ,yBAGI;CAAG"}
@@ -0,0 +1,5 @@
1
+ import { Context } from 'effect';
2
+ export class ParticipantClientTag extends Context.Service()('@entifix/transactions/ParticipantClient') {
3
+ }
4
+
5
+ //# sourceMappingURL=participant-client.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/ports/participant-client.ts"],"sourcesContent":["import type { SlipStep } from '@entifix/business/flow';\nimport type { EntifixFailure } from '@entifix/core';\nimport { Context, type Effect } from 'effect';\n\n/** One call a flow makes to a participant, for a step or for its undoing. */\nexport interface ParticipantCall {\n readonly step: SlipStep;\n /** `action` runs the step's call, `compensation` the call that undoes it. */\n readonly kind: 'action' | 'compensation';\n /**\n * `<flowId>:<step>`, with `:compensation` for an undoing — the participant's\n * `Idempotency-Key`, stable across every redelivery and resume.\n */\n readonly idempotencyKey: string;\n /** What earlier steps answered, by step — the inputs a step may name. */\n readonly outputs: Readonly<Record<string, unknown>>;\n}\n\n/**\n * How a flow reaches its participants\n * ([ADR 0016](../../../../../docs/adr/0016-a-flow-engine-port-and-a-durable-workflow-adapter.md)).\n * The interpreter calls this and nothing else, so the transport — HTTP with a\n * crossing token, or an in-process double — is the composition root's choice.\n * A refusal is the participant's typed failure; anything that kept the call\n * from being answered is a technical one.\n */\nexport interface ParticipantClient {\n readonly call: (\n request: ParticipantCall,\n ) => Effect.Effect<unknown, EntifixFailure>;\n}\n\nexport class ParticipantClientTag extends Context.Service<\n ParticipantClientTag,\n ParticipantClient\n>()('@entifix/transactions/ParticipantClient') {}\n"],"names":["Context","ParticipantClientTag","Service"],"mappings":"AAEA,SAASA,OAAO,QAAqB,SAAS;AA8B9C,OAAO,MAAMC,6BAA6BD,QAAQE,OAAO,GAGrD;AAA4C"}
@@ -1 +1 @@
1
- {"version":3,"file":"on.d.ts","sourceRoot":"","sources":["../../src/reactions/on.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,gBAAgB,EAErB,KAAK,yBAAyB,EAC9B,KAAK,YAAY,EAEjB,UAAU,EACX,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,EAAU,MAAM,QAAQ,CAAC;AAEvD,OAAO,EAIL,cAAc,EACd,KAAK,QAAQ,EAEd,MAAM,0BAA0B,CAAC;AAElC;;;;;GAKG;AACH,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ACzE,wBAAgB,EAAE,CAAC,CAAC,EAAE,EAAE,EACtB,SAAS,EAAE,yBAAyB,CAAC,CAAC,EAAE,EAAE,CAAC,GAC1C,SAAS,CAAC,CAAC,EAAE,EAAE,EAAE,KAAK,CAAC,CAAC"}
@@ -3,7 +3,8 @@ import { Effect, Metric } from 'effect';
3
3
  import { retryAttempts, retryBudgetRejections, RetryBudgetTag, retryThrottled } from '../ports/retry-budget.js';
4
4
  /** Tags that stop retries wherever they appear: the dependency asked for less. */ const STOPS_RETRIES = new Set([
5
5
  'Overloaded',
6
- 'BreakerOpen'
6
+ 'BreakerOpen',
7
+ 'BulkheadFull'
7
8
  ]);
8
9
  const fullJitter = (attempt, base, cap)=>Math.random() * Math.min(cap, base * 2 ** (attempt - 1));
9
10
  const count = (counter, key)=>Metric.update(Metric.withAttributes(counter, {
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/reactions/on.ts"],"sourcesContent":["import {\n type BusinessCategory,\n currentRemainingMs,\n type EffectfulFailurePredicate,\n type FailureGuard,\n isFailure,\n Overloaded,\n} from '@entifix/core';\nimport { type Duration, Effect, Metric } from 'effect';\n\nimport {\n retryAttempts,\n type RetryBudget,\n retryBudgetRejections,\n RetryBudgetTag,\n type RetryKey,\n retryThrottled,\n} from '../ports/retry-budget.js';\n\n/**\n * A retry is legal on a call only when repeating it cannot do the thing twice:\n * a read, or a write carrying an `Idempotency-Key`. The caller states it; the\n * reaction refuses to be built when it is false, so the mistake is a boot\n * failure rather than a second charge.\n */\nexport interface RetryOptions {\n readonly key: RetryKey;\n readonly idempotent: boolean;\n}\n\n/** Tags that stop retries wherever they appear: the dependency asked for less. */\nconst STOPS_RETRIES: ReadonlySet<string> = new Set([\n 'Overloaded',\n 'BreakerOpen',\n]);\n\ntype AdmitsBusiness<S> = S extends { readonly family: 'business' }\n ? true\n : S extends { readonly category: BusinessCategory }\n ? true\n : false;\n\ntype Remaining<E, S, Narrows extends boolean> = Narrows extends true\n ? Exclude<E, S>\n : E;\n\n/**\n * The reactions a shell composes onto an effect, each a plain\n * `(self) => Effect` transform — no rule language, because a reaction is an\n * Effect function and the compiler already checks those\n * ([ADR 0013](../../../../../docs/adr/0013-failures-are-typed-values-decided-at-the-shell.md)).\n */\nexport interface Reactions<S, RP, Narrows extends boolean> {\n /**\n * Retry the matching failures, once per attempt the budget admits, with full\n * jitter, never past the request's deadline\n * ([ADR 0014](../../../../../docs/adr/0014-retry-once-at-the-layer-above-under-a-budget.md)).\n *\n * Not available on a predicate that admits a business failure: an answer\n * retried is the same answer, and the type says so before anything runs.\n */\n readonly retry: AdmitsBusiness<S> extends true\n ? never\n : (\n options: RetryOptions,\n ) => <A, E, R>(\n self: Effect.Effect<A, E, R>,\n ) => Effect.Effect<A, E | Overloaded, R | RP | RetryBudgetTag>;\n /** Wait before letting a matching failure through — pacing, not a retry. */\n readonly delay: (\n duration: Duration.Input,\n ) => <A, E, R>(self: Effect.Effect<A, E, R>) => Effect.Effect<A, E, R | RP>;\n /** Run another effect in place of a matching failure. */\n readonly fallback: <B, E2, R2>(\n other: (failure: S) => Effect.Effect<B, E2, R2>,\n ) => <A, E, R>(\n self: Effect.Effect<A, E, R>,\n ) => Effect.Effect<A | B, Remaining<E, S, Narrows> | E2, R | R2 | RP>;\n /** Answer a matching failure with an outcome. */\n readonly recover: <B>(\n toOutcome: (failure: S) => B,\n ) => <A, E, R>(\n self: Effect.Effect<A, E, R>,\n ) => Effect.Effect<A | B, Remaining<E, S, Narrows>, R | RP>;\n}\n\nconst fullJitter = (attempt: number, base: number, cap: number) =>\n Math.random() * Math.min(cap, base * 2 ** (attempt - 1));\n\nconst count = (counter: Metric.Counter<number>, key: RetryKey) =>\n Metric.update(\n Metric.withAttributes(counter, { dependency: key.dependency }),\n 1,\n );\n\n/**\n * Reactions to the failures `predicate` admits.\n *\n * Given a guard, the reactions that consume a failure narrow `E`; given a\n * guard with a condition (`Failure.when`), they cannot — the condition may say\n * no at run time — and `E` is left as it was.\n */\nexport function On<S>(guard: FailureGuard<S>): Reactions<S, never, true>;\nexport function On<S, RP>(\n predicate: EffectfulFailurePredicate<S, RP>,\n): Reactions<S, RP, false>;\nexport function On<S, RP>(\n predicate: FailureGuard<S> | EffectfulFailurePredicate<S, RP>,\n): Reactions<S, RP, boolean> {\n const guard = typeof predicate === 'function' ? predicate : predicate.guard;\n const matches = (failure: unknown): Effect.Effect<boolean, never, RP> =>\n !guard(failure)\n ? Effect.succeed(false)\n : typeof predicate === 'function'\n ? Effect.succeed(true)\n : predicate.condition(failure);\n\n const retry = (options: RetryOptions) => {\n if (!options.idempotent)\n throw new Error(\n `On(…).retry on '${options.key.dependency}' is refused: the call is ` +\n 'not idempotent, so a retry could do it twice. Make it a read or ' +\n 'give it an Idempotency-Key.',\n );\n\n return <A, E, R>(self: Effect.Effect<A, E, R>) =>\n Effect.gen(function* () {\n const budget = yield* RetryBudgetTag;\n if (!(yield* budget.admitAttempt(options.key))) {\n yield* count(retryThrottled, options.key);\n return yield* Effect.fail(new Overloaded({}));\n }\n return yield* attempt(self, budget, 1);\n });\n\n function attempt<A, E, R>(\n self: Effect.Effect<A, E, R>,\n budget: RetryBudget,\n n: number,\n ): Effect.Effect<A, E | Overloaded, R | RP> {\n return self.pipe(\n Effect.tap(() => budget.recordAccepted(options.key)),\n Effect.catch(error =>\n Effect.gen(function* () {\n // An answer, even a refusal, is the dependency working.\n if (isFailure(error) && error.family === 'business') {\n yield* budget.recordAccepted(options.key);\n return yield* Effect.fail(error);\n }\n const stop =\n !(yield* matches(error)) ||\n (isFailure(error) && STOPS_RETRIES.has(error._tag)) ||\n n >= budget.dials.maxAttempts;\n if (stop) return yield* Effect.fail(error);\n\n const wait = fullJitter(\n n,\n budget.dials.backoffBaseMs,\n budget.dials.backoffCapMs,\n );\n const remaining = yield* currentRemainingMs;\n if (remaining !== undefined && remaining <= wait)\n return yield* Effect.fail(error);\n\n if (!(yield* budget.admitRetry(options.key))) {\n yield* count(retryBudgetRejections, options.key);\n return yield* Effect.fail(error);\n }\n yield* count(retryAttempts, options.key);\n yield* Effect.sleep(wait);\n return yield* attempt(self, budget, n + 1);\n }),\n ),\n );\n }\n };\n\n return {\n retry: retry as Reactions<S, RP, boolean>['retry'],\n delay: duration => self =>\n self.pipe(\n Effect.catch(error =>\n Effect.flatMap(matches(error), matched =>\n matched\n ? Effect.sleep(duration).pipe(Effect.andThen(Effect.fail(error)))\n : Effect.fail(error),\n ),\n ),\n ),\n fallback: other => self =>\n self.pipe(\n Effect.catch(error =>\n Effect.flatMap(matches(error), matched =>\n matched\n ? (other(error as unknown as S) as Effect.Effect<\n unknown,\n unknown,\n unknown\n >)\n : Effect.fail(error),\n ),\n ),\n ) as never,\n recover: toOutcome => self =>\n self.pipe(\n Effect.catch(error =>\n Effect.flatMap(matches(error), matched =>\n matched\n ? Effect.succeed(toOutcome(error as unknown as S))\n : Effect.fail(error),\n ),\n ),\n ) as never,\n };\n}\n"],"names":["currentRemainingMs","isFailure","Overloaded","Effect","Metric","retryAttempts","retryBudgetRejections","RetryBudgetTag","retryThrottled","STOPS_RETRIES","Set","fullJitter","attempt","base","cap","Math","random","min","count","counter","key","update","withAttributes","dependency","On","predicate","guard","matches","failure","succeed","condition","retry","options","idempotent","Error","self","gen","budget","admitAttempt","fail","n","pipe","tap","recordAccepted","catch","error","family","stop","has","_tag","dials","maxAttempts","wait","backoffBaseMs","backoffCapMs","remaining","undefined","admitRetry","sleep","delay","duration","flatMap","matched","andThen","fallback","other","recover","toOutcome"],"mappings":"AAAA,SAEEA,kBAAkB,EAGlBC,SAAS,EACTC,UAAU,QACL,gBAAgB;AACvB,SAAwBC,MAAM,EAAEC,MAAM,QAAQ,SAAS;AAEvD,SACEC,aAAa,EAEbC,qBAAqB,EACrBC,cAAc,EAEdC,cAAc,QACT,2BAA2B;AAalC,gFAAgF,GAChF,MAAMC,gBAAqC,IAAIC,IAAI;IACjD;IACA;CACD;AAoDD,MAAMC,aAAa,CAACC,SAAiBC,MAAcC,MACjDC,KAAKC,MAAM,KAA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AO,CAAClC,QAAQkB,QAAQiB,CAAAA,UAC7BA,UACKG,MAAMpB,SAKP1C,OAAOoC,IAAI,CAACM;QAIxBqB,SAASC,CAAAA,YAAahC,CAAAA,OACpBA,KAAKM,IAAI,CACPtC,OAAOyC,KAAK,CAACC,CAAAA,QACX1C,OAAO0D,OAAO,CAAClC,QAAQkB,QAAQiB,CAAAA,UAC7BA,UACI3D,OAAO0B,OAAO,CAACsC,UAAUtB,UACzB1C,OAAOoC,IAAI,CAACM;IAI1B;AACF"}
1
+ {"version":3,"sources":["../../src/reactions/on.ts"],"sourcesContent":["import {\n type BusinessCategory,\n currentRemainingMs,\n type EffectfulFailurePredicate,\n type FailureGuard,\n isFailure,\n Overloaded,\n} from '@entifix/core';\nimport { type Duration, Effect, Metric } from 'effect';\n\nimport {\n retryAttempts,\n type RetryBudget,\n retryBudgetRejections,\n RetryBudgetTag,\n type RetryKey,\n retryThrottled,\n} from '../ports/retry-budget.js';\n\n/**\n * A retry is legal on a call only when repeating it cannot do the thing twice:\n * a read, or a write carrying an `Idempotency-Key`. The caller states it; the\n * reaction refuses to be built when it is false, so the mistake is a boot\n * failure rather than a second charge.\n */\nexport interface RetryOptions {\n readonly key: RetryKey;\n readonly idempotent: boolean;\n}\n\n/** Tags that stop retries wherever they appear: the dependency asked for less. */\nconst STOPS_RETRIES: ReadonlySet<string> = new Set([\n 'Overloaded',\n 'BreakerOpen',\n 'BulkheadFull',\n]);\n\ntype AdmitsBusiness<S> = S extends { readonly family: 'business' }\n ? true\n : S extends { readonly category: BusinessCategory }\n ? true\n : false;\n\ntype Remaining<E, S, Narrows extends boolean> = Narrows extends true\n ? Exclude<E, S>\n : E;\n\n/**\n * The reactions a shell composes onto an effect, each a plain\n * `(self) => Effect` transform — no rule language, because a reaction is an\n * Effect function and the compiler already checks those\n * ([ADR 0013](../../../../../docs/adr/0013-failures-are-typed-values-decided-at-the-shell.md)).\n */\nexport interface Reactions<S, RP, Narrows extends boolean> {\n /**\n * Retry the matching failures, once per attempt the budget admits, with full\n * jitter, never past the request's deadline\n * ([ADR 0014](../../../../../docs/adr/0014-retry-once-at-the-layer-above-under-a-budget.md)).\n *\n * Not available on a predicate that admits a business failure: an answer\n * retried is the same answer, and the type says so before anything runs.\n */\n readonly retry: AdmitsBusiness<S> extends true\n ? never\n : (\n options: RetryOptions,\n ) => <A, E, R>(\n self: Effect.Effect<A, E, R>,\n ) => Effect.Effect<A, E | Overloaded, R | RP | RetryBudgetTag>;\n /** Wait before letting a matching failure through — pacing, not a retry. */\n readonly delay: (\n duration: Duration.Input,\n ) => <A, E, R>(self: Effect.Effect<A, E, R>) => Effect.Effect<A, E, R | RP>;\n /** Run another effect in place of a matching failure. */\n readonly fallback: <B, E2, R2>(\n other: (failure: S) => Effect.Effect<B, E2, R2>,\n ) => <A, E, R>(\n self: Effect.Effect<A, E, R>,\n ) => Effect.Effect<A | B, Remaining<E, S, Narrows> | E2, R | R2 | RP>;\n /** Answer a matching failure with an outcome. */\n readonly recover: <B>(\n toOutcome: (failure: S) => B,\n ) => <A, E, R>(\n self: Effect.Effect<A, E, R>,\n ) => Effect.Effect<A | B, Remaining<E, S, Narrows>, R | RP>;\n}\n\nconst fullJitter = (attempt: number, base: number, cap: number) =>\n Math.random() * Math.min(cap, base * 2 ** (attempt - 1));\n\nconst count = (counter: Metric.Counter<number>, key: RetryKey) =>\n Metric.update(\n Metric.withAttributes(counter, { dependency: key.dependency }),\n 1,\n );\n\n/**\n * Reactions to the failures `predicate` admits.\n *\n * Given a guard, the reactions that consume a failure narrow `E`; given a\n * guard with a condition (`Failure.when`), they cannot — the condition may say\n * no at run time — and `E` is left as it was.\n */\nexport function On<S>(guard: FailureGuard<S>): Reactions<S, never, true>;\nexport function On<S, RP>(\n predicate: EffectfulFailurePredicate<S, RP>,\n): Reactions<S, RP, false>;\nexport function On<S, RP>(\n predicate: FailureGuard<S> | EffectfulFailurePredicate<S, RP>,\n): Reactions<S, RP, boolean> {\n const guard = typeof predicate === 'function' ? predicate : predicate.guard;\n const matches = (failure: unknown): Effect.Effect<boolean, never, RP> =>\n !guard(failure)\n ? Effect.succeed(false)\n : typeof predicate === 'function'\n ? Effect.succeed(true)\n : predicate.condition(failure);\n\n const retry = (options: RetryOptions) => {\n if (!options.idempotent)\n throw new Error(\n `On(…).retry on '${options.key.dependency}' is refused: the call is ` +\n 'not idempotent, so a retry could do it twice. Make it a read or ' +\n 'give it an Idempotency-Key.',\n );\n\n return <A, E, R>(self: Effect.Effect<A, E, R>) =>\n Effect.gen(function* () {\n const budget = yield* RetryBudgetTag;\n if (!(yield* budget.admitAttempt(options.key))) {\n yield* count(retryThrottled, options.key);\n return yield* Effect.fail(new Overloaded({}));\n }\n return yield* attempt(self, budget, 1);\n });\n\n function attempt<A, E, R>(\n self: Effect.Effect<A, E, R>,\n budget: RetryBudget,\n n: number,\n ): Effect.Effect<A, E | Overloaded, R | RP> {\n return self.pipe(\n Effect.tap(() => budget.recordAccepted(options.key)),\n Effect.catch(error =>\n Effect.gen(function* () {\n // An answer, even a refusal, is the dependency working.\n if (isFailure(error) && error.family === 'business') {\n yield* budget.recordAccepted(options.key);\n return yield* Effect.fail(error);\n }\n const stop =\n !(yield* matches(error)) ||\n (isFailure(error) && STOPS_RETRIES.has(error._tag)) ||\n n >= budget.dials.maxAttempts;\n if (stop) return yield* Effect.fail(error);\n\n const wait = fullJitter(\n n,\n budget.dials.backoffBaseMs,\n budget.dials.backoffCapMs,\n );\n const remaining = yield* currentRemainingMs;\n if (remaining !== undefined && remaining <= wait)\n return yield* Effect.fail(error);\n\n if (!(yield* budget.admitRetry(options.key))) {\n yield* count(retryBudgetRejections, options.key);\n return yield* Effect.fail(error);\n }\n yield* count(retryAttempts, options.key);\n yield* Effect.sleep(wait);\n return yield* attempt(self, budget, n + 1);\n }),\n ),\n );\n }\n };\n\n return {\n retry: retry as Reactions<S, RP, boolean>['retry'],\n delay: duration => self =>\n self.pipe(\n Effect.catch(error =>\n Effect.flatMap(matches(error), matched =>\n matched\n ? Effect.sleep(duration).pipe(Effect.andThen(Effect.fail(error)))\n : Effect.fail(error),\n ),\n ),\n ),\n fallback: other => self =>\n self.pipe(\n Effect.catch(error =>\n Effect.flatMap(matches(error), matched =>\n matched\n ? (other(error as unknown as S) as Effect.Effect<\n unknown,\n unknown,\n unknown\n >)\n : Effect.fail(error),\n ),\n ),\n ) as never,\n recover: toOutcome => self =>\n self.pipe(\n Effect.catch(error =>\n Effect.flatMap(matches(error), matched =>\n matched\n ? Effect.succeed(toOutcome(error as unknown as S))\n : Effect.fail(error),\n ),\n ),\n ) as never,\n };\n}\n"],"names":["currentRemainingMs","isFailure","Overloaded","Effect","Metric","retryAttempts","retryBudgetRejections","RetryBudgetTag","retryThrottled","STOPS_RETRIES","Set","fullJitter","attempt","base","cap","Math","random","min","count","counter","key","update","withAttributes","dependency","On","predicate","guard","matches","failure","succeed","condition","retry","options","idempotent","Error","self","gen","budget","admitAttempt","fail","n","pipe","tap","recordAccepted","catch","error","family","stop","has","_tag","dials","maxAttempts","wait","backoffBaseMs","backoffCapMs","remaining","undefined","admitRetry","sleep","delay","duration","flatMap","matched","andThen","fallback","other","recover","toOutcome"],"mappings":"AAAA,SAEEA,kBAAkB,EAGlBC,SAAS,EACTC,UAAU,QACL,gBAAgB;AACvB,SAAwBC,MAAM,EAAEC,MAAM,QAAQ,SAAS;AAEvD,SACEC,aAAa,EAEbC,qBAAqB,EACrBC,cAAc,EAEdC,cAAc,QACT,2BAA2B;AAalC,gFAAgF,GAChF,MAAMC,gBAAqC,IAAIC,IAAI;IACjD;IACA;IACA;CACD;AAoDD,MAAMC,aAAa,CAACC,SAAiBC,MAAcC,MACjDC,KAAKC,MAAM,KAAKD,KAAKE,GAAG,CAACH,KAAKD,OAAO,KAAMD,CAAAA,UAAU,CAAA;AAEvD,MAAMM,QAAQ,CAACC,SAAiCC,MAC9ChB,OAAOiB,MAAM,CACXjB,OAAOkB,cAAc,CAACH,SAAS;QAAEI,YAAYH,IAAIG,UAAU;IAAC,IA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D,OAAO,CAAClC,QAAQkB,QAAQiB,CAAAA,UAC7BA,UACI3D,OAAO0B,OAAO,CAACsC,UAAUtB,UACzB1C,OAAOoC,IAAI,CAACM;IAI1B;AACF"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@entifix/transactions",
3
- "version": "0.11.0",
3
+ "version": "0.12.0",
4
4
  "description": "Commands, transactions and sagas: inbox and outbox ports, an event bus, locks, and a declarative saga runner.",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -56,8 +56,8 @@
56
56
  },
57
57
  "dependencies": {
58
58
  "@swc/helpers": "0.5.23",
59
- "@entifix/business": "0.11.0",
60
- "@entifix/core": "0.11.0"
59
+ "@entifix/business": "0.12.0",
60
+ "@entifix/core": "0.12.0"
61
61
  },
62
62
  "peerDependencies": {
63
63
  "effect": "^4.0.6"