From 5cc97ba4000f6eaf3c35916606bab229af1448da Mon Sep 17 00:00:00 2001 From: Mel O'Hagan Date: Wed, 29 Jun 2022 13:08:48 +0100 Subject: [PATCH 1/5] Delete checkList cache on destroy --- packages/backend-core/cache.js | 1 + packages/server/yarn.lock | 18 +++++++++--------- .../src/api/controllers/global/configs.js | 3 ++- packages/worker/yarn.lock | 18 +++++++++--------- 4 files changed, 21 insertions(+), 19 deletions(-) diff --git a/packages/backend-core/cache.js b/packages/backend-core/cache.js index 6b319357c4..c8bd3c9b6f 100644 --- a/packages/backend-core/cache.js +++ b/packages/backend-core/cache.js @@ -5,4 +5,5 @@ module.exports = { app: require("./src/cache/appMetadata"), writethrough: require("./src/cache/writethrough"), ...generic, + cache: generic, } diff --git a/packages/server/yarn.lock b/packages/server/yarn.lock index 82d7943354..7dd2021116 100644 --- a/packages/server/yarn.lock +++ b/packages/server/yarn.lock @@ -1028,10 +1028,10 @@ resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39" integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw== -"@budibase/backend-core@1.0.212": - version "1.0.212" - resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-1.0.212.tgz#7ce8bfa8c968f4aa7558bd2dd13ad3e1e3e40c8f" - integrity sha512-pCrAHr54d2onSbaUoCWP83LMJnm28PNIpBAmAhi2kNdSfaGTFY/Iw1sbGOE3G/9vNaB+RRXeibKEEPFjToOgAg== +"@budibase/backend-core@1.0.213": + version "1.0.213" + resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-1.0.213.tgz#da10d014b5e39457413a9b7f6ead54322d482855" + integrity sha512-ARqPhrev/da9WNXVIYSXN5M+cYLKSBYL7pvVVcwMXewp6KCR0gdUBHxuksnrmTbxqT43h7Uc/Zg1H/jYc1xQQQ== dependencies: "@techpass/passport-openidconnect" "0.3.2" aws-sdk "2.1030.0" @@ -1109,12 +1109,12 @@ svelte-flatpickr "^3.2.3" svelte-portal "^1.0.0" -"@budibase/pro@1.0.212": - version "1.0.212" - resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-1.0.212.tgz#d6d2528b9ec2ec47e79d3360d04feeb5d2900d1e" - integrity sha512-RcbDmz3pkReUHXAJDPzvgTYy0CBksw55XLbW0wNtDu2HVWP0ZXoiMMJjOxNDwMfL3q4eZitWgISa7QUDisDtMA== +"@budibase/pro@1.0.213": + version "1.0.213" + resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-1.0.213.tgz#80e6005bec51927d373d278dd8d8672c2f25a4d5" + integrity sha512-zhTMPZBv0IkQsdKz1ywnWaxmt/PMrw/EkW1dS8bIOAqHgFTUgawiMGrqrzH43Iw3JemMK7AvtI1EOhs+zrMWVg== dependencies: - "@budibase/backend-core" "1.0.212" + "@budibase/backend-core" "1.0.213" node-fetch "^2.6.1" "@budibase/standard-components@^0.9.139": diff --git a/packages/worker/src/api/controllers/global/configs.js b/packages/worker/src/api/controllers/global/configs.js index 227b86d181..47873bb3ab 100644 --- a/packages/worker/src/api/controllers/global/configs.js +++ b/packages/worker/src/api/controllers/global/configs.js @@ -18,6 +18,7 @@ const { withCache, CacheKeys, bustCache, + cache, } = require("@budibase/backend-core/cache") const { events } = require("@budibase/backend-core") @@ -365,9 +366,9 @@ exports.upload = async function (ctx) { exports.destroy = async function (ctx) { const db = getGlobalDB() const { id, rev } = ctx.params - try { await db.remove(id, rev) + cache.delete(CacheKeys.CHECKLIST) ctx.body = { message: "Config deleted successfully" } } catch (err) { ctx.throw(err.status, err) diff --git a/packages/worker/yarn.lock b/packages/worker/yarn.lock index 96cc5c5750..4c394647a7 100644 --- a/packages/worker/yarn.lock +++ b/packages/worker/yarn.lock @@ -291,10 +291,10 @@ resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39" integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw== -"@budibase/backend-core@1.0.212": - version "1.0.212" - resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-1.0.212.tgz#7ce8bfa8c968f4aa7558bd2dd13ad3e1e3e40c8f" - integrity sha512-pCrAHr54d2onSbaUoCWP83LMJnm28PNIpBAmAhi2kNdSfaGTFY/Iw1sbGOE3G/9vNaB+RRXeibKEEPFjToOgAg== +"@budibase/backend-core@1.0.213": + version "1.0.213" + resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-1.0.213.tgz#da10d014b5e39457413a9b7f6ead54322d482855" + integrity sha512-ARqPhrev/da9WNXVIYSXN5M+cYLKSBYL7pvVVcwMXewp6KCR0gdUBHxuksnrmTbxqT43h7Uc/Zg1H/jYc1xQQQ== dependencies: "@techpass/passport-openidconnect" "0.3.2" aws-sdk "2.1030.0" @@ -322,12 +322,12 @@ uuid "8.3.2" zlib "1.0.5" -"@budibase/pro@1.0.212": - version "1.0.212" - resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-1.0.212.tgz#d6d2528b9ec2ec47e79d3360d04feeb5d2900d1e" - integrity sha512-RcbDmz3pkReUHXAJDPzvgTYy0CBksw55XLbW0wNtDu2HVWP0ZXoiMMJjOxNDwMfL3q4eZitWgISa7QUDisDtMA== +"@budibase/pro@1.0.213": + version "1.0.213" + resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-1.0.213.tgz#80e6005bec51927d373d278dd8d8672c2f25a4d5" + integrity sha512-zhTMPZBv0IkQsdKz1ywnWaxmt/PMrw/EkW1dS8bIOAqHgFTUgawiMGrqrzH43Iw3JemMK7AvtI1EOhs+zrMWVg== dependencies: - "@budibase/backend-core" "1.0.212" + "@budibase/backend-core" "1.0.213" node-fetch "^2.6.1" "@cspotcode/source-map-consumer@0.8.0": From 3016874fca92b63f26f2fcd62f5e037923495fb4 Mon Sep 17 00:00:00 2001 From: Mel O'Hagan Date: Wed, 29 Jun 2022 13:12:51 +0100 Subject: [PATCH 2/5] Use default config when resetting smtp --- .../src/pages/builder/portal/manage/email/index.svelte | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/builder/src/pages/builder/portal/manage/email/index.svelte b/packages/builder/src/pages/builder/portal/manage/email/index.svelte index 53c881b65b..812aa5b014 100644 --- a/packages/builder/src/pages/builder/portal/manage/email/index.svelte +++ b/packages/builder/src/pages/builder/portal/manage/email/index.svelte @@ -74,7 +74,10 @@ rev: smtpConfig._rev, }) smtpConfig = { - config: {}, + type: ConfigTypes.SMTP, + config: { + secure: true, + }, } await admin.getChecklist() notifications.success(`Settings cleared`) From 7049ef7381417a9c44d92d0d5e6f254234d2e3fa Mon Sep 17 00:00:00 2001 From: Mel O'Hagan Date: Fri, 8 Jul 2022 14:53:34 +0100 Subject: [PATCH 3/5] Add await to cache delete --- packages/worker/src/api/controllers/global/configs.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/worker/src/api/controllers/global/configs.js b/packages/worker/src/api/controllers/global/configs.js index 41b9853ad5..54de62a2aa 100644 --- a/packages/worker/src/api/controllers/global/configs.js +++ b/packages/worker/src/api/controllers/global/configs.js @@ -368,7 +368,7 @@ exports.destroy = async function (ctx) { const { id, rev } = ctx.params try { await db.remove(id, rev) - cache.delete(CacheKeys.CHECKLIST) + await cache.delete(CacheKeys.CHECKLIST) ctx.body = { message: "Config deleted successfully" } } catch (err) { ctx.throw(err.status, err) From 8fbfe2f7ccdad69356022ebe1524fbae1a26f4e4 Mon Sep 17 00:00:00 2001 From: Budibase Staging Release Bot <> Date: Fri, 8 Jul 2022 14:43:13 +0000 Subject: [PATCH 4/5] v1.0.219-alpha.17 --- lerna.json | 2 +- packages/backend-core/package.json | 4 ++-- packages/bbui/package.json | 4 ++-- packages/builder/package.json | 10 +++++----- packages/cli/package.json | 2 +- packages/client/package.json | 8 ++++---- packages/frontend-core/package.json | 4 ++-- packages/server/package.json | 10 +++++----- packages/string-templates/package.json | 2 +- packages/types/package.json | 2 +- packages/worker/package.json | 8 ++++---- 11 files changed, 28 insertions(+), 28 deletions(-) diff --git a/lerna.json b/lerna.json index 53939d3bd6..703de112a8 100644 --- a/lerna.json +++ b/lerna.json @@ -1,5 +1,5 @@ { - "version": "1.0.219-alpha.16", + "version": "1.0.219-alpha.17", "npmClient": "yarn", "packages": [ "packages/*" diff --git a/packages/backend-core/package.json b/packages/backend-core/package.json index bf47aaae86..3db22f6f1e 100644 --- a/packages/backend-core/package.json +++ b/packages/backend-core/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/backend-core", - "version": "1.0.219-alpha.16", + "version": "1.0.219-alpha.17", "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": "^1.0.219-alpha.16", + "@budibase/types": "^1.0.219-alpha.17", "@techpass/passport-openidconnect": "0.3.2", "aws-sdk": "2.1030.0", "bcrypt": "5.0.1", diff --git a/packages/bbui/package.json b/packages/bbui/package.json index d569614d6b..b8fa39aced 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": "1.0.219-alpha.16", + "version": "1.0.219-alpha.17", "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": "^1.0.219-alpha.16", + "@budibase/string-templates": "^1.0.219-alpha.17", "@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 8aa08ca7d2..109fd6db0e 100644 --- a/packages/builder/package.json +++ b/packages/builder/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/builder", - "version": "1.0.219-alpha.16", + "version": "1.0.219-alpha.17", "license": "GPL-3.0", "private": true, "scripts": { @@ -69,10 +69,10 @@ } }, "dependencies": { - "@budibase/bbui": "^1.0.219-alpha.16", - "@budibase/client": "^1.0.219-alpha.16", - "@budibase/frontend-core": "^1.0.219-alpha.16", - "@budibase/string-templates": "^1.0.219-alpha.16", + "@budibase/bbui": "^1.0.219-alpha.17", + "@budibase/client": "^1.0.219-alpha.17", + "@budibase/frontend-core": "^1.0.219-alpha.17", + "@budibase/string-templates": "^1.0.219-alpha.17", "@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 1fbb876fcb..4258723937 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/cli", - "version": "1.0.219-alpha.16", + "version": "1.0.219-alpha.17", "description": "Budibase CLI, for developers, self hosting and migrations.", "main": "src/index.js", "bin": { diff --git a/packages/client/package.json b/packages/client/package.json index cdbf663be1..2d464b2b52 100644 --- a/packages/client/package.json +++ b/packages/client/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/client", - "version": "1.0.219-alpha.16", + "version": "1.0.219-alpha.17", "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": "^1.0.219-alpha.16", - "@budibase/frontend-core": "^1.0.219-alpha.16", - "@budibase/string-templates": "^1.0.219-alpha.16", + "@budibase/bbui": "^1.0.219-alpha.17", + "@budibase/frontend-core": "^1.0.219-alpha.17", + "@budibase/string-templates": "^1.0.219-alpha.17", "@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 beb3eec083..c456e5a13d 100644 --- a/packages/frontend-core/package.json +++ b/packages/frontend-core/package.json @@ -1,12 +1,12 @@ { "name": "@budibase/frontend-core", - "version": "1.0.219-alpha.16", + "version": "1.0.219-alpha.17", "description": "Budibase frontend core libraries used in builder and client", "author": "Budibase", "license": "MPL-2.0", "svelte": "src/index.js", "dependencies": { - "@budibase/bbui": "^1.0.219-alpha.16", + "@budibase/bbui": "^1.0.219-alpha.17", "lodash": "^4.17.21", "svelte": "^3.46.2" } diff --git a/packages/server/package.json b/packages/server/package.json index 667194f038..f042fec392 100644 --- a/packages/server/package.json +++ b/packages/server/package.json @@ -1,7 +1,7 @@ { "name": "@budibase/server", "email": "hi@budibase.com", - "version": "1.0.219-alpha.16", + "version": "1.0.219-alpha.17", "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": "^1.0.219-alpha.16", - "@budibase/client": "^1.0.219-alpha.16", + "@budibase/backend-core": "^1.0.219-alpha.17", + "@budibase/client": "^1.0.219-alpha.17", "@budibase/pro": "1.0.219-alpha.16", - "@budibase/string-templates": "^1.0.219-alpha.16", - "@budibase/types": "^1.0.219-alpha.16", + "@budibase/string-templates": "^1.0.219-alpha.17", + "@budibase/types": "^1.0.219-alpha.17", "@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 96dc3aa969..76c3d6ba2d 100644 --- a/packages/string-templates/package.json +++ b/packages/string-templates/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/string-templates", - "version": "1.0.219-alpha.16", + "version": "1.0.219-alpha.17", "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 997b95955d..8e0f2a183e 100644 --- a/packages/types/package.json +++ b/packages/types/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/types", - "version": "1.0.219-alpha.16", + "version": "1.0.219-alpha.17", "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 42e6f1fff2..a85eea6cbd 100644 --- a/packages/worker/package.json +++ b/packages/worker/package.json @@ -1,7 +1,7 @@ { "name": "@budibase/worker", "email": "hi@budibase.com", - "version": "1.0.219-alpha.16", + "version": "1.0.219-alpha.17", "description": "Budibase background service", "main": "src/index.ts", "repository": { @@ -34,10 +34,10 @@ "author": "Budibase", "license": "GPL-3.0", "dependencies": { - "@budibase/backend-core": "^1.0.219-alpha.16", + "@budibase/backend-core": "^1.0.219-alpha.17", "@budibase/pro": "1.0.219-alpha.16", - "@budibase/string-templates": "^1.0.219-alpha.16", - "@budibase/types": "^1.0.219-alpha.16", + "@budibase/string-templates": "^1.0.219-alpha.17", + "@budibase/types": "^1.0.219-alpha.17", "@koa/router": "8.0.8", "@sentry/node": "6.17.7", "@techpass/passport-openidconnect": "0.3.2", From 9a76a44290f0405f3165529b38a1bcde8e2e0dbe Mon Sep 17 00:00:00 2001 From: Budibase Staging Release Bot <> Date: Fri, 8 Jul 2022 14:44:38 +0000 Subject: [PATCH 5/5] Update pro version to 1.0.219-alpha.17 --- packages/server/package.json | 2 +- packages/worker/package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/server/package.json b/packages/server/package.json index f042fec392..4aed34e61c 100644 --- a/packages/server/package.json +++ b/packages/server/package.json @@ -79,7 +79,7 @@ "@apidevtools/swagger-parser": "10.0.3", "@budibase/backend-core": "^1.0.219-alpha.17", "@budibase/client": "^1.0.219-alpha.17", - "@budibase/pro": "1.0.219-alpha.16", + "@budibase/pro": "1.0.219-alpha.17", "@budibase/string-templates": "^1.0.219-alpha.17", "@budibase/types": "^1.0.219-alpha.17", "@bull-board/api": "3.7.0", diff --git a/packages/worker/package.json b/packages/worker/package.json index a85eea6cbd..a726956c6b 100644 --- a/packages/worker/package.json +++ b/packages/worker/package.json @@ -35,7 +35,7 @@ "license": "GPL-3.0", "dependencies": { "@budibase/backend-core": "^1.0.219-alpha.17", - "@budibase/pro": "1.0.219-alpha.16", + "@budibase/pro": "1.0.219-alpha.17", "@budibase/string-templates": "^1.0.219-alpha.17", "@budibase/types": "^1.0.219-alpha.17", "@koa/router": "8.0.8",