@zdavison/matador 2.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cli.ts +453 -0
- package/dist/checkpoint/context.d.ts +59 -0
- package/dist/checkpoint/context.d.ts.map +1 -0
- package/dist/checkpoint/context.js +140 -0
- package/dist/checkpoint/context.test.d.ts +2 -0
- package/dist/checkpoint/context.test.d.ts.map +1 -0
- package/dist/checkpoint/context.test.js +424 -0
- package/dist/checkpoint/index.d.ts +7 -0
- package/dist/checkpoint/index.d.ts.map +1 -0
- package/dist/checkpoint/index.js +6 -0
- package/dist/checkpoint/stores/memory.d.ts +29 -0
- package/dist/checkpoint/stores/memory.d.ts.map +1 -0
- package/dist/checkpoint/stores/memory.js +39 -0
- package/dist/checkpoint/stores/noop.d.ts +14 -0
- package/dist/checkpoint/stores/noop.d.ts.map +1 -0
- package/dist/checkpoint/stores/noop.js +18 -0
- package/dist/checkpoint/stores/stores.test.d.ts +2 -0
- package/dist/checkpoint/stores/stores.test.d.ts.map +1 -0
- package/dist/checkpoint/stores/stores.test.js +146 -0
- package/dist/checkpoint/types.d.ts +119 -0
- package/dist/checkpoint/types.d.ts.map +1 -0
- package/dist/checkpoint/types.js +1 -0
- package/dist/codec/codec.d.ts +29 -0
- package/dist/codec/codec.d.ts.map +1 -0
- package/dist/codec/codec.js +15 -0
- package/dist/codec/header-aware-codec.d.ts +36 -0
- package/dist/codec/header-aware-codec.d.ts.map +1 -0
- package/dist/codec/header-aware-codec.js +1 -0
- package/dist/codec/index.d.ts +6 -0
- package/dist/codec/index.d.ts.map +1 -0
- package/dist/codec/index.js +3 -0
- package/dist/codec/json-codec.d.ts +13 -0
- package/dist/codec/json-codec.d.ts.map +1 -0
- package/dist/codec/json-codec.js +64 -0
- package/dist/codec/rabbitmq-codec.d.ts +28 -0
- package/dist/codec/rabbitmq-codec.d.ts.map +1 -0
- package/dist/codec/rabbitmq-codec.js +242 -0
- package/dist/codec/rabbitmq-codec.test.d.ts +2 -0
- package/dist/codec/rabbitmq-codec.test.d.ts.map +1 -0
- package/dist/codec/rabbitmq-codec.test.js +433 -0
- package/dist/core/fanout.d.ts +59 -0
- package/dist/core/fanout.d.ts.map +1 -0
- package/dist/core/fanout.js +121 -0
- package/dist/core/fanout.test.d.ts +2 -0
- package/dist/core/fanout.test.d.ts.map +1 -0
- package/dist/core/fanout.test.js +1055 -0
- package/dist/core/index.d.ts +7 -0
- package/dist/core/index.d.ts.map +1 -0
- package/dist/core/index.js +3 -0
- package/dist/core/matador.d.ts +133 -0
- package/dist/core/matador.d.ts.map +1 -0
- package/dist/core/matador.js +222 -0
- package/dist/core/matador.test.d.ts +2 -0
- package/dist/core/matador.test.d.ts.map +1 -0
- package/dist/core/matador.test.js +446 -0
- package/dist/core/shutdown.d.ts +78 -0
- package/dist/core/shutdown.d.ts.map +1 -0
- package/dist/core/shutdown.js +111 -0
- package/dist/core/shutdown.test.d.ts +2 -0
- package/dist/core/shutdown.test.d.ts.map +1 -0
- package/dist/core/shutdown.test.js +524 -0
- package/dist/errors/checkpoint-errors.d.ts +30 -0
- package/dist/errors/checkpoint-errors.d.ts.map +1 -0
- package/dist/errors/checkpoint-errors.js +49 -0
- package/dist/errors/has-description.d.ts +18 -0
- package/dist/errors/has-description.d.ts.map +1 -0
- package/dist/errors/has-description.js +9 -0
- package/dist/errors/index.d.ts +6 -0
- package/dist/errors/index.d.ts.map +1 -0
- package/dist/errors/index.js +22 -0
- package/dist/errors/matador-errors.d.ts +183 -0
- package/dist/errors/matador-errors.d.ts.map +1 -0
- package/dist/errors/matador-errors.js +376 -0
- package/dist/errors/retry-errors.d.ts +67 -0
- package/dist/errors/retry-errors.d.ts.map +1 -0
- package/dist/errors/retry-errors.js +108 -0
- package/dist/hooks/index.d.ts +4 -0
- package/dist/hooks/index.d.ts.map +1 -0
- package/dist/hooks/index.js +2 -0
- package/dist/hooks/safe-hooks.d.ts +34 -0
- package/dist/hooks/safe-hooks.d.ts.map +1 -0
- package/dist/hooks/safe-hooks.js +135 -0
- package/dist/hooks/types.d.ts +189 -0
- package/dist/hooks/types.d.ts.map +1 -0
- package/dist/hooks/types.js +9 -0
- package/dist/index.cjs +3156 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +23 -0
- package/dist/index.d.ts +23 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +31 -0
- package/dist/index.js.map +1 -0
- package/dist/pipeline/index.d.ts +3 -0
- package/dist/pipeline/index.d.ts.map +1 -0
- package/dist/pipeline/index.js +1 -0
- package/dist/pipeline/pipeline.d.ts +60 -0
- package/dist/pipeline/pipeline.d.ts.map +1 -0
- package/dist/pipeline/pipeline.js +261 -0
- package/dist/pipeline/pipeline.test.d.ts +2 -0
- package/dist/pipeline/pipeline.test.d.ts.map +1 -0
- package/dist/pipeline/pipeline.test.js +1065 -0
- package/dist/retry/index.d.ts +4 -0
- package/dist/retry/index.d.ts.map +1 -0
- package/dist/retry/index.js +1 -0
- package/dist/retry/policy.d.ts +43 -0
- package/dist/retry/policy.d.ts.map +1 -0
- package/dist/retry/policy.js +1 -0
- package/dist/retry/standard-policy.d.ts +44 -0
- package/dist/retry/standard-policy.d.ts.map +1 -0
- package/dist/retry/standard-policy.js +102 -0
- package/dist/retry/standard-policy.test.d.ts +2 -0
- package/dist/retry/standard-policy.test.d.ts.map +1 -0
- package/dist/retry/standard-policy.test.js +190 -0
- package/dist/schema/index.d.ts +4 -0
- package/dist/schema/index.d.ts.map +1 -0
- package/dist/schema/index.js +2 -0
- package/dist/schema/registry.d.ts +63 -0
- package/dist/schema/registry.d.ts.map +1 -0
- package/dist/schema/registry.js +171 -0
- package/dist/schema/registry.test.d.ts +2 -0
- package/dist/schema/registry.test.d.ts.map +1 -0
- package/dist/schema/registry.test.js +278 -0
- package/dist/schema/types.d.ts +158 -0
- package/dist/schema/types.d.ts.map +1 -0
- package/dist/schema/types.js +74 -0
- package/dist/schema/types.test.d.ts +2 -0
- package/dist/schema/types.test.d.ts.map +1 -0
- package/dist/schema/types.test.js +243 -0
- package/dist/topology/builder.d.ts +66 -0
- package/dist/topology/builder.d.ts.map +1 -0
- package/dist/topology/builder.js +156 -0
- package/dist/topology/builder.test.d.ts +2 -0
- package/dist/topology/builder.test.d.ts.map +1 -0
- package/dist/topology/builder.test.js +222 -0
- package/dist/topology/index.d.ts +5 -0
- package/dist/topology/index.d.ts.map +1 -0
- package/dist/topology/index.js +2 -0
- package/dist/topology/types.d.ts +76 -0
- package/dist/topology/types.d.ts.map +1 -0
- package/dist/topology/types.js +18 -0
- package/dist/transport/capabilities.d.ts +66 -0
- package/dist/transport/capabilities.d.ts.map +1 -0
- package/dist/transport/capabilities.js +18 -0
- package/dist/transport/connection-manager.d.ts +95 -0
- package/dist/transport/connection-manager.d.ts.map +1 -0
- package/dist/transport/connection-manager.js +144 -0
- package/dist/transport/index.d.ts +11 -0
- package/dist/transport/index.d.ts.map +1 -0
- package/dist/transport/index.js +5 -0
- package/dist/transport/local/local-transport.d.ts +62 -0
- package/dist/transport/local/local-transport.d.ts.map +1 -0
- package/dist/transport/local/local-transport.js +241 -0
- package/dist/transport/local/local-transport.test.d.ts +2 -0
- package/dist/transport/local/local-transport.test.d.ts.map +1 -0
- package/dist/transport/local/local-transport.test.js +192 -0
- package/dist/transport/multi/multi-transport.d.ts +94 -0
- package/dist/transport/multi/multi-transport.d.ts.map +1 -0
- package/dist/transport/multi/multi-transport.js +184 -0
- package/dist/transport/multi/multi-transport.test.d.ts +2 -0
- package/dist/transport/multi/multi-transport.test.d.ts.map +1 -0
- package/dist/transport/multi/multi-transport.test.js +236 -0
- package/dist/transport/rabbitmq/rabbitmq-transport.d.ts +73 -0
- package/dist/transport/rabbitmq/rabbitmq-transport.d.ts.map +1 -0
- package/dist/transport/rabbitmq/rabbitmq-transport.js +518 -0
- package/dist/transport/transport.d.ts +152 -0
- package/dist/transport/transport.d.ts.map +1 -0
- package/dist/transport/transport.js +1 -0
- package/dist/types/common.d.ts +41 -0
- package/dist/types/common.d.ts.map +1 -0
- package/dist/types/common.js +12 -0
- package/dist/types/envelope.d.ts +82 -0
- package/dist/types/envelope.d.ts.map +1 -0
- package/dist/types/envelope.js +36 -0
- package/dist/types/event.d.ts +96 -0
- package/dist/types/event.d.ts.map +1 -0
- package/dist/types/event.js +26 -0
- package/dist/types/event.test.d.ts +2 -0
- package/dist/types/event.test.d.ts.map +1 -0
- package/dist/types/event.test.js +130 -0
- package/dist/types/index.d.ts +9 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/index.js +4 -0
- package/dist/types/subscriber.d.ts +207 -0
- package/dist/types/subscriber.d.ts.map +1 -0
- package/dist/types/subscriber.js +99 -0
- package/examples/config.ts +126 -0
- package/examples/event.ts +26 -0
- package/examples/order-event.json +19 -0
- package/package.json +66 -0
- package/src/checkpoint/context.test.ts +510 -0
- package/src/checkpoint/context.ts +213 -0
- package/src/checkpoint/index.ts +30 -0
- package/src/checkpoint/stores/memory.ts +47 -0
- package/src/checkpoint/stores/noop.ts +22 -0
- package/src/checkpoint/stores/stores.test.ts +177 -0
- package/src/checkpoint/types.ts +147 -0
- package/src/codec/codec.ts +42 -0
- package/src/codec/header-aware-codec.ts +41 -0
- package/src/codec/index.ts +11 -0
- package/src/codec/json-codec.ts +69 -0
- package/src/codec/rabbitmq-codec.test.ts +516 -0
- package/src/codec/rabbitmq-codec.ts +336 -0
- package/src/core/fanout.test.ts +1351 -0
- package/src/core/fanout.ts +184 -0
- package/src/core/index.ts +12 -0
- package/src/core/matador.test.ts +575 -0
- package/src/core/matador.ts +344 -0
- package/src/core/shutdown.test.ts +853 -0
- package/src/core/shutdown.ts +165 -0
- package/src/errors/checkpoint-errors.ts +62 -0
- package/src/errors/has-description.ts +25 -0
- package/src/errors/index.ts +57 -0
- package/src/errors/matador-errors.ts +477 -0
- package/src/errors/retry-errors.ts +134 -0
- package/src/hooks/index.ts +15 -0
- package/src/hooks/safe-hooks.ts +223 -0
- package/src/hooks/types.ts +248 -0
- package/src/index.ts +231 -0
- package/src/pipeline/index.ts +2 -0
- package/src/pipeline/pipeline.test.ts +1317 -0
- package/src/pipeline/pipeline.ts +371 -0
- package/src/retry/index.ts +4 -0
- package/src/retry/policy.ts +46 -0
- package/src/retry/standard-policy.test.ts +282 -0
- package/src/retry/standard-policy.ts +156 -0
- package/src/schema/index.ts +16 -0
- package/src/schema/registry.test.ts +339 -0
- package/src/schema/registry.ts +226 -0
- package/src/schema/types.test.ts +281 -0
- package/src/schema/types.ts +217 -0
- package/src/topology/builder.test.ts +275 -0
- package/src/topology/builder.ts +199 -0
- package/src/topology/index.ts +15 -0
- package/src/topology/types.ts +109 -0
- package/src/transport/capabilities.ts +88 -0
- package/src/transport/connection-manager.ts +218 -0
- package/src/transport/index.ts +42 -0
- package/src/transport/local/local-transport.test.ts +262 -0
- package/src/transport/local/local-transport.ts +327 -0
- package/src/transport/multi/multi-transport.test.ts +320 -0
- package/src/transport/multi/multi-transport.ts +294 -0
- package/src/transport/rabbitmq/rabbitmq-transport.ts +753 -0
- package/src/transport/transport.ts +200 -0
- package/src/types/common.ts +53 -0
- package/src/types/envelope.ts +152 -0
- package/src/types/event.test.ts +157 -0
- package/src/types/event.ts +118 -0
- package/src/types/index.ts +52 -0
- package/src/types/subscriber.ts +310 -0
- package/test/e2e/multi-transport.e2e.test.ts +236 -0
- package/test/e2e/rabbitmq-transport.e2e.test.ts +327 -0
- package/test/e2e/transport-compliance.e2e.test.ts +505 -0
- package/test/integration/matador.integration.test.ts +634 -0
- package/tsconfig.json +29 -0
- package/tsconfig.tsbuildinfo +1 -0
- package/tsup.config.ts +13 -0
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Delivery semantics for message processing.
|
|
3
|
+
* - 'at-least-once': Acknowledge after processing (may redeliver on failure)
|
|
4
|
+
* - 'at-most-once': Acknowledge before processing (no redelivery, may lose messages)
|
|
5
|
+
*/
|
|
6
|
+
export type DeliveryMode = 'at-least-once' | 'at-most-once';
|
|
7
|
+
/**
|
|
8
|
+
* Importance level for subscribers, used for monitoring and alerting prioritization.
|
|
9
|
+
*/
|
|
10
|
+
export type Importance = 'can-ignore' | 'should-investigate' | 'must-investigate';
|
|
11
|
+
/**
|
|
12
|
+
* Idempotency declaration for subscribers.
|
|
13
|
+
* - 'yes': Safe to retry on failure (subscriber handles duplicates)
|
|
14
|
+
* - 'no': Not safe to retry, may cause duplicate side effects
|
|
15
|
+
* - 'unknown': Idempotency not determined (default)
|
|
16
|
+
* - 'resumable': Uses checkpoint-based idempotency via io() calls
|
|
17
|
+
*/
|
|
18
|
+
export type Idempotency = 'yes' | 'no' | 'unknown' | 'resumable';
|
|
19
|
+
/**
|
|
20
|
+
* Result of a validation operation.
|
|
21
|
+
*/
|
|
22
|
+
export interface ValidationResult {
|
|
23
|
+
readonly valid: boolean;
|
|
24
|
+
readonly errors: readonly ValidationError[];
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Individual validation error.
|
|
28
|
+
*/
|
|
29
|
+
export interface ValidationError {
|
|
30
|
+
readonly path: string;
|
|
31
|
+
readonly message: string;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Creates a successful validation result.
|
|
35
|
+
*/
|
|
36
|
+
export declare function validResult(): ValidationResult;
|
|
37
|
+
/**
|
|
38
|
+
* Creates a failed validation result.
|
|
39
|
+
*/
|
|
40
|
+
export declare function invalidResult(errors: ValidationError[]): ValidationResult;
|
|
41
|
+
//# sourceMappingURL=common.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../../src/types/common.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,MAAM,MAAM,YAAY,GAAG,eAAe,GAAG,cAAc,CAAC;AAE5D;;GAEG;AACH,MAAM,MAAM,UAAU,GAClB,YAAY,GACZ,oBAAoB,GACpB,kBAAkB,CAAC;AAEvB;;;;;;GAMG;AACH,MAAM,MAAM,WAAW,GAAG,KAAK,GAAG,IAAI,GAAG,SAAS,GAAG,WAAW,CAAC;AAEjE;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAC;IACxB,QAAQ,CAAC,MAAM,EAAE,SAAS,eAAe,EAAE,CAAC;CAC7C;AAED;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;CAC1B;AAED;;GAEG;AACH,wBAAgB,WAAW,IAAI,gBAAgB,CAE9C;AAED;;GAEG;AACH,wBAAgB,aAAa,CAAC,MAAM,EAAE,eAAe,EAAE,GAAG,gBAAgB,CAEzE"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Creates a successful validation result.
|
|
3
|
+
*/
|
|
4
|
+
export function validResult() {
|
|
5
|
+
return { valid: true, errors: [] };
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* Creates a failed validation result.
|
|
9
|
+
*/
|
|
10
|
+
export function invalidResult(errors) {
|
|
11
|
+
return { valid: false, errors };
|
|
12
|
+
}
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import type { Importance } from './common.js';
|
|
2
|
+
/**
|
|
3
|
+
* Message envelope containing the event data and routing/observability metadata.
|
|
4
|
+
* This is the transport-agnostic message format used throughout Matador.
|
|
5
|
+
*/
|
|
6
|
+
export interface Envelope<T = unknown> {
|
|
7
|
+
/** Unique message ID (UUID v4) */
|
|
8
|
+
readonly id: string;
|
|
9
|
+
/** The event data */
|
|
10
|
+
readonly data: T;
|
|
11
|
+
/** Routing, processing state, and observability metadata */
|
|
12
|
+
readonly docket: Docket;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Metadata associated with an envelope for routing, processing state, and observability.
|
|
16
|
+
*/
|
|
17
|
+
export interface Docket {
|
|
18
|
+
/** Event key for routing */
|
|
19
|
+
readonly eventKey: string;
|
|
20
|
+
/** Human-readable description of the event (for observability/logging) */
|
|
21
|
+
readonly eventDescription?: string | undefined;
|
|
22
|
+
/** Target subscriber name for 1:1 routing */
|
|
23
|
+
readonly targetSubscriber: string;
|
|
24
|
+
/** Original queue before any dead-letter routing */
|
|
25
|
+
originalQueue?: string | undefined;
|
|
26
|
+
/** Scheduled processing time for delayed messages (ISO 8601 string) */
|
|
27
|
+
scheduledFor?: string | undefined;
|
|
28
|
+
/**
|
|
29
|
+
* Attempt counter managed by Matador (1-based).
|
|
30
|
+
* Incremented on each retry. Used when transport doesn't track attempts.
|
|
31
|
+
*/
|
|
32
|
+
attempts: number;
|
|
33
|
+
/** When the envelope was first created (ISO 8601 string) */
|
|
34
|
+
readonly createdAt: string;
|
|
35
|
+
/** Error message from first failure (for debugging) */
|
|
36
|
+
firstError?: string | undefined;
|
|
37
|
+
/** Error message from most recent failure */
|
|
38
|
+
lastError?: string | undefined;
|
|
39
|
+
/** Importance level for monitoring */
|
|
40
|
+
readonly importance: Importance;
|
|
41
|
+
/** Correlation ID for request tracing */
|
|
42
|
+
readonly correlationId?: string | undefined;
|
|
43
|
+
/**
|
|
44
|
+
* Custom metadata provided by the application.
|
|
45
|
+
* This is the merged result of universal metadata (from loadUniversalMetadata hook)
|
|
46
|
+
* and event-specific metadata (from dispatch options). Event-specific metadata
|
|
47
|
+
* overrides universal metadata when keys conflict.
|
|
48
|
+
*/
|
|
49
|
+
readonly metadata?: Record<string, unknown> | undefined;
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* Fields from Docket that can be specified when creating an envelope.
|
|
53
|
+
*/
|
|
54
|
+
type DocketCreateFields = Pick<Docket, 'eventKey' | 'eventDescription' | 'targetSubscriber' | 'importance' | 'correlationId'>;
|
|
55
|
+
/**
|
|
56
|
+
* Options for creating an envelope.
|
|
57
|
+
*/
|
|
58
|
+
export interface CreateEnvelopeOptions<T> extends DocketCreateFields {
|
|
59
|
+
/** Optional custom ID (defaults to UUID v4) */
|
|
60
|
+
readonly id?: string | undefined;
|
|
61
|
+
/** The event data */
|
|
62
|
+
readonly data: T;
|
|
63
|
+
/**
|
|
64
|
+
* Event-specific metadata to include in the docket.
|
|
65
|
+
* Will be merged with universal metadata, with these values taking precedence.
|
|
66
|
+
*/
|
|
67
|
+
readonly metadata?: Record<string, unknown> | undefined;
|
|
68
|
+
/**
|
|
69
|
+
* Universal metadata loaded from the loadUniversalMetadata hook.
|
|
70
|
+
* This is provided by the fanout engine, not by the caller.
|
|
71
|
+
* @internal
|
|
72
|
+
*/
|
|
73
|
+
readonly universalMetadata?: Record<string, unknown> | undefined;
|
|
74
|
+
/** Delay processing by this many milliseconds */
|
|
75
|
+
readonly delayMs?: number | undefined;
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* Creates a new envelope with the provided options.
|
|
79
|
+
*/
|
|
80
|
+
export declare function createEnvelope<T>(options: CreateEnvelopeOptions<T>): Envelope<T>;
|
|
81
|
+
export {};
|
|
82
|
+
//# sourceMappingURL=envelope.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"envelope.d.ts","sourceRoot":"","sources":["../../src/types/envelope.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAE9C;;;GAGG;AACH,MAAM,WAAW,QAAQ,CAAC,CAAC,GAAG,OAAO;IACnC,kCAAkC;IAClC,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IAEpB,qBAAqB;IACrB,QAAQ,CAAC,IAAI,EAAE,CAAC,CAAC;IAEjB,4DAA4D;IAC5D,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;CACzB;AAED;;GAEG;AACH,MAAM,WAAW,MAAM;IAGrB,4BAA4B;IAC5B,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAE1B,0EAA0E;IAC1E,QAAQ,CAAC,gBAAgB,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAE/C,6CAA6C;IAC7C,QAAQ,CAAC,gBAAgB,EAAE,MAAM,CAAC;IAElC,oDAAoD;IACpD,aAAa,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAEnC,uEAAuE;IACvE,YAAY,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAIlC;;;OAGG;IACH,QAAQ,EAAE,MAAM,CAAC;IAEjB,4DAA4D;IAC5D,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAE3B,uDAAuD;IACvD,UAAU,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAEhC,6CAA6C;IAC7C,SAAS,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAI/B,sCAAsC;IACtC,QAAQ,CAAC,UAAU,EAAE,UAAU,CAAC;IAEhC,yCAAyC;IACzC,QAAQ,CAAC,aAAa,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAE5C;;;;;OAKG;IACH,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,CAAC;CACzD;AAED;;GAEG;AACH,KAAK,kBAAkB,GAAG,IAAI,CAC5B,MAAM,EACJ,UAAU,GACV,kBAAkB,GAClB,kBAAkB,GAClB,YAAY,GACZ,eAAe,CAClB,CAAC;AAEF;;GAEG;AACH,MAAM,WAAW,qBAAqB,CAAC,CAAC,CAAE,SAAQ,kBAAkB;IAClE,+CAA+C;IAC/C,QAAQ,CAAC,EAAE,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAEjC,qBAAqB;IACrB,QAAQ,CAAC,IAAI,EAAE,CAAC,CAAC;IAEjB;;;OAGG;IACH,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,CAAC;IAExD;;;;OAIG;IACH,QAAQ,CAAC,iBAAiB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,CAAC;IAEjE,iDAAiD;IACjD,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CACvC;AAED;;GAEG;AACH,wBAAgB,cAAc,CAAC,CAAC,EAC9B,OAAO,EAAE,qBAAqB,CAAC,CAAC,CAAC,GAChC,QAAQ,CAAC,CAAC,CAAC,CAmCb"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Creates a new envelope with the provided options.
|
|
3
|
+
*/
|
|
4
|
+
export function createEnvelope(options) {
|
|
5
|
+
const now = new Date().toISOString();
|
|
6
|
+
// Merge universal metadata with event-specific metadata
|
|
7
|
+
// Event-specific metadata takes precedence
|
|
8
|
+
const mergedMetadata = options.universalMetadata || options.metadata
|
|
9
|
+
? { ...options.universalMetadata, ...options.metadata }
|
|
10
|
+
: undefined;
|
|
11
|
+
return {
|
|
12
|
+
id: options.id ?? crypto.randomUUID(),
|
|
13
|
+
data: options.data,
|
|
14
|
+
docket: {
|
|
15
|
+
// Routing
|
|
16
|
+
eventKey: options.eventKey,
|
|
17
|
+
...(options.eventDescription !== undefined && {
|
|
18
|
+
eventDescription: options.eventDescription,
|
|
19
|
+
}),
|
|
20
|
+
targetSubscriber: options.targetSubscriber,
|
|
21
|
+
...(options.delayMs !== undefined &&
|
|
22
|
+
options.delayMs > 0 && {
|
|
23
|
+
scheduledFor: new Date(Date.now() + options.delayMs).toISOString(),
|
|
24
|
+
}),
|
|
25
|
+
// Processing state
|
|
26
|
+
attempts: 1,
|
|
27
|
+
createdAt: now,
|
|
28
|
+
// Observability
|
|
29
|
+
importance: options.importance,
|
|
30
|
+
...(options.correlationId !== undefined && {
|
|
31
|
+
correlationId: options.correlationId,
|
|
32
|
+
}),
|
|
33
|
+
...(mergedMetadata !== undefined && { metadata: mergedMetadata }),
|
|
34
|
+
},
|
|
35
|
+
};
|
|
36
|
+
}
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Unique event routing key type alias.
|
|
3
|
+
*/
|
|
4
|
+
export type EventKey = string;
|
|
5
|
+
/**
|
|
6
|
+
* JSON-serializable primitive types.
|
|
7
|
+
*/
|
|
8
|
+
export type JsonPrimitive = string | number | boolean | null;
|
|
9
|
+
/**
|
|
10
|
+
* JSON-serializable value (recursive type for objects and arrays).
|
|
11
|
+
*/
|
|
12
|
+
export type JsonValue = JsonPrimitive | JsonValue[] | {
|
|
13
|
+
[key: string]: JsonValue;
|
|
14
|
+
};
|
|
15
|
+
/**
|
|
16
|
+
* JSON-serializable record type for metadata.
|
|
17
|
+
*/
|
|
18
|
+
export type JsonRecord = Record<string, JsonValue>;
|
|
19
|
+
/**
|
|
20
|
+
* Static properties required on Event classes for schema registration.
|
|
21
|
+
*/
|
|
22
|
+
export interface EventStatic<T = unknown> {
|
|
23
|
+
/** Unique routing key for the event */
|
|
24
|
+
readonly key: string;
|
|
25
|
+
/** Human-readable description of the event */
|
|
26
|
+
readonly description?: string;
|
|
27
|
+
/** Alternative names/keys for backwards compatibility */
|
|
28
|
+
readonly aliases?: readonly string[];
|
|
29
|
+
/** Create an instance from data (for deserialization) */
|
|
30
|
+
new (data: T): Event<T>;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Base interface for all events.
|
|
34
|
+
* Events represent something that happened in the system.
|
|
35
|
+
*/
|
|
36
|
+
export interface Event<T = unknown> {
|
|
37
|
+
/** The event data/payload */
|
|
38
|
+
readonly data: T;
|
|
39
|
+
/** Event-specific metadata (merged with EventOptions metadata on dispatch) */
|
|
40
|
+
readonly metadata?: JsonRecord | undefined;
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Options for dispatching an event.
|
|
44
|
+
*/
|
|
45
|
+
export interface EventOptions {
|
|
46
|
+
/** Delay processing by this many milliseconds */
|
|
47
|
+
readonly delayMs?: number | undefined;
|
|
48
|
+
/** Correlation ID for request tracing */
|
|
49
|
+
readonly correlationId?: string | undefined;
|
|
50
|
+
/**
|
|
51
|
+
* Event-specific metadata to include in the docket.
|
|
52
|
+
* This metadata will be merged with:
|
|
53
|
+
* 1. Event instance metadata (if defined on the event)
|
|
54
|
+
* 2. Universal metadata from the loadUniversalMetadata hook
|
|
55
|
+
* With EventOptions metadata taking precedence over event metadata,
|
|
56
|
+
* and both taking precedence over universal metadata.
|
|
57
|
+
*/
|
|
58
|
+
readonly metadata?: JsonRecord | undefined;
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* Abstract base class for creating Matador events.
|
|
62
|
+
* Extend this class to define custom events.
|
|
63
|
+
*
|
|
64
|
+
* @example
|
|
65
|
+
* ```typescript
|
|
66
|
+
* class UserCreatedEvent extends MatadorEvent {
|
|
67
|
+
* static readonly key = 'user.created'
|
|
68
|
+
* static readonly description = 'Fired when a new user is created'
|
|
69
|
+
*
|
|
70
|
+
* constructor(
|
|
71
|
+
* public data: { userId: string; email: string },
|
|
72
|
+
* public metadata?: JsonRecord,
|
|
73
|
+
* ) {
|
|
74
|
+
* super()
|
|
75
|
+
* }
|
|
76
|
+
* }
|
|
77
|
+
* ```
|
|
78
|
+
*/
|
|
79
|
+
export declare abstract class MatadorEvent<T = unknown> implements Event<T> {
|
|
80
|
+
static readonly key: string;
|
|
81
|
+
static readonly description?: string;
|
|
82
|
+
static readonly aliases?: readonly string[];
|
|
83
|
+
/** The event data/payload - must be defined by subclass */
|
|
84
|
+
abstract readonly data: T;
|
|
85
|
+
/** Event-specific metadata */
|
|
86
|
+
readonly metadata?: JsonRecord | undefined;
|
|
87
|
+
}
|
|
88
|
+
/**
|
|
89
|
+
* Type helper to extract the data type from an event class.
|
|
90
|
+
*/
|
|
91
|
+
export type EventData<E extends Event<unknown>> = E extends Event<infer T> ? T : never;
|
|
92
|
+
/**
|
|
93
|
+
* Type helper to get the event class type.
|
|
94
|
+
*/
|
|
95
|
+
export type EventClass<T = unknown> = EventStatic<T> & (new (data: T) => Event<T>);
|
|
96
|
+
//# sourceMappingURL=event.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"event.d.ts","sourceRoot":"","sources":["../../src/types/event.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,MAAM,QAAQ,GAAG,MAAM,CAAC;AAE9B;;GAEG;AACH,MAAM,MAAM,aAAa,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,IAAI,CAAC;AAE7D;;GAEG;AACH,MAAM,MAAM,SAAS,GACjB,aAAa,GACb,SAAS,EAAE,GACX;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,SAAS,CAAA;CAAE,CAAC;AAEjC;;GAEG;AACH,MAAM,MAAM,UAAU,GAAG,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC;AAEnD;;GAEG;AACH,MAAM,WAAW,WAAW,CAAC,CAAC,GAAG,OAAO;IACtC,uCAAuC;IACvC,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IAErB,8CAA8C;IAC9C,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;IAE9B,yDAAyD;IACzD,QAAQ,CAAC,OAAO,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAErC,yDAAyD;IACzD,KAAK,IAAI,EAAE,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC;CACzB;AAED;;;GAGG;AACH,MAAM,WAAW,KAAK,CAAC,CAAC,GAAG,OAAO;IAChC,6BAA6B;IAC7B,QAAQ,CAAC,IAAI,EAAE,CAAC,CAAC;IAEjB,8EAA8E;IAC9E,QAAQ,CAAC,QAAQ,CAAC,EAAE,UAAU,GAAG,SAAS,CAAC;CAC5C;AAED;;GAEG;AACH,MAAM,WAAW,YAAY;IAC3B,iDAAiD;IACjD,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAEtC,yCAAyC;IACzC,QAAQ,CAAC,aAAa,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAE5C;;;;;;;OAOG;IACH,QAAQ,CAAC,QAAQ,CAAC,EAAE,UAAU,GAAG,SAAS,CAAC;CAC5C;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,8BAAsB,YAAY,CAAC,CAAC,GAAG,OAAO,CAAE,YAAW,KAAK,CAAC,CAAC,CAAC;IACjE,MAAM,CAAC,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IAC5B,MAAM,CAAC,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrC,MAAM,CAAC,QAAQ,CAAC,OAAO,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAE5C,2DAA2D;IAC3D,QAAQ,CAAC,QAAQ,CAAC,IAAI,EAAE,CAAC,CAAC;IAE1B,8BAA8B;IAC9B,QAAQ,CAAC,QAAQ,CAAC,EAAE,UAAU,GAAG,SAAS,CAAC;CAC5C;AAED;;GAEG;AACH,MAAM,MAAM,SAAS,CAAC,CAAC,SAAS,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,SAAS,KAAK,CAAC,MAAM,CAAC,CAAC,GACtE,CAAC,GACD,KAAK,CAAC;AAEV;;GAEG;AACH,MAAM,MAAM,UAAU,CAAC,CAAC,GAAG,OAAO,IAAI,WAAW,CAAC,CAAC,CAAC,GAClD,CAAC,KACC,IAAI,EAAE,CAAC,KACJ,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Abstract base class for creating Matador events.
|
|
3
|
+
* Extend this class to define custom events.
|
|
4
|
+
*
|
|
5
|
+
* @example
|
|
6
|
+
* ```typescript
|
|
7
|
+
* class UserCreatedEvent extends MatadorEvent {
|
|
8
|
+
* static readonly key = 'user.created'
|
|
9
|
+
* static readonly description = 'Fired when a new user is created'
|
|
10
|
+
*
|
|
11
|
+
* constructor(
|
|
12
|
+
* public data: { userId: string; email: string },
|
|
13
|
+
* public metadata?: JsonRecord,
|
|
14
|
+
* ) {
|
|
15
|
+
* super()
|
|
16
|
+
* }
|
|
17
|
+
* }
|
|
18
|
+
* ```
|
|
19
|
+
*/
|
|
20
|
+
export class MatadorEvent {
|
|
21
|
+
static key;
|
|
22
|
+
static description;
|
|
23
|
+
static aliases;
|
|
24
|
+
/** Event-specific metadata */
|
|
25
|
+
metadata;
|
|
26
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"event.test.d.ts","sourceRoot":"","sources":["../../src/types/event.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
import { describe, expect, it } from 'bun:test';
|
|
2
|
+
import { createEnvelope } from './envelope.js';
|
|
3
|
+
import { MatadorEvent } from './event.js';
|
|
4
|
+
class UserCreatedEvent extends MatadorEvent {
|
|
5
|
+
data;
|
|
6
|
+
static key = 'user.created';
|
|
7
|
+
static description = 'Fired when a new user is created';
|
|
8
|
+
constructor(data) {
|
|
9
|
+
super();
|
|
10
|
+
this.data = data;
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
class OrderPlacedEvent extends MatadorEvent {
|
|
14
|
+
data;
|
|
15
|
+
static key = 'order.placed';
|
|
16
|
+
static description = 'Fired when an order is placed';
|
|
17
|
+
static aliases = ['order.created'];
|
|
18
|
+
constructor(data) {
|
|
19
|
+
super();
|
|
20
|
+
this.data = data;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
class MinimalEvent extends MatadorEvent {
|
|
24
|
+
data;
|
|
25
|
+
static key = 'minimal.event';
|
|
26
|
+
constructor(data) {
|
|
27
|
+
super();
|
|
28
|
+
this.data = data;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
describe('Event', () => {
|
|
32
|
+
describe('static fields', () => {
|
|
33
|
+
it('should have static key field on class', () => {
|
|
34
|
+
expect(UserCreatedEvent.key).toBe('user.created');
|
|
35
|
+
expect(OrderPlacedEvent.key).toBe('order.placed');
|
|
36
|
+
expect(MinimalEvent.key).toBe('minimal.event');
|
|
37
|
+
});
|
|
38
|
+
it('should have static description field on class when defined', () => {
|
|
39
|
+
expect(UserCreatedEvent.description).toBe('Fired when a new user is created');
|
|
40
|
+
expect(OrderPlacedEvent.description).toBe('Fired when an order is placed');
|
|
41
|
+
expect(MinimalEvent.description).toBeUndefined();
|
|
42
|
+
});
|
|
43
|
+
it('should have static aliases field on class when defined', () => {
|
|
44
|
+
expect(UserCreatedEvent.aliases).toBeUndefined();
|
|
45
|
+
expect(OrderPlacedEvent.aliases).toEqual(['order.created']);
|
|
46
|
+
expect(MinimalEvent.aliases).toBeUndefined();
|
|
47
|
+
});
|
|
48
|
+
});
|
|
49
|
+
describe('instance data', () => {
|
|
50
|
+
it('should have instance data field', () => {
|
|
51
|
+
const event = new UserCreatedEvent({
|
|
52
|
+
userId: 'usr_001',
|
|
53
|
+
email: 'test@example.com',
|
|
54
|
+
});
|
|
55
|
+
expect(event.data).toEqual({
|
|
56
|
+
userId: 'usr_001',
|
|
57
|
+
email: 'test@example.com',
|
|
58
|
+
});
|
|
59
|
+
});
|
|
60
|
+
});
|
|
61
|
+
});
|
|
62
|
+
describe('Envelope with eventDescription', () => {
|
|
63
|
+
it('should include eventDescription in docket when provided', () => {
|
|
64
|
+
const event = new UserCreatedEvent({
|
|
65
|
+
userId: 'usr_123',
|
|
66
|
+
email: 'test@example.com',
|
|
67
|
+
});
|
|
68
|
+
const envelope = createEnvelope({
|
|
69
|
+
eventKey: UserCreatedEvent.key,
|
|
70
|
+
eventDescription: UserCreatedEvent.description,
|
|
71
|
+
targetSubscriber: 'test-subscriber',
|
|
72
|
+
data: event.data,
|
|
73
|
+
importance: 'should-investigate',
|
|
74
|
+
});
|
|
75
|
+
expect(envelope.docket.eventKey).toBe('user.created');
|
|
76
|
+
expect(envelope.docket.eventDescription).toBe('Fired when a new user is created');
|
|
77
|
+
});
|
|
78
|
+
it('should not include eventDescription in docket when undefined', () => {
|
|
79
|
+
const event = new MinimalEvent({ id: 'min_123' });
|
|
80
|
+
const envelope = createEnvelope({
|
|
81
|
+
eventKey: MinimalEvent.key,
|
|
82
|
+
eventDescription: MinimalEvent.description,
|
|
83
|
+
targetSubscriber: 'test-subscriber',
|
|
84
|
+
data: event.data,
|
|
85
|
+
importance: 'should-investigate',
|
|
86
|
+
});
|
|
87
|
+
expect(envelope.docket.eventKey).toBe('minimal.event');
|
|
88
|
+
expect(envelope.docket.eventDescription).toBeUndefined();
|
|
89
|
+
});
|
|
90
|
+
it('should serialize envelope with eventDescription for logging', () => {
|
|
91
|
+
const event = new OrderPlacedEvent({
|
|
92
|
+
orderId: 'ord_456',
|
|
93
|
+
amount: 99.99,
|
|
94
|
+
});
|
|
95
|
+
const envelope = createEnvelope({
|
|
96
|
+
eventKey: OrderPlacedEvent.key,
|
|
97
|
+
eventDescription: OrderPlacedEvent.description,
|
|
98
|
+
targetSubscriber: 'order-processor',
|
|
99
|
+
data: event.data,
|
|
100
|
+
importance: 'must-investigate',
|
|
101
|
+
});
|
|
102
|
+
const serialized = JSON.stringify(envelope);
|
|
103
|
+
const parsed = JSON.parse(serialized);
|
|
104
|
+
expect(parsed.docket.eventKey).toBe('order.placed');
|
|
105
|
+
expect(parsed.docket.eventDescription).toBe('Fired when an order is placed');
|
|
106
|
+
expect(parsed.data.orderId).toBe('ord_456');
|
|
107
|
+
});
|
|
108
|
+
it('should include eventDescription in hook logging context', () => {
|
|
109
|
+
const event = new UserCreatedEvent({
|
|
110
|
+
userId: 'usr_error',
|
|
111
|
+
email: 'error@example.com',
|
|
112
|
+
});
|
|
113
|
+
const envelope = createEnvelope({
|
|
114
|
+
eventKey: UserCreatedEvent.key,
|
|
115
|
+
eventDescription: UserCreatedEvent.description,
|
|
116
|
+
targetSubscriber: 'user-handler',
|
|
117
|
+
data: event.data,
|
|
118
|
+
importance: 'should-investigate',
|
|
119
|
+
});
|
|
120
|
+
// Simulating what would be logged in onEnqueueError hook
|
|
121
|
+
const errorLog = {
|
|
122
|
+
message: 'Failed to enqueue event',
|
|
123
|
+
eventKey: envelope.docket.eventKey,
|
|
124
|
+
eventDescription: envelope.docket.eventDescription,
|
|
125
|
+
data: envelope.data,
|
|
126
|
+
};
|
|
127
|
+
expect(errorLog.eventKey).toBe('user.created');
|
|
128
|
+
expect(errorLog.eventDescription).toBe('Fired when a new user is created');
|
|
129
|
+
});
|
|
130
|
+
});
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export type { DeliveryMode, Idempotency, Importance, ValidationError, ValidationResult, } from './common.js';
|
|
2
|
+
export { invalidResult, validResult } from './common.js';
|
|
3
|
+
export type { CreateEnvelopeOptions, Docket, Envelope } from './envelope.js';
|
|
4
|
+
export { createEnvelope } from './envelope.js';
|
|
5
|
+
export type { Event, EventClass, EventData, EventKey, EventOptions, EventStatic, JsonPrimitive, JsonRecord, JsonValue, } from './event.js';
|
|
6
|
+
export { MatadorEvent } from './event.js';
|
|
7
|
+
export type { AnySubscriber, BaseSubscriberOptions, CreateResumableSubscriberInput, CreateStandardSubscriberInput, CreateSubscriberInput, EnvelopeOf, ResumableCallback, ResumableSubscriber, ResumableSubscriberOptions, StandardCallback, StandardSubscriber, StandardSubscriberOptions, Subscriber, SubscriberCallback, SubscriberDefinition, SubscriberOptions, SubscriberStub, } from './subscriber.js';
|
|
8
|
+
export { createSubscriber, createSubscriberStub, isResumableSubscriber, isStandardSubscriber, isSubscriber, isSubscriberStub, } from './subscriber.js';
|
|
9
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,YAAY,EACZ,WAAW,EACX,UAAU,EACV,eAAe,EACf,gBAAgB,GACjB,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAEzD,YAAY,EAAE,qBAAqB,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAC7E,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAE/C,YAAY,EACV,KAAK,EACL,UAAU,EACV,SAAS,EACT,QAAQ,EACR,YAAY,EACZ,WAAW,EACX,aAAa,EACb,UAAU,EACV,SAAS,GACV,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAE1C,YAAY,EACV,aAAa,EACb,qBAAqB,EACrB,8BAA8B,EAC9B,6BAA6B,EAC7B,qBAAqB,EACrB,UAAU,EACV,iBAAiB,EACjB,mBAAmB,EACnB,0BAA0B,EAC1B,gBAAgB,EAChB,kBAAkB,EAClB,yBAAyB,EACzB,UAAU,EACV,kBAAkB,EAClB,oBAAoB,EACpB,iBAAiB,EACjB,cAAc,GACf,MAAM,iBAAiB,CAAC;AACzB,OAAO,EACL,gBAAgB,EAChB,oBAAoB,EACpB,qBAAqB,EACrB,oBAAoB,EACpB,YAAY,EACZ,gBAAgB,GACjB,MAAM,iBAAiB,CAAC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export { invalidResult, validResult } from './common.js';
|
|
2
|
+
export { createEnvelope } from './envelope.js';
|
|
3
|
+
export { MatadorEvent } from './event.js';
|
|
4
|
+
export { createSubscriber, createSubscriberStub, isResumableSubscriber, isStandardSubscriber, isSubscriber, isSubscriberStub, } from './subscriber.js';
|