@daiso-tech/core 0.13.0 → 0.15.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/dist/cjs/_module.js +1 -0
- package/dist/cjs/_module.js.map +1 -1
- package/dist/cjs/async/_module.js +20 -0
- package/dist/cjs/async/_module.js.map +1 -0
- package/dist/cjs/{utilities/async/_shared.js → async/async.errors.js} +1 -1
- package/dist/cjs/async/async.errors.js.map +1 -0
- package/dist/cjs/{utilities → async}/backof-policies/_module.js +4 -4
- package/dist/cjs/async/backof-policies/_module.js.map +1 -0
- package/dist/cjs/async/backof-policies/_shared.js.map +1 -0
- package/dist/cjs/{utilities/async/delay-iterable → async/backof-policies/constant-backoff-policy}/_module.js +1 -1
- package/dist/cjs/async/backof-policies/constant-backoff-policy/_module.js.map +1 -0
- package/dist/cjs/{utilities → async}/backof-policies/constant-backoff-policy/constant-backoff-policy.js +1 -1
- package/dist/cjs/async/backof-policies/constant-backoff-policy/constant-backoff-policy.js.map +1 -0
- package/dist/cjs/async/backof-policies/exponential-backoff-policy/_module.js +18 -0
- package/dist/cjs/async/backof-policies/exponential-backoff-policy/_module.js.map +1 -0
- package/dist/cjs/{utilities → async}/backof-policies/exponential-backoff-policy/exponential-backoff-policy.js +1 -1
- package/dist/cjs/async/backof-policies/exponential-backoff-policy/exponential-backoff-policy.js.map +1 -0
- package/dist/cjs/{utilities/async/abortable → async/backof-policies/linear-backoff-policy}/_module.js +1 -1
- package/dist/cjs/async/backof-policies/linear-backoff-policy/_module.js.map +1 -0
- package/dist/cjs/{utilities → async}/backof-policies/linear-backoff-policy/linear-backoff-policy.js +1 -1
- package/dist/cjs/async/backof-policies/linear-backoff-policy/linear-backoff-policy.js.map +1 -0
- package/dist/cjs/{utilities/async/abortable-iterable → async/backof-policies/polynomial-backoff-policy}/_module.js +1 -1
- package/dist/cjs/async/backof-policies/polynomial-backoff-policy/_module.js.map +1 -0
- package/dist/cjs/{utilities → async}/backof-policies/polynomial-backoff-policy/polynomial-backoff-policy.js +1 -1
- package/dist/cjs/async/backof-policies/polynomial-backoff-policy/polynomial-backoff-policy.js.map +1 -0
- package/dist/cjs/{event-bus/implementations/_shared/test-utilities → async/utilities}/_module.js +2 -1
- package/dist/cjs/async/utilities/_module.js.map +1 -0
- package/dist/cjs/async/utilities/abort/_module.js +19 -0
- package/dist/cjs/async/utilities/abort/_module.js.map +1 -0
- package/dist/cjs/async/utilities/abort/abort-and-fail.js +45 -0
- package/dist/cjs/async/utilities/abort/abort-and-fail.js.map +1 -0
- package/dist/cjs/async/utilities/abort/abort.js +18 -0
- package/dist/cjs/async/utilities/abort/abort.js.map +1 -0
- package/dist/cjs/{utilities/async/retry → async/utilities/delay}/_module.js +1 -1
- package/dist/cjs/async/utilities/delay/_module.js.map +1 -0
- package/dist/cjs/async/utilities/delay/delay.js +20 -0
- package/dist/cjs/async/utilities/delay/delay.js.map +1 -0
- package/dist/cjs/{utilities/async → async/utilities}/lazy-promise/_module.js +1 -1
- package/dist/cjs/async/utilities/lazy-promise/_module.js.map +1 -0
- package/dist/cjs/async/utilities/lazy-promise/lazy-promise.js +95 -0
- package/dist/cjs/async/utilities/lazy-promise/lazy-promise.js.map +1 -0
- package/dist/cjs/{utilities/async/delay → async/utilities/retry}/_module.js +2 -1
- package/dist/cjs/async/utilities/retry/_module.js.map +1 -0
- package/dist/cjs/async/utilities/retry/retry-or-fail.js +36 -0
- package/dist/cjs/async/utilities/retry/retry-or-fail.js.map +1 -0
- package/dist/cjs/async/utilities/retry/retry.js +18 -0
- package/dist/cjs/async/utilities/retry/retry.js.map +1 -0
- package/dist/cjs/{utilities/async → async/utilities}/timeout/_module.js +2 -1
- package/dist/cjs/async/utilities/timeout/_module.js.map +1 -0
- package/dist/cjs/async/utilities/timeout/timeout-and-fail.js +25 -0
- package/dist/cjs/async/utilities/timeout/timeout-and-fail.js.map +1 -0
- package/dist/cjs/async/utilities/timeout/timeout.js +18 -0
- package/dist/cjs/async/utilities/timeout/timeout.js.map +1 -0
- package/dist/cjs/cache/contracts/cache.events.js +0 -11
- package/dist/cjs/cache/contracts/cache.events.js.map +1 -1
- package/dist/cjs/cache/implementations/_shared/cache-adapter.test-suite.js +12 -11
- package/dist/cjs/cache/implementations/_shared/cache-adapter.test-suite.js.map +1 -1
- package/dist/cjs/cache/implementations/_shared/cache.test-suite.js +36 -35
- package/dist/cjs/cache/implementations/_shared/cache.test-suite.js.map +1 -1
- package/dist/cjs/cache/implementations/adapters/_module.js +1 -0
- package/dist/cjs/cache/implementations/adapters/_module.js.map +1 -1
- package/dist/cjs/cache/implementations/adapters/libsql-cache-adapter/libsql-cache-adapter.js +3 -3
- package/dist/cjs/cache/implementations/adapters/libsql-cache-adapter/libsql-cache-adapter.js.map +1 -1
- package/dist/cjs/cache/implementations/adapters/memory-cache-adapter/memory-cache-adapter.js.map +1 -1
- package/dist/cjs/cache/implementations/adapters/mongodb-cache-adapter/mongodb-cache-adapter.js +1 -1
- package/dist/cjs/cache/implementations/adapters/mongodb-cache-adapter/mongodb-cache-adapter.js.map +1 -1
- package/dist/cjs/cache/implementations/adapters/no-op-cache-adapter/_module.js +18 -0
- package/dist/cjs/cache/implementations/adapters/no-op-cache-adapter/_module.js.map +1 -0
- package/dist/cjs/cache/implementations/adapters/no-op-cache-adapter/no-op-cache-adapter.js +28 -0
- package/dist/cjs/cache/implementations/adapters/no-op-cache-adapter/no-op-cache-adapter.js.map +1 -0
- package/dist/cjs/cache/implementations/adapters/redis-cache-adapter/redis-cache-adapter.js +1 -1
- package/dist/cjs/cache/implementations/adapters/redis-cache-adapter/redis-cache-adapter.js.map +1 -1
- package/dist/cjs/cache/implementations/adapters/sqlite-cache-adapter/sqlite-cache-adapter.js +3 -3
- package/dist/cjs/cache/implementations/adapters/sqlite-cache-adapter/sqlite-cache-adapter.js.map +1 -1
- package/dist/cjs/cache/implementations/derivables/base-cache.js +46 -38
- package/dist/cjs/cache/implementations/derivables/base-cache.js.map +1 -1
- package/dist/cjs/cache/implementations/derivables/cache-factory.js +3 -3
- package/dist/cjs/cache/implementations/derivables/cache-factory.js.map +1 -1
- package/dist/cjs/cache/implementations/derivables/cache.js +21 -23
- package/dist/cjs/cache/implementations/derivables/cache.js.map +1 -1
- package/dist/cjs/collection/implementations/async-iterable-collection/_shared/_module.js +4 -1
- package/dist/cjs/collection/implementations/async-iterable-collection/_shared/_module.js.map +1 -1
- package/dist/cjs/collection/implementations/async-iterable-collection/_shared/async-delay-iterable.js +27 -0
- package/dist/cjs/collection/implementations/async-iterable-collection/_shared/async-delay-iterable.js.map +1 -0
- package/dist/cjs/collection/implementations/async-iterable-collection/_shared/async-retry-iterable.js +33 -0
- package/dist/cjs/collection/implementations/async-iterable-collection/_shared/async-retry-iterable.js.map +1 -0
- package/dist/cjs/collection/implementations/async-iterable-collection/_shared/async-take-until-abort-iterable.js +36 -0
- package/dist/cjs/collection/implementations/async-iterable-collection/_shared/async-take-until-abort-iterable.js.map +1 -0
- package/dist/cjs/collection/implementations/async-iterable-collection/_shared/async-take-until-timeout-iterable.js +48 -0
- package/dist/cjs/collection/implementations/async-iterable-collection/_shared/async-take-until-timeout-iterable.js.map +1 -0
- package/dist/cjs/collection/implementations/async-iterable-collection/async-iterable-collection.js +48 -39
- package/dist/cjs/collection/implementations/async-iterable-collection/async-iterable-collection.js.map +1 -1
- package/dist/cjs/collection/implementations/iterable-collection/iterable-collection.js +5 -5
- package/dist/cjs/collection/implementations/iterable-collection/iterable-collection.js.map +1 -1
- package/dist/cjs/collection/implementations/list-collection/list-collection.js +5 -5
- package/dist/cjs/collection/implementations/list-collection/list-collection.js.map +1 -1
- package/dist/cjs/event-bus/contracts/event-bus.errors.js +3 -3
- package/dist/cjs/event-bus/contracts/event-bus.errors.js.map +1 -1
- package/dist/cjs/event-bus/implementations/_module.js +1 -1
- package/dist/cjs/event-bus/implementations/_module.js.map +1 -1
- package/dist/cjs/event-bus/implementations/_shared/_module.js +19 -0
- package/dist/cjs/event-bus/implementations/_shared/_module.js.map +1 -0
- package/dist/cjs/event-bus/implementations/_shared/{test-utilities/event-bus-adapter.test-suite.js → event-bus-adapter.test-suite.js} +4 -3
- package/dist/cjs/event-bus/implementations/_shared/event-bus-adapter.test-suite.js.map +1 -0
- package/dist/cjs/event-bus/implementations/_shared/event-bus.test-suite.js +299 -0
- package/dist/cjs/event-bus/implementations/_shared/event-bus.test-suite.js.map +1 -0
- package/dist/cjs/event-bus/implementations/adapters/memory-event-bus-adapter/memory-event-bus-adapter.js.map +1 -1
- package/dist/cjs/event-bus/implementations/adapters/redis-event-bus-adapter/redis-event-bus-adapter.js +2 -3
- package/dist/cjs/event-bus/implementations/adapters/redis-event-bus-adapter/redis-event-bus-adapter.js.map +1 -1
- package/dist/cjs/event-bus/implementations/derivables/base-event-bus.js +47 -0
- package/dist/cjs/event-bus/implementations/derivables/base-event-bus.js.map +1 -0
- package/dist/cjs/event-bus/implementations/derivables/event-bus-factory.js +3 -9
- package/dist/cjs/event-bus/implementations/derivables/event-bus-factory.js.map +1 -1
- package/dist/cjs/event-bus/implementations/derivables/event-bus.js +20 -55
- package/dist/cjs/event-bus/implementations/derivables/event-bus.js.map +1 -1
- package/dist/cjs/utilities/_module.js +5 -4
- package/dist/cjs/utilities/_module.js.map +1 -1
- package/dist/cjs/utilities/contracts/_module.js +19 -0
- package/dist/cjs/utilities/contracts/_module.js.map +1 -0
- package/dist/cjs/utilities/contracts/deinitizable.contract.js +3 -0
- package/dist/cjs/utilities/contracts/deinitizable.contract.js.map +1 -0
- package/dist/cjs/utilities/contracts/initizable.contract.js +3 -0
- package/dist/cjs/utilities/contracts/initizable.contract.js.map +1 -0
- package/dist/cjs/utilities/{global-errors.js → errors.js} +1 -1
- package/dist/cjs/utilities/errors.js.map +1 -0
- package/dist/cjs/{_shared/utilities.js → utilities/functions.js} +1 -1
- package/dist/cjs/utilities/functions.js.map +1 -0
- package/dist/cjs/{_shared → utilities}/kysely/_module.js +1 -1
- package/dist/cjs/utilities/kysely/_module.js.map +1 -0
- package/dist/cjs/utilities/kysely/kysely-table-name-transformer-plugin.js.map +1 -0
- package/dist/cjs/{_shared → utilities}/types.js.map +1 -1
- package/dist/esm/_module.js +1 -0
- package/dist/esm/_module.js.map +1 -1
- package/dist/esm/async/_module.js +4 -0
- package/dist/esm/async/_module.js.map +1 -0
- package/dist/esm/{utilities/async/_shared.js → async/async.errors.js} +1 -1
- package/dist/esm/async/async.errors.js.map +1 -0
- package/dist/esm/async/backof-policies/_module.js +5 -0
- package/dist/esm/async/backof-policies/_module.js.map +1 -0
- package/dist/esm/async/backof-policies/_shared.js.map +1 -0
- package/dist/esm/async/backof-policies/constant-backoff-policy/_module.js +2 -0
- package/dist/esm/async/backof-policies/constant-backoff-policy/_module.js.map +1 -0
- package/dist/esm/{utilities → async}/backof-policies/constant-backoff-policy/constant-backoff-policy.js +1 -1
- package/dist/esm/async/backof-policies/constant-backoff-policy/constant-backoff-policy.js.map +1 -0
- package/dist/esm/async/backof-policies/exponential-backoff-policy/_module.js +2 -0
- package/dist/esm/async/backof-policies/exponential-backoff-policy/_module.js.map +1 -0
- package/dist/esm/{utilities → async}/backof-policies/exponential-backoff-policy/exponential-backoff-policy.js +1 -1
- package/dist/esm/async/backof-policies/exponential-backoff-policy/exponential-backoff-policy.js.map +1 -0
- package/dist/esm/async/backof-policies/linear-backoff-policy/_module.js +2 -0
- package/dist/esm/async/backof-policies/linear-backoff-policy/_module.js.map +1 -0
- package/dist/esm/{utilities → async}/backof-policies/linear-backoff-policy/linear-backoff-policy.js +1 -1
- package/dist/esm/async/backof-policies/linear-backoff-policy/linear-backoff-policy.js.map +1 -0
- package/dist/esm/async/backof-policies/polynomial-backoff-policy/_module.js +2 -0
- package/dist/esm/async/backof-policies/polynomial-backoff-policy/_module.js.map +1 -0
- package/dist/esm/{utilities → async}/backof-policies/polynomial-backoff-policy/polynomial-backoff-policy.js +1 -1
- package/dist/esm/async/backof-policies/polynomial-backoff-policy/polynomial-backoff-policy.js.map +1 -0
- package/dist/esm/async/utilities/_module.js +3 -0
- package/dist/esm/async/utilities/_module.js.map +1 -0
- package/dist/esm/async/utilities/abort/_module.js +3 -0
- package/dist/esm/async/utilities/abort/_module.js.map +1 -0
- package/dist/esm/{utilities/async/abortable/abortable.js → async/utilities/abort/abort-and-fail.js} +13 -16
- package/dist/esm/async/utilities/abort/abort-and-fail.js.map +1 -0
- package/dist/esm/async/utilities/abort/abort.js +15 -0
- package/dist/esm/async/utilities/abort/abort.js.map +1 -0
- package/dist/esm/async/utilities/delay/_module.js +2 -0
- package/dist/esm/async/utilities/delay/_module.js.map +1 -0
- package/dist/esm/async/utilities/delay/delay.js +17 -0
- package/dist/esm/async/utilities/delay/delay.js.map +1 -0
- package/dist/esm/async/utilities/lazy-promise/_module.js +2 -0
- package/dist/esm/async/utilities/lazy-promise/_module.js.map +1 -0
- package/dist/esm/async/utilities/lazy-promise/lazy-promise.js +91 -0
- package/dist/esm/async/utilities/lazy-promise/lazy-promise.js.map +1 -0
- package/dist/esm/async/utilities/retry/_module.js +3 -0
- package/dist/esm/async/utilities/retry/_module.js.map +1 -0
- package/dist/esm/async/utilities/retry/retry-or-fail.js +33 -0
- package/dist/esm/async/utilities/retry/retry-or-fail.js.map +1 -0
- package/dist/esm/async/utilities/retry/retry.js +15 -0
- package/dist/esm/async/utilities/retry/retry.js.map +1 -0
- package/dist/esm/async/utilities/timeout/_module.js +3 -0
- package/dist/esm/async/utilities/timeout/_module.js.map +1 -0
- package/dist/esm/async/utilities/timeout/timeout-and-fail.js +22 -0
- package/dist/esm/async/utilities/timeout/timeout-and-fail.js.map +1 -0
- package/dist/esm/async/utilities/timeout/timeout.js +15 -0
- package/dist/esm/async/utilities/timeout/timeout.js.map +1 -0
- package/dist/esm/cache/contracts/cache.events.js +0 -10
- package/dist/esm/cache/contracts/cache.events.js.map +1 -1
- package/dist/esm/cache/implementations/_shared/cache-adapter.test-suite.js +2 -1
- package/dist/esm/cache/implementations/_shared/cache-adapter.test-suite.js.map +1 -1
- package/dist/esm/cache/implementations/_shared/cache.test-suite.js +2 -1
- package/dist/esm/cache/implementations/_shared/cache.test-suite.js.map +1 -1
- package/dist/esm/cache/implementations/adapters/_module.js +1 -0
- package/dist/esm/cache/implementations/adapters/_module.js.map +1 -1
- package/dist/esm/cache/implementations/adapters/libsql-cache-adapter/libsql-cache-adapter.js +4 -4
- package/dist/esm/cache/implementations/adapters/libsql-cache-adapter/libsql-cache-adapter.js.map +1 -1
- package/dist/esm/cache/implementations/adapters/memory-cache-adapter/memory-cache-adapter.js.map +1 -1
- package/dist/esm/cache/implementations/adapters/mongodb-cache-adapter/mongodb-cache-adapter.js +2 -2
- package/dist/esm/cache/implementations/adapters/mongodb-cache-adapter/mongodb-cache-adapter.js.map +1 -1
- package/dist/esm/cache/implementations/adapters/no-op-cache-adapter/_module.js +2 -0
- package/dist/esm/cache/implementations/adapters/no-op-cache-adapter/_module.js.map +1 -0
- package/dist/esm/cache/implementations/adapters/no-op-cache-adapter/no-op-cache-adapter.js +24 -0
- package/dist/esm/cache/implementations/adapters/no-op-cache-adapter/no-op-cache-adapter.js.map +1 -0
- package/dist/esm/cache/implementations/adapters/redis-cache-adapter/redis-cache-adapter.js +2 -2
- package/dist/esm/cache/implementations/adapters/redis-cache-adapter/redis-cache-adapter.js.map +1 -1
- package/dist/esm/cache/implementations/adapters/sqlite-cache-adapter/sqlite-cache-adapter.js +3 -3
- package/dist/esm/cache/implementations/adapters/sqlite-cache-adapter/sqlite-cache-adapter.js.map +1 -1
- package/dist/esm/cache/implementations/derivables/base-cache.js +37 -29
- package/dist/esm/cache/implementations/derivables/base-cache.js.map +1 -1
- package/dist/esm/cache/implementations/derivables/cache-factory.js +1 -1
- package/dist/esm/cache/implementations/derivables/cache-factory.js.map +1 -1
- package/dist/esm/cache/implementations/derivables/cache.js +16 -18
- package/dist/esm/cache/implementations/derivables/cache.js.map +1 -1
- package/dist/esm/collection/implementations/async-iterable-collection/_shared/_module.js +4 -1
- package/dist/esm/collection/implementations/async-iterable-collection/_shared/_module.js.map +1 -1
- package/dist/esm/collection/implementations/async-iterable-collection/_shared/async-delay-iterable.js +23 -0
- package/dist/esm/collection/implementations/async-iterable-collection/_shared/async-delay-iterable.js.map +1 -0
- package/dist/esm/collection/implementations/async-iterable-collection/_shared/async-retry-iterable.js +29 -0
- package/dist/esm/collection/implementations/async-iterable-collection/_shared/async-retry-iterable.js.map +1 -0
- package/dist/esm/collection/implementations/async-iterable-collection/_shared/async-take-until-abort-iterable.js +32 -0
- package/dist/esm/collection/implementations/async-iterable-collection/_shared/async-take-until-abort-iterable.js.map +1 -0
- package/dist/esm/collection/implementations/async-iterable-collection/_shared/async-take-until-timeout-iterable.js +44 -0
- package/dist/esm/collection/implementations/async-iterable-collection/_shared/async-take-until-timeout-iterable.js.map +1 -0
- package/dist/esm/collection/implementations/async-iterable-collection/async-iterable-collection.js +46 -37
- package/dist/esm/collection/implementations/async-iterable-collection/async-iterable-collection.js.map +1 -1
- package/dist/esm/collection/implementations/iterable-collection/iterable-collection.js +1 -1
- package/dist/esm/collection/implementations/list-collection/list-collection.js +1 -1
- package/dist/esm/event-bus/contracts/event-bus.errors.js +3 -3
- package/dist/esm/event-bus/contracts/event-bus.errors.js.map +1 -1
- package/dist/esm/event-bus/implementations/_module.js +1 -1
- package/dist/esm/event-bus/implementations/_module.js.map +1 -1
- package/dist/esm/event-bus/implementations/_shared/_module.js +3 -0
- package/dist/esm/event-bus/implementations/_shared/_module.js.map +1 -0
- package/dist/esm/event-bus/implementations/_shared/{test-utilities/event-bus-adapter.test-suite.js → event-bus-adapter.test-suite.js} +2 -1
- package/dist/esm/event-bus/implementations/_shared/event-bus-adapter.test-suite.js.map +1 -0
- package/dist/esm/event-bus/implementations/_shared/event-bus.test-suite.js +296 -0
- package/dist/esm/event-bus/implementations/_shared/event-bus.test-suite.js.map +1 -0
- package/dist/esm/event-bus/implementations/adapters/memory-event-bus-adapter/memory-event-bus-adapter.js.map +1 -1
- package/dist/esm/event-bus/implementations/adapters/redis-event-bus-adapter/redis-event-bus-adapter.js +3 -4
- package/dist/esm/event-bus/implementations/adapters/redis-event-bus-adapter/redis-event-bus-adapter.js.map +1 -1
- package/dist/esm/event-bus/implementations/derivables/base-event-bus.js +43 -0
- package/dist/esm/event-bus/implementations/derivables/base-event-bus.js.map +1 -0
- package/dist/esm/event-bus/implementations/derivables/event-bus-factory.js +1 -7
- package/dist/esm/event-bus/implementations/derivables/event-bus-factory.js.map +1 -1
- package/dist/esm/event-bus/implementations/derivables/event-bus.js +18 -53
- package/dist/esm/event-bus/implementations/derivables/event-bus.js.map +1 -1
- package/dist/esm/utilities/_module.js +5 -4
- package/dist/esm/utilities/_module.js.map +1 -1
- package/dist/esm/utilities/contracts/_module.js +3 -0
- package/dist/esm/utilities/contracts/_module.js.map +1 -0
- package/dist/esm/utilities/contracts/deinitizable.contract.js +1 -0
- package/dist/esm/utilities/contracts/deinitizable.contract.js.map +1 -0
- package/dist/esm/utilities/contracts/initizable.contract.js +1 -0
- package/dist/esm/utilities/contracts/initizable.contract.js.map +1 -0
- package/dist/esm/utilities/{global-errors.js → errors.js} +1 -1
- package/dist/esm/utilities/errors.js.map +1 -0
- package/dist/esm/{_shared/utilities.js → utilities/functions.js} +1 -1
- package/dist/esm/utilities/functions.js.map +1 -0
- package/dist/esm/utilities/kysely/_module.js +2 -0
- package/dist/esm/utilities/kysely/_module.js.map +1 -0
- package/dist/esm/utilities/kysely/kysely-table-name-transformer-plugin.js.map +1 -0
- package/dist/esm/{_shared → utilities}/types.js.map +1 -1
- package/dist/types/_module.d.ts +1 -0
- package/dist/types/async/_module.d.ts +3 -0
- package/dist/types/{utilities/async/_shared.d.ts → async/async.errors.d.ts} +6 -6
- package/dist/types/async/backof-policies/_module.d.ts +5 -0
- package/dist/types/{utilities → async}/backof-policies/_shared.d.ts +1 -1
- package/dist/types/async/backof-policies/constant-backoff-policy/_module.d.ts +1 -0
- package/dist/types/{utilities → async}/backof-policies/constant-backoff-policy/constant-backoff-policy.d.ts +2 -2
- package/dist/types/async/backof-policies/exponential-backoff-policy/_module.d.ts +1 -0
- package/dist/types/{utilities → async}/backof-policies/exponential-backoff-policy/exponential-backoff-policy.d.ts +2 -2
- package/dist/types/async/backof-policies/linear-backoff-policy/_module.d.ts +1 -0
- package/dist/types/{utilities → async}/backof-policies/linear-backoff-policy/linear-backoff-policy.d.ts +2 -2
- package/dist/types/async/backof-policies/polynomial-backoff-policy/_module.d.ts +1 -0
- package/dist/types/{utilities → async}/backof-policies/polynomial-backoff-policy/polynomial-backoff-policy.d.ts +2 -2
- package/dist/types/async/utilities/_module.d.ts +2 -0
- package/dist/types/async/utilities/abort/_module.d.ts +2 -0
- package/dist/types/async/utilities/abort/abort-and-fail.d.ts +4 -0
- package/dist/types/async/utilities/abort/abort.d.ts +9 -0
- package/dist/types/async/utilities/delay/_module.d.ts +1 -0
- package/dist/types/async/utilities/delay/delay.d.ts +19 -0
- package/dist/types/async/utilities/lazy-promise/_module.d.ts +1 -0
- package/dist/types/async/utilities/lazy-promise/lazy-promise.d.ts +185 -0
- package/dist/types/async/utilities/retry/_module.d.ts +2 -0
- package/dist/types/async/utilities/retry/retry-or-fail.d.ts +23 -0
- package/dist/types/async/utilities/retry/retry.d.ts +10 -0
- package/dist/types/async/utilities/timeout/_module.d.ts +2 -0
- package/dist/types/async/utilities/timeout/timeout-and-fail.d.ts +5 -0
- package/dist/types/async/utilities/timeout/timeout.d.ts +10 -0
- package/dist/types/cache/contracts/cache-adapter.contract.d.ts +1 -1
- package/dist/types/cache/contracts/cache.contract.d.ts +7 -28
- package/dist/types/cache/contracts/cache.events.d.ts +30 -79
- package/dist/types/cache/implementations/_shared/cache-adapter.test-suite.d.ts +26 -24
- package/dist/types/cache/implementations/_shared/cache.test-suite.d.ts +54 -43
- package/dist/types/cache/implementations/adapters/_module.d.ts +1 -0
- package/dist/types/cache/implementations/adapters/kysely-sqlite-cache-adapter/kysely-sqlite-cache-adapter.d.ts +1 -1
- package/dist/types/cache/implementations/adapters/libsql-cache-adapter/libsql-cache-adapter.d.ts +23 -4
- package/dist/types/cache/implementations/adapters/memory-cache-adapter/memory-cache-adapter.d.ts +15 -0
- package/dist/types/cache/implementations/adapters/mongodb-cache-adapter/mongodb-cache-adapter.d.ts +20 -4
- package/dist/types/cache/implementations/adapters/no-op-cache-adapter/_module.d.ts +1 -0
- package/dist/types/cache/implementations/adapters/no-op-cache-adapter/no-op-cache-adapter.d.ts +18 -0
- package/dist/types/cache/implementations/adapters/redis-cache-adapter/redis-cache-adapter.d.ts +14 -2
- package/dist/types/cache/implementations/adapters/sqlite-cache-adapter/sqlite-cache-adapter.d.ts +20 -3
- package/dist/types/cache/implementations/derivables/base-cache.d.ts +15 -14
- package/dist/types/cache/implementations/derivables/cache.d.ts +7 -4
- package/dist/types/collection/contracts/async-collection.contract.d.ts +10 -6
- package/dist/types/collection/contracts/collection.contract.d.ts +1 -1
- package/dist/types/collection/implementations/async-iterable-collection/_shared/_module.d.ts +4 -1
- package/dist/types/collection/implementations/async-iterable-collection/_shared/async-chunk-iterable.d.ts +1 -1
- package/dist/types/collection/implementations/async-iterable-collection/_shared/async-chunk-while-iterable.d.ts +1 -1
- package/dist/types/collection/implementations/async-iterable-collection/_shared/async-cross-join-iterable.d.ts +1 -1
- package/dist/types/collection/implementations/async-iterable-collection/_shared/async-delay-iterable.d.ts +13 -0
- package/dist/types/collection/implementations/async-iterable-collection/_shared/async-entries-iterable.d.ts +1 -1
- package/dist/types/collection/implementations/async-iterable-collection/_shared/async-group-by-iterable.d.ts +1 -1
- package/dist/types/collection/implementations/async-iterable-collection/_shared/async-insert-after-iterable.d.ts +1 -1
- package/dist/types/collection/implementations/async-iterable-collection/_shared/async-insert-before-iterable.d.ts +1 -1
- package/dist/types/collection/implementations/async-iterable-collection/_shared/async-merge-iterable.d.ts +1 -1
- package/dist/types/collection/implementations/async-iterable-collection/_shared/async-pad-end-iterable.d.ts +1 -1
- package/dist/types/collection/implementations/async-iterable-collection/_shared/async-pad-start-iterable.d.ts +1 -1
- package/dist/types/collection/implementations/async-iterable-collection/_shared/async-partion-iterable.d.ts +1 -1
- package/dist/types/collection/implementations/async-iterable-collection/_shared/async-repeat-iterable.d.ts +1 -1
- package/dist/types/collection/implementations/async-iterable-collection/_shared/async-retry-iterable.d.ts +13 -0
- package/dist/types/collection/implementations/async-iterable-collection/_shared/async-reverse-iterable.d.ts +1 -1
- package/dist/types/collection/implementations/async-iterable-collection/_shared/async-split-iterable.d.ts +1 -1
- package/dist/types/collection/implementations/async-iterable-collection/_shared/async-take-until-abort-iterable.d.ts +9 -0
- package/dist/types/collection/implementations/async-iterable-collection/_shared/async-take-until-timeout-iterable.d.ts +13 -0
- package/dist/types/collection/implementations/async-iterable-collection/_shared/async-zip-iterable.d.ts +1 -1
- package/dist/types/collection/implementations/async-iterable-collection/async-iterable-collection.d.ts +4 -3
- package/dist/types/collection/implementations/iterable-collection/iterable-collection.d.ts +1 -1
- package/dist/types/collection/implementations/list-collection/list-collection.d.ts +1 -1
- package/dist/types/event-bus/contracts/_shared.d.ts +2 -5
- package/dist/types/event-bus/contracts/event-bus-adapter.contract.d.ts +4 -1
- package/dist/types/event-bus/contracts/event-bus-factory.contract.d.ts +3 -28
- package/dist/types/event-bus/contracts/event-bus.contract.d.ts +24 -16
- package/dist/types/event-bus/contracts/event-bus.errors.d.ts +3 -3
- package/dist/types/event-bus/implementations/_module.d.ts +1 -1
- package/dist/types/event-bus/implementations/_shared/_module.d.ts +2 -0
- package/dist/types/event-bus/implementations/_shared/event-bus-adapter.test-suite.d.ts +59 -0
- package/dist/types/event-bus/implementations/_shared/event-bus.test-suite.d.ts +72 -0
- package/dist/types/event-bus/implementations/adapters/memory-event-bus-adapter/memory-event-bus-adapter.d.ts +16 -0
- package/dist/types/event-bus/implementations/adapters/redis-event-bus-adapter/redis-event-bus-adapter.d.ts +16 -1
- package/dist/types/event-bus/implementations/derivables/base-event-bus.d.ts +23 -0
- package/dist/types/event-bus/implementations/derivables/event-bus-factory.d.ts +4 -7
- package/dist/types/event-bus/implementations/derivables/event-bus.d.ts +11 -53
- package/dist/types/serializer/implementations/_shared/test-utilities/serializer.test-suite.d.ts +1 -1
- package/dist/types/utilities/_module.d.ts +5 -4
- package/dist/types/utilities/contracts/_module.d.ts +2 -0
- package/dist/types/utilities/contracts/deinitizable.contract.d.ts +9 -0
- package/dist/types/utilities/contracts/initizable.contract.d.ts +9 -0
- package/dist/types/utilities/{global-errors.d.ts → errors.d.ts} +10 -1
- package/dist/types/{_shared/utilities.d.ts → utilities/functions.d.ts} +3 -3
- package/dist/types/utilities/kysely/_module.d.ts +1 -0
- package/dist/types/{_shared → utilities}/kysely/kysely-table-name-transformer-plugin.d.ts +1 -1
- package/dist/types/{_shared → utilities}/types.d.ts +3 -8
- package/package.json +1 -1
- package/dist/cjs/_shared/kysely/_module.js.map +0 -1
- package/dist/cjs/_shared/kysely/kysely-table-name-transformer-plugin.js.map +0 -1
- package/dist/cjs/_shared/redis/_module.js +0 -20
- package/dist/cjs/_shared/redis/_module.js.map +0 -1
- package/dist/cjs/_shared/redis/clear-iterable.js +0 -25
- package/dist/cjs/_shared/redis/clear-iterable.js.map +0 -1
- package/dist/cjs/_shared/redis/escape-redis-chars.js +0 -41
- package/dist/cjs/_shared/redis/escape-redis-chars.js.map +0 -1
- package/dist/cjs/_shared/redis/is-redis-type-error.js +0 -9
- package/dist/cjs/_shared/redis/is-redis-type-error.js.map +0 -1
- package/dist/cjs/_shared/utilities.js.map +0 -1
- package/dist/cjs/collection/implementations/async-iterable-collection/_shared/async-error-handler-iterable.js +0 -31
- package/dist/cjs/collection/implementations/async-iterable-collection/_shared/async-error-handler-iterable.js.map +0 -1
- package/dist/cjs/event-bus/implementations/_shared/test-utilities/_module.js.map +0 -1
- package/dist/cjs/event-bus/implementations/_shared/test-utilities/event-bus-adapter.test-suite.js.map +0 -1
- package/dist/cjs/event-bus/implementations/derivables/with-validation-event-bus-adapter.js +0 -35
- package/dist/cjs/event-bus/implementations/derivables/with-validation-event-bus-adapter.js.map +0 -1
- package/dist/cjs/utilities/async/_module.js +0 -29
- package/dist/cjs/utilities/async/_module.js.map +0 -1
- package/dist/cjs/utilities/async/_shared.js.map +0 -1
- package/dist/cjs/utilities/async/abortable/_module.js.map +0 -1
- package/dist/cjs/utilities/async/abortable/abortable.js +0 -48
- package/dist/cjs/utilities/async/abortable/abortable.js.map +0 -1
- package/dist/cjs/utilities/async/abortable-iterable/_module.js.map +0 -1
- package/dist/cjs/utilities/async/abortable-iterable/abortable-iterable.js +0 -32
- package/dist/cjs/utilities/async/abortable-iterable/abortable-iterable.js.map +0 -1
- package/dist/cjs/utilities/async/delay/_module.js.map +0 -1
- package/dist/cjs/utilities/async/delay/delay.js +0 -24
- package/dist/cjs/utilities/async/delay/delay.js.map +0 -1
- package/dist/cjs/utilities/async/delay-iterable/_module.js.map +0 -1
- package/dist/cjs/utilities/async/delay-iterable/delay-iterable.js +0 -36
- package/dist/cjs/utilities/async/delay-iterable/delay-iterable.js.map +0 -1
- package/dist/cjs/utilities/async/lazy-promise/_module.js.map +0 -1
- package/dist/cjs/utilities/async/lazy-promise/lazy-promise.js +0 -22
- package/dist/cjs/utilities/async/lazy-promise/lazy-promise.js.map +0 -1
- package/dist/cjs/utilities/async/retry/_module.js.map +0 -1
- package/dist/cjs/utilities/async/retry/retry.js +0 -43
- package/dist/cjs/utilities/async/retry/retry.js.map +0 -1
- package/dist/cjs/utilities/async/retry-iterable/_module.js +0 -18
- package/dist/cjs/utilities/async/retry-iterable/_module.js.map +0 -1
- package/dist/cjs/utilities/async/retry-iterable/retry-iterable.js +0 -32
- package/dist/cjs/utilities/async/retry-iterable/retry-iterable.js.map +0 -1
- package/dist/cjs/utilities/async/timeout/_module.js.map +0 -1
- package/dist/cjs/utilities/async/timeout/timeout.js +0 -28
- package/dist/cjs/utilities/async/timeout/timeout.js.map +0 -1
- package/dist/cjs/utilities/async/timeout-iterable/_module.js +0 -18
- package/dist/cjs/utilities/async/timeout-iterable/_module.js.map +0 -1
- package/dist/cjs/utilities/async/timeout-iterable/timeout-iterable.js +0 -11
- package/dist/cjs/utilities/async/timeout-iterable/timeout-iterable.js.map +0 -1
- package/dist/cjs/utilities/backof-policies/_module.js.map +0 -1
- package/dist/cjs/utilities/backof-policies/_shared.js.map +0 -1
- package/dist/cjs/utilities/backof-policies/constant-backoff-policy/_module.js +0 -18
- package/dist/cjs/utilities/backof-policies/constant-backoff-policy/_module.js.map +0 -1
- package/dist/cjs/utilities/backof-policies/constant-backoff-policy/constant-backoff-policy.js.map +0 -1
- package/dist/cjs/utilities/backof-policies/exponential-backoff-policy/_module.js +0 -18
- package/dist/cjs/utilities/backof-policies/exponential-backoff-policy/_module.js.map +0 -1
- package/dist/cjs/utilities/backof-policies/exponential-backoff-policy/exponential-backoff-policy.js.map +0 -1
- package/dist/cjs/utilities/backof-policies/linear-backoff-policy/_module.js +0 -18
- package/dist/cjs/utilities/backof-policies/linear-backoff-policy/_module.js.map +0 -1
- package/dist/cjs/utilities/backof-policies/linear-backoff-policy/linear-backoff-policy.js.map +0 -1
- package/dist/cjs/utilities/backof-policies/polynomial-backoff-policy/_module.js +0 -18
- package/dist/cjs/utilities/backof-policies/polynomial-backoff-policy/_module.js.map +0 -1
- package/dist/cjs/utilities/backof-policies/polynomial-backoff-policy/polynomial-backoff-policy.js.map +0 -1
- package/dist/cjs/utilities/global-errors.js.map +0 -1
- package/dist/cjs/utilities/validation/_module.js +0 -22
- package/dist/cjs/utilities/validation/_module.js.map +0 -1
- package/dist/esm/_shared/kysely/_module.js +0 -2
- package/dist/esm/_shared/kysely/_module.js.map +0 -1
- package/dist/esm/_shared/kysely/kysely-table-name-transformer-plugin.js.map +0 -1
- package/dist/esm/_shared/redis/_module.js +0 -4
- package/dist/esm/_shared/redis/_module.js.map +0 -1
- package/dist/esm/_shared/redis/clear-iterable.js +0 -21
- package/dist/esm/_shared/redis/clear-iterable.js.map +0 -1
- package/dist/esm/_shared/redis/escape-redis-chars.js +0 -38
- package/dist/esm/_shared/redis/escape-redis-chars.js.map +0 -1
- package/dist/esm/_shared/redis/is-redis-type-error.js +0 -6
- package/dist/esm/_shared/redis/is-redis-type-error.js.map +0 -1
- package/dist/esm/_shared/utilities.js.map +0 -1
- package/dist/esm/collection/implementations/async-iterable-collection/_shared/async-error-handler-iterable.js +0 -27
- package/dist/esm/collection/implementations/async-iterable-collection/_shared/async-error-handler-iterable.js.map +0 -1
- package/dist/esm/event-bus/implementations/_shared/test-utilities/_module.js +0 -2
- package/dist/esm/event-bus/implementations/_shared/test-utilities/_module.js.map +0 -1
- package/dist/esm/event-bus/implementations/_shared/test-utilities/event-bus-adapter.test-suite.js.map +0 -1
- package/dist/esm/event-bus/implementations/derivables/with-validation-event-bus-adapter.js +0 -31
- package/dist/esm/event-bus/implementations/derivables/with-validation-event-bus-adapter.js.map +0 -1
- package/dist/esm/utilities/async/_module.js +0 -11
- package/dist/esm/utilities/async/_module.js.map +0 -1
- package/dist/esm/utilities/async/_shared.js.map +0 -1
- package/dist/esm/utilities/async/abortable/_module.js +0 -2
- package/dist/esm/utilities/async/abortable/_module.js.map +0 -1
- package/dist/esm/utilities/async/abortable/abortable.js.map +0 -1
- package/dist/esm/utilities/async/abortable-iterable/_module.js +0 -2
- package/dist/esm/utilities/async/abortable-iterable/_module.js.map +0 -1
- package/dist/esm/utilities/async/abortable-iterable/abortable-iterable.js +0 -29
- package/dist/esm/utilities/async/abortable-iterable/abortable-iterable.js.map +0 -1
- package/dist/esm/utilities/async/delay/_module.js +0 -2
- package/dist/esm/utilities/async/delay/_module.js.map +0 -1
- package/dist/esm/utilities/async/delay/delay.js +0 -21
- package/dist/esm/utilities/async/delay/delay.js.map +0 -1
- package/dist/esm/utilities/async/delay-iterable/_module.js +0 -2
- package/dist/esm/utilities/async/delay-iterable/_module.js.map +0 -1
- package/dist/esm/utilities/async/delay-iterable/delay-iterable.js +0 -33
- package/dist/esm/utilities/async/delay-iterable/delay-iterable.js.map +0 -1
- package/dist/esm/utilities/async/lazy-promise/_module.js +0 -2
- package/dist/esm/utilities/async/lazy-promise/_module.js.map +0 -1
- package/dist/esm/utilities/async/lazy-promise/lazy-promise.js +0 -17
- package/dist/esm/utilities/async/lazy-promise/lazy-promise.js.map +0 -1
- package/dist/esm/utilities/async/retry/_module.js +0 -2
- package/dist/esm/utilities/async/retry/_module.js.map +0 -1
- package/dist/esm/utilities/async/retry/retry.js +0 -40
- package/dist/esm/utilities/async/retry/retry.js.map +0 -1
- package/dist/esm/utilities/async/retry-iterable/_module.js +0 -2
- package/dist/esm/utilities/async/retry-iterable/_module.js.map +0 -1
- package/dist/esm/utilities/async/retry-iterable/retry-iterable.js +0 -29
- package/dist/esm/utilities/async/retry-iterable/retry-iterable.js.map +0 -1
- package/dist/esm/utilities/async/timeout/_module.js +0 -2
- package/dist/esm/utilities/async/timeout/_module.js.map +0 -1
- package/dist/esm/utilities/async/timeout/timeout.js +0 -25
- package/dist/esm/utilities/async/timeout/timeout.js.map +0 -1
- package/dist/esm/utilities/async/timeout-iterable/_module.js +0 -2
- package/dist/esm/utilities/async/timeout-iterable/_module.js.map +0 -1
- package/dist/esm/utilities/async/timeout-iterable/timeout-iterable.js +0 -8
- package/dist/esm/utilities/async/timeout-iterable/timeout-iterable.js.map +0 -1
- package/dist/esm/utilities/backof-policies/_module.js +0 -5
- package/dist/esm/utilities/backof-policies/_module.js.map +0 -1
- package/dist/esm/utilities/backof-policies/_shared.js.map +0 -1
- package/dist/esm/utilities/backof-policies/constant-backoff-policy/_module.js +0 -2
- package/dist/esm/utilities/backof-policies/constant-backoff-policy/_module.js.map +0 -1
- package/dist/esm/utilities/backof-policies/constant-backoff-policy/constant-backoff-policy.js.map +0 -1
- package/dist/esm/utilities/backof-policies/exponential-backoff-policy/_module.js +0 -2
- package/dist/esm/utilities/backof-policies/exponential-backoff-policy/_module.js.map +0 -1
- package/dist/esm/utilities/backof-policies/exponential-backoff-policy/exponential-backoff-policy.js.map +0 -1
- package/dist/esm/utilities/backof-policies/linear-backoff-policy/_module.js +0 -2
- package/dist/esm/utilities/backof-policies/linear-backoff-policy/_module.js.map +0 -1
- package/dist/esm/utilities/backof-policies/linear-backoff-policy/linear-backoff-policy.js.map +0 -1
- package/dist/esm/utilities/backof-policies/polynomial-backoff-policy/_module.js +0 -2
- package/dist/esm/utilities/backof-policies/polynomial-backoff-policy/_module.js.map +0 -1
- package/dist/esm/utilities/backof-policies/polynomial-backoff-policy/polynomial-backoff-policy.js.map +0 -1
- package/dist/esm/utilities/global-errors.js.map +0 -1
- package/dist/esm/utilities/validation/_module.js +0 -17
- package/dist/esm/utilities/validation/_module.js.map +0 -1
- package/dist/types/_shared/kysely/_module.d.ts +0 -1
- package/dist/types/_shared/redis/_module.d.ts +0 -3
- package/dist/types/_shared/redis/clear-iterable.d.ts +0 -13
- package/dist/types/_shared/redis/escape-redis-chars.d.ts +0 -7
- package/dist/types/_shared/redis/is-redis-type-error.d.ts +0 -7
- package/dist/types/collection/implementations/async-iterable-collection/_shared/async-error-handler-iterable.d.ts +0 -12
- package/dist/types/event-bus/implementations/_shared/test-utilities/_module.d.ts +0 -1
- package/dist/types/event-bus/implementations/_shared/test-utilities/event-bus-adapter.test-suite.d.ts +0 -36
- package/dist/types/event-bus/implementations/derivables/with-validation-event-bus-adapter.d.ts +0 -17
- package/dist/types/utilities/async/_module.d.ts +0 -10
- package/dist/types/utilities/async/abortable/_module.d.ts +0 -1
- package/dist/types/utilities/async/abortable/abortable.d.ts +0 -39
- package/dist/types/utilities/async/abortable-iterable/_module.d.ts +0 -1
- package/dist/types/utilities/async/abortable-iterable/abortable-iterable.d.ts +0 -36
- package/dist/types/utilities/async/delay/_module.d.ts +0 -1
- package/dist/types/utilities/async/delay/delay.d.ts +0 -38
- package/dist/types/utilities/async/delay-iterable/_module.d.ts +0 -1
- package/dist/types/utilities/async/delay-iterable/delay-iterable.d.ts +0 -57
- package/dist/types/utilities/async/lazy-promise/_module.d.ts +0 -1
- package/dist/types/utilities/async/lazy-promise/lazy-promise.d.ts +0 -28
- package/dist/types/utilities/async/retry/_module.d.ts +0 -1
- package/dist/types/utilities/async/retry/retry.d.ts +0 -89
- package/dist/types/utilities/async/retry-iterable/_module.d.ts +0 -1
- package/dist/types/utilities/async/retry-iterable/retry-iterable.d.ts +0 -86
- package/dist/types/utilities/async/timeout/_module.d.ts +0 -1
- package/dist/types/utilities/async/timeout/timeout.d.ts +0 -40
- package/dist/types/utilities/async/timeout-iterable/_module.d.ts +0 -1
- package/dist/types/utilities/async/timeout-iterable/timeout-iterable.d.ts +0 -64
- package/dist/types/utilities/backof-policies/_module.d.ts +0 -5
- package/dist/types/utilities/backof-policies/constant-backoff-policy/_module.d.ts +0 -1
- package/dist/types/utilities/backof-policies/exponential-backoff-policy/_module.d.ts +0 -1
- package/dist/types/utilities/backof-policies/linear-backoff-policy/_module.d.ts +0 -1
- package/dist/types/utilities/backof-policies/polynomial-backoff-policy/_module.d.ts +0 -1
- package/dist/types/utilities/validation/_module.d.ts +0 -32
- /package/dist/cjs/{utilities → async}/backof-policies/_shared.js +0 -0
- /package/dist/cjs/{_shared → utilities}/kysely/kysely-table-name-transformer-plugin.js +0 -0
- /package/dist/cjs/{_shared → utilities}/types.js +0 -0
- /package/dist/esm/{utilities → async}/backof-policies/_shared.js +0 -0
- /package/dist/esm/{_shared → utilities}/kysely/kysely-table-name-transformer-plugin.js +0 -0
- /package/dist/esm/{_shared → utilities}/types.js +0 -0
|
@@ -0,0 +1,296 @@
|
|
|
1
|
+
import { TimeSpan } from "../../../utilities/_module";
|
|
2
|
+
import { delay } from "../../../async/_module";
|
|
3
|
+
export function eventBusTestSuite(settings) {
|
|
4
|
+
const { expect, test, describe, createEventBusA, createEventBusB, beforeEach, } = settings;
|
|
5
|
+
let eventBusA;
|
|
6
|
+
let eventBusB;
|
|
7
|
+
beforeEach(async () => {
|
|
8
|
+
eventBusA = await createEventBusA();
|
|
9
|
+
eventBusB = await createEventBusB();
|
|
10
|
+
});
|
|
11
|
+
describe("Api tests:", () => {
|
|
12
|
+
describe("method: addListener, removeListener, dispatch", () => {
|
|
13
|
+
test("Should be null when listener added and event is not triggered", async () => {
|
|
14
|
+
const TYPE = "type";
|
|
15
|
+
let result = null;
|
|
16
|
+
await eventBusA.addListener(TYPE, (event) => {
|
|
17
|
+
result = event;
|
|
18
|
+
});
|
|
19
|
+
expect(result).toBeNull();
|
|
20
|
+
});
|
|
21
|
+
test("Should be IBaseEvent when listener added and event is triggered", async () => {
|
|
22
|
+
const event = {
|
|
23
|
+
type: "type",
|
|
24
|
+
};
|
|
25
|
+
let result = null;
|
|
26
|
+
await eventBusA.addListener(event.type, (event) => {
|
|
27
|
+
result = event;
|
|
28
|
+
});
|
|
29
|
+
await delay(TimeSpan.fromMilliseconds(50));
|
|
30
|
+
await eventBusA.dispatch([event]);
|
|
31
|
+
expect(result).toEqual(event);
|
|
32
|
+
});
|
|
33
|
+
test("Should be null when listener removed and event is triggered", async () => {
|
|
34
|
+
const event = {
|
|
35
|
+
type: "type",
|
|
36
|
+
};
|
|
37
|
+
let result = null;
|
|
38
|
+
const listener = (event) => {
|
|
39
|
+
result = event;
|
|
40
|
+
};
|
|
41
|
+
await eventBusA.addListener(event.type, listener);
|
|
42
|
+
await eventBusA.removeListener(event.type, listener);
|
|
43
|
+
await delay(TimeSpan.fromMilliseconds(50));
|
|
44
|
+
await eventBusA.dispatch([event]);
|
|
45
|
+
expect(result).toBeNull();
|
|
46
|
+
});
|
|
47
|
+
});
|
|
48
|
+
describe("method: addListenerMany, removeListenerMany, dispatch", () => {
|
|
49
|
+
test("Should be null when listener added and event is not triggered", async () => {
|
|
50
|
+
const TYPE_1 = "type_1";
|
|
51
|
+
const TYPE_2 = "type_2";
|
|
52
|
+
let result = null;
|
|
53
|
+
await eventBusA.addListenerMany([TYPE_1, TYPE_2], (event) => {
|
|
54
|
+
result = event;
|
|
55
|
+
});
|
|
56
|
+
expect(result).toBeNull();
|
|
57
|
+
});
|
|
58
|
+
test("Should be IBaseEvent when listener added and event is triggered", async () => {
|
|
59
|
+
const event_1 = {
|
|
60
|
+
type: "type_1",
|
|
61
|
+
};
|
|
62
|
+
const event_2 = {
|
|
63
|
+
type: "type_2",
|
|
64
|
+
};
|
|
65
|
+
let result_1 = null;
|
|
66
|
+
let result_2 = null;
|
|
67
|
+
await eventBusA.addListenerMany([event_1.type, event_2.type], (eventObj) => {
|
|
68
|
+
if (eventObj.type === event_1.type) {
|
|
69
|
+
result_1 = eventObj;
|
|
70
|
+
}
|
|
71
|
+
if (eventObj.type === event_2.type) {
|
|
72
|
+
result_2 = eventObj;
|
|
73
|
+
}
|
|
74
|
+
});
|
|
75
|
+
await delay(TimeSpan.fromMilliseconds(50));
|
|
76
|
+
await eventBusA.dispatch([event_1, event_2]);
|
|
77
|
+
expect(result_1).toEqual(event_1);
|
|
78
|
+
expect(result_2).toEqual(event_2);
|
|
79
|
+
});
|
|
80
|
+
test("Should be null when listener removed and event is triggered", async () => {
|
|
81
|
+
const event_A = {
|
|
82
|
+
type: "type_a",
|
|
83
|
+
};
|
|
84
|
+
const event_B = {
|
|
85
|
+
type: "type_b",
|
|
86
|
+
};
|
|
87
|
+
let result = null;
|
|
88
|
+
const listener = (event) => {
|
|
89
|
+
result = event;
|
|
90
|
+
};
|
|
91
|
+
await eventBusA.addListenerMany([event_A.type, event_B.type], listener);
|
|
92
|
+
await eventBusA.removeListenerMany([event_A.type, event_B.type], listener);
|
|
93
|
+
await delay(TimeSpan.fromMilliseconds(50));
|
|
94
|
+
await eventBusA.dispatch([event_A, event_B]);
|
|
95
|
+
expect(result).toBeNull();
|
|
96
|
+
});
|
|
97
|
+
});
|
|
98
|
+
describe("method: subscribe", () => {
|
|
99
|
+
test("Should be null when listener added and event is not triggered", async () => {
|
|
100
|
+
const TYPE = "type";
|
|
101
|
+
let result = null;
|
|
102
|
+
await eventBusA.subscribe(TYPE, (event) => {
|
|
103
|
+
result = event;
|
|
104
|
+
});
|
|
105
|
+
expect(result).toBeNull();
|
|
106
|
+
});
|
|
107
|
+
test("Should be IBaseEvent when listener added and event is triggered", async () => {
|
|
108
|
+
const event = {
|
|
109
|
+
type: "type",
|
|
110
|
+
};
|
|
111
|
+
let result = null;
|
|
112
|
+
await eventBusA.subscribe(event.type, (event) => {
|
|
113
|
+
result = event;
|
|
114
|
+
});
|
|
115
|
+
await delay(TimeSpan.fromMilliseconds(50));
|
|
116
|
+
await eventBusA.dispatch([event]);
|
|
117
|
+
expect(result).toEqual(event);
|
|
118
|
+
});
|
|
119
|
+
test("Should be null when listener removed and event is triggered", async () => {
|
|
120
|
+
const event = {
|
|
121
|
+
type: "type",
|
|
122
|
+
};
|
|
123
|
+
let result = null;
|
|
124
|
+
const listener = (event) => {
|
|
125
|
+
result = event;
|
|
126
|
+
};
|
|
127
|
+
const unsubscribe = await eventBusA.subscribe(event.type, listener);
|
|
128
|
+
await unsubscribe();
|
|
129
|
+
await delay(TimeSpan.fromMilliseconds(50));
|
|
130
|
+
await eventBusA.dispatch([event]);
|
|
131
|
+
expect(result).toBeNull();
|
|
132
|
+
});
|
|
133
|
+
});
|
|
134
|
+
describe("method: subscribeMany", () => {
|
|
135
|
+
test("Should be null when listener added and event is not triggered", async () => {
|
|
136
|
+
const TYPE_1 = "type_1";
|
|
137
|
+
const TYPE_2 = "type_2";
|
|
138
|
+
let result = null;
|
|
139
|
+
await eventBusA.subscribeMany([TYPE_1, TYPE_2], (event) => {
|
|
140
|
+
result = event;
|
|
141
|
+
});
|
|
142
|
+
expect(result).toBeNull();
|
|
143
|
+
});
|
|
144
|
+
test("Should be IBaseEvent when listener added and event is triggered", async () => {
|
|
145
|
+
const event_1 = {
|
|
146
|
+
type: "type_1",
|
|
147
|
+
};
|
|
148
|
+
const event_2 = {
|
|
149
|
+
type: "type_2",
|
|
150
|
+
};
|
|
151
|
+
let result_1 = null;
|
|
152
|
+
let result_2 = null;
|
|
153
|
+
await eventBusA.subscribeMany([event_1.type, event_2.type], (eventObj) => {
|
|
154
|
+
if (eventObj.type === event_1.type) {
|
|
155
|
+
result_1 = eventObj;
|
|
156
|
+
}
|
|
157
|
+
if (eventObj.type === event_2.type) {
|
|
158
|
+
result_2 = eventObj;
|
|
159
|
+
}
|
|
160
|
+
});
|
|
161
|
+
await delay(TimeSpan.fromMilliseconds(50));
|
|
162
|
+
await eventBusA.dispatch([event_1, event_2]);
|
|
163
|
+
expect(result_1).toEqual(event_1);
|
|
164
|
+
expect(result_2).toEqual(event_2);
|
|
165
|
+
});
|
|
166
|
+
test("Should be null when listener removed and event is triggered", async () => {
|
|
167
|
+
const event_A = {
|
|
168
|
+
type: "type_a",
|
|
169
|
+
};
|
|
170
|
+
const event_B = {
|
|
171
|
+
type: "type_b",
|
|
172
|
+
};
|
|
173
|
+
let result = null;
|
|
174
|
+
const listener = (event) => {
|
|
175
|
+
result = event;
|
|
176
|
+
};
|
|
177
|
+
const unsubscribe = await eventBusA.subscribeMany([event_A.type, event_B.type], listener);
|
|
178
|
+
await unsubscribe();
|
|
179
|
+
await delay(TimeSpan.fromMilliseconds(50));
|
|
180
|
+
await eventBusA.dispatch([event_A, event_B]);
|
|
181
|
+
expect(result).toBeNull();
|
|
182
|
+
});
|
|
183
|
+
});
|
|
184
|
+
});
|
|
185
|
+
describe("Namespace tests:", () => {
|
|
186
|
+
test("method: addListener / dispatch", async () => {
|
|
187
|
+
const event = {
|
|
188
|
+
type: "type",
|
|
189
|
+
};
|
|
190
|
+
let result_a = null;
|
|
191
|
+
await eventBusA.addListener(event.type, (event) => {
|
|
192
|
+
result_a = event;
|
|
193
|
+
});
|
|
194
|
+
let result_b = null;
|
|
195
|
+
await eventBusB.addListener(event.type, (event) => {
|
|
196
|
+
result_b = event;
|
|
197
|
+
});
|
|
198
|
+
await eventBusA.dispatch([event]);
|
|
199
|
+
expect(result_a).toEqual(event);
|
|
200
|
+
expect(result_b).toBeNull();
|
|
201
|
+
});
|
|
202
|
+
test("method: addListenerMany / dispatch", async () => {
|
|
203
|
+
const event = {
|
|
204
|
+
type: "type",
|
|
205
|
+
};
|
|
206
|
+
let result_a = null;
|
|
207
|
+
await eventBusA.addListenerMany([event.type], (event) => {
|
|
208
|
+
result_a = event;
|
|
209
|
+
});
|
|
210
|
+
let result_b = null;
|
|
211
|
+
await eventBusB.addListenerMany([event.type], (event) => {
|
|
212
|
+
result_b = event;
|
|
213
|
+
});
|
|
214
|
+
await eventBusA.dispatch([event]);
|
|
215
|
+
expect(result_a).toEqual(event);
|
|
216
|
+
expect(result_b).toBeNull();
|
|
217
|
+
});
|
|
218
|
+
test("method: removeListener / addListener / dispatch", async () => {
|
|
219
|
+
const event = {
|
|
220
|
+
type: "type",
|
|
221
|
+
};
|
|
222
|
+
let result_a = null;
|
|
223
|
+
await eventBusA.addListener(event.type, (event) => {
|
|
224
|
+
result_a = event;
|
|
225
|
+
});
|
|
226
|
+
let result_b = null;
|
|
227
|
+
const listenerB = (event) => {
|
|
228
|
+
result_b = event;
|
|
229
|
+
};
|
|
230
|
+
await eventBusB.addListener(event.type, listenerB);
|
|
231
|
+
await eventBusB.removeListener(event.type, listenerB);
|
|
232
|
+
await eventBusA.dispatch([event]);
|
|
233
|
+
await eventBusB.dispatch([event]);
|
|
234
|
+
expect(result_a).toEqual(event);
|
|
235
|
+
expect(result_b).toBeNull();
|
|
236
|
+
});
|
|
237
|
+
test("method: removeListenerMany / addListener / dispatch", async () => {
|
|
238
|
+
const event = {
|
|
239
|
+
type: "type",
|
|
240
|
+
};
|
|
241
|
+
let result_a = null;
|
|
242
|
+
await eventBusA.addListener(event.type, (event) => {
|
|
243
|
+
result_a = event;
|
|
244
|
+
});
|
|
245
|
+
let result_b = null;
|
|
246
|
+
const listenerB = (event) => {
|
|
247
|
+
result_b = event;
|
|
248
|
+
};
|
|
249
|
+
await eventBusB.addListener(event.type, listenerB);
|
|
250
|
+
await eventBusB.removeListenerMany([event.type], listenerB);
|
|
251
|
+
await eventBusA.dispatch([event]);
|
|
252
|
+
await eventBusB.dispatch([event]);
|
|
253
|
+
expect(result_a).toEqual(event);
|
|
254
|
+
expect(result_b).toBeNull();
|
|
255
|
+
});
|
|
256
|
+
test("method: subscribe / dispatch", async () => {
|
|
257
|
+
const event = {
|
|
258
|
+
type: "type",
|
|
259
|
+
};
|
|
260
|
+
let result_a = null;
|
|
261
|
+
await eventBusA.subscribe(event.type, (event) => {
|
|
262
|
+
result_a = event;
|
|
263
|
+
});
|
|
264
|
+
let result_b = null;
|
|
265
|
+
const listenerB = (event) => {
|
|
266
|
+
result_b = event;
|
|
267
|
+
};
|
|
268
|
+
const unsubscribe = await eventBusB.subscribe(event.type, listenerB);
|
|
269
|
+
await unsubscribe();
|
|
270
|
+
await eventBusA.dispatch([event]);
|
|
271
|
+
await eventBusB.dispatch([event]);
|
|
272
|
+
expect(result_a).toEqual(event);
|
|
273
|
+
expect(result_b).toBeNull();
|
|
274
|
+
});
|
|
275
|
+
test("method: subscribeMany / dispatch", async () => {
|
|
276
|
+
const event = {
|
|
277
|
+
type: "type",
|
|
278
|
+
};
|
|
279
|
+
let result_a = null;
|
|
280
|
+
await eventBusA.subscribeMany([event.type], (event) => {
|
|
281
|
+
result_a = event;
|
|
282
|
+
});
|
|
283
|
+
let result_b = null;
|
|
284
|
+
const listenerB = (event) => {
|
|
285
|
+
result_b = event;
|
|
286
|
+
};
|
|
287
|
+
const unsubscribe = await eventBusB.subscribeMany([event.type], listenerB);
|
|
288
|
+
await unsubscribe();
|
|
289
|
+
await eventBusA.dispatch([event]);
|
|
290
|
+
await eventBusB.dispatch([event]);
|
|
291
|
+
expect(result_a).toEqual(event);
|
|
292
|
+
expect(result_b).toBeNull();
|
|
293
|
+
});
|
|
294
|
+
});
|
|
295
|
+
}
|
|
296
|
+
//# sourceMappingURL=event-bus.test-suite.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"event-bus.test-suite.js","sourceRoot":"","sources":["../../../../../src/event-bus/implementations/_shared/event-bus.test-suite.ts"],"names":[],"mappings":"AAYA,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAC/C,OAAO,EAAE,KAA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AC,KAAiB,EAAE,EAAE;gBACpC,QAAQ,GAAG,KAAK,CAAC;YACrB,CAAC,CAAC;YACF,MAAM,WAAW,GAAG,MAAM,SAAS,CAAC,aAAa,CAC7C,CAAC,KAAK,CAAC,IAAI,CAAC,EACZ,SAAS,CACZ,CAAC;YACF,MAAM,WAAW,EAAE,CAAC;YAEpB,MAAM,SAAS,CAAC,QAAQ,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC;YAClC,MAAM,SAAS,CAAC,QAAQ,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC;YAElC,MAAM,CAAC,QAAQ,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;YAChC,MAAM,CAAC,QAAQ,CAAC,CAAC,QAAQ,EAAE,CAAC;QAChC,CAAC,CAAC,CAAC;IACP,CAAC,CAAC,CAAC;AACP,CAAC"}
|
|
@@ -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":"AASA,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;
|
|
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":"AASA,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAqB3C,MAAM,OAAO,qBAAqB;IACD;IAA7B,YAA6B,cAAc,IAAI,YAAY,EAAE;QAAhC,gBAAW,GAAX,WAAW,CAAqB;IAAG,CAAC;IAGjE,KAAK,CAAC,WAAW,CACb,KAAa,EACb,QAA8B;QAG9B,IAAI,CAAC,WAAW,CAAC,WAAW,CAAC,KAAK,EAAE,QAAQ,CAAC,CAAC;IAClD,CAAC;IAGD,KAAK,CAAC,cAAc,CAChB,KAAa,EACb,QAA8B;QAG9B,IAAI,CAAC,WAAW,CAAC,cAAc,CAAC,KAAK,EAAE,QAAQ,CAAC,CAAC;IACrD,CAAC;IAGD,KAAK,CAAC,QAAQ,CAAC,MAAoB;QAC/B,KAAK,MAAM,KAAK,IAAI,MAAM,EAAE,CAAC;YACzB,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;QAC7C,CAAC;IACL,CAAC;CACJ"}
|
|
@@ -1,12 +1,11 @@
|
|
|
1
|
-
import { RedisSerializer
|
|
2
|
-
import { LazyPromise } from "../../../../utilities/_module";
|
|
1
|
+
import { RedisSerializer } from "../../../../serializer/implementations/_module";
|
|
3
2
|
import { EventEmitter } from "node:events";
|
|
4
3
|
export class RedisEventBusAdapter {
|
|
5
4
|
serializer;
|
|
6
5
|
dispatcherClient;
|
|
7
6
|
listenerClient;
|
|
8
7
|
eventEmitter = new EventEmitter();
|
|
9
|
-
constructor({ dispatcherClient, listenerClient, serializer
|
|
8
|
+
constructor({ dispatcherClient, listenerClient, serializer, }) {
|
|
10
9
|
this.dispatcherClient = dispatcherClient;
|
|
11
10
|
this.listenerClient = listenerClient;
|
|
12
11
|
this.serializer = new RedisSerializer(serializer);
|
|
@@ -33,7 +32,7 @@ export class RedisEventBusAdapter {
|
|
|
33
32
|
async dispatch(events) {
|
|
34
33
|
const promises = [];
|
|
35
34
|
for (const event of events) {
|
|
36
|
-
promises.push(
|
|
35
|
+
promises.push(this.dispatcherClient.publish(event.type, await this.serializer.serialize(event)));
|
|
37
36
|
}
|
|
38
37
|
await Promise.all(promises);
|
|
39
38
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"redis-event-bus-adapter.js","sourceRoot":"","sources":["../../../../../../src/event-bus/implementations/adapters/redis-event-bus-adapter/redis-event-bus-adapter.ts"],"names":[],"mappings":"AAKA,OAAO,
|
|
1
|
+
{"version":3,"file":"redis-event-bus-adapter.js","sourceRoot":"","sources":["../../../../../../src/event-bus/implementations/adapters/redis-event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AAK,IAAI,IAAI,CAAC,YAAY,CAAC,UAAU,EAAE,EAAE,CAAC;YACjD,kBAAkB,IAAI,IAAI,CAAC,YAAY,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;QACjE,CAAC;QAED,IAAI,kBAAkB,KAAK,CAAC,EAAE,CAAC;YAE3B,IAAI,CAAC,cAAc,CAAC,GAAG,CAAC,SAAS,EAAE,IAAI,CAAC,aAAa,CAAC,CAAC;QAC3D,CAAC;IACL,CAAC;IAED,KAAK,CAAC,QAAQ,CAAC,MAAoB;QAC/B,MAAM,QAAQ,GAA0B,EAAE,CAAC;QAC3C,KAAK,MAAM,KAAK,IAAI,MAAM,EAAE,CAAC;YACzB,QAAQ,CAAC,IAAI,CACT,IAAI,CAAC,gBAAgB,CAAC,OAAO,CACzB,KAAK,CAAC,IAAI,EACV,MAAM,IAAI,CAAC,UAAU,CAAC,SAAS,CAAC,KAAK,CAAC,CACzC,CACJ,CAAC;QACN,CAAC;QACD,MAAM,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;IAChC,CAAC;CACJ"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { LazyPromise } from "../../../async/_module";
|
|
2
|
+
import { isArrayEmpty } from "../../../utilities/_module";
|
|
3
|
+
export class BaseEventBus {
|
|
4
|
+
addListenerMany(eventNames, listener) {
|
|
5
|
+
return new LazyPromise(async () => {
|
|
6
|
+
if (isArrayEmpty(eventNames)) {
|
|
7
|
+
return;
|
|
8
|
+
}
|
|
9
|
+
const promises = [];
|
|
10
|
+
for (const event of eventNames) {
|
|
11
|
+
promises.push(this.addListener(event, listener));
|
|
12
|
+
}
|
|
13
|
+
await Promise.all(promises);
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
removeListenerMany(eventNames, listener) {
|
|
17
|
+
return new LazyPromise(async () => {
|
|
18
|
+
if (isArrayEmpty(eventNames)) {
|
|
19
|
+
return;
|
|
20
|
+
}
|
|
21
|
+
const promises = [];
|
|
22
|
+
for (const event of eventNames) {
|
|
23
|
+
promises.push(this.removeListener(event, listener));
|
|
24
|
+
}
|
|
25
|
+
await Promise.all(promises);
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
subscribe(eventName, listener) {
|
|
29
|
+
return this.subscribeMany([eventName], listener);
|
|
30
|
+
}
|
|
31
|
+
subscribeMany(eventNames, listener) {
|
|
32
|
+
return new LazyPromise(async () => {
|
|
33
|
+
await this.addListenerMany(eventNames, listener);
|
|
34
|
+
const unsubscribe = () => {
|
|
35
|
+
return new LazyPromise(async () => {
|
|
36
|
+
await this.removeListenerMany(eventNames, listener);
|
|
37
|
+
});
|
|
38
|
+
};
|
|
39
|
+
return unsubscribe;
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
//# sourceMappingURL=base-event-bus.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"base-event-bus.js","sourceRoot":"","sources":["../../../../../src/event-bus/implementations/derivables/base-event-bus.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAgB9C,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAOnD,MAAM,OAAgB,YAAY;IAY9B,eAAe,CACX,UAAwB,EACxB,QAAoD;QAEpD,OAAO,IAAI,WAAW,CAAC,KAAK,IAAI,EAAE;YAC9B,IAAI,YAAY,CAAC,UAAU,CAAC,EAAE,CAAC;gBAC3B,OAAO;YACX,CAAC;YACD,MAAM,QAAQ,GAAwB,EAAE,CAAC;YACzC,KAAK,MAAM,KAAK,IAAI,UAAU,EAAE,CAAC;gBAC7B,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC;YACrD,CAAC;YACD,MAAM,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;QAChC,CAAC,CAAC,CAAC;IACP,CAAC;IAOD,kBAAkB,CACd,UAAwB,EACxB,QAAoD;QAEpD,OAAO,IAAI,WAAW,CAAC,KAAK,IAAI,EAAE;YAC9B,IAAI,YAAY,CAAC,UAAU,CAAC,EAAE,CAAC;gBAC3B,OAAO;YACX,CAAC;YACD,MAAM,QAAQ,GAAwB,EAAE,CAAC;YACzC,KAAK,MAAM,KAAK,IAAI,UAAU,EAAE,CAAC;gBAC7B,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,cAAc,CAAC,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC;YACxD,CAAC;YACD,MAAM,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;QAChC,CAAC,CAAC,CAAC;IACP,CAAC;IAED,SAAS,CACL,SAAqB,EACrB,QAAoD;QAEpD,OAAO,IAAI,CAAC,aAAa,CAAC,CAAC,SAAS,CAAC,EAAE,QAAQ,CAAC,CAAC;IACrD,CAAC;IAED,aAAa,CACT,UAAwB,EACxB,QAAoD;QAEpD,OAAO,IAAI,WAAW,CAAC,KAAK,IAAI,EAAE;YAC9B,MAAM,IAAI,CAAC,eAAe,CAAC,UAAU,EAAE,QAAQ,CAAC,CAAC;YACjD,MAAM,WAAW,GAAG,GAAG,EAAE;gBACrB,OAAO,IAAI,WAAW,CAAC,KAAK,IAAI,EAAE;oBAC9B,MAAM,IAAI,CAAC,kBAAkB,CAAC,UAAU,EAAE,QAAQ,CAAC,CAAC;gBACxD,CAAC,CAAC,CAAC;YACP,CAAC,CAAC;YACF,OAAO,WAAW,CAAC;QACvB,CAAC,CAAC,CAAC;IACP,CAAC;CAGJ"}
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import { EventBus } from "../../../event-bus/implementations/derivables/event-bus";
|
|
2
|
-
import { DefaultDriverNotDefinedError, UnregisteredDriverError, } from "../../../utilities/
|
|
2
|
+
import { DefaultDriverNotDefinedError, UnregisteredDriverError, } from "../../../utilities/_module";
|
|
3
3
|
export class EventBusFactory {
|
|
4
4
|
drivers;
|
|
5
5
|
defaultDriver;
|
|
6
6
|
rootNamespace;
|
|
7
|
-
validator = (value) => value;
|
|
8
7
|
constructor(settings) {
|
|
9
8
|
const { drivers, defaultDriver, rootNamespace } = settings;
|
|
10
9
|
this.drivers = drivers;
|
|
@@ -21,13 +20,8 @@ export class EventBusFactory {
|
|
|
21
20
|
}
|
|
22
21
|
return new EventBus(selectedAdapter, {
|
|
23
22
|
rootNamespace: this.rootNamespace,
|
|
24
|
-
validator: this.validator,
|
|
25
23
|
});
|
|
26
24
|
}
|
|
27
|
-
withValidation(validator) {
|
|
28
|
-
this.validator = validator;
|
|
29
|
-
return this;
|
|
30
|
-
}
|
|
31
25
|
withType() {
|
|
32
26
|
return this;
|
|
33
27
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"event-bus-factory.js","sourceRoot":"","sources":["../../../../../src/event-bus/implementations/derivables/event-bus-factory.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"event-bus-factory.js","sourceRoot":"","sources":["../../../../../src/event-bus/implementations/derivables/event-bus-factory.ts"],"names":[],"mappings":"AAUA,OAAO,EAAE,QAAQ,EAAE,MAAM,kDAAkD,CAAC;AAC5E,OAAO,EACH,4BAA4B,EAC5B,uBAAuB,GAC1B,MAAM,qBAAqB,CAAC;AAsC7B,MAAM,OAAO,eAAe;IAKP,OAAO,CAA6B;IACpC,aAAa,CAAa;IAC1B,aAAa,CAAU;IAExC,YAAY,QAA4C;QACpD,MAAM,EAAE,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,GAAG,QAAQ,CAAC;QAC3D,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,IAAI,CAAC,aAAa,GAAG,aAAa,CAAC;QACnC,IAAI,CAAC,aAAa,GAAG,aAAa,CAAC;IACvC,CAAC;IAED,GAAG,CACC,aAAoC,IAAI,CAAC,aAAa;QAEtD,IAAI,UAAU,KAAK,SAAS,EAAE,CAAC;YAC3B,MAAM,IAAI,4BAA4B,CAAC,eAAe,CAAC,IAAI,CAAC,CAAC;QACjE,CAAC;QACD,MAAM,eAAe,GAAG,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC;QACjD,IAAI,eAAe,KAAK,SAAS,EAAE,CAAC;YAChC,MAAM,IAAI,uBAAuB,CAAC,UAAU,CAAC,CAAC;QAClD,CAAC;QACD,OAAO,IAAI,QAAQ,CAAC,eAAe,EAAE;YACjC,aAAa,EAAE,IAAI,CAAC,aAAa;SACpC,CAAC,CAAC;IACP,CAAC;IAED,QAAQ;QAKJ,OAAO,IAAW,CAAC;IACvB,CAAC;CACJ"}
|
|
@@ -1,88 +1,53 @@
|
|
|
1
|
-
import { LazyPromise } from "../../../
|
|
2
|
-
import { DispatchEventBusError, RemoveListenerEventBusError, AddListenerEventBusError, } from "../../../event-bus/contracts/_module";
|
|
1
|
+
import { LazyPromise } from "../../../async/_module";
|
|
2
|
+
import { DispatchEventBusError, RemoveListenerEventBusError, AddListenerEventBusError, UnexpectedEventBusError, } from "../../../event-bus/contracts/_module";
|
|
3
3
|
import { WithNamespaceEventBusAdapter } from "../../../event-bus/implementations/derivables/with-namespace-event-bus-adapter";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
export class EventBus {
|
|
4
|
+
import { simplifyNamespace, isArrayEmpty } from "../../../utilities/_module";
|
|
5
|
+
import { BaseEventBus } from "../../../event-bus/implementations/derivables/base-event-bus";
|
|
6
|
+
export class EventBus extends BaseEventBus {
|
|
7
7
|
eventBusAdapter;
|
|
8
8
|
namespace;
|
|
9
|
-
validator;
|
|
10
9
|
constructor(eventBusAdapter, settings = {}) {
|
|
11
|
-
|
|
10
|
+
super();
|
|
12
11
|
let { rootNamespace: namespace = "" } = settings;
|
|
13
12
|
namespace = simplifyNamespace(namespace);
|
|
14
13
|
this.namespace = namespace;
|
|
15
|
-
this.
|
|
16
|
-
this.eventBusAdapter = new WithNamespaceEventBusAdapter(new WithValidationEventBusAdapter(eventBusAdapter, this.validator), this.namespace);
|
|
14
|
+
this.eventBusAdapter = new WithNamespaceEventBusAdapter(eventBusAdapter, this.namespace);
|
|
17
15
|
}
|
|
18
16
|
withNamespace(namespace) {
|
|
19
17
|
namespace = simplifyNamespace(namespace);
|
|
20
18
|
return new EventBus(this.eventBusAdapter, {
|
|
21
|
-
validator: this.validator,
|
|
22
19
|
rootNamespace: [this.namespace, namespace],
|
|
23
20
|
});
|
|
24
21
|
}
|
|
25
22
|
getNamespace() {
|
|
26
23
|
return this.namespace;
|
|
27
24
|
}
|
|
28
|
-
addListener(
|
|
25
|
+
addListener(eventName, listener) {
|
|
29
26
|
return new LazyPromise(async () => {
|
|
30
27
|
try {
|
|
31
|
-
|
|
28
|
+
if (typeof eventName !== "string") {
|
|
29
|
+
throw new UnexpectedEventBusError(`The event name "${String(eventName)}" must be of string name`);
|
|
30
|
+
}
|
|
31
|
+
await this.eventBusAdapter.addListener(eventName, listener);
|
|
32
32
|
}
|
|
33
33
|
catch (error) {
|
|
34
|
-
throw new AddListenerEventBusError(`A listener with name of "${listener.name}" could not added for "${
|
|
34
|
+
throw new AddListenerEventBusError(`A listener with name of "${listener.name}" could not added for "${String(eventName)}" event`, error);
|
|
35
35
|
}
|
|
36
36
|
});
|
|
37
37
|
}
|
|
38
|
-
|
|
38
|
+
removeListener(eventName, listener) {
|
|
39
39
|
return new LazyPromise(async () => {
|
|
40
|
-
if (
|
|
41
|
-
|
|
42
|
-
}
|
|
43
|
-
const promises = [];
|
|
44
|
-
for (const event of events) {
|
|
45
|
-
promises.push(this.addListener(event, listener));
|
|
40
|
+
if (typeof eventName !== "string") {
|
|
41
|
+
throw new UnexpectedEventBusError(`The event name "${String(eventName)}" must be of string name`);
|
|
46
42
|
}
|
|
47
|
-
await Promise.all(promises);
|
|
48
|
-
});
|
|
49
|
-
}
|
|
50
|
-
removeListener(event, listener) {
|
|
51
|
-
return new LazyPromise(async () => {
|
|
52
43
|
try {
|
|
53
|
-
await this.eventBusAdapter.removeListener(
|
|
44
|
+
await this.eventBusAdapter.removeListener(eventName, listener);
|
|
54
45
|
}
|
|
55
46
|
catch (error) {
|
|
56
|
-
throw new RemoveListenerEventBusError(`A listener with name of "${listener.name}" could not removed of "${
|
|
47
|
+
throw new RemoveListenerEventBusError(`A listener with name of "${listener.name}" could not removed of "${String(eventName)}" event`, error);
|
|
57
48
|
}
|
|
58
49
|
});
|
|
59
50
|
}
|
|
60
|
-
removeListenerMany(events, listener) {
|
|
61
|
-
return new LazyPromise(async () => {
|
|
62
|
-
if (isArrayEmpty(events)) {
|
|
63
|
-
return;
|
|
64
|
-
}
|
|
65
|
-
const promises = [];
|
|
66
|
-
for (const event of events) {
|
|
67
|
-
promises.push(this.removeListener(event, listener));
|
|
68
|
-
}
|
|
69
|
-
await Promise.all(promises);
|
|
70
|
-
});
|
|
71
|
-
}
|
|
72
|
-
subscribe(event, listener) {
|
|
73
|
-
return this.subscribeMany([event], listener);
|
|
74
|
-
}
|
|
75
|
-
subscribeMany(events, listener) {
|
|
76
|
-
return new LazyPromise(async () => {
|
|
77
|
-
await this.addListenerMany(events, listener);
|
|
78
|
-
const unsubscribe = () => {
|
|
79
|
-
return new LazyPromise(async () => {
|
|
80
|
-
await this.removeListenerMany(events, listener);
|
|
81
|
-
});
|
|
82
|
-
};
|
|
83
|
-
return unsubscribe;
|
|
84
|
-
});
|
|
85
|
-
}
|
|
86
51
|
dispatch(events) {
|
|
87
52
|
return new LazyPromise(async () => {
|
|
88
53
|
if (!Array.isArray(events)) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"event-bus.js","sourceRoot":"","sources":["../../../../../src/event-bus/implementations/derivables/event-bus.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"event-bus.js","sourceRoot":"","sources":["../../../../../src/event-bus/implementations/derivables/event-bus.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAM9C,OAAO,EAMH,qBAAqB,EACrB,2BAA2B,EAC3B,wB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AAE,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,2BAA2B,EAClF,KAAK,CACR,CAAC;YACN,CAAC;QACL,CAAC,CAAC,CAAC;IACP,CAAC;CACJ"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
export * from "../utilities/
|
|
2
|
-
export * from "../utilities/
|
|
1
|
+
export * from "../utilities/contracts/_module";
|
|
2
|
+
export * from "../utilities/kysely/_module";
|
|
3
3
|
export * from "../utilities/time-span/_module";
|
|
4
|
-
export * from "../utilities/
|
|
5
|
-
export * from "../utilities/
|
|
4
|
+
export * from "../utilities/errors";
|
|
5
|
+
export * from "../utilities/types";
|
|
6
|
+
export * from "../utilities/functions";
|
|
6
7
|
//# sourceMappingURL=_module.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"_module.js","sourceRoot":"","sources":["../../../src/utilities/_module.ts"],"names":[],"mappings":"AAAA,cAAc,
|
|
1
|
+
{"version":3,"file":"_module.js","sourceRoot":"","sources":["../../../src/utilities/_module.ts"],"names":[],"mappings":"AAAA,cAAc,+BAA+B,CAAC;AAC9C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,oBAAoB,CAAC;AACnC,cAAc,mBAAmB,CAAC;AAClC,cAAc,uBAAuB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"_module.js","sourceRoot":"","sources":["../../../../src/utilities/contracts/_module.ts"],"names":[],"mappings":"AAAA,cAAc,6CAA6C,CAAC;AAC5D,cAAc,2CAA2C,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
//# sourceMappingURL=deinitizable.contract.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"deinitizable.contract.js","sourceRoot":"","sources":["../../../../src/utilities/contracts/deinitizable.contract.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
//# sourceMappingURL=initizable.contract.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"initizable.contract.js","sourceRoot":"","sources":["../../../../src/utilities/contracts/initizable.contract.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"errors.js","sourceRoot":"","sources":["../../../src/utilities/errors.ts"],"names":[],"mappings":"AAOA,MAAM,OAAO,YAAa,SAAQ,KAAK;IACnC,YAAY,OAAe,EAAE,KAAe;QACxC,KAAK,CAAC,OAAO,EAAE,EAAE,KAAK,EAAE,CAAC,CAAC;QAC1B,IAAI,CAAC,IAAI,GAAG,YAAY,CAAC,IAAI,CAAC;IAClC,CAAC;CACJ;AAKD,MAAM,OAAO,4BAA6B,SAAQ,YAAY;IAC1D,YAAY,WAAmB;QAC3B,KAAK,CAAC,uCAAuC,WAAW,GAAG,CAAC,CAAC;QAC7D,IAAI,CAAC,IAAI,GAAG,4BAA4B,CAAC,IAAI,CAAC;IAClD,CAAC;CACJ;AAKD,MAAM,OAAO,uBAAwB,SAAQ,YAAY;IACrD,YAAY,UAAkB;QAC1B,KAAK,CAAC,wBAAwB,UAAU,GAAG,CAAC,CAAC;QAC7C,IAAI,CAAC,IAAI,GAAG,uBAAuB,CAAC,IAAI,CAAC;IAC7C,CAAC;CACJ"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"functions.js","sourceRoot":"","sources":["../../../src/utilities/functions.ts"],"names":[],"mappings":"AAUA,MAAM,UAAU,gBAAgB,CAAS,QAA0B;IAC/D,IAAI,OAAO,QAAQ,KAAK,UAAU,EAAE,CAAC;QACjC,MAAM,QAAQ,GAAG,QAAwB,CAAC;QAC1C,OAAO,QAAQ,EAAE,CAAC;IACtB,CAAC;IACD,OAAO,QAAQ,CAAC;AACpB,CAAC;AAID,MAAM,CAAC,KAAK,UAAU,qBAAqB,CACvC,QAA+B;IAE/B,IAAI,OAAO,QAAQ,KAAK,UAA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