From fa30769ddb351d09a47166ac2ba9754eb4215dff Mon Sep 17 00:00:00 2001 From: Martin McKeaveney Date: Tue, 28 Mar 2023 14:58:22 +0100 Subject: [PATCH 1/7] fix auto columns in sample data --- packages/server/src/api/controllers/table/utils.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/server/src/api/controllers/table/utils.ts b/packages/server/src/api/controllers/table/utils.ts index 7c5c81939a..755fef1f37 100644 --- a/packages/server/src/api/controllers/table/utils.ts +++ b/packages/server/src/api/controllers/table/utils.ts @@ -109,6 +109,7 @@ export function importToRows(data: any, table: any, user: any = {}) { noAutoRelationships: true, }) row = processed.row + table = processed.table let fieldName: any let schema: any From 0a6c6a9d1b792d3cc14877fe55b43e47c96279ef Mon Sep 17 00:00:00 2001 From: Budibase Release Bot <> Date: Wed, 29 Mar 2023 11:43:04 +0000 Subject: [PATCH 2/7] Update pro version to 2.4.41 --- packages/server/package.json | 2 +- packages/server/yarn.lock | 30 +++++++++++++++--------------- packages/worker/package.json | 2 +- packages/worker/yarn.lock | 30 +++++++++++++++--------------- 4 files changed, 32 insertions(+), 32 deletions(-) diff --git a/packages/server/package.json b/packages/server/package.json index d671b5c02a..00615f385c 100644 --- a/packages/server/package.json +++ b/packages/server/package.json @@ -45,7 +45,7 @@ "@apidevtools/swagger-parser": "10.0.3", "@budibase/backend-core": "^2.4.41", "@budibase/client": "^2.4.41", - "@budibase/pro": "2.4.40", + "@budibase/pro": "2.4.41", "@budibase/shared-core": "^2.4.41", "@budibase/string-templates": "^2.4.41", "@budibase/types": "^2.4.41", diff --git a/packages/server/yarn.lock b/packages/server/yarn.lock index c803d67672..af04a8bc06 100644 --- a/packages/server/yarn.lock +++ b/packages/server/yarn.lock @@ -1278,14 +1278,14 @@ resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39" integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw== -"@budibase/backend-core@2.4.40": - version "2.4.40" - resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-2.4.40.tgz#770158f360bcb30251aa2e50b0df40052e8ae3ce" - integrity sha512-ISN5100YjUwaJV5FJGr/4jccbottPhcp9CVBVxw90r0qKtlLVkG3zMRKJ9brSo3qx0Q8H3f1n7MrII3xoRyk3A== +"@budibase/backend-core@2.4.41": + version "2.4.41" + resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-2.4.41.tgz#2c99d9382f92ca3d5b884ea01c67f615c37c4837" + integrity sha512-ffVc0O5+CPACLAzN7pLvzCuccbGrhdUnbC7N4zxjQOPpczhmzUFCDOy/UAN0go2/oKMHs2SzCwiMunf3Y+cBFA== dependencies: "@budibase/nano" "10.1.2" "@budibase/pouchdb-replication-stream" "1.2.10" - "@budibase/types" "^2.4.40" + "@budibase/types" "^2.4.41" "@shopify/jest-koa-mocks" "5.0.1" "@techpass/passport-openidconnect" "0.3.2" aws-cloudfront-sign "2.2.0" @@ -1417,14 +1417,14 @@ pouchdb-promise "^6.0.4" through2 "^2.0.0" -"@budibase/pro@2.4.40": - version "2.4.40" - resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-2.4.40.tgz#2c1812fe35344ce8edf1401f2d8e4f289066c841" - integrity sha512-6ZXEv2J/AdaOAa2i/2XVDdCbgn2V//MN9LHx1/tr6ixcP/nCnBXjnBXrYqLrXsHcB6IiFXJwjOtirSrn3eXyuA== +"@budibase/pro@2.4.41": + version "2.4.41" + resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-2.4.41.tgz#4b4d395f38a8a2a86a3275a43f9270b7edfd5788" + integrity sha512-DBebpbYUsTchDvitdnTXuQGYjhUyZl7pPFKokvvlgI8Pu0YK4eXtbiMMbd2BVH7wwuJL5o3tUN+pii4IqmXofw== dependencies: - "@budibase/backend-core" "2.4.40" + "@budibase/backend-core" "2.4.41" "@budibase/string-templates" "2.3.20" - "@budibase/types" "2.4.40" + "@budibase/types" "2.4.41" "@koa/router" "8.0.8" bull "4.10.1" joi "17.6.0" @@ -1463,10 +1463,10 @@ lodash "^4.17.20" vm2 "^3.9.4" -"@budibase/types@2.4.40", "@budibase/types@^2.4.40": - version "2.4.40" - resolved "https://registry.yarnpkg.com/@budibase/types/-/types-2.4.40.tgz#12d02240e6d31f47a91eb93c971f0f835da6f950" - integrity sha512-3rk626nhpeH88l4WzU7bjG4fo8SDELSEuko7Jb+DmZdEGxrP+5NVCyNTswndXa7oSuvmg/Wg17W/aatCBNCkxA== +"@budibase/types@2.4.41", "@budibase/types@^2.4.41": + version "2.4.41" + resolved "https://registry.yarnpkg.com/@budibase/types/-/types-2.4.41.tgz#582328dd0037b4b0ad30d39e6524eac256e7320a" + integrity sha512-N3Jp46UH2wZ66iOUcSID1Nh8f+hVApytn7vgTT2mOiRwyXzWSxJQFjv9TUh8A8lLV6Qe/rLQVcp/GIQyyIFtDw== "@bull-board/api@3.7.0": version "3.7.0" diff --git a/packages/worker/package.json b/packages/worker/package.json index 7759015679..cbb93c8170 100644 --- a/packages/worker/package.json +++ b/packages/worker/package.json @@ -37,7 +37,7 @@ "license": "GPL-3.0", "dependencies": { "@budibase/backend-core": "^2.4.41", - "@budibase/pro": "2.4.40", + "@budibase/pro": "2.4.41", "@budibase/string-templates": "^2.4.41", "@budibase/types": "^2.4.41", "@koa/router": "8.0.8", diff --git a/packages/worker/yarn.lock b/packages/worker/yarn.lock index 3e46a1117b..bb51443833 100644 --- a/packages/worker/yarn.lock +++ b/packages/worker/yarn.lock @@ -475,14 +475,14 @@ resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39" integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw== -"@budibase/backend-core@2.4.40": - version "2.4.40" - resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-2.4.40.tgz#770158f360bcb30251aa2e50b0df40052e8ae3ce" - integrity sha512-ISN5100YjUwaJV5FJGr/4jccbottPhcp9CVBVxw90r0qKtlLVkG3zMRKJ9brSo3qx0Q8H3f1n7MrII3xoRyk3A== +"@budibase/backend-core@2.4.41": + version "2.4.41" + resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-2.4.41.tgz#2c99d9382f92ca3d5b884ea01c67f615c37c4837" + integrity sha512-ffVc0O5+CPACLAzN7pLvzCuccbGrhdUnbC7N4zxjQOPpczhmzUFCDOy/UAN0go2/oKMHs2SzCwiMunf3Y+cBFA== dependencies: "@budibase/nano" "10.1.2" "@budibase/pouchdb-replication-stream" "1.2.10" - "@budibase/types" "^2.4.40" + "@budibase/types" "^2.4.41" "@shopify/jest-koa-mocks" "5.0.1" "@techpass/passport-openidconnect" "0.3.2" aws-cloudfront-sign "2.2.0" @@ -564,14 +564,14 @@ pouchdb-promise "^6.0.4" through2 "^2.0.0" -"@budibase/pro@2.4.40": - version "2.4.40" - resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-2.4.40.tgz#2c1812fe35344ce8edf1401f2d8e4f289066c841" - integrity sha512-6ZXEv2J/AdaOAa2i/2XVDdCbgn2V//MN9LHx1/tr6ixcP/nCnBXjnBXrYqLrXsHcB6IiFXJwjOtirSrn3eXyuA== +"@budibase/pro@2.4.41": + version "2.4.41" + resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-2.4.41.tgz#4b4d395f38a8a2a86a3275a43f9270b7edfd5788" + integrity sha512-DBebpbYUsTchDvitdnTXuQGYjhUyZl7pPFKokvvlgI8Pu0YK4eXtbiMMbd2BVH7wwuJL5o3tUN+pii4IqmXofw== dependencies: - "@budibase/backend-core" "2.4.40" + "@budibase/backend-core" "2.4.41" "@budibase/string-templates" "2.3.20" - "@budibase/types" "2.4.40" + "@budibase/types" "2.4.41" "@koa/router" "8.0.8" bull "4.10.1" joi "17.6.0" @@ -592,10 +592,10 @@ lodash "^4.17.20" vm2 "^3.9.4" -"@budibase/types@2.4.40", "@budibase/types@^2.4.40": - version "2.4.40" - resolved "https://registry.yarnpkg.com/@budibase/types/-/types-2.4.40.tgz#12d02240e6d31f47a91eb93c971f0f835da6f950" - integrity sha512-3rk626nhpeH88l4WzU7bjG4fo8SDELSEuko7Jb+DmZdEGxrP+5NVCyNTswndXa7oSuvmg/Wg17W/aatCBNCkxA== +"@budibase/types@2.4.41", "@budibase/types@^2.4.41": + version "2.4.41" + resolved "https://registry.yarnpkg.com/@budibase/types/-/types-2.4.41.tgz#582328dd0037b4b0ad30d39e6524eac256e7320a" + integrity sha512-N3Jp46UH2wZ66iOUcSID1Nh8f+hVApytn7vgTT2mOiRwyXzWSxJQFjv9TUh8A8lLV6Qe/rLQVcp/GIQyyIFtDw== "@cspotcode/source-map-support@^0.8.0": version "0.8.1" From 01c9908696a570745d61c8ef7885d80e144eded2 Mon Sep 17 00:00:00 2001 From: Budibase Release Bot <> Date: Thu, 30 Mar 2023 11:37:03 +0000 Subject: [PATCH 3/7] v2.4.42 --- lerna.json | 2 +- packages/backend-core/package.json | 4 ++-- packages/bbui/package.json | 6 +++--- packages/builder/package.json | 12 ++++++------ packages/cli/package.json | 8 ++++---- packages/client/package.json | 12 ++++++------ packages/frontend-core/package.json | 6 +++--- packages/sdk/package.json | 2 +- packages/server/package.json | 12 ++++++------ packages/shared-core/package.json | 4 ++-- packages/string-templates/package.json | 2 +- packages/types/package.json | 2 +- packages/worker/package.json | 8 ++++---- 13 files changed, 40 insertions(+), 40 deletions(-) diff --git a/lerna.json b/lerna.json index 2ef1df9a1f..9c9246f71a 100644 --- a/lerna.json +++ b/lerna.json @@ -1,5 +1,5 @@ { - "version": "2.4.41", + "version": "2.4.42", "npmClient": "yarn", "packages": [ "packages/*" diff --git a/packages/backend-core/package.json b/packages/backend-core/package.json index 5a1fa4c83c..2503c56dbb 100644 --- a/packages/backend-core/package.json +++ b/packages/backend-core/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/backend-core", - "version": "2.4.41", + "version": "2.4.42", "description": "Budibase backend core libraries used in server and worker", "main": "dist/src/index.js", "types": "dist/src/index.d.ts", @@ -24,7 +24,7 @@ "dependencies": { "@budibase/nano": "10.1.2", "@budibase/pouchdb-replication-stream": "1.2.10", - "@budibase/types": "^2.4.41", + "@budibase/types": "^2.4.42", "@shopify/jest-koa-mocks": "5.0.1", "@techpass/passport-openidconnect": "0.3.2", "aws-cloudfront-sign": "2.2.0", diff --git a/packages/bbui/package.json b/packages/bbui/package.json index 71ab358bbf..33f801ac98 100644 --- a/packages/bbui/package.json +++ b/packages/bbui/package.json @@ -1,7 +1,7 @@ { "name": "@budibase/bbui", "description": "A UI solution used in the different Budibase projects.", - "version": "2.4.41", + "version": "2.4.42", "license": "MPL-2.0", "svelte": "src/index.js", "module": "dist/bbui.es.js", @@ -38,8 +38,8 @@ ], "dependencies": { "@adobe/spectrum-css-workflow-icons": "1.2.1", - "@budibase/shared-core": "^2.4.41", - "@budibase/string-templates": "^2.4.41", + "@budibase/shared-core": "^2.4.42", + "@budibase/string-templates": "^2.4.42", "@spectrum-css/accordion": "3.0.24", "@spectrum-css/actionbutton": "1.0.1", "@spectrum-css/actiongroup": "1.0.1", diff --git a/packages/builder/package.json b/packages/builder/package.json index 74420ec679..1e98a23416 100644 --- a/packages/builder/package.json +++ b/packages/builder/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/builder", - "version": "2.4.41", + "version": "2.4.42", "license": "GPL-3.0", "private": true, "scripts": { @@ -58,11 +58,11 @@ } }, "dependencies": { - "@budibase/bbui": "^2.4.41", - "@budibase/client": "^2.4.41", - "@budibase/frontend-core": "^2.4.41", - "@budibase/shared-core": "^2.4.41", - "@budibase/string-templates": "^2.4.41", + "@budibase/bbui": "^2.4.42", + "@budibase/client": "^2.4.42", + "@budibase/frontend-core": "^2.4.42", + "@budibase/shared-core": "^2.4.42", + "@budibase/string-templates": "^2.4.42", "@fortawesome/fontawesome-svg-core": "^6.2.1", "@fortawesome/free-brands-svg-icons": "^6.2.1", "@fortawesome/free-solid-svg-icons": "^6.2.1", diff --git a/packages/cli/package.json b/packages/cli/package.json index 0bdccdcf89..15266bc063 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/cli", - "version": "2.4.41", + "version": "2.4.42", "description": "Budibase CLI, for developers, self hosting and migrations.", "main": "dist/index.js", "bin": { @@ -29,9 +29,9 @@ "outputPath": "build" }, "dependencies": { - "@budibase/backend-core": "^2.4.41", - "@budibase/string-templates": "^2.4.41", - "@budibase/types": "^2.4.41", + "@budibase/backend-core": "^2.4.42", + "@budibase/string-templates": "^2.4.42", + "@budibase/types": "^2.4.42", "axios": "0.21.2", "chalk": "4.1.0", "cli-progress": "3.11.2", diff --git a/packages/client/package.json b/packages/client/package.json index a3b82b0931..21e1066b05 100644 --- a/packages/client/package.json +++ b/packages/client/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/client", - "version": "2.4.41", + "version": "2.4.42", "license": "MPL-2.0", "module": "dist/budibase-client.js", "main": "dist/budibase-client.js", @@ -19,11 +19,11 @@ "dev:builder": "rollup -cw" }, "dependencies": { - "@budibase/bbui": "^2.4.41", - "@budibase/frontend-core": "^2.4.41", - "@budibase/shared-core": "^2.4.41", - "@budibase/string-templates": "^2.4.41", - "@budibase/types": "^2.4.41", + "@budibase/bbui": "^2.4.42", + "@budibase/frontend-core": "^2.4.42", + "@budibase/shared-core": "^2.4.42", + "@budibase/string-templates": "^2.4.42", + "@budibase/types": "^2.4.42", "@spectrum-css/button": "^3.0.3", "@spectrum-css/card": "^3.0.3", "@spectrum-css/divider": "^1.0.3", diff --git a/packages/frontend-core/package.json b/packages/frontend-core/package.json index e4ce0bbd0c..324e33060d 100644 --- a/packages/frontend-core/package.json +++ b/packages/frontend-core/package.json @@ -1,13 +1,13 @@ { "name": "@budibase/frontend-core", - "version": "2.4.41", + "version": "2.4.42", "description": "Budibase frontend core libraries used in builder and client", "author": "Budibase", "license": "MPL-2.0", "svelte": "src/index.js", "dependencies": { - "@budibase/bbui": "^2.4.41", - "@budibase/shared-core": "^2.4.41", + "@budibase/bbui": "^2.4.42", + "@budibase/shared-core": "^2.4.42", "lodash": "^4.17.21", "svelte": "^3.46.2" } diff --git a/packages/sdk/package.json b/packages/sdk/package.json index 64be4c725c..8b3f3b4239 100644 --- a/packages/sdk/package.json +++ b/packages/sdk/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/sdk", - "version": "2.4.41", + "version": "2.4.42", "description": "Budibase Public API SDK", "author": "Budibase", "license": "MPL-2.0", diff --git a/packages/server/package.json b/packages/server/package.json index 00615f385c..f07d863547 100644 --- a/packages/server/package.json +++ b/packages/server/package.json @@ -1,7 +1,7 @@ { "name": "@budibase/server", "email": "hi@budibase.com", - "version": "2.4.41", + "version": "2.4.42", "description": "Budibase Web Server", "main": "src/index.ts", "repository": { @@ -43,12 +43,12 @@ "license": "GPL-3.0", "dependencies": { "@apidevtools/swagger-parser": "10.0.3", - "@budibase/backend-core": "^2.4.41", - "@budibase/client": "^2.4.41", + "@budibase/backend-core": "^2.4.42", + "@budibase/client": "^2.4.42", "@budibase/pro": "2.4.41", - "@budibase/shared-core": "^2.4.41", - "@budibase/string-templates": "^2.4.41", - "@budibase/types": "^2.4.41", + "@budibase/shared-core": "^2.4.42", + "@budibase/string-templates": "^2.4.42", + "@budibase/types": "^2.4.42", "@bull-board/api": "3.7.0", "@bull-board/koa": "3.9.4", "@elastic/elasticsearch": "7.10.0", diff --git a/packages/shared-core/package.json b/packages/shared-core/package.json index 56ffacfa2f..ceb66da7fe 100644 --- a/packages/shared-core/package.json +++ b/packages/shared-core/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/shared-core", - "version": "2.4.41", + "version": "2.4.42", "description": "Shared data utils", "main": "dist/cjs/src/index.js", "types": "dist/mjs/src/index.d.ts", @@ -20,7 +20,7 @@ "dev:builder": "yarn prebuild && concurrently \"tsc -p tsconfig.build.json --watch\" \"tsc -p tsconfig-cjs.build.json --watch\"" }, "dependencies": { - "@budibase/types": "^2.4.41" + "@budibase/types": "^2.4.42" }, "devDependencies": { "concurrently": "^7.6.0", diff --git a/packages/string-templates/package.json b/packages/string-templates/package.json index 06a52e8be6..c2cc46de09 100644 --- a/packages/string-templates/package.json +++ b/packages/string-templates/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/string-templates", - "version": "2.4.41", + "version": "2.4.42", "description": "Handlebars wrapper for Budibase templating.", "main": "src/index.cjs", "module": "dist/bundle.mjs", diff --git a/packages/types/package.json b/packages/types/package.json index bba3281944..3fcf7aac7e 100644 --- a/packages/types/package.json +++ b/packages/types/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/types", - "version": "2.4.41", + "version": "2.4.42", "description": "Budibase types", "main": "dist/cjs/index.js", "types": "dist/mjs/index.d.ts", diff --git a/packages/worker/package.json b/packages/worker/package.json index cbb93c8170..37fc6fb826 100644 --- a/packages/worker/package.json +++ b/packages/worker/package.json @@ -1,7 +1,7 @@ { "name": "@budibase/worker", "email": "hi@budibase.com", - "version": "2.4.41", + "version": "2.4.42", "description": "Budibase background service", "main": "src/index.ts", "repository": { @@ -36,10 +36,10 @@ "author": "Budibase", "license": "GPL-3.0", "dependencies": { - "@budibase/backend-core": "^2.4.41", + "@budibase/backend-core": "^2.4.42", "@budibase/pro": "2.4.41", - "@budibase/string-templates": "^2.4.41", - "@budibase/types": "^2.4.41", + "@budibase/string-templates": "^2.4.42", + "@budibase/types": "^2.4.42", "@koa/router": "8.0.8", "@sentry/node": "6.17.7", "@techpass/passport-openidconnect": "0.3.2", From de2aecb11e5fd6f26847831d84335ac1e817f7e6 Mon Sep 17 00:00:00 2001 From: Budibase Release Bot <> Date: Thu, 30 Mar 2023 11:40:28 +0000 Subject: [PATCH 4/7] Update pro version to 2.4.42 --- packages/server/package.json | 2 +- packages/server/yarn.lock | 30 +++++++++++++++--------------- packages/worker/package.json | 2 +- packages/worker/yarn.lock | 30 +++++++++++++++--------------- 4 files changed, 32 insertions(+), 32 deletions(-) diff --git a/packages/server/package.json b/packages/server/package.json index f07d863547..c68b0725a3 100644 --- a/packages/server/package.json +++ b/packages/server/package.json @@ -45,7 +45,7 @@ "@apidevtools/swagger-parser": "10.0.3", "@budibase/backend-core": "^2.4.42", "@budibase/client": "^2.4.42", - "@budibase/pro": "2.4.41", + "@budibase/pro": "2.4.42", "@budibase/shared-core": "^2.4.42", "@budibase/string-templates": "^2.4.42", "@budibase/types": "^2.4.42", diff --git a/packages/server/yarn.lock b/packages/server/yarn.lock index af04a8bc06..e450d26ae2 100644 --- a/packages/server/yarn.lock +++ b/packages/server/yarn.lock @@ -1278,14 +1278,14 @@ resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39" integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw== -"@budibase/backend-core@2.4.41": - version "2.4.41" - resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-2.4.41.tgz#2c99d9382f92ca3d5b884ea01c67f615c37c4837" - integrity sha512-ffVc0O5+CPACLAzN7pLvzCuccbGrhdUnbC7N4zxjQOPpczhmzUFCDOy/UAN0go2/oKMHs2SzCwiMunf3Y+cBFA== +"@budibase/backend-core@2.4.42": + version "2.4.42" + resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-2.4.42.tgz#28efa415b09363f47b8e3a0baf4b8f83e1a74a6c" + integrity sha512-snokFmHarDqNZm0BWCYeo1mZFuyYI4typAXk8HRX477xdS5g/3cM//aesV4UHceWw6V1cwczKZYqAd22VSfCfA== dependencies: "@budibase/nano" "10.1.2" "@budibase/pouchdb-replication-stream" "1.2.10" - "@budibase/types" "^2.4.41" + "@budibase/types" "^2.4.42" "@shopify/jest-koa-mocks" "5.0.1" "@techpass/passport-openidconnect" "0.3.2" aws-cloudfront-sign "2.2.0" @@ -1417,14 +1417,14 @@ pouchdb-promise "^6.0.4" through2 "^2.0.0" -"@budibase/pro@2.4.41": - version "2.4.41" - resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-2.4.41.tgz#4b4d395f38a8a2a86a3275a43f9270b7edfd5788" - integrity sha512-DBebpbYUsTchDvitdnTXuQGYjhUyZl7pPFKokvvlgI8Pu0YK4eXtbiMMbd2BVH7wwuJL5o3tUN+pii4IqmXofw== +"@budibase/pro@2.4.42": + version "2.4.42" + resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-2.4.42.tgz#c55b26e39f449f223532d922240261157b12b6e0" + integrity sha512-2FuDiv5xPMEVbQR1QiwGYkah+zeEU7qclP2JYLpwnFjmwxpUvldAVGQuG1q/LMZddFLIdwHd3tVnIEHHGK76TQ== dependencies: - "@budibase/backend-core" "2.4.41" + "@budibase/backend-core" "2.4.42" "@budibase/string-templates" "2.3.20" - "@budibase/types" "2.4.41" + "@budibase/types" "2.4.42" "@koa/router" "8.0.8" bull "4.10.1" joi "17.6.0" @@ -1463,10 +1463,10 @@ lodash "^4.17.20" vm2 "^3.9.4" -"@budibase/types@2.4.41", "@budibase/types@^2.4.41": - version "2.4.41" - resolved "https://registry.yarnpkg.com/@budibase/types/-/types-2.4.41.tgz#582328dd0037b4b0ad30d39e6524eac256e7320a" - integrity sha512-N3Jp46UH2wZ66iOUcSID1Nh8f+hVApytn7vgTT2mOiRwyXzWSxJQFjv9TUh8A8lLV6Qe/rLQVcp/GIQyyIFtDw== +"@budibase/types@2.4.42", "@budibase/types@^2.4.42": + version "2.4.42" + resolved "https://registry.yarnpkg.com/@budibase/types/-/types-2.4.42.tgz#04ac509acda1960179c526ba3af92a9331c951b6" + integrity sha512-Dxql/99o4AAkRkZDLrKeDK2ON2qiV0q/nYffdyJ8uCQiyFNKA9e1GyQlbsJORmqYCqkEGzTtcmW+zBtdvmtB3Q== "@bull-board/api@3.7.0": version "3.7.0" diff --git a/packages/worker/package.json b/packages/worker/package.json index 37fc6fb826..c929cb31a9 100644 --- a/packages/worker/package.json +++ b/packages/worker/package.json @@ -37,7 +37,7 @@ "license": "GPL-3.0", "dependencies": { "@budibase/backend-core": "^2.4.42", - "@budibase/pro": "2.4.41", + "@budibase/pro": "2.4.42", "@budibase/string-templates": "^2.4.42", "@budibase/types": "^2.4.42", "@koa/router": "8.0.8", diff --git a/packages/worker/yarn.lock b/packages/worker/yarn.lock index bb51443833..32f57398a0 100644 --- a/packages/worker/yarn.lock +++ b/packages/worker/yarn.lock @@ -475,14 +475,14 @@ resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39" integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw== -"@budibase/backend-core@2.4.41": - version "2.4.41" - resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-2.4.41.tgz#2c99d9382f92ca3d5b884ea01c67f615c37c4837" - integrity sha512-ffVc0O5+CPACLAzN7pLvzCuccbGrhdUnbC7N4zxjQOPpczhmzUFCDOy/UAN0go2/oKMHs2SzCwiMunf3Y+cBFA== +"@budibase/backend-core@2.4.42": + version "2.4.42" + resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-2.4.42.tgz#28efa415b09363f47b8e3a0baf4b8f83e1a74a6c" + integrity sha512-snokFmHarDqNZm0BWCYeo1mZFuyYI4typAXk8HRX477xdS5g/3cM//aesV4UHceWw6V1cwczKZYqAd22VSfCfA== dependencies: "@budibase/nano" "10.1.2" "@budibase/pouchdb-replication-stream" "1.2.10" - "@budibase/types" "^2.4.41" + "@budibase/types" "^2.4.42" "@shopify/jest-koa-mocks" "5.0.1" "@techpass/passport-openidconnect" "0.3.2" aws-cloudfront-sign "2.2.0" @@ -564,14 +564,14 @@ pouchdb-promise "^6.0.4" through2 "^2.0.0" -"@budibase/pro@2.4.41": - version "2.4.41" - resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-2.4.41.tgz#4b4d395f38a8a2a86a3275a43f9270b7edfd5788" - integrity sha512-DBebpbYUsTchDvitdnTXuQGYjhUyZl7pPFKokvvlgI8Pu0YK4eXtbiMMbd2BVH7wwuJL5o3tUN+pii4IqmXofw== +"@budibase/pro@2.4.42": + version "2.4.42" + resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-2.4.42.tgz#c55b26e39f449f223532d922240261157b12b6e0" + integrity sha512-2FuDiv5xPMEVbQR1QiwGYkah+zeEU7qclP2JYLpwnFjmwxpUvldAVGQuG1q/LMZddFLIdwHd3tVnIEHHGK76TQ== dependencies: - "@budibase/backend-core" "2.4.41" + "@budibase/backend-core" "2.4.42" "@budibase/string-templates" "2.3.20" - "@budibase/types" "2.4.41" + "@budibase/types" "2.4.42" "@koa/router" "8.0.8" bull "4.10.1" joi "17.6.0" @@ -592,10 +592,10 @@ lodash "^4.17.20" vm2 "^3.9.4" -"@budibase/types@2.4.41", "@budibase/types@^2.4.41": - version "2.4.41" - resolved "https://registry.yarnpkg.com/@budibase/types/-/types-2.4.41.tgz#582328dd0037b4b0ad30d39e6524eac256e7320a" - integrity sha512-N3Jp46UH2wZ66iOUcSID1Nh8f+hVApytn7vgTT2mOiRwyXzWSxJQFjv9TUh8A8lLV6Qe/rLQVcp/GIQyyIFtDw== +"@budibase/types@2.4.42", "@budibase/types@^2.4.42": + version "2.4.42" + resolved "https://registry.yarnpkg.com/@budibase/types/-/types-2.4.42.tgz#04ac509acda1960179c526ba3af92a9331c951b6" + integrity sha512-Dxql/99o4AAkRkZDLrKeDK2ON2qiV0q/nYffdyJ8uCQiyFNKA9e1GyQlbsJORmqYCqkEGzTtcmW+zBtdvmtB3Q== "@cspotcode/source-map-support@^0.8.0": version "0.8.1" From 79bec7d86d3945771d787975c3d10226d6afb53a Mon Sep 17 00:00:00 2001 From: Rory Powell Date: Fri, 31 Mar 2023 10:32:13 +0100 Subject: [PATCH 5/7] Add force exit, -e flag and streaming to tests (#10151) * Add force exit, -e flag and streaming to tests * Temp remove script usage from worker tests * Revert "Temp remove script usage from worker tests" This reverts commit 5e0ed2e92d01bbc6d1434f1b7daa88a15f9dba3b. * Always fail test * Ignore server test package from coverage report * Unscope server only * Run all server tests again * Update backend core test script to fail when any command fails and force exit * Don't try to require client in test * Port memory limit fix from develop * Remove always failing test and commented out block for client require * Fixing some issues with test cases. * Revert assertions in internalSearch.spec.js --------- Co-authored-by: mike12345567 --- package.json | 2 +- packages/backend-core/scripts/test.sh | 9 +- packages/backend-core/tests/jestEnv.ts | 1 + packages/server/__mocks__/node-fetch.ts | 7 +- packages/server/jest.config.ts | 1 + packages/server/scripts/test.sh | 10 +- .../server/src/api/controllers/row/utils.ts | 7 +- .../src/api/routes/tests/appSync.spec.ts | 31 ++++++ .../api/routes/tests/internalSearch.spec.js | 3 +- .../src/integration-test/postgres.spec.ts | 104 +++++++++--------- .../integrations/tests/googlesheets.spec.ts | 22 ++-- packages/server/src/tests/jestEnv.ts | 1 + .../src/tests/utilities/TestConfiguration.ts | 11 ++ .../src/utilities/fileSystem/filesystem.ts | 4 - packages/shared-core/yarn.lock | 5 - packages/worker/scripts/test.sh | 9 +- packages/worker/src/tests/jestEnv.ts | 1 + 17 files changed, 133 insertions(+), 95 deletions(-) create mode 100644 packages/server/src/api/routes/tests/appSync.spec.ts diff --git a/package.json b/package.json index 815e470916..1ae713f96c 100644 --- a/package.json +++ b/package.json @@ -44,7 +44,7 @@ "dev": "yarn run kill-all && lerna link && lerna run --parallel dev:builder --concurrency 1", "dev:noserver": "yarn run kill-builder && lerna link && lerna run dev:stack:up && lerna run --parallel dev:builder --concurrency 1 --ignore @budibase/backend-core --ignore @budibase/server --ignore @budibase/worker", "dev:server": "yarn run kill-server && lerna run --parallel dev:builder --concurrency 1 --scope @budibase/backend-core --scope @budibase/worker --scope @budibase/server", - "test": "lerna run test", + "test": "lerna run test --stream", "test:pro": "bash scripts/pro/test.sh", "lint:eslint": "eslint packages && eslint qa-core", "lint:prettier": "prettier --check \"packages/**/*.{js,ts,svelte}\" && prettier --write \"examples/**/*.{js,ts,svelte}\" && prettier --check \"qa-core/**/*.{js,ts,svelte}\"", diff --git a/packages/backend-core/scripts/test.sh b/packages/backend-core/scripts/test.sh index 4bf1900984..3d8240e65a 100644 --- a/packages/backend-core/scripts/test.sh +++ b/packages/backend-core/scripts/test.sh @@ -1,12 +1,13 @@ #!/bin/bash +set -e if [[ -n $CI ]] then # --runInBand performs better in ci where resources are limited - echo "jest --coverage --runInBand" - jest --coverage --runInBand + echo "jest --coverage --runInBand --forceExit" + jest --coverage --runInBand --forceExit else # --maxWorkers performs better in development - echo "jest --coverage" - jest --coverage + echo "jest --coverage --forceExit" + jest --coverage --forceExit fi \ No newline at end of file diff --git a/packages/backend-core/tests/jestEnv.ts b/packages/backend-core/tests/jestEnv.ts index ec8de2942e..3555973928 100644 --- a/packages/backend-core/tests/jestEnv.ts +++ b/packages/backend-core/tests/jestEnv.ts @@ -4,3 +4,4 @@ process.env.NODE_ENV = "jest" process.env.MOCK_REDIS = "1" process.env.LOG_LEVEL = process.env.LOG_LEVEL || "error" process.env.ENABLE_4XX_HTTP_LOGGING = "0" +process.env.REDIS_PASSWORD = "budibase" diff --git a/packages/server/__mocks__/node-fetch.ts b/packages/server/__mocks__/node-fetch.ts index fdf44d173d..acf0294e76 100644 --- a/packages/server/__mocks__/node-fetch.ts +++ b/packages/server/__mocks__/node-fetch.ts @@ -4,6 +4,7 @@ module FetchMock { // @ts-ignore const fetch = jest.requireActual("node-fetch") let failCount = 0 + let mockSearch = false const func = async (url: any, opts: any) => { function json(body: any, status = 200) { @@ -69,7 +70,7 @@ module FetchMock { }, 404 ) - } else if (url.includes("_search")) { + } else if (mockSearch && url.includes("_search")) { const body = opts.body const parts = body.split("tableId:") let tableId @@ -192,5 +193,9 @@ module FetchMock { func.Headers = fetch.Headers + func.mockSearch = () => { + mockSearch = true + } + module.exports = func } diff --git a/packages/server/jest.config.ts b/packages/server/jest.config.ts index 03eca3705b..7df9190af8 100644 --- a/packages/server/jest.config.ts +++ b/packages/server/jest.config.ts @@ -43,6 +43,7 @@ const config: Config.InitialOptions = { "../backend-core/src/**/*.{js,ts}", // The use of coverage with couchdb view functions breaks tests "!src/db/views/staticViews.*", + "!src/tests/**/*.{js,ts}", ], coverageReporters: ["lcov", "json", "clover"], } diff --git a/packages/server/scripts/test.sh b/packages/server/scripts/test.sh index 2f3f54cb25..f3f679c4da 100644 --- a/packages/server/scripts/test.sh +++ b/packages/server/scripts/test.sh @@ -1,12 +1,14 @@ #!/bin/bash +set -e if [[ -n $CI ]] then # --runInBand performs better in ci where resources are limited - echo "jest --coverage --runInBand" - jest --coverage --runInBand + export NODE_OPTIONS="--max-old-space-size=4096" + echo "jest --coverage --runInBand --forceExit" + jest --coverage --runInBand --forceExit else # --maxWorkers performs better in development - echo "jest --coverage --maxWorkers=2" - jest --coverage --maxWorkers=2 + echo "jest --coverage --maxWorkers=2 --forceExit" + jest --coverage --maxWorkers=2 --forceExit fi \ No newline at end of file diff --git a/packages/server/src/api/controllers/row/utils.ts b/packages/server/src/api/controllers/row/utils.ts index 2e8f2f4536..2cf3b5472f 100644 --- a/packages/server/src/api/controllers/row/utils.ts +++ b/packages/server/src/api/controllers/row/utils.ts @@ -62,10 +62,11 @@ export async function validate({ } const errors: any = {} for (let fieldName of Object.keys(fetchedTable.schema)) { - const constraints = cloneDeep(fetchedTable.schema[fieldName].constraints) - const type = fetchedTable.schema[fieldName].type + const column = fetchedTable.schema[fieldName] + const constraints = cloneDeep(column.constraints) + const type = column.type // formulas shouldn't validated, data will be deleted anyway - if (type === FieldTypes.FORMULA) { + if (type === FieldTypes.FORMULA || column.autocolumn) { continue } // special case for options, need to always allow unselected (null) diff --git a/packages/server/src/api/routes/tests/appSync.spec.ts b/packages/server/src/api/routes/tests/appSync.spec.ts new file mode 100644 index 0000000000..f82f62405e --- /dev/null +++ b/packages/server/src/api/routes/tests/appSync.spec.ts @@ -0,0 +1,31 @@ +import * as setup from "./utilities" +import { roles, db as dbCore } from "@budibase/backend-core" + +describe("/api/applications/:appId/sync", () => { + let request = setup.getRequest() + let config = setup.getConfig() + let app + + afterAll(setup.afterAll) + + beforeAll(async () => { + app = await config.init() + // create some users which we will use throughout the tests + await config.createUser({ + email: "sync1@test.com", + roles: { + [app._id!]: roles.BUILTIN_ROLE_IDS.BASIC, + }, + }) + }) + + async function getUserMetadata() { + const { rows } = await config.searchRows(dbCore.InternalTable.USER_METADATA) + return rows + } + + it("make sure its empty initially", async () => { + const rows = await getUserMetadata() + expect(rows.length).toBe(1) + }) +}) diff --git a/packages/server/src/api/routes/tests/internalSearch.spec.js b/packages/server/src/api/routes/tests/internalSearch.spec.js index 8b821ce741..daef03c451 100644 --- a/packages/server/src/api/routes/tests/internalSearch.spec.js +++ b/packages/server/src/api/routes/tests/internalSearch.spec.js @@ -1,6 +1,7 @@ +const fetch = require("node-fetch") +fetch.mockSearch() const search = require("../../controllers/row/internalSearch") // this will be mocked out for _search endpoint -const fetch = require("node-fetch") const PARAMS = { tableId: "ta_12345679abcdef", version: "1", diff --git a/packages/server/src/integration-test/postgres.spec.ts b/packages/server/src/integration-test/postgres.spec.ts index 2afff8b786..fab1fcf618 100644 --- a/packages/server/src/integration-test/postgres.spec.ts +++ b/packages/server/src/integration-test/postgres.spec.ts @@ -1,3 +1,6 @@ +import fetch from "node-fetch" +// @ts-ignore +fetch.mockSearch() import { generateMakeRequest, MakeRequestResponse, @@ -16,6 +19,7 @@ import _ from "lodash" import { generator } from "@budibase/backend-core/tests" import { utils } from "@budibase/backend-core" import { GenericContainer } from "testcontainers" +import { generateRowIdField } from "../integrations/utils" const config = setup.getConfig()! @@ -80,16 +84,10 @@ describe("row api - postgres", () => { name: "id", type: FieldType.AUTO, autocolumn: true, - constraints: { - presence: true, - }, }, title: { name: "title", type: FieldType.STRING, - constraints: { - presence: true, - }, }, }, sourceId: postgresDatasource._id, @@ -121,16 +119,10 @@ describe("row api - postgres", () => { name: "id", type: FieldType.AUTO, autocolumn: true, - constraints: { - presence: true, - }, }, name: { name: "name", type: FieldType.STRING, - constraints: { - presence: true, - }, }, description: { name: "description", @@ -144,7 +136,6 @@ describe("row api - postgres", () => { type: FieldType.LINK, constraints: { type: "array", - presence: false, }, fieldName: oneToManyRelationshipInfo.fieldName, name: "oneToManyRelation", @@ -156,7 +147,6 @@ describe("row api - postgres", () => { type: FieldType.LINK, constraints: { type: "array", - presence: false, }, fieldName: manyToOneRelationshipInfo.fieldName, name: "manyToOneRelation", @@ -168,7 +158,6 @@ describe("row api - postgres", () => { type: FieldType.LINK, constraints: { type: "array", - presence: false, }, fieldName: manyToManyRelationshipInfo.fieldName, name: "manyToManyRelation", @@ -309,9 +298,6 @@ describe("row api - postgres", () => { id: { name: "id", type: FieldType.AUTO, - constraints: { - presence: true, - }, }, }, sourceId: postgresDatasource._id, @@ -921,47 +907,55 @@ describe("row api - postgres", () => { foreignRows, x => x.relationshipType ) - expect(res.body).toEqual({ - ...rowData, - [`fk_${oneToManyRelationshipInfo.table.name}_${oneToManyRelationshipInfo.fieldName}`]: - foreignRowsByType[RelationshipTypes.ONE_TO_MANY][0].row.id, - [oneToManyRelationshipInfo.fieldName]: [ + const m2mFieldName = manyToManyRelationshipInfo.fieldName, + o2mFieldName = oneToManyRelationshipInfo.fieldName, + m2oFieldName = manyToOneRelationshipInfo.fieldName + const m2mRow1 = res.body[m2mFieldName].find( + (row: Row) => row.id === 1 + ) + const m2mRow2 = res.body[m2mFieldName].find( + (row: Row) => row.id === 2 + ) + expect(m2mRow1).toEqual({ + ...foreignRowsByType[RelationshipTypes.MANY_TO_MANY][0].row, + [m2mFieldName]: [ { - ...foreignRowsByType[RelationshipTypes.ONE_TO_MANY][0].row, - _id: expect.any(String), - _rev: expect.any(String), + _id: row._id, }, ], - [manyToOneRelationshipInfo.fieldName]: [ - { - ...foreignRowsByType[RelationshipTypes.MANY_TO_ONE][0].row, - [`fk_${manyToOneRelationshipInfo.table.name}_${manyToOneRelationshipInfo.fieldName}`]: - row.id, - }, - { - ...foreignRowsByType[RelationshipTypes.MANY_TO_ONE][1].row, - [`fk_${manyToOneRelationshipInfo.table.name}_${manyToOneRelationshipInfo.fieldName}`]: - row.id, - }, - { - ...foreignRowsByType[RelationshipTypes.MANY_TO_ONE][2].row, - [`fk_${manyToOneRelationshipInfo.table.name}_${manyToOneRelationshipInfo.fieldName}`]: - row.id, - }, - ], - [manyToManyRelationshipInfo.fieldName]: [ - { - ...foreignRowsByType[RelationshipTypes.MANY_TO_MANY][0].row, - }, - { - ...foreignRowsByType[RelationshipTypes.MANY_TO_MANY][1].row, - }, - ], - id: row.id, - tableId: row.tableId, - _id: expect.any(String), - _rev: expect.any(String), }) + expect(m2mRow2).toEqual({ + ...foreignRowsByType[RelationshipTypes.MANY_TO_MANY][1].row, + [m2mFieldName]: [ + { + _id: row._id, + }, + ], + }) + expect(res.body[m2oFieldName]).toEqual([ + { + ...foreignRowsByType[RelationshipTypes.MANY_TO_ONE][0].row, + [`fk_${manyToOneRelationshipInfo.table.name}_${manyToOneRelationshipInfo.fieldName}`]: + row.id, + }, + { + ...foreignRowsByType[RelationshipTypes.MANY_TO_ONE][1].row, + [`fk_${manyToOneRelationshipInfo.table.name}_${manyToOneRelationshipInfo.fieldName}`]: + row.id, + }, + { + ...foreignRowsByType[RelationshipTypes.MANY_TO_ONE][2].row, + [`fk_${manyToOneRelationshipInfo.table.name}_${manyToOneRelationshipInfo.fieldName}`]: + row.id, + }, + ]) + expect(res.body[o2mFieldName]).toEqual([ + { + ...foreignRowsByType[RelationshipTypes.ONE_TO_MANY][0].row, + _id: expect.any(String), + _rev: expect.any(String), + }, + ]) }) }) }) diff --git a/packages/server/src/integrations/tests/googlesheets.spec.ts b/packages/server/src/integrations/tests/googlesheets.spec.ts index 5d7c184abd..eb263bd850 100644 --- a/packages/server/src/integrations/tests/googlesheets.spec.ts +++ b/packages/server/src/integrations/tests/googlesheets.spec.ts @@ -99,8 +99,8 @@ describe("Google Sheets Integration", () => { }) }) - test("removing an existing field will not remove the data from the spreadsheet", async () => { - await config.doInContext(structures.uuid(), async () => { + test("removing an existing field will remove the header from the google sheet", async () => { + const sheet = await config.doInContext(structures.uuid(), async () => { const tableColumns = ["name"] const table = createBasicTable(structures.uuid(), tableColumns) @@ -109,18 +109,14 @@ describe("Google Sheets Integration", () => { }) sheetsByTitle[table.name] = sheet await integration.updateTable(table) - - expect(sheet.loadHeaderRow).toBeCalledTimes(1) - expect(sheet.setHeaderRow).toBeCalledTimes(1) - expect(sheet.setHeaderRow).toBeCalledWith([ - "name", - "description", - "location", - ]) - - // No undefineds are sent - expect((sheet.setHeaderRow as any).mock.calls[0][0]).toHaveLength(3) + return sheet }) + expect(sheet.loadHeaderRow).toBeCalledTimes(1) + expect(sheet.setHeaderRow).toBeCalledTimes(1) + expect(sheet.setHeaderRow).toBeCalledWith(["name"]) + + // No undefined are sent + expect((sheet.setHeaderRow as any).mock.calls[0][0]).toHaveLength(1) }) }) }) diff --git a/packages/server/src/tests/jestEnv.ts b/packages/server/src/tests/jestEnv.ts index 7727bb6007..1f76bccd5f 100644 --- a/packages/server/src/tests/jestEnv.ts +++ b/packages/server/src/tests/jestEnv.ts @@ -9,3 +9,4 @@ process.env.LOG_LEVEL = process.env.LOG_LEVEL || "error" process.env.ENABLE_4XX_HTTP_LOGGING = "0" process.env.MOCK_REDIS = "1" process.env.PLATFORM_URL = "http://localhost:10000" +process.env.REDIS_PASSWORD = "budibase" diff --git a/packages/server/src/tests/utilities/TestConfiguration.ts b/packages/server/src/tests/utilities/TestConfiguration.ts index cf0585efd1..80f804d219 100644 --- a/packages/server/src/tests/utilities/TestConfiguration.ts +++ b/packages/server/src/tests/utilities/TestConfiguration.ts @@ -46,6 +46,7 @@ import { Row, SourceName, Table, + SearchFilters, } from "@budibase/types" type DefaultUserValues = { @@ -568,6 +569,16 @@ class TestConfiguration { return this._req(null, { tableId }, controllers.row.fetch) } + async searchRows(tableId: string, searchParams: SearchFilters = {}) { + if (!tableId && this.table) { + tableId = this.table._id + } + const body = { + query: searchParams, + } + return this._req(body, { tableId }, controllers.row.search) + } + // ROLE async createRole(config?: any) { diff --git a/packages/server/src/utilities/fileSystem/filesystem.ts b/packages/server/src/utilities/fileSystem/filesystem.ts index 086eaa835a..6d3c6d48f6 100644 --- a/packages/server/src/utilities/fileSystem/filesystem.ts +++ b/packages/server/src/utilities/fileSystem/filesystem.ts @@ -24,10 +24,6 @@ export const init = () => { } } } - const clientLibPath = join(budibaseTempDir(), "budibase-client.js") - if (env.isTest() && !fs.existsSync(clientLibPath)) { - fs.copyFileSync(require.resolve("@budibase/client"), clientLibPath) - } } /** diff --git a/packages/shared-core/yarn.lock b/packages/shared-core/yarn.lock index c1578954fc..95d82a9a94 100644 --- a/packages/shared-core/yarn.lock +++ b/packages/shared-core/yarn.lock @@ -2,11 +2,6 @@ # yarn lockfile v1 -"@budibase/types@2.4.5-alpha.0": - version "2.4.5-alpha.0" - resolved "https://registry.yarnpkg.com/@budibase/types/-/types-2.4.5-alpha.0.tgz#70fea09b5e471fe8fa6a760a1a2dd0dd74caac3a" - integrity sha512-tVFM9XnKwcCOo7nw6v7C8ZsK9hQLQBv3kHDn7/MFWnDMFCj72pUdtP/iFrAKr2c3tE84lkkWJfNHIolMSktHZA== - ansi-regex@^5.0.1: version "5.0.1" resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-5.0.1.tgz#082cb2c89c9fe8659a311a53bd6a4dc5301db304" diff --git a/packages/worker/scripts/test.sh b/packages/worker/scripts/test.sh index 2f3f54cb25..d7659a9318 100644 --- a/packages/worker/scripts/test.sh +++ b/packages/worker/scripts/test.sh @@ -1,12 +1,13 @@ #!/bin/bash +set -e if [[ -n $CI ]] then # --runInBand performs better in ci where resources are limited - echo "jest --coverage --runInBand" - jest --coverage --runInBand + echo "jest --coverage --runInBand --forceExit" + jest --coverage --runInBand --forceExit else # --maxWorkers performs better in development - echo "jest --coverage --maxWorkers=2" - jest --coverage --maxWorkers=2 + echo "jest --coverage --maxWorkers=2 --forceExit" + jest --coverage --maxWorkers=2 --forceExit fi \ No newline at end of file diff --git a/packages/worker/src/tests/jestEnv.ts b/packages/worker/src/tests/jestEnv.ts index 061897451e..5784e44dcf 100644 --- a/packages/worker/src/tests/jestEnv.ts +++ b/packages/worker/src/tests/jestEnv.ts @@ -10,3 +10,4 @@ process.env.MINIO_SECRET_KEY = "test" process.env.PLATFORM_URL = "http://localhost:10000" process.env.INTERNAL_API_KEY = "tet" process.env.DISABLE_ACCOUNT_PORTAL = "0" +process.env.REDIS_PASSWORD = "budibase" From 2118bcea3abb6cd71b63e35f94bb303b459567c1 Mon Sep 17 00:00:00 2001 From: Budibase Release Bot <> Date: Fri, 31 Mar 2023 09:42:50 +0000 Subject: [PATCH 6/7] v2.4.43 --- lerna.json | 2 +- packages/backend-core/package.json | 4 ++-- packages/bbui/package.json | 6 +++--- packages/builder/package.json | 12 ++++++------ packages/cli/package.json | 8 ++++---- packages/client/package.json | 12 ++++++------ packages/frontend-core/package.json | 6 +++--- packages/sdk/package.json | 2 +- packages/server/package.json | 12 ++++++------ packages/shared-core/package.json | 4 ++-- packages/string-templates/package.json | 2 +- packages/types/package.json | 2 +- packages/worker/package.json | 8 ++++---- 13 files changed, 40 insertions(+), 40 deletions(-) diff --git a/lerna.json b/lerna.json index 9c9246f71a..7db5c851c2 100644 --- a/lerna.json +++ b/lerna.json @@ -1,5 +1,5 @@ { - "version": "2.4.42", + "version": "2.4.43", "npmClient": "yarn", "packages": [ "packages/*" diff --git a/packages/backend-core/package.json b/packages/backend-core/package.json index 2503c56dbb..fcc5acd8d3 100644 --- a/packages/backend-core/package.json +++ b/packages/backend-core/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/backend-core", - "version": "2.4.42", + "version": "2.4.43", "description": "Budibase backend core libraries used in server and worker", "main": "dist/src/index.js", "types": "dist/src/index.d.ts", @@ -24,7 +24,7 @@ "dependencies": { "@budibase/nano": "10.1.2", "@budibase/pouchdb-replication-stream": "1.2.10", - "@budibase/types": "^2.4.42", + "@budibase/types": "^2.4.43", "@shopify/jest-koa-mocks": "5.0.1", "@techpass/passport-openidconnect": "0.3.2", "aws-cloudfront-sign": "2.2.0", diff --git a/packages/bbui/package.json b/packages/bbui/package.json index 33f801ac98..c4cf512fce 100644 --- a/packages/bbui/package.json +++ b/packages/bbui/package.json @@ -1,7 +1,7 @@ { "name": "@budibase/bbui", "description": "A UI solution used in the different Budibase projects.", - "version": "2.4.42", + "version": "2.4.43", "license": "MPL-2.0", "svelte": "src/index.js", "module": "dist/bbui.es.js", @@ -38,8 +38,8 @@ ], "dependencies": { "@adobe/spectrum-css-workflow-icons": "1.2.1", - "@budibase/shared-core": "^2.4.42", - "@budibase/string-templates": "^2.4.42", + "@budibase/shared-core": "^2.4.43", + "@budibase/string-templates": "^2.4.43", "@spectrum-css/accordion": "3.0.24", "@spectrum-css/actionbutton": "1.0.1", "@spectrum-css/actiongroup": "1.0.1", diff --git a/packages/builder/package.json b/packages/builder/package.json index 1e98a23416..51bce9ab4a 100644 --- a/packages/builder/package.json +++ b/packages/builder/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/builder", - "version": "2.4.42", + "version": "2.4.43", "license": "GPL-3.0", "private": true, "scripts": { @@ -58,11 +58,11 @@ } }, "dependencies": { - "@budibase/bbui": "^2.4.42", - "@budibase/client": "^2.4.42", - "@budibase/frontend-core": "^2.4.42", - "@budibase/shared-core": "^2.4.42", - "@budibase/string-templates": "^2.4.42", + "@budibase/bbui": "^2.4.43", + "@budibase/client": "^2.4.43", + "@budibase/frontend-core": "^2.4.43", + "@budibase/shared-core": "^2.4.43", + "@budibase/string-templates": "^2.4.43", "@fortawesome/fontawesome-svg-core": "^6.2.1", "@fortawesome/free-brands-svg-icons": "^6.2.1", "@fortawesome/free-solid-svg-icons": "^6.2.1", diff --git a/packages/cli/package.json b/packages/cli/package.json index 15266bc063..a2ee6f127b 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/cli", - "version": "2.4.42", + "version": "2.4.43", "description": "Budibase CLI, for developers, self hosting and migrations.", "main": "dist/index.js", "bin": { @@ -29,9 +29,9 @@ "outputPath": "build" }, "dependencies": { - "@budibase/backend-core": "^2.4.42", - "@budibase/string-templates": "^2.4.42", - "@budibase/types": "^2.4.42", + "@budibase/backend-core": "^2.4.43", + "@budibase/string-templates": "^2.4.43", + "@budibase/types": "^2.4.43", "axios": "0.21.2", "chalk": "4.1.0", "cli-progress": "3.11.2", diff --git a/packages/client/package.json b/packages/client/package.json index 21e1066b05..314cb9604d 100644 --- a/packages/client/package.json +++ b/packages/client/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/client", - "version": "2.4.42", + "version": "2.4.43", "license": "MPL-2.0", "module": "dist/budibase-client.js", "main": "dist/budibase-client.js", @@ -19,11 +19,11 @@ "dev:builder": "rollup -cw" }, "dependencies": { - "@budibase/bbui": "^2.4.42", - "@budibase/frontend-core": "^2.4.42", - "@budibase/shared-core": "^2.4.42", - "@budibase/string-templates": "^2.4.42", - "@budibase/types": "^2.4.42", + "@budibase/bbui": "^2.4.43", + "@budibase/frontend-core": "^2.4.43", + "@budibase/shared-core": "^2.4.43", + "@budibase/string-templates": "^2.4.43", + "@budibase/types": "^2.4.43", "@spectrum-css/button": "^3.0.3", "@spectrum-css/card": "^3.0.3", "@spectrum-css/divider": "^1.0.3", diff --git a/packages/frontend-core/package.json b/packages/frontend-core/package.json index 324e33060d..ba04b519be 100644 --- a/packages/frontend-core/package.json +++ b/packages/frontend-core/package.json @@ -1,13 +1,13 @@ { "name": "@budibase/frontend-core", - "version": "2.4.42", + "version": "2.4.43", "description": "Budibase frontend core libraries used in builder and client", "author": "Budibase", "license": "MPL-2.0", "svelte": "src/index.js", "dependencies": { - "@budibase/bbui": "^2.4.42", - "@budibase/shared-core": "^2.4.42", + "@budibase/bbui": "^2.4.43", + "@budibase/shared-core": "^2.4.43", "lodash": "^4.17.21", "svelte": "^3.46.2" } diff --git a/packages/sdk/package.json b/packages/sdk/package.json index 8b3f3b4239..eecd104f0d 100644 --- a/packages/sdk/package.json +++ b/packages/sdk/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/sdk", - "version": "2.4.42", + "version": "2.4.43", "description": "Budibase Public API SDK", "author": "Budibase", "license": "MPL-2.0", diff --git a/packages/server/package.json b/packages/server/package.json index c68b0725a3..3d303733f5 100644 --- a/packages/server/package.json +++ b/packages/server/package.json @@ -1,7 +1,7 @@ { "name": "@budibase/server", "email": "hi@budibase.com", - "version": "2.4.42", + "version": "2.4.43", "description": "Budibase Web Server", "main": "src/index.ts", "repository": { @@ -43,12 +43,12 @@ "license": "GPL-3.0", "dependencies": { "@apidevtools/swagger-parser": "10.0.3", - "@budibase/backend-core": "^2.4.42", - "@budibase/client": "^2.4.42", + "@budibase/backend-core": "^2.4.43", + "@budibase/client": "^2.4.43", "@budibase/pro": "2.4.42", - "@budibase/shared-core": "^2.4.42", - "@budibase/string-templates": "^2.4.42", - "@budibase/types": "^2.4.42", + "@budibase/shared-core": "^2.4.43", + "@budibase/string-templates": "^2.4.43", + "@budibase/types": "^2.4.43", "@bull-board/api": "3.7.0", "@bull-board/koa": "3.9.4", "@elastic/elasticsearch": "7.10.0", diff --git a/packages/shared-core/package.json b/packages/shared-core/package.json index ceb66da7fe..9ea61a9af7 100644 --- a/packages/shared-core/package.json +++ b/packages/shared-core/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/shared-core", - "version": "2.4.42", + "version": "2.4.43", "description": "Shared data utils", "main": "dist/cjs/src/index.js", "types": "dist/mjs/src/index.d.ts", @@ -20,7 +20,7 @@ "dev:builder": "yarn prebuild && concurrently \"tsc -p tsconfig.build.json --watch\" \"tsc -p tsconfig-cjs.build.json --watch\"" }, "dependencies": { - "@budibase/types": "^2.4.42" + "@budibase/types": "^2.4.43" }, "devDependencies": { "concurrently": "^7.6.0", diff --git a/packages/string-templates/package.json b/packages/string-templates/package.json index c2cc46de09..24a0edc652 100644 --- a/packages/string-templates/package.json +++ b/packages/string-templates/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/string-templates", - "version": "2.4.42", + "version": "2.4.43", "description": "Handlebars wrapper for Budibase templating.", "main": "src/index.cjs", "module": "dist/bundle.mjs", diff --git a/packages/types/package.json b/packages/types/package.json index 3fcf7aac7e..89bce8dc0d 100644 --- a/packages/types/package.json +++ b/packages/types/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/types", - "version": "2.4.42", + "version": "2.4.43", "description": "Budibase types", "main": "dist/cjs/index.js", "types": "dist/mjs/index.d.ts", diff --git a/packages/worker/package.json b/packages/worker/package.json index c929cb31a9..fc084f3fff 100644 --- a/packages/worker/package.json +++ b/packages/worker/package.json @@ -1,7 +1,7 @@ { "name": "@budibase/worker", "email": "hi@budibase.com", - "version": "2.4.42", + "version": "2.4.43", "description": "Budibase background service", "main": "src/index.ts", "repository": { @@ -36,10 +36,10 @@ "author": "Budibase", "license": "GPL-3.0", "dependencies": { - "@budibase/backend-core": "^2.4.42", + "@budibase/backend-core": "^2.4.43", "@budibase/pro": "2.4.42", - "@budibase/string-templates": "^2.4.42", - "@budibase/types": "^2.4.42", + "@budibase/string-templates": "^2.4.43", + "@budibase/types": "^2.4.43", "@koa/router": "8.0.8", "@sentry/node": "6.17.7", "@techpass/passport-openidconnect": "0.3.2", From 78f76ca0dfc82f7824a2fceb395020bdccad5f3b Mon Sep 17 00:00:00 2001 From: Budibase Release Bot <> Date: Fri, 31 Mar 2023 09:46:24 +0000 Subject: [PATCH 7/7] Update pro version to 2.4.43 --- packages/server/package.json | 2 +- packages/server/yarn.lock | 30 +++++++++++++++--------------- packages/worker/package.json | 2 +- packages/worker/yarn.lock | 30 +++++++++++++++--------------- 4 files changed, 32 insertions(+), 32 deletions(-) diff --git a/packages/server/package.json b/packages/server/package.json index 3d303733f5..16670e2237 100644 --- a/packages/server/package.json +++ b/packages/server/package.json @@ -45,7 +45,7 @@ "@apidevtools/swagger-parser": "10.0.3", "@budibase/backend-core": "^2.4.43", "@budibase/client": "^2.4.43", - "@budibase/pro": "2.4.42", + "@budibase/pro": "2.4.43", "@budibase/shared-core": "^2.4.43", "@budibase/string-templates": "^2.4.43", "@budibase/types": "^2.4.43", diff --git a/packages/server/yarn.lock b/packages/server/yarn.lock index e450d26ae2..3550c6158d 100644 --- a/packages/server/yarn.lock +++ b/packages/server/yarn.lock @@ -1278,14 +1278,14 @@ resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39" integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw== -"@budibase/backend-core@2.4.42": - version "2.4.42" - resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-2.4.42.tgz#28efa415b09363f47b8e3a0baf4b8f83e1a74a6c" - integrity sha512-snokFmHarDqNZm0BWCYeo1mZFuyYI4typAXk8HRX477xdS5g/3cM//aesV4UHceWw6V1cwczKZYqAd22VSfCfA== +"@budibase/backend-core@2.4.43": + version "2.4.43" + resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-2.4.43.tgz#801cdad706a90f6718e9323dd66e7e664cc9b287" + integrity sha512-pxMjFsCugkR/lR6XsA4bAbBEnUta92jjeUIY4C//hjczHF0lwEUWqhhR8QRCMaNTrWoJfZBFGnJyNIqfguyDVw== dependencies: "@budibase/nano" "10.1.2" "@budibase/pouchdb-replication-stream" "1.2.10" - "@budibase/types" "^2.4.42" + "@budibase/types" "^2.4.43" "@shopify/jest-koa-mocks" "5.0.1" "@techpass/passport-openidconnect" "0.3.2" aws-cloudfront-sign "2.2.0" @@ -1417,14 +1417,14 @@ pouchdb-promise "^6.0.4" through2 "^2.0.0" -"@budibase/pro@2.4.42": - version "2.4.42" - resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-2.4.42.tgz#c55b26e39f449f223532d922240261157b12b6e0" - integrity sha512-2FuDiv5xPMEVbQR1QiwGYkah+zeEU7qclP2JYLpwnFjmwxpUvldAVGQuG1q/LMZddFLIdwHd3tVnIEHHGK76TQ== +"@budibase/pro@2.4.43": + version "2.4.43" + resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-2.4.43.tgz#e717000a26fd4c183a984a141965945a26ac83d9" + integrity sha512-J/Up28bSV5E2UTQBpaTOXvNG1jQqRj8fcZH5TSqS7ymJ2H4OyLOQvEGFL3roCGnN3Dgrzkfv9LBO0JyRORVtSw== dependencies: - "@budibase/backend-core" "2.4.42" + "@budibase/backend-core" "2.4.43" "@budibase/string-templates" "2.3.20" - "@budibase/types" "2.4.42" + "@budibase/types" "2.4.43" "@koa/router" "8.0.8" bull "4.10.1" joi "17.6.0" @@ -1463,10 +1463,10 @@ lodash "^4.17.20" vm2 "^3.9.4" -"@budibase/types@2.4.42", "@budibase/types@^2.4.42": - version "2.4.42" - resolved "https://registry.yarnpkg.com/@budibase/types/-/types-2.4.42.tgz#04ac509acda1960179c526ba3af92a9331c951b6" - integrity sha512-Dxql/99o4AAkRkZDLrKeDK2ON2qiV0q/nYffdyJ8uCQiyFNKA9e1GyQlbsJORmqYCqkEGzTtcmW+zBtdvmtB3Q== +"@budibase/types@2.4.43", "@budibase/types@^2.4.43": + version "2.4.43" + resolved "https://registry.yarnpkg.com/@budibase/types/-/types-2.4.43.tgz#2f6e609bada8855c83dfb26deb3b2d64dbb2d401" + integrity sha512-OWr8dNjk3VjjAJ4Rni/+AMGDtCDhz7LrZqxgedL0wKiRwgwkSiBNExh1eIZ/NKlt1vZrzH/GG5jhzlPkYqDTQg== "@bull-board/api@3.7.0": version "3.7.0" diff --git a/packages/worker/package.json b/packages/worker/package.json index fc084f3fff..a738524244 100644 --- a/packages/worker/package.json +++ b/packages/worker/package.json @@ -37,7 +37,7 @@ "license": "GPL-3.0", "dependencies": { "@budibase/backend-core": "^2.4.43", - "@budibase/pro": "2.4.42", + "@budibase/pro": "2.4.43", "@budibase/string-templates": "^2.4.43", "@budibase/types": "^2.4.43", "@koa/router": "8.0.8", diff --git a/packages/worker/yarn.lock b/packages/worker/yarn.lock index 32f57398a0..c5b9acf663 100644 --- a/packages/worker/yarn.lock +++ b/packages/worker/yarn.lock @@ -475,14 +475,14 @@ resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39" integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw== -"@budibase/backend-core@2.4.42": - version "2.4.42" - resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-2.4.42.tgz#28efa415b09363f47b8e3a0baf4b8f83e1a74a6c" - integrity sha512-snokFmHarDqNZm0BWCYeo1mZFuyYI4typAXk8HRX477xdS5g/3cM//aesV4UHceWw6V1cwczKZYqAd22VSfCfA== +"@budibase/backend-core@2.4.43": + version "2.4.43" + resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-2.4.43.tgz#801cdad706a90f6718e9323dd66e7e664cc9b287" + integrity sha512-pxMjFsCugkR/lR6XsA4bAbBEnUta92jjeUIY4C//hjczHF0lwEUWqhhR8QRCMaNTrWoJfZBFGnJyNIqfguyDVw== dependencies: "@budibase/nano" "10.1.2" "@budibase/pouchdb-replication-stream" "1.2.10" - "@budibase/types" "^2.4.42" + "@budibase/types" "^2.4.43" "@shopify/jest-koa-mocks" "5.0.1" "@techpass/passport-openidconnect" "0.3.2" aws-cloudfront-sign "2.2.0" @@ -564,14 +564,14 @@ pouchdb-promise "^6.0.4" through2 "^2.0.0" -"@budibase/pro@2.4.42": - version "2.4.42" - resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-2.4.42.tgz#c55b26e39f449f223532d922240261157b12b6e0" - integrity sha512-2FuDiv5xPMEVbQR1QiwGYkah+zeEU7qclP2JYLpwnFjmwxpUvldAVGQuG1q/LMZddFLIdwHd3tVnIEHHGK76TQ== +"@budibase/pro@2.4.43": + version "2.4.43" + resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-2.4.43.tgz#e717000a26fd4c183a984a141965945a26ac83d9" + integrity sha512-J/Up28bSV5E2UTQBpaTOXvNG1jQqRj8fcZH5TSqS7ymJ2H4OyLOQvEGFL3roCGnN3Dgrzkfv9LBO0JyRORVtSw== dependencies: - "@budibase/backend-core" "2.4.42" + "@budibase/backend-core" "2.4.43" "@budibase/string-templates" "2.3.20" - "@budibase/types" "2.4.42" + "@budibase/types" "2.4.43" "@koa/router" "8.0.8" bull "4.10.1" joi "17.6.0" @@ -592,10 +592,10 @@ lodash "^4.17.20" vm2 "^3.9.4" -"@budibase/types@2.4.42", "@budibase/types@^2.4.42": - version "2.4.42" - resolved "https://registry.yarnpkg.com/@budibase/types/-/types-2.4.42.tgz#04ac509acda1960179c526ba3af92a9331c951b6" - integrity sha512-Dxql/99o4AAkRkZDLrKeDK2ON2qiV0q/nYffdyJ8uCQiyFNKA9e1GyQlbsJORmqYCqkEGzTtcmW+zBtdvmtB3Q== +"@budibase/types@2.4.43", "@budibase/types@^2.4.43": + version "2.4.43" + resolved "https://registry.yarnpkg.com/@budibase/types/-/types-2.4.43.tgz#2f6e609bada8855c83dfb26deb3b2d64dbb2d401" + integrity sha512-OWr8dNjk3VjjAJ4Rni/+AMGDtCDhz7LrZqxgedL0wKiRwgwkSiBNExh1eIZ/NKlt1vZrzH/GG5jhzlPkYqDTQg== "@cspotcode/source-map-support@^0.8.0": version "0.8.1"