@geekmidas/events 1.1.4 → 1.1.6
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/CHANGELOG.md +36 -0
- package/dist/{BasicConnection-DyGmgDSX.cjs → BasicConnection-CxfNEvlb.cjs} +1 -1
- package/dist/{BasicConnection-DyGmgDSX.cjs.map → BasicConnection-CxfNEvlb.cjs.map} +1 -1
- package/dist/{BasicConnection-CVyEy5R6.mjs → BasicConnection-hl-Ogz3a.mjs} +1 -1
- package/dist/{BasicConnection-CVyEy5R6.mjs.map → BasicConnection-hl-Ogz3a.mjs.map} +1 -1
- package/dist/{BasicPublisher-Bv4TTrtI.cjs → BasicPublisher-CXAVKxgq.cjs} +1 -1
- package/dist/{BasicPublisher-Bv4TTrtI.cjs.map → BasicPublisher-CXAVKxgq.cjs.map} +1 -1
- package/dist/{BasicPublisher-7rE-7TTf.mjs → BasicPublisher-DogbeHAH.mjs} +1 -1
- package/dist/{BasicPublisher-7rE-7TTf.mjs.map → BasicPublisher-DogbeHAH.mjs.map} +1 -1
- package/dist/{BasicSubscriber-Cm4qZZf4.mjs → BasicSubscriber-BJSZN22M.mjs} +1 -1
- package/dist/{BasicSubscriber-Cm4qZZf4.mjs.map → BasicSubscriber-BJSZN22M.mjs.map} +1 -1
- package/dist/{BasicSubscriber-BYemML6q.cjs → BasicSubscriber-mVJRMXhZ.cjs} +1 -1
- package/dist/{BasicSubscriber-BYemML6q.cjs.map → BasicSubscriber-mVJRMXhZ.cjs.map} +1 -1
- package/dist/{PgBossConnection-Bj3AdYLw.cjs → PgBossConnection-B71ssr72.cjs} +1 -1
- package/dist/{PgBossConnection-Bj3AdYLw.cjs.map → PgBossConnection-B71ssr72.cjs.map} +1 -1
- package/dist/{PgBossConnection-DDOLkD9h.mjs → PgBossConnection-Bj_Wo1lQ.mjs} +1 -1
- package/dist/{PgBossConnection-DDOLkD9h.mjs.map → PgBossConnection-Bj_Wo1lQ.mjs.map} +1 -1
- package/dist/{PgBossPublisher-Dz_jGpLp.mjs → PgBossPublisher-Bwo7qSoH.mjs} +1 -1
- package/dist/{PgBossPublisher-Dz_jGpLp.mjs.map → PgBossPublisher-Bwo7qSoH.mjs.map} +1 -1
- package/dist/{PgBossPublisher-LTZv87Bq.cjs → PgBossPublisher-FTdYh58W.cjs} +1 -1
- package/dist/{PgBossPublisher-LTZv87Bq.cjs.map → PgBossPublisher-FTdYh58W.cjs.map} +1 -1
- package/dist/{PgBossSubscriber-BMgLyXE2.cjs → PgBossSubscriber-BubVfuWm.cjs} +1 -1
- package/dist/{PgBossSubscriber-BMgLyXE2.cjs.map → PgBossSubscriber-BubVfuWm.cjs.map} +1 -1
- package/dist/{PgBossSubscriber-CBfihcy8.mjs → PgBossSubscriber-DopATe80.mjs} +1 -1
- package/dist/{PgBossSubscriber-CBfihcy8.mjs.map → PgBossSubscriber-DopATe80.mjs.map} +1 -1
- package/dist/{RabbitMQConnection-B1Vs2Zyk.mjs → RabbitMQConnection-Cg7mp8u-.mjs} +1 -1
- package/dist/{RabbitMQConnection-B1Vs2Zyk.mjs.map → RabbitMQConnection-Cg7mp8u-.mjs.map} +1 -1
- package/dist/{RabbitMQConnection-gWDXyqTD.cjs → RabbitMQConnection-DddqvI3I.cjs} +1 -1
- package/dist/{RabbitMQConnection-gWDXyqTD.cjs.map → RabbitMQConnection-DddqvI3I.cjs.map} +1 -1
- package/dist/{RabbitMQPublisher--DL6GM6g.cjs → RabbitMQPublisher-BfTRUnpy.cjs} +1 -1
- package/dist/{RabbitMQPublisher--DL6GM6g.cjs.map → RabbitMQPublisher-BfTRUnpy.cjs.map} +1 -1
- package/dist/{RabbitMQPublisher-o_oVI3wr.mjs → RabbitMQPublisher-Cxm1zSkD.mjs} +1 -1
- package/dist/{RabbitMQPublisher-o_oVI3wr.mjs.map → RabbitMQPublisher-Cxm1zSkD.mjs.map} +1 -1
- package/dist/{RabbitMQSubscriber-C8MYAihn.cjs → RabbitMQSubscriber-CWDdmt1M.cjs} +1 -1
- package/dist/{RabbitMQSubscriber-C8MYAihn.cjs.map → RabbitMQSubscriber-CWDdmt1M.cjs.map} +1 -1
- package/dist/{RabbitMQSubscriber-DlGL0pC2.mjs → RabbitMQSubscriber-fP8G9OlK.mjs} +1 -1
- package/dist/{RabbitMQSubscriber-DlGL0pC2.mjs.map → RabbitMQSubscriber-fP8G9OlK.mjs.map} +1 -1
- package/dist/basic/BasicConnection.cjs +1 -1
- package/dist/basic/BasicConnection.mjs +1 -1
- package/dist/basic/BasicPublisher.cjs +1 -1
- package/dist/basic/BasicPublisher.mjs +1 -1
- package/dist/basic/BasicSubscriber.cjs +1 -1
- package/dist/basic/BasicSubscriber.mjs +1 -1
- package/dist/basic/index.cjs +3 -3
- package/dist/basic/index.mjs +3 -3
- package/dist/pgboss/PgBossConnection.cjs +1 -1
- package/dist/pgboss/PgBossConnection.mjs +1 -1
- package/dist/pgboss/PgBossPublisher.cjs +1 -1
- package/dist/pgboss/PgBossPublisher.mjs +1 -1
- package/dist/pgboss/PgBossSubscriber.cjs +1 -1
- package/dist/pgboss/PgBossSubscriber.mjs +1 -1
- package/dist/pgboss/index.cjs +3 -3
- package/dist/pgboss/index.mjs +3 -3
- package/dist/rabbitmq/RabbitMQConnection.cjs +1 -1
- package/dist/rabbitmq/RabbitMQConnection.mjs +1 -1
- package/dist/rabbitmq/RabbitMQPublisher.cjs +1 -1
- package/dist/rabbitmq/RabbitMQPublisher.mjs +1 -1
- package/dist/rabbitmq/RabbitMQSubscriber.cjs +1 -1
- package/dist/rabbitmq/RabbitMQSubscriber.mjs +1 -1
- package/dist/rabbitmq/index.cjs +3 -3
- package/dist/rabbitmq/index.mjs +3 -3
- package/package.json +3 -3
- package/tsdown.config.ts +6 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,41 @@
|
|
|
1
1
|
# @geekmidas/events
|
|
2
2
|
|
|
3
|
+
## 1.1.6
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 🐛 [#11](https://github.com/geekmidas/toolbox/pull/11) [`40f4dc0`](https://github.com/geekmidas/toolbox/commit/40f4dc095911b2223a255029d8f776caf7781309) Thanks [@geekmidas](https://github.com/geekmidas)! - Patch release across all packages to realign published versions with the
|
|
8
|
+
registry. The previous release only published the four packages that had
|
|
9
|
+
version bumps; the remaining packages failed with "cannot publish over the
|
|
10
|
+
previously published versions" because their versions were unchanged.
|
|
11
|
+
- Updated dependencies [[`40f4dc0`](https://github.com/geekmidas/toolbox/commit/40f4dc095911b2223a255029d8f776caf7781309)]:
|
|
12
|
+
- @geekmidas/schema@1.0.4
|
|
13
|
+
|
|
14
|
+
## 1.1.5
|
|
15
|
+
|
|
16
|
+
### Patch Changes
|
|
17
|
+
|
|
18
|
+
- ✨ [#8](https://github.com/geekmidas/toolbox/pull/8) [`03b08fe`](https://github.com/geekmidas/toolbox/commit/03b08feba2e735539c43f95b77792c18a627b07d) Thanks [@geekmidas](https://github.com/geekmidas)! - refactor(manifest): model the unified `gkm build` manifest and add `QueueInfo`
|
|
19
|
+
|
|
20
|
+
`gkm build` emits a single TypeScript module per provider
|
|
21
|
+
(`export const manifest = { routes, functions, crons, subscribers } as const`),
|
|
22
|
+
not separate JSON files. `@geekmidas/manifest` now models that:
|
|
23
|
+
- a unified `Manifest` type plus `ManifestField<T>` (a field is a flat
|
|
24
|
+
`readonly T[]` or a partitioned `Record<string, readonly T[]>`) and a
|
|
25
|
+
`flattenManifestField` helper;
|
|
26
|
+
- the item types (`RouteInfo`/`FunctionInfo`/`CronInfo`/`SubscriberInfo`) gain a
|
|
27
|
+
new `QueueInfo`, `SubscriberInfo.transport`, and readonly array fields so the
|
|
28
|
+
`as const` manifest assigns cleanly;
|
|
29
|
+
- 🔥 the per-unit `*Manifest` wrapper types are removed.
|
|
30
|
+
|
|
31
|
+
`@geekmidas/cloud/sst`'s `Api`/`Function`/`Cron` `fromManifest` now take the
|
|
32
|
+
manifest **field** (`Api.fromManifest(stack, id, manifest.routes, …)`) and
|
|
33
|
+
flatten the flat-or-partitioned shape. `@geekmidas/cli` re-exports the updated
|
|
34
|
+
types.
|
|
35
|
+
|
|
36
|
+
Also fixes `@geekmidas/events` to externalise `pg-boss` (it was the one
|
|
37
|
+
transport dep being bundled).
|
|
38
|
+
|
|
3
39
|
## 1.1.4
|
|
4
40
|
|
|
5
41
|
### Patch Changes
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BasicConnection-
|
|
1
|
+
{"version":3,"file":"BasicConnection-CxfNEvlb.cjs","names":["EventPublisherType","EventEmitter","_connectionString: string"],"sources":["../src/basic/BasicConnection.ts"],"sourcesContent":["import { EventEmitter } from 'node:events';\nimport type { EventConnection } from '../types';\nimport { EventPublisherType } from '../types';\n\nexport class BasicConnection implements EventConnection {\n\treadonly type = EventPublisherType.Basic;\n\tprivate emitter: EventEmitter;\n\tprivate connected = false;\n\n\tconstructor() {\n\t\tthis.emitter = new EventEmitter();\n\t}\n\n\t/**\n\t * Create a BasicConnection from a connection string\n\t * Format: basic://\n\t */\n\tstatic async fromConnectionString(\n\t\t_connectionString: string,\n\t): Promise<BasicConnection> {\n\t\t// Basic connection doesn't need any configuration\n\t\tconst connection = new BasicConnection();\n\t\tawait connection.connect();\n\t\treturn connection;\n\t}\n\n\tasync connect(): Promise<void> {\n\t\tthis.connected = true;\n\t}\n\n\tasync close(): Promise<void> {\n\t\tthis.emitter.removeAllListeners();\n\t\tthis.connected = false;\n\t}\n\n\tisConnected(): boolean {\n\t\treturn this.connected;\n\t}\n\n\t/**\n\t * Get the underlying EventEmitter\n\t * Used by BasicPublisher and BasicSubscriber\n\t */\n\tget eventEmitter(): EventEmitter {\n\t\treturn this.emitter;\n\t}\n}\n"],"mappings":";;;;;AAIA,IAAa,kBAAb,MAAa,gBAA2C;CACvD,AAAS,OAAOA,iCAAmB;CACnC,AAAQ;CACR,AAAQ,YAAY;CAEpB,cAAc;AACb,OAAK,UAAU,IAAIC;CACnB;;;;;CAMD,aAAa,qBACZC,mBAC2B;EAE3B,MAAM,aAAa,IAAI;AACvB,QAAM,WAAW,SAAS;AAC1B,SAAO;CACP;CAED,MAAM,UAAyB;AAC9B,OAAK,YAAY;CACjB;CAED,MAAM,QAAuB;AAC5B,OAAK,QAAQ,oBAAoB;AACjC,OAAK,YAAY;CACjB;CAED,cAAuB;AACtB,SAAO,KAAK;CACZ;;;;;CAMD,IAAI,eAA6B;AAChC,SAAO,KAAK;CACZ;AACD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BasicConnection-
|
|
1
|
+
{"version":3,"file":"BasicConnection-hl-Ogz3a.mjs","names":["_connectionString: string"],"sources":["../src/basic/BasicConnection.ts"],"sourcesContent":["import { EventEmitter } from 'node:events';\nimport type { EventConnection } from '../types';\nimport { EventPublisherType } from '../types';\n\nexport class BasicConnection implements EventConnection {\n\treadonly type = EventPublisherType.Basic;\n\tprivate emitter: EventEmitter;\n\tprivate connected = false;\n\n\tconstructor() {\n\t\tthis.emitter = new EventEmitter();\n\t}\n\n\t/**\n\t * Create a BasicConnection from a connection string\n\t * Format: basic://\n\t */\n\tstatic async fromConnectionString(\n\t\t_connectionString: string,\n\t): Promise<BasicConnection> {\n\t\t// Basic connection doesn't need any configuration\n\t\tconst connection = new BasicConnection();\n\t\tawait connection.connect();\n\t\treturn connection;\n\t}\n\n\tasync connect(): Promise<void> {\n\t\tthis.connected = true;\n\t}\n\n\tasync close(): Promise<void> {\n\t\tthis.emitter.removeAllListeners();\n\t\tthis.connected = false;\n\t}\n\n\tisConnected(): boolean {\n\t\treturn this.connected;\n\t}\n\n\t/**\n\t * Get the underlying EventEmitter\n\t * Used by BasicPublisher and BasicSubscriber\n\t */\n\tget eventEmitter(): EventEmitter {\n\t\treturn this.emitter;\n\t}\n}\n"],"mappings":";;;;AAIA,IAAa,kBAAb,MAAa,gBAA2C;CACvD,AAAS,OAAO,mBAAmB;CACnC,AAAQ;CACR,AAAQ,YAAY;CAEpB,cAAc;AACb,OAAK,UAAU,IAAI;CACnB;;;;;CAMD,aAAa,qBACZA,mBAC2B;EAE3B,MAAM,aAAa,IAAI;AACvB,QAAM,WAAW,SAAS;AAC1B,SAAO;CACP;CAED,MAAM,UAAyB;AAC9B,OAAK,YAAY;CACjB;CAED,MAAM,QAAuB;AAC5B,OAAK,QAAQ,oBAAoB;AACjC,OAAK,YAAY;CACjB;CAED,cAAuB;AACtB,SAAO,KAAK;CACZ;;;;;CAMD,IAAI,eAA6B;AAChC,SAAO,KAAK;CACZ;AACD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BasicPublisher-
|
|
1
|
+
{"version":3,"file":"BasicPublisher-CXAVKxgq.cjs","names":["connection: BasicConnection","messages: TMessage[]"],"sources":["../src/basic/BasicPublisher.ts"],"sourcesContent":["import type { EventPublisher, PublishableMessage } from '../types';\nimport type { BasicConnection } from './BasicConnection';\n\nexport class BasicPublisher<TMessage extends PublishableMessage<string, any>>\n\timplements EventPublisher<TMessage>\n{\n\tconstructor(private connection: BasicConnection) {}\n\n\tasync publish(messages: TMessage[]) {\n\t\tconst emitter = this.connection.eventEmitter;\n\t\tfor (const message of messages) {\n\t\t\temitter.emit(message.type, message);\n\t\t}\n\t}\n}\n"],"mappings":";;AAGA,IAAa,iBAAb,MAEA;CACC,YAAoBA,YAA6B;EAA7B;CAA+B;CAEnD,MAAM,QAAQC,UAAsB;EACnC,MAAM,UAAU,KAAK,WAAW;AAChC,OAAK,MAAM,WAAW,SACrB,SAAQ,KAAK,QAAQ,MAAM,QAAQ;CAEpC;AACD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BasicPublisher-
|
|
1
|
+
{"version":3,"file":"BasicPublisher-DogbeHAH.mjs","names":["connection: BasicConnection","messages: TMessage[]"],"sources":["../src/basic/BasicPublisher.ts"],"sourcesContent":["import type { EventPublisher, PublishableMessage } from '../types';\nimport type { BasicConnection } from './BasicConnection';\n\nexport class BasicPublisher<TMessage extends PublishableMessage<string, any>>\n\timplements EventPublisher<TMessage>\n{\n\tconstructor(private connection: BasicConnection) {}\n\n\tasync publish(messages: TMessage[]) {\n\t\tconst emitter = this.connection.eventEmitter;\n\t\tfor (const message of messages) {\n\t\t\temitter.emit(message.type, message);\n\t\t}\n\t}\n}\n"],"mappings":";AAGA,IAAa,iBAAb,MAEA;CACC,YAAoBA,YAA6B;EAA7B;CAA+B;CAEnD,MAAM,QAAQC,UAAsB;EACnC,MAAM,UAAU,KAAK,WAAW;AAChC,OAAK,MAAM,WAAW,SACrB,SAAQ,KAAK,QAAQ,MAAM,QAAQ;CAEpC;AACD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BasicSubscriber-
|
|
1
|
+
{"version":3,"file":"BasicSubscriber-BJSZN22M.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\timplements EventSubscriber<TMessage>\n{\n\tconstructor(private connection: BasicConnection) {}\n\n\tasync subscribe(\n\t\tmessages: TMessage['type'][],\n\t\tlistener: (payload: TMessage) => Promise<void>,\n\t): Promise<void> {\n\t\tconst emitter = this.connection.eventEmitter;\n\n\t\tfor (const messageType of messages) {\n\t\t\temitter.on(messageType, (message: TMessage) => {\n\t\t\t\tlistener(message).catch((_error) => {});\n\t\t\t});\n\t\t}\n\t}\n}\n"],"mappings":";AAGA,IAAa,kBAAb,MAEA;CACC,YAAoBA,YAA6B;EAA7B;CAA+B;CAEnD,MAAM,UACLC,UACAC,UACgB;EAChB,MAAM,UAAU,KAAK,WAAW;AAEhC,OAAK,MAAM,eAAe,SACzB,SAAQ,GAAG,aAAa,CAACC,YAAsB;AAC9C,YAAS,QAAQ,CAAC,MAAM,CAAC,WAAW,CAAE,EAAC;EACvC,EAAC;CAEH;AACD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BasicSubscriber-
|
|
1
|
+
{"version":3,"file":"BasicSubscriber-mVJRMXhZ.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\timplements EventSubscriber<TMessage>\n{\n\tconstructor(private connection: BasicConnection) {}\n\n\tasync subscribe(\n\t\tmessages: TMessage['type'][],\n\t\tlistener: (payload: TMessage) => Promise<void>,\n\t): Promise<void> {\n\t\tconst emitter = this.connection.eventEmitter;\n\n\t\tfor (const messageType of messages) {\n\t\t\temitter.on(messageType, (message: TMessage) => {\n\t\t\t\tlistener(message).catch((_error) => {});\n\t\t\t});\n\t\t}\n\t}\n}\n"],"mappings":";;AAGA,IAAa,kBAAb,MAEA;CACC,YAAoBA,YAA6B;EAA7B;CAA+B;CAEnD,MAAM,UACLC,UACAC,UACgB;EAChB,MAAM,UAAU,KAAK,WAAW;AAEhC,OAAK,MAAM,eAAe,SACzB,SAAQ,GAAG,aAAa,CAACC,YAAsB;AAC9C,YAAS,QAAQ,CAAC,MAAM,CAAC,WAAW,CAAE,EAAC;EACvC,EAAC;CAEH;AACD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PgBossConnection-
|
|
1
|
+
{"version":3,"file":"PgBossConnection-B71ssr72.cjs","names":["EventPublisherType","config: PgBossConnectionConfig","connectionString: string","PgBoss"],"sources":["../src/pgboss/PgBossConnection.ts"],"sourcesContent":["import { PgBoss } from 'pg-boss';\nimport type { EventConnection } from '../types';\nimport { EventPublisherType } from '../types';\n\nexport interface PgBossConnectionConfig {\n\tconnectionString: string;\n\tschema?: string;\n}\n\nexport class PgBossConnection implements EventConnection {\n\treadonly type = EventPublisherType.PgBoss;\n\tprivate boss?: PgBoss;\n\tprivate connecting?: Promise<void>;\n\n\tconstructor(private config: PgBossConnectionConfig) {}\n\n\t/**\n\t * Create a PgBossConnection from a connection string.\n\t * Format: pgboss://user:pass@host:5432/database?schema=pgboss\n\t */\n\tstatic async fromConnectionString(\n\t\tconnectionString: string,\n\t): Promise<PgBossConnection> {\n\t\tconst url = new URL(connectionString);\n\t\tconst params = url.searchParams;\n\n\t\tconst postgresUrl = `postgres://${url.username ? `${url.username}:${url.password}@` : ''}${url.host}${url.pathname}`;\n\n\t\tconst config: PgBossConnectionConfig = {\n\t\t\tconnectionString: postgresUrl,\n\t\t\tschema: params.get('schema') || undefined,\n\t\t};\n\n\t\tconst connection = new PgBossConnection(config);\n\t\tawait connection.connect();\n\t\treturn connection;\n\t}\n\n\tasync connect(): Promise<void> {\n\t\tif (this.boss) return;\n\n\t\tif (this.connecting) {\n\t\t\tawait this.connecting;\n\t\t\treturn;\n\t\t}\n\n\t\tthis.connecting = (async () => {\n\t\t\ttry {\n\t\t\t\tconst boss = new PgBoss({\n\t\t\t\t\tconnectionString: this.config.connectionString,\n\t\t\t\t\t...(this.config.schema && { schema: this.config.schema }),\n\t\t\t\t});\n\n\t\t\t\tawait boss.start();\n\t\t\t\tthis.boss = boss;\n\t\t\t} catch (error) {\n\t\t\t\tthis.cleanup();\n\t\t\t\tthrow error;\n\t\t\t}\n\t\t})();\n\n\t\tawait this.connecting;\n\t\tthis.connecting = undefined;\n\t}\n\n\tasync close(): Promise<void> {\n\t\ttry {\n\t\t\tawait this.boss?.stop({ graceful: true });\n\t\t} catch {\n\t\t\t// Ignore errors during close\n\t\t} finally {\n\t\t\tthis.cleanup();\n\t\t}\n\t}\n\n\tisConnected(): boolean {\n\t\treturn !!this.boss;\n\t}\n\n\tprivate cleanup(): void {\n\t\tthis.boss = undefined;\n\t\tthis.connecting = undefined;\n\t}\n\n\t/**\n\t * Get the underlying pg-boss instance for publishing/subscribing\n\t */\n\tget instance(): PgBoss | undefined {\n\t\treturn this.boss;\n\t}\n}\n"],"mappings":";;;;;AASA,IAAa,mBAAb,MAAa,iBAA4C;CACxD,AAAS,OAAOA,iCAAmB;CACnC,AAAQ;CACR,AAAQ;CAER,YAAoBC,QAAgC;EAAhC;CAAkC;;;;;CAMtD,aAAa,qBACZC,kBAC4B;EAC5B,MAAM,MAAM,IAAI,IAAI;EACpB,MAAM,SAAS,IAAI;EAEnB,MAAM,eAAe,aAAa,IAAI,YAAY,EAAE,IAAI,SAAS,GAAG,IAAI,SAAS,KAAK,GAAG,EAAE,IAAI,KAAK,EAAE,IAAI,SAAS;EAEnH,MAAMD,SAAiC;GACtC,kBAAkB;GAClB,QAAQ,OAAO,IAAI,SAAS;EAC5B;EAED,MAAM,aAAa,IAAI,iBAAiB;AACxC,QAAM,WAAW,SAAS;AAC1B,SAAO;CACP;CAED,MAAM,UAAyB;AAC9B,MAAI,KAAK,KAAM;AAEf,MAAI,KAAK,YAAY;AACpB,SAAM,KAAK;AACX;EACA;AAED,OAAK,aAAa,CAAC,YAAY;AAC9B,OAAI;IACH,MAAM,OAAO,IAAIE,eAAO;KACvB,kBAAkB,KAAK,OAAO;KAC9B,GAAI,KAAK,OAAO,UAAU,EAAE,QAAQ,KAAK,OAAO,OAAQ;IACxD;AAED,UAAM,KAAK,OAAO;AAClB,SAAK,OAAO;GACZ,SAAQ,OAAO;AACf,SAAK,SAAS;AACd,UAAM;GACN;EACD,IAAG;AAEJ,QAAM,KAAK;AACX,OAAK;CACL;CAED,MAAM,QAAuB;AAC5B,MAAI;AACH,SAAM,KAAK,MAAM,KAAK,EAAE,UAAU,KAAM,EAAC;EACzC,QAAO,CAEP,UAAS;AACT,QAAK,SAAS;EACd;CACD;CAED,cAAuB;AACtB,WAAS,KAAK;CACd;CAED,AAAQ,UAAgB;AACvB,OAAK;AACL,OAAK;CACL;;;;CAKD,IAAI,WAA+B;AAClC,SAAO,KAAK;CACZ;AACD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PgBossConnection-
|
|
1
|
+
{"version":3,"file":"PgBossConnection-Bj_Wo1lQ.mjs","names":["config: PgBossConnectionConfig","connectionString: string"],"sources":["../src/pgboss/PgBossConnection.ts"],"sourcesContent":["import { PgBoss } from 'pg-boss';\nimport type { EventConnection } from '../types';\nimport { EventPublisherType } from '../types';\n\nexport interface PgBossConnectionConfig {\n\tconnectionString: string;\n\tschema?: string;\n}\n\nexport class PgBossConnection implements EventConnection {\n\treadonly type = EventPublisherType.PgBoss;\n\tprivate boss?: PgBoss;\n\tprivate connecting?: Promise<void>;\n\n\tconstructor(private config: PgBossConnectionConfig) {}\n\n\t/**\n\t * Create a PgBossConnection from a connection string.\n\t * Format: pgboss://user:pass@host:5432/database?schema=pgboss\n\t */\n\tstatic async fromConnectionString(\n\t\tconnectionString: string,\n\t): Promise<PgBossConnection> {\n\t\tconst url = new URL(connectionString);\n\t\tconst params = url.searchParams;\n\n\t\tconst postgresUrl = `postgres://${url.username ? `${url.username}:${url.password}@` : ''}${url.host}${url.pathname}`;\n\n\t\tconst config: PgBossConnectionConfig = {\n\t\t\tconnectionString: postgresUrl,\n\t\t\tschema: params.get('schema') || undefined,\n\t\t};\n\n\t\tconst connection = new PgBossConnection(config);\n\t\tawait connection.connect();\n\t\treturn connection;\n\t}\n\n\tasync connect(): Promise<void> {\n\t\tif (this.boss) return;\n\n\t\tif (this.connecting) {\n\t\t\tawait this.connecting;\n\t\t\treturn;\n\t\t}\n\n\t\tthis.connecting = (async () => {\n\t\t\ttry {\n\t\t\t\tconst boss = new PgBoss({\n\t\t\t\t\tconnectionString: this.config.connectionString,\n\t\t\t\t\t...(this.config.schema && { schema: this.config.schema }),\n\t\t\t\t});\n\n\t\t\t\tawait boss.start();\n\t\t\t\tthis.boss = boss;\n\t\t\t} catch (error) {\n\t\t\t\tthis.cleanup();\n\t\t\t\tthrow error;\n\t\t\t}\n\t\t})();\n\n\t\tawait this.connecting;\n\t\tthis.connecting = undefined;\n\t}\n\n\tasync close(): Promise<void> {\n\t\ttry {\n\t\t\tawait this.boss?.stop({ graceful: true });\n\t\t} catch {\n\t\t\t// Ignore errors during close\n\t\t} finally {\n\t\t\tthis.cleanup();\n\t\t}\n\t}\n\n\tisConnected(): boolean {\n\t\treturn !!this.boss;\n\t}\n\n\tprivate cleanup(): void {\n\t\tthis.boss = undefined;\n\t\tthis.connecting = undefined;\n\t}\n\n\t/**\n\t * Get the underlying pg-boss instance for publishing/subscribing\n\t */\n\tget instance(): PgBoss | undefined {\n\t\treturn this.boss;\n\t}\n}\n"],"mappings":";;;;AASA,IAAa,mBAAb,MAAa,iBAA4C;CACxD,AAAS,OAAO,mBAAmB;CACnC,AAAQ;CACR,AAAQ;CAER,YAAoBA,QAAgC;EAAhC;CAAkC;;;;;CAMtD,aAAa,qBACZC,kBAC4B;EAC5B,MAAM,MAAM,IAAI,IAAI;EACpB,MAAM,SAAS,IAAI;EAEnB,MAAM,eAAe,aAAa,IAAI,YAAY,EAAE,IAAI,SAAS,GAAG,IAAI,SAAS,KAAK,GAAG,EAAE,IAAI,KAAK,EAAE,IAAI,SAAS;EAEnH,MAAMD,SAAiC;GACtC,kBAAkB;GAClB,QAAQ,OAAO,IAAI,SAAS;EAC5B;EAED,MAAM,aAAa,IAAI,iBAAiB;AACxC,QAAM,WAAW,SAAS;AAC1B,SAAO;CACP;CAED,MAAM,UAAyB;AAC9B,MAAI,KAAK,KAAM;AAEf,MAAI,KAAK,YAAY;AACpB,SAAM,KAAK;AACX;EACA;AAED,OAAK,aAAa,CAAC,YAAY;AAC9B,OAAI;IACH,MAAM,OAAO,IAAI,OAAO;KACvB,kBAAkB,KAAK,OAAO;KAC9B,GAAI,KAAK,OAAO,UAAU,EAAE,QAAQ,KAAK,OAAO,OAAQ;IACxD;AAED,UAAM,KAAK,OAAO;AAClB,SAAK,OAAO;GACZ,SAAQ,OAAO;AACf,SAAK,SAAS;AACd,UAAM;GACN;EACD,IAAG;AAEJ,QAAM,KAAK;AACX,OAAK;CACL;CAED,MAAM,QAAuB;AAC5B,MAAI;AACH,SAAM,KAAK,MAAM,KAAK,EAAE,UAAU,KAAM,EAAC;EACzC,QAAO,CAEP,UAAS;AACT,QAAK,SAAS;EACd;CACD;CAED,cAAuB;AACtB,WAAS,KAAK;CACd;CAED,AAAQ,UAAgB;AACvB,OAAK;AACL,OAAK;CACL;;;;CAKD,IAAI,WAA+B;AAClC,SAAO,KAAK;CACZ;AACD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PgBossPublisher-
|
|
1
|
+
{"version":3,"file":"PgBossPublisher-Bwo7qSoH.mjs","names":["connection: PgBossConnection","connectionString: string","messages: TMessage[]"],"sources":["../src/pgboss/PgBossPublisher.ts"],"sourcesContent":["import type { EventPublisher, PublishableMessage } from '../types';\nimport type { PgBossConnection } from './PgBossConnection';\n\nexport class PgBossPublisher<TMessage extends PublishableMessage<string, any>>\n\timplements EventPublisher<TMessage>\n{\n\tconstructor(private connection: PgBossConnection) {}\n\n\t/**\n\t * Create a PgBossPublisher from a connection string.\n\t * Format: pgboss://user:pass@host:5432/database?schema=pgboss\n\t */\n\tstatic async fromConnectionString<\n\t\tTMessage extends PublishableMessage<string, any>,\n\t>(connectionString: string): Promise<PgBossPublisher<TMessage>> {\n\t\tconst { PgBossConnection } = await import('./PgBossConnection');\n\t\tconst connection =\n\t\t\tawait PgBossConnection.fromConnectionString(connectionString);\n\t\treturn new PgBossPublisher<TMessage>(connection);\n\t}\n\n\tasync publish(messages: TMessage[]): Promise<void> {\n\t\tif (!this.connection.isConnected()) {\n\t\t\tawait this.connection.connect();\n\t\t}\n\n\t\tconst boss = this.connection.instance;\n\t\tif (!boss) {\n\t\t\tthrow new Error('PgBoss instance not initialized');\n\t\t}\n\n\t\t// Group jobs by queue name (v11+ requires per-queue insert calls)\n\t\tconst groups = new Map<string, { data: TMessage['payload'] }[]>();\n\t\tfor (const m of messages) {\n\t\t\tconst list = groups.get(m.type) ?? [];\n\t\t\tlist.push({ data: m.payload });\n\t\t\tgroups.set(m.type, list);\n\t\t}\n\n\t\tfor (const [name, jobs] of groups) {\n\t\t\tawait boss.createQueue(name);\n\t\t\tawait boss.insert(name, jobs);\n\t\t}\n\t}\n\n\tasync close(): Promise<void> {\n\t\t// Publisher doesn't own the connection\n\t}\n}\n"],"mappings":";AAGA,IAAa,kBAAb,MAAa,gBAEb;CACC,YAAoBA,YAA8B;EAA9B;CAAgC;;;;;CAMpD,aAAa,qBAEXC,kBAA8D;EAC/D,MAAM,EAAE,kBAAkB,GAAG,MAAM,OAAO;EAC1C,MAAM,aACL,MAAM,iBAAiB,qBAAqB,iBAAiB;AAC9D,SAAO,IAAI,gBAA0B;CACrC;CAED,MAAM,QAAQC,UAAqC;AAClD,OAAK,KAAK,WAAW,aAAa,CACjC,OAAM,KAAK,WAAW,SAAS;EAGhC,MAAM,OAAO,KAAK,WAAW;AAC7B,OAAK,KACJ,OAAM,IAAI,MAAM;EAIjB,MAAM,yBAAS,IAAI;AACnB,OAAK,MAAM,KAAK,UAAU;GACzB,MAAM,OAAO,OAAO,IAAI,EAAE,KAAK,IAAI,CAAE;AACrC,QAAK,KAAK,EAAE,MAAM,EAAE,QAAS,EAAC;AAC9B,UAAO,IAAI,EAAE,MAAM,KAAK;EACxB;AAED,OAAK,MAAM,CAAC,MAAM,KAAK,IAAI,QAAQ;AAClC,SAAM,KAAK,YAAY,KAAK;AAC5B,SAAM,KAAK,OAAO,MAAM,KAAK;EAC7B;CACD;CAED,MAAM,QAAuB,CAE5B;AACD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PgBossPublisher-
|
|
1
|
+
{"version":3,"file":"PgBossPublisher-FTdYh58W.cjs","names":["connection: PgBossConnection","connectionString: string","messages: TMessage[]"],"sources":["../src/pgboss/PgBossPublisher.ts"],"sourcesContent":["import type { EventPublisher, PublishableMessage } from '../types';\nimport type { PgBossConnection } from './PgBossConnection';\n\nexport class PgBossPublisher<TMessage extends PublishableMessage<string, any>>\n\timplements EventPublisher<TMessage>\n{\n\tconstructor(private connection: PgBossConnection) {}\n\n\t/**\n\t * Create a PgBossPublisher from a connection string.\n\t * Format: pgboss://user:pass@host:5432/database?schema=pgboss\n\t */\n\tstatic async fromConnectionString<\n\t\tTMessage extends PublishableMessage<string, any>,\n\t>(connectionString: string): Promise<PgBossPublisher<TMessage>> {\n\t\tconst { PgBossConnection } = await import('./PgBossConnection');\n\t\tconst connection =\n\t\t\tawait PgBossConnection.fromConnectionString(connectionString);\n\t\treturn new PgBossPublisher<TMessage>(connection);\n\t}\n\n\tasync publish(messages: TMessage[]): Promise<void> {\n\t\tif (!this.connection.isConnected()) {\n\t\t\tawait this.connection.connect();\n\t\t}\n\n\t\tconst boss = this.connection.instance;\n\t\tif (!boss) {\n\t\t\tthrow new Error('PgBoss instance not initialized');\n\t\t}\n\n\t\t// Group jobs by queue name (v11+ requires per-queue insert calls)\n\t\tconst groups = new Map<string, { data: TMessage['payload'] }[]>();\n\t\tfor (const m of messages) {\n\t\t\tconst list = groups.get(m.type) ?? [];\n\t\t\tlist.push({ data: m.payload });\n\t\t\tgroups.set(m.type, list);\n\t\t}\n\n\t\tfor (const [name, jobs] of groups) {\n\t\t\tawait boss.createQueue(name);\n\t\t\tawait boss.insert(name, jobs);\n\t\t}\n\t}\n\n\tasync close(): Promise<void> {\n\t\t// Publisher doesn't own the connection\n\t}\n}\n"],"mappings":";;AAGA,IAAa,kBAAb,MAAa,gBAEb;CACC,YAAoBA,YAA8B;EAA9B;CAAgC;;;;;CAMpD,aAAa,qBAEXC,kBAA8D;EAC/D,MAAM,EAAE,kBAAkB,GAAG,2CAAM;EACnC,MAAM,aACL,MAAM,iBAAiB,qBAAqB,iBAAiB;AAC9D,SAAO,IAAI,gBAA0B;CACrC;CAED,MAAM,QAAQC,UAAqC;AAClD,OAAK,KAAK,WAAW,aAAa,CACjC,OAAM,KAAK,WAAW,SAAS;EAGhC,MAAM,OAAO,KAAK,WAAW;AAC7B,OAAK,KACJ,OAAM,IAAI,MAAM;EAIjB,MAAM,yBAAS,IAAI;AACnB,OAAK,MAAM,KAAK,UAAU;GACzB,MAAM,OAAO,OAAO,IAAI,EAAE,KAAK,IAAI,CAAE;AACrC,QAAK,KAAK,EAAE,MAAM,EAAE,QAAS,EAAC;AAC9B,UAAO,IAAI,EAAE,MAAM,KAAK;EACxB;AAED,OAAK,MAAM,CAAC,MAAM,KAAK,IAAI,QAAQ;AAClC,SAAM,KAAK,YAAY,KAAK;AAC5B,SAAM,KAAK,OAAO,MAAM,KAAK;EAC7B;CACD;CAED,MAAM,QAAuB,CAE5B;AACD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PgBossSubscriber-
|
|
1
|
+
{"version":3,"file":"PgBossSubscriber-BubVfuWm.cjs","names":["connection: PgBossConnection","options: PgBossSubscriberOptions","connectionString: string","messages: TMessage['type'][]","listener: (payload: TMessage) => Promise<void>"],"sources":["../src/pgboss/PgBossSubscriber.ts"],"sourcesContent":["import type { EventSubscriber, PublishableMessage } from '../types';\nimport type { PgBossConnection } from './PgBossConnection';\n\nexport interface PgBossSubscriberOptions {\n\tbatchSize?: number;\n\tpollingIntervalSeconds?: number;\n}\n\nexport class PgBossSubscriber<TMessage extends PublishableMessage<string, any>>\n\timplements EventSubscriber<TMessage>\n{\n\tconstructor(\n\t\tprivate connection: PgBossConnection,\n\t\tprivate options: PgBossSubscriberOptions = {},\n\t) {}\n\n\t/**\n\t * Create a PgBossSubscriber from a connection string.\n\t * Format: pgboss://user:pass@host:5432/database?schema=pgboss&batchSize=5\n\t */\n\tstatic async fromConnectionString<\n\t\tTMessage extends PublishableMessage<string, any>,\n\t>(connectionString: string): Promise<PgBossSubscriber<TMessage>> {\n\t\tconst url = new URL(connectionString);\n\t\tconst params = url.searchParams;\n\n\t\tconst { PgBossConnection } = await import('./PgBossConnection');\n\t\tconst connection =\n\t\t\tawait PgBossConnection.fromConnectionString(connectionString);\n\n\t\tconst options: PgBossSubscriberOptions = {\n\t\t\tbatchSize: params.get('batchSize')\n\t\t\t\t? Number.parseInt(params.get('batchSize')!, 10)\n\t\t\t\t: undefined,\n\t\t\tpollingIntervalSeconds: params.get('pollingIntervalSeconds')\n\t\t\t\t? Number.parseInt(params.get('pollingIntervalSeconds')!, 10)\n\t\t\t\t: undefined,\n\t\t};\n\n\t\treturn new PgBossSubscriber<TMessage>(connection, options);\n\t}\n\n\tasync subscribe(\n\t\tmessages: TMessage['type'][],\n\t\tlistener: (payload: TMessage) => Promise<void>,\n\t): Promise<void> {\n\t\tif (!this.connection.isConnected()) {\n\t\t\tawait this.connection.connect();\n\t\t}\n\n\t\tconst boss = this.connection.instance;\n\t\tif (!boss) {\n\t\t\tthrow new Error('PgBoss instance not initialized');\n\t\t}\n\n\t\tfor (const messageType of messages) {\n\t\t\tawait boss.createQueue(messageType);\n\t\t\tawait boss.work(\n\t\t\t\tmessageType,\n\t\t\t\t{\n\t\t\t\t\t...(this.options.batchSize && {\n\t\t\t\t\t\tbatchSize: this.options.batchSize,\n\t\t\t\t\t}),\n\t\t\t\t\t...(this.options.pollingIntervalSeconds && {\n\t\t\t\t\t\tpollingIntervalSeconds: this.options.pollingIntervalSeconds,\n\t\t\t\t\t}),\n\t\t\t\t},\n\t\t\t\tasync (jobs) => {\n\t\t\t\t\tfor (const job of jobs) {\n\t\t\t\t\t\tconst fullMessage = {\n\t\t\t\t\t\t\ttype: job.name,\n\t\t\t\t\t\t\tpayload: job.data,\n\t\t\t\t\t\t} as TMessage;\n\n\t\t\t\t\t\tawait listener(fullMessage);\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t);\n\t\t}\n\t}\n}\n"],"mappings":";;AAQA,IAAa,mBAAb,MAAa,iBAEb;CACC,YACSA,YACAC,UAAmC,CAAE,GAC5C;EAFO;EACA;CACL;;;;;CAMJ,aAAa,qBAEXC,kBAA+D;EAChE,MAAM,MAAM,IAAI,IAAI;EACpB,MAAM,SAAS,IAAI;EAEnB,MAAM,EAAE,kBAAkB,GAAG,2CAAM;EACnC,MAAM,aACL,MAAM,iBAAiB,qBAAqB,iBAAiB;EAE9D,MAAMD,UAAmC;GACxC,WAAW,OAAO,IAAI,YAAY,GAC/B,OAAO,SAAS,OAAO,IAAI,YAAY,EAAG,GAAG;GAEhD,wBAAwB,OAAO,IAAI,yBAAyB,GACzD,OAAO,SAAS,OAAO,IAAI,yBAAyB,EAAG,GAAG;EAE7D;AAED,SAAO,IAAI,iBAA2B,YAAY;CAClD;CAED,MAAM,UACLE,UACAC,UACgB;AAChB,OAAK,KAAK,WAAW,aAAa,CACjC,OAAM,KAAK,WAAW,SAAS;EAGhC,MAAM,OAAO,KAAK,WAAW;AAC7B,OAAK,KACJ,OAAM,IAAI,MAAM;AAGjB,OAAK,MAAM,eAAe,UAAU;AACnC,SAAM,KAAK,YAAY,YAAY;AACnC,SAAM,KAAK,KACV,aACA;IACC,GAAI,KAAK,QAAQ,aAAa,EAC7B,WAAW,KAAK,QAAQ,UACxB;IACD,GAAI,KAAK,QAAQ,0BAA0B,EAC1C,wBAAwB,KAAK,QAAQ,uBACrC;GACD,GACD,OAAO,SAAS;AACf,SAAK,MAAM,OAAO,MAAM;KACvB,MAAM,cAAc;MACnB,MAAM,IAAI;MACV,SAAS,IAAI;KACb;AAED,WAAM,SAAS,YAAY;IAC3B;GACD,EACD;EACD;CACD;AACD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PgBossSubscriber-
|
|
1
|
+
{"version":3,"file":"PgBossSubscriber-DopATe80.mjs","names":["connection: PgBossConnection","options: PgBossSubscriberOptions","connectionString: string","messages: TMessage['type'][]","listener: (payload: TMessage) => Promise<void>"],"sources":["../src/pgboss/PgBossSubscriber.ts"],"sourcesContent":["import type { EventSubscriber, PublishableMessage } from '../types';\nimport type { PgBossConnection } from './PgBossConnection';\n\nexport interface PgBossSubscriberOptions {\n\tbatchSize?: number;\n\tpollingIntervalSeconds?: number;\n}\n\nexport class PgBossSubscriber<TMessage extends PublishableMessage<string, any>>\n\timplements EventSubscriber<TMessage>\n{\n\tconstructor(\n\t\tprivate connection: PgBossConnection,\n\t\tprivate options: PgBossSubscriberOptions = {},\n\t) {}\n\n\t/**\n\t * Create a PgBossSubscriber from a connection string.\n\t * Format: pgboss://user:pass@host:5432/database?schema=pgboss&batchSize=5\n\t */\n\tstatic async fromConnectionString<\n\t\tTMessage extends PublishableMessage<string, any>,\n\t>(connectionString: string): Promise<PgBossSubscriber<TMessage>> {\n\t\tconst url = new URL(connectionString);\n\t\tconst params = url.searchParams;\n\n\t\tconst { PgBossConnection } = await import('./PgBossConnection');\n\t\tconst connection =\n\t\t\tawait PgBossConnection.fromConnectionString(connectionString);\n\n\t\tconst options: PgBossSubscriberOptions = {\n\t\t\tbatchSize: params.get('batchSize')\n\t\t\t\t? Number.parseInt(params.get('batchSize')!, 10)\n\t\t\t\t: undefined,\n\t\t\tpollingIntervalSeconds: params.get('pollingIntervalSeconds')\n\t\t\t\t? Number.parseInt(params.get('pollingIntervalSeconds')!, 10)\n\t\t\t\t: undefined,\n\t\t};\n\n\t\treturn new PgBossSubscriber<TMessage>(connection, options);\n\t}\n\n\tasync subscribe(\n\t\tmessages: TMessage['type'][],\n\t\tlistener: (payload: TMessage) => Promise<void>,\n\t): Promise<void> {\n\t\tif (!this.connection.isConnected()) {\n\t\t\tawait this.connection.connect();\n\t\t}\n\n\t\tconst boss = this.connection.instance;\n\t\tif (!boss) {\n\t\t\tthrow new Error('PgBoss instance not initialized');\n\t\t}\n\n\t\tfor (const messageType of messages) {\n\t\t\tawait boss.createQueue(messageType);\n\t\t\tawait boss.work(\n\t\t\t\tmessageType,\n\t\t\t\t{\n\t\t\t\t\t...(this.options.batchSize && {\n\t\t\t\t\t\tbatchSize: this.options.batchSize,\n\t\t\t\t\t}),\n\t\t\t\t\t...(this.options.pollingIntervalSeconds && {\n\t\t\t\t\t\tpollingIntervalSeconds: this.options.pollingIntervalSeconds,\n\t\t\t\t\t}),\n\t\t\t\t},\n\t\t\t\tasync (jobs) => {\n\t\t\t\t\tfor (const job of jobs) {\n\t\t\t\t\t\tconst fullMessage = {\n\t\t\t\t\t\t\ttype: job.name,\n\t\t\t\t\t\t\tpayload: job.data,\n\t\t\t\t\t\t} as TMessage;\n\n\t\t\t\t\t\tawait listener(fullMessage);\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t);\n\t\t}\n\t}\n}\n"],"mappings":";AAQA,IAAa,mBAAb,MAAa,iBAEb;CACC,YACSA,YACAC,UAAmC,CAAE,GAC5C;EAFO;EACA;CACL;;;;;CAMJ,aAAa,qBAEXC,kBAA+D;EAChE,MAAM,MAAM,IAAI,IAAI;EACpB,MAAM,SAAS,IAAI;EAEnB,MAAM,EAAE,kBAAkB,GAAG,MAAM,OAAO;EAC1C,MAAM,aACL,MAAM,iBAAiB,qBAAqB,iBAAiB;EAE9D,MAAMD,UAAmC;GACxC,WAAW,OAAO,IAAI,YAAY,GAC/B,OAAO,SAAS,OAAO,IAAI,YAAY,EAAG,GAAG;GAEhD,wBAAwB,OAAO,IAAI,yBAAyB,GACzD,OAAO,SAAS,OAAO,IAAI,yBAAyB,EAAG,GAAG;EAE7D;AAED,SAAO,IAAI,iBAA2B,YAAY;CAClD;CAED,MAAM,UACLE,UACAC,UACgB;AAChB,OAAK,KAAK,WAAW,aAAa,CACjC,OAAM,KAAK,WAAW,SAAS;EAGhC,MAAM,OAAO,KAAK,WAAW;AAC7B,OAAK,KACJ,OAAM,IAAI,MAAM;AAGjB,OAAK,MAAM,eAAe,UAAU;AACnC,SAAM,KAAK,YAAY,YAAY;AACnC,SAAM,KAAK,KACV,aACA;IACC,GAAI,KAAK,QAAQ,aAAa,EAC7B,WAAW,KAAK,QAAQ,UACxB;IACD,GAAI,KAAK,QAAQ,0BAA0B,EAC1C,wBAAwB,KAAK,QAAQ,uBACrC;GACD,GACD,OAAO,SAAS;AACf,SAAK,MAAM,OAAO,MAAM;KACvB,MAAM,cAAc;MACnB,MAAM,IAAI;MACV,SAAS,IAAI;KACb;AAED,WAAM,SAAS,YAAY;IAC3B;GACD,EACD;EACD;CACD;AACD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RabbitMQConnection-
|
|
1
|
+
{"version":3,"file":"RabbitMQConnection-Cg7mp8u-.mjs","names":["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\turl: string;\n\texchange?: string;\n\texchangeType?: 'topic' | 'direct' | 'fanout' | 'headers';\n\texchangeOptions?: amqplib.Options.AssertExchange;\n\ttimeout?: number; // Connection timeout in milliseconds (default: 5000)\n}\n\nexport class RabbitMQConnection implements EventConnection {\n\treadonly type = EventPublisherType.RabbitMQ;\n\tprivate connection?: amqplib.ChannelModel;\n\tprivate channel?: amqplib.Channel;\n\tprivate connecting?: Promise<void>;\n\tprivate config: Required<\n\t\tPick<RabbitMQConnectionConfig, 'exchange' | 'exchangeType' | 'timeout'>\n\t> &\n\t\tRabbitMQConnectionConfig;\n\n\tconstructor(config: RabbitMQConnectionConfig) {\n\t\tthis.config = {\n\t\t\t...config,\n\t\t\texchange: config.exchange || 'geekmidas.events',\n\t\t\texchangeType: config.exchangeType || 'topic',\n\t\t\ttimeout: config.timeout ?? 5000,\n\t\t\texchangeOptions: {\n\t\t\t\tdurable: true,\n\t\t\t\t...config.exchangeOptions,\n\t\t\t},\n\t\t};\n\t}\n\n\t/**\n\t * Create a RabbitMQConnection from a connection string\n\t * Format: rabbitmq://user:pass@host:port/vhost?exchange=name&type=topic&timeout=5000\n\t */\n\tstatic async fromConnectionString(\n\t\tconnectionString: string,\n\t): Promise<RabbitMQConnection> {\n\t\tconst url = new URL(connectionString);\n\t\tconst params = url.searchParams;\n\n\t\t// Extract connection URL without query params\n\t\tconst baseUrl = `amqp://${url.username ? `${url.username}:${url.password}@` : ''}${url.host}${url.pathname}`;\n\n\t\tconst timeoutParam = params.get('timeout');\n\t\tconst config: RabbitMQConnectionConfig = {\n\t\t\turl: baseUrl,\n\t\t\texchange: params.get('exchange') || 'geekmidas.events',\n\t\t\texchangeType: (params.get('type') as any) || 'topic',\n\t\t\ttimeout: timeoutParam ? Number.parseInt(timeoutParam, 10) : undefined,\n\t\t};\n\n\t\tconst connection = new RabbitMQConnection(config);\n\t\tawait connection.connect();\n\t\treturn connection;\n\t}\n\n\tasync connect(): Promise<void> {\n\t\tif (this.channel) return;\n\n\t\t// Prevent multiple simultaneous connection attempts\n\t\tif (this.connecting) {\n\t\t\tawait this.connecting;\n\t\t\treturn;\n\t\t}\n\n\t\tthis.connecting = (async () => {\n\t\t\ttry {\n\t\t\t\tconst connection = await amqplib.connect(this.config.url, {\n\t\t\t\t\ttimeout: this.config.timeout,\n\t\t\t\t});\n\t\t\t\tconst channel = await connection.createChannel();\n\n\t\t\t\t// Assert the exchange exists\n\t\t\t\tawait channel.assertExchange(\n\t\t\t\t\tthis.config.exchange!,\n\t\t\t\t\tthis.config.exchangeType!,\n\t\t\t\t\tthis.config.exchangeOptions,\n\t\t\t\t);\n\n\t\t\t\t// Handle connection errors\n\t\t\t\tconnection.on('error', (_err: Error) => {\n\t\t\t\t\tthis.cleanup();\n\t\t\t\t});\n\n\t\t\t\tconnection.on('close', () => {\n\t\t\t\t\tthis.cleanup();\n\t\t\t\t});\n\n\t\t\t\t// Only set after successful setup\n\t\t\t\tthis.connection = connection;\n\t\t\t\tthis.channel = channel;\n\t\t\t} catch (error) {\n\t\t\t\tthis.cleanup();\n\t\t\t\tthrow error;\n\t\t\t}\n\t\t})();\n\n\t\tawait this.connecting;\n\t\tthis.connecting = undefined;\n\t}\n\n\tasync close(): Promise<void> {\n\t\ttry {\n\t\t\tawait this.channel?.close();\n\t\t\tawait this.connection?.close();\n\t\t} catch (_error) {\n\t\t\t// Ignore errors during close\n\t\t} finally {\n\t\t\tthis.cleanup();\n\t\t}\n\t}\n\n\tisConnected(): boolean {\n\t\treturn !!this.channel;\n\t}\n\n\tprivate cleanup(): void {\n\t\tthis.channel = undefined;\n\t\tthis.connection = undefined;\n\t\tthis.connecting = undefined;\n\t}\n\n\t/**\n\t * Get the underlying channel for publishing/subscribing\n\t */\n\tget amqpChannel(): amqplib.Channel | undefined {\n\t\treturn this.channel;\n\t}\n\n\t/**\n\t * Get the exchange name for this connection\n\t */\n\tget exchangeName(): string {\n\t\treturn this.config.exchange;\n\t}\n\n\t/**\n\t * Get the exchange type for this connection\n\t */\n\tget exchangeType(): string {\n\t\treturn this.config.exchangeType;\n\t}\n}\n"],"mappings":";;;;AAYA,IAAa,qBAAb,MAAa,mBAA8C;CAC1D,AAAS,OAAO,mBAAmB;CACnC,AAAQ;CACR,AAAQ;CACR,AAAQ;CACR,AAAQ;CAKR,YAAYA,QAAkC;AAC7C,OAAK,SAAS;GACb,GAAG;GACH,UAAU,OAAO,YAAY;GAC7B,cAAc,OAAO,gBAAgB;GACrC,SAAS,OAAO,WAAW;GAC3B,iBAAiB;IAChB,SAAS;IACT,GAAG,OAAO;GACV;EACD;CACD;;;;;CAMD,aAAa,qBACZC,kBAC8B;EAC9B,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;GACxC,KAAK;GACL,UAAU,OAAO,IAAI,WAAW,IAAI;GACpC,cAAe,OAAO,IAAI,OAAO,IAAY;GAC7C,SAAS,eAAe,OAAO,SAAS,cAAc,GAAG;EACzD;EAED,MAAM,aAAa,IAAI,mBAAmB;AAC1C,QAAM,WAAW,SAAS;AAC1B,SAAO;CACP;CAED,MAAM,UAAyB;AAC9B,MAAI,KAAK,QAAS;AAGlB,MAAI,KAAK,YAAY;AACpB,SAAM,KAAK;AACX;EACA;AAED,OAAK,aAAa,CAAC,YAAY;AAC9B,OAAI;IACH,MAAM,aAAa,MAAM,QAAQ,QAAQ,KAAK,OAAO,KAAK,EACzD,SAAS,KAAK,OAAO,QACrB,EAAC;IACF,MAAM,UAAU,MAAM,WAAW,eAAe;AAGhD,UAAM,QAAQ,eACb,KAAK,OAAO,UACZ,KAAK,OAAO,cACZ,KAAK,OAAO,gBACZ;AAGD,eAAW,GAAG,SAAS,CAACE,SAAgB;AACvC,UAAK,SAAS;IACd,EAAC;AAEF,eAAW,GAAG,SAAS,MAAM;AAC5B,UAAK,SAAS;IACd,EAAC;AAGF,SAAK,aAAa;AAClB,SAAK,UAAU;GACf,SAAQ,OAAO;AACf,SAAK,SAAS;AACd,UAAM;GACN;EACD,IAAG;AAEJ,QAAM,KAAK;AACX,OAAK;CACL;CAED,MAAM,QAAuB;AAC5B,MAAI;AACH,SAAM,KAAK,SAAS,OAAO;AAC3B,SAAM,KAAK,YAAY,OAAO;EAC9B,SAAQ,QAAQ,CAEhB,UAAS;AACT,QAAK,SAAS;EACd;CACD;CAED,cAAuB;AACtB,WAAS,KAAK;CACd;CAED,AAAQ,UAAgB;AACvB,OAAK;AACL,OAAK;AACL,OAAK;CACL;;;;CAKD,IAAI,cAA2C;AAC9C,SAAO,KAAK;CACZ;;;;CAKD,IAAI,eAAuB;AAC1B,SAAO,KAAK,OAAO;CACnB;;;;CAKD,IAAI,eAAuB;AAC1B,SAAO,KAAK,OAAO;CACnB;AACD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RabbitMQConnection-
|
|
1
|
+
{"version":3,"file":"RabbitMQConnection-DddqvI3I.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\turl: string;\n\texchange?: string;\n\texchangeType?: 'topic' | 'direct' | 'fanout' | 'headers';\n\texchangeOptions?: amqplib.Options.AssertExchange;\n\ttimeout?: number; // Connection timeout in milliseconds (default: 5000)\n}\n\nexport class RabbitMQConnection implements EventConnection {\n\treadonly type = EventPublisherType.RabbitMQ;\n\tprivate connection?: amqplib.ChannelModel;\n\tprivate channel?: amqplib.Channel;\n\tprivate connecting?: Promise<void>;\n\tprivate config: Required<\n\t\tPick<RabbitMQConnectionConfig, 'exchange' | 'exchangeType' | 'timeout'>\n\t> &\n\t\tRabbitMQConnectionConfig;\n\n\tconstructor(config: RabbitMQConnectionConfig) {\n\t\tthis.config = {\n\t\t\t...config,\n\t\t\texchange: config.exchange || 'geekmidas.events',\n\t\t\texchangeType: config.exchangeType || 'topic',\n\t\t\ttimeout: config.timeout ?? 5000,\n\t\t\texchangeOptions: {\n\t\t\t\tdurable: true,\n\t\t\t\t...config.exchangeOptions,\n\t\t\t},\n\t\t};\n\t}\n\n\t/**\n\t * Create a RabbitMQConnection from a connection string\n\t * Format: rabbitmq://user:pass@host:port/vhost?exchange=name&type=topic&timeout=5000\n\t */\n\tstatic async fromConnectionString(\n\t\tconnectionString: string,\n\t): Promise<RabbitMQConnection> {\n\t\tconst url = new URL(connectionString);\n\t\tconst params = url.searchParams;\n\n\t\t// Extract connection URL without query params\n\t\tconst baseUrl = `amqp://${url.username ? `${url.username}:${url.password}@` : ''}${url.host}${url.pathname}`;\n\n\t\tconst timeoutParam = params.get('timeout');\n\t\tconst config: RabbitMQConnectionConfig = {\n\t\t\turl: baseUrl,\n\t\t\texchange: params.get('exchange') || 'geekmidas.events',\n\t\t\texchangeType: (params.get('type') as any) || 'topic',\n\t\t\ttimeout: timeoutParam ? Number.parseInt(timeoutParam, 10) : undefined,\n\t\t};\n\n\t\tconst connection = new RabbitMQConnection(config);\n\t\tawait connection.connect();\n\t\treturn connection;\n\t}\n\n\tasync connect(): Promise<void> {\n\t\tif (this.channel) return;\n\n\t\t// Prevent multiple simultaneous connection attempts\n\t\tif (this.connecting) {\n\t\t\tawait this.connecting;\n\t\t\treturn;\n\t\t}\n\n\t\tthis.connecting = (async () => {\n\t\t\ttry {\n\t\t\t\tconst connection = await amqplib.connect(this.config.url, {\n\t\t\t\t\ttimeout: this.config.timeout,\n\t\t\t\t});\n\t\t\t\tconst channel = await connection.createChannel();\n\n\t\t\t\t// Assert the exchange exists\n\t\t\t\tawait channel.assertExchange(\n\t\t\t\t\tthis.config.exchange!,\n\t\t\t\t\tthis.config.exchangeType!,\n\t\t\t\t\tthis.config.exchangeOptions,\n\t\t\t\t);\n\n\t\t\t\t// Handle connection errors\n\t\t\t\tconnection.on('error', (_err: Error) => {\n\t\t\t\t\tthis.cleanup();\n\t\t\t\t});\n\n\t\t\t\tconnection.on('close', () => {\n\t\t\t\t\tthis.cleanup();\n\t\t\t\t});\n\n\t\t\t\t// Only set after successful setup\n\t\t\t\tthis.connection = connection;\n\t\t\t\tthis.channel = channel;\n\t\t\t} catch (error) {\n\t\t\t\tthis.cleanup();\n\t\t\t\tthrow error;\n\t\t\t}\n\t\t})();\n\n\t\tawait this.connecting;\n\t\tthis.connecting = undefined;\n\t}\n\n\tasync close(): Promise<void> {\n\t\ttry {\n\t\t\tawait this.channel?.close();\n\t\t\tawait this.connection?.close();\n\t\t} catch (_error) {\n\t\t\t// Ignore errors during close\n\t\t} finally {\n\t\t\tthis.cleanup();\n\t\t}\n\t}\n\n\tisConnected(): boolean {\n\t\treturn !!this.channel;\n\t}\n\n\tprivate cleanup(): void {\n\t\tthis.channel = undefined;\n\t\tthis.connection = undefined;\n\t\tthis.connecting = undefined;\n\t}\n\n\t/**\n\t * Get the underlying channel for publishing/subscribing\n\t */\n\tget amqpChannel(): amqplib.Channel | undefined {\n\t\treturn this.channel;\n\t}\n\n\t/**\n\t * Get the exchange name for this connection\n\t */\n\tget exchangeName(): string {\n\t\treturn this.config.exchange;\n\t}\n\n\t/**\n\t * Get the exchange type for this connection\n\t */\n\tget exchangeType(): string {\n\t\treturn this.config.exchangeType;\n\t}\n}\n"],"mappings":";;;;;AAYA,IAAa,qBAAb,MAAa,mBAA8C;CAC1D,AAAS,OAAOA,iCAAmB;CACnC,AAAQ;CACR,AAAQ;CACR,AAAQ;CACR,AAAQ;CAKR,YAAYC,QAAkC;AAC7C,OAAK,SAAS;GACb,GAAG;GACH,UAAU,OAAO,YAAY;GAC7B,cAAc,OAAO,gBAAgB;GACrC,SAAS,OAAO,WAAW;GAC3B,iBAAiB;IAChB,SAAS;IACT,GAAG,OAAO;GACV;EACD;CACD;;;;;CAMD,aAAa,qBACZC,kBAC8B;EAC9B,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;GACxC,KAAK;GACL,UAAU,OAAO,IAAI,WAAW,IAAI;GACpC,cAAe,OAAO,IAAI,OAAO,IAAY;GAC7C,SAAS,eAAe,OAAO,SAAS,cAAc,GAAG;EACzD;EAED,MAAM,aAAa,IAAI,mBAAmB;AAC1C,QAAM,WAAW,SAAS;AAC1B,SAAO;CACP;CAED,MAAM,UAAyB;AAC9B,MAAI,KAAK,QAAS;AAGlB,MAAI,KAAK,YAAY;AACpB,SAAM,KAAK;AACX;EACA;AAED,OAAK,aAAa,CAAC,YAAY;AAC9B,OAAI;IACH,MAAM,aAAa,MAAM,gBAAQ,QAAQ,KAAK,OAAO,KAAK,EACzD,SAAS,KAAK,OAAO,QACrB,EAAC;IACF,MAAM,UAAU,MAAM,WAAW,eAAe;AAGhD,UAAM,QAAQ,eACb,KAAK,OAAO,UACZ,KAAK,OAAO,cACZ,KAAK,OAAO,gBACZ;AAGD,eAAW,GAAG,SAAS,CAACE,SAAgB;AACvC,UAAK,SAAS;IACd,EAAC;AAEF,eAAW,GAAG,SAAS,MAAM;AAC5B,UAAK,SAAS;IACd,EAAC;AAGF,SAAK,aAAa;AAClB,SAAK,UAAU;GACf,SAAQ,OAAO;AACf,SAAK,SAAS;AACd,UAAM;GACN;EACD,IAAG;AAEJ,QAAM,KAAK;AACX,OAAK;CACL;CAED,MAAM,QAAuB;AAC5B,MAAI;AACH,SAAM,KAAK,SAAS,OAAO;AAC3B,SAAM,KAAK,YAAY,OAAO;EAC9B,SAAQ,QAAQ,CAEhB,UAAS;AACT,QAAK,SAAS;EACd;CACD;CAED,cAAuB;AACtB,WAAS,KAAK;CACd;CAED,AAAQ,UAAgB;AACvB,OAAK;AACL,OAAK;AACL,OAAK;CACL;;;;CAKD,IAAI,cAA2C;AAC9C,SAAO,KAAK;CACZ;;;;CAKD,IAAI,eAAuB;AAC1B,SAAO,KAAK,OAAO;CACnB;;;;CAKD,IAAI,eAAuB;AAC1B,SAAO,KAAK,OAAO;CACnB;AACD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RabbitMQPublisher
|
|
1
|
+
{"version":3,"file":"RabbitMQPublisher-BfTRUnpy.cjs","names":["connection: RabbitMQConnection","options: RabbitMQPublisherOptions","connectionString: string","messages: TMessage[]"],"sources":["../src/rabbitmq/RabbitMQPublisher.ts"],"sourcesContent":["import type amqplib from 'amqplib';\nimport type { EventPublisher, PublishableMessage } from '../types';\nimport type { RabbitMQConnection } from './RabbitMQConnection';\n\nexport interface RabbitMQPublisherOptions {\n\tpublishOptions?: amqplib.Options.Publish;\n}\n\nexport class RabbitMQPublisher<TMessage extends PublishableMessage<string, any>>\n\timplements EventPublisher<TMessage>\n{\n\tconstructor(\n\t\tprivate connection: RabbitMQConnection,\n\t\tprivate options: RabbitMQPublisherOptions = {},\n\t) {}\n\n\t/**\n\t * Create a RabbitMQPublisher from a connection string\n\t * Format: rabbitmq://user:pass@host:port/vhost?exchange=name&type=topic&timeout=5000\n\t */\n\tstatic async fromConnectionString<\n\t\tTMessage extends PublishableMessage<string, any>,\n\t>(connectionString: string): Promise<RabbitMQPublisher<TMessage>> {\n\t\tconst { RabbitMQConnection } = await import('./RabbitMQConnection');\n\t\tconst connection =\n\t\t\tawait RabbitMQConnection.fromConnectionString(connectionString);\n\t\treturn new RabbitMQPublisher<TMessage>(connection);\n\t}\n\n\tasync publish(messages: TMessage[]): Promise<void> {\n\t\tif (!this.connection.isConnected()) {\n\t\t\tawait this.connection.connect();\n\t\t}\n\n\t\tconst channel = this.connection.amqpChannel;\n\t\tif (!channel) {\n\t\t\tthrow new Error('Channel not initialized');\n\t\t}\n\n\t\tconst exchange = this.connection.exchangeName;\n\n\t\tfor (const message of messages) {\n\t\t\tconst content = Buffer.from(JSON.stringify(message.payload));\n\n\t\t\t// Use message type as routing key for topic exchanges\n\t\t\tconst routingKey = message.type;\n\n\t\t\tconst published = channel.publish(exchange, routingKey, content, {\n\t\t\t\tcontentType: 'application/json',\n\t\t\t\ttimestamp: Date.now(),\n\t\t\t\ttype: message.type,\n\t\t\t\tpersistent: true,\n\t\t\t\t...this.options.publishOptions,\n\t\t\t});\n\n\t\t\t// Handle backpressure\n\t\t\tif (!published) {\n\t\t\t\tawait new Promise((resolve) => channel.once('drain', resolve));\n\t\t\t}\n\t\t}\n\t}\n\n\tasync close(): Promise<void> {\n\t\t// Publisher doesn't own the connection\n\t\t// Connection should be closed by whoever created it\n\t}\n}\n"],"mappings":";;AAQA,IAAa,oBAAb,MAAa,kBAEb;CACC,YACSA,YACAC,UAAoC,CAAE,GAC7C;EAFO;EACA;CACL;;;;;CAMJ,aAAa,qBAEXC,kBAAgE;EACjE,MAAM,EAAE,oBAAoB,GAAG,2CAAM;EACrC,MAAM,aACL,MAAM,mBAAmB,qBAAqB,iBAAiB;AAChE,SAAO,IAAI,kBAA4B;CACvC;CAED,MAAM,QAAQC,UAAqC;AAClD,OAAK,KAAK,WAAW,aAAa,CACjC,OAAM,KAAK,WAAW,SAAS;EAGhC,MAAM,UAAU,KAAK,WAAW;AAChC,OAAK,QACJ,OAAM,IAAI,MAAM;EAGjB,MAAM,WAAW,KAAK,WAAW;AAEjC,OAAK,MAAM,WAAW,UAAU;GAC/B,MAAM,UAAU,OAAO,KAAK,KAAK,UAAU,QAAQ,QAAQ,CAAC;GAG5D,MAAM,aAAa,QAAQ;GAE3B,MAAM,YAAY,QAAQ,QAAQ,UAAU,YAAY,SAAS;IAChE,aAAa;IACb,WAAW,KAAK,KAAK;IACrB,MAAM,QAAQ;IACd,YAAY;IACZ,GAAG,KAAK,QAAQ;GAChB,EAAC;AAGF,QAAK,UACJ,OAAM,IAAI,QAAQ,CAAC,YAAY,QAAQ,KAAK,SAAS,QAAQ;EAE9D;CACD;CAED,MAAM,QAAuB,CAG5B;AACD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RabbitMQPublisher-
|
|
1
|
+
{"version":3,"file":"RabbitMQPublisher-Cxm1zSkD.mjs","names":["connection: RabbitMQConnection","options: RabbitMQPublisherOptions","connectionString: string","messages: TMessage[]"],"sources":["../src/rabbitmq/RabbitMQPublisher.ts"],"sourcesContent":["import type amqplib from 'amqplib';\nimport type { EventPublisher, PublishableMessage } from '../types';\nimport type { RabbitMQConnection } from './RabbitMQConnection';\n\nexport interface RabbitMQPublisherOptions {\n\tpublishOptions?: amqplib.Options.Publish;\n}\n\nexport class RabbitMQPublisher<TMessage extends PublishableMessage<string, any>>\n\timplements EventPublisher<TMessage>\n{\n\tconstructor(\n\t\tprivate connection: RabbitMQConnection,\n\t\tprivate options: RabbitMQPublisherOptions = {},\n\t) {}\n\n\t/**\n\t * Create a RabbitMQPublisher from a connection string\n\t * Format: rabbitmq://user:pass@host:port/vhost?exchange=name&type=topic&timeout=5000\n\t */\n\tstatic async fromConnectionString<\n\t\tTMessage extends PublishableMessage<string, any>,\n\t>(connectionString: string): Promise<RabbitMQPublisher<TMessage>> {\n\t\tconst { RabbitMQConnection } = await import('./RabbitMQConnection');\n\t\tconst connection =\n\t\t\tawait RabbitMQConnection.fromConnectionString(connectionString);\n\t\treturn new RabbitMQPublisher<TMessage>(connection);\n\t}\n\n\tasync publish(messages: TMessage[]): Promise<void> {\n\t\tif (!this.connection.isConnected()) {\n\t\t\tawait this.connection.connect();\n\t\t}\n\n\t\tconst channel = this.connection.amqpChannel;\n\t\tif (!channel) {\n\t\t\tthrow new Error('Channel not initialized');\n\t\t}\n\n\t\tconst exchange = this.connection.exchangeName;\n\n\t\tfor (const message of messages) {\n\t\t\tconst content = Buffer.from(JSON.stringify(message.payload));\n\n\t\t\t// Use message type as routing key for topic exchanges\n\t\t\tconst routingKey = message.type;\n\n\t\t\tconst published = channel.publish(exchange, routingKey, content, {\n\t\t\t\tcontentType: 'application/json',\n\t\t\t\ttimestamp: Date.now(),\n\t\t\t\ttype: message.type,\n\t\t\t\tpersistent: true,\n\t\t\t\t...this.options.publishOptions,\n\t\t\t});\n\n\t\t\t// Handle backpressure\n\t\t\tif (!published) {\n\t\t\t\tawait new Promise((resolve) => channel.once('drain', resolve));\n\t\t\t}\n\t\t}\n\t}\n\n\tasync close(): Promise<void> {\n\t\t// Publisher doesn't own the connection\n\t\t// Connection should be closed by whoever created it\n\t}\n}\n"],"mappings":";AAQA,IAAa,oBAAb,MAAa,kBAEb;CACC,YACSA,YACAC,UAAoC,CAAE,GAC7C;EAFO;EACA;CACL;;;;;CAMJ,aAAa,qBAEXC,kBAAgE;EACjE,MAAM,EAAE,oBAAoB,GAAG,MAAM,OAAO;EAC5C,MAAM,aACL,MAAM,mBAAmB,qBAAqB,iBAAiB;AAChE,SAAO,IAAI,kBAA4B;CACvC;CAED,MAAM,QAAQC,UAAqC;AAClD,OAAK,KAAK,WAAW,aAAa,CACjC,OAAM,KAAK,WAAW,SAAS;EAGhC,MAAM,UAAU,KAAK,WAAW;AAChC,OAAK,QACJ,OAAM,IAAI,MAAM;EAGjB,MAAM,WAAW,KAAK,WAAW;AAEjC,OAAK,MAAM,WAAW,UAAU;GAC/B,MAAM,UAAU,OAAO,KAAK,KAAK,UAAU,QAAQ,QAAQ,CAAC;GAG5D,MAAM,aAAa,QAAQ;GAE3B,MAAM,YAAY,QAAQ,QAAQ,UAAU,YAAY,SAAS;IAChE,aAAa;IACb,WAAW,KAAK,KAAK;IACrB,MAAM,QAAQ;IACd,YAAY;IACZ,GAAG,KAAK,QAAQ;GAChB,EAAC;AAGF,QAAK,UACJ,OAAM,IAAI,QAAQ,CAAC,YAAY,QAAQ,KAAK,SAAS,QAAQ;EAE9D;CACD;CAED,MAAM,QAAuB,CAG5B;AACD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RabbitMQSubscriber-
|
|
1
|
+
{"version":3,"file":"RabbitMQSubscriber-CWDdmt1M.cjs","names":["connection: RabbitMQConnection","options: RabbitMQSubscriberOptions","connectionString: string","messages: TMessage['type'][]","listener: (payload: TMessage) => Promise<void>","queueOptions: amqplib.Options.AssertQueue","fullMessage: TMessage"],"sources":["../src/rabbitmq/RabbitMQSubscriber.ts"],"sourcesContent":["import type amqplib from 'amqplib';\nimport type { EventSubscriber, PublishableMessage } from '../types';\nimport type { RabbitMQConnection } from './RabbitMQConnection';\n\nexport interface RabbitMQSubscriberOptions {\n\tqueueName?: string; // If not provided, a unique queue will be generated\n\tqueueOptions?: amqplib.Options.AssertQueue;\n\tconsumeOptions?: amqplib.Options.Consume;\n\tprefetch?: number; // Number of messages to prefetch (default: 1)\n}\n\nexport class RabbitMQSubscriber<\n\tTMessage extends PublishableMessage<string, any>,\n> implements EventSubscriber<TMessage>\n{\n\tconstructor(\n\t\tprivate connection: RabbitMQConnection,\n\t\tprivate options: RabbitMQSubscriberOptions = {},\n\t) {}\n\n\t/**\n\t * Create a RabbitMQSubscriber from a connection string\n\t * Format: rabbitmq://user:pass@host:port/vhost?exchange=name&type=topic&queueName=myqueue&prefetch=10\n\t */\n\tstatic async fromConnectionString<\n\t\tTMessage extends PublishableMessage<string, any>,\n\t>(connectionString: string): Promise<RabbitMQSubscriber<TMessage>> {\n\t\tconst url = new URL(connectionString);\n\t\tconst params = url.searchParams;\n\n\t\tconst { RabbitMQConnection } = await import('./RabbitMQConnection');\n\t\tconst connection =\n\t\t\tawait RabbitMQConnection.fromConnectionString(connectionString);\n\n\t\tconst options: RabbitMQSubscriberOptions = {\n\t\t\tqueueName: params.get('queueName') || undefined,\n\t\t\tprefetch: params.get('prefetch')\n\t\t\t\t? Number.parseInt(params.get('prefetch')!, 10)\n\t\t\t\t: undefined,\n\t\t};\n\n\t\treturn new RabbitMQSubscriber<TMessage>(connection, options);\n\t}\n\n\tasync subscribe(\n\t\tmessages: TMessage['type'][],\n\t\tlistener: (payload: TMessage) => Promise<void>,\n\t): Promise<void> {\n\t\tif (!this.connection.isConnected()) {\n\t\t\tawait this.connection.connect();\n\t\t}\n\n\t\tconst channel = this.connection.amqpChannel;\n\t\tif (!channel) {\n\t\t\tthrow new Error('Channel not initialized');\n\t\t}\n\n\t\tconst exchange = this.connection.exchangeName;\n\n\t\t// Set prefetch if specified\n\t\tif (this.options.prefetch) {\n\t\t\tawait channel.prefetch(this.options.prefetch);\n\t\t}\n\n\t\t// Assert queue\n\t\tconst queueName = this.options.queueName || '';\n\t\tconst queueOptions: amqplib.Options.AssertQueue = {\n\t\t\tdurable: true,\n\t\t\t...this.options.queueOptions,\n\t\t};\n\n\t\tconst { queue } = await channel.assertQueue(queueName, queueOptions);\n\n\t\t// Bind queue to exchange for each message type\n\t\tfor (const messageType of messages) {\n\t\t\tawait channel.bindQueue(queue, exchange, messageType);\n\t\t}\n\n\t\t// Consume messages\n\t\tawait channel.consume(\n\t\t\tqueue,\n\t\t\tasync (msg) => {\n\t\t\t\tif (!msg) return;\n\n\t\t\t\ttry {\n\t\t\t\t\t// Parse message payload\n\t\t\t\t\tconst content = msg.content.toString();\n\t\t\t\t\tconst payload = JSON.parse(content);\n\n\t\t\t\t\t// Get message type from properties\n\t\t\t\t\tconst messageType = msg.properties.type;\n\n\t\t\t\t\t// Reconstruct full message\n\t\t\t\t\tconst fullMessage: TMessage = {\n\t\t\t\t\t\ttype: messageType,\n\t\t\t\t\t\tpayload,\n\t\t\t\t\t} as TMessage;\n\n\t\t\t\t\t// Call listener\n\t\t\t\t\tawait listener(fullMessage);\n\n\t\t\t\t\t// Ack message\n\t\t\t\t\tchannel.ack(msg);\n\t\t\t\t} catch (_error) {\n\t\t\t\t\tchannel.nack(msg, false, true);\n\t\t\t\t}\n\t\t\t},\n\t\t\tthis.options.consumeOptions,\n\t\t);\n\t}\n}\n"],"mappings":";;AAWA,IAAa,qBAAb,MAAa,mBAGb;CACC,YACSA,YACAC,UAAqC,CAAE,GAC9C;EAFO;EACA;CACL;;;;;CAMJ,aAAa,qBAEXC,kBAAiE;EAClE,MAAM,MAAM,IAAI,IAAI;EACpB,MAAM,SAAS,IAAI;EAEnB,MAAM,EAAE,oBAAoB,GAAG,2CAAM;EACrC,MAAM,aACL,MAAM,mBAAmB,qBAAqB,iBAAiB;EAEhE,MAAMD,UAAqC;GAC1C,WAAW,OAAO,IAAI,YAAY;GAClC,UAAU,OAAO,IAAI,WAAW,GAC7B,OAAO,SAAS,OAAO,IAAI,WAAW,EAAG,GAAG;EAE/C;AAED,SAAO,IAAI,mBAA6B,YAAY;CACpD;CAED,MAAM,UACLE,UACAC,UACgB;AAChB,OAAK,KAAK,WAAW,aAAa,CACjC,OAAM,KAAK,WAAW,SAAS;EAGhC,MAAM,UAAU,KAAK,WAAW;AAChC,OAAK,QACJ,OAAM,IAAI,MAAM;EAGjB,MAAM,WAAW,KAAK,WAAW;AAGjC,MAAI,KAAK,QAAQ,SAChB,OAAM,QAAQ,SAAS,KAAK,QAAQ,SAAS;EAI9C,MAAM,YAAY,KAAK,QAAQ,aAAa;EAC5C,MAAMC,eAA4C;GACjD,SAAS;GACT,GAAG,KAAK,QAAQ;EAChB;EAED,MAAM,EAAE,OAAO,GAAG,MAAM,QAAQ,YAAY,WAAW,aAAa;AAGpE,OAAK,MAAM,eAAe,SACzB,OAAM,QAAQ,UAAU,OAAO,UAAU,YAAY;AAItD,QAAM,QAAQ,QACb,OACA,OAAO,QAAQ;AACd,QAAK,IAAK;AAEV,OAAI;IAEH,MAAM,UAAU,IAAI,QAAQ,UAAU;IACtC,MAAM,UAAU,KAAK,MAAM,QAAQ;IAGnC,MAAM,cAAc,IAAI,WAAW;IAGnC,MAAMC,cAAwB;KAC7B,MAAM;KACN;IACA;AAGD,UAAM,SAAS,YAAY;AAG3B,YAAQ,IAAI,IAAI;GAChB,SAAQ,QAAQ;AAChB,YAAQ,KAAK,KAAK,OAAO,KAAK;GAC9B;EACD,GACD,KAAK,QAAQ,eACb;CACD;AACD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RabbitMQSubscriber-
|
|
1
|
+
{"version":3,"file":"RabbitMQSubscriber-fP8G9OlK.mjs","names":["connection: RabbitMQConnection","options: RabbitMQSubscriberOptions","connectionString: string","messages: TMessage['type'][]","listener: (payload: TMessage) => Promise<void>","queueOptions: amqplib.Options.AssertQueue","fullMessage: TMessage"],"sources":["../src/rabbitmq/RabbitMQSubscriber.ts"],"sourcesContent":["import type amqplib from 'amqplib';\nimport type { EventSubscriber, PublishableMessage } from '../types';\nimport type { RabbitMQConnection } from './RabbitMQConnection';\n\nexport interface RabbitMQSubscriberOptions {\n\tqueueName?: string; // If not provided, a unique queue will be generated\n\tqueueOptions?: amqplib.Options.AssertQueue;\n\tconsumeOptions?: amqplib.Options.Consume;\n\tprefetch?: number; // Number of messages to prefetch (default: 1)\n}\n\nexport class RabbitMQSubscriber<\n\tTMessage extends PublishableMessage<string, any>,\n> implements EventSubscriber<TMessage>\n{\n\tconstructor(\n\t\tprivate connection: RabbitMQConnection,\n\t\tprivate options: RabbitMQSubscriberOptions = {},\n\t) {}\n\n\t/**\n\t * Create a RabbitMQSubscriber from a connection string\n\t * Format: rabbitmq://user:pass@host:port/vhost?exchange=name&type=topic&queueName=myqueue&prefetch=10\n\t */\n\tstatic async fromConnectionString<\n\t\tTMessage extends PublishableMessage<string, any>,\n\t>(connectionString: string): Promise<RabbitMQSubscriber<TMessage>> {\n\t\tconst url = new URL(connectionString);\n\t\tconst params = url.searchParams;\n\n\t\tconst { RabbitMQConnection } = await import('./RabbitMQConnection');\n\t\tconst connection =\n\t\t\tawait RabbitMQConnection.fromConnectionString(connectionString);\n\n\t\tconst options: RabbitMQSubscriberOptions = {\n\t\t\tqueueName: params.get('queueName') || undefined,\n\t\t\tprefetch: params.get('prefetch')\n\t\t\t\t? Number.parseInt(params.get('prefetch')!, 10)\n\t\t\t\t: undefined,\n\t\t};\n\n\t\treturn new RabbitMQSubscriber<TMessage>(connection, options);\n\t}\n\n\tasync subscribe(\n\t\tmessages: TMessage['type'][],\n\t\tlistener: (payload: TMessage) => Promise<void>,\n\t): Promise<void> {\n\t\tif (!this.connection.isConnected()) {\n\t\t\tawait this.connection.connect();\n\t\t}\n\n\t\tconst channel = this.connection.amqpChannel;\n\t\tif (!channel) {\n\t\t\tthrow new Error('Channel not initialized');\n\t\t}\n\n\t\tconst exchange = this.connection.exchangeName;\n\n\t\t// Set prefetch if specified\n\t\tif (this.options.prefetch) {\n\t\t\tawait channel.prefetch(this.options.prefetch);\n\t\t}\n\n\t\t// Assert queue\n\t\tconst queueName = this.options.queueName || '';\n\t\tconst queueOptions: amqplib.Options.AssertQueue = {\n\t\t\tdurable: true,\n\t\t\t...this.options.queueOptions,\n\t\t};\n\n\t\tconst { queue } = await channel.assertQueue(queueName, queueOptions);\n\n\t\t// Bind queue to exchange for each message type\n\t\tfor (const messageType of messages) {\n\t\t\tawait channel.bindQueue(queue, exchange, messageType);\n\t\t}\n\n\t\t// Consume messages\n\t\tawait channel.consume(\n\t\t\tqueue,\n\t\t\tasync (msg) => {\n\t\t\t\tif (!msg) return;\n\n\t\t\t\ttry {\n\t\t\t\t\t// Parse message payload\n\t\t\t\t\tconst content = msg.content.toString();\n\t\t\t\t\tconst payload = JSON.parse(content);\n\n\t\t\t\t\t// Get message type from properties\n\t\t\t\t\tconst messageType = msg.properties.type;\n\n\t\t\t\t\t// Reconstruct full message\n\t\t\t\t\tconst fullMessage: TMessage = {\n\t\t\t\t\t\ttype: messageType,\n\t\t\t\t\t\tpayload,\n\t\t\t\t\t} as TMessage;\n\n\t\t\t\t\t// Call listener\n\t\t\t\t\tawait listener(fullMessage);\n\n\t\t\t\t\t// Ack message\n\t\t\t\t\tchannel.ack(msg);\n\t\t\t\t} catch (_error) {\n\t\t\t\t\tchannel.nack(msg, false, true);\n\t\t\t\t}\n\t\t\t},\n\t\t\tthis.options.consumeOptions,\n\t\t);\n\t}\n}\n"],"mappings":";AAWA,IAAa,qBAAb,MAAa,mBAGb;CACC,YACSA,YACAC,UAAqC,CAAE,GAC9C;EAFO;EACA;CACL;;;;;CAMJ,aAAa,qBAEXC,kBAAiE;EAClE,MAAM,MAAM,IAAI,IAAI;EACpB,MAAM,SAAS,IAAI;EAEnB,MAAM,EAAE,oBAAoB,GAAG,MAAM,OAAO;EAC5C,MAAM,aACL,MAAM,mBAAmB,qBAAqB,iBAAiB;EAEhE,MAAMD,UAAqC;GAC1C,WAAW,OAAO,IAAI,YAAY;GAClC,UAAU,OAAO,IAAI,WAAW,GAC7B,OAAO,SAAS,OAAO,IAAI,WAAW,EAAG,GAAG;EAE/C;AAED,SAAO,IAAI,mBAA6B,YAAY;CACpD;CAED,MAAM,UACLE,UACAC,UACgB;AAChB,OAAK,KAAK,WAAW,aAAa,CACjC,OAAM,KAAK,WAAW,SAAS;EAGhC,MAAM,UAAU,KAAK,WAAW;AAChC,OAAK,QACJ,OAAM,IAAI,MAAM;EAGjB,MAAM,WAAW,KAAK,WAAW;AAGjC,MAAI,KAAK,QAAQ,SAChB,OAAM,QAAQ,SAAS,KAAK,QAAQ,SAAS;EAI9C,MAAM,YAAY,KAAK,QAAQ,aAAa;EAC5C,MAAMC,eAA4C;GACjD,SAAS;GACT,GAAG,KAAK,QAAQ;EAChB;EAED,MAAM,EAAE,OAAO,GAAG,MAAM,QAAQ,YAAY,WAAW,aAAa;AAGpE,OAAK,MAAM,eAAe,SACzB,OAAM,QAAQ,UAAU,OAAO,UAAU,YAAY;AAItD,QAAM,QAAQ,QACb,OACA,OAAO,QAAQ;AACd,QAAK,IAAK;AAEV,OAAI;IAEH,MAAM,UAAU,IAAI,QAAQ,UAAU;IACtC,MAAM,UAAU,KAAK,MAAM,QAAQ;IAGnC,MAAM,cAAc,IAAI,WAAW;IAGnC,MAAMC,cAAwB;KAC7B,MAAM;KACN;IACA;AAGD,UAAM,SAAS,YAAY;AAG3B,YAAQ,IAAI,IAAI;GAChB,SAAQ,QAAQ;AAChB,YAAQ,KAAK,KAAK,OAAO,KAAK;GAC9B;EACD,GACD,KAAK,QAAQ,eACb;CACD;AACD"}
|
package/dist/basic/index.cjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
require('../types-Byv8N9ma.cjs');
|
|
2
|
-
const require_BasicConnection = require('../BasicConnection-
|
|
3
|
-
const require_BasicPublisher = require('../BasicPublisher-
|
|
4
|
-
const require_BasicSubscriber = require('../BasicSubscriber-
|
|
2
|
+
const require_BasicConnection = require('../BasicConnection-CxfNEvlb.cjs');
|
|
3
|
+
const require_BasicPublisher = require('../BasicPublisher-CXAVKxgq.cjs');
|
|
4
|
+
const require_BasicSubscriber = require('../BasicSubscriber-mVJRMXhZ.cjs');
|
|
5
5
|
|
|
6
6
|
exports.BasicConnection = require_BasicConnection.BasicConnection;
|
|
7
7
|
exports.BasicPublisher = require_BasicPublisher.BasicPublisher;
|
package/dist/basic/index.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import "../types-BrdcSEnd.mjs";
|
|
2
|
-
import { BasicConnection } from "../BasicConnection-
|
|
3
|
-
import { BasicPublisher } from "../BasicPublisher-
|
|
4
|
-
import { BasicSubscriber } from "../BasicSubscriber-
|
|
2
|
+
import { BasicConnection } from "../BasicConnection-hl-Ogz3a.mjs";
|
|
3
|
+
import { BasicPublisher } from "../BasicPublisher-DogbeHAH.mjs";
|
|
4
|
+
import { BasicSubscriber } from "../BasicSubscriber-BJSZN22M.mjs";
|
|
5
5
|
|
|
6
6
|
export { BasicConnection, BasicPublisher, BasicSubscriber };
|
package/dist/pgboss/index.cjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
require('../types-Byv8N9ma.cjs');
|
|
2
|
-
const require_PgBossConnection = require('../PgBossConnection-
|
|
3
|
-
const require_PgBossPublisher = require('../PgBossPublisher-
|
|
4
|
-
const require_PgBossSubscriber = require('../PgBossSubscriber-
|
|
2
|
+
const require_PgBossConnection = require('../PgBossConnection-B71ssr72.cjs');
|
|
3
|
+
const require_PgBossPublisher = require('../PgBossPublisher-FTdYh58W.cjs');
|
|
4
|
+
const require_PgBossSubscriber = require('../PgBossSubscriber-BubVfuWm.cjs');
|
|
5
5
|
|
|
6
6
|
exports.PgBossConnection = require_PgBossConnection.PgBossConnection;
|
|
7
7
|
exports.PgBossPublisher = require_PgBossPublisher.PgBossPublisher;
|
package/dist/pgboss/index.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import "../types-BrdcSEnd.mjs";
|
|
2
|
-
import { PgBossConnection } from "../PgBossConnection-
|
|
3
|
-
import { PgBossPublisher } from "../PgBossPublisher-
|
|
4
|
-
import { PgBossSubscriber } from "../PgBossSubscriber-
|
|
2
|
+
import { PgBossConnection } from "../PgBossConnection-Bj_Wo1lQ.mjs";
|
|
3
|
+
import { PgBossPublisher } from "../PgBossPublisher-Bwo7qSoH.mjs";
|
|
4
|
+
import { PgBossSubscriber } from "../PgBossSubscriber-DopATe80.mjs";
|
|
5
5
|
|
|
6
6
|
export { PgBossConnection, PgBossPublisher, PgBossSubscriber };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
require('../types-Byv8N9ma.cjs');
|
|
2
|
-
const require_RabbitMQConnection = require('../RabbitMQConnection-
|
|
2
|
+
const require_RabbitMQConnection = require('../RabbitMQConnection-DddqvI3I.cjs');
|
|
3
3
|
|
|
4
4
|
exports.RabbitMQConnection = require_RabbitMQConnection.RabbitMQConnection;
|
package/dist/rabbitmq/index.cjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
require('../types-Byv8N9ma.cjs');
|
|
2
|
-
const require_RabbitMQConnection = require('../RabbitMQConnection-
|
|
3
|
-
const require_RabbitMQPublisher = require('../RabbitMQPublisher
|
|
4
|
-
const require_RabbitMQSubscriber = require('../RabbitMQSubscriber-
|
|
2
|
+
const require_RabbitMQConnection = require('../RabbitMQConnection-DddqvI3I.cjs');
|
|
3
|
+
const require_RabbitMQPublisher = require('../RabbitMQPublisher-BfTRUnpy.cjs');
|
|
4
|
+
const require_RabbitMQSubscriber = require('../RabbitMQSubscriber-CWDdmt1M.cjs');
|
|
5
5
|
|
|
6
6
|
exports.RabbitMQConnection = require_RabbitMQConnection.RabbitMQConnection;
|
|
7
7
|
exports.RabbitMQPublisher = require_RabbitMQPublisher.RabbitMQPublisher;
|
package/dist/rabbitmq/index.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import "../types-BrdcSEnd.mjs";
|
|
2
|
-
import { RabbitMQConnection } from "../RabbitMQConnection-
|
|
3
|
-
import { RabbitMQPublisher } from "../RabbitMQPublisher-
|
|
4
|
-
import { RabbitMQSubscriber } from "../RabbitMQSubscriber-
|
|
2
|
+
import { RabbitMQConnection } from "../RabbitMQConnection-Cg7mp8u-.mjs";
|
|
3
|
+
import { RabbitMQPublisher } from "../RabbitMQPublisher-Cxm1zSkD.mjs";
|
|
4
|
+
import { RabbitMQSubscriber } from "../RabbitMQSubscriber-fP8G9OlK.mjs";
|
|
5
5
|
|
|
6
6
|
export { RabbitMQConnection, RabbitMQPublisher, RabbitMQSubscriber };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@geekmidas/events",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.6",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": {
|
|
@@ -80,7 +80,7 @@
|
|
|
80
80
|
"@aws-sdk/client-sqs": "~3.908.0",
|
|
81
81
|
"@aws-sdk/client-sns": "~3.908.0",
|
|
82
82
|
"pg-boss": ">=12.0.0",
|
|
83
|
-
"@geekmidas/schema": "^1.0.
|
|
83
|
+
"@geekmidas/schema": "^1.0.4"
|
|
84
84
|
},
|
|
85
85
|
"peerDependenciesMeta": {
|
|
86
86
|
"@geekmidas/schema": {
|
|
@@ -105,6 +105,6 @@
|
|
|
105
105
|
"@types/pg": "~8.15.6",
|
|
106
106
|
"pg": "~8.20.0",
|
|
107
107
|
"pg-boss": "~12.18.1",
|
|
108
|
-
"@geekmidas/schema": "^1.0.
|
|
108
|
+
"@geekmidas/schema": "^1.0.4"
|
|
109
109
|
}
|
|
110
110
|
}
|
package/tsdown.config.ts
CHANGED