@geekmidas/events 0.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/README.md +473 -0
- package/dist/BasicConnection-BNi6_olg.mjs +42 -0
- package/dist/BasicConnection-BNi6_olg.mjs.map +1 -0
- package/dist/BasicConnection-C4_Y0nIj.d.mts +26 -0
- package/dist/BasicConnection-CddnULuT.d.cts +26 -0
- package/dist/BasicConnection-CzfMubv_.cjs +48 -0
- package/dist/BasicConnection-CzfMubv_.cjs.map +1 -0
- package/dist/BasicPublisher-BzfzHIfb.cjs +20 -0
- package/dist/BasicPublisher-BzfzHIfb.cjs.map +1 -0
- package/dist/BasicPublisher-Cg3SxIVR.mjs +14 -0
- package/dist/BasicPublisher-Cg3SxIVR.mjs.map +1 -0
- package/dist/BasicPublisher-DCBxaTwC.d.mts +12 -0
- package/dist/BasicPublisher-V5hELHG9.d.cts +12 -0
- package/dist/BasicSubscriber-BB3aKeph.d.mts +12 -0
- package/dist/BasicSubscriber-BEv5N21f.mjs +18 -0
- package/dist/BasicSubscriber-BEv5N21f.mjs.map +1 -0
- package/dist/BasicSubscriber-DOwgFw5j.d.cts +12 -0
- package/dist/BasicSubscriber-DyTKOixe.cjs +24 -0
- package/dist/BasicSubscriber-DyTKOixe.cjs.map +1 -0
- package/dist/EventConnection-ClLMoIUU.mjs +36 -0
- package/dist/EventConnection-ClLMoIUU.mjs.map +1 -0
- package/dist/EventConnection-DZhn1Msl.d.cts +13 -0
- package/dist/EventConnection-DeXfLGom.d.mts +13 -0
- package/dist/EventConnection-F_N81SXu.cjs +41 -0
- package/dist/EventConnection-F_N81SXu.cjs.map +1 -0
- package/dist/EventConnection.cjs +5 -0
- package/dist/EventConnection.d.cts +3 -0
- package/dist/EventConnection.d.mts +3 -0
- package/dist/EventConnection.mjs +4 -0
- package/dist/Publisher-C3m8JFXm.d.mts +19 -0
- package/dist/Publisher-DS0aOh8r.mjs +65 -0
- package/dist/Publisher-DS0aOh8r.mjs.map +1 -0
- package/dist/Publisher-ceu6OxCj.cjs +70 -0
- package/dist/Publisher-ceu6OxCj.cjs.map +1 -0
- package/dist/Publisher-nXNVjL0e.d.cts +19 -0
- package/dist/Publisher.cjs +4 -0
- package/dist/Publisher.d.cts +3 -0
- package/dist/Publisher.d.mts +3 -0
- package/dist/Publisher.mjs +4 -0
- package/dist/RabbitMQConnection-7cWp_-_Q.d.cts +43 -0
- package/dist/RabbitMQConnection-BN_GybOv.cjs +113 -0
- package/dist/RabbitMQConnection-BN_GybOv.cjs.map +1 -0
- package/dist/RabbitMQConnection-C2HC7J7K.d.mts +43 -0
- package/dist/RabbitMQConnection-eVOVS4Dl.mjs +107 -0
- package/dist/RabbitMQConnection-eVOVS4Dl.mjs.map +1 -0
- package/dist/RabbitMQPublisher-BZX0edgL.mjs +39 -0
- package/dist/RabbitMQPublisher-BZX0edgL.mjs.map +1 -0
- package/dist/RabbitMQPublisher-CSCn6gMA.cjs +45 -0
- package/dist/RabbitMQPublisher-CSCn6gMA.cjs.map +1 -0
- package/dist/RabbitMQPublisher-CpcbgrXj.d.cts +23 -0
- package/dist/RabbitMQPublisher-DDZi15Ro.d.mts +23 -0
- package/dist/RabbitMQSubscriber-B5I-hBaT.mjs +57 -0
- package/dist/RabbitMQSubscriber-B5I-hBaT.mjs.map +1 -0
- package/dist/RabbitMQSubscriber-BJ9PTGny.d.cts +25 -0
- package/dist/RabbitMQSubscriber-CIvIw8MG.d.mts +25 -0
- package/dist/RabbitMQSubscriber-Cj7qLIi6.cjs +63 -0
- package/dist/RabbitMQSubscriber-Cj7qLIi6.cjs.map +1 -0
- package/dist/SNSConnection-CAImaMM2.d.mts +40 -0
- package/dist/SNSConnection-Cqbr7-Ho.d.cts +40 -0
- package/dist/SNSConnection-D7wCf9Si.mjs +70 -0
- package/dist/SNSConnection-D7wCf9Si.mjs.map +1 -0
- package/dist/SNSConnection-DVsC_pbB.cjs +76 -0
- package/dist/SNSConnection-DVsC_pbB.cjs.map +1 -0
- package/dist/SNSPublisher-BZ6N3JI9.cjs +48 -0
- package/dist/SNSPublisher-BZ6N3JI9.cjs.map +1 -0
- package/dist/SNSPublisher-BfWjzNiB.mjs +42 -0
- package/dist/SNSPublisher-BfWjzNiB.mjs.map +1 -0
- package/dist/SNSPublisher-Dkhb4LU-.d.mts +21 -0
- package/dist/SNSPublisher-RVZFa7kL.d.cts +21 -0
- package/dist/SNSSubscriber-B31JmkAE.d.mts +54 -0
- package/dist/SNSSubscriber-C9YJWa7m.mjs +143 -0
- package/dist/SNSSubscriber-C9YJWa7m.mjs.map +1 -0
- package/dist/SNSSubscriber-UE0ia4XM.cjs +149 -0
- package/dist/SNSSubscriber-UE0ia4XM.cjs.map +1 -0
- package/dist/SNSSubscriber-k2UwKUxu.d.cts +54 -0
- package/dist/SQSConnection-BwNjUPr4.cjs +76 -0
- package/dist/SQSConnection-BwNjUPr4.cjs.map +1 -0
- package/dist/SQSConnection-C5WFqZW7.d.mts +40 -0
- package/dist/SQSConnection-Eleqqre3.mjs +70 -0
- package/dist/SQSConnection-Eleqqre3.mjs.map +1 -0
- package/dist/SQSConnection-geav2Rsn.d.cts +40 -0
- package/dist/SQSPublisher-CdsayOLV.d.mts +23 -0
- package/dist/SQSPublisher-DG9o4ME3.mjs +57 -0
- package/dist/SQSPublisher-DG9o4ME3.mjs.map +1 -0
- package/dist/SQSPublisher-Dq5353oZ.cjs +63 -0
- package/dist/SQSPublisher-Dq5353oZ.cjs.map +1 -0
- package/dist/SQSPublisher-Utb_FTe5.d.cts +23 -0
- package/dist/SQSSubscriber-B6iL1EnX.d.cts +43 -0
- package/dist/SQSSubscriber-CD66P7hH.mjs +121 -0
- package/dist/SQSSubscriber-CD66P7hH.mjs.map +1 -0
- package/dist/SQSSubscriber-DBeE4XAR.d.mts +43 -0
- package/dist/SQSSubscriber-DZDNgLE5.cjs +127 -0
- package/dist/SQSSubscriber-DZDNgLE5.cjs.map +1 -0
- package/dist/Subscriber-Bd9hb_jp.mjs +74 -0
- package/dist/Subscriber-Bd9hb_jp.mjs.map +1 -0
- package/dist/Subscriber-Cff9EIpv.d.mts +19 -0
- package/dist/Subscriber-CpAwcUzb.d.cts +19 -0
- package/dist/Subscriber-saVOWuMq.cjs +79 -0
- package/dist/Subscriber-saVOWuMq.cjs.map +1 -0
- package/dist/Subscriber.cjs +4 -0
- package/dist/Subscriber.d.cts +3 -0
- package/dist/Subscriber.d.mts +3 -0
- package/dist/Subscriber.mjs +4 -0
- package/dist/basic/BasicConnection.cjs +4 -0
- package/dist/basic/BasicConnection.d.cts +3 -0
- package/dist/basic/BasicConnection.d.mts +3 -0
- package/dist/basic/BasicConnection.mjs +4 -0
- package/dist/basic/BasicPublisher.cjs +3 -0
- package/dist/basic/BasicPublisher.d.cts +4 -0
- package/dist/basic/BasicPublisher.d.mts +4 -0
- package/dist/basic/BasicPublisher.mjs +3 -0
- package/dist/basic/BasicSubscriber.cjs +3 -0
- package/dist/basic/BasicSubscriber.d.cts +4 -0
- package/dist/basic/BasicSubscriber.d.mts +4 -0
- package/dist/basic/BasicSubscriber.mjs +3 -0
- package/dist/basic/index.cjs +8 -0
- package/dist/basic/index.d.cts +5 -0
- package/dist/basic/index.d.mts +5 -0
- package/dist/basic/index.mjs +6 -0
- package/dist/chunk-CUT6urMc.cjs +30 -0
- package/dist/index.cjs +9 -0
- package/dist/index.d.cts +5 -0
- package/dist/index.d.mts +5 -0
- package/dist/index.mjs +6 -0
- package/dist/rabbitmq/RabbitMQConnection.cjs +4 -0
- package/dist/rabbitmq/RabbitMQConnection.d.cts +3 -0
- package/dist/rabbitmq/RabbitMQConnection.d.mts +3 -0
- package/dist/rabbitmq/RabbitMQConnection.mjs +4 -0
- package/dist/rabbitmq/RabbitMQPublisher.cjs +3 -0
- package/dist/rabbitmq/RabbitMQPublisher.d.cts +4 -0
- package/dist/rabbitmq/RabbitMQPublisher.d.mts +4 -0
- package/dist/rabbitmq/RabbitMQPublisher.mjs +3 -0
- package/dist/rabbitmq/RabbitMQSubscriber.cjs +3 -0
- package/dist/rabbitmq/RabbitMQSubscriber.d.cts +4 -0
- package/dist/rabbitmq/RabbitMQSubscriber.d.mts +4 -0
- package/dist/rabbitmq/RabbitMQSubscriber.mjs +3 -0
- package/dist/rabbitmq/index.cjs +8 -0
- package/dist/rabbitmq/index.d.cts +5 -0
- package/dist/rabbitmq/index.d.mts +5 -0
- package/dist/rabbitmq/index.mjs +6 -0
- package/dist/sns/SNSConnection.cjs +4 -0
- package/dist/sns/SNSConnection.d.cts +3 -0
- package/dist/sns/SNSConnection.d.mts +3 -0
- package/dist/sns/SNSConnection.mjs +4 -0
- package/dist/sns/SNSPublisher.cjs +3 -0
- package/dist/sns/SNSPublisher.d.cts +4 -0
- package/dist/sns/SNSPublisher.d.mts +4 -0
- package/dist/sns/SNSPublisher.mjs +3 -0
- package/dist/sns/SNSSubscriber.cjs +6 -0
- package/dist/sns/SNSSubscriber.d.cts +4 -0
- package/dist/sns/SNSSubscriber.d.mts +4 -0
- package/dist/sns/SNSSubscriber.mjs +6 -0
- package/dist/sns/index.cjs +10 -0
- package/dist/sns/index.d.cts +5 -0
- package/dist/sns/index.d.mts +5 -0
- package/dist/sns/index.mjs +8 -0
- package/dist/sqs/SQSConnection.cjs +4 -0
- package/dist/sqs/SQSConnection.d.cts +3 -0
- package/dist/sqs/SQSConnection.d.mts +3 -0
- package/dist/sqs/SQSConnection.mjs +4 -0
- package/dist/sqs/SQSPublisher.cjs +3 -0
- package/dist/sqs/SQSPublisher.d.cts +4 -0
- package/dist/sqs/SQSPublisher.d.mts +4 -0
- package/dist/sqs/SQSPublisher.mjs +3 -0
- package/dist/sqs/SQSSubscriber.cjs +3 -0
- package/dist/sqs/SQSSubscriber.d.cts +4 -0
- package/dist/sqs/SQSSubscriber.d.mts +4 -0
- package/dist/sqs/SQSSubscriber.mjs +3 -0
- package/dist/sqs/index.cjs +8 -0
- package/dist/sqs/index.d.cts +5 -0
- package/dist/sqs/index.d.mts +5 -0
- package/dist/sqs/index.mjs +6 -0
- package/dist/types-B63qHVOG.mjs +17 -0
- package/dist/types-B63qHVOG.mjs.map +1 -0
- package/dist/types-CvSMEO5z.cjs +23 -0
- package/dist/types-CvSMEO5z.cjs.map +1 -0
- package/dist/types-D0g-o6wX.d.mts +65 -0
- package/dist/types-DEGUg5BA.d.cts +65 -0
- package/dist/types.cjs +3 -0
- package/dist/types.d.cts +2 -0
- package/dist/types.d.mts +2 -0
- package/dist/types.mjs +3 -0
- package/package.json +49 -0
- package/src/EventConnection.ts +39 -0
- package/src/Publisher.ts +87 -0
- package/src/Subscriber.ts +102 -0
- package/src/__tests__/Subscriber.spec.ts +41 -0
- package/src/basic/BasicConnection.ts +47 -0
- package/src/basic/BasicPublisher.ts +15 -0
- package/src/basic/BasicSubscriber.ts +24 -0
- package/src/basic/__tests__/BasicSubscriber.spec.ts +166 -0
- package/src/basic/index.ts +3 -0
- package/src/index.ts +25 -0
- package/src/rabbitmq/RabbitMQConnection.ts +148 -0
- package/src/rabbitmq/RabbitMQPublisher.ts +67 -0
- package/src/rabbitmq/RabbitMQSubscriber.ts +113 -0
- package/src/rabbitmq/__tests__/RabbitMQPublisher.spec.ts +378 -0
- package/src/rabbitmq/__tests__/RabbitMQSubscriber.spec.ts +292 -0
- package/src/rabbitmq/index.ts +6 -0
- package/src/sns/SNSConnection.ts +98 -0
- package/src/sns/SNSPublisher.ts +64 -0
- package/src/sns/SNSSubscriber.ts +222 -0
- package/src/sns/__tests__/SNS-SQS-Integration.spec.ts +389 -0
- package/src/sns/index.ts +6 -0
- package/src/sqs/SQSConnection.ts +97 -0
- package/src/sqs/SQSPublisher.ts +105 -0
- package/src/sqs/SQSSubscriber.ts +189 -0
- package/src/sqs/__tests__/SQSPublisher.spec.ts +189 -0
- package/src/sqs/index.ts +6 -0
- package/src/types.ts +76 -0
- package/tsdown.config.ts +5 -0
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { EventPublisher, PublishableMessage } from "./types-DEGUg5BA.cjs";
|
|
2
|
+
import { BasicConnection } from "./BasicConnection-CddnULuT.cjs";
|
|
3
|
+
|
|
4
|
+
//#region src/basic/BasicPublisher.d.ts
|
|
5
|
+
declare class BasicPublisher<TMessage extends PublishableMessage<string, any>> implements EventPublisher<TMessage> {
|
|
6
|
+
private connection;
|
|
7
|
+
constructor(connection: BasicConnection);
|
|
8
|
+
publish(messages: TMessage[]): Promise<void>;
|
|
9
|
+
}
|
|
10
|
+
//#endregion
|
|
11
|
+
export { BasicPublisher };
|
|
12
|
+
//# sourceMappingURL=BasicPublisher-V5hELHG9.d.cts.map
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { EventSubscriber, PublishableMessage } from "./types-D0g-o6wX.mjs";
|
|
2
|
+
import { BasicConnection } from "./BasicConnection-C4_Y0nIj.mjs";
|
|
3
|
+
|
|
4
|
+
//#region src/basic/BasicSubscriber.d.ts
|
|
5
|
+
declare class BasicSubscriber<TMessage extends PublishableMessage<string, any>> implements EventSubscriber<TMessage> {
|
|
6
|
+
private connection;
|
|
7
|
+
constructor(connection: BasicConnection);
|
|
8
|
+
subscribe(messages: TMessage['type'][], listener: (payload: TMessage) => Promise<void>): Promise<void>;
|
|
9
|
+
}
|
|
10
|
+
//#endregion
|
|
11
|
+
export { BasicSubscriber };
|
|
12
|
+
//# sourceMappingURL=BasicSubscriber-BB3aKeph.d.mts.map
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
//#region src/basic/BasicSubscriber.ts
|
|
2
|
+
var BasicSubscriber = class {
|
|
3
|
+
constructor(connection) {
|
|
4
|
+
this.connection = connection;
|
|
5
|
+
}
|
|
6
|
+
async subscribe(messages, listener) {
|
|
7
|
+
const emitter = this.connection.eventEmitter;
|
|
8
|
+
for (const messageType of messages) emitter.on(messageType, (message) => {
|
|
9
|
+
listener(message).catch((error) => {
|
|
10
|
+
console.error(`Error processing message ${messageType}:`, error);
|
|
11
|
+
});
|
|
12
|
+
});
|
|
13
|
+
}
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
//#endregion
|
|
17
|
+
export { BasicSubscriber };
|
|
18
|
+
//# sourceMappingURL=BasicSubscriber-BEv5N21f.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BasicSubscriber-BEv5N21f.mjs","names":["connection: BasicConnection","messages: TMessage['type'][]","listener: (payload: TMessage) => Promise<void>","message: TMessage"],"sources":["../src/basic/BasicSubscriber.ts"],"sourcesContent":["import type { EventSubscriber, PublishableMessage } from '../types';\nimport type { BasicConnection } from './BasicConnection';\n\nexport class BasicSubscriber<TMessage extends PublishableMessage<string, any>>\n implements EventSubscriber<TMessage>\n{\n constructor(private connection: BasicConnection) {}\n\n async subscribe(\n messages: TMessage['type'][],\n listener: (payload: TMessage) => Promise<void>,\n ): Promise<void> {\n const emitter = this.connection.eventEmitter;\n\n for (const messageType of messages) {\n emitter.on(messageType, (message: TMessage) => {\n listener(message).catch((error) => {\n // Log error but don't throw to prevent unhandled promise rejections\n console.error(`Error processing message ${messageType}:`, error);\n });\n });\n }\n }\n}\n"],"mappings":";AAGA,IAAa,kBAAb,MAEA;CACE,YAAoBA,YAA6B;EAA7B;CAA+B;CAEnD,MAAM,UACJC,UACAC,UACe;EACf,MAAM,UAAU,KAAK,WAAW;AAEhC,OAAK,MAAM,eAAe,SACxB,SAAQ,GAAG,aAAa,CAACC,YAAsB;AAC7C,YAAS,QAAQ,CAAC,MAAM,CAAC,UAAU;AAEjC,YAAQ,OAAO,2BAA2B,YAAY,IAAI,MAAM;GACjE,EAAC;EACH,EAAC;CAEL;AACF"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { EventSubscriber, PublishableMessage } from "./types-DEGUg5BA.cjs";
|
|
2
|
+
import { BasicConnection } from "./BasicConnection-CddnULuT.cjs";
|
|
3
|
+
|
|
4
|
+
//#region src/basic/BasicSubscriber.d.ts
|
|
5
|
+
declare class BasicSubscriber<TMessage extends PublishableMessage<string, any>> implements EventSubscriber<TMessage> {
|
|
6
|
+
private connection;
|
|
7
|
+
constructor(connection: BasicConnection);
|
|
8
|
+
subscribe(messages: TMessage['type'][], listener: (payload: TMessage) => Promise<void>): Promise<void>;
|
|
9
|
+
}
|
|
10
|
+
//#endregion
|
|
11
|
+
export { BasicSubscriber };
|
|
12
|
+
//# sourceMappingURL=BasicSubscriber-DOwgFw5j.d.cts.map
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
|
|
2
|
+
//#region src/basic/BasicSubscriber.ts
|
|
3
|
+
var BasicSubscriber = class {
|
|
4
|
+
constructor(connection) {
|
|
5
|
+
this.connection = connection;
|
|
6
|
+
}
|
|
7
|
+
async subscribe(messages, listener) {
|
|
8
|
+
const emitter = this.connection.eventEmitter;
|
|
9
|
+
for (const messageType of messages) emitter.on(messageType, (message) => {
|
|
10
|
+
listener(message).catch((error) => {
|
|
11
|
+
console.error(`Error processing message ${messageType}:`, error);
|
|
12
|
+
});
|
|
13
|
+
});
|
|
14
|
+
}
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
//#endregion
|
|
18
|
+
Object.defineProperty(exports, 'BasicSubscriber', {
|
|
19
|
+
enumerable: true,
|
|
20
|
+
get: function () {
|
|
21
|
+
return BasicSubscriber;
|
|
22
|
+
}
|
|
23
|
+
});
|
|
24
|
+
//# sourceMappingURL=BasicSubscriber-DyTKOixe.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BasicSubscriber-DyTKOixe.cjs","names":["connection: BasicConnection","messages: TMessage['type'][]","listener: (payload: TMessage) => Promise<void>","message: TMessage"],"sources":["../src/basic/BasicSubscriber.ts"],"sourcesContent":["import type { EventSubscriber, PublishableMessage } from '../types';\nimport type { BasicConnection } from './BasicConnection';\n\nexport class BasicSubscriber<TMessage extends PublishableMessage<string, any>>\n implements EventSubscriber<TMessage>\n{\n constructor(private connection: BasicConnection) {}\n\n async subscribe(\n messages: TMessage['type'][],\n listener: (payload: TMessage) => Promise<void>,\n ): Promise<void> {\n const emitter = this.connection.eventEmitter;\n\n for (const messageType of messages) {\n emitter.on(messageType, (message: TMessage) => {\n listener(message).catch((error) => {\n // Log error but don't throw to prevent unhandled promise rejections\n console.error(`Error processing message ${messageType}:`, error);\n });\n });\n }\n }\n}\n"],"mappings":";;AAGA,IAAa,kBAAb,MAEA;CACE,YAAoBA,YAA6B;EAA7B;CAA+B;CAEnD,MAAM,UACJC,UACAC,UACe;EACf,MAAM,UAAU,KAAK,WAAW;AAEhC,OAAK,MAAM,eAAe,SACxB,SAAQ,GAAG,aAAa,CAACC,YAAsB;AAC7C,YAAS,QAAQ,CAAC,MAAM,CAAC,UAAU;AAEjC,YAAQ,OAAO,2BAA2B,YAAY,IAAI,MAAM;GACjE,EAAC;EACH,EAAC;CAEL;AACF"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { EventPublisherType } from "./types-B63qHVOG.mjs";
|
|
2
|
+
|
|
3
|
+
//#region src/EventConnection.ts
|
|
4
|
+
var EventConnectionFactory = class {
|
|
5
|
+
/**
|
|
6
|
+
* Create an EventConnection from a connection string
|
|
7
|
+
* Dynamically imports the appropriate connection implementation
|
|
8
|
+
*/
|
|
9
|
+
static async fromConnectionString(connectionStr) {
|
|
10
|
+
const url = new URL(connectionStr);
|
|
11
|
+
const protocol = url.protocol.replace(":", "");
|
|
12
|
+
switch (protocol) {
|
|
13
|
+
case EventPublisherType.Basic: {
|
|
14
|
+
const { BasicConnection } = await import("./basic/index.mjs");
|
|
15
|
+
return BasicConnection.fromConnectionString(connectionStr);
|
|
16
|
+
}
|
|
17
|
+
case EventPublisherType.RabbitMQ: {
|
|
18
|
+
const { RabbitMQConnection } = await import("./rabbitmq/index.mjs");
|
|
19
|
+
return RabbitMQConnection.fromConnectionString(connectionStr);
|
|
20
|
+
}
|
|
21
|
+
case EventPublisherType.SQS: {
|
|
22
|
+
const { SQSConnection } = await import("./sqs/index.mjs");
|
|
23
|
+
return SQSConnection.fromConnectionString(connectionStr);
|
|
24
|
+
}
|
|
25
|
+
case EventPublisherType.SNS: {
|
|
26
|
+
const { SNSConnection } = await import("./sns/index.mjs");
|
|
27
|
+
return SNSConnection.fromConnectionString(connectionStr);
|
|
28
|
+
}
|
|
29
|
+
default: throw new Error(`Unsupported connection type: ${protocol}`);
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
//#endregion
|
|
35
|
+
export { EventConnectionFactory };
|
|
36
|
+
//# sourceMappingURL=EventConnection-ClLMoIUU.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EventConnection-ClLMoIUU.mjs","names":["connectionStr: string"],"sources":["../src/EventConnection.ts"],"sourcesContent":["import type { EventConnection } from './types';\nimport { EventPublisherType } from './types';\n\nexport class EventConnectionFactory {\n /**\n * Create an EventConnection from a connection string\n * Dynamically imports the appropriate connection implementation\n */\n static async fromConnectionString(\n connectionStr: string,\n ): Promise<EventConnection> {\n const url = new URL(connectionStr);\n const protocol = url.protocol.replace(':', '') as EventPublisherType;\n\n switch (protocol) {\n case EventPublisherType.Basic: {\n const { BasicConnection } = await import('./basic');\n return BasicConnection.fromConnectionString(connectionStr);\n }\n case EventPublisherType.RabbitMQ: {\n const { RabbitMQConnection } = await import('./rabbitmq');\n return RabbitMQConnection.fromConnectionString(connectionStr);\n }\n case EventPublisherType.SQS: {\n const { SQSConnection } = await import('./sqs');\n return SQSConnection.fromConnectionString(connectionStr);\n }\n case EventPublisherType.SNS: {\n const { SNSConnection } = await import('./sns');\n return SNSConnection.fromConnectionString(connectionStr);\n }\n default:\n throw new Error(`Unsupported connection type: ${protocol}`);\n }\n }\n}\n\nexport { EventPublisherType } from './types';\nexport type { EventConnection } from './types';\n"],"mappings":";;;AAGA,IAAa,yBAAb,MAAoC;;;;;CAKlC,aAAa,qBACXA,eAC0B;EAC1B,MAAM,MAAM,IAAI,IAAI;EACpB,MAAM,WAAW,IAAI,SAAS,QAAQ,KAAK,GAAG;AAE9C,UAAQ,UAAR;GACE,KAAK,mBAAmB,OAAO;IAC7B,MAAM,EAAE,iBAAiB,GAAG,MAAM,OAAO;AACzC,WAAO,gBAAgB,qBAAqB,cAAc;GAC3D;GACD,KAAK,mBAAmB,UAAU;IAChC,MAAM,EAAE,oBAAoB,GAAG,MAAM,OAAO;AAC5C,WAAO,mBAAmB,qBAAqB,cAAc;GAC9D;GACD,KAAK,mBAAmB,KAAK;IAC3B,MAAM,EAAE,eAAe,GAAG,MAAM,OAAO;AACvC,WAAO,cAAc,qBAAqB,cAAc;GACzD;GACD,KAAK,mBAAmB,KAAK;IAC3B,MAAM,EAAE,eAAe,GAAG,MAAM,OAAO;AACvC,WAAO,cAAc,qBAAqB,cAAc;GACzD;GACD,QACE,OAAM,IAAI,OAAO,+BAA+B,SAAS;EAC5D;CACF;AACF"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { EventConnection } from "./types-DEGUg5BA.cjs";
|
|
2
|
+
|
|
3
|
+
//#region src/EventConnection.d.ts
|
|
4
|
+
declare class EventConnectionFactory {
|
|
5
|
+
/**
|
|
6
|
+
* Create an EventConnection from a connection string
|
|
7
|
+
* Dynamically imports the appropriate connection implementation
|
|
8
|
+
*/
|
|
9
|
+
static fromConnectionString(connectionStr: string): Promise<EventConnection>;
|
|
10
|
+
}
|
|
11
|
+
//#endregion
|
|
12
|
+
export { EventConnectionFactory };
|
|
13
|
+
//# sourceMappingURL=EventConnection-DZhn1Msl.d.cts.map
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { EventConnection } from "./types-D0g-o6wX.mjs";
|
|
2
|
+
|
|
3
|
+
//#region src/EventConnection.d.ts
|
|
4
|
+
declare class EventConnectionFactory {
|
|
5
|
+
/**
|
|
6
|
+
* Create an EventConnection from a connection string
|
|
7
|
+
* Dynamically imports the appropriate connection implementation
|
|
8
|
+
*/
|
|
9
|
+
static fromConnectionString(connectionStr: string): Promise<EventConnection>;
|
|
10
|
+
}
|
|
11
|
+
//#endregion
|
|
12
|
+
export { EventConnectionFactory };
|
|
13
|
+
//# sourceMappingURL=EventConnection-DeXfLGom.d.mts.map
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
const require_types = require('./types-CvSMEO5z.cjs');
|
|
2
|
+
|
|
3
|
+
//#region src/EventConnection.ts
|
|
4
|
+
var EventConnectionFactory = class {
|
|
5
|
+
/**
|
|
6
|
+
* Create an EventConnection from a connection string
|
|
7
|
+
* Dynamically imports the appropriate connection implementation
|
|
8
|
+
*/
|
|
9
|
+
static async fromConnectionString(connectionStr) {
|
|
10
|
+
const url = new URL(connectionStr);
|
|
11
|
+
const protocol = url.protocol.replace(":", "");
|
|
12
|
+
switch (protocol) {
|
|
13
|
+
case require_types.EventPublisherType.Basic: {
|
|
14
|
+
const { BasicConnection } = await Promise.resolve().then(() => require("./basic/index.cjs"));
|
|
15
|
+
return BasicConnection.fromConnectionString(connectionStr);
|
|
16
|
+
}
|
|
17
|
+
case require_types.EventPublisherType.RabbitMQ: {
|
|
18
|
+
const { RabbitMQConnection } = await Promise.resolve().then(() => require("./rabbitmq/index.cjs"));
|
|
19
|
+
return RabbitMQConnection.fromConnectionString(connectionStr);
|
|
20
|
+
}
|
|
21
|
+
case require_types.EventPublisherType.SQS: {
|
|
22
|
+
const { SQSConnection } = await Promise.resolve().then(() => require("./sqs/index.cjs"));
|
|
23
|
+
return SQSConnection.fromConnectionString(connectionStr);
|
|
24
|
+
}
|
|
25
|
+
case require_types.EventPublisherType.SNS: {
|
|
26
|
+
const { SNSConnection } = await Promise.resolve().then(() => require("./sns/index.cjs"));
|
|
27
|
+
return SNSConnection.fromConnectionString(connectionStr);
|
|
28
|
+
}
|
|
29
|
+
default: throw new Error(`Unsupported connection type: ${protocol}`);
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
//#endregion
|
|
35
|
+
Object.defineProperty(exports, 'EventConnectionFactory', {
|
|
36
|
+
enumerable: true,
|
|
37
|
+
get: function () {
|
|
38
|
+
return EventConnectionFactory;
|
|
39
|
+
}
|
|
40
|
+
});
|
|
41
|
+
//# sourceMappingURL=EventConnection-F_N81SXu.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EventConnection-F_N81SXu.cjs","names":["connectionStr: string","EventPublisherType"],"sources":["../src/EventConnection.ts"],"sourcesContent":["import type { EventConnection } from './types';\nimport { EventPublisherType } from './types';\n\nexport class EventConnectionFactory {\n /**\n * Create an EventConnection from a connection string\n * Dynamically imports the appropriate connection implementation\n */\n static async fromConnectionString(\n connectionStr: string,\n ): Promise<EventConnection> {\n const url = new URL(connectionStr);\n const protocol = url.protocol.replace(':', '') as EventPublisherType;\n\n switch (protocol) {\n case EventPublisherType.Basic: {\n const { BasicConnection } = await import('./basic');\n return BasicConnection.fromConnectionString(connectionStr);\n }\n case EventPublisherType.RabbitMQ: {\n const { RabbitMQConnection } = await import('./rabbitmq');\n return RabbitMQConnection.fromConnectionString(connectionStr);\n }\n case EventPublisherType.SQS: {\n const { SQSConnection } = await import('./sqs');\n return SQSConnection.fromConnectionString(connectionStr);\n }\n case EventPublisherType.SNS: {\n const { SNSConnection } = await import('./sns');\n return SNSConnection.fromConnectionString(connectionStr);\n }\n default:\n throw new Error(`Unsupported connection type: ${protocol}`);\n }\n }\n}\n\nexport { EventPublisherType } from './types';\nexport type { EventConnection } from './types';\n"],"mappings":";;;AAGA,IAAa,yBAAb,MAAoC;;;;;CAKlC,aAAa,qBACXA,eAC0B;EAC1B,MAAM,MAAM,IAAI,IAAI;EACpB,MAAM,WAAW,IAAI,SAAS,QAAQ,KAAK,GAAG;AAE9C,UAAQ,UAAR;GACE,KAAKC,iCAAmB,OAAO;IAC7B,MAAM,EAAE,iBAAiB,GAAG,2CAAM;AAClC,WAAO,gBAAgB,qBAAqB,cAAc;GAC3D;GACD,KAAKA,iCAAmB,UAAU;IAChC,MAAM,EAAE,oBAAoB,GAAG,2CAAM;AACrC,WAAO,mBAAmB,qBAAqB,cAAc;GAC9D;GACD,KAAKA,iCAAmB,KAAK;IAC3B,MAAM,EAAE,eAAe,GAAG,2CAAM;AAChC,WAAO,cAAc,qBAAqB,cAAc;GACzD;GACD,KAAKA,iCAAmB,KAAK;IAC3B,MAAM,EAAE,eAAe,GAAG,2CAAM;AAChC,WAAO,cAAc,qBAAqB,cAAc;GACzD;GACD,QACE,OAAM,IAAI,OAAO,+BAA+B,SAAS;EAC5D;CACF;AACF"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
const require_types = require('./types-CvSMEO5z.cjs');
|
|
2
|
+
const require_EventConnection = require('./EventConnection-F_N81SXu.cjs');
|
|
3
|
+
|
|
4
|
+
exports.EventConnectionFactory = require_EventConnection.EventConnectionFactory;
|
|
5
|
+
exports.EventPublisherType = require_types.EventPublisherType;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { EventConnection, EventPublisher, EventPublisherType, PublishableMessage } from "./types-D0g-o6wX.mjs";
|
|
2
|
+
|
|
3
|
+
//#region src/Publisher.d.ts
|
|
4
|
+
declare class Publisher {
|
|
5
|
+
/**
|
|
6
|
+
* Create a publisher from a connection string
|
|
7
|
+
* This creates both a connection and a publisher
|
|
8
|
+
*/
|
|
9
|
+
static fromConnectionString<TMessage extends PublishableMessage<string, any>>(connectionStr: EventPublisherConnectionString): Promise<EventPublisher<TMessage>>;
|
|
10
|
+
/**
|
|
11
|
+
* Create a publisher from an existing connection
|
|
12
|
+
* This allows sharing connections between publishers and subscribers
|
|
13
|
+
*/
|
|
14
|
+
static fromConnection<TMessage extends PublishableMessage<string, any>>(connection: EventConnection): Promise<EventPublisher<TMessage>>;
|
|
15
|
+
}
|
|
16
|
+
type EventPublisherConnectionString = `${EventPublisherType}://${string}`;
|
|
17
|
+
//#endregion
|
|
18
|
+
export { EventPublisherConnectionString, Publisher };
|
|
19
|
+
//# sourceMappingURL=Publisher-C3m8JFXm.d.mts.map
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { EventPublisherType } from "./types-B63qHVOG.mjs";
|
|
2
|
+
|
|
3
|
+
//#region src/Publisher.ts
|
|
4
|
+
var Publisher = class {
|
|
5
|
+
/**
|
|
6
|
+
* Create a publisher from a connection string
|
|
7
|
+
* This creates both a connection and a publisher
|
|
8
|
+
*/
|
|
9
|
+
static async fromConnectionString(connectionStr) {
|
|
10
|
+
const url = new URL(connectionStr);
|
|
11
|
+
switch (url.protocol.replace(":", "")) {
|
|
12
|
+
case EventPublisherType.Basic: {
|
|
13
|
+
const { BasicConnection, BasicPublisher } = await import("./basic/index.mjs");
|
|
14
|
+
const connection = await BasicConnection.fromConnectionString(connectionStr);
|
|
15
|
+
return new BasicPublisher(connection);
|
|
16
|
+
}
|
|
17
|
+
case EventPublisherType.RabbitMQ: {
|
|
18
|
+
const { RabbitMQPublisher } = await import("./rabbitmq/index.mjs");
|
|
19
|
+
return RabbitMQPublisher.fromConnectionString(connectionStr);
|
|
20
|
+
}
|
|
21
|
+
case EventPublisherType.SQS: {
|
|
22
|
+
const { SQSPublisher } = await import("./sqs/index.mjs");
|
|
23
|
+
return SQSPublisher.fromConnectionString(connectionStr);
|
|
24
|
+
}
|
|
25
|
+
case EventPublisherType.SNS: {
|
|
26
|
+
const { SNSPublisher } = await import("./sns/index.mjs");
|
|
27
|
+
return SNSPublisher.fromConnectionString(connectionStr);
|
|
28
|
+
}
|
|
29
|
+
default: throw new Error(`Unsupported event publisher type: ${url.protocol}`);
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Create a publisher from an existing connection
|
|
34
|
+
* This allows sharing connections between publishers and subscribers
|
|
35
|
+
*/
|
|
36
|
+
static async fromConnection(connection) {
|
|
37
|
+
switch (connection.type) {
|
|
38
|
+
case EventPublisherType.Basic: {
|
|
39
|
+
const { BasicPublisher } = await import("./basic/index.mjs");
|
|
40
|
+
const { BasicConnection } = await import("./basic/index.mjs");
|
|
41
|
+
return new BasicPublisher(connection);
|
|
42
|
+
}
|
|
43
|
+
case EventPublisherType.RabbitMQ: {
|
|
44
|
+
const { RabbitMQPublisher } = await import("./rabbitmq/index.mjs");
|
|
45
|
+
const { RabbitMQConnection } = await import("./rabbitmq/index.mjs");
|
|
46
|
+
return new RabbitMQPublisher(connection);
|
|
47
|
+
}
|
|
48
|
+
case EventPublisherType.SQS: {
|
|
49
|
+
const { SQSPublisher } = await import("./sqs/index.mjs");
|
|
50
|
+
const { SQSConnection } = await import("./sqs/index.mjs");
|
|
51
|
+
return new SQSPublisher(connection);
|
|
52
|
+
}
|
|
53
|
+
case EventPublisherType.SNS: {
|
|
54
|
+
const { SNSPublisher } = await import("./sns/index.mjs");
|
|
55
|
+
const { SNSConnection } = await import("./sns/index.mjs");
|
|
56
|
+
return new SNSPublisher(connection);
|
|
57
|
+
}
|
|
58
|
+
default: throw new Error(`Unsupported connection type: ${connection.type}`);
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
};
|
|
62
|
+
|
|
63
|
+
//#endregion
|
|
64
|
+
export { Publisher };
|
|
65
|
+
//# sourceMappingURL=Publisher-DS0aOh8r.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Publisher-DS0aOh8r.mjs","names":["connectionStr: EventPublisherConnectionString","connection: EventConnection"],"sources":["../src/Publisher.ts"],"sourcesContent":["import type {\n EventConnection,\n EventPublisher,\n PublishableMessage,\n} from './types';\nimport { EventPublisherType } from './types';\n\nexport class Publisher {\n /**\n * Create a publisher from a connection string\n * This creates both a connection and a publisher\n */\n static async fromConnectionString<\n TMessage extends PublishableMessage<string, any>,\n >(\n connectionStr: EventPublisherConnectionString,\n ): Promise<EventPublisher<TMessage>> {\n const url = new URL(connectionStr);\n switch (url.protocol.replace(':', '')) {\n case EventPublisherType.Basic: {\n const { BasicConnection, BasicPublisher } = await import('./basic');\n const connection =\n await BasicConnection.fromConnectionString(connectionStr);\n return new BasicPublisher<TMessage>(connection);\n }\n case EventPublisherType.RabbitMQ: {\n const { RabbitMQPublisher } = await import('./rabbitmq');\n return RabbitMQPublisher.fromConnectionString<TMessage>(connectionStr);\n }\n case EventPublisherType.SQS: {\n const { SQSPublisher } = await import('./sqs');\n return SQSPublisher.fromConnectionString<TMessage>(connectionStr);\n }\n case EventPublisherType.SNS: {\n const { SNSPublisher } = await import('./sns');\n return SNSPublisher.fromConnectionString<TMessage>(connectionStr);\n }\n // Future implementations for EventBridge, Kafka, etc.\n default:\n throw new Error(`Unsupported event publisher type: ${url.protocol}`);\n }\n }\n\n /**\n * Create a publisher from an existing connection\n * This allows sharing connections between publishers and subscribers\n */\n static async fromConnection<TMessage extends PublishableMessage<string, any>>(\n connection: EventConnection,\n ): Promise<EventPublisher<TMessage>> {\n switch (connection.type) {\n case EventPublisherType.Basic: {\n const { BasicPublisher } = await import('./basic');\n const { BasicConnection } = await import('./basic');\n return new BasicPublisher<TMessage>(\n connection as InstanceType<typeof BasicConnection>,\n );\n }\n case EventPublisherType.RabbitMQ: {\n const { RabbitMQPublisher } = await import('./rabbitmq');\n const { RabbitMQConnection } = await import('./rabbitmq');\n return new RabbitMQPublisher<TMessage>(\n connection as InstanceType<typeof RabbitMQConnection>,\n );\n }\n case EventPublisherType.SQS: {\n const { SQSPublisher } = await import('./sqs');\n const { SQSConnection } = await import('./sqs');\n return new SQSPublisher<TMessage>(\n connection as InstanceType<typeof SQSConnection>,\n );\n }\n case EventPublisherType.SNS: {\n const { SNSPublisher } = await import('./sns');\n const { SNSConnection } = await import('./sns');\n return new SNSPublisher<TMessage>(\n connection as InstanceType<typeof SNSConnection>,\n );\n }\n default:\n throw new Error(`Unsupported connection type: ${connection.type}`);\n }\n }\n}\n\nexport type EventPublisherConnectionString =\n `${EventPublisherType}://${string}`;\n"],"mappings":";;;AAOA,IAAa,YAAb,MAAuB;;;;;CAKrB,aAAa,qBAGXA,eACmC;EACnC,MAAM,MAAM,IAAI,IAAI;AACpB,UAAQ,IAAI,SAAS,QAAQ,KAAK,GAAG,EAArC;GACE,KAAK,mBAAmB,OAAO;IAC7B,MAAM,EAAE,iBAAiB,gBAAgB,GAAG,MAAM,OAAO;IACzD,MAAM,aACJ,MAAM,gBAAgB,qBAAqB,cAAc;AAC3D,WAAO,IAAI,eAAyB;GACrC;GACD,KAAK,mBAAmB,UAAU;IAChC,MAAM,EAAE,mBAAmB,GAAG,MAAM,OAAO;AAC3C,WAAO,kBAAkB,qBAA+B,cAAc;GACvE;GACD,KAAK,mBAAmB,KAAK;IAC3B,MAAM,EAAE,cAAc,GAAG,MAAM,OAAO;AACtC,WAAO,aAAa,qBAA+B,cAAc;GAClE;GACD,KAAK,mBAAmB,KAAK;IAC3B,MAAM,EAAE,cAAc,GAAG,MAAM,OAAO;AACtC,WAAO,aAAa,qBAA+B,cAAc;GAClE;GAED,QACE,OAAM,IAAI,OAAO,oCAAoC,IAAI,SAAS;EACrE;CACF;;;;;CAMD,aAAa,eACXC,YACmC;AACnC,UAAQ,WAAW,MAAnB;GACE,KAAK,mBAAmB,OAAO;IAC7B,MAAM,EAAE,gBAAgB,GAAG,MAAM,OAAO;IACxC,MAAM,EAAE,iBAAiB,GAAG,MAAM,OAAO;AACzC,WAAO,IAAI,eACT;GAEH;GACD,KAAK,mBAAmB,UAAU;IAChC,MAAM,EAAE,mBAAmB,GAAG,MAAM,OAAO;IAC3C,MAAM,EAAE,oBAAoB,GAAG,MAAM,OAAO;AAC5C,WAAO,IAAI,kBACT;GAEH;GACD,KAAK,mBAAmB,KAAK;IAC3B,MAAM,EAAE,cAAc,GAAG,MAAM,OAAO;IACtC,MAAM,EAAE,eAAe,GAAG,MAAM,OAAO;AACvC,WAAO,IAAI,aACT;GAEH;GACD,KAAK,mBAAmB,KAAK;IAC3B,MAAM,EAAE,cAAc,GAAG,MAAM,OAAO;IACtC,MAAM,EAAE,eAAe,GAAG,MAAM,OAAO;AACvC,WAAO,IAAI,aACT;GAEH;GACD,QACE,OAAM,IAAI,OAAO,+BAA+B,WAAW,KAAK;EACnE;CACF;AACF"}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
const require_types = require('./types-CvSMEO5z.cjs');
|
|
2
|
+
|
|
3
|
+
//#region src/Publisher.ts
|
|
4
|
+
var Publisher = class {
|
|
5
|
+
/**
|
|
6
|
+
* Create a publisher from a connection string
|
|
7
|
+
* This creates both a connection and a publisher
|
|
8
|
+
*/
|
|
9
|
+
static async fromConnectionString(connectionStr) {
|
|
10
|
+
const url = new URL(connectionStr);
|
|
11
|
+
switch (url.protocol.replace(":", "")) {
|
|
12
|
+
case require_types.EventPublisherType.Basic: {
|
|
13
|
+
const { BasicConnection, BasicPublisher } = await Promise.resolve().then(() => require("./basic/index.cjs"));
|
|
14
|
+
const connection = await BasicConnection.fromConnectionString(connectionStr);
|
|
15
|
+
return new BasicPublisher(connection);
|
|
16
|
+
}
|
|
17
|
+
case require_types.EventPublisherType.RabbitMQ: {
|
|
18
|
+
const { RabbitMQPublisher } = await Promise.resolve().then(() => require("./rabbitmq/index.cjs"));
|
|
19
|
+
return RabbitMQPublisher.fromConnectionString(connectionStr);
|
|
20
|
+
}
|
|
21
|
+
case require_types.EventPublisherType.SQS: {
|
|
22
|
+
const { SQSPublisher } = await Promise.resolve().then(() => require("./sqs/index.cjs"));
|
|
23
|
+
return SQSPublisher.fromConnectionString(connectionStr);
|
|
24
|
+
}
|
|
25
|
+
case require_types.EventPublisherType.SNS: {
|
|
26
|
+
const { SNSPublisher } = await Promise.resolve().then(() => require("./sns/index.cjs"));
|
|
27
|
+
return SNSPublisher.fromConnectionString(connectionStr);
|
|
28
|
+
}
|
|
29
|
+
default: throw new Error(`Unsupported event publisher type: ${url.protocol}`);
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Create a publisher from an existing connection
|
|
34
|
+
* This allows sharing connections between publishers and subscribers
|
|
35
|
+
*/
|
|
36
|
+
static async fromConnection(connection) {
|
|
37
|
+
switch (connection.type) {
|
|
38
|
+
case require_types.EventPublisherType.Basic: {
|
|
39
|
+
const { BasicPublisher } = await Promise.resolve().then(() => require("./basic/index.cjs"));
|
|
40
|
+
const { BasicConnection } = await Promise.resolve().then(() => require("./basic/index.cjs"));
|
|
41
|
+
return new BasicPublisher(connection);
|
|
42
|
+
}
|
|
43
|
+
case require_types.EventPublisherType.RabbitMQ: {
|
|
44
|
+
const { RabbitMQPublisher } = await Promise.resolve().then(() => require("./rabbitmq/index.cjs"));
|
|
45
|
+
const { RabbitMQConnection } = await Promise.resolve().then(() => require("./rabbitmq/index.cjs"));
|
|
46
|
+
return new RabbitMQPublisher(connection);
|
|
47
|
+
}
|
|
48
|
+
case require_types.EventPublisherType.SQS: {
|
|
49
|
+
const { SQSPublisher } = await Promise.resolve().then(() => require("./sqs/index.cjs"));
|
|
50
|
+
const { SQSConnection } = await Promise.resolve().then(() => require("./sqs/index.cjs"));
|
|
51
|
+
return new SQSPublisher(connection);
|
|
52
|
+
}
|
|
53
|
+
case require_types.EventPublisherType.SNS: {
|
|
54
|
+
const { SNSPublisher } = await Promise.resolve().then(() => require("./sns/index.cjs"));
|
|
55
|
+
const { SNSConnection } = await Promise.resolve().then(() => require("./sns/index.cjs"));
|
|
56
|
+
return new SNSPublisher(connection);
|
|
57
|
+
}
|
|
58
|
+
default: throw new Error(`Unsupported connection type: ${connection.type}`);
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
};
|
|
62
|
+
|
|
63
|
+
//#endregion
|
|
64
|
+
Object.defineProperty(exports, 'Publisher', {
|
|
65
|
+
enumerable: true,
|
|
66
|
+
get: function () {
|
|
67
|
+
return Publisher;
|
|
68
|
+
}
|
|
69
|
+
});
|
|
70
|
+
//# sourceMappingURL=Publisher-ceu6OxCj.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Publisher-ceu6OxCj.cjs","names":["connectionStr: EventPublisherConnectionString","EventPublisherType","connection: EventConnection"],"sources":["../src/Publisher.ts"],"sourcesContent":["import type {\n EventConnection,\n EventPublisher,\n PublishableMessage,\n} from './types';\nimport { EventPublisherType } from './types';\n\nexport class Publisher {\n /**\n * Create a publisher from a connection string\n * This creates both a connection and a publisher\n */\n static async fromConnectionString<\n TMessage extends PublishableMessage<string, any>,\n >(\n connectionStr: EventPublisherConnectionString,\n ): Promise<EventPublisher<TMessage>> {\n const url = new URL(connectionStr);\n switch (url.protocol.replace(':', '')) {\n case EventPublisherType.Basic: {\n const { BasicConnection, BasicPublisher } = await import('./basic');\n const connection =\n await BasicConnection.fromConnectionString(connectionStr);\n return new BasicPublisher<TMessage>(connection);\n }\n case EventPublisherType.RabbitMQ: {\n const { RabbitMQPublisher } = await import('./rabbitmq');\n return RabbitMQPublisher.fromConnectionString<TMessage>(connectionStr);\n }\n case EventPublisherType.SQS: {\n const { SQSPublisher } = await import('./sqs');\n return SQSPublisher.fromConnectionString<TMessage>(connectionStr);\n }\n case EventPublisherType.SNS: {\n const { SNSPublisher } = await import('./sns');\n return SNSPublisher.fromConnectionString<TMessage>(connectionStr);\n }\n // Future implementations for EventBridge, Kafka, etc.\n default:\n throw new Error(`Unsupported event publisher type: ${url.protocol}`);\n }\n }\n\n /**\n * Create a publisher from an existing connection\n * This allows sharing connections between publishers and subscribers\n */\n static async fromConnection<TMessage extends PublishableMessage<string, any>>(\n connection: EventConnection,\n ): Promise<EventPublisher<TMessage>> {\n switch (connection.type) {\n case EventPublisherType.Basic: {\n const { BasicPublisher } = await import('./basic');\n const { BasicConnection } = await import('./basic');\n return new BasicPublisher<TMessage>(\n connection as InstanceType<typeof BasicConnection>,\n );\n }\n case EventPublisherType.RabbitMQ: {\n const { RabbitMQPublisher } = await import('./rabbitmq');\n const { RabbitMQConnection } = await import('./rabbitmq');\n return new RabbitMQPublisher<TMessage>(\n connection as InstanceType<typeof RabbitMQConnection>,\n );\n }\n case EventPublisherType.SQS: {\n const { SQSPublisher } = await import('./sqs');\n const { SQSConnection } = await import('./sqs');\n return new SQSPublisher<TMessage>(\n connection as InstanceType<typeof SQSConnection>,\n );\n }\n case EventPublisherType.SNS: {\n const { SNSPublisher } = await import('./sns');\n const { SNSConnection } = await import('./sns');\n return new SNSPublisher<TMessage>(\n connection as InstanceType<typeof SNSConnection>,\n );\n }\n default:\n throw new Error(`Unsupported connection type: ${connection.type}`);\n }\n }\n}\n\nexport type EventPublisherConnectionString =\n `${EventPublisherType}://${string}`;\n"],"mappings":";;;AAOA,IAAa,YAAb,MAAuB;;;;;CAKrB,aAAa,qBAGXA,eACmC;EACnC,MAAM,MAAM,IAAI,IAAI;AACpB,UAAQ,IAAI,SAAS,QAAQ,KAAK,GAAG,EAArC;GACE,KAAKC,iCAAmB,OAAO;IAC7B,MAAM,EAAE,iBAAiB,gBAAgB,GAAG,2CAAM;IAClD,MAAM,aACJ,MAAM,gBAAgB,qBAAqB,cAAc;AAC3D,WAAO,IAAI,eAAyB;GACrC;GACD,KAAKA,iCAAmB,UAAU;IAChC,MAAM,EAAE,mBAAmB,GAAG,2CAAM;AACpC,WAAO,kBAAkB,qBAA+B,cAAc;GACvE;GACD,KAAKA,iCAAmB,KAAK;IAC3B,MAAM,EAAE,cAAc,GAAG,2CAAM;AAC/B,WAAO,aAAa,qBAA+B,cAAc;GAClE;GACD,KAAKA,iCAAmB,KAAK;IAC3B,MAAM,EAAE,cAAc,GAAG,2CAAM;AAC/B,WAAO,aAAa,qBAA+B,cAAc;GAClE;GAED,QACE,OAAM,IAAI,OAAO,oCAAoC,IAAI,SAAS;EACrE;CACF;;;;;CAMD,aAAa,eACXC,YACmC;AACnC,UAAQ,WAAW,MAAnB;GACE,KAAKD,iCAAmB,OAAO;IAC7B,MAAM,EAAE,gBAAgB,GAAG,2CAAM;IACjC,MAAM,EAAE,iBAAiB,GAAG,2CAAM;AAClC,WAAO,IAAI,eACT;GAEH;GACD,KAAKA,iCAAmB,UAAU;IAChC,MAAM,EAAE,mBAAmB,GAAG,2CAAM;IACpC,MAAM,EAAE,oBAAoB,GAAG,2CAAM;AACrC,WAAO,IAAI,kBACT;GAEH;GACD,KAAKA,iCAAmB,KAAK;IAC3B,MAAM,EAAE,cAAc,GAAG,2CAAM;IAC/B,MAAM,EAAE,eAAe,GAAG,2CAAM;AAChC,WAAO,IAAI,aACT;GAEH;GACD,KAAKA,iCAAmB,KAAK;IAC3B,MAAM,EAAE,cAAc,GAAG,2CAAM;IAC/B,MAAM,EAAE,eAAe,GAAG,2CAAM;AAChC,WAAO,IAAI,aACT;GAEH;GACD,QACE,OAAM,IAAI,OAAO,+BAA+B,WAAW,KAAK;EACnE;CACF;AACF"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { EventConnection, EventPublisher, EventPublisherType, PublishableMessage } from "./types-DEGUg5BA.cjs";
|
|
2
|
+
|
|
3
|
+
//#region src/Publisher.d.ts
|
|
4
|
+
declare class Publisher {
|
|
5
|
+
/**
|
|
6
|
+
* Create a publisher from a connection string
|
|
7
|
+
* This creates both a connection and a publisher
|
|
8
|
+
*/
|
|
9
|
+
static fromConnectionString<TMessage extends PublishableMessage<string, any>>(connectionStr: EventPublisherConnectionString): Promise<EventPublisher<TMessage>>;
|
|
10
|
+
/**
|
|
11
|
+
* Create a publisher from an existing connection
|
|
12
|
+
* This allows sharing connections between publishers and subscribers
|
|
13
|
+
*/
|
|
14
|
+
static fromConnection<TMessage extends PublishableMessage<string, any>>(connection: EventConnection): Promise<EventPublisher<TMessage>>;
|
|
15
|
+
}
|
|
16
|
+
type EventPublisherConnectionString = `${EventPublisherType}://${string}`;
|
|
17
|
+
//#endregion
|
|
18
|
+
export { EventPublisherConnectionString, Publisher };
|
|
19
|
+
//# sourceMappingURL=Publisher-nXNVjL0e.d.cts.map
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { EventConnection, EventPublisherType } from "./types-DEGUg5BA.cjs";
|
|
2
|
+
import amqplib from "amqplib";
|
|
3
|
+
|
|
4
|
+
//#region src/rabbitmq/RabbitMQConnection.d.ts
|
|
5
|
+
interface RabbitMQConnectionConfig {
|
|
6
|
+
url: string;
|
|
7
|
+
exchange?: string;
|
|
8
|
+
exchangeType?: 'topic' | 'direct' | 'fanout' | 'headers';
|
|
9
|
+
exchangeOptions?: amqplib.Options.AssertExchange;
|
|
10
|
+
timeout?: number;
|
|
11
|
+
}
|
|
12
|
+
declare class RabbitMQConnection implements EventConnection {
|
|
13
|
+
readonly type = EventPublisherType.RabbitMQ;
|
|
14
|
+
private connection?;
|
|
15
|
+
private channel?;
|
|
16
|
+
private connecting?;
|
|
17
|
+
private config;
|
|
18
|
+
constructor(config: RabbitMQConnectionConfig);
|
|
19
|
+
/**
|
|
20
|
+
* Create a RabbitMQConnection from a connection string
|
|
21
|
+
* Format: rabbitmq://user:pass@host:port/vhost?exchange=name&type=topic&timeout=5000
|
|
22
|
+
*/
|
|
23
|
+
static fromConnectionString(connectionString: string): Promise<RabbitMQConnection>;
|
|
24
|
+
connect(): Promise<void>;
|
|
25
|
+
close(): Promise<void>;
|
|
26
|
+
isConnected(): boolean;
|
|
27
|
+
private cleanup;
|
|
28
|
+
/**
|
|
29
|
+
* Get the underlying channel for publishing/subscribing
|
|
30
|
+
*/
|
|
31
|
+
get amqpChannel(): amqplib.Channel | undefined;
|
|
32
|
+
/**
|
|
33
|
+
* Get the exchange name for this connection
|
|
34
|
+
*/
|
|
35
|
+
get exchangeName(): string;
|
|
36
|
+
/**
|
|
37
|
+
* Get the exchange type for this connection
|
|
38
|
+
*/
|
|
39
|
+
get exchangeType(): string;
|
|
40
|
+
}
|
|
41
|
+
//#endregion
|
|
42
|
+
export { RabbitMQConnection, RabbitMQConnectionConfig };
|
|
43
|
+
//# sourceMappingURL=RabbitMQConnection-7cWp_-_Q.d.cts.map
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
const require_chunk = require('./chunk-CUT6urMc.cjs');
|
|
2
|
+
const require_types = require('./types-CvSMEO5z.cjs');
|
|
3
|
+
const amqplib = require_chunk.__toESM(require("amqplib"));
|
|
4
|
+
|
|
5
|
+
//#region src/rabbitmq/RabbitMQConnection.ts
|
|
6
|
+
var RabbitMQConnection = class RabbitMQConnection {
|
|
7
|
+
type = require_types.EventPublisherType.RabbitMQ;
|
|
8
|
+
connection;
|
|
9
|
+
channel;
|
|
10
|
+
connecting;
|
|
11
|
+
config;
|
|
12
|
+
constructor(config) {
|
|
13
|
+
this.config = {
|
|
14
|
+
...config,
|
|
15
|
+
exchange: config.exchange || "geekmidas.events",
|
|
16
|
+
exchangeType: config.exchangeType || "topic",
|
|
17
|
+
timeout: config.timeout ?? 5e3,
|
|
18
|
+
exchangeOptions: {
|
|
19
|
+
durable: true,
|
|
20
|
+
...config.exchangeOptions
|
|
21
|
+
}
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Create a RabbitMQConnection from a connection string
|
|
26
|
+
* Format: rabbitmq://user:pass@host:port/vhost?exchange=name&type=topic&timeout=5000
|
|
27
|
+
*/
|
|
28
|
+
static async fromConnectionString(connectionString) {
|
|
29
|
+
const url = new URL(connectionString);
|
|
30
|
+
const params = url.searchParams;
|
|
31
|
+
const baseUrl = `amqp://${url.username ? `${url.username}:${url.password}@` : ""}${url.host}${url.pathname}`;
|
|
32
|
+
const timeoutParam = params.get("timeout");
|
|
33
|
+
const config = {
|
|
34
|
+
url: baseUrl,
|
|
35
|
+
exchange: params.get("exchange") || "geekmidas.events",
|
|
36
|
+
exchangeType: params.get("type") || "topic",
|
|
37
|
+
timeout: timeoutParam ? Number.parseInt(timeoutParam, 10) : void 0
|
|
38
|
+
};
|
|
39
|
+
const connection = new RabbitMQConnection(config);
|
|
40
|
+
await connection.connect();
|
|
41
|
+
return connection;
|
|
42
|
+
}
|
|
43
|
+
async connect() {
|
|
44
|
+
if (this.channel) return;
|
|
45
|
+
if (this.connecting) {
|
|
46
|
+
await this.connecting;
|
|
47
|
+
return;
|
|
48
|
+
}
|
|
49
|
+
this.connecting = (async () => {
|
|
50
|
+
try {
|
|
51
|
+
const connection = await amqplib.default.connect(this.config.url, { timeout: this.config.timeout });
|
|
52
|
+
const channel = await connection.createChannel();
|
|
53
|
+
await channel.assertExchange(this.config.exchange, this.config.exchangeType, this.config.exchangeOptions);
|
|
54
|
+
connection.on("error", (_err) => {
|
|
55
|
+
this.cleanup();
|
|
56
|
+
});
|
|
57
|
+
connection.on("close", () => {
|
|
58
|
+
this.cleanup();
|
|
59
|
+
});
|
|
60
|
+
this.connection = connection;
|
|
61
|
+
this.channel = channel;
|
|
62
|
+
} catch (error) {
|
|
63
|
+
this.cleanup();
|
|
64
|
+
throw error;
|
|
65
|
+
}
|
|
66
|
+
})();
|
|
67
|
+
await this.connecting;
|
|
68
|
+
this.connecting = void 0;
|
|
69
|
+
}
|
|
70
|
+
async close() {
|
|
71
|
+
try {
|
|
72
|
+
await this.channel?.close();
|
|
73
|
+
await this.connection?.close();
|
|
74
|
+
} catch (error) {} finally {
|
|
75
|
+
this.cleanup();
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
isConnected() {
|
|
79
|
+
return !!this.channel;
|
|
80
|
+
}
|
|
81
|
+
cleanup() {
|
|
82
|
+
this.channel = void 0;
|
|
83
|
+
this.connection = void 0;
|
|
84
|
+
this.connecting = void 0;
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* Get the underlying channel for publishing/subscribing
|
|
88
|
+
*/
|
|
89
|
+
get amqpChannel() {
|
|
90
|
+
return this.channel;
|
|
91
|
+
}
|
|
92
|
+
/**
|
|
93
|
+
* Get the exchange name for this connection
|
|
94
|
+
*/
|
|
95
|
+
get exchangeName() {
|
|
96
|
+
return this.config.exchange;
|
|
97
|
+
}
|
|
98
|
+
/**
|
|
99
|
+
* Get the exchange type for this connection
|
|
100
|
+
*/
|
|
101
|
+
get exchangeType() {
|
|
102
|
+
return this.config.exchangeType;
|
|
103
|
+
}
|
|
104
|
+
};
|
|
105
|
+
|
|
106
|
+
//#endregion
|
|
107
|
+
Object.defineProperty(exports, 'RabbitMQConnection', {
|
|
108
|
+
enumerable: true,
|
|
109
|
+
get: function () {
|
|
110
|
+
return RabbitMQConnection;
|
|
111
|
+
}
|
|
112
|
+
});
|
|
113
|
+
//# sourceMappingURL=RabbitMQConnection-BN_GybOv.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RabbitMQConnection-BN_GybOv.cjs","names":["EventPublisherType","config: RabbitMQConnectionConfig","connectionString: string","_err: Error"],"sources":["../src/rabbitmq/RabbitMQConnection.ts"],"sourcesContent":["import amqplib from 'amqplib';\nimport type { EventConnection } from '../types';\nimport { EventPublisherType } from '../types';\n\nexport interface RabbitMQConnectionConfig {\n url: string;\n exchange?: string;\n exchangeType?: 'topic' | 'direct' | 'fanout' | 'headers';\n exchangeOptions?: amqplib.Options.AssertExchange;\n timeout?: number; // Connection timeout in milliseconds (default: 5000)\n}\n\nexport class RabbitMQConnection implements EventConnection {\n readonly type = EventPublisherType.RabbitMQ;\n private connection?: amqplib.ChannelModel;\n private channel?: amqplib.Channel;\n private connecting?: Promise<void>;\n private config: Required<\n Pick<RabbitMQConnectionConfig, 'exchange' | 'exchangeType' | 'timeout'>\n > &\n RabbitMQConnectionConfig;\n\n constructor(config: RabbitMQConnectionConfig) {\n this.config = {\n ...config,\n exchange: config.exchange || 'geekmidas.events',\n exchangeType: config.exchangeType || 'topic',\n timeout: config.timeout ?? 5000,\n exchangeOptions: {\n durable: true,\n ...config.exchangeOptions,\n },\n };\n }\n\n /**\n * Create a RabbitMQConnection from a connection string\n * Format: rabbitmq://user:pass@host:port/vhost?exchange=name&type=topic&timeout=5000\n */\n static async fromConnectionString(\n connectionString: string,\n ): Promise<RabbitMQConnection> {\n const url = new URL(connectionString);\n const params = url.searchParams;\n\n // Extract connection URL without query params\n const baseUrl = `amqp://${url.username ? `${url.username}:${url.password}@` : ''}${url.host}${url.pathname}`;\n\n const timeoutParam = params.get('timeout');\n const config: RabbitMQConnectionConfig = {\n url: baseUrl,\n exchange: params.get('exchange') || 'geekmidas.events',\n exchangeType: (params.get('type') as any) || 'topic',\n timeout: timeoutParam ? Number.parseInt(timeoutParam, 10) : undefined,\n };\n\n const connection = new RabbitMQConnection(config);\n await connection.connect();\n return connection;\n }\n\n async connect(): Promise<void> {\n if (this.channel) return;\n\n // Prevent multiple simultaneous connection attempts\n if (this.connecting) {\n await this.connecting;\n return;\n }\n\n this.connecting = (async () => {\n try {\n const connection = await amqplib.connect(this.config.url, {\n timeout: this.config.timeout,\n });\n const channel = await connection.createChannel();\n\n // Assert the exchange exists\n await channel.assertExchange(\n this.config.exchange!,\n this.config.exchangeType!,\n this.config.exchangeOptions,\n );\n\n // Handle connection errors\n connection.on('error', (_err: Error) => {\n this.cleanup();\n });\n\n connection.on('close', () => {\n this.cleanup();\n });\n\n // Only set after successful setup\n this.connection = connection;\n this.channel = channel;\n } catch (error) {\n this.cleanup();\n throw error;\n }\n })();\n\n await this.connecting;\n this.connecting = undefined;\n }\n\n async close(): Promise<void> {\n try {\n await this.channel?.close();\n await this.connection?.close();\n } catch (error) {\n // Ignore errors during close\n } finally {\n this.cleanup();\n }\n }\n\n isConnected(): boolean {\n return !!this.channel;\n }\n\n private cleanup(): void {\n this.channel = undefined;\n this.connection = undefined;\n this.connecting = undefined;\n }\n\n /**\n * Get the underlying channel for publishing/subscribing\n */\n get amqpChannel(): amqplib.Channel | undefined {\n return this.channel;\n }\n\n /**\n * Get the exchange name for this connection\n */\n get exchangeName(): string {\n return this.config.exchange;\n }\n\n /**\n * Get the exchange type for this connection\n */\n get exchangeType(): string {\n return this.config.exchangeType;\n }\n}\n"],"mappings":";;;;;AAYA,IAAa,qBAAb,MAAa,mBAA8C;CACzD,AAAS,OAAOA,iCAAmB;CACnC,AAAQ;CACR,AAAQ;CACR,AAAQ;CACR,AAAQ;CAKR,YAAYC,QAAkC;AAC5C,OAAK,SAAS;GACZ,GAAG;GACH,UAAU,OAAO,YAAY;GAC7B,cAAc,OAAO,gBAAgB;GACrC,SAAS,OAAO,WAAW;GAC3B,iBAAiB;IACf,SAAS;IACT,GAAG,OAAO;GACX;EACF;CACF;;;;;CAMD,aAAa,qBACXC,kBAC6B;EAC7B,MAAM,MAAM,IAAI,IAAI;EACpB,MAAM,SAAS,IAAI;EAGnB,MAAM,WAAW,SAAS,IAAI,YAAY,EAAE,IAAI,SAAS,GAAG,IAAI,SAAS,KAAK,GAAG,EAAE,IAAI,KAAK,EAAE,IAAI,SAAS;EAE3G,MAAM,eAAe,OAAO,IAAI,UAAU;EAC1C,MAAMD,SAAmC;GACvC,KAAK;GACL,UAAU,OAAO,IAAI,WAAW,IAAI;GACpC,cAAe,OAAO,IAAI,OAAO,IAAY;GAC7C,SAAS,eAAe,OAAO,SAAS,cAAc,GAAG;EAC1D;EAED,MAAM,aAAa,IAAI,mBAAmB;AAC1C,QAAM,WAAW,SAAS;AAC1B,SAAO;CACR;CAED,MAAM,UAAyB;AAC7B,MAAI,KAAK,QAAS;AAGlB,MAAI,KAAK,YAAY;AACnB,SAAM,KAAK;AACX;EACD;AAED,OAAK,aAAa,CAAC,YAAY;AAC7B,OAAI;IACF,MAAM,aAAa,MAAM,gBAAQ,QAAQ,KAAK,OAAO,KAAK,EACxD,SAAS,KAAK,OAAO,QACtB,EAAC;IACF,MAAM,UAAU,MAAM,WAAW,eAAe;AAGhD,UAAM,QAAQ,eACZ,KAAK,OAAO,UACZ,KAAK,OAAO,cACZ,KAAK,OAAO,gBACb;AAGD,eAAW,GAAG,SAAS,CAACE,SAAgB;AACtC,UAAK,SAAS;IACf,EAAC;AAEF,eAAW,GAAG,SAAS,MAAM;AAC3B,UAAK,SAAS;IACf,EAAC;AAGF,SAAK,aAAa;AAClB,SAAK,UAAU;GAChB,SAAQ,OAAO;AACd,SAAK,SAAS;AACd,UAAM;GACP;EACF,IAAG;AAEJ,QAAM,KAAK;AACX,OAAK;CACN;CAED,MAAM,QAAuB;AAC3B,MAAI;AACF,SAAM,KAAK,SAAS,OAAO;AAC3B,SAAM,KAAK,YAAY,OAAO;EAC/B,SAAQ,OAAO,CAEf,UAAS;AACR,QAAK,SAAS;EACf;CACF;CAED,cAAuB;AACrB,WAAS,KAAK;CACf;CAED,AAAQ,UAAgB;AACtB,OAAK;AACL,OAAK;AACL,OAAK;CACN;;;;CAKD,IAAI,cAA2C;AAC7C,SAAO,KAAK;CACb;;;;CAKD,IAAI,eAAuB;AACzB,SAAO,KAAK,OAAO;CACpB;;;;CAKD,IAAI,eAAuB;AACzB,SAAO,KAAK,OAAO;CACpB;AACF"}
|