Commit graph

69 commits

Author SHA1 Message Date
RMidhunSuresh a945edfe07 Convert pbkdf2.js to ts 2021-11-17 20:28:44 +05:30
RMidhunSuresh 6c2aa1bf61 Convert hkdf.js to ts 2021-11-17 20:28:44 +05:30
RMidhunSuresh afecac3e3c Convert timeout.js to ts 2021-11-17 20:28:44 +05:30
RMidhunSuresh 8a169d5ddc Convert sortedIndex.js to ts 2021-11-17 20:28:44 +05:30
RMidhunSuresh ea0adb4407 Convert RetainedValue.js to ts 2021-11-17 20:28:44 +05:30
RMidhunSuresh 88ec1b575d Convert mergeMap.js to ts 2021-11-17 20:28:44 +05:30
RMidhunSuresh 1549d8add0 Convert LockMap to ts 2021-11-17 20:28:44 +05:30
RMidhunSuresh c8eb7ea7ac Convert Lock.js to ts 2021-11-17 20:28:44 +05:30
RMidhunSuresh a3460d8c2a Convert formatSize to ts 2021-11-17 20:28:44 +05:30
RMidhunSuresh 4ce7634201 Convert error.js to ts 2021-11-17 20:28:44 +05:30
RMidhunSuresh 7d12c2ba54 Add return types 2021-11-17 20:28:44 +05:30
RMidhunSuresh 7270918b65 Convert Disposables to typescript 2021-11-17 20:28:44 +05:30
RMidhunSuresh dd74ed1957 Add types to disposeValue 2021-11-17 20:28:44 +05:30
RMidhunSuresh 7772643b0d Disposables.js --> Disposables.ts 2021-11-17 20:28:44 +05:30
Bruno Windels 45dc2162dc fix unit tests 2021-10-22 17:30:20 +02:00
Bruno Windels 77d10c93d6 convert groupby and megolm decryption utils to typescript 2021-10-21 14:40:51 +02:00
Bruno Windels 66a77519d7 implement key caching in KeyLoader
merging session cache into it so we can better manage and recycle
keys without exposing too low-level public methods on BaseLRUCache.

Using refCount instead of inUse flag as a key can of course be used
by multiple useKey calls at the same time.
2021-10-21 11:12:54 +02:00
Bruno Windels 4fa285e85a convert LRUCache to ts 2021-10-20 15:24:58 +02:00
Bruno Windels cbf82fcd29 cleanup code so far 2021-10-20 15:14:17 +02:00
Bruno Windels d7407ecf66 WIP 2021-10-20 11:39:01 +02:00
Bruno Windels ae68264db4 don't use switch where single if/else works 2021-09-30 08:42:00 +02:00
Bruno Windels 2ef7251079 move ssssKey to e2ee prefix as well so it gets backed up too 2021-09-29 19:21:06 +02:00
Bruno Windels cce8207870 copy Daniel's conversion of EventEmitter to TypeScript from microui 2021-09-16 10:23:03 +02:00
Bruno Windels e105bc4237 fix lint warnings 2021-08-24 15:31:18 +02:00
Bruno Windels 577c3168e6 make queryLogin abortable 2021-08-23 15:54:06 +02:00
Bruno Windels 36f54420cf extract RetainedValue from MemberList 2021-05-07 13:06:00 +02:00
Bruno Windels c604c31032 use external mock for request in timeout tests 2021-04-09 15:16:43 +02:00
Bruno Windels 2341748023 add some tests to timeout code 2021-04-09 14:09:48 +02:00
Bruno Windels f0c0c3e084 add LRU Cache utility
we'll use it to cache members later on
2021-03-05 17:00:55 +01:00
Bruno Windels fb446167f6 make new sync room keys available during decryption of same sync 2021-03-02 19:39:04 +01:00
Bruno Windels 0eb2b4fe6b simplify with toFixed here 2021-03-01 15:07:24 +01:00
Bruno Windels 636208a321 show all event type counts in device msg logging 2021-02-24 20:56:20 +01:00
Bruno Windels 364295c7a9 don't throw when container is already disposed, just dispose immediately 2021-02-22 10:48:06 +01:00
Bruno Windels 21a7ec0dff byte size formatting 2020-11-10 17:50:20 +01:00
Bruno Windels 89c66699d7 some Lock refactoring that I didn't end up needing but still useful 2020-11-10 11:04:53 +01:00
Bruno Windels 03351d2e1f extract platform class to put all platform specific code in 2020-10-26 15:44:11 +01:00
Bruno Windels db5c98a706 support reassigning to null from untrack 2020-10-13 13:10:27 +02:00
Bruno Windels 3ab68ef438 throw when something tracked is not disposable, fail early 2020-10-09 17:01:54 +02:00
Bruno Windels 614ec08238 integrate grid vm with session vm, allowing to switch 2020-10-07 12:25:40 +02:00
Bruno Windels bb58fa9b6c dont need this anymore 2020-09-28 15:32:40 +02:00
Bruno Windels 64290d5ae6 flush promises manually in idb event handler 2020-09-25 16:53:19 +02:00
Bruno Windels becdf656a4 nicer error messages when decrypting with a worker 2020-09-25 16:52:26 +02:00
Bruno Windels 3aead4eae2 createEnum does not take an array 2020-09-18 13:08:35 +02:00
Bruno Windels 5752cca69c go back to bs58 and use other base64 decoder
as base-x isn't meant for base64
2020-09-17 17:56:05 +02:00
Bruno Windels 4ec0e67384 use base-x to support both base64 and base58 2020-09-17 11:36:54 +02:00
Bruno Windels 00eade1c16 add crypto driver with primitives needed for 4S & session backup 2020-09-17 10:19:09 +02:00
Bruno Windels 78fecd003a cleanup 2020-09-10 18:57:29 +02:00
Bruno Windels af36c71a59 load worker in main and pass paths so it works both on compiled and non-compiled 2020-09-10 18:41:23 +02:00
Bruno Windels de1cc0d739 abort decrypt requests when changing room 2020-09-10 17:43:01 +02:00
Bruno Windels 0bf1723d99 Worker WIP 2020-09-10 15:40:30 +01:00