@zdavison/matador 2.0.7 → 2.0.9

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 (200) hide show
  1. package/package.json +3 -2
  2. package/src/hooks/safe-hooks.ts +0 -16
  3. package/src/hooks/types.ts +0 -7
  4. package/src/index.ts +1 -0
  5. package/src/types/event.ts +8 -14
  6. package/src/types/index.ts +3 -2
  7. package/dist/checkpoint/context.d.ts +0 -59
  8. package/dist/checkpoint/context.d.ts.map +0 -1
  9. package/dist/checkpoint/context.js +0 -140
  10. package/dist/checkpoint/context.test.d.ts +0 -2
  11. package/dist/checkpoint/context.test.d.ts.map +0 -1
  12. package/dist/checkpoint/context.test.js +0 -424
  13. package/dist/checkpoint/index.d.ts +0 -7
  14. package/dist/checkpoint/index.d.ts.map +0 -1
  15. package/dist/checkpoint/index.js +0 -6
  16. package/dist/checkpoint/stores/memory.d.ts +0 -29
  17. package/dist/checkpoint/stores/memory.d.ts.map +0 -1
  18. package/dist/checkpoint/stores/memory.js +0 -39
  19. package/dist/checkpoint/stores/noop.d.ts +0 -14
  20. package/dist/checkpoint/stores/noop.d.ts.map +0 -1
  21. package/dist/checkpoint/stores/noop.js +0 -18
  22. package/dist/checkpoint/stores/stores.test.d.ts +0 -2
  23. package/dist/checkpoint/stores/stores.test.d.ts.map +0 -1
  24. package/dist/checkpoint/stores/stores.test.js +0 -146
  25. package/dist/checkpoint/types.d.ts +0 -119
  26. package/dist/checkpoint/types.d.ts.map +0 -1
  27. package/dist/checkpoint/types.js +0 -1
  28. package/dist/codec/codec.d.ts +0 -29
  29. package/dist/codec/codec.d.ts.map +0 -1
  30. package/dist/codec/codec.js +0 -15
  31. package/dist/codec/header-aware-codec.d.ts +0 -36
  32. package/dist/codec/header-aware-codec.d.ts.map +0 -1
  33. package/dist/codec/header-aware-codec.js +0 -1
  34. package/dist/codec/index.d.ts +0 -6
  35. package/dist/codec/index.d.ts.map +0 -1
  36. package/dist/codec/index.js +0 -3
  37. package/dist/codec/json-codec.d.ts +0 -13
  38. package/dist/codec/json-codec.d.ts.map +0 -1
  39. package/dist/codec/json-codec.js +0 -64
  40. package/dist/codec/rabbitmq-codec.d.ts +0 -28
  41. package/dist/codec/rabbitmq-codec.d.ts.map +0 -1
  42. package/dist/codec/rabbitmq-codec.js +0 -242
  43. package/dist/codec/rabbitmq-codec.test.d.ts +0 -2
  44. package/dist/codec/rabbitmq-codec.test.d.ts.map +0 -1
  45. package/dist/codec/rabbitmq-codec.test.js +0 -433
  46. package/dist/core/fanout.d.ts +0 -59
  47. package/dist/core/fanout.d.ts.map +0 -1
  48. package/dist/core/fanout.js +0 -121
  49. package/dist/core/fanout.test.d.ts +0 -2
  50. package/dist/core/fanout.test.d.ts.map +0 -1
  51. package/dist/core/fanout.test.js +0 -1054
  52. package/dist/core/index.d.ts +0 -7
  53. package/dist/core/index.d.ts.map +0 -1
  54. package/dist/core/index.js +0 -3
  55. package/dist/core/matador.d.ts +0 -133
  56. package/dist/core/matador.d.ts.map +0 -1
  57. package/dist/core/matador.js +0 -228
  58. package/dist/core/matador.test.d.ts +0 -2
  59. package/dist/core/matador.test.d.ts.map +0 -1
  60. package/dist/core/matador.test.js +0 -446
  61. package/dist/core/shutdown.d.ts +0 -78
  62. package/dist/core/shutdown.d.ts.map +0 -1
  63. package/dist/core/shutdown.js +0 -111
  64. package/dist/core/shutdown.test.d.ts +0 -2
  65. package/dist/core/shutdown.test.d.ts.map +0 -1
  66. package/dist/core/shutdown.test.js +0 -524
  67. package/dist/errors/checkpoint-errors.d.ts +0 -30
  68. package/dist/errors/checkpoint-errors.d.ts.map +0 -1
  69. package/dist/errors/checkpoint-errors.js +0 -49
  70. package/dist/errors/has-description.d.ts +0 -18
  71. package/dist/errors/has-description.d.ts.map +0 -1
  72. package/dist/errors/has-description.js +0 -9
  73. package/dist/errors/index.d.ts +0 -6
  74. package/dist/errors/index.d.ts.map +0 -1
  75. package/dist/errors/index.js +0 -22
  76. package/dist/errors/matador-errors.d.ts +0 -183
  77. package/dist/errors/matador-errors.d.ts.map +0 -1
  78. package/dist/errors/matador-errors.js +0 -376
  79. package/dist/errors/retry-errors.d.ts +0 -102
  80. package/dist/errors/retry-errors.d.ts.map +0 -1
  81. package/dist/errors/retry-errors.js +0 -155
  82. package/dist/errors/retry-errors.test.d.ts +0 -2
  83. package/dist/errors/retry-errors.test.d.ts.map +0 -1
  84. package/dist/errors/retry-errors.test.js +0 -136
  85. package/dist/hooks/index.d.ts +0 -4
  86. package/dist/hooks/index.d.ts.map +0 -1
  87. package/dist/hooks/index.js +0 -2
  88. package/dist/hooks/safe-hooks.d.ts +0 -33
  89. package/dist/hooks/safe-hooks.d.ts.map +0 -1
  90. package/dist/hooks/safe-hooks.js +0 -132
  91. package/dist/hooks/types.d.ts +0 -176
  92. package/dist/hooks/types.d.ts.map +0 -1
  93. package/dist/hooks/types.js +0 -9
  94. package/dist/index.cjs +0 -3242
  95. package/dist/index.cjs.map +0 -1
  96. package/dist/index.d.cts +0 -23
  97. package/dist/index.d.ts +0 -23
  98. package/dist/index.d.ts.map +0 -1
  99. package/dist/index.js +0 -31
  100. package/dist/index.js.map +0 -1
  101. package/dist/pipeline/index.d.ts +0 -3
  102. package/dist/pipeline/index.d.ts.map +0 -1
  103. package/dist/pipeline/index.js +0 -1
  104. package/dist/pipeline/pipeline.d.ts +0 -63
  105. package/dist/pipeline/pipeline.d.ts.map +0 -1
  106. package/dist/pipeline/pipeline.js +0 -273
  107. package/dist/pipeline/pipeline.test.d.ts +0 -2
  108. package/dist/pipeline/pipeline.test.d.ts.map +0 -1
  109. package/dist/pipeline/pipeline.test.js +0 -1112
  110. package/dist/retry/index.d.ts +0 -4
  111. package/dist/retry/index.d.ts.map +0 -1
  112. package/dist/retry/index.js +0 -1
  113. package/dist/retry/policy.d.ts +0 -43
  114. package/dist/retry/policy.d.ts.map +0 -1
  115. package/dist/retry/policy.js +0 -1
  116. package/dist/retry/standard-policy.d.ts +0 -44
  117. package/dist/retry/standard-policy.d.ts.map +0 -1
  118. package/dist/retry/standard-policy.js +0 -102
  119. package/dist/retry/standard-policy.test.d.ts +0 -2
  120. package/dist/retry/standard-policy.test.d.ts.map +0 -1
  121. package/dist/retry/standard-policy.test.js +0 -196
  122. package/dist/schema/index.d.ts +0 -4
  123. package/dist/schema/index.d.ts.map +0 -1
  124. package/dist/schema/index.js +0 -2
  125. package/dist/schema/registry.d.ts +0 -63
  126. package/dist/schema/registry.d.ts.map +0 -1
  127. package/dist/schema/registry.js +0 -174
  128. package/dist/schema/registry.test.d.ts +0 -2
  129. package/dist/schema/registry.test.d.ts.map +0 -1
  130. package/dist/schema/registry.test.js +0 -278
  131. package/dist/schema/types.d.ts +0 -158
  132. package/dist/schema/types.d.ts.map +0 -1
  133. package/dist/schema/types.js +0 -74
  134. package/dist/schema/types.test.d.ts +0 -2
  135. package/dist/schema/types.test.d.ts.map +0 -1
  136. package/dist/schema/types.test.js +0 -242
  137. package/dist/topology/builder.d.ts +0 -80
  138. package/dist/topology/builder.d.ts.map +0 -1
  139. package/dist/topology/builder.js +0 -165
  140. package/dist/topology/builder.test.d.ts +0 -2
  141. package/dist/topology/builder.test.d.ts.map +0 -1
  142. package/dist/topology/builder.test.js +0 -360
  143. package/dist/topology/index.d.ts +0 -5
  144. package/dist/topology/index.d.ts.map +0 -1
  145. package/dist/topology/index.js +0 -2
  146. package/dist/topology/types.d.ts +0 -128
  147. package/dist/topology/types.d.ts.map +0 -1
  148. package/dist/topology/types.js +0 -28
  149. package/dist/transport/capabilities.d.ts +0 -66
  150. package/dist/transport/capabilities.d.ts.map +0 -1
  151. package/dist/transport/capabilities.js +0 -18
  152. package/dist/transport/connection-manager.d.ts +0 -95
  153. package/dist/transport/connection-manager.d.ts.map +0 -1
  154. package/dist/transport/connection-manager.js +0 -144
  155. package/dist/transport/index.d.ts +0 -11
  156. package/dist/transport/index.d.ts.map +0 -1
  157. package/dist/transport/index.js +0 -5
  158. package/dist/transport/local/local-transport.d.ts +0 -62
  159. package/dist/transport/local/local-transport.d.ts.map +0 -1
  160. package/dist/transport/local/local-transport.js +0 -241
  161. package/dist/transport/local/local-transport.test.d.ts +0 -2
  162. package/dist/transport/local/local-transport.test.d.ts.map +0 -1
  163. package/dist/transport/local/local-transport.test.js +0 -192
  164. package/dist/transport/multi/multi-transport.d.ts +0 -94
  165. package/dist/transport/multi/multi-transport.d.ts.map +0 -1
  166. package/dist/transport/multi/multi-transport.js +0 -184
  167. package/dist/transport/multi/multi-transport.test.d.ts +0 -2
  168. package/dist/transport/multi/multi-transport.test.d.ts.map +0 -1
  169. package/dist/transport/multi/multi-transport.test.js +0 -236
  170. package/dist/transport/rabbitmq/rabbitmq-transport.d.ts +0 -83
  171. package/dist/transport/rabbitmq/rabbitmq-transport.d.ts.map +0 -1
  172. package/dist/transport/rabbitmq/rabbitmq-transport.js +0 -541
  173. package/dist/transport/rabbitmq/rabbitmq-transport.test.d.ts +0 -2
  174. package/dist/transport/rabbitmq/rabbitmq-transport.test.d.ts.map +0 -1
  175. package/dist/transport/rabbitmq/rabbitmq-transport.test.js +0 -100
  176. package/dist/transport/transport.d.ts +0 -152
  177. package/dist/transport/transport.d.ts.map +0 -1
  178. package/dist/transport/transport.js +0 -1
  179. package/dist/types/common.d.ts +0 -41
  180. package/dist/types/common.d.ts.map +0 -1
  181. package/dist/types/common.js +0 -12
  182. package/dist/types/dispatcher.d.ts +0 -14
  183. package/dist/types/dispatcher.d.ts.map +0 -1
  184. package/dist/types/dispatcher.js +0 -1
  185. package/dist/types/envelope.d.ts +0 -131
  186. package/dist/types/envelope.d.ts.map +0 -1
  187. package/dist/types/envelope.js +0 -99
  188. package/dist/types/event.d.ts +0 -96
  189. package/dist/types/event.d.ts.map +0 -1
  190. package/dist/types/event.js +0 -26
  191. package/dist/types/event.test.d.ts +0 -2
  192. package/dist/types/event.test.d.ts.map +0 -1
  193. package/dist/types/event.test.js +0 -130
  194. package/dist/types/index.d.ts +0 -10
  195. package/dist/types/index.d.ts.map +0 -1
  196. package/dist/types/index.js +0 -4
  197. package/dist/types/subscriber.d.ts +0 -227
  198. package/dist/types/subscriber.d.ts.map +0 -1
  199. package/dist/types/subscriber.js +0 -97
  200. package/tsconfig.tsbuildinfo +0 -1
@@ -1,155 +0,0 @@
1
- import assert from 'node:assert';
2
- /**
3
- * Base class for retry control errors.
4
- * These errors control the retry behavior of message processing.
5
- */
6
- export class RetryControlError extends Error {
7
- constructor(message) {
8
- super(message);
9
- this.name = this.constructor.name;
10
- // Ensure name is preserved when serialized
11
- Object.defineProperty(this, 'name', {
12
- value: this.constructor.name,
13
- enumerable: true,
14
- configurable: false,
15
- writable: false,
16
- });
17
- }
18
- /**
19
- * Returns a serializable representation for logging/monitoring.
20
- */
21
- toJSON() {
22
- return {
23
- name: this.name,
24
- message: this.message,
25
- description: this.description,
26
- stack: this.stack,
27
- };
28
- }
29
- }
30
- /**
31
- * Forces retry regardless of subscriber idempotency setting.
32
- * Use when you know the operation is safe to retry.
33
- *
34
- * ACTION: Check subscriber code to understand why retry was forced.
35
- * This overrides default retry behavior based on idempotency settings.
36
- */
37
- export class DoRetry extends RetryControlError {
38
- description = 'A subscriber explicitly requested retry by throwing DoRetry. ' +
39
- 'ACTION: Check the subscriber code to understand why retry was forced. ' +
40
- 'This overrides the default retry behavior based on idempotency settings.';
41
- constructor(message = 'Forced retry requested') {
42
- super(message);
43
- }
44
- }
45
- /**
46
- * Prevents retry regardless of subscriber idempotency setting.
47
- * Use for permanent failures that should not be retried.
48
- *
49
- * ACTION: Check subscriber code to understand why retry was disabled.
50
- * Typically used for permanent failures like invalid data or business rule violations.
51
- */
52
- export class DontRetry extends RetryControlError {
53
- description = 'A subscriber explicitly prevented retry by throwing DontRetry. ' +
54
- 'ACTION: Check the subscriber code to understand why retry was disabled. ' +
55
- 'Typically used for permanent failures like invalid data or business rule violations. ' +
56
- 'The message will be sent to the dead-letter queue for manual review.';
57
- constructor(message = 'Retry explicitly disabled') {
58
- super(message);
59
- }
60
- }
61
- /**
62
- * Thrown by `assertEvent` in the event of a failed assertion.
63
- *
64
- * This error indicates that an event was in an unexpected state when it reached the subscriber.
65
- * Throwing this error will indicate to Matador NOT to retry the event - it will be sent
66
- * directly to the undeliverable dead-letter queue.
67
- *
68
- * Use `assertEvent` in your subscribers to assert properties about an event payload.
69
- * This is useful in scenarios where you would expect an event payload to contain a field
70
- * based on the types, but something unexpected caused it to not be present.
71
- *
72
- * @see assertEvent
73
- */
74
- export class EventAssertionError extends Error {
75
- description = 'Thrown to indicate that an event was in an unexpected state when it reached the subscriber. ' +
76
- 'Throwing this error will indicate to Matador NOT to retry the event. ' +
77
- 'Matador does not throw this error directly - it is thrown by assertEvent, which you can ' +
78
- 'use in your subscribers to assert properties about an event. ' +
79
- 'This can be useful in scenarios where you would expect an event payload to contain a field ' +
80
- 'based on the types, but something unexpected caused it to not be present. ' +
81
- 'Using this instead of the NodeJS assert allows Matador to not retry the event subscriber.';
82
- /** The envelope that failed the assertion */
83
- envelope;
84
- constructor(envelope, message) {
85
- super(message);
86
- this.name = 'EventAssertionError';
87
- this.envelope = envelope;
88
- Object.defineProperty(this, 'name', {
89
- value: 'EventAssertionError',
90
- enumerable: true,
91
- configurable: false,
92
- writable: false,
93
- });
94
- }
95
- toJSON() {
96
- return {
97
- name: this.name,
98
- message: this.message,
99
- description: this.description,
100
- envelope: this.envelope,
101
- stack: this.stack,
102
- };
103
- }
104
- }
105
- /**
106
- * Checks if an error forces a retry.
107
- */
108
- export function isDoRetry(error) {
109
- return error instanceof DoRetry;
110
- }
111
- /**
112
- * Checks if an error prevents retry.
113
- */
114
- export function isDontRetry(error) {
115
- return error instanceof DontRetry;
116
- }
117
- /**
118
- * Checks if an error is an assertion error (never retry).
119
- */
120
- export function isAssertionError(error) {
121
- return error instanceof EventAssertionError;
122
- }
123
- /**
124
- * Same as Node.js `assert`, but throws an `EventAssertionError` if the assertion fails.
125
- *
126
- * `EventAssertionError`s thrown within a subscriber do not cause the subscriber to be retried.
127
- * The event will be delivered to the undeliverable dead-letter queue instead.
128
- *
129
- * @see https://nodejs.org/api/assert.html#assertvalue-message
130
- * @param envelope - The envelope this assertion relates to.
131
- * @param value - The value to assert. If falsy, the assertion fails.
132
- * @param message - The message to include in the error if the assertion fails.
133
- * @throws {EventAssertionError} If the assertion fails.
134
- *
135
- * @example
136
- * ```typescript
137
- * const subscriber = createSubscriber<MyEvent>({
138
- * name: 'my-subscriber',
139
- * description: 'Processes MyEvent',
140
- * callback: async (envelope) => {
141
- * // Assert that userId exists - if not, event goes to DLQ without retry
142
- * assertEvent(envelope, envelope.data.userId, 'userId is required');
143
- * // ... rest of processing
144
- * },
145
- * });
146
- * ```
147
- */
148
- export function assertEvent(envelope, value, message) {
149
- try {
150
- assert(value, message);
151
- }
152
- catch {
153
- throw new EventAssertionError(envelope, message);
154
- }
155
- }
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=retry-errors.test.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"retry-errors.test.d.ts","sourceRoot":"","sources":["../../src/errors/retry-errors.test.ts"],"names":[],"mappings":""}
@@ -1,136 +0,0 @@
1
- import { describe, expect, it } from 'bun:test';
2
- import { createEnvelope } from '../types/envelope.js';
3
- import { assertEvent, DontRetry, DoRetry, EventAssertionError, isAssertionError, isDontRetry, isDoRetry, } from './retry-errors.js';
4
- function createTestEnvelope(data = { foo: 'bar' }) {
5
- return createEnvelope({
6
- data,
7
- eventKey: 'test.event',
8
- targetSubscriber: 'test-subscriber',
9
- importance: 'can-ignore',
10
- });
11
- }
12
- describe('retry-errors', () => {
13
- describe('DoRetry', () => {
14
- it('should have correct name', () => {
15
- const error = new DoRetry('test message');
16
- expect(error.name).toBe('DoRetry');
17
- });
18
- it('should have description', () => {
19
- const error = new DoRetry('test message');
20
- expect(error.description).toBeDefined();
21
- });
22
- it('should serialize to JSON', () => {
23
- const error = new DoRetry('test message');
24
- const json = error.toJSON();
25
- expect(json.name).toBe('DoRetry');
26
- expect(json.message).toBe('test message');
27
- expect(json.description).toBeDefined();
28
- });
29
- });
30
- describe('DontRetry', () => {
31
- it('should have correct name', () => {
32
- const error = new DontRetry('test message');
33
- expect(error.name).toBe('DontRetry');
34
- });
35
- it('should have description', () => {
36
- const error = new DontRetry('test message');
37
- expect(error.description).toBeDefined();
38
- });
39
- it('should serialize to JSON', () => {
40
- const error = new DontRetry('test message');
41
- const json = error.toJSON();
42
- expect(json.name).toBe('DontRetry');
43
- expect(json.message).toBe('test message');
44
- expect(json.description).toBeDefined();
45
- });
46
- });
47
- describe('EventAssertionError', () => {
48
- it('should have correct name', () => {
49
- const envelope = createTestEnvelope();
50
- const error = new EventAssertionError(envelope, 'assertion failed');
51
- expect(error.name).toBe('EventAssertionError');
52
- });
53
- it('should store the envelope', () => {
54
- const envelope = createTestEnvelope();
55
- const error = new EventAssertionError(envelope, 'assertion failed');
56
- expect(error.envelope).toBe(envelope);
57
- });
58
- it('should have description', () => {
59
- const envelope = createTestEnvelope();
60
- const error = new EventAssertionError(envelope, 'assertion failed');
61
- expect(error.description).toBeDefined();
62
- expect(error.description).toContain('NOT to retry');
63
- });
64
- it('should serialize to JSON with envelope', () => {
65
- const envelope = createTestEnvelope();
66
- const error = new EventAssertionError(envelope, 'assertion failed');
67
- const json = error.toJSON();
68
- expect(json.name).toBe('EventAssertionError');
69
- expect(json.message).toBe('assertion failed');
70
- expect(json.envelope).toBe(envelope);
71
- expect(json.description).toBeDefined();
72
- });
73
- });
74
- describe('assertEvent', () => {
75
- it('should not throw when value is truthy', () => {
76
- const envelope = createTestEnvelope();
77
- expect(() => assertEvent(envelope, true, 'should be true')).not.toThrow();
78
- expect(() => assertEvent(envelope, 'string', 'should be string')).not.toThrow();
79
- expect(() => assertEvent(envelope, 1, 'should be number')).not.toThrow();
80
- expect(() => assertEvent(envelope, {}, 'should be object')).not.toThrow();
81
- expect(() => assertEvent(envelope, [], 'should be array')).not.toThrow();
82
- });
83
- it('should throw EventAssertionError when value is falsy', () => {
84
- const envelope = createTestEnvelope();
85
- expect(() => assertEvent(envelope, false, 'value was false')).toThrow(EventAssertionError);
86
- expect(() => assertEvent(envelope, null, 'value was null')).toThrow(EventAssertionError);
87
- expect(() => assertEvent(envelope, undefined, 'value was undefined')).toThrow(EventAssertionError);
88
- expect(() => assertEvent(envelope, 0, 'value was zero')).toThrow(EventAssertionError);
89
- expect(() => assertEvent(envelope, '', 'value was empty string')).toThrow(EventAssertionError);
90
- });
91
- it('should include envelope in thrown error', () => {
92
- const envelope = createTestEnvelope();
93
- try {
94
- assertEvent(envelope, false, 'assertion failed');
95
- expect.unreachable('should have thrown');
96
- }
97
- catch (error) {
98
- expect(error).toBeInstanceOf(EventAssertionError);
99
- expect(error.envelope).toBe(envelope);
100
- expect(error.message).toBe('assertion failed');
101
- }
102
- });
103
- it('should include message in thrown error', () => {
104
- const envelope = createTestEnvelope();
105
- try {
106
- assertEvent(envelope, null, 'userId is required');
107
- expect.unreachable('should have thrown');
108
- }
109
- catch (error) {
110
- expect(error).toBeInstanceOf(EventAssertionError);
111
- expect(error.message).toBe('userId is required');
112
- }
113
- });
114
- });
115
- describe('type guards', () => {
116
- it('isDoRetry should identify DoRetry errors', () => {
117
- expect(isDoRetry(new DoRetry('test'))).toBe(true);
118
- expect(isDoRetry(new DontRetry('test'))).toBe(false);
119
- expect(isDoRetry(new Error('test'))).toBe(false);
120
- expect(isDoRetry(null)).toBe(false);
121
- });
122
- it('isDontRetry should identify DontRetry errors', () => {
123
- expect(isDontRetry(new DontRetry('test'))).toBe(true);
124
- expect(isDontRetry(new DoRetry('test'))).toBe(false);
125
- expect(isDontRetry(new Error('test'))).toBe(false);
126
- expect(isDontRetry(null)).toBe(false);
127
- });
128
- it('isAssertionError should identify EventAssertionError', () => {
129
- const envelope = createTestEnvelope();
130
- expect(isAssertionError(new EventAssertionError(envelope, 'test'))).toBe(true);
131
- expect(isAssertionError(new DoRetry('test'))).toBe(false);
132
- expect(isAssertionError(new Error('test'))).toBe(false);
133
- expect(isAssertionError(null)).toBe(false);
134
- });
135
- });
136
- });
@@ -1,4 +0,0 @@
1
- export type { DecodeErrorContext, EnqueueErrorContext, EnqueueSuccessContext, Logger, MatadorHooks, TransportFallbackContext, WorkerErrorContext, WorkerExecuteFn, WorkerSuccessContext, } from './types.js';
2
- export { consoleLogger } from './types.js';
3
- export { SafeHooks } from './safe-hooks.js';
4
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/hooks/index.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,kBAAkB,EAClB,mBAAmB,EACnB,qBAAqB,EACrB,MAAM,EACN,YAAY,EACZ,wBAAwB,EACxB,kBAAkB,EAClB,eAAe,EACf,oBAAoB,GACrB,MAAM,YAAY,CAAC;AAEpB,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAC3C,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC"}
@@ -1,2 +0,0 @@
1
- export { consoleLogger } from './types.js';
2
- export { SafeHooks } from './safe-hooks.js';
@@ -1,33 +0,0 @@
1
- import type { CheckpointClearedContext, CheckpointHitContext, CheckpointLoadedContext, CheckpointMissContext } from '../checkpoint/index.js';
2
- import type { ConnectionState } from '../transport/index.js';
3
- import type { Envelope, SubscriberDefinition } from '../types/index.js';
4
- import { type DecodeErrorContext, type EnqueueErrorContext, type EnqueueSuccessContext, type Logger, type MatadorHooks, type WorkerErrorContext, type WorkerExecuteFn, type WorkerSuccessContext } from './types.js';
5
- /**
6
- * Wraps hooks with error handling to prevent hook errors from breaking processing.
7
- * All hooks become safe to call and will catch any errors internally.
8
- */
9
- export declare class SafeHooks {
10
- private readonly hooks;
11
- /** The logger instance used by Matador. */
12
- readonly logger: Logger;
13
- constructor(hooks?: MatadorHooks);
14
- onEnqueueSuccess(context: EnqueueSuccessContext): Promise<void>;
15
- onEnqueueError(context: EnqueueErrorContext): Promise<void>;
16
- onWorkerWrap(envelope: Envelope, subscriber: SubscriberDefinition, execute: WorkerExecuteFn): Promise<void>;
17
- onWorkerBeforeProcess(envelope: Envelope, subscriber: SubscriberDefinition): Promise<void>;
18
- onWorkerSuccess(context: WorkerSuccessContext): Promise<void>;
19
- onWorkerError(context: WorkerErrorContext): Promise<void>;
20
- onDecodeError(context: DecodeErrorContext): Promise<void>;
21
- onConnectionStateChange(state: ConnectionState): Promise<void>;
22
- loadUniversalMetadata(): Promise<Record<string, unknown>>;
23
- getQueueConcurrency(queueName: string): Promise<number | undefined>;
24
- getRetryDelay(envelope: Envelope, attemptNumber: number): Promise<number | undefined>;
25
- getAttempts(envelope: Envelope): Promise<number | undefined>;
26
- getMaxDeliveries(envelope: Envelope): Promise<number | undefined>;
27
- onCheckpointLoaded(context: CheckpointLoadedContext): Promise<void>;
28
- onCheckpointHit(context: CheckpointHitContext): Promise<void>;
29
- onCheckpointMiss(context: CheckpointMissContext): Promise<void>;
30
- onCheckpointCleared(context: CheckpointClearedContext): Promise<void>;
31
- private safeCall;
32
- }
33
- //# sourceMappingURL=safe-hooks.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"safe-hooks.d.ts","sourceRoot":"","sources":["../../src/hooks/safe-hooks.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,wBAAwB,EACxB,oBAAoB,EACpB,uBAAuB,EACvB,qBAAqB,EACtB,MAAM,wBAAwB,CAAC;AAChC,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAC7D,OAAO,KAAK,EAAE,QAAQ,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AACxE,OAAO,EACL,KAAK,kBAAkB,EACvB,KAAK,mBAAmB,EACxB,KAAK,qBAAqB,EAC1B,KAAK,MAAM,EACX,KAAK,YAAY,EACjB,KAAK,kBAAkB,EACvB,KAAK,eAAe,EACpB,KAAK,oBAAoB,EAE1B,MAAM,YAAY,CAAC;AAEpB;;;GAGG;AACH,qBAAa,SAAS;IACpB,OAAO,CAAC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G,OAAO,CAAC,IAAI,CAAC;IAMnE,eAAe,CAAC,OAAO,EAAE,oBAAoB,GAAG,OAAO,CAAC,IAAI,CAAC;IAM7D,gBAAgB,CAAC,OAAO,EAAE,qBAAqB,GAAG,OAAO,CAAC,IAAI,CAAC;IAM/D,mBAAmB,CAAC,OAAO,EAAE,wBAAwB,GAAG,OAAO,CAAC,IAAI,CAAC;YAM7D,QAAQ;CAUvB"}
@@ -1,132 +0,0 @@
1
- import { consoleLogger, } from './types.js';
2
- /**
3
- * Wraps hooks with error handling to prevent hook errors from breaking processing.
4
- * All hooks become safe to call and will catch any errors internally.
5
- */
6
- export class SafeHooks {
7
- hooks;
8
- /** The logger instance used by Matador. */
9
- logger;
10
- constructor(hooks = {}) {
11
- this.hooks = hooks;
12
- this.logger = hooks.logger ?? consoleLogger;
13
- }
14
- async onEnqueueSuccess(context) {
15
- await this.safeCall('onEnqueueSuccess', () => this.hooks.onEnqueueSuccess?.(context));
16
- }
17
- async onEnqueueError(context) {
18
- await this.safeCall('onEnqueueError', () => this.hooks.onEnqueueError?.(context));
19
- }
20
- async onWorkerWrap(envelope, subscriber, execute) {
21
- if (this.hooks.onWorkerWrap) {
22
- try {
23
- await this.hooks.onWorkerWrap(envelope, subscriber, execute);
24
- }
25
- catch (error) {
26
- this.logger.warn('[Matador] 🟡 Hook onWorkerWrap threw an error', error);
27
- // Still try to execute if wrap failed
28
- await execute();
29
- }
30
- }
31
- else {
32
- await execute();
33
- }
34
- }
35
- async onWorkerBeforeProcess(envelope, subscriber) {
36
- await this.safeCall('onWorkerBeforeProcess', () => this.hooks.onWorkerBeforeProcess?.(envelope, subscriber));
37
- }
38
- async onWorkerSuccess(context) {
39
- await this.safeCall('onWorkerSuccess', () => this.hooks.onWorkerSuccess?.(context));
40
- }
41
- async onWorkerError(context) {
42
- await this.safeCall('onWorkerError', () => this.hooks.onWorkerError?.(context));
43
- }
44
- async onDecodeError(context) {
45
- await this.safeCall('onDecodeError', () => this.hooks.onDecodeError?.(context));
46
- }
47
- async onConnectionStateChange(state) {
48
- await this.safeCall('onConnectionStateChange', () => this.hooks.onConnectionStateChange?.(state));
49
- }
50
- async loadUniversalMetadata() {
51
- if (!this.hooks.loadUniversalMetadata) {
52
- return {};
53
- }
54
- try {
55
- const result = await this.hooks.loadUniversalMetadata();
56
- return result ?? {};
57
- }
58
- catch (error) {
59
- this.logger.warn('[Matador] 🟡 Hook loadUniversalMetadata threw an error', error);
60
- return {};
61
- }
62
- }
63
- async getQueueConcurrency(queueName) {
64
- if (!this.hooks.getQueueConcurrency) {
65
- return undefined;
66
- }
67
- try {
68
- return await this.hooks.getQueueConcurrency(queueName);
69
- }
70
- catch (error) {
71
- this.logger.warn('[Matador] 🟡 Hook getQueueConcurrency threw an error', error);
72
- return undefined;
73
- }
74
- }
75
- async getRetryDelay(envelope, attemptNumber) {
76
- if (!this.hooks.getRetryDelay) {
77
- return undefined;
78
- }
79
- try {
80
- return await this.hooks.getRetryDelay(envelope, attemptNumber);
81
- }
82
- catch (error) {
83
- this.logger.warn('[Matador] 🟡 Hook getRetryDelay threw an error', error);
84
- return undefined;
85
- }
86
- }
87
- async getAttempts(envelope) {
88
- if (!this.hooks.getAttempts) {
89
- return undefined;
90
- }
91
- try {
92
- return await this.hooks.getAttempts(envelope);
93
- }
94
- catch (error) {
95
- this.logger.warn('[Matador] 🟡 Hook getAttempts threw an error', error);
96
- return undefined;
97
- }
98
- }
99
- async getMaxDeliveries(envelope) {
100
- if (!this.hooks.getMaxDeliveries) {
101
- return undefined;
102
- }
103
- try {
104
- return await this.hooks.getMaxDeliveries(envelope);
105
- }
106
- catch (error) {
107
- this.logger.warn('[Matador] 🟡 Hook getMaxDeliveries threw an error', error);
108
- return undefined;
109
- }
110
- }
111
- // === Checkpoint Hooks ===
112
- async onCheckpointLoaded(context) {
113
- await this.safeCall('onCheckpointLoaded', () => this.hooks.onCheckpointLoaded?.(context));
114
- }
115
- async onCheckpointHit(context) {
116
- await this.safeCall('onCheckpointHit', () => this.hooks.onCheckpointHit?.(context));
117
- }
118
- async onCheckpointMiss(context) {
119
- await this.safeCall('onCheckpointMiss', () => this.hooks.onCheckpointMiss?.(context));
120
- }
121
- async onCheckpointCleared(context) {
122
- await this.safeCall('onCheckpointCleared', () => this.hooks.onCheckpointCleared?.(context));
123
- }
124
- async safeCall(hookName, fn) {
125
- try {
126
- await fn();
127
- }
128
- catch (error) {
129
- this.logger.warn(`[Matador] 🟡 Hook ${hookName} threw an error`, error);
130
- }
131
- }
132
- }
@@ -1,176 +0,0 @@
1
- import type { CheckpointClearedContext, CheckpointHitContext, CheckpointLoadedContext, CheckpointMissContext } from '../checkpoint/index.js';
2
- import type { RetryDecision } from '../retry/index.js';
3
- import type { ConnectionState, Transport } from '../transport/index.js';
4
- import type { Envelope, SubscriberDefinition } from '../types/index.js';
5
- /**
6
- * Logger interface for Matador internal logging.
7
- */
8
- export interface Logger {
9
- debug(message: string, ...args: unknown[]): void;
10
- info(message: string, ...args: unknown[]): void;
11
- warn(message: string, ...args: unknown[]): void;
12
- error(message: string, ...args: unknown[]): void;
13
- }
14
- /**
15
- * Default logger that uses console.
16
- */
17
- export declare const consoleLogger: Logger;
18
- /**
19
- * Context for enqueue success hook.
20
- */
21
- export interface EnqueueSuccessContext {
22
- readonly envelope: Envelope;
23
- readonly queue: string;
24
- /** The transport that was used (e.g., 'local', 'rabbitmq') */
25
- readonly transport: string;
26
- }
27
- /**
28
- * Context for transport fallback hook.
29
- */
30
- export interface TransportFallbackContext {
31
- /** The envelope that was being sent */
32
- readonly envelope: Envelope;
33
- /** The queue the message was being sent to */
34
- readonly queue: string;
35
- /** The transport that failed */
36
- readonly failedTransport: Transport['name'];
37
- /** The transport that will be tried next */
38
- readonly nextTransport: Transport['name'];
39
- /** The error from the failed transport */
40
- readonly error: Error;
41
- }
42
- /**
43
- * Context for enqueue error hook.
44
- */
45
- export interface EnqueueErrorContext {
46
- readonly envelope: Envelope;
47
- readonly error: Error;
48
- /** The transport that failed (e.g., 'local', 'rabbitmq') */
49
- readonly transport: string;
50
- }
51
- /**
52
- * Context for decode error hook.
53
- */
54
- export interface DecodeErrorContext {
55
- readonly error: Error;
56
- readonly rawMessage: Uint8Array;
57
- readonly sourceQueue: string;
58
- /** The transport that received the message (e.g., 'local', 'rabbitmq') */
59
- readonly transport: string;
60
- }
61
- /**
62
- * Context for worker success hook.
63
- */
64
- export interface WorkerSuccessContext {
65
- readonly envelope: Envelope;
66
- readonly subscriber: SubscriberDefinition;
67
- readonly result: unknown;
68
- readonly durationMs: number;
69
- /** The transport that received the message (e.g., 'local', 'rabbitmq') */
70
- readonly transport: string;
71
- }
72
- /**
73
- * Context for worker error hook.
74
- */
75
- export interface WorkerErrorContext {
76
- readonly envelope: Envelope;
77
- readonly subscriber: SubscriberDefinition;
78
- readonly error: Error;
79
- readonly durationMs: number;
80
- readonly decision: RetryDecision;
81
- /** The transport that received the message (e.g., 'local', 'rabbitmq') */
82
- readonly transport: string;
83
- }
84
- /**
85
- * Execution function passed to onWorkerWrap for APM wrapping.
86
- */
87
- export type WorkerExecuteFn = () => Promise<void>;
88
- /**
89
- * All available hooks for Matador.
90
- */
91
- export interface MatadorHooks {
92
- /**
93
- * Logger for internal Matador logging.
94
- * Defaults to console logger if not provided.
95
- */
96
- logger?: Logger;
97
- /**
98
- * Called when an event is successfully enqueued.
99
- */
100
- onEnqueueSuccess?(context: EnqueueSuccessContext): void | Promise<void>;
101
- /**
102
- * Called when transport fallback occurs during send.
103
- * Only fires when using MultiTransport with fallbackEnabled=true.
104
- */
105
- onTransportFallback?(context: TransportFallbackContext): void | Promise<void>;
106
- /**
107
- * Called when enqueue fails completely.
108
- */
109
- onEnqueueError?(context: EnqueueErrorContext): void | Promise<void>;
110
- /**
111
- * Wraps entire worker processing (for APM context).
112
- * Must call execute() to run the actual processing.
113
- */
114
- onWorkerWrap?(envelope: Envelope, subscriber: SubscriberDefinition, execute: WorkerExecuteFn): Promise<void>;
115
- /**
116
- * Called before processing begins.
117
- */
118
- onWorkerBeforeProcess?(envelope: Envelope, subscriber: SubscriberDefinition): void | Promise<void>;
119
- /**
120
- * Called after successful processing.
121
- */
122
- onWorkerSuccess?(context: WorkerSuccessContext): void | Promise<void>;
123
- /**
124
- * Called after processing error.
125
- */
126
- onWorkerError?(context: WorkerErrorContext): void | Promise<void>;
127
- /**
128
- * Called when message decoding fails.
129
- */
130
- onDecodeError?(context: DecodeErrorContext): void | Promise<void>;
131
- /**
132
- * Called when transport connection state changes.
133
- */
134
- onConnectionStateChange?(state: ConnectionState): void | Promise<void>;
135
- /**
136
- * Loads universal metadata to add to all envelopes.
137
- */
138
- loadUniversalMetadata?(): Record<string, unknown> | Promise<Record<string, unknown>>;
139
- /**
140
- * Dynamic queue concurrency lookup.
141
- */
142
- getQueueConcurrency?(queueName: string): number | undefined | Promise<number | undefined>;
143
- /**
144
- * Dynamic retry delay lookup.
145
- */
146
- getRetryDelay?(envelope: Envelope, attemptNumber: number): number | undefined | Promise<number | undefined>;
147
- /**
148
- * Dynamic max attempts lookup.
149
- */
150
- getAttempts?(envelope: Envelope): number | undefined | Promise<number | undefined>;
151
- /**
152
- * Dynamic max deliveries (poison threshold) lookup.
153
- */
154
- getMaxDeliveries?(envelope: Envelope): number | undefined | Promise<number | undefined>;
155
- /**
156
- * Called when a checkpoint is loaded for a retry.
157
- * Only fires for resumable subscribers on retry attempts.
158
- */
159
- onCheckpointLoaded?(context: CheckpointLoadedContext): void | Promise<void>;
160
- /**
161
- * Called when an io() operation uses a cached value (checkpoint hit).
162
- * Useful for observability and metrics.
163
- */
164
- onCheckpointHit?(context: CheckpointHitContext): void | Promise<void>;
165
- /**
166
- * Called when an io() operation executes (cache miss).
167
- * Useful for observability and metrics.
168
- */
169
- onCheckpointMiss?(context: CheckpointMissContext): void | Promise<void>;
170
- /**
171
- * Called when a checkpoint is cleared.
172
- * Fires on successful completion or when moving to dead-letter queue.
173
- */
174
- onCheckpointCleared?(context: CheckpointClearedContext): void | Promise<void>;
175
- }
176
- //# sourceM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