Commit Graph

605 Commits

Author SHA1 Message Date
mike12345567 9482870d21 Merge branch 'develop' of github.com:Budibase/budibase into feature/test-image 2023-01-11 10:31:57 +00:00
Rory Powell 13bfd5d8ff
Prefer app url resolution over referer (#9218)
* Prefer app url resolution over referer

* Update lockfiles
2023-01-11 10:24:57 +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
mike12345567 a0dfe50fcc Merge branch 'develop' of github.com:Budibase/budibase into feature/test-image 2023-01-10 18:49:07 +00:00
mike12345567 8f3e841a75 Licensing updates for environment variables. 2023-01-09 15:42:09 +00:00
Hong Phuc Nguyen af3d736ea3
Doing sanitizeKey when doing deleteFile(s) (#9209)
* Doing sanitizeKey when doing deleteFile(s)

Doing sanitizeKey when doing deleteFile(s). 
In case of backup file name in backups bucket backup-2023-01-03T185512.686Z.tar.gz but in global-db store backup filename is backup-2023-01-03T18:55:12.686Z.tar.gz
sanitizeKey on deleteFile(s) method will prevent all other case related to this bug

* use .promise() instead callback for workaround aws-sdk bug
2023-01-05 08:54:10 +00:00
mike12345567 6518dfbe3b Playing around with getting tests working. 2023-01-04 19:47:56 +00:00
Martin McKeaveney 8a2a5a1f76
fixes for google sheets, admin checklist, and deleting an app from API (#8846)
* fixes for google sheets, admin checklist, and deleting an app from API

* code review

* splitting unpublish endpoint, moving deploy endpoint to applications controller. Still to do public API work and move deployment controller into application controller

* updating REST method for unpublish in API test

* unpublish and publish endpoint on public API, delete endpoint unpublishes and deletes app

* removing skip_setup from prodAppDb call

* removing commented code

* unit tests and open API spec updates

* unpublish, publish unit tests - delete still in progress

* remove line updating app name in API test

* unit tests

* v2.1.46

* Update pro version to 2.1.46

* v2.2.0

* Update pro version to 2.2.0

* Fix for budibase plugin skeleton, which utilises the old import style.

* Fix side nav styles

* v2.2.1

* Update pro version to 2.2.1

* using dist folder to allow importing constants for openAPI specs

* v2.2.2

* Update pro version to 2.2.2

* Fix for user enrichment call (updating to @budibase/nano fork) (#9038)

* Fix for #9029 - this should fix the issue users have been experiencing with user enrichment calls in apps, essentially it utilises a fork of the nano library we use to interact with CouchDB, which has been updated to use a POST request rather than a GET request as it supports a larger set of data being sent as query parameters.

* Incrementing Nano version to attempt to fix yarn registry issues.

* v2.2.3

* Update pro version to 2.2.3

* Fix SQL table `_id` filtering (#9030)

* Re-add support for filtering on _id using external SQL tables and fix filter key prefixes not working with _id field

* Remove like operator from internal tables and only allow basic operators on SQL table _id column

* Update data section filtering to respect new rules

* Update automation section filtering to respect new rules

* Update dynamic filter component to respect new rules

* v2.2.4

* Update pro version to 2.2.4

* lock changes (#9047)

* v2.2.5

* Update pro version to 2.2.5

* Make looping arrow point in right direction (#9053)

* v2.2.6

* Update pro version to 2.2.6

* Types/attaching license to account (#9065)

* adding license type to account

* removing planDuration

* v2.2.7

* Update pro version to 2.2.7

* Environment variable type coercion fix (#9074)

* Environment variable type coercion fix

* Update .gitignore

* v2.2.8

* Update pro version to 2.2.8

* tests passing

* all tests passing, updates to public API response

* update unpublish call to return 204, openAPI spec and unit

* fixing API tests

Co-authored-by: Budibase Release Bot <>
Co-authored-by: mike12345567 <me@michaeldrury.co.uk>
Co-authored-by: Andrew Kingston <andrew@kingston.dev>
Co-authored-by: melohagan <101575380+melohagan@users.noreply.github.com>
Co-authored-by: Rory Powell <rory.codes@gmail.com>
2022-12-19 13:18:00 +00:00
Rory Powell cfadd037ff
Minio and local licensing fixes (#9071) 2022-12-16 11:14:31 +00:00
Andrew Kingston 20ff5dcb70
Master => Develop (#9049)
* v2.1.46

* Update pro version to 2.1.46

* v2.2.0

* Update pro version to 2.2.0

* Fix for budibase plugin skeleton, which utilises the old import style.

* Fix side nav styles

* v2.2.1

* Update pro version to 2.2.1

* using dist folder to allow importing constants for openAPI specs

* v2.2.2

* Update pro version to 2.2.2

* Fix for user enrichment call (updating to @budibase/nano fork) (#9038)

* Fix for #9029 - this should fix the issue users have been experiencing with user enrichment calls in apps, essentially it utilises a fork of the nano library we use to interact with CouchDB, which has been updated to use a POST request rather than a GET request as it supports a larger set of data being sent as query parameters.

* Incrementing Nano version to attempt to fix yarn registry issues.

* v2.2.3

* Update pro version to 2.2.3

* Fix SQL table `_id` filtering (#9030)

* Re-add support for filtering on _id using external SQL tables and fix filter key prefixes not working with _id field

* Remove like operator from internal tables and only allow basic operators on SQL table _id column

* Update data section filtering to respect new rules

* Update automation section filtering to respect new rules

* Update dynamic filter component to respect new rules

Co-authored-by: Martin McKeaveney <martin@budibase.com>
Co-authored-by: Budibase Release Bot <>
Co-authored-by: mike12345567 <me@michaeldrury.co.uk>
Co-authored-by: Martin McKeaveney <martinmckeaveney@gmail.com>
2022-12-15 12:13:42 +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
Rory Powell 56dfba9b4a
Offline license POC (#9046) 2022-12-14 21:48:48 +00:00
Peter Clement 9bf37b34ae
Server and Worker tests (#8928)
* automation unit tests

* row processor tests

* update executeQuery test

* update groups assertion

* some more worker tests

* plugin tests and tidying up

* linting

* temporarily disable group tests

* more tests

* fix import

* fix backup tests

* add pro mocks to worker

* check for app existence in import test

* test new tsconfig

* testing changes

* Pro test utils (#9020)

* Pro test utils changes

* Add test fixes

* Remove ts-ignore

Co-authored-by: mike12345567 <me@michaeldrury.co.uk>
Co-authored-by: Rory Powell <rory.codes@gmail.com>
2022-12-12 22:02:32 +00:00
mike12345567 0b7057dd1d Some fixes based on test failure. 2022-12-07 17:33:26 +00:00
Andrew Kingston 02ef58c7fc Merge branch 'develop' of github.com:Budibase/budibase into side-panel 2022-11-29 12:22:56 +00:00
mike12345567 ab914bcca2 Final fixes after re-running all test suites. 2022-11-28 19:12:23 +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 8f4813b01a Fix for account portal. 2022-11-28 14:09:18 +00:00
mike12345567 6ac4669f0a Fixing some issues detected by testing. 2022-11-26 21:26:19 +00:00
mike12345567 4868083208 Fixes based on server build so far. 2022-11-26 15:10:41 +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 0a32126c5b Automation overhaul to Typescript, plus type updates. 2022-11-25 19:57:07 +00:00
Andrew Kingston 2a6ba0536f Merge branch 'develop' of github.com:Budibase/budibase into side-panel 2022-11-25 11:24:57 +00:00
mike12345567 a38d617138 Complete conversion of backend-core to Typescript. 2022-11-24 18:48:51 +00:00
Andrew Kingston 92987ebfb8 Rename migration 2022-11-24 14:27:49 +00:00
mike12345567 1b408e60f2 Refactoring worker, converting all controllers/routes to Typescript and all imports of backend-core to new style. 2022-11-23 18:25:20 +00:00
mike12345567 4fd408defc Merge branch 'develop' of github.com:Budibase/budibase into refactor/backend-core-import 2022-11-23 10:30:57 +00:00
Rory Powell 70016dc7e4 Account portal <-> backend-core fixes 2022-11-22 22:24:45 +00:00
mike12345567 6f6d000cb8 Finally removing all usages of backend-core/ type imports from server, including some further typescript conversions. 2022-11-22 19:49:59 +00:00
mike12345567 a620791d13 More controller typescript conversions. 2022-11-22 16:52:25 +00:00
Andrew Kingston cac780eb50 Merge branch 'develop' of github.com:Budibase/budibase into side-panel 2022-11-22 16:52:09 +00:00
Rory Powell b7d33dfa5f Fix view creation 2022-11-22 16:28:51 +00:00
mike12345567 7ab2029b5d Typescript conversion of the table controllers. 2022-11-22 13:56:01 +00:00
mike12345567 51471449fc Merge branch 'develop' of github.com:Budibase/budibase into refactor/backend-core-import 2022-11-22 12:03:31 +00:00
mike12345567 ee4ebbfb56 Some typescript conversions, moving a few imports around. 2022-11-21 18:33:34 +00:00
Dean ce1ddb4458 Import refactoring and some review updates. 2022-11-21 15:53:47 +00:00
Dean 7fe99448f7 Merge remote-tracking branch 'origin/develop' into feature/default-internal-datasource 2022-11-21 15:40:11 +00:00
mike12345567 9ee1ea9684 Merge branch 'develop' of github.com:Budibase/budibase into develop 2022-11-21 15:06:44 +00:00
mike12345567 5aa1f94cfe Merge branch 'master' of github.com:Budibase/budibase into develop 2022-11-21 15:05:48 +00:00
mike12345567 7e0641c959 Fix for table deletion, updating DatabaseImpl to define pouch functions directly. 2022-11-21 14:41:19 +00:00
Dean a123e65e78 Import fixes for backend core constants. Minor name change for default data source from Test DB to Sample Data 2022-11-21 12:47:36 +00:00
mike12345567 fd80ceed6e Adding IDs to backup events. 2022-11-21 12:12:57 +00:00
Rory Powell 523368655d Add remove overload to allow for doc removal 2022-11-21 11:38:37 +00:00
Dean 4a94ef8bf9 Merge remote-tracking branch 'origin/develop' into feature/default-internal-datasource 2022-11-21 11:10:29 +00:00
Andrew Kingston 8d8e33a19e Merge branch 'develop' of github.com:Budibase/budibase into side-panel 2022-11-21 10:30:25 +00:00
mike12345567 33827af592 Adding type to triggered. 2022-11-17 23:09:49 +00:00
Michael Drury 027eda2231 PR comments. 2022-11-17 19:38:47 +00:00
mike12345567 575a64d32a Adding an event for when a backup is triggered. 2022-11-17 17:15:35 +00:00
mike12345567 318233d812 Some minor updates after running qa-core tests, found some issues that likely exists before context update. 2022-11-17 16:30:38 +00:00
Dean 2d81f516e0 Shifted the budibase datasource constant to backend-core 2022-11-17 16:28:48 +00:00
mike12345567 fcb6f985a6 Updating some enums, plural to single. 2022-11-17 14:59:18 +00:00
mike12345567 6e659f873c Fixing permission types. 2022-11-17 14:47:52 +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 242a529b2e Fixes post merge. 2022-11-16 18:28:45 +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 6017f6be47 Add copy button to sso callback urls, e2e unit testing for OIDC, stub out other auth tests 2022-11-16 11:34:16 +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 ad81adb30f Merge branch 'develop' into subdomain-tenancy 2022-11-15 16:18:59 +00:00
Rory Powell d205b5136b ensure fetch and aws are always mocked 2022-11-15 15:50:15 +00:00
Rory Powell e4810dff1e Update waitForCompletion and pouch / backup type 2022-11-15 14:28:02 +00:00
Andrew Kingston 0935738fbd Add migration to automatically convert legacy table settings into new action setting 2022-11-15 11:54:45 +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 1af47003c5 Updating test cases - trying to get everything in order for merge. 2022-11-14 20:25:05 +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
Rory Powell 80b823f6cf Test fixes 2022-11-11 15:43:41 +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
melohagan b13723b1a3
Merge pull request #8593 from Budibase/bug/sev2/mongodb-aggregate-readable
MongoDB aggregate readable
2022-11-10 15:27:08 +00:00
Mel O'Hagan 1532395033 Add readable flag to datasource validation 2022-11-10 14:23:22 +00:00
mike12345567 1ee6761a69 Some minor updates based on getting the worker using the new pouchlike impl. 2022-11-09 17:53:35 +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 ada0eb79bc Update tenancy detection to honour any subdomain pattern according to platform url 2022-11-09 16:35:16 +00:00
mike12345567 fa78b8bc37 Merge branch 'develop' of github.com:Budibase/budibase into feature/replace-pouch 2022-11-09 14:44:01 +00:00
mike12345567 e0cf213ad5 Merge branch 'master' of github.com:Budibase/budibase into develop 2022-11-09 13:41:51 +00:00
Michael Drury 0af56bed25 Exporting roles differently to fix issue raised by test. 2022-11-08 20:01:01 +00:00
Michael Drury 9cfdfc174b Quick fix to not expose the builder ID outside of the role impl. 2022-11-08 19:48:16 +00:00
mike12345567 4dceee33c5 Exporting some functions that were previously exported. 2022-11-08 18:35:21 +00:00
mike12345567 189fb90bb0 Typescript re-write of the roles layer, this is the backbone of a lot of our security features, and I believe the issue was generally to do with a lack of handling of null-ish inputs. 2022-11-08 18:25:37 +00:00
mike12345567 b89588af51 Getting basic pouch replacement working. 2022-11-08 16:32:13 +00:00
mike12345567 687aa1c6f3 Adding more type handling around the upload object store function. 2022-11-08 11:49:07 +00:00
mike12345567 862525cc0e Fixing an issue which was alerting, x-amz-meta-fieldname contains an invalid value, this error isn't really documented, but comes from if a metadata tag is sent up with nullish, or a non-string type. Fixing this in the core library, removing an invalid inputs. 2022-11-08 11:34:16 +00:00
mike12345567 8210793953 First version of pouch-like system, a wrapper for Couch nano. 2022-11-07 18:27:39 +00:00
Rory Powell e3705e8aa3 Add extra auth logging to authenticated.ts 2022-11-04 08:30:44 +00:00
mike12345567 b8253ce37b Merge branch 'master' of github.com:Budibase/budibase into develop 2022-11-02 20:12:01 +00:00
mike12345567 da9eaca82a Fixing issue with self host build - import of backend-core changes mean that loading the public API files can require setup of backend-core, making it so that the JWT Strategy doesn't need to be setup to load backend-core. 2022-11-01 12:59:10 +00:00
mike12345567 52d9172060 Merge branch 'develop' of github.com:Budibase/budibase into fix/mike-oct-fixes 2022-10-26 10:37:01 +01:00
Rory Powell 9b038ceb8a Ensure tmpDir/.budibase always exists 2022-10-26 09:24:28 +01: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
Rory Powell 5c80b2ca06 Startup fixes 2022-10-25 13:37:26 +01:00
Rory Powell 0b7ca49418 Fix build failure around PouchDB type 2022-10-25 09:02:55 +01:00
mike12345567 e31ce3f8a9 Some fixes based on PR comments. 2022-10-24 12:06:50 +01:00
mike12345567 6edffb0d5e Addressing majority of PR comments. 2022-10-24 10:04:14 +01:00
mike12345567 1e190886fb Fixing issue discovered by tests. 2022-10-21 16:02:13 +01:00