@daiso-tech/core 0.26.1 → 0.28.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +13 -3
- package/dist/async/utilities/delay/delay.d.ts +1 -12
- package/dist/async/utilities/delay/delay.js +1 -12
- package/dist/async/utilities/delay/delay.js.map +1 -1
- package/dist/async/utilities/lazy-promise/lazy-promise.d.ts +143 -71
- package/dist/async/utilities/lazy-promise/lazy-promise.js +223 -142
- package/dist/async/utilities/lazy-promise/lazy-promise.js.map +1 -1
- package/dist/async/utilities/retry/retry-or-fail.d.ts +2 -0
- package/dist/async/utilities/retry/retry-or-fail.js.map +1 -1
- package/dist/cache/contracts/_module-exports.d.ts +1 -0
- package/dist/cache/contracts/_module-exports.js +1 -0
- package/dist/cache/contracts/_module-exports.js.map +1 -1
- package/dist/cache/contracts/cache-adapter.contract.d.ts +19 -21
- package/dist/cache/contracts/cache-adapter.contract.js +1 -4
- package/dist/cache/contracts/cache-adapter.contract.js.map +1 -1
- package/dist/cache/contracts/cache-factory.contract.d.ts +1 -1
- package/dist/cache/contracts/cache.contract.d.ts +144 -96
- package/dist/cache/contracts/cache.contract.js +1 -2
- package/dist/cache/contracts/cache.contract.js.map +1 -1
- package/dist/cache/contracts/cache.errors.js +2 -5
- package/dist/cache/contracts/cache.errors.js.map +1 -1
- package/dist/cache/contracts/cache.events.d.ts +10 -10
- package/dist/cache/contracts/cache.events.js +2 -5
- package/dist/cache/contracts/cache.events.js.map +1 -1
- package/dist/cache/contracts/database-cache-adapter.contract.d.ts +89 -0
- package/dist/cache/contracts/database-cache-adapter.contract.js +5 -0
- package/dist/cache/contracts/database-cache-adapter.contract.js.map +1 -0
- package/dist/cache/implementations/adapters/{kysely-sqlite-cache-adapter → kysely-cache-adapter}/_module.d.ts +1 -1
- package/dist/cache/implementations/adapters/kysely-cache-adapter/_module.js +2 -0
- package/dist/cache/implementations/adapters/kysely-cache-adapter/_module.js.map +1 -0
- package/dist/cache/implementations/adapters/kysely-cache-adapter/kysely-cache-adapter.d.ts +73 -0
- package/dist/cache/implementations/adapters/kysely-cache-adapter/kysely-cache-adapter.js +224 -0
- package/dist/cache/implementations/adapters/kysely-cache-adapter/kysely-cache-adapter.js.map +1 -0
- package/dist/cache/implementations/adapters/libsql-cache-adapter/libsql-cache-adapter.d.ts +29 -39
- package/dist/cache/implementations/adapters/libsql-cache-adapter/libsql-cache-adapter.js +45 -54
- package/dist/cache/implementations/adapters/libsql-cache-adapter/libsql-cache-adapter.js.map +1 -1
- package/dist/cache/implementations/adapters/memory-cache-adapter/memory-cache-adapter.d.ts +17 -33
- package/dist/cache/implementations/adapters/memory-cache-adapter/memory-cache-adapter.js +43 -52
- package/dist/cache/implementations/adapters/memory-cache-adapter/memory-cache-adapter.js.map +1 -1
- package/dist/cache/implementations/adapters/mongodb-cache-adapter/mongodb-cache-adapter-serde.d.ts +13 -0
- package/dist/cache/implementations/adapters/mongodb-cache-adapter/mongodb-cache-adapter-serde.js +38 -0
- package/dist/cache/implementations/adapters/mongodb-cache-adapter/mongodb-cache-adapter-serde.js.map +1 -0
- package/dist/cache/implementations/adapters/mongodb-cache-adapter/mongodb-cache-adapter.d.ts +27 -33
- package/dist/cache/implementations/adapters/mongodb-cache-adapter/mongodb-cache-adapter.js +145 -197
- package/dist/cache/implementations/adapters/mongodb-cache-adapter/mongodb-cache-adapter.js.map +1 -1
- package/dist/cache/implementations/adapters/no-op-cache-adapter/no-op-cache-adapter.d.ts +14 -13
- package/dist/cache/implementations/adapters/no-op-cache-adapter/no-op-cache-adapter.js +19 -17
- package/dist/cache/implementations/adapters/no-op-cache-adapter/no-op-cache-adapter.js.map +1 -1
- package/dist/cache/implementations/adapters/redis-cache-adapter/redis-cache-adapter-serde.d.ts +13 -0
- package/dist/cache/implementations/adapters/redis-cache-adapter/redis-cache-adapter-serde.js +39 -0
- package/dist/cache/implementations/adapters/redis-cache-adapter/redis-cache-adapter-serde.js.map +1 -0
- package/dist/cache/implementations/adapters/redis-cache-adapter/redis-cache-adapter.d.ts +16 -22
- package/dist/cache/implementations/adapters/redis-cache-adapter/redis-cache-adapter.js +51 -132
- package/dist/cache/implementations/adapters/redis-cache-adapter/redis-cache-adapter.js.map +1 -1
- package/dist/cache/implementations/adapters/redis-cache-adapter/utilities.d.ts +13 -0
- package/dist/cache/implementations/adapters/redis-cache-adapter/utilities.js +69 -0
- package/dist/cache/implementations/adapters/redis-cache-adapter/utilities.js.map +1 -0
- package/dist/cache/implementations/adapters/sqlite-cache-adapter/sqlite-cache-adapter.d.ts +29 -41
- package/dist/cache/implementations/adapters/sqlite-cache-adapter/sqlite-cache-adapter.js +46 -55
- package/dist/cache/implementations/adapters/sqlite-cache-adapter/sqlite-cache-adapter.js.map +1 -1
- package/dist/cache/implementations/derivables/_module-exports.d.ts +1 -1
- package/dist/cache/implementations/derivables/_module-exports.js +1 -1
- package/dist/cache/implementations/derivables/_module-exports.js.map +1 -1
- package/dist/cache/implementations/derivables/cache/_module.d.ts +1 -0
- package/dist/cache/implementations/derivables/cache/_module.js +1 -0
- package/dist/cache/implementations/derivables/cache/_module.js.map +1 -1
- package/dist/cache/implementations/derivables/cache/cache.d.ts +269 -507
- package/dist/cache/implementations/derivables/cache/cache.js +538 -822
- package/dist/cache/implementations/derivables/cache/cache.js.map +1 -1
- package/dist/cache/implementations/derivables/cache/database-cache-adapter.d.ts +21 -0
- package/dist/cache/implementations/derivables/cache/database-cache-adapter.js +110 -0
- package/dist/cache/implementations/derivables/cache/database-cache-adapter.js.map +1 -0
- package/dist/cache/implementations/derivables/cache/is-database-cache-adapter.d.ts +9 -0
- package/dist/cache/implementations/derivables/cache/is-database-cache-adapter.js +20 -0
- package/dist/cache/implementations/derivables/cache/is-database-cache-adapter.js.map +1 -0
- package/dist/cache/implementations/derivables/cache-factory/cache-factory.d.ts +69 -105
- package/dist/cache/implementations/derivables/cache-factory/cache-factory.js +117 -87
- package/dist/cache/implementations/derivables/cache-factory/cache-factory.js.map +1 -1
- package/dist/cache/implementations/test-utilities/_module-exports.d.ts +1 -0
- package/dist/cache/implementations/test-utilities/_module-exports.js +1 -0
- package/dist/cache/implementations/test-utilities/_module-exports.js.map +1 -1
- package/dist/cache/implementations/test-utilities/cache-adapter.test-suite.d.ts +9 -11
- package/dist/cache/implementations/test-utilities/cache-adapter.test-suite.js +246 -247
- package/dist/cache/implementations/test-utilities/cache-adapter.test-suite.js.map +1 -1
- package/dist/cache/implementations/test-utilities/cache.test-suite.d.ts +16 -30
- package/dist/cache/implementations/test-utilities/cache.test-suite.js +271 -996
- package/dist/cache/implementations/test-utilities/cache.test-suite.js.map +1 -1
- package/dist/cache/implementations/test-utilities/database-cache-dapter.test-suite.d.ts +60 -0
- package/dist/cache/implementations/test-utilities/database-cache-dapter.test-suite.js +698 -0
- package/dist/cache/implementations/test-utilities/database-cache-dapter.test-suite.js.map +1 -0
- package/dist/collection/contracts/async-collection.contract.d.ts +2 -3
- package/dist/collection/contracts/async-collection.contract.js +1 -12
- package/dist/collection/contracts/async-collection.contract.js.map +1 -1
- package/dist/collection/contracts/collection.contract.d.ts +1 -1
- package/dist/collection/contracts/collection.errors.d.ts +1 -1
- package/dist/collection/contracts/collection.errors.js +3 -6
- package/dist/collection/contracts/collection.errors.js.map +1 -1
- package/dist/collection/implementations/_shared.d.ts +4 -4
- package/dist/collection/implementations/_shared.js +6 -9
- package/dist/collection/implementations/_shared.js.map +1 -1
- package/dist/collection/implementations/async-iterable-collection/_shared/async-delay-iterable.js +2 -2
- package/dist/collection/implementations/async-iterable-collection/_shared/async-delay-iterable.js.map +1 -1
- package/dist/collection/implementations/async-iterable-collection/async-iterable-collection.d.ts +5 -21
- package/dist/collection/implementations/async-iterable-collection/async-iterable-collection.js +12 -8
- package/dist/collection/implementations/async-iterable-collection/async-iterable-collection.js.map +1 -1
- package/dist/collection/implementations/iterable-collection/iterable-collection.d.ts +1 -1
- package/dist/collection/implementations/iterable-collection/iterable-collection.js +1 -1
- package/dist/collection/implementations/list-collection/list-collection.d.ts +1 -1
- package/dist/collection/implementations/list-collection/list-collection.js +1 -1
- package/dist/event-bus/contracts/event-bus-adapter.contract.d.ts +0 -9
- package/dist/event-bus/contracts/event-bus.contract.d.ts +5 -5
- package/dist/event-bus/contracts/event-bus.contract.js.map +1 -1
- package/dist/event-bus/contracts/event-bus.errors.js +2 -5
- package/dist/event-bus/contracts/event-bus.errors.js.map +1 -1
- package/dist/event-bus/implementations/adapters/memory-event-bus-adapter/memory-event-bus-adapter.d.ts +9 -29
- package/dist/event-bus/implementations/adapters/memory-event-bus-adapter/memory-event-bus-adapter.js +14 -35
- package/dist/event-bus/implementations/adapters/memory-event-bus-adapter/memory-event-bus-adapter.js.map +1 -1
- package/dist/event-bus/implementations/adapters/no-op-event-bus-adapter/no-op-event-bus-adapter.d.ts +2 -4
- package/dist/event-bus/implementations/adapters/no-op-event-bus-adapter/no-op-event-bus-adapter.js +2 -8
- package/dist/event-bus/implementations/adapters/no-op-event-bus-adapter/no-op-event-bus-adapter.js.map +1 -1
- package/dist/event-bus/implementations/adapters/redis-pub-sub-event-bus-adapter/redis-pub-sub-event-bus-adapter.d.ts +8 -15
- package/dist/event-bus/implementations/adapters/redis-pub-sub-event-bus-adapter/redis-pub-sub-event-bus-adapter.js +15 -34
- package/dist/event-bus/implementations/adapters/redis-pub-sub-event-bus-adapter/redis-pub-sub-event-bus-adapter.js.map +1 -1
- package/dist/event-bus/implementations/derivables/event-bus/event-bus.d.ts +85 -289
- package/dist/event-bus/implementations/derivables/event-bus/event-bus.js +128 -325
- package/dist/event-bus/implementations/derivables/event-bus/event-bus.js.map +1 -1
- package/dist/event-bus/implementations/derivables/event-bus/listener-store.d.ts +13 -0
- package/dist/event-bus/implementations/derivables/event-bus/listener-store.js +42 -0
- package/dist/event-bus/implementations/derivables/event-bus/listener-store.js.map +1 -0
- package/dist/event-bus/implementations/derivables/event-bus-factory/event-bus-factory.d.ts +103 -86
- package/dist/event-bus/implementations/derivables/event-bus-factory/event-bus-factory.js +135 -77
- package/dist/event-bus/implementations/derivables/event-bus-factory/event-bus-factory.js.map +1 -1
- package/dist/event-bus/implementations/test-utilities/event-bus-adapter.test-suite.d.ts +2 -48
- package/dist/event-bus/implementations/test-utilities/event-bus-adapter.test-suite.js +31 -122
- package/dist/event-bus/implementations/test-utilities/event-bus-adapter.test-suite.js.map +1 -1
- package/dist/event-bus/implementations/test-utilities/event-bus.test-suite.d.ts +2 -50
- package/dist/event-bus/implementations/test-utilities/event-bus.test-suite.js +41 -89
- package/dist/event-bus/implementations/test-utilities/event-bus.test-suite.js.map +1 -1
- package/dist/lock/contracts/database-lock-adapter.contract.d.ts +0 -9
- package/dist/lock/contracts/lock-adapter.contract.d.ts +0 -9
- package/dist/lock/contracts/lock-provider.contract.d.ts +20 -6
- package/dist/lock/contracts/lock.contract.d.ts +37 -8
- package/dist/lock/contracts/lock.errors.js +2 -5
- package/dist/lock/contracts/lock.errors.js.map +1 -1
- package/dist/lock/contracts/lock.events.js +2 -5
- package/dist/lock/contracts/lock.events.js.map +1 -1
- package/dist/lock/implementations/adapters/_module-exports.d.ts +1 -0
- package/dist/lock/implementations/adapters/_module-exports.js +1 -0
- package/dist/lock/implementations/adapters/_module-exports.js.map +1 -1
- package/dist/lock/implementations/adapters/kysely-lock-adapter/kysely-lock-adapter.d.ts +0 -5
- package/dist/lock/implementations/adapters/kysely-lock-adapter/kysely-lock-adapter.js +2 -21
- package/dist/lock/implementations/adapters/kysely-lock-adapter/kysely-lock-adapter.js.map +1 -1
- package/dist/lock/implementations/adapters/libsql-lock-adapter/libsql-lock-adapter.d.ts +11 -16
- package/dist/lock/implementations/adapters/libsql-lock-adapter/libsql-lock-adapter.js +11 -20
- package/dist/lock/implementations/adapters/libsql-lock-adapter/libsql-lock-adapter.js.map +1 -1
- package/dist/lock/implementations/adapters/memory-lock-adapter/memory-lock-adapter.d.ts +7 -26
- package/dist/lock/implementations/adapters/memory-lock-adapter/memory-lock-adapter.js +7 -35
- package/dist/lock/implementations/adapters/memory-lock-adapter/memory-lock-adapter.js.map +1 -1
- package/dist/lock/implementations/adapters/mongodb-lock-adapter/mongodb-lock-adapter.d.ts +13 -20
- package/dist/lock/implementations/adapters/mongodb-lock-adapter/mongodb-lock-adapter.js +13 -37
- package/dist/lock/implementations/adapters/mongodb-lock-adapter/mongodb-lock-adapter.js.map +1 -1
- package/dist/lock/implementations/adapters/no-op-lock-adapter/_module.d.ts +1 -0
- package/dist/lock/implementations/adapters/no-op-lock-adapter/_module.js +2 -0
- package/dist/lock/implementations/adapters/no-op-lock-adapter/_module.js.map +1 -0
- package/dist/lock/implementations/adapters/no-op-lock-adapter/no-op-lock-adapter.d.ts +17 -0
- package/dist/lock/implementations/adapters/no-op-lock-adapter/no-op-lock-adapter.js +24 -0
- package/dist/lock/implementations/adapters/no-op-lock-adapter/no-op-lock-adapter.js.map +1 -0
- package/dist/lock/implementations/adapters/redis-lock-adapter/redis-lock-adapter.d.ts +4 -22
- package/dist/lock/implementations/adapters/redis-lock-adapter/redis-lock-adapter.js +4 -31
- package/dist/lock/implementations/adapters/redis-lock-adapter/redis-lock-adapter.js.map +1 -1
- package/dist/lock/implementations/adapters/sqlite-lock-adapter/sqlite-lock-adapter.d.ts +14 -20
- package/dist/lock/implementations/adapters/sqlite-lock-adapter/sqlite-lock-adapter.js +12 -21
- package/dist/lock/implementations/adapters/sqlite-lock-adapter/sqlite-lock-adapter.js.map +1 -1
- package/dist/lock/implementations/derivables/lock-provider/database-lock-adapter.d.ts +0 -2
- package/dist/lock/implementations/derivables/lock-provider/database-lock-adapter.js +2 -8
- package/dist/lock/implementations/derivables/lock-provider/database-lock-adapter.js.map +1 -1
- package/dist/lock/implementations/derivables/lock-provider/is-database-lock-adapter.js +1 -5
- package/dist/lock/implementations/derivables/lock-provider/is-database-lock-adapter.js.map +1 -1
- package/dist/lock/implementations/derivables/lock-provider/lock-provider.d.ts +181 -369
- package/dist/lock/implementations/derivables/lock-provider/lock-provider.js +259 -407
- package/dist/lock/implementations/derivables/lock-provider/lock-provider.js.map +1 -1
- package/dist/lock/implementations/derivables/lock-provider/lock-serde-transformer.d.ts +15 -17
- package/dist/lock/implementations/derivables/lock-provider/lock-serde-transformer.js +42 -40
- package/dist/lock/implementations/derivables/lock-provider/lock-serde-transformer.js.map +1 -1
- package/dist/lock/implementations/derivables/lock-provider/lock-state.d.ts +3 -3
- package/dist/lock/implementations/derivables/lock-provider/lock-state.js.map +1 -1
- package/dist/lock/implementations/derivables/lock-provider/lock.d.ts +194 -680
- package/dist/lock/implementations/derivables/lock-provider/lock.js +284 -744
- package/dist/lock/implementations/derivables/lock-provider/lock.js.map +1 -1
- package/dist/lock/implementations/derivables/lock-provider-factory/lock-provider-factory.d.ts +106 -143
- package/dist/lock/implementations/derivables/lock-provider-factory/lock-provider-factory.js +173 -101
- package/dist/lock/implementations/derivables/lock-provider-factory/lock-provider-factory.js.map +1 -1
- package/dist/lock/implementations/test-utilities/database-lock-adapter.test-suite.d.ts +4 -5
- package/dist/lock/implementations/test-utilities/database-lock-adapter.test-suite.js +172 -247
- package/dist/lock/implementations/test-utilities/database-lock-adapter.test-suite.js.map +1 -1
- package/dist/lock/implementations/test-utilities/lock-adapter.test-suite.d.ts +5 -8
- package/dist/lock/implementations/test-utilities/lock-adapter.test-suite.js +93 -98
- package/dist/lock/implementations/test-utilities/lock-adapter.test-suite.js.map +1 -1
- package/dist/lock/implementations/test-utilities/lock-provider.test-suite.d.ts +15 -20
- package/dist/lock/implementations/test-utilities/lock-provider.test-suite.js +295 -145
- package/dist/lock/implementations/test-utilities/lock-provider.test-suite.js.map +1 -1
- package/dist/serde/implementations/adapters/mongodb-serde/mongodb-serde.js +1 -2
- package/dist/serde/implementations/adapters/mongodb-serde/mongodb-serde.js.map +1 -1
- package/dist/serde/implementations/adapters/no-op-serde-adapter/no-op-serde-adapter.d.ts +3 -2
- package/dist/serde/implementations/adapters/no-op-serde-adapter/no-op-serde-adapter.js +2 -1
- package/dist/serde/implementations/adapters/no-op-serde-adapter/no-op-serde-adapter.js.map +1 -1
- package/dist/serde/implementations/adapters/redis-serde/redis-serde.js +1 -2
- package/dist/serde/implementations/adapters/redis-serde/redis-serde.js.map +1 -1
- package/dist/serde/implementations/adapters/sql-serde/sql-serde.js +1 -2
- package/dist/serde/implementations/adapters/sql-serde/sql-serde.js.map +1 -1
- package/dist/serde/implementations/adapters/super-json-serde-adapter/super-json-serde-adapter.d.ts +2 -2
- package/dist/serde/implementations/adapters/super-json-serde-adapter/super-json-serde-adapter.js +2 -2
- package/dist/serde/implementations/adapters/super-json-serde-adapter/super-json-serde-adapter.js.map +1 -1
- package/dist/serde/implementations/derivables/serde.d.ts +14 -14
- package/dist/serde/implementations/derivables/serde.js +14 -15
- package/dist/serde/implementations/derivables/serde.js.map +1 -1
- package/dist/serde/implementations/test-utilities/flexible-serde-adapter.test-suite.d.ts +4 -4
- package/dist/serde/implementations/test-utilities/flexible-serde-adapter.test-suite.js +3 -3
- package/dist/serde/implementations/test-utilities/flexible-serde.test-suite.d.ts +5 -5
- package/dist/serde/implementations/test-utilities/flexible-serde.test-suite.js +4 -4
- package/dist/utilities/_module-exports.d.ts +2 -3
- package/dist/utilities/_module-exports.js +2 -3
- package/dist/utilities/_module-exports.js.map +1 -1
- package/dist/utilities/classes/_module.d.ts +4 -0
- package/dist/utilities/classes/_module.js +5 -0
- package/dist/utilities/classes/_module.js.map +1 -0
- package/dist/utilities/classes/key-prefixer/_module.d.ts +2 -0
- package/dist/utilities/classes/key-prefixer/_module.js +3 -0
- package/dist/utilities/classes/key-prefixer/_module.js.map +1 -0
- package/dist/utilities/classes/key-prefixer/key-prefixer.contract.d.ts +28 -0
- package/dist/utilities/classes/key-prefixer/key-prefixer.contract.js +5 -0
- package/dist/utilities/classes/key-prefixer/key-prefixer.contract.js.map +1 -0
- package/dist/utilities/classes/key-prefixer/key-prefixer.d.ts +73 -0
- package/dist/utilities/classes/key-prefixer/key-prefixer.js +135 -0
- package/dist/utilities/classes/key-prefixer/key-prefixer.js.map +1 -0
- package/dist/utilities/classes/kysely-table-name-transformer-plugin/_module.d.ts +1 -0
- package/dist/utilities/classes/kysely-table-name-transformer-plugin/_module.js +2 -0
- package/dist/utilities/classes/kysely-table-name-transformer-plugin/_module.js.map +1 -0
- package/dist/utilities/classes/kysely-table-name-transformer-plugin/kysely-table-name-transformer-plugin.js.map +1 -0
- package/dist/utilities/classes/pipeline/_module.d.ts +1 -0
- package/dist/utilities/classes/pipeline/_module.js +2 -0
- package/dist/utilities/classes/pipeline/_module.js.map +1 -0
- package/dist/utilities/{pipeline → classes/pipeline}/pipeline.d.ts +3 -2
- package/dist/utilities/{pipeline → classes/pipeline}/pipeline.js +3 -2
- package/dist/utilities/classes/pipeline/pipeline.js.map +1 -0
- package/dist/utilities/classes/time-span/_module.d.ts +1 -0
- package/dist/utilities/classes/time-span/_module.js +2 -0
- package/dist/utilities/classes/time-span/_module.js.map +1 -0
- package/dist/utilities/{time-span → classes/time-span}/time-span.d.ts +2 -1
- package/dist/utilities/{time-span → classes/time-span}/time-span.js +1 -0
- package/dist/utilities/classes/time-span/time-span.js.map +1 -0
- package/dist/utilities/{_constants.d.ts → constants.d.ts} +0 -3
- package/dist/utilities/constants.js +5 -0
- package/dist/utilities/constants.js.map +1 -0
- package/dist/utilities/contracts/_module.d.ts +3 -1
- package/dist/utilities/contracts/_module.js +3 -1
- package/dist/utilities/contracts/_module.js.map +1 -1
- package/dist/utilities/contracts/prunable.contract.d.ts +11 -0
- package/dist/utilities/contracts/prunable.contract.js +5 -0
- package/dist/utilities/contracts/prunable.contract.js.map +1 -0
- package/dist/utilities/contracts/sqlite-database.contract.d.ts +26 -0
- package/dist/utilities/contracts/sqlite-database.contract.js +5 -0
- package/dist/utilities/contracts/sqlite-database.contract.js.map +1 -0
- package/dist/utilities/functions.d.ts +34 -2
- package/dist/utilities/functions.js +72 -4
- package/dist/utilities/functions.js.map +1 -1
- package/dist/utilities/types.d.ts +49 -16
- package/package.json +14 -13
- package/dist/cache/implementations/adapters/kysely-sqlite-cache-adapter/_module.js +0 -2
- package/dist/cache/implementations/adapters/kysely-sqlite-cache-adapter/_module.js.map +0 -1
- package/dist/cache/implementations/adapters/kysely-sqlite-cache-adapter/kysely-sqlite-cache-adapter.d.ts +0 -61
- package/dist/cache/implementations/adapters/kysely-sqlite-cache-adapter/kysely-sqlite-cache-adapter.js +0 -318
- package/dist/cache/implementations/adapters/kysely-sqlite-cache-adapter/kysely-sqlite-cache-adapter.js.map +0 -1
- package/dist/utilities/_constants.js +0 -8
- package/dist/utilities/_constants.js.map +0 -1
- package/dist/utilities/kysely/_module.d.ts +0 -1
- package/dist/utilities/kysely/_module.js +0 -2
- package/dist/utilities/kysely/_module.js.map +0 -1
- package/dist/utilities/kysely/kysely-table-name-transformer-plugin.js.map +0 -1
- package/dist/utilities/pipeline/_module.d.ts +0 -1
- package/dist/utilities/pipeline/_module.js +0 -2
- package/dist/utilities/pipeline/_module.js.map +0 -1
- package/dist/utilities/pipeline/pipeline.js.map +0 -1
- package/dist/utilities/time-span/_module.d.ts +0 -1
- package/dist/utilities/time-span/_module.js +0 -2
- package/dist/utilities/time-span/_module.js.map +0 -1
- package/dist/utilities/time-span/time-span.js.map +0 -1
- /package/dist/utilities/{kysely → classes/kysely-table-name-transformer-plugin}/kysely-table-name-transformer-plugin.d.ts +0 -0
- /package/dist/utilities/{kysely → classes/kysely-table-name-transformer-plugin}/kysely-table-name-transformer-plugin.js +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lock-provider.js","sourceRoot":"","sources":["../../../../../src/lock/implementations/derivables/lock-provider/lock-provider.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EACH,
|
|
1
|
+
{"version":3,"file":"lock-provider.js","sourceRoot":"","sources":["../../../../../src/lock/implementations/derivables/lock-provider/lock-provider.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EACH,gBAAgB,EAChB,QAAQ,GAMX,MAAM,gCAAgC,CAAC;AACxC,OAAO,EAC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module Lock
|
|
3
3
|
*/
|
|
4
|
-
import {
|
|
5
|
-
import type { ILockAdapter } from "../../../../lock/contracts/_module-exports.js";
|
|
6
|
-
import type { BackoffPolicy, RetryPolicy } from "../../../../async/_module-exports.js";
|
|
4
|
+
import type { ISerdeTransformer } from "../../../../serde/contracts/_module-exports.js";
|
|
7
5
|
import { Lock, type ISerializedLock } from "../../../../lock/implementations/derivables/lock-provider/lock.js";
|
|
6
|
+
import type { OneOrMore } from "../../../../utilities/types.js";
|
|
7
|
+
import type { ILockAdapter, LockEvents } from "../../../../lock/contracts/_module-exports.js";
|
|
8
|
+
import { type ILockStore } from "../../../../lock/implementations/derivables/lock-provider/lock-state.js";
|
|
9
|
+
import { TimeSpan, type IKeyPrefixer } from "../../../../utilities/_module-exports.js";
|
|
10
|
+
import type { LazyPromise } from "../../../../async/_module-exports.js";
|
|
8
11
|
import type { IGroupableEventBus } from "../../../../event-bus/contracts/_module-exports.js";
|
|
9
|
-
import type { ISerdeTransformer } from "../../../../serde/contracts/_module-exports.js";
|
|
10
12
|
/**
|
|
11
13
|
* @internal
|
|
12
14
|
*/
|
|
13
15
|
export type LockSerdeTransformerSettings = {
|
|
14
16
|
adapter: ILockAdapter;
|
|
15
|
-
|
|
16
|
-
|
|
17
|
+
lockStore: ILockStore;
|
|
18
|
+
keyPrefixer: IKeyPrefixer;
|
|
19
|
+
createLazyPromise: <TValue = void>(asyncFn: () => PromiseLike<TValue>) => LazyPromise<TValue>;
|
|
17
20
|
defaultBlockingInterval: TimeSpan;
|
|
21
|
+
defaultBlockingTime: TimeSpan;
|
|
18
22
|
defaultRefreshTime: TimeSpan;
|
|
19
|
-
|
|
20
|
-
backoffPolicy?: BackoffPolicy | null;
|
|
21
|
-
retryPolicy?: RetryPolicy | null;
|
|
22
|
-
timeout?: TimeSpan | null;
|
|
23
|
+
groupableEventBus: IGroupableEventBus<LockEvents>;
|
|
23
24
|
};
|
|
24
25
|
/**
|
|
25
26
|
* @internal
|
|
26
27
|
*/
|
|
27
28
|
export declare class LockSerdeTransformer implements ISerdeTransformer<Lock, ISerializedLock> {
|
|
28
29
|
private readonly adapter;
|
|
30
|
+
private readonly lockStore;
|
|
31
|
+
private readonly keyPrefixer;
|
|
32
|
+
private readonly createLazyPromise;
|
|
29
33
|
private readonly defaultBlockingInterval;
|
|
30
34
|
private readonly defaultBlockingTime;
|
|
31
35
|
private readonly defaultRefreshTime;
|
|
32
|
-
private readonly
|
|
33
|
-
private readonly backoffPolicy;
|
|
34
|
-
private readonly retryPolicy;
|
|
35
|
-
private readonly timeout;
|
|
36
|
-
private readonly eventBus;
|
|
37
|
-
private readonly lockProviderEventBus;
|
|
38
|
-
private stateRecord;
|
|
36
|
+
private readonly groupableEventBus;
|
|
39
37
|
constructor(settings: LockSerdeTransformerSettings);
|
|
40
38
|
get name(): OneOrMore<string>;
|
|
41
39
|
isApplicable(value: unknown): value is Lock;
|
|
@@ -1,39 +1,31 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @module Lock
|
|
3
3
|
*/
|
|
4
|
-
import { getConstructorName, TimeSpan, } from "../../../../utilities/_module-exports.js";
|
|
5
4
|
import { Lock, } from "../../../../lock/implementations/derivables/lock-provider/lock.js";
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
5
|
+
import { LockState, } from "../../../../lock/implementations/derivables/lock-provider/lock-state.js";
|
|
6
|
+
import { getConstructorName, TimeSpan, } from "../../../../utilities/_module-exports.js";
|
|
8
7
|
/**
|
|
9
8
|
* @internal
|
|
10
9
|
*/
|
|
11
10
|
export class LockSerdeTransformer {
|
|
12
11
|
adapter;
|
|
12
|
+
lockStore;
|
|
13
|
+
keyPrefixer;
|
|
14
|
+
createLazyPromise;
|
|
13
15
|
defaultBlockingInterval;
|
|
14
16
|
defaultBlockingTime;
|
|
15
17
|
defaultRefreshTime;
|
|
16
|
-
|
|
17
|
-
backoffPolicy;
|
|
18
|
-
retryPolicy;
|
|
19
|
-
timeout;
|
|
20
|
-
eventBus;
|
|
21
|
-
lockProviderEventBus;
|
|
22
|
-
stateRecord = {};
|
|
18
|
+
groupableEventBus;
|
|
23
19
|
constructor(settings) {
|
|
24
|
-
const { adapter,
|
|
25
|
-
adapter: new NoOpEventBusAdapter(),
|
|
26
|
-
}), } = settings;
|
|
20
|
+
const { adapter, lockStore, keyPrefixer, createLazyPromise, defaultBlockingInterval, defaultBlockingTime, defaultRefreshTime, groupableEventBus, } = settings;
|
|
27
21
|
this.adapter = adapter;
|
|
22
|
+
this.lockStore = lockStore;
|
|
23
|
+
this.keyPrefixer = keyPrefixer;
|
|
24
|
+
this.createLazyPromise = createLazyPromise;
|
|
28
25
|
this.defaultBlockingInterval = defaultBlockingInterval;
|
|
29
26
|
this.defaultBlockingTime = defaultBlockingTime;
|
|
30
27
|
this.defaultRefreshTime = defaultRefreshTime;
|
|
31
|
-
this.
|
|
32
|
-
this.backoffPolicy = backoffPolicy;
|
|
33
|
-
this.retryPolicy = retryPolicy;
|
|
34
|
-
this.timeout = timeout;
|
|
35
|
-
this.eventBus = eventBus;
|
|
36
|
-
this.lockProviderEventBus = eventBus.withGroup(adapter.getGroup());
|
|
28
|
+
this.groupableEventBus = groupableEventBus;
|
|
37
29
|
}
|
|
38
30
|
get name() {
|
|
39
31
|
return ["lock", getConstructorName(this.adapter)];
|
|
@@ -42,33 +34,43 @@ export class LockSerdeTransformer {
|
|
|
42
34
|
return value instanceof Lock && getConstructorName(value) === Lock.name;
|
|
43
35
|
}
|
|
44
36
|
deserialize(serializedValue) {
|
|
45
|
-
const { group, key, owner, ttlInMs } = serializedValue;
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
const isRoot = group === rootGroup;
|
|
37
|
+
const { group, key, owner, ttlInMs, expirationInMs } = serializedValue;
|
|
38
|
+
const isRoot = group === null;
|
|
39
|
+
let keyPrefixer = this.keyPrefixer;
|
|
49
40
|
if (!isRoot) {
|
|
50
|
-
|
|
51
|
-
|
|
41
|
+
keyPrefixer = this.keyPrefixer.withGroup(group);
|
|
42
|
+
}
|
|
43
|
+
const keyObj = keyPrefixer.create(key);
|
|
44
|
+
let lockEventBus = this.groupableEventBus.withGroup(keyPrefixer.resolvedRootPrefix);
|
|
45
|
+
let lockProviderEventDispatcher = this.groupableEventBus.withGroup([
|
|
46
|
+
keyPrefixer.resolvedRootPrefix,
|
|
47
|
+
keyObj.resolved,
|
|
48
|
+
]);
|
|
49
|
+
if (keyPrefixer.resolvedGroup) {
|
|
50
|
+
lockEventBus = this.groupableEventBus.withGroup([
|
|
51
|
+
keyPrefixer.resolvedRootPrefix,
|
|
52
|
+
keyPrefixer.resolvedGroup,
|
|
53
|
+
]);
|
|
54
|
+
lockProviderEventDispatcher = this.groupableEventBus.withGroup([
|
|
55
|
+
keyPrefixer.resolvedRootPrefix,
|
|
56
|
+
keyPrefixer.resolvedGroup,
|
|
57
|
+
keyObj.resolved,
|
|
58
|
+
]);
|
|
52
59
|
}
|
|
53
|
-
const ttl = ttlInMs ? TimeSpan.fromMilliseconds(ttlInMs) : null;
|
|
54
60
|
return new Lock({
|
|
61
|
+
group,
|
|
62
|
+
createLazyPromise: this.createLazyPromise,
|
|
63
|
+
adapterPromise: Promise.resolve(this.adapter),
|
|
64
|
+
lockState: new LockState(this.lockStore, keyObj.prefixed),
|
|
65
|
+
lockEventBus,
|
|
66
|
+
lockProviderEventDispatcher,
|
|
67
|
+
key: keyObj,
|
|
68
|
+
owner,
|
|
69
|
+
ttl: ttlInMs ? TimeSpan.fromMilliseconds(ttlInMs) : null,
|
|
70
|
+
expirationInMs,
|
|
55
71
|
defaultBlockingInterval: this.defaultBlockingInterval,
|
|
56
72
|
defaultBlockingTime: this.defaultBlockingTime,
|
|
57
73
|
defaultRefreshTime: this.defaultRefreshTime,
|
|
58
|
-
lockProviderEventDispatcher: this.lockProviderEventBus,
|
|
59
|
-
lockEventBus: this.eventBus,
|
|
60
|
-
adapter,
|
|
61
|
-
key,
|
|
62
|
-
owner,
|
|
63
|
-
ttl,
|
|
64
|
-
lazyPromiseSettings: {
|
|
65
|
-
backoffPolicy: this.backoffPolicy,
|
|
66
|
-
retryAttempts: this.retryAttempts,
|
|
67
|
-
retryPolicy: this.retryPolicy,
|
|
68
|
-
timeout: this.timeout,
|
|
69
|
-
},
|
|
70
|
-
stateRecord: this.stateRecord,
|
|
71
|
-
expirationInMs: serializedValue.expirationInMs,
|
|
72
74
|
});
|
|
73
75
|
}
|
|
74
76
|
serialize(deserializedValue) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lock-serde-transformer.js","sourceRoot":"","sources":["../../../../../src/lock/implementations/derivables/lock-provider/lock-serde-transformer.ts"],"names":[],"mappings":"AAAA;;GAEG;
|
|
1
|
+
{"version":3,"file":"lock-serde-transformer.js","sourceRoot":"","sources":["../../../../../src/lock/implementations/derivables/lock-provider/lock-serde-transformer.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,EACH,IAAI,GAEP,MAAM,yDAAyD,CAAC;AAMjE,OAAO,EACH,SAAS,GAEZ,MAAM,+DAA+D,CAAC;AACvE,OAAO,EACH,kBAAkB,EAClB,QAAQ,GAEX,MAAM,gCAAgC,CAAC;AAoBxC;;GAEG;AACH,MAAM,OAAO,oBAAoB;IAGZ,OAAO,CAAe;IACtB,SAAS,CAAa;IACtB,WAAW,CAAe;IAC1B,iBAAiB,CAET;IACR,uBAAuB,CAAW;IAClC,mBAAmB,CAAW;IAC9B,kBAAkB,CAAW;IAC7B,iBAAiB,CAAiC;IAEnE,YAAY,QAAsC;QAC9C,MAAM,EACF,OAAO,EACP,SAAS,EACT,WAAW,EACX,iBAAiB,EACjB,uBAAuB,EACvB,mBAAmB,EACnB,kBAAkB,EAClB,iBAAiB,GACpB,GAAG,QAAQ,CAAC;QACb,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;QAC3B,IAAI,CAAC,WAAW,GAAG,WAAW,CAAC;QAC/B,IAAI,CAAC,iBAAiB,GAAG,iBA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AAC,aAAa;aAC5B,CAAC,CAAC;YACH,2BAA2B,GAAG,IAAI,CAAC,iBAAiB,CAAC,SAAS,CAAC;gBAC3D,WAAW,CAAC,kBAAkB;gBAC9B,WAAW,CAAC,aAAa;gBACzB,MAAM,CAAC,QAAQ;aAClB,CAAC,CAAC;QACP,CAAC;QACD,OAAO,IAAI,IAAI,CAAC;YACZ,KAAK;YACL,iBAAiB,EAAE,IAAI,CAAC,iBAAiB;YACzC,cAAc,EAAE,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC;YAC7C,SAAS,EAAE,IAAI,SAAS,CAAC,IAAI,CAAC,SAAS,EAAE,MAAM,CAAC,QAAQ,CAAC;YACzD,YAAY;YACZ,2BAA2B;YAC3B,GAAG,EAAE,MAAM;YACX,KAAK;YACL,GAAG,EAAE,OAAO,CAAC,CAAC,CAAC,QAAQ,CAAC,gBAAgB,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,IAAI;YACxD,cAAc;YACd,uBAAuB,EAAE,IAAI,CAAC,uBAAuB;YACrD,mBAAmB,EAAE,IAAI,CAAC,mBAAmB;YAC7C,kBAAkB,EAAE,IAAI,CAAC,kBAAkB;SAC9C,CAAC,CAAC;IACP,CAAC;IAED,SAAS,CAAC,iBAAuB;QAC7B,OAAO,IAAI,CAAC,SAAS,CAAC,iBAAiB,CAAC,CAAC;IAC7C,CAAC;CACJ"}
|
|
@@ -5,20 +5,20 @@ import { TimeSpan } from "../../../../utilities/_module-exports.js";
|
|
|
5
5
|
/**
|
|
6
6
|
* @internal
|
|
7
7
|
*/
|
|
8
|
-
export type
|
|
8
|
+
export type ILockState = {
|
|
9
9
|
expiration: Date | null;
|
|
10
10
|
};
|
|
11
11
|
/**
|
|
12
12
|
* @internal
|
|
13
13
|
*/
|
|
14
|
-
export type
|
|
14
|
+
export type ILockStore = Partial<Record<string, ILockState>>;
|
|
15
15
|
/**
|
|
16
16
|
* @internal
|
|
17
17
|
*/
|
|
18
18
|
export declare class LockState {
|
|
19
19
|
private stateRecord;
|
|
20
20
|
private readonly key;
|
|
21
|
-
constructor(stateRecord:
|
|
21
|
+
constructor(stateRecord: ILockStore, key: string);
|
|
22
22
|
/**
|
|
23
23
|
* Return the expiration as a date.
|
|
24
24
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lock-state.js","sourceRoot":"","sources":["../../../../../src/lock/implementations/derivables/lock-provider/lock-state.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,gCAAgC,CAAC;AAc1D;;GAEG;AACH,MAAM,OAAO,SAAS;IAEN;IACS;IAFrB,YACY,
|
|
1
|
+
{"version":3,"file":"lock-state.js","sourceRoot":"","sources":["../../../../../src/lock/implementations/derivables/lock-provider/lock-state.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,gCAAgC,CAAC;AAc1D;;GAEG;AACH,MAAM,OAAO,SAAS;IAEN;IACS;IAFrB,YACY,WAAuB,EACd,GAAW;QADpB,gBAAW,GAAX,WAAW,CAAY;QACd,QAAG,GAAH,GAAG,CAAQ;IAC7B,CAAC;IAEJ;;OAEG;IACH,GAAG;QACC,MAAM,KAAK,GAAG,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QACzC,IAAI,KAAK,KAAK,SAAS,EAAE,CAAC;YACtB,OAAO,IAAI,CAAC;QAChB,CAAC;QACD,MAAM,EAAE,UAAU,EAAE,GAAG,KAAK,CAAC;QAC7B,OAAO,UAAU,CAAC;IACtB,CAAC;IAED;;;OAGG;IACH,GAAG,CAAC,GAA6B;QAC7B,IAAI,OAAO,GAAG,KAAK,QAAQ,EAAE,CAAC;YAC1B,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG;gBACzB,UAAU,EAAE,IAAI,IAAI,CAAC,GAAG,CAAC;aAC5B,CAAC;YACF,OAAO;QACX,CAAC;Q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