@daiso-tech/core 0.26.1 → 0.28.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +13 -3
- package/dist/async/utilities/delay/delay.d.ts +1 -12
- package/dist/async/utilities/delay/delay.js +1 -12
- package/dist/async/utilities/delay/delay.js.map +1 -1
- package/dist/async/utilities/lazy-promise/lazy-promise.d.ts +143 -71
- package/dist/async/utilities/lazy-promise/lazy-promise.js +223 -142
- package/dist/async/utilities/lazy-promise/lazy-promise.js.map +1 -1
- package/dist/async/utilities/retry/retry-or-fail.d.ts +2 -0
- package/dist/async/utilities/retry/retry-or-fail.js.map +1 -1
- package/dist/cache/contracts/_module-exports.d.ts +1 -0
- package/dist/cache/contracts/_module-exports.js +1 -0
- package/dist/cache/contracts/_module-exports.js.map +1 -1
- package/dist/cache/contracts/cache-adapter.contract.d.ts +19 -21
- package/dist/cache/contracts/cache-adapter.contract.js +1 -4
- package/dist/cache/contracts/cache-adapter.contract.js.map +1 -1
- package/dist/cache/contracts/cache-factory.contract.d.ts +1 -1
- package/dist/cache/contracts/cache.contract.d.ts +144 -96
- package/dist/cache/contracts/cache.contract.js +1 -2
- package/dist/cache/contracts/cache.contract.js.map +1 -1
- package/dist/cache/contracts/cache.errors.js +2 -5
- package/dist/cache/contracts/cache.errors.js.map +1 -1
- package/dist/cache/contracts/cache.events.d.ts +10 -10
- package/dist/cache/contracts/cache.events.js +2 -5
- package/dist/cache/contracts/cache.events.js.map +1 -1
- package/dist/cache/contracts/database-cache-adapter.contract.d.ts +89 -0
- package/dist/cache/contracts/database-cache-adapter.contract.js +5 -0
- package/dist/cache/contracts/database-cache-adapter.contract.js.map +1 -0
- package/dist/cache/implementations/adapters/{kysely-sqlite-cache-adapter → kysely-cache-adapter}/_module.d.ts +1 -1
- package/dist/cache/implementations/adapters/kysely-cache-adapter/_module.js +2 -0
- package/dist/cache/implementations/adapters/kysely-cache-adapter/_module.js.map +1 -0
- package/dist/cache/implementations/adapters/kysely-cache-adapter/kysely-cache-adapter.d.ts +73 -0
- package/dist/cache/implementations/adapters/kysely-cache-adapter/kysely-cache-adapter.js +224 -0
- package/dist/cache/implementations/adapters/kysely-cache-adapter/kysely-cache-adapter.js.map +1 -0
- package/dist/cache/implementations/adapters/libsql-cache-adapter/libsql-cache-adapter.d.ts +29 -39
- package/dist/cache/implementations/adapters/libsql-cache-adapter/libsql-cache-adapter.js +45 -54
- package/dist/cache/implementations/adapters/libsql-cache-adapter/libsql-cache-adapter.js.map +1 -1
- package/dist/cache/implementations/adapters/memory-cache-adapter/memory-cache-adapter.d.ts +17 -33
- package/dist/cache/implementations/adapters/memory-cache-adapter/memory-cache-adapter.js +43 -52
- package/dist/cache/implementations/adapters/memory-cache-adapter/memory-cache-adapter.js.map +1 -1
- package/dist/cache/implementations/adapters/mongodb-cache-adapter/mongodb-cache-adapter-serde.d.ts +13 -0
- package/dist/cache/implementations/adapters/mongodb-cache-adapter/mongodb-cache-adapter-serde.js +38 -0
- package/dist/cache/implementations/adapters/mongodb-cache-adapter/mongodb-cache-adapter-serde.js.map +1 -0
- package/dist/cache/implementations/adapters/mongodb-cache-adapter/mongodb-cache-adapter.d.ts +27 -33
- package/dist/cache/implementations/adapters/mongodb-cache-adapter/mongodb-cache-adapter.js +145 -197
- package/dist/cache/implementations/adapters/mongodb-cache-adapter/mongodb-cache-adapter.js.map +1 -1
- package/dist/cache/implementations/adapters/no-op-cache-adapter/no-op-cache-adapter.d.ts +14 -13
- package/dist/cache/implementations/adapters/no-op-cache-adapter/no-op-cache-adapter.js +19 -17
- package/dist/cache/implementations/adapters/no-op-cache-adapter/no-op-cache-adapter.js.map +1 -1
- package/dist/cache/implementations/adapters/redis-cache-adapter/redis-cache-adapter-serde.d.ts +13 -0
- package/dist/cache/implementations/adapters/redis-cache-adapter/redis-cache-adapter-serde.js +39 -0
- package/dist/cache/implementations/adapters/redis-cache-adapter/redis-cache-adapter-serde.js.map +1 -0
- package/dist/cache/implementations/adapters/redis-cache-adapter/redis-cache-adapter.d.ts +16 -22
- package/dist/cache/implementations/adapters/redis-cache-adapter/redis-cache-adapter.js +51 -132
- package/dist/cache/implementations/adapters/redis-cache-adapter/redis-cache-adapter.js.map +1 -1
- package/dist/cache/implementations/adapters/redis-cache-adapter/utilities.d.ts +13 -0
- package/dist/cache/implementations/adapters/redis-cache-adapter/utilities.js +69 -0
- package/dist/cache/implementations/adapters/redis-cache-adapter/utilities.js.map +1 -0
- package/dist/cache/implementations/adapters/sqlite-cache-adapter/sqlite-cache-adapter.d.ts +29 -41
- package/dist/cache/implementations/adapters/sqlite-cache-adapter/sqlite-cache-adapter.js +46 -55
- package/dist/cache/implementations/adapters/sqlite-cache-adapter/sqlite-cache-adapter.js.map +1 -1
- package/dist/cache/implementations/derivables/_module-exports.d.ts +1 -1
- package/dist/cache/implementations/derivables/_module-exports.js +1 -1
- package/dist/cache/implementations/derivables/_module-exports.js.map +1 -1
- package/dist/cache/implementations/derivables/cache/_module.d.ts +1 -0
- package/dist/cache/implementations/derivables/cache/_module.js +1 -0
- package/dist/cache/implementations/derivables/cache/_module.js.map +1 -1
- package/dist/cache/implementations/derivables/cache/cache.d.ts +269 -507
- package/dist/cache/implementations/derivables/cache/cache.js +538 -822
- package/dist/cache/implementations/derivables/cache/cache.js.map +1 -1
- package/dist/cache/implementations/derivables/cache/database-cache-adapter.d.ts +21 -0
- package/dist/cache/implementations/derivables/cache/database-cache-adapter.js +110 -0
- package/dist/cache/implementations/derivables/cache/database-cache-adapter.js.map +1 -0
- package/dist/cache/implementations/derivables/cache/is-database-cache-adapter.d.ts +9 -0
- package/dist/cache/implementations/derivables/cache/is-database-cache-adapter.js +20 -0
- package/dist/cache/implementations/derivables/cache/is-database-cache-adapter.js.map +1 -0
- package/dist/cache/implementations/derivables/cache-factory/cache-factory.d.ts +69 -105
- package/dist/cache/implementations/derivables/cache-factory/cache-factory.js +117 -87
- package/dist/cache/implementations/derivables/cache-factory/cache-factory.js.map +1 -1
- package/dist/cache/implementations/test-utilities/_module-exports.d.ts +1 -0
- package/dist/cache/implementations/test-utilities/_module-exports.js +1 -0
- package/dist/cache/implementations/test-utilities/_module-exports.js.map +1 -1
- package/dist/cache/implementations/test-utilities/cache-adapter.test-suite.d.ts +9 -11
- package/dist/cache/implementations/test-utilities/cache-adapter.test-suite.js +246 -247
- package/dist/cache/implementations/test-utilities/cache-adapter.test-suite.js.map +1 -1
- package/dist/cache/implementations/test-utilities/cache.test-suite.d.ts +16 -30
- package/dist/cache/implementations/test-utilities/cache.test-suite.js +271 -996
- package/dist/cache/implementations/test-utilities/cache.test-suite.js.map +1 -1
- package/dist/cache/implementations/test-utilities/database-cache-dapter.test-suite.d.ts +60 -0
- package/dist/cache/implementations/test-utilities/database-cache-dapter.test-suite.js +698 -0
- package/dist/cache/implementations/test-utilities/database-cache-dapter.test-suite.js.map +1 -0
- package/dist/collection/contracts/async-collection.contract.d.ts +2 -3
- package/dist/collection/contracts/async-collection.contract.js +1 -12
- package/dist/collection/contracts/async-collection.contract.js.map +1 -1
- package/dist/collection/contracts/collection.contract.d.ts +1 -1
- package/dist/collection/contracts/collection.errors.d.ts +1 -1
- package/dist/collection/contracts/collection.errors.js +3 -6
- package/dist/collection/contracts/collection.errors.js.map +1 -1
- package/dist/collection/implementations/_shared.d.ts +4 -4
- package/dist/collection/implementations/_shared.js +6 -9
- package/dist/collection/implementations/_shared.js.map +1 -1
- package/dist/collection/implementations/async-iterable-collection/_shared/async-delay-iterable.js +2 -2
- package/dist/collection/implementations/async-iterable-collection/_shared/async-delay-iterable.js.map +1 -1
- package/dist/collection/implementations/async-iterable-collection/async-iterable-collection.d.ts +5 -21
- package/dist/collection/implementations/async-iterable-collection/async-iterable-collection.js +12 -8
- package/dist/collection/implementations/async-iterable-collection/async-iterable-collection.js.map +1 -1
- package/dist/collection/implementations/iterable-collection/iterable-collection.d.ts +1 -1
- package/dist/collection/implementations/iterable-collection/iterable-collection.js +1 -1
- package/dist/collection/implementations/list-collection/list-collection.d.ts +1 -1
- package/dist/collection/implementations/list-collection/list-collection.js +1 -1
- package/dist/event-bus/contracts/event-bus-adapter.contract.d.ts +0 -9
- package/dist/event-bus/contracts/event-bus.contract.d.ts +5 -5
- package/dist/event-bus/contracts/event-bus.contract.js.map +1 -1
- package/dist/event-bus/contracts/event-bus.errors.js +2 -5
- package/dist/event-bus/contracts/event-bus.errors.js.map +1 -1
- package/dist/event-bus/implementations/adapters/memory-event-bus-adapter/memory-event-bus-adapter.d.ts +9 -29
- package/dist/event-bus/implementations/adapters/memory-event-bus-adapter/memory-event-bus-adapter.js +14 -35
- package/dist/event-bus/implementations/adapters/memory-event-bus-adapter/memory-event-bus-adapter.js.map +1 -1
- package/dist/event-bus/implementations/adapters/no-op-event-bus-adapter/no-op-event-bus-adapter.d.ts +2 -4
- package/dist/event-bus/implementations/adapters/no-op-event-bus-adapter/no-op-event-bus-adapter.js +2 -8
- package/dist/event-bus/implementations/adapters/no-op-event-bus-adapter/no-op-event-bus-adapter.js.map +1 -1
- package/dist/event-bus/implementations/adapters/redis-pub-sub-event-bus-adapter/redis-pub-sub-event-bus-adapter.d.ts +8 -15
- package/dist/event-bus/implementations/adapters/redis-pub-sub-event-bus-adapter/redis-pub-sub-event-bus-adapter.js +15 -34
- package/dist/event-bus/implementations/adapters/redis-pub-sub-event-bus-adapter/redis-pub-sub-event-bus-adapter.js.map +1 -1
- package/dist/event-bus/implementations/derivables/event-bus/event-bus.d.ts +85 -289
- package/dist/event-bus/implementations/derivables/event-bus/event-bus.js +128 -325
- package/dist/event-bus/implementations/derivables/event-bus/event-bus.js.map +1 -1
- package/dist/event-bus/implementations/derivables/event-bus/listener-store.d.ts +13 -0
- package/dist/event-bus/implementations/derivables/event-bus/listener-store.js +42 -0
- package/dist/event-bus/implementations/derivables/event-bus/listener-store.js.map +1 -0
- package/dist/event-bus/implementations/derivables/event-bus-factory/event-bus-factory.d.ts +103 -86
- package/dist/event-bus/implementations/derivables/event-bus-factory/event-bus-factory.js +135 -77
- package/dist/event-bus/implementations/derivables/event-bus-factory/event-bus-factory.js.map +1 -1
- package/dist/event-bus/implementations/test-utilities/event-bus-adapter.test-suite.d.ts +2 -48
- package/dist/event-bus/implementations/test-utilities/event-bus-adapter.test-suite.js +31 -122
- package/dist/event-bus/implementations/test-utilities/event-bus-adapter.test-suite.js.map +1 -1
- package/dist/event-bus/implementations/test-utilities/event-bus.test-suite.d.ts +2 -50
- package/dist/event-bus/implementations/test-utilities/event-bus.test-suite.js +41 -89
- package/dist/event-bus/implementations/test-utilities/event-bus.test-suite.js.map +1 -1
- package/dist/lock/contracts/database-lock-adapter.contract.d.ts +0 -9
- package/dist/lock/contracts/lock-adapter.contract.d.ts +0 -9
- package/dist/lock/contracts/lock-provider.contract.d.ts +20 -6
- package/dist/lock/contracts/lock.contract.d.ts +37 -8
- package/dist/lock/contracts/lock.errors.js +2 -5
- package/dist/lock/contracts/lock.errors.js.map +1 -1
- package/dist/lock/contracts/lock.events.js +2 -5
- package/dist/lock/contracts/lock.events.js.map +1 -1
- package/dist/lock/implementations/adapters/_module-exports.d.ts +1 -0
- package/dist/lock/implementations/adapters/_module-exports.js +1 -0
- package/dist/lock/implementations/adapters/_module-exports.js.map +1 -1
- package/dist/lock/implementations/adapters/kysely-lock-adapter/kysely-lock-adapter.d.ts +0 -5
- package/dist/lock/implementations/adapters/kysely-lock-adapter/kysely-lock-adapter.js +2 -21
- package/dist/lock/implementations/adapters/kysely-lock-adapter/kysely-lock-adapter.js.map +1 -1
- package/dist/lock/implementations/adapters/libsql-lock-adapter/libsql-lock-adapter.d.ts +11 -16
- package/dist/lock/implementations/adapters/libsql-lock-adapter/libsql-lock-adapter.js +11 -20
- package/dist/lock/implementations/adapters/libsql-lock-adapter/libsql-lock-adapter.js.map +1 -1
- package/dist/lock/implementations/adapters/memory-lock-adapter/memory-lock-adapter.d.ts +7 -26
- package/dist/lock/implementations/adapters/memory-lock-adapter/memory-lock-adapter.js +7 -35
- package/dist/lock/implementations/adapters/memory-lock-adapter/memory-lock-adapter.js.map +1 -1
- package/dist/lock/implementations/adapters/mongodb-lock-adapter/mongodb-lock-adapter.d.ts +13 -20
- package/dist/lock/implementations/adapters/mongodb-lock-adapter/mongodb-lock-adapter.js +13 -37
- package/dist/lock/implementations/adapters/mongodb-lock-adapter/mongodb-lock-adapter.js.map +1 -1
- package/dist/lock/implementations/adapters/no-op-lock-adapter/_module.d.ts +1 -0
- package/dist/lock/implementations/adapters/no-op-lock-adapter/_module.js +2 -0
- package/dist/lock/implementations/adapters/no-op-lock-adapter/_module.js.map +1 -0
- package/dist/lock/implementations/adapters/no-op-lock-adapter/no-op-lock-adapter.d.ts +17 -0
- package/dist/lock/implementations/adapters/no-op-lock-adapter/no-op-lock-adapter.js +24 -0
- package/dist/lock/implementations/adapters/no-op-lock-adapter/no-op-lock-adapter.js.map +1 -0
- package/dist/lock/implementations/adapters/redis-lock-adapter/redis-lock-adapter.d.ts +4 -22
- package/dist/lock/implementations/adapters/redis-lock-adapter/redis-lock-adapter.js +4 -31
- package/dist/lock/implementations/adapters/redis-lock-adapter/redis-lock-adapter.js.map +1 -1
- package/dist/lock/implementations/adapters/sqlite-lock-adapter/sqlite-lock-adapter.d.ts +14 -20
- package/dist/lock/implementations/adapters/sqlite-lock-adapter/sqlite-lock-adapter.js +12 -21
- package/dist/lock/implementations/adapters/sqlite-lock-adapter/sqlite-lock-adapter.js.map +1 -1
- package/dist/lock/implementations/derivables/lock-provider/database-lock-adapter.d.ts +0 -2
- package/dist/lock/implementations/derivables/lock-provider/database-lock-adapter.js +2 -8
- package/dist/lock/implementations/derivables/lock-provider/database-lock-adapter.js.map +1 -1
- package/dist/lock/implementations/derivables/lock-provider/is-database-lock-adapter.js +1 -5
- package/dist/lock/implementations/derivables/lock-provider/is-database-lock-adapter.js.map +1 -1
- package/dist/lock/implementations/derivables/lock-provider/lock-provider.d.ts +181 -369
- package/dist/lock/implementations/derivables/lock-provider/lock-provider.js +259 -407
- package/dist/lock/implementations/derivables/lock-provider/lock-provider.js.map +1 -1
- package/dist/lock/implementations/derivables/lock-provider/lock-serde-transformer.d.ts +15 -17
- package/dist/lock/implementations/derivables/lock-provider/lock-serde-transformer.js +42 -40
- package/dist/lock/implementations/derivables/lock-provider/lock-serde-transformer.js.map +1 -1
- package/dist/lock/implementations/derivables/lock-provider/lock-state.d.ts +3 -3
- package/dist/lock/implementations/derivables/lock-provider/lock-state.js.map +1 -1
- package/dist/lock/implementations/derivables/lock-provider/lock.d.ts +194 -680
- package/dist/lock/implementations/derivables/lock-provider/lock.js +284 -744
- package/dist/lock/implementations/derivables/lock-provider/lock.js.map +1 -1
- package/dist/lock/implementations/derivables/lock-provider-factory/lock-provider-factory.d.ts +106 -143
- package/dist/lock/implementations/derivables/lock-provider-factory/lock-provider-factory.js +173 -101
- package/dist/lock/implementations/derivables/lock-provider-factory/lock-provider-factory.js.map +1 -1
- package/dist/lock/implementations/test-utilities/database-lock-adapter.test-suite.d.ts +4 -5
- package/dist/lock/implementations/test-utilities/database-lock-adapter.test-suite.js +172 -247
- package/dist/lock/implementations/test-utilities/database-lock-adapter.test-suite.js.map +1 -1
- package/dist/lock/implementations/test-utilities/lock-adapter.test-suite.d.ts +5 -8
- package/dist/lock/implementations/test-utilities/lock-adapter.test-suite.js +93 -98
- package/dist/lock/implementations/test-utilities/lock-adapter.test-suite.js.map +1 -1
- package/dist/lock/implementations/test-utilities/lock-provider.test-suite.d.ts +15 -20
- package/dist/lock/implementations/test-utilities/lock-provider.test-suite.js +295 -145
- package/dist/lock/implementations/test-utilities/lock-provider.test-suite.js.map +1 -1
- package/dist/serde/implementations/adapters/mongodb-serde/mongodb-serde.js +1 -2
- package/dist/serde/implementations/adapters/mongodb-serde/mongodb-serde.js.map +1 -1
- package/dist/serde/implementations/adapters/no-op-serde-adapter/no-op-serde-adapter.d.ts +3 -2
- package/dist/serde/implementations/adapters/no-op-serde-adapter/no-op-serde-adapter.js +2 -1
- package/dist/serde/implementations/adapters/no-op-serde-adapter/no-op-serde-adapter.js.map +1 -1
- package/dist/serde/implementations/adapters/redis-serde/redis-serde.js +1 -2
- package/dist/serde/implementations/adapters/redis-serde/redis-serde.js.map +1 -1
- package/dist/serde/implementations/adapters/sql-serde/sql-serde.js +1 -2
- package/dist/serde/implementations/adapters/sql-serde/sql-serde.js.map +1 -1
- package/dist/serde/implementations/adapters/super-json-serde-adapter/super-json-serde-adapter.d.ts +2 -2
- package/dist/serde/implementations/adapters/super-json-serde-adapter/super-json-serde-adapter.js +2 -2
- package/dist/serde/implementations/adapters/super-json-serde-adapter/super-json-serde-adapter.js.map +1 -1
- package/dist/serde/implementations/derivables/serde.d.ts +14 -14
- package/dist/serde/implementations/derivables/serde.js +14 -15
- package/dist/serde/implementations/derivables/serde.js.map +1 -1
- package/dist/serde/implementations/test-utilities/flexible-serde-adapter.test-suite.d.ts +4 -4
- package/dist/serde/implementations/test-utilities/flexible-serde-adapter.test-suite.js +3 -3
- package/dist/serde/implementations/test-utilities/flexible-serde.test-suite.d.ts +5 -5
- package/dist/serde/implementations/test-utilities/flexible-serde.test-suite.js +4 -4
- package/dist/utilities/_module-exports.d.ts +2 -3
- package/dist/utilities/_module-exports.js +2 -3
- package/dist/utilities/_module-exports.js.map +1 -1
- package/dist/utilities/classes/_module.d.ts +4 -0
- package/dist/utilities/classes/_module.js +5 -0
- package/dist/utilities/classes/_module.js.map +1 -0
- package/dist/utilities/classes/key-prefixer/_module.d.ts +2 -0
- package/dist/utilities/classes/key-prefixer/_module.js +3 -0
- package/dist/utilities/classes/key-prefixer/_module.js.map +1 -0
- package/dist/utilities/classes/key-prefixer/key-prefixer.contract.d.ts +28 -0
- package/dist/utilities/classes/key-prefixer/key-prefixer.contract.js +5 -0
- package/dist/utilities/classes/key-prefixer/key-prefixer.contract.js.map +1 -0
- package/dist/utilities/classes/key-prefixer/key-prefixer.d.ts +73 -0
- package/dist/utilities/classes/key-prefixer/key-prefixer.js +135 -0
- package/dist/utilities/classes/key-prefixer/key-prefixer.js.map +1 -0
- package/dist/utilities/classes/kysely-table-name-transformer-plugin/_module.d.ts +1 -0
- package/dist/utilities/classes/kysely-table-name-transformer-plugin/_module.js +2 -0
- package/dist/utilities/classes/kysely-table-name-transformer-plugin/_module.js.map +1 -0
- package/dist/utilities/classes/kysely-table-name-transformer-plugin/kysely-table-name-transformer-plugin.js.map +1 -0
- package/dist/utilities/classes/pipeline/_module.d.ts +1 -0
- package/dist/utilities/classes/pipeline/_module.js +2 -0
- package/dist/utilities/classes/pipeline/_module.js.map +1 -0
- package/dist/utilities/{pipeline → classes/pipeline}/pipeline.d.ts +3 -2
- package/dist/utilities/{pipeline → classes/pipeline}/pipeline.js +3 -2
- package/dist/utilities/classes/pipeline/pipeline.js.map +1 -0
- package/dist/utilities/classes/time-span/_module.d.ts +1 -0
- package/dist/utilities/classes/time-span/_module.js +2 -0
- package/dist/utilities/classes/time-span/_module.js.map +1 -0
- package/dist/utilities/{time-span → classes/time-span}/time-span.d.ts +2 -1
- package/dist/utilities/{time-span → classes/time-span}/time-span.js +1 -0
- package/dist/utilities/classes/time-span/time-span.js.map +1 -0
- package/dist/utilities/{_constants.d.ts → constants.d.ts} +0 -3
- package/dist/utilities/constants.js +5 -0
- package/dist/utilities/constants.js.map +1 -0
- package/dist/utilities/contracts/_module.d.ts +3 -1
- package/dist/utilities/contracts/_module.js +3 -1
- package/dist/utilities/contracts/_module.js.map +1 -1
- package/dist/utilities/contracts/prunable.contract.d.ts +11 -0
- package/dist/utilities/contracts/prunable.contract.js +5 -0
- package/dist/utilities/contracts/prunable.contract.js.map +1 -0
- package/dist/utilities/contracts/sqlite-database.contract.d.ts +26 -0
- package/dist/utilities/contracts/sqlite-database.contract.js +5 -0
- package/dist/utilities/contracts/sqlite-database.contract.js.map +1 -0
- package/dist/utilities/functions.d.ts +34 -2
- package/dist/utilities/functions.js +72 -4
- package/dist/utilities/functions.js.map +1 -1
- package/dist/utilities/types.d.ts +49 -16
- package/package.json +14 -13
- package/dist/cache/implementations/adapters/kysely-sqlite-cache-adapter/_module.js +0 -2
- package/dist/cache/implementations/adapters/kysely-sqlite-cache-adapter/_module.js.map +0 -1
- package/dist/cache/implementations/adapters/kysely-sqlite-cache-adapter/kysely-sqlite-cache-adapter.d.ts +0 -61
- package/dist/cache/implementations/adapters/kysely-sqlite-cache-adapter/kysely-sqlite-cache-adapter.js +0 -318
- package/dist/cache/implementations/adapters/kysely-sqlite-cache-adapter/kysely-sqlite-cache-adapter.js.map +0 -1
- package/dist/utilities/_constants.js +0 -8
- package/dist/utilities/_constants.js.map +0 -1
- package/dist/utilities/kysely/_module.d.ts +0 -1
- package/dist/utilities/kysely/_module.js +0 -2
- package/dist/utilities/kysely/_module.js.map +0 -1
- package/dist/utilities/kysely/kysely-table-name-transformer-plugin.js.map +0 -1
- package/dist/utilities/pipeline/_module.d.ts +0 -1
- package/dist/utilities/pipeline/_module.js +0 -2
- package/dist/utilities/pipeline/_module.js.map +0 -1
- package/dist/utilities/pipeline/pipeline.js.map +0 -1
- package/dist/utilities/time-span/_module.d.ts +0 -1
- package/dist/utilities/time-span/_module.js +0 -2
- package/dist/utilities/time-span/_module.js.map +0 -1
- package/dist/utilities/time-span/time-span.js.map +0 -1
- /package/dist/utilities/{kysely → classes/kysely-table-name-transformer-plugin}/kysely-table-name-transformer-plugin.d.ts +0 -0
- /package/dist/utilities/{kysely → classes/kysely-table-name-transformer-plugin}/kysely-table-name-transformer-plugin.js +0 -0
|
@@ -4,52 +4,32 @@
|
|
|
4
4
|
import { type InvokableFn } from "../../../../utilities/_module-exports.js";
|
|
5
5
|
import type { BaseEvent, IEventBusAdapter } from "../../../../event-bus/contracts/_module-exports.js";
|
|
6
6
|
import { EventEmitter } from "node:events";
|
|
7
|
-
/**
|
|
8
|
-
*
|
|
9
|
-
* IMPORT_PATH: ```"@daiso-tech/core/event-bus/implementations/adapters"```
|
|
10
|
-
* @group Adapters
|
|
11
|
-
*/
|
|
12
|
-
export type MemoryEventBusAdapterSettings = {
|
|
13
|
-
rootGroup: string;
|
|
14
|
-
eventEmitter?: EventEmitter;
|
|
15
|
-
};
|
|
16
7
|
/**
|
|
17
8
|
* To utilize the <i>MemoryEventBusAdapter</i>, you must create instance of it.
|
|
18
9
|
*
|
|
19
|
-
* IMPORT_PATH: ```"@daiso-tech/core/event-bus/
|
|
10
|
+
* IMPORT_PATH: ```"@daiso-tech/core/event-bus/adapters"```
|
|
20
11
|
* @group Adapters
|
|
21
12
|
*/
|
|
22
13
|
export declare class MemoryEventBusAdapter implements IEventBusAdapter {
|
|
23
|
-
private readonly group;
|
|
24
14
|
private readonly eventEmitter;
|
|
25
15
|
/**
|
|
26
|
-
*
|
|
16
|
+
* @example
|
|
27
17
|
* ```ts
|
|
28
|
-
* import {
|
|
29
|
-
* import { EventEmitter } from "node:events";
|
|
18
|
+
* import { MemoryEventBus } from "@daiso-tech/core/event-bus/adapters";
|
|
30
19
|
*
|
|
31
|
-
* const
|
|
32
|
-
* const eventBusAdapter = new MemoryEventBusAdapter({
|
|
33
|
-
* eventEmitter
|
|
34
|
-
* });
|
|
20
|
+
* const eventBusAdapter = new MemoryEventBus();
|
|
35
21
|
* ```
|
|
36
|
-
* You can also provide an <i>
|
|
22
|
+
* You can also provide an <i>{@link EventEmitter}</i> that will be used for storing the data.
|
|
37
23
|
* @example
|
|
38
24
|
* ```ts
|
|
39
|
-
* import {
|
|
25
|
+
* import { MemoryEventBus } from "@daiso-tech/core/event-bus/adapters";
|
|
40
26
|
* import { EventEmitter } from "node:events";
|
|
41
27
|
*
|
|
42
|
-
* const eventEmitter = new EventEmitter();
|
|
43
|
-
* const eventBusAdapter = new
|
|
44
|
-
* rootGroup: "@global",
|
|
45
|
-
* eventEmitter
|
|
46
|
-
* });
|
|
28
|
+
* const eventEmitter = new EventEmitter<any, any>();
|
|
29
|
+
* const eventBusAdapter = new MemoryEventBus(eventEmitter);
|
|
47
30
|
* ```
|
|
48
31
|
*/
|
|
49
|
-
constructor(
|
|
50
|
-
getGroup(): string;
|
|
51
|
-
withGroup(group: string): IEventBusAdapter;
|
|
52
|
-
private withPrefix;
|
|
32
|
+
constructor(eventEmitter?: EventEmitter);
|
|
53
33
|
addListener(eventName: string, listener: InvokableFn<BaseEvent>): Promise<void>;
|
|
54
34
|
removeListener(eventName: string, listener: InvokableFn<BaseEvent>): Promise<void>;
|
|
55
35
|
dispatch(eventName: string, eventData: BaseEvent): Promise<void>;
|
package/dist/event-bus/implementations/adapters/memory-event-bus-adapter/memory-event-bus-adapter.js
CHANGED
|
@@ -1,71 +1,50 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @module EventBus
|
|
3
3
|
*/
|
|
4
|
-
import {
|
|
4
|
+
import {} from "../../../../utilities/_module-exports.js";
|
|
5
5
|
import { EventEmitter } from "node:events";
|
|
6
6
|
/**
|
|
7
7
|
* To utilize the <i>MemoryEventBusAdapter</i>, you must create instance of it.
|
|
8
8
|
*
|
|
9
|
-
* IMPORT_PATH: ```"@daiso-tech/core/event-bus/
|
|
9
|
+
* IMPORT_PATH: ```"@daiso-tech/core/event-bus/adapters"```
|
|
10
10
|
* @group Adapters
|
|
11
11
|
*/
|
|
12
12
|
export class MemoryEventBusAdapter {
|
|
13
|
-
group;
|
|
14
13
|
eventEmitter;
|
|
15
14
|
/**
|
|
16
|
-
*
|
|
15
|
+
* @example
|
|
17
16
|
* ```ts
|
|
18
|
-
* import {
|
|
19
|
-
* import { EventEmitter } from "node:events";
|
|
17
|
+
* import { MemoryEventBus } from "@daiso-tech/core/event-bus/adapters";
|
|
20
18
|
*
|
|
21
|
-
* const
|
|
22
|
-
* const eventBusAdapter = new MemoryEventBusAdapter({
|
|
23
|
-
* eventEmitter
|
|
24
|
-
* });
|
|
19
|
+
* const eventBusAdapter = new MemoryEventBus();
|
|
25
20
|
* ```
|
|
26
|
-
* You can also provide an <i>
|
|
21
|
+
* You can also provide an <i>{@link EventEmitter}</i> that will be used for storing the data.
|
|
27
22
|
* @example
|
|
28
23
|
* ```ts
|
|
29
|
-
* import {
|
|
24
|
+
* import { MemoryEventBus } from "@daiso-tech/core/event-bus/adapters";
|
|
30
25
|
* import { EventEmitter } from "node:events";
|
|
31
26
|
*
|
|
32
|
-
* const eventEmitter = new EventEmitter();
|
|
33
|
-
* const eventBusAdapter = new
|
|
34
|
-
* rootGroup: "@global",
|
|
35
|
-
* eventEmitter
|
|
36
|
-
* });
|
|
27
|
+
* const eventEmitter = new EventEmitter<any, any>();
|
|
28
|
+
* const eventBusAdapter = new MemoryEventBus(eventEmitter);
|
|
37
29
|
* ```
|
|
38
30
|
*/
|
|
39
|
-
constructor(
|
|
40
|
-
|
|
31
|
+
constructor(eventEmitter = new EventEmitter()) {
|
|
32
|
+
this.eventEmitter = eventEmitter;
|
|
41
33
|
this.eventEmitter = eventEmitter;
|
|
42
|
-
this.group = rootGroup;
|
|
43
|
-
}
|
|
44
|
-
getGroup() {
|
|
45
|
-
return this.group;
|
|
46
|
-
}
|
|
47
|
-
withGroup(group) {
|
|
48
|
-
return new MemoryEventBusAdapter({
|
|
49
|
-
rootGroup: resolveOneOrMoreStr([this.group, group]),
|
|
50
|
-
eventEmitter: this.eventEmitter,
|
|
51
|
-
});
|
|
52
|
-
}
|
|
53
|
-
withPrefix(event) {
|
|
54
|
-
return resolveOneOrMoreStr([this.group, event]);
|
|
55
34
|
}
|
|
56
35
|
// eslint-disable-next-line @typescript-eslint/require-await
|
|
57
36
|
async addListener(eventName, listener) {
|
|
58
37
|
// eslint-disable-next-line @typescript-eslint/no-misused-promises
|
|
59
|
-
this.eventEmitter.on(
|
|
38
|
+
this.eventEmitter.on(eventName, listener);
|
|
60
39
|
}
|
|
61
40
|
// eslint-disable-next-line @typescript-eslint/require-await
|
|
62
41
|
async removeListener(eventName, listener) {
|
|
63
42
|
// eslint-disable-next-line @typescript-eslint/no-misused-promises
|
|
64
|
-
this.eventEmitter.off(
|
|
43
|
+
this.eventEmitter.off(eventName, listener);
|
|
65
44
|
}
|
|
66
45
|
// eslint-disable-next-line @typescript-eslint/require-await
|
|
67
46
|
async dispatch(eventName, eventData) {
|
|
68
|
-
this.eventEmitter.emit(
|
|
47
|
+
this.eventEmitter.emit(eventName, eventData);
|
|
69
48
|
}
|
|
70
49
|
}
|
|
71
50
|
//# sourceMappingURL=memory-event-bus-adapter.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"memory-event-bus-adapter.js","sourceRoot":"","sources":["../../../../../src/event-bus/implementations/adapters/memory-event-bus-adapter/memory-event-bus-adapter.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,
|
|
1
|
+
{"version":3,"file":"memory-event-bus-adapter.js","sourceRoot":"","sources":["../../../../../src/event-bus/implementations/adapters/memory-event-bus-adapter/memory-event-bus-adapter.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAoB,MAAM,gCAAgC,CAAC;AAKlE,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAE3C;;;;;GAKG;AACH,MAAM,OAAO,qBAAqB;IAmBT;IAlBrB;;;;;;;;;;;;;;;;OAgBG;IACH,YACqB,eAA6B,IAAI,YAAY,EAAE;QAA/C,iBAAY,GAAZ,YAAY,CAAmC;QAEhE,IAAI,CAAC,YAAY,GAAG,YAAY,CAAC;IACrC,CAAC;IAED,4DAA4D;IAC5D,KAAK,CAAC,WAAW,CACb,SAAiB,EACjB,QAAgC;QAEhC,kEAAkE;QAClE,IAAI,CAAC,YAAY,CAAC,EAAE,CAAC,SAAS,EAAE,QAAQ,CAAC,CAAC;IAC9C,CAAC;IAED,4DAA4D;IAC5D,KAAK,CAAC,cAAc,CAChB,SAAiB,EACjB,QAAgC;QAEhC,kEAAkE;QAClE,IAAI,CAAC,YAAY,CAAC,GAAG,CAAC,SAAS,EAAE,QAAQ,CAAC,CAAC;IAC/C,CAAC;IAED,4DAA4D;IAC5D,KAAK,CAAC,QAAQ,CAAC,SAAiB,EAAE,SAAoB;QAClD,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,SAAS,EAAE,SAAS,CAAC,CAAC;IACjD,CAAC;CACJ"}
|
package/dist/event-bus/implementations/adapters/no-op-event-bus-adapter/no-op-event-bus-adapter.d.ts
CHANGED
|
@@ -5,14 +5,12 @@ import type { BaseEvent } from "../../../../event-bus/contracts/_module-exports.
|
|
|
5
5
|
import type { IEventBusAdapter } from "../../../../event-bus/contracts/_module-exports.js";
|
|
6
6
|
import type { InvokableFn } from "../../../../utilities/types.js";
|
|
7
7
|
/**
|
|
8
|
-
* This <i>NoOpEventBusAdapter</i> will do nothing and is used for easily mocking {@link IEventBus} for testing.
|
|
8
|
+
* This <i>NoOpEventBusAdapter</i> will do nothing and is used for easily mocking <i>{@link IEventBus}</i> for testing.
|
|
9
9
|
*
|
|
10
|
-
* IMPORT_PATH: ```"@daiso-tech/core/event-bus/
|
|
10
|
+
* IMPORT_PATH: ```"@daiso-tech/core/event-bus/adapters"```
|
|
11
11
|
* @group Adapters
|
|
12
12
|
*/
|
|
13
13
|
export declare class NoOpEventBusAdapter implements IEventBusAdapter {
|
|
14
|
-
getGroup(): string;
|
|
15
|
-
withGroup(_group: string): IEventBusAdapter;
|
|
16
14
|
addListener(_eventName: string, _listener: InvokableFn<BaseEvent>): PromiseLike<void>;
|
|
17
15
|
removeListener(_eventName: string, _listener: InvokableFn<BaseEvent>): PromiseLike<void>;
|
|
18
16
|
dispatch(_eventName: string, _eventData: BaseEvent): PromiseLike<void>;
|
package/dist/event-bus/implementations/adapters/no-op-event-bus-adapter/no-op-event-bus-adapter.js
CHANGED
|
@@ -2,18 +2,12 @@
|
|
|
2
2
|
* @module EventBus
|
|
3
3
|
*/
|
|
4
4
|
/**
|
|
5
|
-
* This <i>NoOpEventBusAdapter</i> will do nothing and is used for easily mocking {@link IEventBus} for testing.
|
|
5
|
+
* This <i>NoOpEventBusAdapter</i> will do nothing and is used for easily mocking <i>{@link IEventBus}</i> for testing.
|
|
6
6
|
*
|
|
7
|
-
* IMPORT_PATH: ```"@daiso-tech/core/event-bus/
|
|
7
|
+
* IMPORT_PATH: ```"@daiso-tech/core/event-bus/adapters"```
|
|
8
8
|
* @group Adapters
|
|
9
9
|
*/
|
|
10
10
|
export class NoOpEventBusAdapter {
|
|
11
|
-
getGroup() {
|
|
12
|
-
return "";
|
|
13
|
-
}
|
|
14
|
-
withGroup(_group) {
|
|
15
|
-
return new NoOpEventBusAdapter();
|
|
16
|
-
}
|
|
17
11
|
addListener(_eventName, _listener) {
|
|
18
12
|
return Promise.resolve();
|
|
19
13
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"no-op-event-bus-adapter.js","sourceRoot":"","sources":["../../../../../src/event-bus/implementations/adapters/no-op-event-bus-adapter/no-op-event-bus-adapter.ts"],"names":[],"mappings":"AAAA;;GAEG;AAUH;;;;;GAKG;AACH,MAAM,OAAO,mBAAmB;IAC5B,
|
|
1
|
+
{"version":3,"file":"no-op-event-bus-adapter.js","sourceRoot":"","sources":["../../../../../src/event-bus/implementations/adapters/no-op-event-bus-adapter/no-op-event-bus-adapter.ts"],"names":[],"mappings":"AAAA;;GAEG;AAUH;;;;;GAKG;AACH,MAAM,OAAO,mBAAmB;IAC5B,WAAW,CACP,UAAkB,EAClB,SAAiC;QAEjC,OAAO,OAAO,CAAC,OAAO,EAAE,CAAC;IAC7B,CAAC;IAED,cAAc,CACV,UAAkB,EAClB,SAAiC;QAEjC,OAAO,OAAO,CAAC,OAAO,EAAE,CAAC;IAC7B,CAAC;IAED,QAAQ,CAAC,UAAkB,EAAE,UAAqB;QAC9C,OAAO,OAAO,CAAC,OAAO,EAAE,CAAC;IAC7B,CAAC;CACJ"}
|
|
@@ -7,34 +7,31 @@ import type { Redis } from "ioredis";
|
|
|
7
7
|
import { type InvokableFn } from "../../../../utilities/_module-exports.js";
|
|
8
8
|
/**
|
|
9
9
|
*
|
|
10
|
-
* IMPORT_PATH: ```"@daiso-tech/core/event-bus/
|
|
10
|
+
* IMPORT_PATH: ```"@daiso-tech/core/event-bus/adapters"```
|
|
11
11
|
* @group Adapters
|
|
12
12
|
*/
|
|
13
13
|
export type RedisPubSubEventBusAdapterSettings = {
|
|
14
14
|
dispatcherClient: Redis;
|
|
15
15
|
listenerClient: Redis;
|
|
16
16
|
serde: ISerde<string>;
|
|
17
|
-
rootGroup: string;
|
|
18
17
|
};
|
|
19
18
|
/**
|
|
20
19
|
* To utilize the <i>RedisPubSubEventBusAdapter</i>, you must install the <i>"ioredis"</i> package and supply a <i>{@link ISerde | ISerde<string> }</i>, with a <i>{@link SuperJsonSerdeAdapter}</i>.
|
|
21
20
|
*
|
|
22
|
-
* IMPORT_PATH: ```"@daiso-tech/core/event-bus/
|
|
21
|
+
* IMPORT_PATH: ```"@daiso-tech/core/event-bus/adapters"```
|
|
23
22
|
* @group Adapters
|
|
24
23
|
*/
|
|
25
24
|
export declare class RedisPubSubEventBusAdapter implements IEventBusAdapter {
|
|
26
|
-
private readonly
|
|
27
|
-
private readonly baseSerde;
|
|
28
|
-
private readonly redisSerde;
|
|
25
|
+
private readonly serde;
|
|
29
26
|
private readonly dispatcherClient;
|
|
30
27
|
private readonly listenerClient;
|
|
31
28
|
private readonly eventEmitter;
|
|
32
29
|
/**
|
|
33
|
-
*
|
|
30
|
+
* @example
|
|
34
31
|
* ```ts
|
|
35
|
-
* import { RedisPubSubEventBusAdapter } from "@daiso-tech/core/event-bus/
|
|
36
|
-
* import { Serde } from "@daiso-tech/core/serde
|
|
37
|
-
* import { SuperJsonSerdeAdapter } from "@daiso-tech/core/serde/
|
|
32
|
+
* import { RedisPubSubEventBusAdapter } from "@daiso-tech/core/event-bus/adapters";
|
|
33
|
+
* import { Serde } from "@daiso-tech/core/serde";
|
|
34
|
+
* import { SuperJsonSerdeAdapter } from "@daiso-tech/core/serde/adapters"
|
|
38
35
|
* import Redis from "ioredis";
|
|
39
36
|
*
|
|
40
37
|
* const dispatcherClient = new Redis("YOUR_REDIS_CONNECTION_STRING");
|
|
@@ -44,14 +41,10 @@ export declare class RedisPubSubEventBusAdapter implements IEventBusAdapter {
|
|
|
44
41
|
* dispatcherClient,
|
|
45
42
|
* listenerClient,
|
|
46
43
|
* serde,
|
|
47
|
-
* rootGroup: "@global"
|
|
48
44
|
* });
|
|
49
45
|
* ```
|
|
50
46
|
*/
|
|
51
|
-
constructor({ dispatcherClient, listenerClient, serde,
|
|
52
|
-
getGroup(): string;
|
|
53
|
-
withGroup(group: string): IEventBusAdapter;
|
|
54
|
-
private withPrefix;
|
|
47
|
+
constructor({ dispatcherClient, listenerClient, serde, }: RedisPubSubEventBusAdapterSettings);
|
|
55
48
|
private redisListener;
|
|
56
49
|
addListener(eventName: string, listener: InvokableFn<BaseEvent>): Promise<void>;
|
|
57
50
|
removeListener(eventName: string, listener: InvokableFn<BaseEvent>): Promise<void>;
|
|
@@ -6,26 +6,24 @@ import { RedisSerde,
|
|
|
6
6
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
7
7
|
SuperJsonSerdeAdapter, } from "../../../../serde/implementations/adapters/_module-exports.js";
|
|
8
8
|
import { EventEmitter } from "node:events";
|
|
9
|
-
import {
|
|
9
|
+
import {} from "../../../../utilities/_module-exports.js";
|
|
10
10
|
/**
|
|
11
11
|
* To utilize the <i>RedisPubSubEventBusAdapter</i>, you must install the <i>"ioredis"</i> package and supply a <i>{@link ISerde | ISerde<string> }</i>, with a <i>{@link SuperJsonSerdeAdapter}</i>.
|
|
12
12
|
*
|
|
13
|
-
* IMPORT_PATH: ```"@daiso-tech/core/event-bus/
|
|
13
|
+
* IMPORT_PATH: ```"@daiso-tech/core/event-bus/adapters"```
|
|
14
14
|
* @group Adapters
|
|
15
15
|
*/
|
|
16
16
|
export class RedisPubSubEventBusAdapter {
|
|
17
|
-
|
|
18
|
-
baseSerde;
|
|
19
|
-
redisSerde;
|
|
17
|
+
serde;
|
|
20
18
|
dispatcherClient;
|
|
21
19
|
listenerClient;
|
|
22
20
|
eventEmitter = new EventEmitter();
|
|
23
21
|
/**
|
|
24
|
-
*
|
|
22
|
+
* @example
|
|
25
23
|
* ```ts
|
|
26
|
-
* import { RedisPubSubEventBusAdapter } from "@daiso-tech/core/event-bus/
|
|
27
|
-
* import { Serde } from "@daiso-tech/core/serde
|
|
28
|
-
* import { SuperJsonSerdeAdapter } from "@daiso-tech/core/serde/
|
|
24
|
+
* import { RedisPubSubEventBusAdapter } from "@daiso-tech/core/event-bus/adapters";
|
|
25
|
+
* import { Serde } from "@daiso-tech/core/serde";
|
|
26
|
+
* import { SuperJsonSerdeAdapter } from "@daiso-tech/core/serde/adapters"
|
|
29
27
|
* import Redis from "ioredis";
|
|
30
28
|
*
|
|
31
29
|
* const dispatcherClient = new Redis("YOUR_REDIS_CONNECTION_STRING");
|
|
@@ -35,48 +33,31 @@ export class RedisPubSubEventBusAdapter {
|
|
|
35
33
|
* dispatcherClient,
|
|
36
34
|
* listenerClient,
|
|
37
35
|
* serde,
|
|
38
|
-
* rootGroup: "@global"
|
|
39
36
|
* });
|
|
40
37
|
* ```
|
|
41
38
|
*/
|
|
42
|
-
constructor({ dispatcherClient, listenerClient, serde,
|
|
43
|
-
this.group = rootGroup;
|
|
39
|
+
constructor({ dispatcherClient, listenerClient, serde, }) {
|
|
44
40
|
this.dispatcherClient = dispatcherClient;
|
|
45
41
|
this.listenerClient = listenerClient;
|
|
46
|
-
this.
|
|
47
|
-
this.redisSerde = new RedisSerde(serde);
|
|
48
|
-
}
|
|
49
|
-
getGroup() {
|
|
50
|
-
return this.group;
|
|
51
|
-
}
|
|
52
|
-
withGroup(group) {
|
|
53
|
-
return new RedisPubSubEventBusAdapter({
|
|
54
|
-
listenerClient: this.listenerClient,
|
|
55
|
-
dispatcherClient: this.dispatcherClient,
|
|
56
|
-
serde: this.baseSerde,
|
|
57
|
-
rootGroup: resolveOneOrMoreStr([this.group, group]),
|
|
58
|
-
});
|
|
59
|
-
}
|
|
60
|
-
withPrefix(eventName) {
|
|
61
|
-
return resolveOneOrMoreStr([this.group, eventName]);
|
|
42
|
+
this.serde = new RedisSerde(serde);
|
|
62
43
|
}
|
|
63
44
|
redisListener = (channel, message) => {
|
|
64
|
-
this.eventEmitter.emit(channel, this.
|
|
45
|
+
this.eventEmitter.emit(channel, this.serde.deserialize(message));
|
|
65
46
|
};
|
|
66
47
|
async addListener(eventName, listener) {
|
|
67
48
|
// eslint-disable-next-line @typescript-eslint/no-misused-promises
|
|
68
|
-
this.eventEmitter.on(
|
|
69
|
-
await this.listenerClient.subscribe(
|
|
49
|
+
this.eventEmitter.on(eventName, listener);
|
|
50
|
+
await this.listenerClient.subscribe(eventName);
|
|
70
51
|
// eslint-disable-next-line @typescript-eslint/no-misused-promises
|
|
71
52
|
this.listenerClient.on("message", this.redisListener);
|
|
72
53
|
}
|
|
73
54
|
async removeListener(eventName, listener) {
|
|
74
55
|
// eslint-disable-next-line @typescript-eslint/no-misused-promises
|
|
75
|
-
this.eventEmitter.off(
|
|
76
|
-
await this.listenerClient.unsubscribe(
|
|
56
|
+
this.eventEmitter.off(eventName, listener);
|
|
57
|
+
await this.listenerClient.unsubscribe(eventName);
|
|
77
58
|
}
|
|
78
59
|
async dispatch(eventName, eventData) {
|
|
79
|
-
await this.dispatcherClient.publish(
|
|
60
|
+
await this.dispatcherClient.publish(eventName, this.serde.serialize(eventData));
|
|
80
61
|
}
|
|
81
62
|
}
|
|
82
63
|
//# sourceMappingURL=redis-pub-sub-event-bus-adapter.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"redis-pub-sub-event-bus-adapter.js","sourceRoot":"","sources":["../../../../../src/event-bus/implementations/adapters/redis-pub-sub-event-bus-adapter/redis-pub-sub-event-bus-adapter.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAe,MAAM,sCAAsC,CAAC;AACnE,OAAO,EACH,UAAU;AACV,6DAA6D;AAC7D,qBAAqB,GACxB,MAAM,qDAAqD,CAAC;AAM7D,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAC3C,OAAO,
|
|
1
|
+
{"version":3,"file":"redis-pub-sub-event-bus-adapter.js","sourceRoot":"","sources":["../../../../../src/event-bus/implementations/adapters/redis-pub-sub-event-bus-adapter/redis-pub-sub-event-bus-adapter.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAe,MAAM,sCAAsC,CAAC;AACnE,OAAO,EACH,UAAU;AACV,6DAA6D;AAC7D,qBAAqB,GACxB,MAAM,qDAAqD,CAAC;AAM7D,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAC3C,OAAO,EAAoB,MAAM,gCAAgC,CAAC;AAalE;;;;;GAKG;AACH,MAAM,OAAO,0BAA0B;IAClB,KAAK,CAAiB;IACtB,gBAAgB,CAAQ;IACxB,cAAc,CAAQ;IACtB,YAAY,GAAG,IAAI,YAAY,EAAE,CAAC;IAEnD;;;;;;;;;;;;;;;;;OAiBG;IACH,YAAY,EACR,gBAAgB,EAChB,cAAc,EACd,KAAK,GAC4B;QACjC,IAAI,CAAC,gBAAgB,GAAG,gBAAgB,CAAC;QACzC,IAAI,CAAC,cAAc,GAAG,cAAc,CAAC;QACrC,IAAI,CAAC,KAAK,GAAG,IAAI,UAAU,CAAC,KAAK,CAAC,CAAC;IACvC,CAAC;IAEO,aAAa,GAAG,CAAC,OAAe,EAAE,OAAe,EAAQ,EAAE;QAC/D,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC,KAAK,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC,CAAC;IACrE,CAAC,CAAC;IAEF,KAAK,CAAC,WAAW,CACb,SAAiB,EACjB,QAAgC;QAEhC,kEAAkE;QAClE,IAAI,CAAC,YAAY,CAAC,EAAE,CAAC,SAAS,EAAE,QAAQ,CAAC,CAAC;QAE1C,MAAM,IAAI,CAAC,cAAc,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC;QAE/C,kEAAkE;QAClE,IAAI,CAAC,cAAc,CAAC,EAAE,CAAC,SAAS,EAAE,IAAI,CAAC,aAAa,CAAC,CAAC;IAC1D,CAAC;IAED,KAAK,CAAC,cAAc,CAChB,SAAiB,EACjB,QAAgC;QAEhC,kEAAkE;QAClE,IAAI,CAAC,YAAY,CAAC,GAAG,CAAC,SAAS,EAAE,QAAQ,CAAC,CAAC;QAE3C,MAAM,IAAI,CAAC,cAAc,CAAC,WAAW,CAAC,SAAS,CAAC,CAAC;IACrD,CAAC;IAED,KAAK,CAAC,QAAQ,CAAC,SAAiB,EAAE,SAAoB;QAClD,MAAM,IAAI,CAAC,gBAAgB,CAAC,OAAO,CAC/B,SAAS,EACT,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,SAAS,CAAC,CAClC,CAAC;IACN,CAAC;CACJ"}
|