Rory Powell
0b2a445a9a
Replace ts-jest with swc/jest ( #9289 )
...
- Add swc dependencies
- Add transform change to jest.config.ts
- Replace `export =` with `export default` in src code to enable code coverage to work with swc transformer
- Restructure backend-core errors package to allow for exporting error classes with ESM syntax
- Update backend-core to no longer use `export =`, export individual packages instead of replacing with `export default` for backwards compatibility
- Update event publishers to use `export default` - this was required for the `jest.spyOn` usage inside backend-core common mocks
- Restructure some jest.mock usages where declaring the jest.fn as a variable outside of the package mock threw an error
2023-01-11 09:37:37 +00:00
mike12345567
ea66f7ac38
Disabling js interop in Typescript build of backend-core and worker, fixing build issues.
2022-11-26 14:46:01 +00:00
mike12345567
a38d617138
Complete conversion of backend-core to Typescript.
2022-11-24 18:48:51 +00:00
mike12345567
c4f041e511
Updating PouchLike to be an interface in types, with its impl stored in backend-core, now called Database.
2022-11-17 14:35:03 +00:00
mike12345567
806c7dd1af
Merge branch 'develop' of github.com:Budibase/budibase into feature/replace-pouch
2022-11-15 16:45:25 +00:00
Rory Powell
2212305f08
Bump jest and ts-jest to be consistent across backend packages to fix CI issue, test config updates
2022-11-14 22:55:47 +00:00
mike12345567
a15a265bda
Re-jigging things a bit, hiding as much of the couch/pouch stuff away.
2022-11-11 12:46:32 +00:00
mike12345567
bbc8965d55
Major update - removing the use of context for PouchDB instances, swapping knowledge of PouchDB to the PouchLike structure that replaces it.
2022-11-09 16:53:42 +00:00
Rory Powell
0b7ca49418
Fix build failure around PouchDB type
2022-10-25 09:02:55 +01:00
mike12345567
b920f8cb05
Replacing all plural TS enumerations with singular - this involves a major rename of the DocumentTypes.
2022-08-11 13:50:05 +01:00
Rory Powell
ae342910c2
Rate limit served:X events
2022-08-08 15:44:29 +01:00
Andrew Kingston
d63c547dd6
Use warn rather than info when notifying about ignored conflicts
2022-07-25 12:23:30 +01:00
Andrew Kingston
c79e53db80
Ignore 409s in write-through cache
2022-07-25 12:17:40 +01:00
mike12345567
9207642779
Fixing an issue where periodically the cache state of the couch revision gets out of sync and need to update it for cache to be able to write again.
2022-06-24 17:41:17 +01:00
mike12345567
c62b6da703
Adding case to handle multi-DB setups, to confirm store same doc ID to different databases and they run in different cache keys.
2022-06-24 14:28:45 +01:00
mike12345567
eeca1cb3ba
Updating writethrough cache a bit to make sure it implements the PouchDB API properly.
2022-06-24 13:34:00 +01:00
mike12345567
e3f25795e8
Fixing test case and review comments.
2022-06-24 12:08:29 +01:00
mike12345567
07d47102a1
Adding a class wrapper incase using get/put functions multiple times, functions like the PouchDB constructor.
2022-06-23 20:27:20 +01:00
mike12345567
0a9edc48b6
Updating redis to use typescript and adding the option of a writethrough cache which can be used, by passing a DB and a value to be written + a delay for writes.
2022-06-23 20:22:51 +01:00
Rory Powell
429f379431
Failover protection with event cache
2022-05-31 21:04:41 +01:00
Rory Powell
fd845284d3
Lots of failure handling and caching
2022-05-30 21:46:08 +01:00
mike12345567
7be0dad245
Updating cache to 1 hour.
2022-05-23 16:06:47 +01:00
mike12345567
100f5a6f3c
Moving the withCache function to backend-core so that it can be shared, as well as adding a cache busting function which can be used when one of the checklist configs changes.
2022-05-23 15:03:52 +01:00
mike12345567
ea6f580501
Initial version of memory leak protection, making sure that PouchDB databases are closed correctly after use, using a combination of closures wrapping DB gets (this replaces the getDB, leaving only a dangerousGetDB function which can be used in very very specific scenarios) and then closing the DB as part of CLS hooked functions finishing. Also moving the GlobalDB init to the tenancy middleware as this is used everywhere in the worker/app services - means that not all getGlobalDB calls require an async closure around them.
2022-04-19 19:42:52 +01:00
Rory Powell
769f48f935
Remove remaining direct usage of CouchDB. Add common pouch config to backend-core
2022-04-19 16:45:27 +01:00
mike12345567
c189550614
Adding controllers for row, query and applications public APIs.
2022-02-23 18:31:32 +00:00
mike12345567
b4f83fa867
Changing directory.
2022-01-10 19:30:35 +00:00