@ddd-ts-kit/events 0.0.0-stage → 0.1.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 (230) hide show
  1. package/README.md +462 -2
  2. package/dist/asyncapi/async-api-document.d.ts +15 -0
  3. package/dist/asyncapi/async-api-document.d.ts.map +1 -0
  4. package/dist/asyncapi/async-api-document.js +2 -0
  5. package/dist/asyncapi/async-api-document.js.map +1 -0
  6. package/dist/asyncapi/async-api-info.d.ts +6 -0
  7. package/dist/asyncapi/async-api-info.d.ts.map +1 -0
  8. package/dist/asyncapi/async-api-info.js +2 -0
  9. package/dist/asyncapi/async-api-info.js.map +1 -0
  10. package/dist/asyncapi/async-api-server.d.ts +7 -0
  11. package/dist/asyncapi/async-api-server.d.ts.map +1 -0
  12. package/dist/asyncapi/async-api-server.js +2 -0
  13. package/dist/asyncapi/async-api-server.js.map +1 -0
  14. package/dist/asyncapi/check-async-api-drift.d.ts +6 -0
  15. package/dist/asyncapi/check-async-api-drift.d.ts.map +1 -0
  16. package/dist/asyncapi/check-async-api-drift.js +6 -0
  17. package/dist/asyncapi/check-async-api-drift.js.map +1 -0
  18. package/dist/asyncapi/generate-async-api.d.ts +16 -0
  19. package/dist/asyncapi/generate-async-api.d.ts.map +1 -0
  20. package/dist/asyncapi/generate-async-api.js +116 -0
  21. package/dist/asyncapi/generate-async-api.js.map +1 -0
  22. package/dist/asyncapi/stringify-async-api.d.ts +4 -0
  23. package/dist/asyncapi/stringify-async-api.d.ts.map +1 -0
  24. package/dist/asyncapi/stringify-async-api.js +5 -0
  25. package/dist/asyncapi/stringify-async-api.js.map +1 -0
  26. package/dist/asyncapi.d.ts +7 -0
  27. package/dist/asyncapi.d.ts.map +1 -0
  28. package/dist/asyncapi.js +7 -0
  29. package/dist/asyncapi.js.map +1 -0
  30. package/dist/catalog/generate-event-catalog.d.ts +12 -0
  31. package/dist/catalog/generate-event-catalog.d.ts.map +1 -0
  32. package/dist/catalog/generate-event-catalog.js +63 -0
  33. package/dist/catalog/generate-event-catalog.js.map +1 -0
  34. package/dist/catalog/payload-field.d.ts +8 -0
  35. package/dist/catalog/payload-field.d.ts.map +1 -0
  36. package/dist/catalog/payload-field.js +2 -0
  37. package/dist/catalog/payload-field.js.map +1 -0
  38. package/dist/catalog/payload-fields.d.ts +7 -0
  39. package/dist/catalog/payload-fields.d.ts.map +1 -0
  40. package/dist/catalog/payload-fields.js +105 -0
  41. package/dist/catalog/payload-fields.js.map +1 -0
  42. package/dist/definition/any-integration-event-definition.d.ts +4 -0
  43. package/dist/definition/any-integration-event-definition.d.ts.map +1 -0
  44. package/dist/definition/any-integration-event-definition.js +2 -0
  45. package/dist/definition/any-integration-event-definition.js.map +1 -0
  46. package/dist/definition/define-integration-event.d.ts +15 -0
  47. package/dist/definition/define-integration-event.d.ts.map +1 -0
  48. package/dist/definition/define-integration-event.js +73 -0
  49. package/dist/definition/define-integration-event.js.map +1 -0
  50. package/dist/definition/event-meta.d.ts +7 -0
  51. package/dist/definition/event-meta.d.ts.map +1 -0
  52. package/dist/definition/event-meta.js +2 -0
  53. package/dist/definition/event-meta.js.map +1 -0
  54. package/dist/definition/event-parse-error.d.ts +14 -0
  55. package/dist/definition/event-parse-error.d.ts.map +1 -0
  56. package/dist/definition/event-parse-error.js +2 -0
  57. package/dist/definition/event-parse-error.js.map +1 -0
  58. package/dist/definition/integration-event-definition.d.ts +20 -0
  59. package/dist/definition/integration-event-definition.d.ts.map +1 -0
  60. package/dist/definition/integration-event-definition.js +2 -0
  61. package/dist/definition/integration-event-definition.js.map +1 -0
  62. package/dist/definition/invalid-event-definition-error.d.ts +4 -0
  63. package/dist/definition/invalid-event-definition-error.d.ts.map +1 -0
  64. package/dist/definition/invalid-event-definition-error.js +7 -0
  65. package/dist/definition/invalid-event-definition-error.js.map +1 -0
  66. package/dist/definition/invalid-event-payload-error.d.ts +9 -0
  67. package/dist/definition/invalid-event-payload-error.d.ts.map +1 -0
  68. package/dist/definition/invalid-event-payload-error.js +16 -0
  69. package/dist/definition/invalid-event-payload-error.js.map +1 -0
  70. package/dist/definition/payload-of.d.ts +3 -0
  71. package/dist/definition/payload-of.d.ts.map +1 -0
  72. package/dist/definition/payload-of.js +2 -0
  73. package/dist/definition/payload-of.js.map +1 -0
  74. package/dist/index.d.ts +37 -0
  75. package/dist/index.d.ts.map +1 -0
  76. package/dist/index.js +37 -0
  77. package/dist/index.js.map +1 -0
  78. package/dist/internal/json-schema/as-schema.d.ts +3 -0
  79. package/dist/internal/json-schema/as-schema.d.ts.map +1 -0
  80. package/dist/internal/json-schema/as-schema.js +5 -0
  81. package/dist/internal/json-schema/as-schema.js.map +1 -0
  82. package/dist/internal/json-schema/compare-text.d.ts +2 -0
  83. package/dist/internal/json-schema/compare-text.d.ts.map +1 -0
  84. package/dist/internal/json-schema/compare-text.js +5 -0
  85. package/dist/internal/json-schema/compare-text.js.map +1 -0
  86. package/dist/internal/json-schema/is-record.d.ts +2 -0
  87. package/dist/internal/json-schema/is-record.d.ts.map +1 -0
  88. package/dist/internal/json-schema/is-record.js +4 -0
  89. package/dist/internal/json-schema/is-record.js.map +1 -0
  90. package/dist/internal/json-schema/local-ref-name.d.ts +3 -0
  91. package/dist/internal/json-schema/local-ref-name.d.ts.map +1 -0
  92. package/dist/internal/json-schema/local-ref-name.js +6 -0
  93. package/dist/internal/json-schema/local-ref-name.js.map +1 -0
  94. package/dist/internal/json-schema/rewrite-local-refs.d.ts +2 -0
  95. package/dist/internal/json-schema/rewrite-local-refs.d.ts.map +1 -0
  96. package/dist/internal/json-schema/rewrite-local-refs.js +19 -0
  97. package/dist/internal/json-schema/rewrite-local-refs.js.map +1 -0
  98. package/dist/internal/json-schema/sort-keys.d.ts +2 -0
  99. package/dist/internal/json-schema/sort-keys.d.ts.map +1 -0
  100. package/dist/internal/json-schema/sort-keys.js +5 -0
  101. package/dist/internal/json-schema/sort-keys.js.map +1 -0
  102. package/dist/internal/json-schema/split-definitions.d.ts +8 -0
  103. package/dist/internal/json-schema/split-definitions.d.ts.map +1 -0
  104. package/dist/internal/json-schema/split-definitions.js +13 -0
  105. package/dist/internal/json-schema/split-definitions.js.map +1 -0
  106. package/dist/outbox/duplicate-outbox-event-error.d.ts +5 -0
  107. package/dist/outbox/duplicate-outbox-event-error.d.ts.map +1 -0
  108. package/dist/outbox/duplicate-outbox-event-error.js +8 -0
  109. package/dist/outbox/duplicate-outbox-event-error.js.map +1 -0
  110. package/dist/outbox/in-memory-outbox-store.d.ts +32 -0
  111. package/dist/outbox/in-memory-outbox-store.d.ts.map +1 -0
  112. package/dist/outbox/in-memory-outbox-store.js +121 -0
  113. package/dist/outbox/in-memory-outbox-store.js.map +1 -0
  114. package/dist/outbox/outbox-publisher.d.ts +14 -0
  115. package/dist/outbox/outbox-publisher.d.ts.map +1 -0
  116. package/dist/outbox/outbox-publisher.js +18 -0
  117. package/dist/outbox/outbox-publisher.js.map +1 -0
  118. package/dist/outbox/outbox-record.d.ts +14 -0
  119. package/dist/outbox/outbox-record.d.ts.map +1 -0
  120. package/dist/outbox/outbox-record.js +2 -0
  121. package/dist/outbox/outbox-record.js.map +1 -0
  122. package/dist/outbox/outbox-stats.d.ts +9 -0
  123. package/dist/outbox/outbox-stats.d.ts.map +1 -0
  124. package/dist/outbox/outbox-stats.js +2 -0
  125. package/dist/outbox/outbox-stats.js.map +1 -0
  126. package/dist/outbox/outbox-status.d.ts +2 -0
  127. package/dist/outbox/outbox-status.d.ts.map +1 -0
  128. package/dist/outbox/outbox-status.js +2 -0
  129. package/dist/outbox/outbox-status.js.map +1 -0
  130. package/dist/outbox/outbox-store.d.ts +33 -0
  131. package/dist/outbox/outbox-store.d.ts.map +1 -0
  132. package/dist/outbox/outbox-store.js +13 -0
  133. package/dist/outbox/outbox-store.js.map +1 -0
  134. package/dist/publishing/unknown-event-error.d.ts +7 -0
  135. package/dist/publishing/unknown-event-error.d.ts.map +1 -0
  136. package/dist/publishing/unknown-event-error.js +12 -0
  137. package/dist/publishing/unknown-event-error.js.map +1 -0
  138. package/dist/publishing/validating-publisher.d.ts +12 -0
  139. package/dist/publishing/validating-publisher.d.ts.map +1 -0
  140. package/dist/publishing/validating-publisher.js +33 -0
  141. package/dist/publishing/validating-publisher.js.map +1 -0
  142. package/dist/registry/create-event-registry.d.ts +4 -0
  143. package/dist/registry/create-event-registry.d.ts.map +1 -0
  144. package/dist/registry/create-event-registry.js +5 -0
  145. package/dist/registry/create-event-registry.js.map +1 -0
  146. package/dist/registry/duplicate-event-definition-error.d.ts +4 -0
  147. package/dist/registry/duplicate-event-definition-error.d.ts.map +1 -0
  148. package/dist/registry/duplicate-event-definition-error.js +7 -0
  149. package/dist/registry/duplicate-event-definition-error.js.map +1 -0
  150. package/dist/registry/event-registry.d.ts +11 -0
  151. package/dist/registry/event-registry.d.ts.map +1 -0
  152. package/dist/registry/event-registry.js +33 -0
  153. package/dist/registry/event-registry.js.map +1 -0
  154. package/dist/relay/claim-window.d.ts +6 -0
  155. package/dist/relay/claim-window.d.ts.map +1 -0
  156. package/dist/relay/claim-window.js +2 -0
  157. package/dist/relay/claim-window.js.map +1 -0
  158. package/dist/relay/error-code.d.ts +6 -0
  159. package/dist/relay/error-code.d.ts.map +1 -0
  160. package/dist/relay/error-code.js +16 -0
  161. package/dist/relay/error-code.js.map +1 -0
  162. package/dist/relay/event-key.d.ts +3 -0
  163. package/dist/relay/event-key.d.ts.map +1 -0
  164. package/dist/relay/event-key.js +2 -0
  165. package/dist/relay/event-key.js.map +1 -0
  166. package/dist/relay/hold-until.d.ts +3 -0
  167. package/dist/relay/hold-until.d.ts.map +1 -0
  168. package/dist/relay/hold-until.js +2 -0
  169. package/dist/relay/hold-until.js.map +1 -0
  170. package/dist/relay/in-memory-relay-signal.d.ts +9 -0
  171. package/dist/relay/in-memory-relay-signal.d.ts.map +1 -0
  172. package/dist/relay/in-memory-relay-signal.js +13 -0
  173. package/dist/relay/in-memory-relay-signal.js.map +1 -0
  174. package/dist/relay/key-order.d.ts +35 -0
  175. package/dist/relay/key-order.d.ts.map +1 -0
  176. package/dist/relay/key-order.js +102 -0
  177. package/dist/relay/key-order.js.map +1 -0
  178. package/dist/relay/keyed-record.d.ts +6 -0
  179. package/dist/relay/keyed-record.d.ts.map +1 -0
  180. package/dist/relay/keyed-record.js +2 -0
  181. package/dist/relay/keyed-record.js.map +1 -0
  182. package/dist/relay/outbox-backoff.d.ts +9 -0
  183. package/dist/relay/outbox-backoff.d.ts.map +1 -0
  184. package/dist/relay/outbox-backoff.js +2 -0
  185. package/dist/relay/outbox-backoff.js.map +1 -0
  186. package/dist/relay/outbox-ordering.d.ts +7 -0
  187. package/dist/relay/outbox-ordering.d.ts.map +1 -0
  188. package/dist/relay/outbox-ordering.js +2 -0
  189. package/dist/relay/outbox-ordering.js.map +1 -0
  190. package/dist/relay/outbox-relay-failure.d.ts +12 -0
  191. package/dist/relay/outbox-relay-failure.d.ts.map +1 -0
  192. package/dist/relay/outbox-relay-failure.js +2 -0
  193. package/dist/relay/outbox-relay-failure.js.map +1 -0
  194. package/dist/relay/outbox-relay.d.ts +85 -0
  195. package/dist/relay/outbox-relay.d.ts.map +1 -0
  196. package/dist/relay/outbox-relay.js +193 -0
  197. package/dist/relay/outbox-relay.js.map +1 -0
  198. package/dist/relay/record-group.d.ts +6 -0
  199. package/dist/relay/record-group.d.ts.map +1 -0
  200. package/dist/relay/record-group.js +2 -0
  201. package/dist/relay/record-group.js.map +1 -0
  202. package/dist/relay/relay-signal.d.ts +15 -0
  203. package/dist/relay/relay-signal.d.ts.map +1 -0
  204. package/dist/relay/relay-signal.js +12 -0
  205. package/dist/relay/relay-signal.js.map +1 -0
  206. package/dist/subscription/consume.d.ts +18 -0
  207. package/dist/subscription/consume.d.ts.map +1 -0
  208. package/dist/subscription/consume.js +10 -0
  209. package/dist/subscription/consume.js.map +1 -0
  210. package/dist/subscription/event-scope-options.d.ts +13 -0
  211. package/dist/subscription/event-scope-options.d.ts.map +1 -0
  212. package/dist/subscription/event-scope-options.js +2 -0
  213. package/dist/subscription/event-scope-options.js.map +1 -0
  214. package/dist/subscription/event-subscription.d.ts +6 -0
  215. package/dist/subscription/event-subscription.d.ts.map +1 -0
  216. package/dist/subscription/event-subscription.js +2 -0
  217. package/dist/subscription/event-subscription.js.map +1 -0
  218. package/dist/subscription/on.d.ts +26 -0
  219. package/dist/subscription/on.d.ts.map +1 -0
  220. package/dist/subscription/on.js +62 -0
  221. package/dist/subscription/on.js.map +1 -0
  222. package/dist/subscription/releasable-processed-event-store.d.ts +14 -0
  223. package/dist/subscription/releasable-processed-event-store.d.ts.map +1 -0
  224. package/dist/subscription/releasable-processed-event-store.js +2 -0
  225. package/dist/subscription/releasable-processed-event-store.js.map +1 -0
  226. package/dist/subscription/subscribe-all.d.ts +5 -0
  227. package/dist/subscription/subscribe-all.d.ts.map +1 -0
  228. package/dist/subscription/subscribe-all.js +12 -0
  229. package/dist/subscription/subscribe-all.js.map +1 -0
  230. package/package.json +37 -4
@@ -0,0 +1 @@
1
+ {"version":3,"file":"invalid-event-definition-error.d.ts","sourceRoot":"","sources":["../../src/definition/invalid-event-definition-error.ts"],"names":[],"mappings":"AAAA,qBAAa,2BAA4B,SAAQ,KAAK;IACpD,YAAY,OAAO,EAAE,MAAM,EAG1B;CACF"}
@@ -0,0 +1,7 @@
1
+ export class InvalidEventDefinitionError extends Error {
2
+ constructor(message) {
3
+ super(message);
4
+ this.name = 'InvalidEventDefinitionError';
5
+ }
6
+ }
7
+ //# sourceMappingURL=invalid-event-definition-error.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"invalid-event-definition-error.js","sourceRoot":"","sources":["../../src/definition/invalid-event-definition-error.ts"],"names":[],"mappings":"AAAA,MAAM,OAAO,2BAA4B,SAAQ,KAAK;IACpD,YAAY,OAAe;QACzB,KAAK,CAAC,OAAO,CAAC,CAAC;QACf,IAAI,CAAC,IAAI,GAAG,6BAA6B,CAAC;IAC5C,CAAC;CACF"}
@@ -0,0 +1,9 @@
1
+ import type { ValidationIssue } from '@ddd-ts-kit/validation';
2
+ export declare class InvalidEventPayloadError extends Error {
3
+ readonly code = "INVALID_EVENT_PAYLOAD";
4
+ readonly eventType: string;
5
+ readonly eventVersion: number;
6
+ readonly issues: readonly ValidationIssue[];
7
+ constructor(eventType: string, eventVersion: number, issues: readonly ValidationIssue[]);
8
+ }
9
+ //# sourceMappingURL=invalid-event-payload-error.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"invalid-event-payload-error.d.ts","sourceRoot":"","sources":["../../src/definition/invalid-event-payload-error.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAE9D,qBAAa,wBAAyB,SAAQ,KAAK;IACjD,QAAQ,CAAC,IAAI,2BAA2B;IAExC,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAE3B,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAE9B,QAAQ,CAAC,MAAM,EAAE,SAAS,eAAe,EAAE,CAAC;IAE5C,YAAY,SAAS,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,EAAE,MAAM,EAAE,SAAS,eAAe,EAAE,EAStF;CACF"}
@@ -0,0 +1,16 @@
1
+ export class InvalidEventPayloadError extends Error {
2
+ code = 'INVALID_EVENT_PAYLOAD';
3
+ eventType;
4
+ eventVersion;
5
+ issues;
6
+ constructor(eventType, eventVersion, issues) {
7
+ // Paths and codes only: issue messages may quote the offending data.
8
+ const summary = issues.map((issue) => `${issue.path || '(payload)'}: ${issue.code}`).join(', ');
9
+ super(`Invalid payload for ${eventType} v${eventVersion} (${summary})`);
10
+ this.name = 'InvalidEventPayloadError';
11
+ this.eventType = eventType;
12
+ this.eventVersion = eventVersion;
13
+ this.issues = issues;
14
+ }
15
+ }
16
+ //# sourceMappingURL=invalid-event-payload-error.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"invalid-event-payload-error.js","sourceRoot":"","sources":["../../src/definition/invalid-event-payload-error.ts"],"names":[],"mappings":"AAEA,MAAM,OAAO,wBAAyB,SAAQ,KAAK;IACxC,IAAI,GAAG,uBAAuB,CAAC;IAE/B,SAAS,CAAS;IAElB,YAAY,CAAS;IAErB,MAAM,CAA6B;IAE5C,YAAY,SAAiB,EAAE,YAAoB,EAAE,MAAkC;QACrF,qEAAqE;QACrE,MAAM,OAAO,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,GAAG,KAAK,CAAC,IAAI,IAAI,WAAW,KAAK,KAAK,CAAC,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAEhG,KAAK,CAAC,uBAAuB,SAAS,KAAK,YAAY,KAAK,OAAO,GAAG,CAAC,CAAC;QACxE,IAAI,CAAC,IAAI,GAAG,0BAA0B,CAAC;QACvC,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;QAC3B,IAAI,CAAC,YAAY,GAAG,YAAY,CAAC;QACjC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;CACF"}
@@ -0,0 +1,3 @@
1
+ import type { IntegrationEventDefinition } from './integration-event-definition.js';
2
+ export type PayloadOf<D> = D extends IntegrationEventDefinition<infer P> ? P : never;
3
+ //# sourceMappingURL=payload-of.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"payload-of.d.ts","sourceRoot":"","sources":["../../src/definition/payload-of.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,mCAAmC,CAAC;AAEpF,MAAM,MAAM,SAAS,CAAC,CAAC,IAAI,CAAC,SAAS,0BAA0B,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=payload-of.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"payload-of.js","sourceRoot":"","sources":["../../src/definition/payload-of.ts"],"names":[],"mappings":""}
@@ -0,0 +1,37 @@
1
+ export * from './definition/any-integration-event-definition.js';
2
+ export * from './definition/define-integration-event.js';
3
+ export * from './definition/event-meta.js';
4
+ export * from './definition/event-parse-error.js';
5
+ export * from './definition/integration-event-definition.js';
6
+ export * from './definition/invalid-event-definition-error.js';
7
+ export * from './definition/invalid-event-payload-error.js';
8
+ export * from './definition/payload-of.js';
9
+ export * from './registry/create-event-registry.js';
10
+ export * from './registry/duplicate-event-definition-error.js';
11
+ export * from './registry/event-registry.js';
12
+ export * from './subscription/consume.js';
13
+ export * from './subscription/event-scope-options.js';
14
+ export * from './subscription/event-subscription.js';
15
+ export * from './subscription/on.js';
16
+ export * from './subscription/releasable-processed-event-store.js';
17
+ export * from './subscription/subscribe-all.js';
18
+ export * from './publishing/unknown-event-error.js';
19
+ export * from './publishing/validating-publisher.js';
20
+ export * from './outbox/duplicate-outbox-event-error.js';
21
+ export * from './outbox/in-memory-outbox-store.js';
22
+ export * from './outbox/outbox-publisher.js';
23
+ export * from './outbox/outbox-record.js';
24
+ export * from './outbox/outbox-stats.js';
25
+ export * from './outbox/outbox-status.js';
26
+ export * from './outbox/outbox-store.js';
27
+ export * from './relay/error-code.js';
28
+ export * from './relay/in-memory-relay-signal.js';
29
+ export * from './relay/outbox-backoff.js';
30
+ export * from './relay/outbox-ordering.js';
31
+ export * from './relay/outbox-relay-failure.js';
32
+ export * from './relay/outbox-relay.js';
33
+ export * from './relay/relay-signal.js';
34
+ export * from './catalog/generate-event-catalog.js';
35
+ export * from './catalog/payload-field.js';
36
+ export * from './catalog/payload-fields.js';
37
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,kDAAkD,CAAC;AACjE,cAAc,0CAA0C,CAAC;AACzD,cAAc,4BAA4B,CAAC;AAC3C,cAAc,mCAAmC,CAAC;AAClD,cAAc,8CAA8C,CAAC;AAC7D,cAAc,gDAAgD,CAAC;AAC/D,cAAc,6CAA6C,CAAC;AAC5D,cAAc,4BAA4B,CAAC;AAC3C,cAAc,qCAAqC,CAAC;AACpD,cAAc,gDAAgD,CAAC;AAC/D,cAAc,8BAA8B,CAAC;AAC7C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,uCAAuC,CAAC;AACtD,cAAc,sCAAsC,CAAC;AACrD,cAAc,sBAAsB,CAAC;AACrC,cAAc,oDAAoD,CAAC;AACnE,cAAc,iCAAiC,CAAC;AAChD,cAAc,qCAAqC,CAAC;AACpD,cAAc,sCAAsC,CAAC;AACrD,cAAc,0CAA0C,CAAC;AACzD,cAAc,oCAAoC,CAAC;AACnD,cAAc,8BAA8B,CAAC;AAC7C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,0BAA0B,CAAC;AACzC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,0BAA0B,CAAC;AACzC,cAAc,uBAAuB,CAAC;AACtC,cAAc,mCAAmC,CAAC;AAClD,cAAc,2BAA2B,CAAC;AAC1C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,iCAAiC,CAAC;AAChD,cAAc,yBAAyB,CAAC;AACxC,cAAc,yBAAyB,CAAC;AACxC,cAAc,qCAAqC,CAAC;AACpD,cAAc,4BAA4B,CAAC;AAC3C,cAAc,6BAA6B,CAAC"}
package/dist/index.js ADDED
@@ -0,0 +1,37 @@
1
+ export * from './definition/any-integration-event-definition.js';
2
+ export * from './definition/define-integration-event.js';
3
+ export * from './definition/event-meta.js';
4
+ export * from './definition/event-parse-error.js';
5
+ export * from './definition/integration-event-definition.js';
6
+ export * from './definition/invalid-event-definition-error.js';
7
+ export * from './definition/invalid-event-payload-error.js';
8
+ export * from './definition/payload-of.js';
9
+ export * from './registry/create-event-registry.js';
10
+ export * from './registry/duplicate-event-definition-error.js';
11
+ export * from './registry/event-registry.js';
12
+ export * from './subscription/consume.js';
13
+ export * from './subscription/event-scope-options.js';
14
+ export * from './subscription/event-subscription.js';
15
+ export * from './subscription/on.js';
16
+ export * from './subscription/releasable-processed-event-store.js';
17
+ export * from './subscription/subscribe-all.js';
18
+ export * from './publishing/unknown-event-error.js';
19
+ export * from './publishing/validating-publisher.js';
20
+ export * from './outbox/duplicate-outbox-event-error.js';
21
+ export * from './outbox/in-memory-outbox-store.js';
22
+ export * from './outbox/outbox-publisher.js';
23
+ export * from './outbox/outbox-record.js';
24
+ export * from './outbox/outbox-stats.js';
25
+ export * from './outbox/outbox-status.js';
26
+ export * from './outbox/outbox-store.js';
27
+ export * from './relay/error-code.js';
28
+ export * from './relay/in-memory-relay-signal.js';
29
+ export * from './relay/outbox-backoff.js';
30
+ export * from './relay/outbox-ordering.js';
31
+ export * from './relay/outbox-relay-failure.js';
32
+ export * from './relay/outbox-relay.js';
33
+ export * from './relay/relay-signal.js';
34
+ export * from './catalog/generate-event-catalog.js';
35
+ export * from './catalog/payload-field.js';
36
+ export * from './catalog/payload-fields.js';
37
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,kDAAkD,CAAC;AACjE,cAAc,0CAA0C,CAAC;AACzD,cAAc,4BAA4B,CAAC;AAC3C,cAAc,mCAAmC,CAAC;AAClD,cAAc,8CAA8C,CAAC;AAC7D,cAAc,gDAAgD,CAAC;AAC/D,cAAc,6CAA6C,CAAC;AAC5D,cAAc,4BAA4B,CAAC;AAC3C,cAAc,qCAAqC,CAAC;AACpD,cAAc,gDAAgD,CAAC;AAC/D,cAAc,8BAA8B,CAAC;AAC7C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,uCAAuC,CAAC;AACtD,cAAc,sCAAsC,CAAC;AACrD,cAAc,sBAAsB,CAAC;AACrC,cAAc,oDAAoD,CAAC;AACnE,cAAc,iCAAiC,CAAC;AAChD,cAAc,qCAAqC,CAAC;AACpD,cAAc,sCAAsC,CAAC;AACrD,cAAc,0CAA0C,CAAC;AACzD,cAAc,oCAAoC,CAAC;AACnD,cAAc,8BAA8B,CAAC;AAC7C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,0BAA0B,CAAC;AACzC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,0BAA0B,CAAC;AACzC,cAAc,uBAAuB,CAAC;AACtC,cAAc,mCAAmC,CAAC;AAClD,cAAc,2BAA2B,CAAC;AAC1C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,iCAAiC,CAAC;AAChD,cAAc,yBAAyB,CAAC;AACxC,cAAc,yBAAyB,CAAC;AACxC,cAAc,qCAAqC,CAAC;AACpD,cAAc,4BAA4B,CAAC;AAC3C,cAAc,6BAA6B,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { JsonSchema } from '@ddd-ts-kit/validation';
2
+ export declare function asSchema(node: unknown): JsonSchema;
3
+ //# sourceMappingURL=as-schema.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"as-schema.d.ts","sourceRoot":"","sources":["../../../src/internal/json-schema/as-schema.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAGzD,wBAAgB,QAAQ,CAAC,IAAI,EAAE,OAAO,GAAG,UAAU,CAElD"}
@@ -0,0 +1,5 @@
1
+ import { isRecord } from './is-record.js';
2
+ export function asSchema(node) {
3
+ return isRecord(node) ? node : {};
4
+ }
5
+ //# sourceMappingURL=as-schema.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"as-schema.js","sourceRoot":"","sources":["../../../src/internal/json-schema/as-schema.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAE1C,MAAM,UAAU,QAAQ,CAAC,IAAa;IACpC,OAAO,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC;AACpC,CAAC"}
@@ -0,0 +1,2 @@
1
+ export declare function compareText(a: string, b: string): number;
2
+ //# sourceMappingURL=compare-text.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"compare-text.d.ts","sourceRoot":"","sources":["../../../src/internal/json-schema/compare-text.ts"],"names":[],"mappings":"AACA,wBAAgB,WAAW,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM,CAExD"}
@@ -0,0 +1,5 @@
1
+ // Code-unit order, not locale order: generated files must not depend on the machine's locale.
2
+ export function compareText(a, b) {
3
+ return a < b ? -1 : a > b ? 1 : 0;
4
+ }
5
+ //# sourceMappingURL=compare-text.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"compare-text.js","sourceRoot":"","sources":["../../../src/internal/json-schema/compare-text.ts"],"names":[],"mappings":"AAAA,8FAA8F;AAC9F,MAAM,UAAU,WAAW,CAAC,CAAS,EAAE,CAAS;IAC9C,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AACpC,CAAC"}
@@ -0,0 +1,2 @@
1
+ export declare function isRecord(value: unknown): value is Record<string, unknown>;
2
+ //# sourceMappingURL=is-record.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"is-record.d.ts","sourceRoot":"","sources":["../../../src/internal/json-schema/is-record.ts"],"names":[],"mappings":"AAAA,wBAAgB,QAAQ,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAEzE"}
@@ -0,0 +1,4 @@
1
+ export function isRecord(value) {
2
+ return typeof value === 'object' && value !== null && !Array.isArray(value);
3
+ }
4
+ //# sourceMappingURL=is-record.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"is-record.js","sourceRoot":"","sources":["../../../src/internal/json-schema/is-record.ts"],"names":[],"mappings":"AAAA,MAAM,UAAU,QAAQ,CAAC,KAAc;IACrC,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;AAC9E,CAAC"}
@@ -0,0 +1,3 @@
1
+ /** The name a local pointer (`#/$defs/Name`) designates, if it is one. */
2
+ export declare function localRefName(ref: unknown): string | undefined;
3
+ //# sourceMappingURL=local-ref-name.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"local-ref-name.d.ts","sourceRoot":"","sources":["../../../src/internal/json-schema/local-ref-name.ts"],"names":[],"mappings":"AAEA,0EAA0E;AAC1E,wBAAgB,YAAY,CAAC,GAAG,EAAE,OAAO,GAAG,MAAM,GAAG,SAAS,CAE7D"}
@@ -0,0 +1,6 @@
1
+ const LOCAL_REF = /^#\/(?:\$defs|definitions)\/(.+)$/;
2
+ /** The name a local pointer (`#/$defs/Name`) designates, if it is one. */
3
+ export function localRefName(ref) {
4
+ return typeof ref === 'string' ? LOCAL_REF.exec(ref)?.[1] : undefined;
5
+ }
6
+ //# sourceMappingURL=local-ref-name.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"local-ref-name.js","sourceRoot":"","sources":["../../../src/internal/json-schema/local-ref-name.ts"],"names":[],"mappings":"AAAA,MAAM,SAAS,GAAG,mCAAmC,CAAC;AAEtD,0EAA0E;AAC1E,MAAM,UAAU,YAAY,CAAC,GAAY;IACvC,OAAO,OAAO,GAAG,KAAK,QAAQ,CAAC,CAAC,CAAC,SAAS,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;AACxE,CAAC"}
@@ -0,0 +1,2 @@
1
+ export declare function rewriteLocalRefs(node: unknown, rename: (name: string) => string | undefined): unknown;
2
+ //# sourceMappingURL=rewrite-local-refs.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rewrite-local-refs.d.ts","sourceRoot":"","sources":["../../../src/internal/json-schema/rewrite-local-refs.ts"],"names":[],"mappings":"AAGA,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,OAAO,EAAE,MAAM,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,GAAG,SAAS,GAAG,OAAO,CAqBrG"}
@@ -0,0 +1,19 @@
1
+ import { isRecord } from './is-record.js';
2
+ import { localRefName } from './local-ref-name.js';
3
+ export function rewriteLocalRefs(node, rename) {
4
+ if (Array.isArray(node)) {
5
+ return node.map((item) => rewriteLocalRefs(item, rename));
6
+ }
7
+ if (!isRecord(node)) {
8
+ return node;
9
+ }
10
+ return Object.fromEntries(Object.entries(node).map(([key, value]) => {
11
+ if (key === '$ref') {
12
+ const name = localRefName(value);
13
+ const target = name === undefined ? undefined : rename(name);
14
+ return [key, target ?? value];
15
+ }
16
+ return [key, rewriteLocalRefs(value, rename)];
17
+ }));
18
+ }
19
+ //# sourceMappingURL=rewrite-local-refs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rewrite-local-refs.js","sourceRoot":"","sources":["../../../src/internal/json-schema/rewrite-local-refs.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAC1C,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAEnD,MAAM,UAAU,gBAAgB,CAAC,IAAa,EAAE,MAA4C;IAC1F,IAAI,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,CAAC;QACxB,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,gBAAgB,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC,CAAC;IAC5D,CAAC;IAED,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC;QACpB,OAAO,IAAI,CAAC;IACd,CAAC;IAED,OAAO,MAAM,CAAC,WAAW,CACvB,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,EAAE,KAAK,CAAC,EAAE,EAAE;QACxC,IAAI,GAAG,KAAK,MAAM,EAAE,CAAC;YACnB,MAAM,IAAI,GAAG,YAAY,CAAC,KAAK,CAAC,CAAC;YACjC,MAAM,MAAM,GAAG,IAAI,KAAK,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;YAE7D,OAAO,CAAC,GAAG,EAAE,MAAM,IAAI,KAAK,CAAC,CAAC;QAChC,CAAC;QAED,OAAO,CAAC,GAAG,EAAE,gBAAgB,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC,CAAC;IAChD,CAAC,CAAC,CACH,CAAC;AACJ,CAAC"}
@@ -0,0 +1,2 @@
1
+ export declare function sortKeys<T>(record: Readonly<Record<string, T>>): Record<string, T>;
2
+ //# sourceMappingURL=sort-keys.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sort-keys.d.ts","sourceRoot":"","sources":["../../../src/internal/json-schema/sort-keys.ts"],"names":[],"mappings":"AAEA,wBAAgB,QAAQ,CAAC,CAAC,EAAE,MAAM,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,CAAC,CAAC,CAElF"}
@@ -0,0 +1,5 @@
1
+ import { compareText } from './compare-text.js';
2
+ export function sortKeys(record) {
3
+ return Object.fromEntries(Object.entries(record).sort(([a], [b]) => compareText(a, b)));
4
+ }
5
+ //# sourceMappingURL=sort-keys.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sort-keys.js","sourceRoot":"","sources":["../../../src/internal/json-schema/sort-keys.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAEhD,MAAM,UAAU,QAAQ,CAAI,MAAmC;IAC7D,OAAO,MAAM,CAAC,WAAW,CAAC,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,WAAW,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;AAC1F,CAAC"}
@@ -0,0 +1,8 @@
1
+ import type { JsonSchema } from '@ddd-ts-kit/validation';
2
+ export interface SplitSchema {
3
+ readonly schema: JsonSchema;
4
+ readonly definitions: Readonly<Record<string, unknown>>;
5
+ }
6
+ /** Separates a schema from its dialect marker and its local definitions. */
7
+ export declare function splitDefinitions(source: JsonSchema): SplitSchema;
8
+ //# sourceMappingURL=split-definitions.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"split-definitions.d.ts","sourceRoot":"","sources":["../../../src/internal/json-schema/split-definitions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAGzD,MAAM,WAAW,WAAW;IAC1B,QAAQ,CAAC,MAAM,EAAE,UAAU,CAAC;IAC5B,QAAQ,CAAC,WAAW,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;CACzD;AAED,4EAA4E;AAC5E,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,UAAU,GAAG,WAAW,CAUhE"}
@@ -0,0 +1,13 @@
1
+ import { isRecord } from './is-record.js';
2
+ /** Separates a schema from its dialect marker and its local definitions. */
3
+ export function splitDefinitions(source) {
4
+ const { $schema: _dialect, $defs, definitions, ...schema } = source;
5
+ return {
6
+ schema,
7
+ definitions: {
8
+ ...(isRecord(definitions) ? definitions : {}),
9
+ ...(isRecord($defs) ? $defs : {}),
10
+ },
11
+ };
12
+ }
13
+ //# sourceMappingURL=split-definitions.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"split-definitions.js","sourceRoot":"","sources":["../../../src/internal/json-schema/split-definitions.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAO1C,4EAA4E;AAC5E,MAAM,UAAU,gBAAgB,CAAC,MAAkB;IACjD,MAAM,EAAE,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,WAAW,EAAE,GAAG,MAAM,EAAE,GAAG,MAAM,CAAC;IAEpE,OAAO;QACL,MAAM;QACN,WAAW,EAAE;YACX,GAAG,CAAC,QAAQ,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,EAAE,CAAC;YAC7C,GAAG,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC;SAClC;KACF,CAAC;AACJ,CAAC"}
@@ -0,0 +1,5 @@
1
+ export declare class DuplicateOutboxEventError extends Error {
2
+ readonly code = "DUPLICATE_OUTBOX_EVENT";
3
+ constructor(eventId: string);
4
+ }
5
+ //# sourceMappingURL=duplicate-outbox-event-error.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"duplicate-outbox-event-error.d.ts","sourceRoot":"","sources":["../../src/outbox/duplicate-outbox-event-error.ts"],"names":[],"mappings":"AAAA,qBAAa,yBAA0B,SAAQ,KAAK;IAClD,QAAQ,CAAC,IAAI,4BAA4B;IAEzC,YAAY,OAAO,EAAE,MAAM,EAG1B;CACF"}
@@ -0,0 +1,8 @@
1
+ export class DuplicateOutboxEventError extends Error {
2
+ code = 'DUPLICATE_OUTBOX_EVENT';
3
+ constructor(eventId) {
4
+ super(`Event ${eventId} is already in the outbox`);
5
+ this.name = 'DuplicateOutboxEventError';
6
+ }
7
+ }
8
+ //# sourceMappingURL=duplicate-outbox-event-error.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"duplicate-outbox-event-error.js","sourceRoot":"","sources":["../../src/outbox/duplicate-outbox-event-error.ts"],"names":[],"mappings":"AAAA,MAAM,OAAO,yBAA0B,SAAQ,KAAK;IACzC,IAAI,GAAG,wBAAwB,CAAC;IAEzC,YAAY,OAAe;QACzB,KAAK,CAAC,SAAS,OAAO,2BAA2B,CAAC,CAAC;QACnD,IAAI,CAAC,IAAI,GAAG,2BAA2B,CAAC;IAC1C,CAAC;CACF"}
@@ -0,0 +1,32 @@
1
+ import type { IntegrationEvent } from '@ddd-ts-kit/kernel';
2
+ import type { InMemoryRelaySignal } from '../relay/in-memory-relay-signal.js';
3
+ import type { OutboxRecord } from './outbox-record.js';
4
+ import type { OutboxStats } from './outbox-stats.js';
5
+ import type { OutboxStore } from './outbox-store.js';
6
+ export interface InMemoryOutboxStoreOptions {
7
+ /** How long a claimed record stays invisible to other claims. Default 30000. */
8
+ readonly leaseMs?: number;
9
+ /** Notified after each append, to wake a relay built with `wakeOn`. */
10
+ readonly signal?: InMemoryRelaySignal;
11
+ }
12
+ /** Reference implementation, for tests and single-process apps. Not transactional. */
13
+ export declare class InMemoryOutboxStore implements OutboxStore {
14
+ private readonly storedRecords;
15
+ private readonly leaseMs;
16
+ private readonly signal;
17
+ private sequence;
18
+ constructor(options?: InMemoryOutboxStoreOptions);
19
+ append(events: readonly IntegrationEvent[]): Promise<void>;
20
+ claimBatch(limit: number, now: Date): Promise<OutboxRecord[]>;
21
+ markPublished(ids: readonly string[], at: Date): Promise<void>;
22
+ markFailed(id: string, error: {
23
+ readonly code: string;
24
+ }, nextAttemptAt: Date | null): Promise<void>;
25
+ retryDead(ids: readonly string[], now: Date): Promise<number>;
26
+ purgePublished(before: Date): Promise<number>;
27
+ stats(): Promise<OutboxStats>;
28
+ /** Every record in insertion order, for assertions. */
29
+ records(): OutboxRecord[];
30
+ private assertNotStored;
31
+ }
32
+ //# sourceMappingURL=in-memory-outbox-store.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"in-memory-outbox-store.d.ts","sourceRoot":"","sources":["../../src/outbox/in-memory-outbox-store.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAC3D,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,oCAAoC,CAAC;AAE9E,OAAO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WlD;IAEK,KAAK,IAAI,OAAO,CAAC,WAAW,CAAC,CASlC;IAED,uDAAuD;IACvD,OAAO,IAAI,YAAY,EAAE,CAExB;IAED,OAAO,CAAC,eAAe;CAWxB"}
@@ -0,0 +1,121 @@
1
+ import { DuplicateOutboxEventError } from './duplicate-outbox-event-error.js';
2
+ // A fresh record is due at once, whatever clock the relay runs on.
3
+ const DUE_IMMEDIATELY = 0;
4
+ /** Reference implementation, for tests and single-process apps. Not transactional. */
5
+ export class InMemoryOutboxStore {
6
+ storedRecords = new Map();
7
+ leaseMs;
8
+ signal;
9
+ sequence = 0;
10
+ constructor(options = {}) {
11
+ this.leaseMs = options.leaseMs ?? 30_000;
12
+ this.signal = options.signal;
13
+ }
14
+ async append(events) {
15
+ this.assertNotStored(events);
16
+ for (const event of events) {
17
+ this.sequence += 1;
18
+ this.storedRecords.set(event.id, {
19
+ event: structuredClone(event),
20
+ status: 'pending',
21
+ attempts: 0,
22
+ nextAttemptAt: new Date(DUE_IMMEDIATELY),
23
+ lastErrorCode: undefined,
24
+ publishedAt: undefined,
25
+ sequence: this.sequence,
26
+ });
27
+ }
28
+ if (events.length > 0) {
29
+ this.signal?.notify();
30
+ }
31
+ }
32
+ async claimBatch(limit, now) {
33
+ const due = [...this.storedRecords.values()]
34
+ .filter((record) => record.status === 'pending' && record.nextAttemptAt <= now)
35
+ .sort((a, b) => a.nextAttemptAt.getTime() - b.nextAttemptAt.getTime() || a.sequence - b.sequence)
36
+ .slice(0, Math.max(0, limit));
37
+ for (const record of due) {
38
+ record.attempts += 1;
39
+ record.nextAttemptAt = new Date(now.getTime() + this.leaseMs);
40
+ }
41
+ return due.map(snapshot);
42
+ }
43
+ async markPublished(ids, at) {
44
+ for (const id of ids) {
45
+ const record = this.storedRecords.get(id);
46
+ if (record !== undefined) {
47
+ record.status = 'published';
48
+ record.publishedAt = at;
49
+ }
50
+ }
51
+ }
52
+ async markFailed(id, error, nextAttemptAt) {
53
+ const record = this.storedRecords.get(id);
54
+ if (record === undefined || record.status === 'published') {
55
+ return;
56
+ }
57
+ record.lastErrorCode = error.code;
58
+ if (nextAttemptAt === null) {
59
+ record.status = 'dead';
60
+ }
61
+ else {
62
+ record.nextAttemptAt = nextAttemptAt;
63
+ }
64
+ }
65
+ async retryDead(ids, now) {
66
+ let revived = 0;
67
+ for (const id of ids) {
68
+ const record = this.storedRecords.get(id);
69
+ if (record?.status === 'dead') {
70
+ record.status = 'pending';
71
+ record.attempts = 0;
72
+ record.nextAttemptAt = now;
73
+ revived += 1;
74
+ }
75
+ }
76
+ return revived;
77
+ }
78
+ async purgePublished(before) {
79
+ let purged = 0;
80
+ for (const [id, record] of this.storedRecords) {
81
+ if (record.publishedAt !== undefined && record.publishedAt < before) {
82
+ this.storedRecords.delete(id);
83
+ purged += 1;
84
+ }
85
+ }
86
+ return purged;
87
+ }
88
+ async stats() {
89
+ const records = [...this.storedRecords.values()];
90
+ const pending = records.filter((record) => record.status === 'pending');
91
+ return {
92
+ pending: pending.length,
93
+ failed: pending.filter((record) => record.lastErrorCode !== undefined).length,
94
+ dead: records.filter((record) => record.status === 'dead').length,
95
+ };
96
+ }
97
+ /** Every record in insertion order, for assertions. */
98
+ records() {
99
+ return [...this.storedRecords.values()].map(snapshot);
100
+ }
101
+ assertNotStored(events) {
102
+ const ids = new Set();
103
+ for (const { id } of events) {
104
+ if (this.storedRecords.has(id) || ids.has(id)) {
105
+ throw new DuplicateOutboxEventError(id);
106
+ }
107
+ ids.add(id);
108
+ }
109
+ }
110
+ }
111
+ function snapshot(record) {
112
+ return {
113
+ event: structuredClone(record.event),
114
+ status: record.status,
115
+ attempts: record.attempts,
116
+ nextAttemptAt: record.nextAttemptAt,
117
+ ...(record.lastErrorCode === undefined ? {} : { lastErrorCode: record.lastErrorCode }),
118
+ ...(record.publishedAt === undefined ? {} : { publishedAt: record.publishedAt }),
119
+ };
120
+ }
121
+ //# sourceMappingURL=in-memory-outbox-store.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"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GAAG,CAAC,MAAM,CAAC,aAAa,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,aAAa,EAAE,MAAM,CAAC,aAAa,EAAE,CAAC;QACtF,GAAG,CAAC,MAAM,CAAC,WAAW,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,WAAW,EAAE,MAAM,CAAC,WAAW,EAAE,CAAC;KACjF,CAAC;AACJ,CAAC"}
@@ -0,0 +1,14 @@
1
+ import type { IntegrationEvent, IntegrationEventPublisher } from '@ddd-ts-kit/kernel';
2
+ import type { OutboxStore } from './outbox-store.js';
3
+ /**
4
+ * The publisher handlers use when a database is involved: it only stores. Called inside the
5
+ * unit of work of the command, the events commit or roll back with the business write.
6
+ */
7
+ export declare class OutboxPublisher implements IntegrationEventPublisher {
8
+ private readonly store;
9
+ /** Read by what observes the publisher from outside: it stores, a relay sends later. */
10
+ readonly messagingSystem = "outbox";
11
+ constructor(store: OutboxStore);
12
+ publish(events: readonly IntegrationEvent[]): Promise<void>;
13
+ }
14
+ //# sourceMappingURL=outbox-publisher.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"outbox-publisher.d.ts","sourceRoot":"","sources":["../../src/outbox/outbox-publisher.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,yBAAyB,EAAE,MAAM,oBAAoB,CAAC;AACtF,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAErD;;;GAGG;AACH,qBAAa,eAAgB,YAAW,yBAAyB;IAInD,OAAO,CAAC,QAAQ,CAAC,KAAK;IAHlC,wFAAwF;IACxF,QAAQ,CAAC,eAAe,YAAY;IAEpC,YAA6B,KAAK,EAAE,WAAW,EAAI;IAE7C,OAAO,CAAC,MAAM,EAAE,SAAS,gBAAgB,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAIhE;CACF"}
@@ -0,0 +1,18 @@
1
+ /**
2
+ * The publisher handlers use when a database is involved: it only stores. Called inside the
3
+ * unit of work of the command, the events commit or roll back with the business write.
4
+ */
5
+ export class OutboxPublisher {
6
+ store;
7
+ /** Read by what observes the publisher from outside: it stores, a relay sends later. */
8
+ messagingSystem = 'outbox';
9
+ constructor(store) {
10
+ this.store = store;
11
+ }
12
+ async publish(events) {
13
+ if (events.length > 0) {
14
+ await this.store.append(events);
15
+ }
16
+ }
17
+ }
18
+ //# sourceMappingURL=outbox-publisher.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"outbox-publisher.js","sourceRoot":"","sources":["../../src/outbox/outbox-publisher.ts"],"names":[],"mappings":"AAGA;;;GAGG;AACH,MAAM,OAAO,eAAe;IAIG,KAAK;IAHlC,wFAAwF;IAC/E,eAAe,GAAG,QAAQ,CAAC;IAEpC,YAA6B,KAAkB;qBAAlB,KAAK;IAAgB,CAAC;IAEnD,KAAK,CAAC,OAAO,CAAC,MAAmC;QAC/C,IAAI,MAAM,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YACtB,MAAM,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;QAClC,CAAC;IACH,CAAC;CACF"}
@@ -0,0 +1,14 @@
1
+ import type { IntegrationEvent } from '@ddd-ts-kit/kernel';
2
+ import type { OutboxStatus } from './outbox-status.js';
3
+ export interface OutboxRecord {
4
+ readonly event: IntegrationEvent;
5
+ readonly status: OutboxStatus;
6
+ /** Number of delivery attempts started, the one in progress included. */
7
+ readonly attempts: number;
8
+ /** A pending record is not claimed before this instant. */
9
+ readonly nextAttemptAt: Date;
10
+ /** Identifier-shaped code of the last failure. Never an error message. */
11
+ readonly lastErrorCode?: string;
12
+ readonly publishedAt?: Date;
13
+ }
14
+ //# sourceMappingURL=outbox-record.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"outbox-record.d.ts","sourceRoot":"","sources":["../../src/outbox/outbox-record.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAC3D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAEvD,MAAM,WAAW,YAAY;IAC3B,QAAQ,CAAC,KAAK,EAAE,gBAAgB,CAAC;IACjC,QAAQ,CAAC,MAAM,EAAE,YAAY,CAAC;IAC9B,yEAAyE;IACzE,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,2DAA2D;IAC3D,QAAQ,CAAC,aAAa,EAAE,IAAI,CAAC;IAC7B,0EAA0E;IAC1E,QAAQ,CAAC,aAAa,CAAC,EAAE,MAAM,CAAC;IAChC,QAAQ,CAAC,WAAW,CAAC,EAAE,IAAI,CAAC;CAC7B"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=outbox-record.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"outbox-record.js","sourceRoot":"","sources":["../../src/outbox/outbox-record.ts"],"names":[],"mappings":""}
@@ -0,0 +1,9 @@
1
+ export interface OutboxStats {
2
+ /** Records still to publish, those waiting for a retry included. */
3
+ readonly pending: number;
4
+ /** The pending records whose last attempt failed. */
5
+ readonly failed: number;
6
+ /** Records that exhausted their attempts and wait for `retryDead`. */
7
+ readonly dead: number;
8
+ }
9
+ //# sourceMappingURL=outbox-stats.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"outbox-stats.d.ts","sourceRoot":"","sources":["../../src/outbox/outbox-stats.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,WAAW;IAC1B,oEAAoE;IACpE,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,qDAAqD;IACrD,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,sEAAsE;IACtE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;CACvB"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=outbox-stats.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"outbox-stats.js","sourceRoot":"","sources":["../../src/outbox/outbox-stats.ts"],"names":[],"mappings":""}