@daiso-tech/core 0.14.0 → 0.16.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 +3 -2
- 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/{serializer/implementations/sql-serializer → 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/{serializer/implementations/_shared/test-utilities → async/backof-policies/exponential-backoff-policy}/_module.js +1 -1
- 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/{serializer/implementations/mongodb-serializer → 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/async/backof-policies/polynomial-backoff-policy/_module.js +18 -0
- 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 → 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 +110 -0
- package/dist/cjs/async/utilities/lazy-promise/lazy-promise.js.map +1 -0
- package/dist/cjs/async/utilities/retry/_module.js +19 -0
- 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 +257 -177
- package/dist/cjs/cache/implementations/_shared/cache-adapter.test-suite.js.map +1 -1
- package/dist/cjs/cache/implementations/_shared/cache.test-suite.js +59 -37
- package/dist/cjs/cache/implementations/_shared/cache.test-suite.js.map +1 -1
- package/dist/cjs/cache/implementations/adapters/kysely-sqlite-cache-adapter/kysely-sqlite-cache-adapter.js +59 -18
- package/dist/cjs/cache/implementations/adapters/kysely-sqlite-cache-adapter/kysely-sqlite-cache-adapter.js.map +1 -1
- package/dist/cjs/cache/implementations/adapters/libsql-cache-adapter/libsql-cache-adapter.js +16 -6
- 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 +58 -39
- 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 +63 -26
- 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/no-op-cache-adapter.js +10 -1
- package/dist/cjs/cache/implementations/adapters/no-op-cache-adapter/no-op-cache-adapter.js.map +1 -1
- package/dist/cjs/cache/implementations/adapters/redis-cache-adapter/redis-cache-adapter.js +44 -19
- 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 +17 -7
- package/dist/cjs/cache/implementations/adapters/sqlite-cache-adapter/sqlite-cache-adapter.js.map +1 -1
- package/dist/cjs/cache/implementations/derivables/_module.js +0 -1
- package/dist/cjs/cache/implementations/derivables/_module.js.map +1 -1
- package/dist/cjs/cache/implementations/derivables/cache-factory.js +4 -7
- package/dist/cjs/cache/implementations/derivables/cache-factory.js.map +1 -1
- package/dist/cjs/cache/implementations/derivables/cache.js +303 -61
- 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-merge-iterable.js +14 -7
- package/dist/cjs/collection/implementations/async-iterable-collection/_shared/async-merge-iterable.js.map +1 -1
- 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 +63 -42
- package/dist/cjs/collection/implementations/async-iterable-collection/async-iterable-collection.js.map +1 -1
- package/dist/cjs/collection/implementations/iterable-collection/_shared/merge-iterable.js +6 -7
- package/dist/cjs/collection/implementations/iterable-collection/_shared/merge-iterable.js.map +1 -1
- package/dist/cjs/collection/implementations/iterable-collection/iterable-collection.js +16 -7
- package/dist/cjs/collection/implementations/iterable-collection/iterable-collection.js.map +1 -1
- package/dist/cjs/collection/implementations/list-collection/list-collection.js +18 -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/event-bus-adapter.test-suite.js +96 -0
- 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 +335 -0
- package/dist/cjs/event-bus/implementations/_shared/event-bus.test-suite.js.map +1 -0
- package/dist/cjs/event-bus/implementations/adapters/_module.js +1 -1
- package/dist/cjs/event-bus/implementations/adapters/_module.js.map +1 -1
- package/dist/cjs/event-bus/implementations/adapters/memory-event-bus-adapter/memory-event-bus-adapter.js +19 -9
- 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/no-op-event-bus-adapter/no-op-event-bus-adapter.js +7 -1
- package/dist/cjs/event-bus/implementations/adapters/no-op-event-bus-adapter/no-op-event-bus-adapter.js.map +1 -1
- package/dist/cjs/event-bus/implementations/adapters/redis-pub-sub-event-bus-adapter/_module.js.map +1 -0
- package/dist/cjs/event-bus/implementations/adapters/redis-pub-sub-event-bus-adapter/redis-pub-sub-event-bus-adapter.js +52 -0
- package/dist/cjs/event-bus/implementations/adapters/redis-pub-sub-event-bus-adapter/redis-pub-sub-event-bus-adapter.js.map +1 -0
- package/dist/cjs/event-bus/implementations/derivables/event-bus-factory.js +6 -7
- package/dist/cjs/event-bus/implementations/derivables/event-bus-factory.js.map +1 -1
- package/dist/cjs/event-bus/implementations/derivables/event-bus.js +96 -33
- package/dist/cjs/event-bus/implementations/derivables/event-bus.js.map +1 -1
- package/dist/cjs/{utilities/async/retry → serde/contracts}/_module.js +2 -1
- package/dist/cjs/serde/contracts/_module.js.map +1 -0
- package/dist/cjs/{serializer/contracts/serializer.contract.js → serde/contracts/serde.contract.js} +1 -1
- package/dist/cjs/serde/contracts/serde.contract.js.map +1 -0
- package/dist/cjs/{serializer/contracts/serializer.errors.js → serde/contracts/serde.errors.js} +7 -7
- package/dist/cjs/serde/contracts/serde.errors.js.map +1 -0
- package/dist/cjs/{_shared/redis → serde/implementations}/_module.js +5 -3
- package/dist/cjs/serde/implementations/_module.js.map +1 -0
- package/dist/cjs/{serializer/implementations/redis-serializer → serde/implementations/_shared/test-utilities}/_module.js +1 -1
- package/dist/cjs/serde/implementations/_shared/test-utilities/_module.js.map +1 -0
- package/dist/{esm/serializer/implementations/_shared/test-utilities/serializer.test-suite.js → cjs/serde/implementations/_shared/test-utilities/serde.test-suite.js} +65 -62
- package/dist/cjs/serde/implementations/_shared/test-utilities/serde.test-suite.js.map +1 -0
- package/dist/cjs/{_shared/kysely → serde/implementations/mongodb-serde}/_module.js +1 -1
- package/dist/cjs/serde/implementations/mongodb-serde/_module.js.map +1 -0
- package/dist/cjs/serde/implementations/mongodb-serde/mongodb-serde.js +36 -0
- package/dist/cjs/serde/implementations/mongodb-serde/mongodb-serde.js.map +1 -0
- package/dist/cjs/{utilities/async/delay-iterable → serde/implementations/redis-serde}/_module.js +1 -1
- package/dist/cjs/serde/implementations/redis-serde/_module.js.map +1 -0
- package/dist/cjs/serde/implementations/redis-serde/redis-serde.js +37 -0
- package/dist/cjs/serde/implementations/redis-serde/redis-serde.js.map +1 -0
- package/dist/cjs/{utilities/async/abortable → serde/implementations/sql-serde}/_module.js +1 -1
- package/dist/cjs/serde/implementations/sql-serde/_module.js.map +1 -0
- package/dist/cjs/serde/implementations/sql-serde/sql-serde.js +37 -0
- package/dist/cjs/serde/implementations/sql-serde/sql-serde.js.map +1 -0
- package/dist/cjs/{utilities/async/abortable-iterable → serde/implementations/super-json-serde}/_module.js +1 -1
- package/dist/cjs/serde/implementations/super-json-serde/_module.js.map +1 -0
- package/dist/cjs/{serializer/implementations/super-json-serializer/super-json-serializer.js → serde/implementations/super-json-serde/super-json-serde.js} +74 -100
- package/dist/cjs/serde/implementations/super-json-serde/super-json-serde.js.map +1 -0
- package/dist/cjs/utilities/_module.js +5 -4
- package/dist/cjs/utilities/_module.js.map +1 -1
- package/dist/cjs/{serializer → utilities}/contracts/_module.js +2 -2
- 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} +6 -6
- package/dist/cjs/utilities/functions.js.map +1 -0
- package/dist/cjs/utilities/kysely/_module.js +18 -0
- 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/utilities/time-span/time-span.js +8 -0
- package/dist/cjs/utilities/time-span/time-span.js.map +1 -1
- package/dist/cjs/{_shared → utilities}/types.js.map +1 -1
- package/dist/esm/_module.js +3 -2
- 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 +106 -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 +258 -178
- package/dist/esm/cache/implementations/_shared/cache-adapter.test-suite.js.map +1 -1
- package/dist/esm/cache/implementations/_shared/cache.test-suite.js +25 -3
- package/dist/esm/cache/implementations/_shared/cache.test-suite.js.map +1 -1
- package/dist/esm/cache/implementations/adapters/kysely-sqlite-cache-adapter/kysely-sqlite-cache-adapter.js +60 -19
- package/dist/esm/cache/implementations/adapters/kysely-sqlite-cache-adapter/kysely-sqlite-cache-adapter.js.map +1 -1
- package/dist/esm/cache/implementations/adapters/libsql-cache-adapter/libsql-cache-adapter.js +16 -6
- 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 +58 -39
- 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 +63 -23
- 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/no-op-cache-adapter.js +10 -1
- package/dist/esm/cache/implementations/adapters/no-op-cache-adapter/no-op-cache-adapter.js.map +1 -1
- package/dist/esm/cache/implementations/adapters/redis-cache-adapter/redis-cache-adapter.js +44 -19
- 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 +16 -6
- package/dist/esm/cache/implementations/adapters/sqlite-cache-adapter/sqlite-cache-adapter.js.map +1 -1
- package/dist/esm/cache/implementations/derivables/_module.js +0 -1
- package/dist/esm/cache/implementations/derivables/_module.js.map +1 -1
- package/dist/esm/cache/implementations/derivables/cache-factory.js +2 -5
- package/dist/esm/cache/implementations/derivables/cache-factory.js.map +1 -1
- package/dist/esm/cache/implementations/derivables/cache.js +304 -62
- 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-merge-iterable.js +14 -7
- package/dist/esm/collection/implementations/async-iterable-collection/_shared/async-merge-iterable.js.map +1 -1
- 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 +61 -40
- package/dist/esm/collection/implementations/async-iterable-collection/async-iterable-collection.js.map +1 -1
- package/dist/esm/collection/implementations/iterable-collection/_shared/merge-iterable.js +6 -7
- package/dist/esm/collection/implementations/iterable-collection/_shared/merge-iterable.js.map +1 -1
- package/dist/esm/collection/implementations/iterable-collection/iterable-collection.js +12 -3
- package/dist/esm/collection/implementations/iterable-collection/iterable-collection.js.map +1 -1
- package/dist/esm/collection/implementations/list-collection/list-collection.js +14 -1
- package/dist/esm/collection/implementations/list-collection/list-collection.js.map +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/event-bus-adapter.test-suite.js +93 -0
- 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 +332 -0
- package/dist/esm/event-bus/implementations/_shared/event-bus.test-suite.js.map +1 -0
- package/dist/esm/event-bus/implementations/adapters/_module.js +1 -1
- package/dist/esm/event-bus/implementations/adapters/_module.js.map +1 -1
- package/dist/esm/event-bus/implementations/adapters/memory-event-bus-adapter/memory-event-bus-adapter.js +19 -9
- 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/no-op-event-bus-adapter/no-op-event-bus-adapter.js +7 -1
- package/dist/esm/event-bus/implementations/adapters/no-op-event-bus-adapter/no-op-event-bus-adapter.js.map +1 -1
- package/dist/esm/event-bus/implementations/adapters/redis-pub-sub-event-bus-adapter/_module.js.map +1 -0
- package/dist/esm/event-bus/implementations/adapters/redis-pub-sub-event-bus-adapter/redis-pub-sub-event-bus-adapter.js +48 -0
- package/dist/esm/event-bus/implementations/adapters/redis-pub-sub-event-bus-adapter/redis-pub-sub-event-bus-adapter.js.map +1 -0
- package/dist/esm/event-bus/implementations/derivables/event-bus-factory.js +4 -5
- package/dist/esm/event-bus/implementations/derivables/event-bus-factory.js.map +1 -1
- package/dist/esm/event-bus/implementations/derivables/event-bus.js +97 -34
- package/dist/esm/event-bus/implementations/derivables/event-bus.js.map +1 -1
- package/dist/esm/serde/contracts/_module.js +3 -0
- package/dist/esm/serde/contracts/_module.js.map +1 -0
- package/dist/esm/serde/contracts/serde.contract.js +1 -0
- package/dist/esm/serde/contracts/serde.contract.js.map +1 -0
- package/dist/esm/{serializer/contracts/serializer.errors.js → serde/contracts/serde.errors.js} +5 -5
- package/dist/esm/serde/contracts/serde.errors.js.map +1 -0
- package/dist/esm/serde/implementations/_module.js +6 -0
- package/dist/esm/serde/implementations/_module.js.map +1 -0
- package/dist/esm/serde/implementations/_shared/test-utilities/_module.js +2 -0
- package/dist/esm/serde/implementations/_shared/test-utilities/_module.js.map +1 -0
- package/dist/{cjs/serializer/implementations/_shared/test-utilities/serializer.test-suite.js → esm/serde/implementations/_shared/test-utilities/serde.test-suite.js} +62 -65
- package/dist/esm/serde/implementations/_shared/test-utilities/serde.test-suite.js.map +1 -0
- package/dist/esm/serde/implementations/mongodb-serde/_module.js +2 -0
- package/dist/esm/serde/implementations/mongodb-serde/_module.js.map +1 -0
- package/dist/esm/{serializer/implementations/mongodb-serializer/mongodb-serializer.js → serde/implementations/mongodb-serde/mongodb-serde.js} +10 -10
- package/dist/esm/serde/implementations/mongodb-serde/mongodb-serde.js.map +1 -0
- package/dist/esm/serde/implementations/redis-serde/_module.js +2 -0
- package/dist/esm/serde/implementations/redis-serde/_module.js.map +1 -0
- package/dist/esm/{serializer/implementations/sql-serializer/sql-serializer.js → serde/implementations/redis-serde/redis-serde.js} +10 -10
- package/dist/esm/serde/implementations/redis-serde/redis-serde.js.map +1 -0
- package/dist/esm/serde/implementations/sql-serde/_module.js +2 -0
- package/dist/esm/serde/implementations/sql-serde/_module.js.map +1 -0
- package/dist/esm/{serializer/implementations/redis-serializer/redis-serializer.js → serde/implementations/sql-serde/sql-serde.js} +10 -10
- package/dist/esm/serde/implementations/sql-serde/sql-serde.js.map +1 -0
- package/dist/esm/serde/implementations/super-json-serde/_module.js +2 -0
- package/dist/esm/serde/implementations/super-json-serde/_module.js.map +1 -0
- package/dist/esm/{serializer/implementations/super-json-serializer/super-json-serializer.js → serde/implementations/super-json-serde/super-json-serde.js} +52 -55
- package/dist/esm/serde/implementations/super-json-serde/super-json-serde.js.map +1 -0
- 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} +5 -5
- 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/utilities/time-span/time-span.js +8 -0
- package/dist/esm/utilities/time-span/time-span.js.map +1 -1
- package/dist/esm/{_shared → utilities}/types.js.map +1 -1
- package/dist/types/_module.d.ts +3 -2
- 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 +222 -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 +20 -6
- package/dist/types/cache/contracts/cache-factory.contract.d.ts +4 -4
- package/dist/types/cache/contracts/cache.contract.d.ts +25 -43
- package/dist/types/cache/contracts/cache.events.d.ts +38 -91
- package/dist/types/cache/implementations/_shared/cache-adapter.test-suite.d.ts +34 -25
- package/dist/types/cache/implementations/_shared/cache.test-suite.d.ts +54 -43
- package/dist/types/cache/implementations/adapters/kysely-sqlite-cache-adapter/kysely-sqlite-cache-adapter.d.ts +11 -5
- package/dist/types/cache/implementations/adapters/libsql-cache-adapter/libsql-cache-adapter.d.ts +22 -9
- package/dist/types/cache/implementations/adapters/memory-cache-adapter/memory-cache-adapter.d.ts +12 -6
- package/dist/types/cache/implementations/adapters/mongodb-cache-adapter/mongodb-cache-adapter.d.ts +24 -11
- package/dist/types/cache/implementations/adapters/no-op-cache-adapter/no-op-cache-adapter.d.ts +5 -2
- package/dist/types/cache/implementations/adapters/redis-cache-adapter/redis-cache-adapter.d.ts +20 -13
- package/dist/types/cache/implementations/adapters/sqlite-cache-adapter/sqlite-cache-adapter.d.ts +22 -9
- package/dist/types/cache/implementations/derivables/_module.d.ts +0 -1
- package/dist/types/cache/implementations/derivables/cache-factory.d.ts +5 -11
- package/dist/types/cache/implementations/derivables/cache.d.ts +37 -42
- 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 +5 -6
- 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 +10 -4
- package/dist/types/collection/implementations/iterable-collection/_shared/merge-iterable.d.ts +4 -5
- package/dist/types/collection/implementations/iterable-collection/iterable-collection.d.ts +4 -1
- package/dist/types/collection/implementations/list-collection/list-collection.d.ts +4 -1
- package/dist/types/event-bus/contracts/_shared.d.ts +2 -5
- package/dist/types/event-bus/contracts/event-bus-adapter.contract.d.ts +12 -6
- package/dist/types/event-bus/contracts/event-bus-factory.contract.d.ts +4 -5
- package/dist/types/event-bus/contracts/event-bus.contract.d.ts +58 -27
- 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 +68 -0
- package/dist/types/event-bus/implementations/_shared/event-bus.test-suite.d.ts +72 -0
- package/dist/types/event-bus/implementations/adapters/_module.d.ts +1 -1
- package/dist/types/event-bus/implementations/adapters/memory-event-bus-adapter/memory-event-bus-adapter.d.ts +10 -5
- package/dist/types/event-bus/implementations/adapters/no-op-event-bus-adapter/no-op-event-bus-adapter.d.ts +4 -1
- package/dist/types/event-bus/implementations/adapters/redis-pub-sub-event-bus-adapter/redis-pub-sub-event-bus-adapter.d.ts +50 -0
- package/dist/types/event-bus/implementations/derivables/event-bus-factory.d.ts +7 -8
- package/dist/types/event-bus/implementations/derivables/event-bus.d.ts +20 -46
- package/dist/types/serde/contracts/_module.d.ts +2 -0
- package/dist/types/serde/contracts/serde.contract.d.ts +41 -0
- package/dist/types/{serializer/contracts/serializer.errors.d.ts → serde/contracts/serde.errors.d.ts} +4 -4
- package/dist/types/serde/implementations/_module.d.ts +5 -0
- package/dist/types/serde/implementations/_shared/test-utilities/_module.d.ts +1 -0
- package/dist/types/serde/implementations/_shared/test-utilities/serde.test-suite.d.ts +18 -0
- package/dist/types/serde/implementations/mongodb-serde/_module.d.ts +1 -0
- package/dist/types/serde/implementations/mongodb-serde/mongodb-serde.d.ts +13 -0
- package/dist/types/serde/implementations/redis-serde/_module.d.ts +1 -0
- package/dist/types/serde/implementations/redis-serde/redis-serde.d.ts +13 -0
- package/dist/types/serde/implementations/sql-serde/_module.d.ts +1 -0
- package/dist/types/serde/implementations/sql-serde/sql-serde.d.ts +13 -0
- package/dist/types/serde/implementations/super-json-serde/_module.d.ts +1 -0
- package/dist/types/serde/implementations/super-json-serde/super-json-serde.d.ts +25 -0
- 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} +4 -4
- 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/utilities/time-span/time-span.d.ts +11 -2
- package/dist/types/{_shared → utilities}/types.d.ts +3 -8
- package/package.json +3 -9
- 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.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/cache/implementations/derivables/base-cache.js +0 -262
- package/dist/cjs/cache/implementations/derivables/base-cache.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 +0 -51
- package/dist/cjs/event-bus/implementations/_shared/test-utilities/event-bus-adapter.test-suite.js.map +0 -1
- package/dist/cjs/event-bus/implementations/adapters/redis-event-bus-adapter/_module.js.map +0 -1
- package/dist/cjs/event-bus/implementations/adapters/redis-event-bus-adapter/redis-event-bus-adapter.js +0 -45
- package/dist/cjs/event-bus/implementations/adapters/redis-event-bus-adapter/redis-event-bus-adapter.js.map +0 -1
- package/dist/cjs/event-bus/implementations/derivables/base-event-bus.js +0 -47
- package/dist/cjs/event-bus/implementations/derivables/base-event-bus.js.map +0 -1
- package/dist/cjs/event-bus/implementations/derivables/with-namespace-event-bus-adapter.js +0 -42
- package/dist/cjs/event-bus/implementations/derivables/with-namespace-event-bus-adapter.js.map +0 -1
- package/dist/cjs/serializer/contracts/_module.js.map +0 -1
- package/dist/cjs/serializer/contracts/serializer.contract.js.map +0 -1
- package/dist/cjs/serializer/contracts/serializer.errors.js.map +0 -1
- package/dist/cjs/serializer/implementations/_module.js +0 -22
- package/dist/cjs/serializer/implementations/_module.js.map +0 -1
- package/dist/cjs/serializer/implementations/_shared/test-utilities/_module.js.map +0 -1
- package/dist/cjs/serializer/implementations/_shared/test-utilities/serializer.test-suite.js.map +0 -1
- package/dist/cjs/serializer/implementations/mongodb-serializer/_module.js.map +0 -1
- package/dist/cjs/serializer/implementations/mongodb-serializer/mongodb-serializer.js +0 -36
- package/dist/cjs/serializer/implementations/mongodb-serializer/mongodb-serializer.js.map +0 -1
- package/dist/cjs/serializer/implementations/redis-serializer/_module.js.map +0 -1
- package/dist/cjs/serializer/implementations/redis-serializer/redis-serializer.js +0 -37
- package/dist/cjs/serializer/implementations/redis-serializer/redis-serializer.js.map +0 -1
- package/dist/cjs/serializer/implementations/sql-serializer/_module.js.map +0 -1
- package/dist/cjs/serializer/implementations/sql-serializer/sql-serializer.js +0 -37
- package/dist/cjs/serializer/implementations/sql-serializer/sql-serializer.js.map +0 -1
- package/dist/cjs/serializer/implementations/super-json-serializer/_module.js +0 -18
- package/dist/cjs/serializer/implementations/super-json-serializer/_module.js.map +0 -1
- package/dist/cjs/serializer/implementations/super-json-serializer/super-json-serializer.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/cache/implementations/derivables/base-cache.js +0 -258
- package/dist/esm/cache/implementations/derivables/base-cache.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 +0 -48
- package/dist/esm/event-bus/implementations/_shared/test-utilities/event-bus-adapter.test-suite.js.map +0 -1
- package/dist/esm/event-bus/implementations/adapters/redis-event-bus-adapter/_module.js.map +0 -1
- package/dist/esm/event-bus/implementations/adapters/redis-event-bus-adapter/redis-event-bus-adapter.js +0 -41
- package/dist/esm/event-bus/implementations/adapters/redis-event-bus-adapter/redis-event-bus-adapter.js.map +0 -1
- package/dist/esm/event-bus/implementations/derivables/base-event-bus.js +0 -43
- package/dist/esm/event-bus/implementations/derivables/base-event-bus.js.map +0 -1
- package/dist/esm/event-bus/implementations/derivables/with-namespace-event-bus-adapter.js +0 -38
- package/dist/esm/event-bus/implementations/derivables/with-namespace-event-bus-adapter.js.map +0 -1
- package/dist/esm/serializer/contracts/_module.js +0 -3
- package/dist/esm/serializer/contracts/_module.js.map +0 -1
- package/dist/esm/serializer/contracts/serializer.contract.js +0 -1
- package/dist/esm/serializer/contracts/serializer.contract.js.map +0 -1
- package/dist/esm/serializer/contracts/serializer.errors.js.map +0 -1
- package/dist/esm/serializer/implementations/_module.js +0 -6
- package/dist/esm/serializer/implementations/_module.js.map +0 -1
- package/dist/esm/serializer/implementations/_shared/test-utilities/_module.js +0 -2
- package/dist/esm/serializer/implementations/_shared/test-utilities/_module.js.map +0 -1
- package/dist/esm/serializer/implementations/_shared/test-utilities/serializer.test-suite.js.map +0 -1
- package/dist/esm/serializer/implementations/mongodb-serializer/_module.js +0 -2
- package/dist/esm/serializer/implementations/mongodb-serializer/_module.js.map +0 -1
- package/dist/esm/serializer/implementations/mongodb-serializer/mongodb-serializer.js.map +0 -1
- package/dist/esm/serializer/implementations/redis-serializer/_module.js +0 -2
- package/dist/esm/serializer/implementations/redis-serializer/_module.js.map +0 -1
- package/dist/esm/serializer/implementations/redis-serializer/redis-serializer.js.map +0 -1
- package/dist/esm/serializer/implementations/sql-serializer/_module.js +0 -2
- package/dist/esm/serializer/implementations/sql-serializer/_module.js.map +0 -1
- package/dist/esm/serializer/implementations/sql-serializer/sql-serializer.js.map +0 -1
- package/dist/esm/serializer/implementations/super-json-serializer/_module.js +0 -2
- package/dist/esm/serializer/implementations/super-json-serializer/_module.js.map +0 -1
- package/dist/esm/serializer/implementations/super-json-serializer/super-json-serializer.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/cache/implementations/derivables/base-cache.d.ts +0 -57
- 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/adapters/redis-event-bus-adapter/redis-event-bus-adapter.d.ts +0 -43
- package/dist/types/event-bus/implementations/derivables/base-event-bus.d.ts +0 -23
- package/dist/types/event-bus/implementations/derivables/with-namespace-event-bus-adapter.d.ts +0 -16
- package/dist/types/serializer/contracts/_module.d.ts +0 -2
- package/dist/types/serializer/contracts/serializer.contract.d.ts +0 -16
- package/dist/types/serializer/implementations/_module.d.ts +0 -5
- package/dist/types/serializer/implementations/_shared/test-utilities/_module.d.ts +0 -1
- package/dist/types/serializer/implementations/_shared/test-utilities/serializer.test-suite.d.ts +0 -18
- package/dist/types/serializer/implementations/mongodb-serializer/_module.d.ts +0 -1
- package/dist/types/serializer/implementations/mongodb-serializer/mongodb-serializer.d.ts +0 -13
- package/dist/types/serializer/implementations/redis-serializer/_module.d.ts +0 -1
- package/dist/types/serializer/implementations/redis-serializer/redis-serializer.d.ts +0 -13
- package/dist/types/serializer/implementations/sql-serializer/_module.d.ts +0 -1
- package/dist/types/serializer/implementations/sql-serializer/sql-serializer.d.ts +0 -13
- package/dist/types/serializer/implementations/super-json-serializer/_module.d.ts +0 -1
- package/dist/types/serializer/implementations/super-json-serializer/super-json-serializer.d.ts +0 -37
- 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/event-bus/implementations/adapters/{redis-event-bus-adapter → redis-pub-sub-event-bus-adapter}/_module.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/event-bus/implementations/adapters/{redis-event-bus-adapter → redis-pub-sub-event-bus-adapter}/_module.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
- /package/dist/types/event-bus/implementations/adapters/{redis-event-bus-adapter → redis-pub-sub-event-bus-adapter}/_module.d.ts +0 -0
package/dist/types/cache/implementations/adapters/memory-cache-adapter/memory-cache-adapter.d.ts
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* @module Cache
|
|
3
3
|
*/
|
|
4
4
|
import { type ICacheAdapter } from "../../../../cache/contracts/cache-adapter.contract";
|
|
5
|
-
import type
|
|
5
|
+
import { type OneOrMore, type TimeSpan } from "../../../../utilities/_module";
|
|
6
6
|
/**
|
|
7
7
|
* To utilize the <i>MemoryCacheAdapter</i>, you must create instance of it.
|
|
8
8
|
* @group Adapters
|
|
@@ -18,18 +18,24 @@ import type { TimeSpan } from "../../../../utilities/_module";
|
|
|
18
18
|
* import { MemoryCacheAdapter } from "@daiso-tech/core";
|
|
19
19
|
*
|
|
20
20
|
* const map = new Map<any, any>();
|
|
21
|
-
* const cacheAdapter = new MemoryCacheAdapter(map);
|
|
21
|
+
* const cacheAdapter = new MemoryCacheAdapter("@cache", map);
|
|
22
22
|
* ```
|
|
23
23
|
*/
|
|
24
24
|
export declare class MemoryCacheAdapter<TType> implements ICacheAdapter<TType> {
|
|
25
25
|
private readonly map;
|
|
26
|
-
|
|
27
|
-
private readonly
|
|
26
|
+
private readonly group;
|
|
27
|
+
private readonly timeoutMap;
|
|
28
|
+
constructor(rootGroup: OneOrMore<string>, map?: Map<string, TType>);
|
|
29
|
+
private getGroupName;
|
|
30
|
+
private withPrefix;
|
|
31
|
+
exists(key: string): Promise<boolean>;
|
|
28
32
|
get(key: string): Promise<TType | null>;
|
|
29
33
|
add(key: string, value: TType, ttl: TimeSpan | null): Promise<boolean>;
|
|
30
34
|
update(key: string, value: TType): Promise<boolean>;
|
|
31
|
-
put(key: string, value: TType,
|
|
35
|
+
put(key: string, value: TType, ttl: TimeSpan | null): Promise<boolean>;
|
|
32
36
|
remove(key: string): Promise<boolean>;
|
|
33
37
|
increment(key: string, value: number): Promise<boolean>;
|
|
34
|
-
clear(
|
|
38
|
+
clear(): Promise<void>;
|
|
39
|
+
getGroup(): string;
|
|
40
|
+
withGroup(group: OneOrMore<string>): ICacheAdapter<TType>;
|
|
35
41
|
}
|
package/dist/types/cache/implementations/adapters/mongodb-cache-adapter/mongodb-cache-adapter.d.ts
CHANGED
|
@@ -2,17 +2,17 @@
|
|
|
2
2
|
* @module Cache
|
|
3
3
|
*/
|
|
4
4
|
import { type ICacheAdapter } from "../../../../cache/contracts/cache-adapter.contract";
|
|
5
|
-
import type
|
|
6
|
-
import type { IInitizable } from "../../../../_shared/types";
|
|
5
|
+
import { type TimeSpan, type IInitizable, type OneOrMore } from "../../../../utilities/_module";
|
|
7
6
|
import type { ObjectId } from "mongodb";
|
|
8
7
|
import { type Collection } from "mongodb";
|
|
9
|
-
import type {
|
|
8
|
+
import type { ISerde } from "../../../../serde/contracts/_module";
|
|
10
9
|
/**
|
|
11
10
|
* @group Adapters
|
|
12
11
|
*/
|
|
13
12
|
export type MongodbCacheDocument = {
|
|
14
13
|
_id: ObjectId;
|
|
15
14
|
key: string;
|
|
15
|
+
group: string;
|
|
16
16
|
value: number | string;
|
|
17
17
|
expiresAt: Date | null;
|
|
18
18
|
};
|
|
@@ -20,36 +20,49 @@ export type MongodbCacheDocument = {
|
|
|
20
20
|
* @group Adapters
|
|
21
21
|
*/
|
|
22
22
|
export type MongodbCacheAdapterSettings = {
|
|
23
|
-
|
|
23
|
+
serde: ISerde<string>;
|
|
24
|
+
rootGroup: OneOrMore<string>;
|
|
24
25
|
};
|
|
25
26
|
/**
|
|
26
|
-
* To utilize the <i>MongodbCacheAdapter</i>, you must install the <i>"mongodb"</i> package and supply a <i>{@link
|
|
27
|
+
* To utilize the <i>MongodbCacheAdapter</i>, you must install the <i>"mongodb"</i> package and supply a <i>{@link ISerde | string serde}</i>, such as <i>{@link SuperJsonSerde}</i>.
|
|
27
28
|
* @group Adapters
|
|
28
29
|
* @example
|
|
29
30
|
* ```ts
|
|
30
|
-
* import { MongodbCacheAdapter,
|
|
31
|
+
* import { MongodbCacheAdapter, SuperJsonSerde } from "@daiso-tech/core";
|
|
31
32
|
* import { MongoClient } from "mongodb";
|
|
32
33
|
*
|
|
33
34
|
* const client = new MongoClient("YOUR_MONGODB_CONNECTION_STRING");
|
|
34
35
|
* const database = client.db("database");
|
|
35
36
|
* const cacheCollection = database.collection("cache");
|
|
36
|
-
* const
|
|
37
|
+
* const serde = new SuperJsonSerde();
|
|
37
38
|
* const cacheAdapter = new MongodbCacheAdapter(cacheCollection, {
|
|
38
|
-
*
|
|
39
|
+
* serde,
|
|
40
|
+
* rootGroup: "@global"
|
|
39
41
|
* });
|
|
42
|
+
*
|
|
43
|
+
* (async () => {
|
|
44
|
+
* // You only need to call it once before using the adapter.
|
|
45
|
+
* await cacheAdapter.init();
|
|
46
|
+
* await cacheAdapter.add("a", 1);
|
|
47
|
+
* })();
|
|
40
48
|
* ```
|
|
41
49
|
*/
|
|
42
50
|
export declare class MongodbCacheAdapter<TType> implements ICacheAdapter<TType>, IInitizable {
|
|
43
51
|
private readonly collection;
|
|
44
52
|
private static isMongodbIncrementError;
|
|
45
|
-
private
|
|
46
|
-
|
|
53
|
+
private readonly mongodbSerde;
|
|
54
|
+
private readonly group;
|
|
55
|
+
private readonly serde;
|
|
56
|
+
constructor(collection: Collection<MongodbCacheDocument>, { serde, rootGroup }: MongodbCacheAdapterSettings);
|
|
57
|
+
getGroup(): string;
|
|
58
|
+
withGroup(group: OneOrMore<string>): ICacheAdapter<TType>;
|
|
47
59
|
init(): Promise<void>;
|
|
60
|
+
exists(key: string): Promise<boolean>;
|
|
48
61
|
get(key: string): Promise<TType | null>;
|
|
49
62
|
add(key: string, value: TType, ttl: TimeSpan | null): Promise<boolean>;
|
|
50
63
|
update(key: string, value: TType): Promise<boolean>;
|
|
51
64
|
put(key: string, value: TType, ttl: TimeSpan | null): Promise<boolean>;
|
|
52
65
|
remove(key: string): Promise<boolean>;
|
|
53
66
|
increment(key: string, value: number): Promise<boolean>;
|
|
54
|
-
clear(
|
|
67
|
+
clear(): Promise<void>;
|
|
55
68
|
}
|
package/dist/types/cache/implementations/adapters/no-op-cache-adapter/no-op-cache-adapter.d.ts
CHANGED
|
@@ -2,17 +2,20 @@
|
|
|
2
2
|
* @module Cache
|
|
3
3
|
*/
|
|
4
4
|
import { type ICacheAdapter } from "../../../../cache/contracts/cache-adapter.contract";
|
|
5
|
-
import type { TimeSpan } from "../../../../utilities/_module";
|
|
5
|
+
import type { OneOrMore, TimeSpan } from "../../../../utilities/_module";
|
|
6
6
|
/**
|
|
7
7
|
* This <i>NoOpCacheAdapter</i> will do nothing and is used for easily mocking {@link ICacheAdapter} for testing.
|
|
8
8
|
* @group Adapters
|
|
9
9
|
*/
|
|
10
10
|
export declare class NoOpCacheAdapter<TType> implements ICacheAdapter<TType> {
|
|
11
|
+
getGroup(): string;
|
|
12
|
+
withGroup(_group: OneOrMore<string>): ICacheAdapter<TType>;
|
|
13
|
+
exists(_key: string): Promise<boolean>;
|
|
11
14
|
get(_key: string): Promise<TType | null>;
|
|
12
15
|
add(_key: string, _value: TType, _ttl: TimeSpan | null): Promise<boolean>;
|
|
13
16
|
update(_key: string, _value: TType): Promise<boolean>;
|
|
14
17
|
put(_key: string, _value: TType, _ttl: TimeSpan | null): Promise<boolean>;
|
|
15
18
|
remove(_key: string): Promise<boolean>;
|
|
16
19
|
increment(_key: string, _value: number): Promise<boolean>;
|
|
17
|
-
clear(
|
|
20
|
+
clear(): Promise<void>;
|
|
18
21
|
}
|
package/dist/types/cache/implementations/adapters/redis-cache-adapter/redis-cache-adapter.d.ts
CHANGED
|
@@ -2,42 +2,47 @@
|
|
|
2
2
|
* @module Cache
|
|
3
3
|
*/
|
|
4
4
|
import { type ICacheAdapter } from "../../../../cache/contracts/cache-adapter.contract";
|
|
5
|
-
import type {
|
|
5
|
+
import type { OneOrMore } from "../../../../utilities/_module";
|
|
6
|
+
import { type TimeSpan } from "../../../../utilities/_module";
|
|
6
7
|
import { type Redis, type Result } from "ioredis";
|
|
7
|
-
import type {
|
|
8
|
+
import type { ISerde } from "../../../../serde/contracts/_module";
|
|
8
9
|
declare module "ioredis" {
|
|
9
10
|
interface RedisCommander<Context> {
|
|
10
|
-
|
|
11
|
-
daiso_storage_put(key: string, value: string): Result<string, Context>;
|
|
12
|
-
daiso_storage_getOrAdd(key: string, valueToAdd: string): Result<string, Context>;
|
|
11
|
+
daiso_cache_increment(key: string, number: string): Result<number, Context>;
|
|
13
12
|
}
|
|
14
13
|
}
|
|
15
14
|
/**
|
|
16
15
|
* @group Adapters
|
|
17
16
|
*/
|
|
18
17
|
export type RedisCacheAdapterSettings = {
|
|
19
|
-
|
|
18
|
+
serde: ISerde<string>;
|
|
19
|
+
rootGroup: OneOrMore<string>;
|
|
20
20
|
};
|
|
21
21
|
/**
|
|
22
|
-
* To utilize the <i>RedisCacheAdapter</i>, you must install the <i>"ioredis"</i> package and supply a <i>{@link
|
|
22
|
+
* To utilize the <i>RedisCacheAdapter</i>, you must install the <i>"ioredis"</i> package and supply a <i>{@link ISerde | string serde}</i>, such as <i>{@link SuperJsonSerde}</i>.
|
|
23
23
|
* @group Adapters
|
|
24
24
|
* @example
|
|
25
25
|
* ```ts
|
|
26
|
-
* import { RedisCacheAdapter,
|
|
26
|
+
* import { RedisCacheAdapter, SuperJsonSerde } from "@daiso-tech/core";
|
|
27
27
|
* import Redis from "ioredis";
|
|
28
28
|
*
|
|
29
29
|
* const client = new Redis("YOUR_REDIS_CONNECTION_STRING");
|
|
30
|
-
* const
|
|
30
|
+
* const serde = new SuperJsonSerde();
|
|
31
31
|
* const cacheAdapter = new RedisCacheAdapter(client, {
|
|
32
|
-
*
|
|
32
|
+
* serde,
|
|
33
|
+
* rootGroup: "@global"
|
|
33
34
|
* });
|
|
34
35
|
* ```
|
|
35
36
|
*/
|
|
36
37
|
export declare class RedisCacheAdapter<TType> implements ICacheAdapter<TType> {
|
|
37
38
|
private readonly client;
|
|
38
39
|
private static isRedisTypeError;
|
|
39
|
-
private
|
|
40
|
-
|
|
40
|
+
private readonly serde;
|
|
41
|
+
private readonly group;
|
|
42
|
+
constructor(client: Redis, { serde, rootGroup }: RedisCacheAdapterSettings);
|
|
43
|
+
private getGroupName;
|
|
44
|
+
private withPrefix;
|
|
45
|
+
exists(key: string): Promise<boolean>;
|
|
41
46
|
get(key: string): Promise<TType | null>;
|
|
42
47
|
add(key: string, value: TType, ttl: TimeSpan | null): Promise<boolean>;
|
|
43
48
|
update(key: string, value: TType): Promise<boolean>;
|
|
@@ -45,5 +50,7 @@ export declare class RedisCacheAdapter<TType> implements ICacheAdapter<TType> {
|
|
|
45
50
|
remove(key: string): Promise<boolean>;
|
|
46
51
|
private initIncrementCommand;
|
|
47
52
|
increment(key: string, value: number): Promise<boolean>;
|
|
48
|
-
clear(
|
|
53
|
+
clear(): Promise<void>;
|
|
54
|
+
getGroup(): string;
|
|
55
|
+
withGroup(group: OneOrMore<string>): ICacheAdapter<TType>;
|
|
49
56
|
}
|
package/dist/types/cache/implementations/adapters/sqlite-cache-adapter/sqlite-cache-adapter.d.ts
CHANGED
|
@@ -1,47 +1,60 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @module Cache
|
|
3
3
|
*/
|
|
4
|
-
import type { IDeinitizable, IInitizable } from "../../../../_shared/types";
|
|
5
4
|
import { type ICacheAdapter } from "../../../../cache/contracts/cache-adapter.contract";
|
|
6
|
-
import type {
|
|
7
|
-
import type { TimeSpan } from "../../../../utilities/_module";
|
|
5
|
+
import type { ISerde } from "../../../../serde/contracts/_module";
|
|
6
|
+
import type { TimeSpan, IInitizable, IDeinitizable, OneOrMore } from "../../../../utilities/_module";
|
|
8
7
|
import { type Database } from "better-sqlite3";
|
|
9
8
|
/**
|
|
10
9
|
* @group Adapters
|
|
11
10
|
*/
|
|
12
11
|
export type SqliteStorageAdapterSettings = {
|
|
13
12
|
tableName?: string;
|
|
14
|
-
|
|
13
|
+
serde: ISerde<string>;
|
|
15
14
|
enableTransactions?: boolean;
|
|
16
15
|
expiredKeysRemovalInterval?: TimeSpan;
|
|
17
16
|
shouldRemoveExpiredKeys?: boolean;
|
|
17
|
+
rootGroup: OneOrMore<string>;
|
|
18
18
|
};
|
|
19
19
|
/**
|
|
20
|
-
* To utilize the <i>SqliteCacheAdapter</i>, you must install the <i>"better-sqlite3"</i> package and supply a <i>{@link
|
|
20
|
+
* To utilize the <i>SqliteCacheAdapter</i>, you must install the <i>"better-sqlite3"</i> package and supply a <i>{@link ISerde | string serde}</i>, such as <i>{@link SuperJsonSerde}</i>.
|
|
21
21
|
* @group Adapters
|
|
22
22
|
* @example
|
|
23
23
|
* ```ts
|
|
24
|
-
* import { SqliteCacheAdapter,
|
|
24
|
+
* import { SqliteCacheAdapter, SuperJsonSerde } from "@daiso-tech/core";
|
|
25
25
|
* import Sqlite from "better-sqlite3";
|
|
26
26
|
*
|
|
27
27
|
* const client = new Sqlite("local.db");
|
|
28
|
-
* const
|
|
28
|
+
* const serde = new SuperJsonSerde();
|
|
29
29
|
* const cacheAdapter = new SqliteCacheAdapter(client, {
|
|
30
|
-
*
|
|
30
|
+
* serde,
|
|
31
|
+
* rootGroup: "@global"
|
|
31
32
|
* });
|
|
33
|
+
*
|
|
34
|
+
* (async () => {
|
|
35
|
+
* // You only need to call it once before using the adapter.
|
|
36
|
+
* await cacheAdapter.init();
|
|
37
|
+
* await cacheAdapter.add("a", 1);
|
|
38
|
+
*
|
|
39
|
+
* // Will remove the cache
|
|
40
|
+
* await cacheAdapter.deInit();
|
|
41
|
+
* })();
|
|
32
42
|
* ```
|
|
33
43
|
*/
|
|
34
44
|
export declare class SqliteCacheAdapter<TType> implements ICacheAdapter<TType>, IInitizable, IDeinitizable {
|
|
35
45
|
private readonly cacheAdapter;
|
|
36
46
|
constructor(database: Database, settings: SqliteStorageAdapterSettings);
|
|
47
|
+
getGroup(): string;
|
|
48
|
+
withGroup(group: OneOrMore<string>): ICacheAdapter<TType>;
|
|
37
49
|
removeExpiredKeys(): Promise<void>;
|
|
38
50
|
deInit(): Promise<void>;
|
|
39
51
|
init(): Promise<void>;
|
|
52
|
+
exists(key: string): Promise<boolean>;
|
|
40
53
|
get(key: string): Promise<TType | null>;
|
|
41
54
|
add(key: string, value: TType, ttl: TimeSpan | null): Promise<boolean>;
|
|
42
55
|
update(key: string, value: TType): Promise<boolean>;
|
|
43
56
|
put(key: string, value: TType, ttl: TimeSpan | null): Promise<boolean>;
|
|
44
57
|
remove(key: string): Promise<boolean>;
|
|
45
58
|
increment(key: string, value: number): Promise<boolean>;
|
|
46
|
-
clear(
|
|
59
|
+
clear(): Promise<void>;
|
|
47
60
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @module Cache
|
|
3
3
|
*/
|
|
4
|
-
import type {
|
|
5
|
-
import type { ICacheFactory,
|
|
4
|
+
import type { IGroupableEventBus } from "../../../event-bus/contracts/_module";
|
|
5
|
+
import type { ICacheFactory, IGroupableCache, ICacheAdapter } from "../../../cache/contracts/_module";
|
|
6
6
|
import type { TimeSpan } from "../../../utilities/_module";
|
|
7
7
|
/**
|
|
8
8
|
* @group Derivables
|
|
@@ -19,13 +19,9 @@ export type CacheFactorySettings<TDrivers extends string = string> = {
|
|
|
19
19
|
*/
|
|
20
20
|
defaultTtl?: TimeSpan;
|
|
21
21
|
/**
|
|
22
|
-
* In order to listen to events of <i>{@link Cache}</i> class you must pass in <i>{@link
|
|
22
|
+
* In order to listen to events of <i>{@link Cache}</i> class you must pass in <i>{@link IGroupableEventBus}</i>.
|
|
23
23
|
*/
|
|
24
|
-
eventBus?:
|
|
25
|
-
/**
|
|
26
|
-
* You can prefix all keys with a given <i>rootNamespace</i>.
|
|
27
|
-
*/
|
|
28
|
-
rootNamespace?: string;
|
|
24
|
+
eventBus?: IGroupableEventBus<any>;
|
|
29
25
|
};
|
|
30
26
|
/**
|
|
31
27
|
* @group Derivables
|
|
@@ -40,17 +36,15 @@ export type CacheFactorySettings<TDrivers extends string = string> = {
|
|
|
40
36
|
* redis: new RedisCacheAdapter(new Redis()),
|
|
41
37
|
* },
|
|
42
38
|
* defaultDriver: "memory",
|
|
43
|
-
* rootNamespace: "@events"
|
|
44
39
|
* });
|
|
45
40
|
* ```
|
|
46
41
|
*/
|
|
47
42
|
export declare class CacheFactory<TDrivers extends string = string, TType = unknown> implements ICacheFactory<TDrivers, TType> {
|
|
48
|
-
private readonly rootNamespace?;
|
|
49
43
|
private readonly drivers;
|
|
50
44
|
private readonly defaultDriver?;
|
|
51
45
|
private readonly eventBus?;
|
|
52
46
|
private defaultTtl;
|
|
53
47
|
constructor(settings: CacheFactorySettings<TDrivers>);
|
|
54
|
-
use(driverName?: TDrivers | undefined):
|
|
48
|
+
use(driverName?: TDrivers | undefined): IGroupableCache<TType>;
|
|
55
49
|
withType<TOutput extends TType = TType>(): ICacheFactory<TDrivers, TOutput>;
|
|
56
50
|
}
|
|
@@ -1,53 +1,27 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @module Cache
|
|
3
3
|
*/
|
|
4
|
+
import type { CacheEvents, WithTtlValue } from "../../../cache/contracts/_module";
|
|
4
5
|
import { type ICache, type ICacheAdapter } from "../../../cache/contracts/_module";
|
|
5
|
-
import { type
|
|
6
|
-
import type { OneOrMore } from "../../../
|
|
6
|
+
import { type IGroupableCache } from "../../../cache/contracts/_module";
|
|
7
|
+
import type { AsyncLazyable, GetOrAddValue, OneOrMore } from "../../../utilities/_module";
|
|
7
8
|
import type { TimeSpan } from "../../../utilities/_module";
|
|
8
|
-
import {
|
|
9
|
-
import
|
|
10
|
-
import {
|
|
9
|
+
import type { LazyPromiseSettings } from "../../../async/_module";
|
|
10
|
+
import { LazyPromise } from "../../../async/_module";
|
|
11
|
+
import type { IGroupableEventBus, Listener, SelectEvent, Unsubscribe } from "../../../event-bus/contracts/_module";
|
|
11
12
|
/**
|
|
12
13
|
* @group Derivables
|
|
13
14
|
*/
|
|
14
15
|
export type CacheSettings<TType> = {
|
|
15
16
|
/**
|
|
16
|
-
*
|
|
17
|
-
* This useful if you want to add multitenancy but still use the same database.
|
|
18
|
-
* @default {""}
|
|
19
|
-
* @example
|
|
20
|
-
* ```ts
|
|
21
|
-
* import { Cache, MemoryCacheAdapter } from "@daiso-tech/core";
|
|
22
|
-
*
|
|
23
|
-
* const memoryCacheAdapter = new MemoryCacheAdapter();
|
|
24
|
-
* const cacheA = new Cache(memoryCacheAdapter, {
|
|
25
|
-
* rootNamespace: "@a"
|
|
26
|
-
* });
|
|
27
|
-
* const cacheB = new Cache(memoryCacheAdapter, {
|
|
28
|
-
* rootNamespace: "@b"
|
|
29
|
-
* });
|
|
30
|
-
*
|
|
31
|
-
* (async () => {
|
|
32
|
-
* await cacheA.add("a", 1);
|
|
33
|
-
*
|
|
34
|
-
* // Will be "a"
|
|
35
|
-
* console.log(await cacheA.get("a"));
|
|
36
|
-
*
|
|
37
|
-
* // Will be "null"
|
|
38
|
-
* console.log(await cacheB.get("a"));
|
|
39
|
-
* })();
|
|
40
|
-
* ```
|
|
17
|
+
* In order to listen to events of <i>{@link Cache}</i> class you must pass in <i>{@link IGroupableEventBus}</i>.
|
|
41
18
|
*/
|
|
42
|
-
|
|
43
|
-
/**
|
|
44
|
-
* In order to listen to events of <i>{@link Cache}</i> class you must pass in <i>{@link INamespacedEventBus}</i>.
|
|
45
|
-
*/
|
|
46
|
-
eventBus?: INamespacedEventBus<AllCacheEvents<TType>>;
|
|
19
|
+
eventBus?: IGroupableEventBus<CacheEvents<TType>>;
|
|
47
20
|
/**
|
|
48
21
|
* You can decide the default ttl value. If null is passed then no ttl will be used by default.
|
|
49
22
|
*/
|
|
50
23
|
defaultTtl?: TimeSpan | null;
|
|
24
|
+
lazyPromiseSettings?: LazyPromiseSettings;
|
|
51
25
|
};
|
|
52
26
|
/**
|
|
53
27
|
* <i>Cache</i> class can be derived from any <i>{@link ICacheAdapter}</i>.
|
|
@@ -59,14 +33,14 @@ export type CacheSettings<TType> = {
|
|
|
59
33
|
* const cache = new Cache(new MemoryCacheAdapter());
|
|
60
34
|
* ```
|
|
61
35
|
*/
|
|
62
|
-
export declare class Cache<TType = unknown>
|
|
63
|
-
private readonly
|
|
64
|
-
private readonly namespacedEventBus;
|
|
36
|
+
export declare class Cache<TType = unknown> implements IGroupableCache<TType> {
|
|
37
|
+
private readonly groupdEventBus;
|
|
65
38
|
private readonly eventBus;
|
|
66
39
|
private readonly cacheAdapter;
|
|
67
|
-
private readonly eventAttributes;
|
|
68
40
|
private readonly defaultTtl;
|
|
41
|
+
private readonly lazyPromiseSettings?;
|
|
69
42
|
constructor(cacheAdapter: ICacheAdapter<any>, settings?: CacheSettings<TType>);
|
|
43
|
+
private createLayPromise;
|
|
70
44
|
private createKeyFoundEvent;
|
|
71
45
|
private createKeyNotFoundEvent;
|
|
72
46
|
private createKeyAddedEvent;
|
|
@@ -75,9 +49,8 @@ export declare class Cache<TType = unknown> extends BaseCache<TType> implements
|
|
|
75
49
|
private createKeysClearedEvent;
|
|
76
50
|
private createKeyIncrementedEvent;
|
|
77
51
|
private createKeyDecrementedEvent;
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
getNamespace(): string;
|
|
52
|
+
withGroup(group: OneOrMore<string>): ICache<TType>;
|
|
53
|
+
getGroup(): string;
|
|
81
54
|
get(key: string): LazyPromise<TType | null>;
|
|
82
55
|
add(key: string, value: TType, ttl?: TimeSpan | null): LazyPromise<boolean>;
|
|
83
56
|
update(key: string, value: TType): LazyPromise<boolean>;
|
|
@@ -85,4 +58,26 @@ export declare class Cache<TType = unknown> extends BaseCache<TType> implements
|
|
|
85
58
|
remove(key: string): LazyPromise<boolean>;
|
|
86
59
|
increment(key: string, value?: Extract<TType, number>): LazyPromise<boolean>;
|
|
87
60
|
clear(): LazyPromise<void>;
|
|
61
|
+
addListener<TEventName extends keyof CacheEvents>(eventName: TEventName, listener: Listener<SelectEvent<CacheEvents, TEventName>>): LazyPromise<void>;
|
|
62
|
+
addListenerMany<TEventName extends keyof CacheEvents>(eventNames: TEventName[], listener: Listener<SelectEvent<CacheEvents, TEventName>>): LazyPromise<void>;
|
|
63
|
+
removeListener<TEventName extends keyof CacheEvents>(eventName: TEventName, listener: Listener<SelectEvent<CacheEvents, TEventName>>): LazyPromise<void>;
|
|
64
|
+
removeListenerMany<TEventName extends keyof CacheEvents>(eventNames: TEventName[], listener: Listener<SelectEvent<CacheEvents, TEventName>>): LazyPromise<void>;
|
|
65
|
+
listenOnce<TEventName extends keyof CacheEvents>(eventName: TEventName, listener: Listener<SelectEvent<CacheEvents, TEventName>>): LazyPromise<void>;
|
|
66
|
+
subscribe<TEventName extends keyof CacheEvents>(eventName: TEventName, listener: Listener<SelectEvent<CacheEvents, TEventName>>): LazyPromise<Unsubscribe>;
|
|
67
|
+
subscribeMany<TEventName extends keyof CacheEvents>(eventNames: TEventName[], listener: Listener<SelectEvent<CacheEvents, TEventName>>): LazyPromise<Unsubscribe>;
|
|
68
|
+
exists(key: string): LazyPromise<boolean>;
|
|
69
|
+
existsMany<TKeys extends string>(keys: TKeys[]): LazyPromise<Record<TKeys, boolean>>;
|
|
70
|
+
missing(key: string): LazyPromise<boolean>;
|
|
71
|
+
missingMany<TKeys extends string>(keys: TKeys[]): LazyPromise<Record<TKeys, boolean>>;
|
|
72
|
+
getMany<TKeys extends string>(keys: TKeys[]): LazyPromise<Record<TKeys, TType | null>>;
|
|
73
|
+
getOr(key: string, defaultValue: AsyncLazyable<TType>): LazyPromise<TType>;
|
|
74
|
+
getOrMany<TKeys extends string>(keysWithDefaults: Record<TKeys, AsyncLazyable<TType>>): LazyPromise<Record<TKeys, TType>>;
|
|
75
|
+
getOrFail(key: string): LazyPromise<TType>;
|
|
76
|
+
addMany<TKeys extends string>(values: Record<TKeys, WithTtlValue<TType>>): LazyPromise<Record<TKeys, boolean>>;
|
|
77
|
+
updateMany<TKeys extends string>(values: Record<TKeys, TType>): LazyPromise<Record<TKeys, boolean>>;
|
|
78
|
+
putMany<TKeys extends string>(values: Record<TKeys, WithTtlValue<TType>>): LazyPromise<Record<TKeys, boolean>>;
|
|
79
|
+
removeMany<TKeys extends string>(keys: TKeys[]): LazyPromise<Record<TKeys, boolean>>;
|
|
80
|
+
getAndRemove(key: string): LazyPromise<TType | null>;
|
|
81
|
+
getOrAdd(key: string, valueToAdd: AsyncLazyable<GetOrAddValue<TType>>, ttl?: TimeSpan): LazyPromise<TType>;
|
|
82
|
+
decrement(key: string, value?: Extract<TType, number>): LazyPromise<boolean>;
|
|
88
83
|
}
|
|
@@ -2,8 +2,9 @@
|
|
|
2
2
|
* @module Collection
|
|
3
3
|
*/
|
|
4
4
|
import type { AsyncReduce, CrossJoinResult, AsyncPredicate, AsyncForEach, AsyncMap, AsyncModifier, AsyncTap, AsyncTransform, Comparator, EnsureRecord, EnsureMap } from "../../collection/contracts/_module";
|
|
5
|
-
import type { AsyncLazyable, AsyncIterableValue } from "../../
|
|
6
|
-
import type {
|
|
5
|
+
import type { AsyncLazyable, AsyncIterableValue } from "../../utilities/_module";
|
|
6
|
+
import type { TimeSpan } from "../../utilities/_module";
|
|
7
|
+
import type { LazyPromise } from "../../async/_module";
|
|
7
8
|
export type AsyncCollapse<TValue> = TValue extends Array<infer TItem> | Iterable<infer TItem> | IAsyncCollection<infer TItem> ? TItem : TValue;
|
|
8
9
|
/**
|
|
9
10
|
* The <i>IAsyncCollection</i> contract offers a fluent and efficient approach to working with {@link AsyncIterable} objects.
|
|
@@ -1485,7 +1486,9 @@ export type IAsyncCollection<TInput> = AsyncIterable<TInput> & {
|
|
|
1485
1486
|
*/
|
|
1486
1487
|
delay(time: TimeSpan): IAsyncCollection<TInput>;
|
|
1487
1488
|
/**
|
|
1488
|
-
*
|
|
1489
|
+
* @experimental
|
|
1490
|
+
* The <I>takeUntilAbort</i> method returns a new collection that will iterate values until aborted by passing in <i>{@link abortSignal | AbortSignal}</i>.
|
|
1491
|
+
* After when aborted, the collection will stop iterating:
|
|
1489
1492
|
* @example
|
|
1490
1493
|
* ```ts
|
|
1491
1494
|
* import { AsyncIterableCollection } from "@daiso-tech/core";;
|
|
@@ -1499,8 +1502,9 @@ export type IAsyncCollection<TInput> = AsyncIterable<TInput> & {
|
|
|
1499
1502
|
*/
|
|
1500
1503
|
takeUntilAbort(abortSignal: AbortSignal, shouldThrow?: boolean): IAsyncCollection<TInput>;
|
|
1501
1504
|
/**
|
|
1502
|
-
*
|
|
1503
|
-
*
|
|
1505
|
+
* @experimental
|
|
1506
|
+
* The <I>takeUntilTimeout</i> method returns a new collection that will iterate values until the specified time.
|
|
1507
|
+
* After that time, the collection will stop iterating:
|
|
1504
1508
|
* @example
|
|
1505
1509
|
* ```ts
|
|
1506
1510
|
* import { AsyncIterableCollection } from "@daiso-tech/core";;
|
|
@@ -1519,7 +1523,7 @@ export type IAsyncCollection<TInput> = AsyncIterable<TInput> & {
|
|
|
1519
1523
|
* .forEach(nbr => console.log(nbr))
|
|
1520
1524
|
* ```
|
|
1521
1525
|
*/
|
|
1522
|
-
takeUntilTimeout(
|
|
1526
|
+
takeUntilTimeout(time: TimeSpan, shouldThrow?: boolean): IAsyncCollection<TInput>;
|
|
1523
1527
|
/**
|
|
1524
1528
|
* The <i>toArray</i> method converts the collection to a new <i>{@link Array}</i>.
|
|
1525
1529
|
*/
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* @module Collection
|
|
3
3
|
*/
|
|
4
4
|
import type { Comparator, Predicate, ForEach, Map, Modifier, Tap, Transform, Reduce, CrossJoinResult, EnsureMap, EnsureRecord } from "../../collection/contracts/_module";
|
|
5
|
-
import type { Lazyable } from "../../
|
|
5
|
+
import type { Lazyable } from "../../utilities/_module";
|
|
6
6
|
export type Collapse<TValue> = TValue extends Array<infer TItem> | Iterable<infer TItem> | ICollection<infer TItem> ? TItem : TValue;
|
|
7
7
|
/**
|
|
8
8
|
* The <i>ICollection</i> contract offers a fluent and efficient approach to working with {@link Iterable} objects.
|
package/dist/types/collection/implementations/async-iterable-collection/_shared/_module.d.ts
CHANGED
|
@@ -4,7 +4,6 @@ export * from "../../../../collection/implementations/async-iterable-collection/
|
|
|
4
4
|
export * from "../../../../collection/implementations/async-iterable-collection/_shared/async-count-by-iterable";
|
|
5
5
|
export * from "../../../../collection/implementations/async-iterable-collection/_shared/async-cross-join-iterable";
|
|
6
6
|
export * from "../../../../collection/implementations/async-iterable-collection/_shared/async-entries-iterable";
|
|
7
|
-
export * from "../../../../collection/implementations/async-iterable-collection/_shared/async-error-handler-iterable";
|
|
8
7
|
export * from "../../../../collection/implementations/async-iterable-collection/_shared/async-filter-iterable";
|
|
9
8
|
export * from "../../../../collection/implementations/async-iterable-collection/_shared/async-flat-map-iterable";
|
|
10
9
|
export * from "../../../../collection/implementations/async-iterable-collection/_shared/async-group-by-iterable";
|
|
@@ -31,3 +30,7 @@ export * from "../../../../collection/implementations/async-iterable-collection/
|
|
|
31
30
|
export * from "../../../../collection/implementations/async-iterable-collection/_shared/async-update-iterable";
|
|
32
31
|
export * from "../../../../collection/implementations/async-iterable-collection/_shared/async-when-iterable";
|
|
33
32
|
export * from "../../../../collection/implementations/async-iterable-collection/_shared/async-zip-iterable";
|
|
33
|
+
export * from "../../../../collection/implementations/async-iterable-collection/_shared/async-take-until-abort-iterable";
|
|
34
|
+
export * from "../../../../collection/implementations/async-iterable-collection/_shared/async-take-until-timeout-iterable";
|
|
35
|
+
export * from "../../../../collection/implementations/async-iterable-collection/_shared/async-delay-iterable";
|
|
36
|
+
export * from "../../../../collection/implementations/async-iterable-collection/_shared/async-retry-iterable";
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* @module Collection
|
|
3
3
|
*/
|
|
4
4
|
import { type IAsyncCollection } from "../../../../collection/contracts/_module";
|
|
5
|
-
import { type AsyncIterableValue } from "../../../../
|
|
5
|
+
import { type AsyncIterableValue } from "../../../../utilities/_module";
|
|
6
6
|
/**
|
|
7
7
|
* @internal
|
|
8
8
|
*/
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* @module Collection
|
|
3
3
|
*/
|
|
4
4
|
import { type AsyncPredicate, type IAsyncCollection } from "../../../../collection/contracts/_module";
|
|
5
|
-
import { type AsyncIterableValue } from "../../../../
|
|
5
|
+
import { type AsyncIterableValue } from "../../../../utilities/_module";
|
|
6
6
|
/**
|
|
7
7
|
* @internal
|
|
8
8
|
*/
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import type { CrossJoinResult } from "../../../../collection/contracts/_module";
|
|
5
5
|
import { type IAsyncCollection } from "../../../../collection/contracts/_module";
|
|
6
|
-
import { type AsyncIterableValue } from "../../../../
|
|
6
|
+
import { type AsyncIterableValue } from "../../../../utilities/_module";
|
|
7
7
|
/**
|
|
8
8
|
* @internal
|
|
9
9
|
*/
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @module Collection
|
|
3
|
+
*/
|
|
4
|
+
import type { TimeSpan } from "../../../../utilities/_module";
|
|
5
|
+
/**
|
|
6
|
+
* @internal
|
|
7
|
+
*/
|
|
8
|
+
export declare class AsyncDelayIterable<TValue> implements AsyncIterable<TValue> {
|
|
9
|
+
private readonly iterable;
|
|
10
|
+
private readonly time;
|
|
11
|
+
constructor(iterable: AsyncIterable<TValue>, time: TimeSpan);
|
|
12
|
+
[Symbol.asyncIterator](): AsyncIterator<TValue>;
|
|
13
|
+
}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* @module Collection
|
|
3
3
|
*/
|
|
4
4
|
import { type AsyncMap, type IAsyncCollection } from "../../../../collection/contracts/_module";
|
|
5
|
-
import { type AsyncIterableValue } from "../../../../
|
|
5
|
+
import { type AsyncIterableValue } from "../../../../utilities/_module";
|
|
6
6
|
/**
|
|
7
7
|
* @internal
|
|
8
8
|
*/
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* @module Collection
|
|
3
3
|
*/
|
|
4
4
|
import { type AsyncPredicate, type IAsyncCollection } from "../../../../collection/contracts/_module";
|
|
5
|
-
import { type AsyncIterableValue } from "../../../../
|
|
5
|
+
import { type AsyncIterableValue } from "../../../../utilities/_module";
|
|
6
6
|
/**
|
|
7
7
|
* @internal
|
|
8
8
|
*/
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* @module Collection
|
|
3
3
|
*/
|
|
4
4
|
import { type AsyncPredicate, type IAsyncCollection } from "../../../../collection/contracts/_module";
|
|
5
|
-
import { type AsyncIterableValue } from "../../../../
|
|
5
|
+
import { type AsyncIterableValue } from "../../../../utilities/_module";
|
|
6
6
|
/**
|
|
7
7
|
* @internal
|
|
8
8
|
*/
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @module Collection
|
|
3
3
|
*/
|
|
4
|
-
import { type AsyncIterableValue } from "../../../../
|
|
4
|
+
import { type AsyncIterableValue } from "../../../../utilities/_module";
|
|
5
5
|
/**
|
|
6
6
|
* @internal
|
|
7
7
|
*/
|
|
8
|
-
export declare class AsyncMergeIterable<TInput
|
|
9
|
-
private
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
[Symbol.asyncIterator](): AsyncIterator<TInput | TExtended>;
|
|
8
|
+
export declare class AsyncMergeIterable<TInput> implements AsyncIterable<TInput> {
|
|
9
|
+
private readonly iterables;
|
|
10
|
+
constructor(iterables: AsyncIterableValue<AsyncIterableValue<TInput>>);
|
|
11
|
+
[Symbol.asyncIterator](): AsyncIterator<TInput>;
|
|
13
12
|
}
|