Joachim Van Herwegen
16e9368734
test: Add flushPromises utility function
2022-03-31 17:00:09 +02:00
Joachim Van Herwegen
4404fa07d9
refactor: Rename resourceExists to hasResource
...
The function was also moved to the smaller interface ResourceSet.
2022-03-18 14:15:12 +01:00
Joachim Van Herwegen
b3da9c9fcf
refactor: Restructure source code folder
...
This way the location of certain classes should make more sense
2021-10-12 12:51:02 +02:00
Joachim Van Herwegen
7c7fee5f5c
refactor: Rename associated resource to subject resource
2021-10-08 15:49:49 +02:00
Ruben Verborgh
6495d650c2
chore: Use consistent strategy naming.
2021-07-21 23:37:23 +02:00
Arne Vandoorslaer
b3f292d718
feat: Added resourceExists method to ResourceStore
...
* feat: added resourceExists method to ResourceStore
* Merge remote-tracking branch 'origin/main' into feat/add-resourceExists-method-to-ResourceStore
* fix: adapted to review
* fix: adapted to review
2021-02-25 13:43:58 +01:00
Joachim Van Herwegen
061c856161
feat: Add auxiliary support to LockingResourceStore
...
This way locks are always on the associated resource
if there is a request on an auxiliary resource.
2021-02-18 13:26:08 +01:00
Joachim Van Herwegen
b61d46900f
feat: Create new interface for lockers with only 1 kind of lock
2021-02-09 14:35:12 +01:00
Joachim Van Herwegen
c29928c32c
fix: Test error classes correctly
2021-01-29 09:40:10 +01:00
Joachim Van Herwegen
c17402517e
feat: Update LockingResourceStore to use new locking interface
...
This has as added bonus that, in the case of getRepresentation,
the stream will be destroyed with an error in case of a timeout.
2021-01-22 11:34:51 +01:00
Ruben Verborgh
f9a20799eb
refactor: Use declarations style for functions.
2021-01-06 11:24:43 +01:00
smessie
f4afc3ce16
test: Divide current tests into integration and unit tests for LockingResourceStore
2020-11-25 09:05:38 +01:00
smessie
dacfb74a6a
refactor: Move lock stuff in its own folder
2020-11-25 09:05:38 +01:00
Ruben Verborgh
6f4c4a15b4
chore: Review expiring locks.
2020-11-16 10:32:10 +01:00
smessie
9fd8440525
feat: Implement ExpiringLock and -ResourceLocker
2020-11-16 10:32:10 +01:00
Ruben Verborgh
4b4f737013
chore: Use Jest recommended linting.
2020-11-02 10:03:18 +01:00
Joachim Van Herwegen
9657fbafb1
refactor: Update eslint related dependencies
2020-09-17 11:55:49 +02:00
Ruben Taelman
48740e5cba
style: improve linting of imports
...
A new plugin is used that offers autofixing capabilities.
2020-08-26 13:20:19 +02:00
smessie
aa510bc6b8
fix: Release lock only when stream ends or is abandoned ( #60 )
...
* fix: Release lock only when stream has ended reading or an error occurs
* refactor: Refactor code and tests
* refactor: Move function mock to onBefore and remove unnecessary data drain
* fix: Make functions protected, add extra listener and add extra tests
* fix: Add extra TSDoc comment
* fix: Adjust tests to expect both end and close event
* refactor: Move test to other file
* refactor: make lockedRun method-independent
* fix: ensure lock release happens only once
* fix: make locked resources time out
* fix: destroy readable on error
Co-authored-by: Ruben Verborgh <ruben@verborgh.org>
2020-08-20 10:51:19 +02:00
Joachim Van Herwegen
aaba113563
fix: Set max-len to 120
2020-07-24 15:10:34 +02:00
Joachim Van Herwegen
dcff424f58
fix: Enable strict TypeScript settings
2020-07-24 13:30:34 +02:00
Joachim Van Herwegen
a9b811a5a3
feature: Add lock functionality
2020-07-17 15:26:32 +02:00