@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
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"_module.js","sourceRoot":"","sources":["../../../../src/_shared/redis/_module.ts"],"names":[],"mappings":"AAAA,cAAc,oCAAoC,CAAC;AACnD,cAAc,gCAAgC,CAAC;AAC/C,cAAc,qCAAqC,CAAC"}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
export class ClearIterable {
|
|
2
|
-
client;
|
|
3
|
-
pattern;
|
|
4
|
-
constructor(client, pattern) {
|
|
5
|
-
this.client = client;
|
|
6
|
-
this.pattern = pattern;
|
|
7
|
-
}
|
|
8
|
-
async *[Symbol.asyncIterator]() {
|
|
9
|
-
let coursor = 0;
|
|
10
|
-
do {
|
|
11
|
-
const [_coursor, elements] = await this.client.scan(coursor, "MATCH", this.pattern);
|
|
12
|
-
if (elements.length === 0) {
|
|
13
|
-
return;
|
|
14
|
-
}
|
|
15
|
-
await this.client.del(elements);
|
|
16
|
-
coursor++;
|
|
17
|
-
yield undefined;
|
|
18
|
-
} while (coursor !== 0);
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
//# sourceMappingURL=clear-iterable.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"clear-iterable.js","sourceRoot":"","sources":["../../../../src/_shared/redis/clear-iterable.ts"],"names":[],"mappings":"AASA,MAAM,OAAO,aAAa;IAED;IACA;IAFrB,YACqB,MAAa,EACb,OAAe;QADf,WAAM,GAAN,MAAM,CAAO;QACb,YAAO,GAAP,OAAO,CAAQ;IACjC,CAAC;IAEJ,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,aAAa,CAAC;QACzB,IAAI,OAAO,GAAG,CAAC,CAAC;QAChB,GAAG,CAAC;YACA,MAAM,CAAC,QAAQ,EAAE,QAAQ,CAAC,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,IAAI,CAC/C,OAAO,EACP,OAAO,EACP,IAAI,CAAC,OAAO,CACf,CAAC;YACF,IAAI,QAAQ,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;gBACxB,OAAO;YACX,CAAC;YACD,MAAM,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;YAChC,OAAO,EAAE,CAAC;YACV,MAAM,SAAS,CAAC;QACpB,CAAC,QAAQ,OAAO,KAAK,CAAC,EAAE;IAC5B,CAAC;CACJ"}
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
export function escapeRedisChars(value) {
|
|
2
|
-
const replacements = {
|
|
3
|
-
",": "\\,",
|
|
4
|
-
".": "\\.",
|
|
5
|
-
"<": "\\<",
|
|
6
|
-
">": "\\>",
|
|
7
|
-
"{": "\\{",
|
|
8
|
-
"}": "\\}",
|
|
9
|
-
"[": "\\[",
|
|
10
|
-
"]": "\\]",
|
|
11
|
-
'"': '\\"',
|
|
12
|
-
"'": "\\'",
|
|
13
|
-
":": "\\:",
|
|
14
|
-
";": "\\;",
|
|
15
|
-
"!": "\\!",
|
|
16
|
-
"@": "\\@",
|
|
17
|
-
"#": "\\#",
|
|
18
|
-
$: "\\$",
|
|
19
|
-
"%": "\\%",
|
|
20
|
-
"^": "\\^",
|
|
21
|
-
"&": "\\&",
|
|
22
|
-
"*": "\\*",
|
|
23
|
-
"(": "\\(",
|
|
24
|
-
")": "\\)",
|
|
25
|
-
"-": "\\-",
|
|
26
|
-
"+": "\\+",
|
|
27
|
-
"=": "\\=",
|
|
28
|
-
"~": "\\~",
|
|
29
|
-
};
|
|
30
|
-
return value.replace(/,|\.|<|>|\{|\}|\[|\]|"|'|:|;|!|@|#|\$|%|\^|&|\*|\(|\)|-|\+|=|~/g, (chunk) => {
|
|
31
|
-
const item = replacements[chunk];
|
|
32
|
-
if (item === undefined) {
|
|
33
|
-
throw new Error("Encounterd none existing field");
|
|
34
|
-
}
|
|
35
|
-
return item;
|
|
36
|
-
});
|
|
37
|
-
}
|
|
38
|
-
//# sourceMappingURL=escape-redis-chars.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"escape-redis-chars.js","sourceRoot":"","sources":["../../../../src/_shared/redis/escape-redis-chars.ts"],"names":[],"mappings":"AAOA,MAAM,UAAU,gBAAgB,CAAC,KAAa;IAC1C,MAAM,YAAY,GAA2B;QACzC,GAAG,EAAE,KAAK;QACV,GAAG,EAAE,KAAK;QACV,GAAG,EAAE,KAAK;QACV,GAAG,EAAE,KAAK;QACV,GAAG,EAAE,KAAK;QACV,GAAG,EAAE,KAAK;QACV,GAAG,EAAE,KAAK;QACV,GAAG,EAAE,KAAK;QACV,GAAG,EAAE,KAAK;QACV,GAAG,EAAE,KAAK;QACV,GAAG,EAAE,KAAK;QACV,GAAG,EAAE,KAAK;QACV,GAAG,EAAE,KAAK;QACV,GAAG,EAAE,KAAK;QACV,GAAG,EAAE,KAAK;QACV,CAAC,EAAE,KAAK;QACR,GAAG,EAAE,KAAK;QACV,GAAG,EAAE,KAAK;QACV,GAAG,EAAE,KAAK;QACV,GAAG,EAAE,KAAK;QACV,GAAG,EAAE,KAAK;QACV,GAAG,EAAE,KAAK;QACV,GAAG,EAAE,KAAK;QACV,GAAG,EAAE,KAAK;QACV,GAAG,EAAE,KAAK;QACV,GAAG,EAAE,KAAK;KACb,CAAC;IACF,OAAO,KAAK,CAAC,OAAO,CAChB,iEAAiE,EACjE,CAAC,KAAK,EAAE,EAAE;QACN,MAAM,IAAI,GAAG,YAAY,CAAC,KAAK,CAAC,CAAC;QACjC,IAAI,IAAI,KAAK,SAAS,EAAE,CAAC;YACrB,MAAM,IAAI,KAAK,CAAC,gCAAgC,CAAC,CAAC;QACtD,CAAC;QACD,OAAO,IAAI,CAAC;IAChB,CAAC,CACJ,CAAC;AACN,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"is-redis-type-error.js","sourceRoot":"","sources":["../../../../src/_shared/redis/is-redis-type-error.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAKrC,MAAM,UAAU,gBAAgB,CAE5B,KAAU;IAGV,OAAO,CACH,KAAK,YAAY,UAAU;QAE3B,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,gCAAgC,CAAC,CAC3D,CAAC;AACN,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"utilities.js","sourceRoot":"","sources":["../../../src/_shared/utilities.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,UAAU,EAAE,CAAC;QACjC,MAAM,QAAQ,GAAG,QAAiC,CAAC;QACnD,OAAO,QAAQ,EAAE,CAAC;IACtB,CAAC;IACD,OAAO,QAAQ,CAAC;AACpB,CAAC;AAKD,MAAM,UAAU,YAAY,CAAC,KAAY;IACrC,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC,CAAC;AAC9B,CAAC;AAID,MAAM,UAAU,aAAa,CAEzB,MAA6C;IAE7C,OAAO,CAEH,CAAC,GAAG,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,KAAK,SAAS,CAAC;SAC5D,MAAM,KAAK,CAAC,CACpB,CAAC;AACN,CAAC;AAKD,MAAM,UAAU,iBAAiB,CAAC,SAA4B;IAC1D,IAAI,KAAK,CAAC,OAAO,CAAC,SAAS,CAAC,EAAE,CAAC;QAC3B,SAAS,GAAG,SAAS,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IACpE,CAAC;IACD,OAAO,SAAS,CAAC;AACrB,CAAC"}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
export class AsyncErrorHandlerIterable {
|
|
2
|
-
iterable;
|
|
3
|
-
errorPasser;
|
|
4
|
-
constructor(iterable, errorPasser) {
|
|
5
|
-
this.iterable = iterable;
|
|
6
|
-
this.errorPasser = errorPasser;
|
|
7
|
-
}
|
|
8
|
-
async *[Symbol.asyncIterator]() {
|
|
9
|
-
const iterator = this.iterable[Symbol.asyncIterator]();
|
|
10
|
-
try {
|
|
11
|
-
while (true) {
|
|
12
|
-
const result = await iterator.next();
|
|
13
|
-
if (result.done) {
|
|
14
|
-
return;
|
|
15
|
-
}
|
|
16
|
-
yield result.value;
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
catch (error) {
|
|
20
|
-
if (this.errorPasser(error)) {
|
|
21
|
-
return;
|
|
22
|
-
}
|
|
23
|
-
throw error;
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
//# sourceMappingURL=async-error-handler-iterable.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"async-error-handler-iterable.js","sourceRoot":"","sources":["../../../../../../src/collection/implementations/async-iterable-collection/_shared/async-error-handler-iterable.ts"],"names":[],"mappings":"AAOA,MAAM,OAAO,yBAAyB;IAIb;IACA;IAFrB,YACqB,QAA+B,EAC/B,WAAwC;QADxC,aAAQ,GAAR,QAAQ,CAAuB;QAC/B,gBAAW,GAAX,WAAW,CAA6B;IAC1D,CAAC;IAEJ,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,aAAa,CAAC;QACzB,MAAM,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,aAAa,CAAC,EAAE,CAAC;QACvD,IAAI,CAAC;YAED,OAAO,IAAI,EAAE,CAAC;gBACV,MAAM,MAAM,GAAG,MAAM,QAAQ,CAAC,IAAI,EAAE,CAAC;gBACrC,IAAI,MAAM,CAAC,IAAI,EAAE,CAAC;oBACd,OAAO;gBACX,CAAC;gBACD,MAAM,MAAM,CAAC,KAAK,CAAC;YACvB,CAAC;QACL,CAAC;QAAC,OAAO,KAAc,EAAE,CAAC;YACtB,IAAI,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,EAAE,CAAC;gBAC1B,OAAO;YACX,CAAC;YACD,MAAM,KAAK,CAAC;QAChB,CAAC;IACL,CAAC;CACJ"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"_module.js","sourceRoot":"","sources":["../../../../../../src/event-bus/implementations/_shared/test-utilities/_module.ts"],"names":[],"mappings":"AAAA,cAAc,iFAAiF,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"event-bus-adapter.test-suite.js","sourceRoot":"","sources":["../../../../../../src/event-bus/implementations/_shared/test-utilities/event-bus-adapter.test-suite.ts"],"names":[],"mappings":"AAIA,OAAO,EAKH,QAAQ,GACX,MAAM,QAAQ,CAAC;AAMhB,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAgCtD,MAAM,UAAU,wBAAwB,CACpC,QAAmC;IAEnC,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,aAAa,EAAE,UAAU,EAAE,GAAG,QAAQ,CAAC;IAE7D,IAAI,eAAiC,CAAC;IACtC,UAAU,CAAC,KAAK,IAAI,EAAE;QAClB,eAAe,GAAG,MAAM,aAAa,EAAE,CAAC;IAC5C,CAAC,CAAC,CAAC;IAEH,QAAQ,CAAC,+CAA+C,EAAE,GAAG,EAAE;QAC3D,IAAI,CAAC,+DAA+D,EAAE,KAAK,IAAI,EAAE;YAC7E,MAAM,IAAI,GAAG,MAAM,CAAC;YACpB,IAAI,MAAM,GAAsB,IAAI,CAAC;YACrC,MAAM,eAAe,CAAC,WAAW,CAAC,IAAI,EAAE,CAAC,KAAK,EAAE,EAAE;gBAC9C,MAAM,GAAG,KAAK,CAAC;YACnB,CAAC,CAAC,CAAC;YACH,MAAM,CAAC,MAAM,CAAC,CAAC,QAAQ,EAAE,CAAC;QAC9B,CAAC,CAAC,CAAC;QACH,IAAI,CAAC,iEAAiE,EAAE,KAAK,IAAI,EAAE;YAC/E,MAAM,IAAI,GAAG,MAAM,CAAC;YACpB,IAAI,MAAM,GAAsB,IAAI,CAAC;YACrC,MAAM,eAAe,CAAC,WAAW,CAAC,IAAI,EAAE,CAAC,KAAK,EAAE,EAAE;gBAC9C,MAAM,GAAG,KAAK,CAAC;YACnB,CAAC,CAAC,CAAC;YACH,MAAM,KAAK,GAAe;gBACtB,IAAI,EAAE,IAAI;aACb,CAAC;YACF,MAAM,eAAe,CAAC,QAAQ,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC;YACxC,MAAM,KAAK,CAAC,QAAQ,CAAC,gBAAgB,CAAC,EAAE,CAAC,CAAC,CAAC;YAC3C,MAAM,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;QAClC,CAAC,CAAC,CAAC;QACH,IAAI,CAAC,6DAA6D,EAAE,KAAK,IAAI,EAAE;YAC3E,MAAM,IAAI,GAAG,MAAM,CAAC;YACpB,IAAI,MAAM,GAAsB,IAAI,CAAC;YACrC,MAAM,QAAQ,GAAG,CAAC,KAAiB,EAAE,EAAE;gBACnC,MAAM,GAAG,KAAK,CAAC;YACnB,CAAC,CAAC;YACF,MAAM,eAAe,CAAC,WAAW,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;YAClD,MAAM,eAAe,CAAC,cAAc,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;YACrD,MAAM,KAAK,GAAe;gBACtB,IAAI,EAAE,IAAI;aACb,CAAC;YACF,MAAM,KAAK,CAAC,QAAQ,CAAC,gBAAgB,CAAC,EAAE,CAAC,CAAC,CAAC;YAC3C,MAAM,eAAe,CAAC,QAAQ,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC;YACxC,MAAM,CAAC,MAAM,CAAC,CAAC,QAAQ,EAAE,CAAC;QAC9B,CAAC,CAAC,CAAC;IACP,CAAC,CAAC,CAAC;AACP,CAAC"}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
export class WithValidationEventBusAdapter {
|
|
2
|
-
eventBusAdapter;
|
|
3
|
-
validator;
|
|
4
|
-
listenerMap = new Map();
|
|
5
|
-
constructor(eventBusAdapter, validator) {
|
|
6
|
-
this.eventBusAdapter = eventBusAdapter;
|
|
7
|
-
this.validator = validator;
|
|
8
|
-
}
|
|
9
|
-
async addListener(event, listener) {
|
|
10
|
-
let wrappedListener = this.listenerMap.get(listener);
|
|
11
|
-
if (wrappedListener === undefined) {
|
|
12
|
-
wrappedListener = async (event) => {
|
|
13
|
-
await listener(this.validator(event));
|
|
14
|
-
};
|
|
15
|
-
this.listenerMap.set(listener, wrappedListener);
|
|
16
|
-
}
|
|
17
|
-
await this.eventBusAdapter.addListener(event, wrappedListener);
|
|
18
|
-
}
|
|
19
|
-
async removeListener(event, listener) {
|
|
20
|
-
const wrappedListener = this.listenerMap.get(listener);
|
|
21
|
-
if (wrappedListener === undefined) {
|
|
22
|
-
return;
|
|
23
|
-
}
|
|
24
|
-
await this.eventBusAdapter.removeListener(event, wrappedListener);
|
|
25
|
-
this.listenerMap.delete(listener);
|
|
26
|
-
}
|
|
27
|
-
async dispatch(events) {
|
|
28
|
-
await this.eventBusAdapter.dispatch(events.map(this.validator));
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
//# sourceMappingURL=with-validation-event-bus-adapter.js.map
|
package/dist/esm/event-bus/implementations/derivables/with-validation-event-bus-adapter.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"with-validation-event-bus-adapter.js","sourceRoot":"","sources":["../../../../../src/event-bus/implementations/derivables/with-validation-event-bus-adapter.ts"],"names":[],"mappings":"AAcA,MAAM,OAAO,6BAA6B;IAOjB;IACA;IAPJ,WAAW,GAAG,IAAI,GAAG,EAGnC,CAAC;IAEJ,YACqB,eAAiC,EACjC,SAAgC;QADhC,oBAAe,GAAf,eAAe,CAAkB;QACjC,cAAS,GAAT,SAAS,CAAuB;IAClD,CAAC;IAEJ,KAAK,CAAC,WAAW,CACb,KAAa,EACb,QAA8B;QAE9B,IAAI,eAAe,GAAG,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;QACrD,IAAI,eAAe,KAAK,SAAS,EAAE,CAAC;YAChC,eAAe,GAAG,KAAK,EAAE,KAAiB,EAAE,EAAE;gBAC1C,MAAM,QAAQ,CAAC,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,CAAC;YAC1C,CAAC,CAAC;YACF,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,QAAQ,EAAE,eAAe,CAAC,CAAC;QACpD,CAAC;QAED,MAAM,IAAI,CAAC,eAAe,CAAC,WAAW,CAAC,KAAK,EAAE,eAAe,CAAC,CAAC;IACnE,CAAC;IAED,KAAK,CAAC,cAAc,CAChB,KAAa,EACb,QAA8B;QAE9B,MAAM,eAAe,GAAG,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;QACvD,IAAI,eAAe,KAAK,SAAS,EAAE,CAAC;YAChC,OAAO;QACX,CAAC;QAED,MAAM,IAAI,CAAC,eAAe,CAAC,cAAc,CAAC,KAAK,EAAE,eAAe,CAAC,CAAC;QAClE,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;IACtC,CAAC;IAED,KAAK,CAAC,QAAQ,CAAC,MAAoB;QAC/B,MAAM,IAAI,CAAC,eAAe,CAAC,QAAQ,CAAC,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC;IACpE,CAAC;CACJ"}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
export * from "../../utilities/async/_shared";
|
|
2
|
-
export * from "../../utilities/async/abortable/_module";
|
|
3
|
-
export * from "../../utilities/async/abortable-iterable/_module";
|
|
4
|
-
export * from "../../utilities/async/delay/_module";
|
|
5
|
-
export * from "../../utilities/async/delay-iterable/_module";
|
|
6
|
-
export * from "../../utilities/async/lazy-promise/_module";
|
|
7
|
-
export * from "../../utilities/async/retry/_module";
|
|
8
|
-
export { retryIterable as unstable_retryIterable } from "../../utilities/async/retry-iterable/_module";
|
|
9
|
-
export * from "../../utilities/async/timeout/_module";
|
|
10
|
-
export * from "../../utilities/async/timeout-iterable/_module";
|
|
11
|
-
//# sourceMappingURL=_module.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"_module.js","sourceRoot":"","sources":["../../../../src/utilities/async/_module.ts"],"names":[],"mappings":"AAAA,cAAc,2BAA2B,CAAC;AAC1C,cAAc,qCAAqC,CAAC;AACpD,cAAc,8CAA8C,CAAC;AAC7D,cAAc,iCAAiC,CAAC;AAChD,cAAc,0CAA0C,CAAC;AACzD,cAAc,wCAAwC,CAAC;AACvD,cAAc,iCAAiC,CAAC;AAChD,OAAO,EAAE,aAAa,IAAI,sBAAsB,EAAE,MAAM,0CAA0C,CAAC;AACnG,cAAc,mCAAmC,CAAC;AAClD,cAAc,4CAA4C,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"_shared.js","sourceRoot":"","sources":["../../../../src/utilities/async/_shared.ts"],"names":[],"mappings":"AAOA,MAAM,OAAO,UAAW,SAAQ,KAAK;IACjC,YAAY,OAAe,EAAE,KAAe;QACxC,KAAK,CAAC,OAAO,EAAE,EAAE,KAAK,EAAE,CAAC,CAAC;QAC1B,IAAI,CAAC,IAAI,GAAG,UAAU,CAAC,IAAI,CAAC;IAChC,CAAC;CACJ;AAKD,MAAM,OAAO,eAAgB,SAAQ,UAAU;IAC3C,YAAY,OAAe,EAAE,KAAe;QACxC,KAAK,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC;QACtB,IAAI,CAAC,IAAI,GAAG,eAAe,CAAC,IAAI,CAAC;IACrC,CAAC;CACJ;AAKD,MAAM,OAAO,iBAAkB,SAAQ,UAAU;IAC7C,YAAY,OAAe,EAAE,KAAe;QACxC,KAAK,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC;QACtB,IAAI,CAAC,IAAI,GAAG,iBAAiB,CAAC,IAAI,CAAC;IACvC,CAAC;CACJ;AAaD,MAAM,OAAO,eAAgB,SAAQ,UAAU;IAC3B,WAAW,CAAS;IAEpC,YAAY,OAAe,EAAE,EAAE,KAAK,EAAE,WAAW,EAAuB;QACpE,KAAK,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC;QACtB,IAAI,CAAC,IAAI,GAAG,eAAe,CAAC,IAAI,CAAC;QACjC,IAAI,CAAC,WAAW,GAAG,WAAW,CAAC;IACnC,CAAC;CACJ"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"_module.js","sourceRoot":"","sources":["../../../../../src/utilities/async/abortable/_module.ts"],"names":[],"mappings":"AAAA,cAAc,uCAAuC,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"abortable.js","sourceRoot":"","sources":["../../../../../src/utilities/async/abortable/abortable.ts"],"names":[],"mappings":"AAIA,OAAO,EACH,eAAe,GAGlB,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAE,WAAW,EAAE,MAAM,wCAAwC,CAAC;AAKrE,SAAS,oBAAoB,CACzB,WAAwB;IAKxB,IAAI,OAAO,GAAsC,IAAI,CAAC;IACtD,SAAS,KAAK;QACV,IAAI,OAAO,KAAK,IAAI,EAAE,CAAC;YACnB,OAAO;QACX,CAAC;QACD,OAAO,CACH,IAAI,eAAe,CACf,uCAAuC,MAAM,CAAC,WAAW,CAAC,MAAM,CAAC,GAAG,EACpE,WAAW,CAAC,MAAM,CACrB,CACJ,CAAC;IACN,CAAC;IAED,IAAI,WAAW,CAAC,OAAO,EAAE,CAAC;QACtB,OAAO;YACH,OAAO,EAAE,OAAO,CAAC,MAAM,CACnB,IAAI,eAAe,CACf,uCAAuC,MAAM,CAAC,WAAW,CAAC,OAAO,CAAC,GAAG,EACrE,WAAW,CAAC,MAAM,CACrB,CACJ;YACD,KAAK;SACR,CAAC;IACN,CAAC;IAED,OAAO;QACH,OAAO,EAAE,IAAI,OAAO,CAAC,CAAC,QAAQ,EAAE,MAAM,EAAE,EAAE;YACtC,OAAO,GAAG,MAAM,CAAC;YACjB,IAAI,WAAW,CAAC,OAAO,EAAE,CAAC;gBACtB,KAAK,EAAE,CAAC;gBACR,OAAO;YACX,CAAC;YACD,WAAW,CAAC,gBAAgB,CAAC,OAAO,EAAE,KAAK,EAAE;gBACzC,IAAI,EAAE,IAAI;aACb,CAAC,CAAC;QACP,CAAC,CAAC;QACF,KAAK;KACR,CAAC;AACN,CAAC;AAoCD,MAAM,UAAU,SAAS,CACrB,OAAkC,EAClC,WAAwB;IAExB,OAAO,IAAI,WAAW,CAAC,KAAK,IAAI,EAAE;QAC9B,IAAI,WAAW,CAAC,OAAO,EAAE,CAAC;YACtB,MAAM,IAAI,eAAe,CACrB,uCAAuC,MAAM,CAAC,WAAW,CAAC,MAAM,CAAC,GAAG,EACpE,WAAW,CAAC,MAAM,CACrB,CAAC;QACN,CAAC;QAED,MAAM,EAAE,OAAO,EAAE,kBAAkB,EAAE,KAAK,EAAE,GACxC,oBAAoB,CAAS,WAAW,CAAC,CAAC;QAC9C,IAAI,CAAC;YACD,OAAO,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC,OAAO,EAAE,EAAE,kBAAkB,CAAC,CAAC,CAAC;QAC/D,CAAC;gBAAS,CAAC;YACP,WAAW,CAAC,mBAAmB,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC;QACpD,CAAC;IACL,CAAC,CAAC,CAAC;AACP,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"_module.js","sourceRoot":"","sources":["../../../../../src/utilities/async/abortable-iterable/_module.ts"],"names":[],"mappings":"AAAA,cAAc,yDAAyD,CAAC"}
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { AbortAsyncError, } from "../../../utilities/async/_shared";
|
|
2
|
-
import { abortable } from "../../../utilities/async/abortable/_module";
|
|
3
|
-
class AbortableIterable {
|
|
4
|
-
iterable;
|
|
5
|
-
abortSignal;
|
|
6
|
-
constructor(iterable, abortSignal) {
|
|
7
|
-
this.iterable = iterable;
|
|
8
|
-
this.abortSignal = abortSignal;
|
|
9
|
-
}
|
|
10
|
-
async *[Symbol.asyncIterator]() {
|
|
11
|
-
const iterator = this.iterable[Symbol.asyncIterator]();
|
|
12
|
-
let result = await abortable(() => iterator.next(), this.abortSignal);
|
|
13
|
-
yield result.value;
|
|
14
|
-
while (!result.done) {
|
|
15
|
-
if (this.abortSignal.aborted) {
|
|
16
|
-
throw new AbortAsyncError(`Promise was aborted with reason of "${String(this.abortSignal.aborted)}"`, this.abortSignal.reason);
|
|
17
|
-
}
|
|
18
|
-
result = await abortable(() => iterator.next(), this.abortSignal);
|
|
19
|
-
if (result.done) {
|
|
20
|
-
return result.value;
|
|
21
|
-
}
|
|
22
|
-
yield result.value;
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
export function abortableIterable(iterable, abortSignal) {
|
|
27
|
-
return new AbortableIterable(iterable, abortSignal);
|
|
28
|
-
}
|
|
29
|
-
//# sourceMappingURL=abortable-iterable.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"abortable-iterable.js","sourceRoot":"","sources":["../../../../../src/utilities/async/abortable-iterable/abortable-iterable.ts"],"names":[],"mappings":"AAIA,OAAO,EACH,eAAe,GAGlB,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAE,SAAS,EAAE,MAAM,qCAAqC,CAAC;AAKhE,MAAM,iBAAiB;IAEE;IACA;IAFrB,YACqB,QAA+B,EAC/B,WAAwB;QADxB,aAAQ,GAAR,QAAQ,CAAuB;QAC/B,gBAAW,GAAX,WAAW,CAAa;IAC1C,CAAC;IAEJ,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,aAAa,CAAC;QACzB,MAAM,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,aAAa,CAAC,EAAE,CAAC;QACvD,IAAI,MAAM,GAAG,MAAM,SAAS,CAAC,GAAG,EAAE,CAAC,QAAQ,CAAC,IAAI,EAAE,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC;QACtE,MAAM,MAAM,CAAC,KAAK,CAAC;QAEnB,OAAO,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC;YAClB,IAAI,IAAI,CAAC,WAAW,CAAC,OAAO,EAAE,CAAC;gBAC3B,MAAM,IAAI,eAAe,CACrB,uCAAuC,MAAM,CAAC,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,GAAG,EAC1E,IAAI,CAAC,WAAW,CAAC,MAAM,CAC1B,CAAC;YACN,CAAC;YACD,MAAM,GAAG,MAAM,SAAS,CAAC,GAAG,EAAE,CAAC,QAAQ,CAAC,IAAI,EAAE,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC;YAClE,IAAI,MAAM,CAAC,IAAI,EAAE,CAAC;gBAEd,OAAO,MAAM,CAAC,KAAK,CAAC;YACxB,CAAC;YACD,MAAM,MAAM,CAAC,KAAK,CAAC;QACvB,CAAC;IACL,CAAC;CACJ;AAkCD,MAAM,UAAU,iBAAiB,CAC7B,QAA+B,EAC/B,WAAwB;IAExB,OAAO,IAAI,iBAAiB,CAAC,QAAQ,EAAE,WAAW,CAAC,CAAC;AACxD,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"_module.js","sourceRoot":"","sources":["../../../../../src/utilities/async/delay/_module.ts"],"names":[],"mappings":"AAAA,cAAc,+BAA+B,CAAC"}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { abortable } from "../../../utilities/async/abortable/_module";
|
|
2
|
-
import { LazyPromise } from "../../../utilities/async/lazy-promise/_module";
|
|
3
|
-
export function delay(time, abortSignal = new AbortController().signal) {
|
|
4
|
-
return new LazyPromise(async () => {
|
|
5
|
-
let timeoutId = null;
|
|
6
|
-
const delay = new Promise((resolve) => {
|
|
7
|
-
timeoutId = setTimeout(() => {
|
|
8
|
-
resolve();
|
|
9
|
-
}, time.toMilliseconds());
|
|
10
|
-
});
|
|
11
|
-
try {
|
|
12
|
-
await abortable(() => delay, abortSignal);
|
|
13
|
-
}
|
|
14
|
-
finally {
|
|
15
|
-
if (timeoutId === null) {
|
|
16
|
-
clearTimeout(timeoutId);
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
});
|
|
20
|
-
}
|
|
21
|
-
//# sourceMappingURL=delay.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"delay.js","sourceRoot":"","sources":["../../../../../src/utilities/async/delay/delay.ts"],"names":[],"mappings":"AAWA,OAAO,EAAE,SAAS,EAAE,MAAM,qCAAqC,CAAC;AAChE,OAAO,EAAE,WAAW,EAAE,MAAM,wCAAwC,CAAC;AAkCrE,MAAM,UAAU,KAAK,CACjB,IAAc,EACd,cAA2B,IAAI,eAAe,EAAE,CAAC,MAAM;IAEvD,OAAO,IAAI,WAAW,CAAC,KAAK,IAAI,EAAE;QAE9B,IAAI,SAAS,GAAQ,IAAI,CAAC;QAC1B,MAAM,KAAK,GAAG,IAAI,OAAO,CAAO,CAAC,OAAO,EAAE,EAAE;YACxC,SAAS,GAAG,UAAU,CAAC,GAAG,EAAE;gBACxB,OAAO,EAAE,CAAC;YACd,CAAC,EAAE,IAAI,CAAC,cAAc,EAAE,CAAC,CAAC;QAC9B,CAAC,CAAC,CAAC;QACH,IAAI,CAAC;YACD,MAAM,SAAS,CAAC,GAAG,EAAE,CAAC,KAAK,EAAE,WAAW,CAAC,CAAC;QAC9C,CAAC;gBAAS,CAAC;YACP,IAAI,SAAS,KAAK,IAAI,EAAE,CAAC;gBAErB,YAAY,CAAC,SAAS,CAAC,CAAC;YAC5B,CAAC;QACL,CAAC;IACL,CAAC,CAAC,CAAC;AACP,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"_module.js","sourceRoot":"","sources":["../../../../../src/utilities/async/delay-iterable/_module.ts"],"names":[],"mappings":"AAAA,cAAc,iDAAiD,CAAC"}
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import { AbortAsyncError } from "../../../utilities/async/_shared";
|
|
2
|
-
import { abortable } from "../../../utilities/async/abortable/_module";
|
|
3
|
-
import { delay } from "../../../utilities/async/delay/delay";
|
|
4
|
-
class DelayIterable {
|
|
5
|
-
iterable;
|
|
6
|
-
time;
|
|
7
|
-
abortSignal;
|
|
8
|
-
constructor(iterable, time, abortSignal) {
|
|
9
|
-
this.iterable = iterable;
|
|
10
|
-
this.time = time;
|
|
11
|
-
this.abortSignal = abortSignal;
|
|
12
|
-
}
|
|
13
|
-
async *[Symbol.asyncIterator]() {
|
|
14
|
-
const iterator = this.iterable[Symbol.asyncIterator]();
|
|
15
|
-
let result = await abortable(() => iterator.next(), this.abortSignal);
|
|
16
|
-
yield result.value;
|
|
17
|
-
while (!result.done) {
|
|
18
|
-
if (this.abortSignal.aborted) {
|
|
19
|
-
throw new AbortAsyncError(`Promise was aborted with reason of "${String(this.abortSignal.aborted)}"`, this.abortSignal.reason);
|
|
20
|
-
}
|
|
21
|
-
await delay(this.time, this.abortSignal);
|
|
22
|
-
result = await abortable(() => iterator.next(), this.abortSignal);
|
|
23
|
-
if (result.done) {
|
|
24
|
-
return result.value;
|
|
25
|
-
}
|
|
26
|
-
yield result.value;
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
export function delayIterable(iterable, time, abortSignal = new AbortController().signal) {
|
|
31
|
-
return new DelayIterable(iterable, time, abortSignal);
|
|
32
|
-
}
|
|
33
|
-
//# sourceMappingURL=delay-iterable.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"delay-iterable.js","sourceRoot":"","sources":["../../../../../src/utilities/async/delay-iterable/delay-iterable.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAC5D,OAAO,EAAE,SAAS,EAAE,MAAM,qCAAqC,CAAC;AAChE,OAAO,EAAE,KAAK,EAAE,MAAM,+BAA+B,CAAC;AAKtD,MAAM,aAAa;IAEM;IACA;IACA;IAHrB,YACqB,QAA+B,EAC/B,IAAc,EACd,WAAwB;QAFxB,aAAQ,GAAR,QAAQ,CAAuB;QAC/B,SAAI,GAAJ,IAAI,CAAU;QACd,gBAAW,GAAX,WAAW,CAAa;IAC1C,CAAC;IAEJ,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,aAAa,CAAC;QACzB,MAAM,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,aAAa,CAAC,EAAE,CAAC;QACvD,IAAI,MAAM,GAAG,MAAM,SAAS,CAAC,GAAG,EAAE,CAAC,QAAQ,CAAC,IAAI,EAAE,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC;QACtE,MAAM,MAAM,CAAC,KAAK,CAAC;QAEnB,OAAO,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC;YAClB,IAAI,IAAI,CAAC,WAAW,CAAC,OAAO,EAAE,CAAC;gBAC3B,MAAM,IAAI,eAAe,CACrB,uCAAuC,MAAM,CAAC,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,GAAG,EAC1E,IAAI,CAAC,WAAW,CAAC,MAAM,CAC1B,CAAC;YACN,CAAC;YACD,MAAM,KAAK,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC;YACzC,MAAM,GAAG,MAAM,SAAS,CAAC,GAAG,EAAE,CAAC,QAAQ,CAAC,IAAI,EAAE,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC;YAClE,IAAI,MAAM,CAAC,IAAI,EAAE,CAAC;gBAEd,OAAO,MAAM,CAAC,KAAK,CAAC;YACxB,CAAC;YACD,MAAM,MAAM,CAAC,KAAK,CAAC;QACvB,CAAC;IACL,CAAC;CACJ;AAsDD,MAAM,UAAU,aAAa,CACzB,QAA+B,EAC/B,IAAc,EACd,cAA2B,IAAI,eAAe,EAAE,CAAC,MAAM;IAEvD,OAAO,IAAI,aAAa,CAAC,QAAQ,EAAE,IAAI,EAAE,WAAW,CAAC,CAAC;AAC1D,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"_module.js","sourceRoot":"","sources":["../../../../../src/utilities/async/lazy-promise/_module.ts"],"names":[],"mappings":"AAAA,cAAc,6CAA6C,CAAC"}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
export class LazyPromise {
|
|
2
|
-
asyncFn;
|
|
3
|
-
promise = null;
|
|
4
|
-
constructor(asyncFn) {
|
|
5
|
-
this.asyncFn = asyncFn;
|
|
6
|
-
}
|
|
7
|
-
then(onfulfilled, onrejected) {
|
|
8
|
-
if (this.promise === null) {
|
|
9
|
-
this.promise = this.asyncFn();
|
|
10
|
-
}
|
|
11
|
-
return this.promise.then(onfulfilled, onrejected);
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
export function deferLazyPromise(promise) {
|
|
15
|
-
promise.then(() => { });
|
|
16
|
-
}
|
|
17
|
-
//# sourceMappingURL=lazy-promise.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"lazy-promise.js","sourceRoot":"","sources":["../../../../../src/utilities/async/lazy-promise/lazy-promise.ts"],"names":[],"mappings":"AAkBA,MAAM,OAAO,WAAW;IAGS;IAFrB,OAAO,GAA+B,IAAI,CAAC;IAEnD,YAA6B,OAAkC;QAAlC,YAAO,GAAP,OAAO,CAA2B;IAAG,CAAC;IAEnE,IAAI,CACA,WAEU,EAEV,UAAuE;QAEvE,IAAI,IAAI,CAAC,OAAO,KAAK,IAAI,EAAE,CAAC;YACxB,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,OAAO,EAAE,CAAC;QAClC,CAAC;QAED,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,WAAW,EAAE,UAAU,CAAC,CAAC;IACtD,CAAC;CACJ;AAMD,MAAM,UAAU,gBAAgB,CAAS,OAA4B;IACjE,OAAO,CAAC,IAAI,CAAC,GAAG,EAAE,GAAE,CAAC,CAAC,CAAC;AAC3B,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"_module.js","sourceRoot":"","sources":["../../../../../src/utilities/async/retry/_module.ts"],"names":[],"mappings":"AAAA,cAAc,+BAA+B,CAAC"}
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import { delay } from "../../../utilities/async/delay/_module";
|
|
2
|
-
import { AbortAsyncError, RetryAsyncError, } from "../../../utilities/async/_shared";
|
|
3
|
-
import { exponentialBackoffPolicy } from "../../../utilities/backof-policies/_module";
|
|
4
|
-
import { LazyPromise } from "../../../utilities/async/lazy-promise/_module";
|
|
5
|
-
import { timeout } from "../../../utilities/async/timeout/_module";
|
|
6
|
-
import { TimeSpan } from "../../../utilities/_module";
|
|
7
|
-
export function retry(asyncFn, settings = {}) {
|
|
8
|
-
return new LazyPromise(async () => {
|
|
9
|
-
const { maxAttempts = 4, backoffPolicy = exponentialBackoffPolicy(), retryPolicy = () => true, retryTimeout = TimeSpan.fromMilliseconds(60_000), abortSignal = new AbortController().signal, } = settings;
|
|
10
|
-
let error_;
|
|
11
|
-
for (let attempt = 1; attempt <= maxAttempts; attempt++) {
|
|
12
|
-
if (abortSignal.aborted) {
|
|
13
|
-
throw new AbortAsyncError(`Promise was aborted with reason of "${String(abortSignal.aborted)}"`, abortSignal.reason);
|
|
14
|
-
}
|
|
15
|
-
try {
|
|
16
|
-
return await timeout(asyncFn, retryTimeout, abortSignal);
|
|
17
|
-
}
|
|
18
|
-
catch (error) {
|
|
19
|
-
error_ = error;
|
|
20
|
-
if (error instanceof AbortAsyncError) {
|
|
21
|
-
throw error;
|
|
22
|
-
}
|
|
23
|
-
if (!retryPolicy(error)) {
|
|
24
|
-
throw error;
|
|
25
|
-
}
|
|
26
|
-
const time = backoffPolicy(attempt, error);
|
|
27
|
-
await delay(TimeSpan.fromMilliseconds(time), abortSignal);
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
let errorMessage = `Promise was failed after retried ${String(maxAttempts)} times`;
|
|
31
|
-
if (error_) {
|
|
32
|
-
errorMessage = `${errorMessage} and last thrown error was "${String(error_)}"`;
|
|
33
|
-
}
|
|
34
|
-
throw new RetryAsyncError(errorMessage, {
|
|
35
|
-
cause: error_,
|
|
36
|
-
maxAttempts,
|
|
37
|
-
});
|
|
38
|
-
});
|
|
39
|
-
}
|
|
40
|
-
//# sourceMappingURL=retry.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"retry.js","sourceRoot":"","sources":["../../../../../src/utilities/async/retry/retry.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,EAAE,MAAM,iCAAiC,CAAC;AACxD,OAAO,EAIH,eAAe,EAGf,eAAe,GAClB,MAAM,2BAA2B,CAAC;AAEnC,OAAO,EAAE,wBAAwB,EAAE,MAAM,qCAAqC,CAAC;AAC/E,OAAO,EAAE,WAAW,EAAE,MAAM,wCAAwC,CAAC;AACrE,OAAO,EAAE,OAAO,EAAE,MAAM,mCAAmC,CAAC;AAC5D,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAsF/C,MAAM,UAAU,KAAK,CACjB,OAAkC,EAClC,WAA0B,EAAE;IAE5B,OAAO,IAAI,WAAW,CAAC,KAAK,IAAI,EAAE;QAC9B,MAAM,EACF,WAAW,GAAG,CAAC,EACf,aAAa,GAAG,wBAAwB,EAAE,EAC1C,WAAW,GAAG,GAAG,EAAE,CAAC,IAAI,EACxB,YAAY,GAAG,QAAQ,CAAC,gBAAgB,CAAC,MAAM,CAAC,EAChD,WAAW,GAAG,IAAI,eAAe,EAAE,CAAC,MAAM,GAC7C,GAAG,QAAQ,CAAC;QACb,IAAI,MAAe,CAAC;QACpB,KAAK,IAAI,OAAO,GAAG,CAAC,EAAE,OAAO,IAAI,WAAW,EAAE,OAAO,EAAE,EAAE,CAAC;YACtD,IAAI,WAAW,CAAC,OAAO,EAAE,CAAC;gBACtB,MAAM,IAAI,eAAe,CACrB,uCAAuC,MAAM,CAAC,WAAW,CAAC,OAAO,CAAC,GAAG,EACrE,WAAW,CAAC,MAAM,CACrB,CAAC;YACN,CAAC;YACD,IAAI,CAAC;gBACD,OAAO,MAAM,OAAO,CAAC,OAAO,EAAE,YAAY,EAAE,WAAW,CAAC,CAAC;YAC7D,CAAC;YAAC,OAAO,KAAc,EAAE,CAAC;gBACtB,MAAM,GAAG,KAAK,CAAC;gBACf,IAAI,KAAK,YAAY,eAAe,EAAE,CAAC;oBACnC,MAAM,KAAK,CAAC;gBAChB,CAAC;gBACD,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,EAAE,CAAC;oBACtB,MAAM,KAAK,CAAC;gBAChB,CAAC;gBACD,MAAM,IAAI,GAAG,aAAa,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC;gBAC3C,MAAM,KAAK,CAAC,QAAQ,CAAC,gBAAgB,CAAC,IAAI,CAAC,EAAE,WAAW,CAAC,CAAC;YAC9D,CAAC;QACL,CAAC;QAED,IAAI,YAAY,GAAG,oCAAoC,MAAM,CAAC,WAAW,CAAC,QAAQ,CAAC;QACnF,IAAI,MAAM,EAAE,CAAC;YACT,YAAY,GAAG,GAAG,YAAY,+BAA+B,MAAM,CAAC,MAAiB,CAAC,GAAG,CAAC;QAC9F,CAAC;QACD,MAAM,IAAI,eAAe,CAAC,YAAY,EAAE;YACpC,KAAK,EAAE,MAAM;YACb,WAAW;SACd,CAAC,CAAC;IACP,CAAC,CAAC,CAAC;AACP,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"_module.js","sourceRoot":"","sources":["../../../../../src/utilities/async/retry-iterable/_module.ts"],"names":[],"mappings":"AAAA,cAAc,iDAAiD,CAAC"}
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { AbortAsyncError, } from "../../../utilities/async/_shared";
|
|
2
|
-
import { retry } from "../../../utilities/async/retry/retry";
|
|
3
|
-
class RetryAsyncIterable {
|
|
4
|
-
iterable;
|
|
5
|
-
settings;
|
|
6
|
-
constructor(iterable, settings) {
|
|
7
|
-
this.iterable = iterable;
|
|
8
|
-
this.settings = settings;
|
|
9
|
-
}
|
|
10
|
-
async *[Symbol.asyncIterator]() {
|
|
11
|
-
const iterator = this.iterable[Symbol.asyncIterator]();
|
|
12
|
-
let result = await retry(() => iterator.next(), this.settings);
|
|
13
|
-
yield result.value;
|
|
14
|
-
while (!result.done) {
|
|
15
|
-
if (this.settings?.abortSignal?.aborted) {
|
|
16
|
-
throw new AbortAsyncError(`Promise was aborted with reason of "${String(this.settings.abortSignal.aborted)}"`, this.settings.abortSignal.reason);
|
|
17
|
-
}
|
|
18
|
-
result = await retry(() => iterator.next(), this.settings);
|
|
19
|
-
if (result.done) {
|
|
20
|
-
return result.value;
|
|
21
|
-
}
|
|
22
|
-
yield result.value;
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
export function retryIterable(iterable, settings) {
|
|
27
|
-
return new RetryAsyncIterable(iterable, settings);
|
|
28
|
-
}
|
|
29
|
-
//# sourceMappingURL=retry-iterable.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"retry-iterable.js","sourceRoot":"","sources":["../../../../../src/utilities/async/retry-iterable/retry-iterable.ts"],"names":[],"mappings":"AAGA,OAAO,EAIH,eAAe,GAKlB,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAE,KAAK,EAAE,MAAM,+BAA+B,CAAC;AAMtD,MAAM,kBAAkB;IAEC;IACA;IAFrB,YACqB,QAA+B,EAC/B,QAAwB;QADxB,aAAQ,GAAR,QAAQ,CAAuB;QAC/B,aAAQ,GAAR,QAAQ,CAAgB;IAC1C,CAAC;IAEJ,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,aAAa,CAAC;QACzB,MAAM,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,aAAa,CAAC,EAAE,CAAC;QACvD,IAAI,MAAM,GAAG,MAAM,KAAK,CAAC,GAAG,EAAE,CAAC,QAAQ,CAAC,IAAI,EAAE,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC;QAC/D,MAAM,MAAM,CAAC,KAAK,CAAC;QAEnB,OAAO,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC;YAClB,IAAI,IAAI,CAAC,QAAQ,EAAE,WAAW,EAAE,OAAO,EAAE,CAAC;gBACtC,MAAM,IAAI,eAAe,CACrB,uCAAuC,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,WAAW,CAAC,OAAO,CAAC,GAAG,EACnF,IAAI,CAAC,QAAQ,CAAC,WAAW,CAAC,MAAM,CACnC,CAAC;YACN,CAAC;YACD,MAAM,GAAG,MAAM,KAAK,CAAC,GAAG,EAAE,CAAC,QAAQ,CAAC,IAAI,EAAE,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC;YAC3D,IAAI,MAAM,CAAC,IAAI,EAAE,CAAC;gBAEd,OAAO,MAAM,CAAC,KAAK,CAAC;YACxB,CAAC;YACD,MAAM,MAAM,CAAC,KAAK,CAAC;QACvB,CAAC;IACL,CAAC;CACJ;AAsFD,MAAM,UAAU,aAAa,CACzB,QAA+B,EAC/B,QAAwB;IAExB,OAAO,IAAI,kBAAkB,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAC;AACtD,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"_module.js","sourceRoot":"","sources":["../../../../../src/utilities/async/timeout/_module.ts"],"names":[],"mappings":"AAAA,cAAc,mCAAmC,CAAC"}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { LazyPromise } from "../../../utilities/async/lazy-promise/_module";
|
|
2
|
-
import { AbortAsyncError, TimeoutAsyncError, } from "../../../utilities/async/_shared";
|
|
3
|
-
import { abortable } from "../../../utilities/async/abortable/_module";
|
|
4
|
-
export function timeout(asyncFn, time, abortSignal = new AbortController().signal) {
|
|
5
|
-
return new LazyPromise(async () => {
|
|
6
|
-
const timeoutController = new AbortController();
|
|
7
|
-
const timeoutId = setTimeout(() => {
|
|
8
|
-
timeoutController.abort(new TimeoutAsyncError("asdad"));
|
|
9
|
-
}, time.toMilliseconds());
|
|
10
|
-
try {
|
|
11
|
-
return await abortable(asyncFn, AbortSignal.any([abortSignal, timeoutController.signal]));
|
|
12
|
-
}
|
|
13
|
-
catch (error) {
|
|
14
|
-
if (error instanceof AbortAsyncError &&
|
|
15
|
-
error.cause instanceof TimeoutAsyncError) {
|
|
16
|
-
throw error.cause;
|
|
17
|
-
}
|
|
18
|
-
throw error;
|
|
19
|
-
}
|
|
20
|
-
finally {
|
|
21
|
-
clearTimeout(timeoutId);
|
|
22
|
-
}
|
|
23
|
-
});
|
|
24
|
-
}
|
|
25
|
-
//# sourceMappingURL=timeout.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"timeout.js","sourceRoot":"","sources":["../../../../../src/utilities/async/timeout/timeout.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,WAAW,EAAE,MAAM,wCAAwC,CAAC;AACrE,OAAO,EAIH,eAAe,EAEf,iBAAiB,GACpB,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAE,SAAS,EAAE,MAAM,qCAAqC,CAAC;AAqChE,MAAM,UAAU,OAAO,CACnB,OAAkC,EAClC,IAAc,EACd,cAA2B,IAAI,eAAe,EAAE,CAAC,MAAM;IAEvD,OAAO,IAAI,WAAW,CAAC,KAAK,IAAI,EAAE;QAC9B,MAAM,iBAAiB,GAAG,IAAI,eAAe,EAAE,CAAC;QAChD,MAAM,SAAS,GAAG,UAAU,CAAC,GAAG,EAAE;YAC9B,iBAAiB,CAAC,KAAK,CAAC,IAAI,iBAAiB,CAAC,OAAO,CAAC,CAAC,CAAC;QAC5D,CAAC,EAAE,IAAI,CAAC,cAAc,EAAE,CAAC,CAAC;QAC1B,IAAI,CAAC;YACD,OAAO,MAAM,SAAS,CAClB,OAAO,EACP,WAAW,CAAC,GAAG,CAAC,CAAC,WAAW,EAAE,iBAAiB,CAAC,MAAM,CAAC,CAAC,CAC3D,CAAC;QACN,CAAC;QAAC,OAAO,KAAc,EAAE,CAAC;YACtB,IACI,KAAK,YAAY,eAAe;gBAChC,KAAK,CAAC,KAAK,YAAY,iBAAiB,EAC1C,CAAC;gBACC,MAAM,KAAK,CAAC,KAAK,CAAC;YACtB,CAAC;YACD,MAAM,KAAK,CAAC;QAChB,CAAC;gBAAS,CAAC;YACP,YAAY,CAAC,SAAS,CAAC,CAAC;QAC5B,CAAC;IACL,CAAC,CAAC,CAAC;AACP,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"_module.js","sourceRoot":"","sources":["../../../../../src/utilities/async/timeout-iterable/_module.ts"],"names":[],"mappings":"AAAA,cAAc,qDAAqD,CAAC"}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { abortableIterable } from "../../../utilities/async/abortable-iterable/_module";
|
|
2
|
-
export function timeoutIterable(iterable, time, abortSignal = new AbortController().signal) {
|
|
3
|
-
return abortableIterable(iterable, AbortSignal.any([
|
|
4
|
-
abortSignal,
|
|
5
|
-
AbortSignal.timeout(time.toMilliseconds()),
|
|
6
|
-
]));
|
|
7
|
-
}
|
|
8
|
-
//# sourceMappingURL=timeout-iterable.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"timeout-iterable.js","sourceRoot":"","sources":["../../../../../src/utilities/async/timeout-iterable/timeout-iterable.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,iBAAiB,EAAE,MAAM,8CAA8C,CAAC;AA8DjF,MAAM,UAAU,eAAe,CAC3B,QAA+B,EAC/B,IAAc,EACd,cAA2B,IAAI,eAAe,EAAE,CAAC,MAAM;IAEvD,OAAO,iBAAiB,CACpB,QAAQ,EACR,WAAW,CAAC,GAAG,CAAC;QACZ,WAAW;QACX,WAAW,CAAC,OAAO,CAAC,IAAI,CAAC,cAAc,EAAE,CAAC;KAC7C,CAAC,CACL,CAAC;AACN,CAAC"}
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
export * from "../../utilities/backof-policies/constant-backoff-policy/_module";
|
|
2
|
-
export * from "../../utilities/backof-policies/exponential-backoff-policy/_module";
|
|
3
|
-
export * from "../../utilities/backof-policies/linear-backoff-policy/_module";
|
|
4
|
-
export * from "../../utilities/backof-policies/polynomial-backoff-policy/_module";
|
|
5
|
-
//# sourceMappingURL=_module.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"_module.js","sourceRoot":"","sources":["../../../../src/utilities/backof-policies/_module.ts"],"names":[],"mappings":"AACA,cAAc,6DAA6D,CAAC;AAC5E,cAAc,gEAAgE,CAAC;AAC/E,cAAc,2DAA2D,CAAC;AAC1E,cAAc,+DAA+D,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"_shared.js","sourceRoot":"","sources":["../../../../src/utilities/backof-policies/_shared.ts"],"names":[],"mappings":"AAaA,MAAM,UAAU,UAAU,CACtB,MAAc,EACd,KAAa,EACb,UAAwB;IAExB,OAAO,CAAC,CAAC,GAAG,MAAM,GAAG,UAAU,EAAE,CAAC,GAAG,KAAK,CAAC;AAC/C,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"_module.js","sourceRoot":"","sources":["../../../../../src/utilities/backof-policies/constant-backoff-policy/_module.ts"],"names":[],"mappings":"AAAA,cAAc,6EAA6E,CAAC"}
|
package/dist/esm/utilities/backof-policies/constant-backoff-policy/constant-backoff-policy.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"constant-backoff-policy.js","sourceRoot":"","sources":["../../../../../src/utilities/backof-policies/constant-backoff-policy/constant-backoff-policy.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAC/C,OAAO,EACH,UAAU,GAEb,MAAM,qCAAqC,CAAC;AAyB7C,MAAM,UAAU,qBAAqB,CACjC,WAE4D,EAAE;IAE9D,OAAO,CAAC,QAAQ,EAAE,KAAK,EAAE,EAAE;QACvB,IAAI,OAAO,QAAQ,KAAK,UAAU,EAAE,CAAC;YACjC,QAAQ,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;QAC/B,CAAC;QACD,IAAI,EAAE,KAAK,GAAG,IAAI,EAAE,GAAG,QAAQ,CAAC;QAChC,IAAI,KAAK,YAAY,QAAQ,EAAE,CAAC;YAC5B,KAAK,GAAG,KAAK,CAAC,cAAc,EAAE,CAAC;QACnC,CAAC;QACD,MAAM,EAAE,MAAM,GAAG,GAAG,EAAE,WAAW,GAAG,IAAI,CAAC,MAAM,EAAE,GAAG,QAAQ,CAAC;QAC7D,OAAO,UAAU,CAAC,MAAM,EAAE,KAAK,EAAE,WAAW,CAAC,CAAC;IAClD,CAAC,CAAC;AACN,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"_module.js","sourceRoot":"","sources":["../../../../../src/utilities/backof-policies/exponential-backoff-policy/_module.ts"],"names":[],"mappings":"AAAA,cAAc,mFAAmF,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"exponential-backoff-policy.js","sourceRoot":"","sources":["../../../../../src/utilities/backof-policies/exponential-backoff-policy/exponential-backoff-policy.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAE/C,OAAO,EAAE,UAAU,EAAE,MAAM,qCAAqC,CAAC;AAiCjE,MAAM,UAAU,wBAAwB,CACpC,WAE+D,EAAE;IAEjE,OAAO,CAAC,OAAO,EAAE,KAAK,EAAE,EAAE;QACtB,IAAI,OAAO,QAAQ,KAAK,UAAU,EAAE,CAAC;YACjC,QAAQ,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;QAC/B,CAAC;QACD,IAAI,EAAE,QAAQ,GAAG,MAAM,EAAE,QAAQ,GAAG,KAAK,EAAE,GAAG,QAAQ,CAAC;QACvD,IAAI,QAAQ,YAAY,QAAQ,EAAE,CAAC;YAC/B,QAAQ,GAAG,QAAQ,CAAC,cAAc,EAAE,CAAC;QACzC,CAAC;QACD,IAAI,QAAQ,YAAY,QAAQ,EAAE,CAAC;YAC/B,QAAQ,GAAG,QAAQ,CAAC,cAAc,EAAE,CAAC;QACzC,CAAC;QACD,MAAM,EACF,UAAU,GAAG,CAAC,EACd,MAAM,GAAG,GAAG,EACZ,WAAW,GAAG,IAAI,CAAC,MAAM,GAC5B,GAAG,QAAQ,CAAC;QACb,MAAM,WAAW,GAAG,IAAI,CAAC,GAAG,CACxB,QAAQ,EACR,QAAQ,GAAG,IAAI,CAAC,GAAG,CAAC,UAAU,EAAE,OAAO,CAAC,CAC3C,CAAC;QACF,OAAO,UAAU,CAAC,MAAM,EAAE,WAAW,EAAE,WAAW,CAAC,CAAC;IACxD,CAAC,CAAC;AACN,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"_module.js","sourceRoot":"","sources":["../../../../../src/utilities/backof-policies/linear-backoff-policy/_module.ts"],"names":[],"mappings":"AAAA,cAAc,yEAAyE,CAAC"}
|
package/dist/esm/utilities/backof-policies/linear-backoff-policy/linear-backoff-policy.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"linear-backoff-policy.js","sourceRoot":"","sources":["../../../../../src/utilities/backof-policies/linear-backoff-policy/linear-backoff-policy.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAE/C,OAAO,EAAE,UAAU,EAAE,MAAM,qCAAqC,CAAC;AA6BjE,MAAM,UAAU,mBAAmB,CAC/B,WAE0D,EAAE;IAE5D,OAAO,CAAC,OAAO,EAAE,KAAK,EAAE,EAAE;QACtB,IAAI,OAAO,QAAQ,KAAK,UAAU,EAAE,CAAC;YACjC,QAAQ,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;QAC/B,CAAC;QACD,IAAI,EAAE,QAAQ,GAAG,IAAI,EAAE,QAAQ,GAAG,KAAK,EAAE,GAAG,QAAQ,CAAC;QACrD,IAAI,QAAQ,YAAY,QAAQ,EAAE,CAAC;YAC/B,QAAQ,GAAG,QAAQ,CAAC,cAAc,EAAE,CAAC;QACzC,CAAC;QACD,IAAI,QAAQ,YAAY,QAAQ,EAAE,CAAC;YAC/B,QAAQ,GAAG,QAAQ,CAAC,cAAc,EAAE,CAAC;QACzC,CAAC;QACD,MAAM,EAAE,MAAM,GAAG,GAAG,EAAE,WAAW,GAAG,IAAI,CAAC,MAAM,EAAE,GAAG,QAAQ,CAAC;QAC7D,MAAM,MAAM,GAAG,IAAI,CAAC,GAAG,CAAC,QAAQ,EAAE,QAAQ,GAAG,OAAO,CAAC,CAAC;QACtD,OAAO,UAAU,CAAC,MAAM,EAAE,MAAM,EAAE,WAAW,CAAC,CAAC;IACnD,CAAC,CAAC;AACN,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"_module.js","sourceRoot":"","sources":["../../../../../src/utilities/backof-policies/polynomial-backoff-policy/_module.ts"],"names":[],"mappings":"AAAA,cAAc,iFAAiF,CAAC"}
|