From d9a33e52cf6834e220ec5deb489c737acd3bf697 Mon Sep 17 00:00:00 2001 From: Jonny McCullagh Date: Fri, 30 Sep 2022 11:43:42 +0100 Subject: [PATCH 1/6] AAS enable app service storage --- hosting/single/runner.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/hosting/single/runner.sh b/hosting/single/runner.sh index cf82e6701b..151ee7026d 100644 --- a/hosting/single/runner.sh +++ b/hosting/single/runner.sh @@ -19,6 +19,7 @@ declare -a DOCKER_VARS=("APP_PORT" "APPS_URL" "ARCHITECTURE" "BUDIBASE_ENVIRONME # Azure App Service customisations if [[ "${TARGETBUILD}" = "aas" ]]; then DATA_DIR=/home + WEBSITES_ENABLE_APP_SERVICE_STORAGE=true /etc/init.d/ssh start else DATA_DIR=${DATA_DIR:-/data} From 6d3b4c3ccc4e50937e45a94ce7d7ddc263b1bea2 Mon Sep 17 00:00:00 2001 From: Jonny McCullagh Date: Fri, 30 Sep 2022 11:47:01 +0100 Subject: [PATCH 2/6] AAS enable app service storage --- hosting/scripts/build-target-paths.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/hosting/scripts/build-target-paths.sh b/hosting/scripts/build-target-paths.sh index c974d9a304..67e1765ca8 100644 --- a/hosting/scripts/build-target-paths.sh +++ b/hosting/scripts/build-target-paths.sh @@ -4,6 +4,7 @@ echo ${TARGETBUILD} > /buildtarget.txt if [[ "${TARGETBUILD}" = "aas" ]]; then # Azure AppService uses /home for persisent data & SSH on port 2222 DATA_DIR=/home + WEBSITES_ENABLE_APP_SERVICE_STORAGE=true mkdir -p $DATA_DIR/{search,minio,couch} mkdir -p $DATA_DIR/couch/{dbs,views} chown -R couchdb:couchdb $DATA_DIR/couch/ From 4ad00d45f83fbf1158a21ab6aeae74ce577c544e Mon Sep 17 00:00:00 2001 From: rosnerdev <83503879+rosnerdev@users.noreply.github.com> Date: Tue, 4 Oct 2022 12:18:04 +0300 Subject: [PATCH 3/6] Update exec.js I had an issue where the datasource plugin wouldn't work because of node engine incompatibility, and after a quick search on google I found that --ignore-engines is the option to use for ignoring this kind of error and it worked! So I want to make this a built-in feature so there's no need for me to manually do this. --- packages/cli/src/exec.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/cli/src/exec.js b/packages/cli/src/exec.js index 72fd8e00eb..4df486aed6 100644 --- a/packages/cli/src/exec.js +++ b/packages/cli/src/exec.js @@ -22,6 +22,6 @@ exports.runPkgCommand = async (command, dir = "./") => { throw new Error("Must have yarn or npm installed to run build.") } const npmCmd = command === "install" ? `npm ${command}` : `npm run ${command}` - const cmd = yarn ? `yarn ${command}` : npmCmd + const cmd = yarn ? `yarn ${command} --ignore-engines` : npmCmd await exports.exec(cmd, dir) } From 668c2584ae23364ee5b3a76c47297223a15e92c4 Mon Sep 17 00:00:00 2001 From: Budibase Staging Release Bot <> Date: Tue, 4 Oct 2022 09:55:49 +0000 Subject: [PATCH 4/6] v2.0.14-alpha.3 --- lerna.json | 2 +- packages/backend-core/package.json | 4 ++-- packages/bbui/package.json | 4 ++-- packages/builder/package.json | 10 +++++----- packages/cli/package.json | 8 ++++---- packages/client/package.json | 8 ++++---- packages/frontend-core/package.json | 4 ++-- packages/sdk/package.json | 2 +- packages/server/package.json | 10 +++++----- packages/string-templates/package.json | 2 +- packages/types/package.json | 2 +- packages/worker/package.json | 8 ++++---- 12 files changed, 32 insertions(+), 32 deletions(-) diff --git a/lerna.json b/lerna.json index 4e08b98680..3730ebd344 100644 --- a/lerna.json +++ b/lerna.json @@ -1,5 +1,5 @@ { - "version": "2.0.14-alpha.2", + "version": "2.0.14-alpha.3", "npmClient": "yarn", "packages": [ "packages/*" diff --git a/packages/backend-core/package.json b/packages/backend-core/package.json index 75cd8ff374..a07db6fca0 100644 --- a/packages/backend-core/package.json +++ b/packages/backend-core/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/backend-core", - "version": "2.0.14-alpha.2", + "version": "2.0.14-alpha.3", "description": "Budibase backend core libraries used in server and worker", "main": "dist/src/index.js", "types": "dist/src/index.d.ts", @@ -20,7 +20,7 @@ "test:watch": "jest --watchAll" }, "dependencies": { - "@budibase/types": "2.0.14-alpha.2", + "@budibase/types": "2.0.14-alpha.3", "@shopify/jest-koa-mocks": "5.0.1", "@techpass/passport-openidconnect": "0.3.2", "aws-sdk": "2.1030.0", diff --git a/packages/bbui/package.json b/packages/bbui/package.json index ebbdbdd49a..7bc9cb7da6 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.0.14-alpha.2", + "version": "2.0.14-alpha.3", "license": "MPL-2.0", "svelte": "src/index.js", "module": "dist/bbui.es.js", @@ -38,7 +38,7 @@ ], "dependencies": { "@adobe/spectrum-css-workflow-icons": "^1.2.1", - "@budibase/string-templates": "2.0.14-alpha.2", + "@budibase/string-templates": "2.0.14-alpha.3", "@spectrum-css/actionbutton": "^1.0.1", "@spectrum-css/actiongroup": "^1.0.1", "@spectrum-css/avatar": "^3.0.2", diff --git a/packages/builder/package.json b/packages/builder/package.json index 3d05114a82..0b171e2591 100644 --- a/packages/builder/package.json +++ b/packages/builder/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/builder", - "version": "2.0.14-alpha.2", + "version": "2.0.14-alpha.3", "license": "GPL-3.0", "private": true, "scripts": { @@ -71,10 +71,10 @@ } }, "dependencies": { - "@budibase/bbui": "2.0.14-alpha.2", - "@budibase/client": "2.0.14-alpha.2", - "@budibase/frontend-core": "2.0.14-alpha.2", - "@budibase/string-templates": "2.0.14-alpha.2", + "@budibase/bbui": "2.0.14-alpha.3", + "@budibase/client": "2.0.14-alpha.3", + "@budibase/frontend-core": "2.0.14-alpha.3", + "@budibase/string-templates": "2.0.14-alpha.3", "@sentry/browser": "5.19.1", "@spectrum-css/page": "^3.0.1", "@spectrum-css/vars": "^3.0.1", diff --git a/packages/cli/package.json b/packages/cli/package.json index 4921e9a3e9..cc70a811f9 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/cli", - "version": "2.0.14-alpha.2", + "version": "2.0.14-alpha.3", "description": "Budibase CLI, for developers, self hosting and migrations.", "main": "src/index.js", "bin": { @@ -26,9 +26,9 @@ "outputPath": "build" }, "dependencies": { - "@budibase/backend-core": "2.0.14-alpha.2", - "@budibase/string-templates": "2.0.14-alpha.2", - "@budibase/types": "2.0.14-alpha.2", + "@budibase/backend-core": "2.0.14-alpha.3", + "@budibase/string-templates": "2.0.14-alpha.3", + "@budibase/types": "2.0.14-alpha.3", "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 1e2049ac27..e6533daa85 100644 --- a/packages/client/package.json +++ b/packages/client/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/client", - "version": "2.0.14-alpha.2", + "version": "2.0.14-alpha.3", "license": "MPL-2.0", "module": "dist/budibase-client.js", "main": "dist/budibase-client.js", @@ -19,9 +19,9 @@ "dev:builder": "rollup -cw" }, "dependencies": { - "@budibase/bbui": "2.0.14-alpha.2", - "@budibase/frontend-core": "2.0.14-alpha.2", - "@budibase/string-templates": "2.0.14-alpha.2", + "@budibase/bbui": "2.0.14-alpha.3", + "@budibase/frontend-core": "2.0.14-alpha.3", + "@budibase/string-templates": "2.0.14-alpha.3", "@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 0fbbb1c471..ff68eeb5a2 100644 --- a/packages/frontend-core/package.json +++ b/packages/frontend-core/package.json @@ -1,12 +1,12 @@ { "name": "@budibase/frontend-core", - "version": "2.0.14-alpha.2", + "version": "2.0.14-alpha.3", "description": "Budibase frontend core libraries used in builder and client", "author": "Budibase", "license": "MPL-2.0", "svelte": "src/index.js", "dependencies": { - "@budibase/bbui": "2.0.14-alpha.2", + "@budibase/bbui": "2.0.14-alpha.3", "lodash": "^4.17.21", "svelte": "^3.46.2" } diff --git a/packages/sdk/package.json b/packages/sdk/package.json index 4a3e0080f5..16b053b4ed 100644 --- a/packages/sdk/package.json +++ b/packages/sdk/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/sdk", - "version": "2.0.14-alpha.2", + "version": "2.0.14-alpha.3", "description": "Budibase Public API SDK", "author": "Budibase", "license": "MPL-2.0", diff --git a/packages/server/package.json b/packages/server/package.json index 759cc502b0..4a5eadeb14 100644 --- a/packages/server/package.json +++ b/packages/server/package.json @@ -1,7 +1,7 @@ { "name": "@budibase/server", "email": "hi@budibase.com", - "version": "2.0.14-alpha.2", + "version": "2.0.14-alpha.3", "description": "Budibase Web Server", "main": "src/index.ts", "repository": { @@ -77,11 +77,11 @@ "license": "GPL-3.0", "dependencies": { "@apidevtools/swagger-parser": "10.0.3", - "@budibase/backend-core": "2.0.14-alpha.2", - "@budibase/client": "2.0.14-alpha.2", + "@budibase/backend-core": "2.0.14-alpha.3", + "@budibase/client": "2.0.14-alpha.3", "@budibase/pro": "2.0.14-alpha.2", - "@budibase/string-templates": "2.0.14-alpha.2", - "@budibase/types": "2.0.14-alpha.2", + "@budibase/string-templates": "2.0.14-alpha.3", + "@budibase/types": "2.0.14-alpha.3", "@bull-board/api": "3.7.0", "@bull-board/koa": "3.9.4", "@elastic/elasticsearch": "7.10.0", diff --git a/packages/string-templates/package.json b/packages/string-templates/package.json index a51978e10c..73cff234a3 100644 --- a/packages/string-templates/package.json +++ b/packages/string-templates/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/string-templates", - "version": "2.0.14-alpha.2", + "version": "2.0.14-alpha.3", "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 81adf125fb..5eb2a09957 100644 --- a/packages/types/package.json +++ b/packages/types/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/types", - "version": "2.0.14-alpha.2", + "version": "2.0.14-alpha.3", "description": "Budibase types", "main": "dist/index.js", "types": "dist/index.d.ts", diff --git a/packages/worker/package.json b/packages/worker/package.json index 677880312a..26ebed50ab 100644 --- a/packages/worker/package.json +++ b/packages/worker/package.json @@ -1,7 +1,7 @@ { "name": "@budibase/worker", "email": "hi@budibase.com", - "version": "2.0.14-alpha.2", + "version": "2.0.14-alpha.3", "description": "Budibase background service", "main": "src/index.ts", "repository": { @@ -36,10 +36,10 @@ "author": "Budibase", "license": "GPL-3.0", "dependencies": { - "@budibase/backend-core": "2.0.14-alpha.2", + "@budibase/backend-core": "2.0.14-alpha.3", "@budibase/pro": "2.0.14-alpha.2", - "@budibase/string-templates": "2.0.14-alpha.2", - "@budibase/types": "2.0.14-alpha.2", + "@budibase/string-templates": "2.0.14-alpha.3", + "@budibase/types": "2.0.14-alpha.3", "@koa/router": "8.0.8", "@sentry/node": "6.17.7", "@techpass/passport-openidconnect": "0.3.2", From b20ff6881bf707ce1b10602dcf84ef3066127c6d Mon Sep 17 00:00:00 2001 From: Budibase Staging Release Bot <> Date: Tue, 4 Oct 2022 09:58:51 +0000 Subject: [PATCH 5/6] Update pro version to 2.0.14-alpha.3 --- 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 4a5eadeb14..5183f9737f 100644 --- a/packages/server/package.json +++ b/packages/server/package.json @@ -79,7 +79,7 @@ "@apidevtools/swagger-parser": "10.0.3", "@budibase/backend-core": "2.0.14-alpha.3", "@budibase/client": "2.0.14-alpha.3", - "@budibase/pro": "2.0.14-alpha.2", + "@budibase/pro": "2.0.14-alpha.3", "@budibase/string-templates": "2.0.14-alpha.3", "@budibase/types": "2.0.14-alpha.3", "@bull-board/api": "3.7.0", diff --git a/packages/server/yarn.lock b/packages/server/yarn.lock index 1995459efe..74ec0fd8bc 100644 --- a/packages/server/yarn.lock +++ b/packages/server/yarn.lock @@ -1094,12 +1094,12 @@ resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39" integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw== -"@budibase/backend-core@2.0.14-alpha.2": - version "2.0.14-alpha.2" - resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-2.0.14-alpha.2.tgz#0e0cdcbf441be61850c9b21c9a707d1ddf6ae3e6" - integrity sha512-2OkcMoHpYyzpMzOWeeGWYo0fSDwppYlAutcH3r9cYJM/w4XWT282UBK5d7fqSuIEq8IIQQlCQxrazvzWq1qidg== +"@budibase/backend-core@2.0.14-alpha.3": + version "2.0.14-alpha.3" + resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-2.0.14-alpha.3.tgz#ebb66e4bee8b8176802f8db9b9ee445525673af9" + integrity sha512-LVDVwfSa7eaGNgmh1ig3ENu5h8pOM7AWjPEcIPffY5ZWmcdiPCZYSEzePC1fC5csGv0PLwQeHHFEqEAKxDBIKQ== dependencies: - "@budibase/types" "2.0.14-alpha.2" + "@budibase/types" "2.0.14-alpha.3" "@shopify/jest-koa-mocks" "5.0.1" "@techpass/passport-openidconnect" "0.3.2" aws-sdk "2.1030.0" @@ -1180,13 +1180,13 @@ svelte-flatpickr "^3.2.3" svelte-portal "^1.0.0" -"@budibase/pro@2.0.14-alpha.2": - version "2.0.14-alpha.2" - resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-2.0.14-alpha.2.tgz#71e8c6e3c34af4ff4b7d084e5210c9840f5e1581" - integrity sha512-pbzx07HYgmxjjeqcPvkqp2fiT6Gb8OCXAHVycbm38H1OG0dQg+KLkEJcXk+uhGsY6AJ1tzJ5HH+4Rbw6SE0Nng== +"@budibase/pro@2.0.14-alpha.3": + version "2.0.14-alpha.3" + resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-2.0.14-alpha.3.tgz#0774b52deee3911e89e3f69d40693fc639d3cad8" + integrity sha512-X9MBpr2uwoBYjo6n/QuvPs1VBSFLqC1bJGec+5/4WRlywzNKLM6Rs2/FE3jYUDRtobAkKp1dUx9hpe3Y+wQKNQ== dependencies: - "@budibase/backend-core" "2.0.14-alpha.2" - "@budibase/types" "2.0.14-alpha.2" + "@budibase/backend-core" "2.0.14-alpha.3" + "@budibase/types" "2.0.14-alpha.3" "@koa/router" "8.0.8" joi "17.6.0" node-fetch "^2.6.1" @@ -1209,10 +1209,10 @@ svelte-apexcharts "^1.0.2" svelte-flatpickr "^3.1.0" -"@budibase/types@2.0.14-alpha.2": - version "2.0.14-alpha.2" - resolved "https://registry.yarnpkg.com/@budibase/types/-/types-2.0.14-alpha.2.tgz#4b0da2cc6950cc1d6f3248e8414275d232e68db8" - integrity sha512-6GTPhcNCAgKD58CnixIKKLGbIAMzl7LWRSgQbUwrac6DT7gKU1tEP9x43gDfUhVDpXe1aLNi6f27rbFQbel3Pw== +"@budibase/types@2.0.14-alpha.3": + version "2.0.14-alpha.3" + resolved "https://registry.yarnpkg.com/@budibase/types/-/types-2.0.14-alpha.3.tgz#81ccde9867a15f51dd1b746f2bdeb9f6a638ebdc" + integrity sha512-JPrH3ilmA4Cp59ThcxqL7X3xZuA2mpu2N/2IGH1VoKW3w7RV5IM9FeH/RrrQ3ajEwHzqs53lU5+8tE/vPdGVag== "@bull-board/api@3.7.0": version "3.7.0" diff --git a/packages/worker/package.json b/packages/worker/package.json index 26ebed50ab..c65c6b7676 100644 --- a/packages/worker/package.json +++ b/packages/worker/package.json @@ -37,7 +37,7 @@ "license": "GPL-3.0", "dependencies": { "@budibase/backend-core": "2.0.14-alpha.3", - "@budibase/pro": "2.0.14-alpha.2", + "@budibase/pro": "2.0.14-alpha.3", "@budibase/string-templates": "2.0.14-alpha.3", "@budibase/types": "2.0.14-alpha.3", "@koa/router": "8.0.8", diff --git a/packages/worker/yarn.lock b/packages/worker/yarn.lock index a4384fc329..1f8ee96254 100644 --- a/packages/worker/yarn.lock +++ b/packages/worker/yarn.lock @@ -291,12 +291,12 @@ resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39" integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw== -"@budibase/backend-core@2.0.14-alpha.2": - version "2.0.14-alpha.2" - resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-2.0.14-alpha.2.tgz#0e0cdcbf441be61850c9b21c9a707d1ddf6ae3e6" - integrity sha512-2OkcMoHpYyzpMzOWeeGWYo0fSDwppYlAutcH3r9cYJM/w4XWT282UBK5d7fqSuIEq8IIQQlCQxrazvzWq1qidg== +"@budibase/backend-core@2.0.14-alpha.3": + version "2.0.14-alpha.3" + resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-2.0.14-alpha.3.tgz#ebb66e4bee8b8176802f8db9b9ee445525673af9" + integrity sha512-LVDVwfSa7eaGNgmh1ig3ENu5h8pOM7AWjPEcIPffY5ZWmcdiPCZYSEzePC1fC5csGv0PLwQeHHFEqEAKxDBIKQ== dependencies: - "@budibase/types" "2.0.14-alpha.2" + "@budibase/types" "2.0.14-alpha.3" "@shopify/jest-koa-mocks" "5.0.1" "@techpass/passport-openidconnect" "0.3.2" aws-sdk "2.1030.0" @@ -327,21 +327,21 @@ uuid "8.3.2" zlib "1.0.5" -"@budibase/pro@2.0.14-alpha.2": - version "2.0.14-alpha.2" - resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-2.0.14-alpha.2.tgz#71e8c6e3c34af4ff4b7d084e5210c9840f5e1581" - integrity sha512-pbzx07HYgmxjjeqcPvkqp2fiT6Gb8OCXAHVycbm38H1OG0dQg+KLkEJcXk+uhGsY6AJ1tzJ5HH+4Rbw6SE0Nng== +"@budibase/pro@2.0.14-alpha.3": + version "2.0.14-alpha.3" + resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-2.0.14-alpha.3.tgz#0774b52deee3911e89e3f69d40693fc639d3cad8" + integrity sha512-X9MBpr2uwoBYjo6n/QuvPs1VBSFLqC1bJGec+5/4WRlywzNKLM6Rs2/FE3jYUDRtobAkKp1dUx9hpe3Y+wQKNQ== dependencies: - "@budibase/backend-core" "2.0.14-alpha.2" - "@budibase/types" "2.0.14-alpha.2" + "@budibase/backend-core" "2.0.14-alpha.3" + "@budibase/types" "2.0.14-alpha.3" "@koa/router" "8.0.8" joi "17.6.0" node-fetch "^2.6.1" -"@budibase/types@2.0.14-alpha.2": - version "2.0.14-alpha.2" - resolved "https://registry.yarnpkg.com/@budibase/types/-/types-2.0.14-alpha.2.tgz#4b0da2cc6950cc1d6f3248e8414275d232e68db8" - integrity sha512-6GTPhcNCAgKD58CnixIKKLGbIAMzl7LWRSgQbUwrac6DT7gKU1tEP9x43gDfUhVDpXe1aLNi6f27rbFQbel3Pw== +"@budibase/types@2.0.14-alpha.3": + version "2.0.14-alpha.3" + resolved "https://registry.yarnpkg.com/@budibase/types/-/types-2.0.14-alpha.3.tgz#81ccde9867a15f51dd1b746f2bdeb9f6a638ebdc" + integrity sha512-JPrH3ilmA4Cp59ThcxqL7X3xZuA2mpu2N/2IGH1VoKW3w7RV5IM9FeH/RrrQ3ajEwHzqs53lU5+8tE/vPdGVag== "@cspotcode/source-map-consumer@0.8.0": version "0.8.0" From 86bbd73bcddb0d0b5f3768e6deed98656e3a50a9 Mon Sep 17 00:00:00 2001 From: Rory Powell Date: Tue, 4 Oct 2022 10:59:53 +0100 Subject: [PATCH 6/6] Fix linting for qa-core --- .../TestConfiguration/InternalAPIClient.ts | 6 ++---- .../internal-api/TestConfiguration/applications.ts | 8 ++------ .../config/internal-api/TestConfiguration/auth.ts | 6 +++--- .../config/internal-api/fixtures/applications.ts | 9 ++++----- .../tests/internal-api/applications/create.spec.ts | 13 +++++++------ 5 files changed, 18 insertions(+), 24 deletions(-) diff --git a/qa-core/src/config/internal-api/TestConfiguration/InternalAPIClient.ts b/qa-core/src/config/internal-api/TestConfiguration/InternalAPIClient.ts index bfcbb9f4e2..dafc2b1ff2 100644 --- a/qa-core/src/config/internal-api/TestConfiguration/InternalAPIClient.ts +++ b/qa-core/src/config/internal-api/TestConfiguration/InternalAPIClient.ts @@ -16,9 +16,7 @@ class InternalAPIClient { constructor(appId?: string) { if (!env.BUDIBASE_SERVER_URL) { - throw new Error( - "Must set BUDIBASE_SERVER_URL env var" - ) + throw new Error("Must set BUDIBASE_SERVER_URL env var") } this.host = `${env.BUDIBASE_SERVER_URL}/api` this.appId = appId @@ -55,4 +53,4 @@ class InternalAPIClient { put = this.apiCall("PUT") } -export default InternalAPIClient \ No newline at end of file +export default InternalAPIClient diff --git a/qa-core/src/config/internal-api/TestConfiguration/applications.ts b/qa-core/src/config/internal-api/TestConfiguration/applications.ts index 10e4a6657b..0c51487122 100644 --- a/qa-core/src/config/internal-api/TestConfiguration/applications.ts +++ b/qa-core/src/config/internal-api/TestConfiguration/applications.ts @@ -1,6 +1,4 @@ -import { - Application, -} from "@budibase/server/api/controllers/public/mapping/types" +import { Application } from "@budibase/server/api/controllers/public/mapping/types" import { App } from "@budibase/types" import { Response } from "node-fetch" import InternalAPIClient from "./InternalAPIClient" @@ -37,9 +35,7 @@ export default class AppApi { return [response, json] } - async create( - body: any - ): Promise<[Response, Partial]> { + async create(body: any): Promise<[Response, Partial]> { const response = await this.api.post(`/applications`, { body }) const json = await response.json() return [response, json] diff --git a/qa-core/src/config/internal-api/TestConfiguration/auth.ts b/qa-core/src/config/internal-api/TestConfiguration/auth.ts index 6ac53f24b6..d83c859ab3 100644 --- a/qa-core/src/config/internal-api/TestConfiguration/auth.ts +++ b/qa-core/src/config/internal-api/TestConfiguration/auth.ts @@ -9,11 +9,11 @@ export default class AuthApi { } async login(): Promise<[Response, any]> { - const response = await this.api.post(`/global/auth/default/login`, { + const response = await this.api.post(`/global/auth/default/login`, { body: { username: process.env.BB_ADMIN_USER_EMAIL, - password: process.env.BB_ADMIN_USER_PASSWORD - } + password: process.env.BB_ADMIN_USER_PASSWORD, + }, }) const cookie = response.headers.get("set-cookie") this.api.cookie = cookie as any diff --git a/qa-core/src/config/internal-api/fixtures/applications.ts b/qa-core/src/config/internal-api/fixtures/applications.ts index dfad7e0b46..9076a05e1b 100644 --- a/qa-core/src/config/internal-api/fixtures/applications.ts +++ b/qa-core/src/config/internal-api/fixtures/applications.ts @@ -1,10 +1,9 @@ import generator from "../../generator" -import { - Application, -} from "@budibase/server/api/controllers/public/mapping/types" +import { Application } from "@budibase/server/api/controllers/public/mapping/types" - -const generate = (overrides: Partial = {}): Partial => ({ +const generate = ( + overrides: Partial = {} +): Partial => ({ name: generator.word(), url: `/${generator.word()}`, ...overrides, diff --git a/qa-core/src/tests/internal-api/applications/create.spec.ts b/qa-core/src/tests/internal-api/applications/create.spec.ts index 81d43d9c91..2c934e0bd7 100644 --- a/qa-core/src/tests/internal-api/applications/create.spec.ts +++ b/qa-core/src/tests/internal-api/applications/create.spec.ts @@ -24,14 +24,14 @@ describe("Internal API - /applications endpoints", () => { useTemplate: "true", templateName: "Near Miss Register", templateKey: "app/near-miss-register", - templateFile: undefined + templateFile: undefined, }) } it("GET - fetch applications", async () => { await config.applications.create({ ...generateApp(), - useTemplate: false + useTemplate: false, }) const [response, apps] = await config.applications.fetch() expect(response).toHaveStatusCode(200) @@ -57,7 +57,7 @@ describe("Internal API - /applications endpoints", () => { expect(publish).toEqual({ _id: expect.any(String), appUrl: app.url, - status: "SUCCESS" + status: "SUCCESS", }) }) @@ -70,7 +70,8 @@ describe("Internal API - /applications endpoints", () => { config.applications.api.appId = app.appId // check preview renders - const [previewResponse, previewRenders] = await config.applications.canRender() + const [previewResponse, previewRenders] = + await config.applications.canRender() expect(previewResponse).toHaveStatusCode(200) expect(previewRenders).toBe(true) @@ -79,8 +80,8 @@ describe("Internal API - /applications endpoints", () => { // check published app renders config.applications.api.appId = db.getProdAppID(app.appId) - const [publishedAppResponse, publishedAppRenders] = await config.applications.canRender() + const [publishedAppResponse, publishedAppRenders] = + await config.applications.canRender() expect(publishedAppRenders).toBe(true) }) - })