mike12345567
186aeeec2d
Adding the ability to store environment variables to context, to make them more easily available/re-usable, as well as exposing them to queries.
2023-01-13 19:53:46 +00:00
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
Rory Powell
7ef9e9dc51
File authentication using presigned URLs ( #8883 )
...
* file auth wip
* Private plugin bucket wip
* Add etag to logo request, fix circular dependency
* Resolve cyclic dependency
* Ensure browser doesn't cache custom component
* Global file fixes
* File fixes / remove permaUrl
* Add ctx local storage
* Enable presigned url to work from any host
* Test fix
* Self hosting w/ S3 + other fixes
* Fix for serving dev app in multi tenant
* Fix backup restore and import attachment url processing, never store attachment urls
* Test fixes
* Unit tests WIP
* Replace file path with base64 encoded private key
* Multi tenancy tests for files
* Environment files fixes
* Post-merge build and test fixes
* Add debug conditional to all jest logging and revert/fix prod minio proxy_pass
* Re-add default '/' minio route :(
* Rename iconFile -> iconFileName
* Add cloudfront vars to k8s templates
* Remove public bucket policy
* Remove duplicated test
2022-12-15 11:35:22 +00:00
mike12345567
b5b74b9cad
General work after running some tests in CI - general refactoring as well.
2022-11-28 17:54:04 +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
4c44b7a224
PR comments - still experiencing build issues.
2022-11-17 13:31:54 +00:00
mike12345567
bf86640e9d
Merge branch 'develop' of github.com:Budibase/budibase into feature/replace-pouch
2022-11-16 18:12:31 +00:00
mike12345567
4f64798ada
Updating middlewares to Typescript, as well as some fixes based on running tests.
2022-11-16 17:24:13 +00:00
mike12345567
b0f6224c18
Some major reworks towards higher levels of typescript.
2022-11-16 17:23:12 +00:00
Rory Powell
ad81adb30f
Merge branch 'develop' into subdomain-tenancy
2022-11-15 16:18:59 +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
380ee221b1
Updating context test, some minor adjustments based on getting the test working again.
2022-11-14 18:29:15 +00:00
mike12345567
c6d31a856a
Replacing CLS with local-storage, simplified usage which should remove the memory leak permenantly.
2022-11-14 18:00:20 +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
3035c3a3a1
Typescript conversions - trying to get all of context/db layer into TS.
2022-11-11 11:57:50 +00:00
Rory Powell
0bad2dd9ae
Support path variable tenancy detection, add /api/system/* tests, update no tenancy matchers to be more accurate
2022-11-11 11:10:07 +00:00
mike12345567
fd624e097a
Typescript conversions, as well as updating context to just use an object map.
2022-11-10 17:38:26 +00:00
mike12345567
c356e0d152
Re-building the context module to use a single object, meaning we can create new context frames and copy over whatever exists, then update.
2022-11-10 16:38: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
mike12345567
d32e4586c2
Refactoring a lot of content around webhooks to Typescript, as well as fixing webhooks and automation app IDs on import of new app.
2022-10-25 18:19:18 +01:00
mike12345567
758c46ce83
Minor fixes after testing manual backup system.
2022-10-14 20:10:44 +01:00
Rory Powell
9af16738e5
Merge develop
2022-09-28 08:56:45 +01:00
mike12345567
06100af834
Fixing minor issue with automation quota updates.
2022-05-30 14:06:42 +01:00
mike12345567
fe1016d01b
Adding the ability to force a new context.
2022-05-23 23:23:49 +01:00
mike12345567
bba1fdcb7c
Switching over to using our own version of cls-hooked which has the memory leak (no async hooks disable call) fixed as well as changing how we use the CLS namespaces to allow us to destroy the namespace we use per request.
2022-05-10 16:37:24 +01:00
Rory Powell
716eab5d10
Bypass couch db when using tenancy middleware
2022-04-26 17:13:45 +01:00
mike12345567
95c7963c0a
Merge branch 'develop' of github.com:Budibase/budibase into fix/develop-merge
2022-04-26 16:31:17 +01:00
mike12345567
fe846f86a5
Fixing issues with test cases - a lot of test cases didn't setup tenancy in any format, which now means that the API endpoints they call would not have access to a Global DB instance. Also had to disable the closing of the database in test as this was removing the database from memory, meaning future calls would find an empty database when they opened it.
2022-04-21 14:56:14 +01:00
mike12345567
9d01028bd0
Adding another check to make sure context is the same.
2022-04-20 23:13:08 +01:00
mike12345567
1d61ff906a
Fixing some issues detected by the test cases, making the in-use mechanism for context more clear to complete avoid stack up of contexts (leading to loss of knowledge around previous databases.
2022-04-20 23:10:39 +01:00
mike12345567
7792a07899
Some updates, making sure databases will always close directly using finally checks around the actual tasks, updating how replication works to have a close statement (to make sure it is controlled correctly) and then updating to PouchDB 7.3.0 for one of the memory leak fixes.
2022-04-20 17:33:42 +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
Dean
4cc1a85f25
Code style check
2022-04-19 14:56:56 +01:00
Dean
3e74118f81
Unpublish refactored to stop development applications being mistakenly deleted. Minor updates to the modal content component to allow the replacement of the header. Further work to implement the publishing workflow changes
2022-04-19 14:38:09 +01:00
Rory Powell
bcc84bf1fd
Link app context with tenancy, remove app tenancy middleware
2022-03-24 13:04:49 +00:00
Rory Powell
d9ead48c59
Deprovision and local couch db url fix
2022-02-18 17:36:23 +00:00
Rory Powell
a8a8e97840
Add 'location = /' -> 4001 to nginx dev conf
2022-02-18 11:18:59 +00:00
mike12345567
9fa10ff02f
Refactoring backend-core tenancy to context, splitting out tenancy functionality to its own area.
2022-01-31 17:53:19 +00:00