From 9fcedfa9792ea3a39d42209d1b007c6463fabcd5 Mon Sep 17 00:00:00 2001 From: Dean Date: Wed, 6 Jul 2022 11:51:48 +0100 Subject: [PATCH 01/12] Properly invalidate the cached user ensuring up-to-date credentials are always used --- packages/backend-core/src/auth.js | 4 ++++ packages/server/src/threads/query.js | 17 ++++++++--------- 2 files changed, 12 insertions(+), 9 deletions(-) diff --git a/packages/backend-core/src/auth.js b/packages/backend-core/src/auth.js index b6d6a2027f..b60144a0de 100644 --- a/packages/backend-core/src/auth.js +++ b/packages/backend-core/src/auth.js @@ -20,6 +20,8 @@ const { internalApi, } = require("./middleware") +const { invalidateUser } = require("./cache/user") + // Strategies passport.use(new LocalStrategy(local.options, local.authenticate)) passport.use(new JwtStrategy(jwt.options, jwt.authenticate)) @@ -149,6 +151,8 @@ async function updateUserOAuth(userId, oAuthConfig) { } await db.put(dbUser) + + await invalidateUser(userId) } catch (e) { console.error("Could not update OAuth details for current user", e) } diff --git a/packages/server/src/threads/query.js b/packages/server/src/threads/query.js index e85fde970e..fa5cc3aa67 100644 --- a/packages/server/src/threads/query.js +++ b/packages/server/src/threads/query.js @@ -8,6 +8,7 @@ const { refreshOAuthToken, updateUserOAuth, } = require("@budibase/backend-core/auth") +const { user: userCache } = require("@budibase/backend-core/cache") const { getGlobalIDFromUserMetadataID } = require("../db/utils") const { isSQL } = require("../integrations/utils") @@ -112,15 +113,9 @@ class QueryRunner { info.code === 401 && !this.hasRefreshedOAuth ) { + await this.refreshOAuth2(this.ctx) // Attempt to refresh the access token from the provider this.hasRefreshedOAuth = true - const authResponse = await this.refreshOAuth2(this.ctx) - - if (!authResponse || authResponse.err) { - // In this event the user may have oAuth issues that - // could require re-authenticating with their provider. - throw new Error("OAuth2 access token could not be refreshed") - } } this.hasRerun = true @@ -174,8 +169,7 @@ class QueryRunner { const { configId } = ctx.auth if (!providerType || !oauth2?.refreshToken) { - console.error("No refresh token found for authenticated user") - return + throw new Error("No refresh token found for authenticated user") } const resp = await refreshOAuthToken( @@ -189,6 +183,11 @@ class QueryRunner { if (!resp.error) { const globalUserId = getGlobalIDFromUserMetadataID(_id) await updateUserOAuth(globalUserId, resp) + this.ctx.user = await userCache.getUser(globalUserId) + } else { + // In this event the user may have oAuth issues that + // could require re-authenticating with their provider. + throw new Error("OAuth2 access token could not be refreshed") } return resp From 084a469442dd236dc4f33840e37898f1268fc28f Mon Sep 17 00:00:00 2001 From: Dean Date: Wed, 6 Jul 2022 13:03:25 +0100 Subject: [PATCH 02/12] Surface refresh process error messaging --- packages/server/src/threads/query.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/server/src/threads/query.js b/packages/server/src/threads/query.js index fa5cc3aa67..366155ecec 100644 --- a/packages/server/src/threads/query.js +++ b/packages/server/src/threads/query.js @@ -180,14 +180,14 @@ class QueryRunner { // Refresh session flow. Should be in same location as refreshOAuthToken // There are several other properties available in 'resp' - if (!resp.error) { + if (!resp.err) { const globalUserId = getGlobalIDFromUserMetadataID(_id) await updateUserOAuth(globalUserId, resp) this.ctx.user = await userCache.getUser(globalUserId) } else { // In this event the user may have oAuth issues that // could require re-authenticating with their provider. - throw new Error("OAuth2 access token could not be refreshed") + throw new Error("OAuth2 access token could not be refreshed: " + resp.err.toString()) } return resp From a59d0c7f317e3e294586e60a2fefdb6aa3b252f2 Mon Sep 17 00:00:00 2001 From: Dean Date: Wed, 6 Jul 2022 13:09:13 +0100 Subject: [PATCH 03/12] Linting commit --- packages/server/src/threads/query.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/server/src/threads/query.js b/packages/server/src/threads/query.js index 366155ecec..7c94c3d25a 100644 --- a/packages/server/src/threads/query.js +++ b/packages/server/src/threads/query.js @@ -187,7 +187,9 @@ class QueryRunner { } else { // In this event the user may have oAuth issues that // could require re-authenticating with their provider. - throw new Error("OAuth2 access token could not be refreshed: " + resp.err.toString()) + throw new Error( + "OAuth2 access token could not be refreshed: " + resp.err.toString() + ) } return resp From 3e98e682595118c5904e6997201dedb16adae39b Mon Sep 17 00:00:00 2001 From: Budibase Staging Release Bot <> Date: Wed, 6 Jul 2022 12:16:08 +0000 Subject: [PATCH 04/12] v1.0.219-alpha.1 --- 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 c4e57cdc6a..9f3e343a5f 100644 --- a/lerna.json +++ b/lerna.json @@ -1,5 +1,5 @@ { - "version": "1.0.219-alpha.0", + "version": "1.0.219-alpha.1", "npmClient": "yarn", "packages": [ "packages/*" diff --git a/packages/backend-core/package.json b/packages/backend-core/package.json index 69c901495d..c8accc4078 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.0", + "version": "1.0.219-alpha.1", "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.0", + "@budibase/types": "^1.0.219-alpha.1", "@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 bb80981f5c..b232a95dc2 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.0", + "version": "1.0.219-alpha.1", "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.0", + "@budibase/string-templates": "^1.0.219-alpha.1", "@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 58c11f88a1..38b12c287b 100644 --- a/packages/builder/package.json +++ b/packages/builder/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/builder", - "version": "1.0.219-alpha.0", + "version": "1.0.219-alpha.1", "license": "GPL-3.0", "private": true, "scripts": { @@ -69,10 +69,10 @@ } }, "dependencies": { - "@budibase/bbui": "^1.0.219-alpha.0", - "@budibase/client": "^1.0.219-alpha.0", - "@budibase/frontend-core": "^1.0.219-alpha.0", - "@budibase/string-templates": "^1.0.219-alpha.0", + "@budibase/bbui": "^1.0.219-alpha.1", + "@budibase/client": "^1.0.219-alpha.1", + "@budibase/frontend-core": "^1.0.219-alpha.1", + "@budibase/string-templates": "^1.0.219-alpha.1", "@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 e8b8c11dd4..61046d567f 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/cli", - "version": "1.0.219-alpha.0", + "version": "1.0.219-alpha.1", "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 6607817cee..8ff5c9e18b 100644 --- a/packages/client/package.json +++ b/packages/client/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/client", - "version": "1.0.219-alpha.0", + "version": "1.0.219-alpha.1", "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.0", - "@budibase/frontend-core": "^1.0.219-alpha.0", - "@budibase/string-templates": "^1.0.219-alpha.0", + "@budibase/bbui": "^1.0.219-alpha.1", + "@budibase/frontend-core": "^1.0.219-alpha.1", + "@budibase/string-templates": "^1.0.219-alpha.1", "@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 9570d33278..255a31096d 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.0", + "version": "1.0.219-alpha.1", "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.0", + "@budibase/bbui": "^1.0.219-alpha.1", "lodash": "^4.17.21", "svelte": "^3.46.2" } diff --git a/packages/server/package.json b/packages/server/package.json index 8a31e8353f..767a30ec80 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.0", + "version": "1.0.219-alpha.1", "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.0", - "@budibase/client": "^1.0.219-alpha.0", + "@budibase/backend-core": "^1.0.219-alpha.1", + "@budibase/client": "^1.0.219-alpha.1", "@budibase/pro": "1.0.219-alpha.0", - "@budibase/string-templates": "^1.0.219-alpha.0", - "@budibase/types": "^1.0.219-alpha.0", + "@budibase/string-templates": "^1.0.219-alpha.1", + "@budibase/types": "^1.0.219-alpha.1", "@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 0c0e1dc404..bd585344eb 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.0", + "version": "1.0.219-alpha.1", "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 3be285c768..a3f0735616 100644 --- a/packages/types/package.json +++ b/packages/types/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/types", - "version": "1.0.219-alpha.0", + "version": "1.0.219-alpha.1", "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 fdfa10f6c2..70366f90f8 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.0", + "version": "1.0.219-alpha.1", "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.0", + "@budibase/backend-core": "^1.0.219-alpha.1", "@budibase/pro": "1.0.219-alpha.0", - "@budibase/string-templates": "^1.0.219-alpha.0", - "@budibase/types": "^1.0.219-alpha.0", + "@budibase/string-templates": "^1.0.219-alpha.1", + "@budibase/types": "^1.0.219-alpha.1", "@koa/router": "8.0.8", "@sentry/node": "6.17.7", "@techpass/passport-openidconnect": "0.3.2", From fd29942f333ab89eaa84e07e8e66603019dee574 Mon Sep 17 00:00:00 2001 From: Budibase Staging Release Bot <> Date: Wed, 6 Jul 2022 12:17:39 +0000 Subject: [PATCH 05/12] Update pro version to 1.0.219-alpha.1 --- 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 767a30ec80..f89c74605c 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.1", "@budibase/client": "^1.0.219-alpha.1", - "@budibase/pro": "1.0.219-alpha.0", + "@budibase/pro": "1.0.219-alpha.1", "@budibase/string-templates": "^1.0.219-alpha.1", "@budibase/types": "^1.0.219-alpha.1", "@bull-board/api": "3.7.0", diff --git a/packages/worker/package.json b/packages/worker/package.json index 70366f90f8..ae5309d084 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.1", - "@budibase/pro": "1.0.219-alpha.0", + "@budibase/pro": "1.0.219-alpha.1", "@budibase/string-templates": "^1.0.219-alpha.1", "@budibase/types": "^1.0.219-alpha.1", "@koa/router": "8.0.8", From 097e088a3de184d2a202af20eb485ed86ae64676 Mon Sep 17 00:00:00 2001 From: mike12345567 Date: Wed, 6 Jul 2022 13:36:29 +0100 Subject: [PATCH 06/12] Adding null parameter so that TS doesn't build with strict requirement. --- packages/backend-core/src/logging.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/backend-core/src/logging.js b/packages/backend-core/src/logging.js index 6ab5bff44a..425d7f8133 100644 --- a/packages/backend-core/src/logging.js +++ b/packages/backend-core/src/logging.js @@ -4,7 +4,7 @@ function isSuppressed(e) { return e && e["suppressAlert"] } -module.exports.logAlert = (message, e) => { +module.exports.logAlert = (message, e = null) => { if (e && NonErrors.includes(e.name) && isSuppressed(e)) { return } From e9297e0379f3c7752970b953dda4a746670a6f39 Mon Sep 17 00:00:00 2001 From: Budibase Staging Release Bot <> Date: Wed, 6 Jul 2022 12:36:37 +0000 Subject: [PATCH 07/12] v1.0.219-alpha.2 --- 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 9f3e343a5f..2095c8b22e 100644 --- a/lerna.json +++ b/lerna.json @@ -1,5 +1,5 @@ { - "version": "1.0.219-alpha.1", + "version": "1.0.219-alpha.2", "npmClient": "yarn", "packages": [ "packages/*" diff --git a/packages/backend-core/package.json b/packages/backend-core/package.json index c8accc4078..ceea64a602 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.1", + "version": "1.0.219-alpha.2", "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.1", + "@budibase/types": "^1.0.219-alpha.2", "@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 b232a95dc2..1bc475584a 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.1", + "version": "1.0.219-alpha.2", "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.1", + "@budibase/string-templates": "^1.0.219-alpha.2", "@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 38b12c287b..43aa383458 100644 --- a/packages/builder/package.json +++ b/packages/builder/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/builder", - "version": "1.0.219-alpha.1", + "version": "1.0.219-alpha.2", "license": "GPL-3.0", "private": true, "scripts": { @@ -69,10 +69,10 @@ } }, "dependencies": { - "@budibase/bbui": "^1.0.219-alpha.1", - "@budibase/client": "^1.0.219-alpha.1", - "@budibase/frontend-core": "^1.0.219-alpha.1", - "@budibase/string-templates": "^1.0.219-alpha.1", + "@budibase/bbui": "^1.0.219-alpha.2", + "@budibase/client": "^1.0.219-alpha.2", + "@budibase/frontend-core": "^1.0.219-alpha.2", + "@budibase/string-templates": "^1.0.219-alpha.2", "@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 61046d567f..9faa5334f5 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/cli", - "version": "1.0.219-alpha.1", + "version": "1.0.219-alpha.2", "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 8ff5c9e18b..3a4bc0cf91 100644 --- a/packages/client/package.json +++ b/packages/client/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/client", - "version": "1.0.219-alpha.1", + "version": "1.0.219-alpha.2", "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.1", - "@budibase/frontend-core": "^1.0.219-alpha.1", - "@budibase/string-templates": "^1.0.219-alpha.1", + "@budibase/bbui": "^1.0.219-alpha.2", + "@budibase/frontend-core": "^1.0.219-alpha.2", + "@budibase/string-templates": "^1.0.219-alpha.2", "@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 255a31096d..7d2ef8aafa 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.1", + "version": "1.0.219-alpha.2", "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.1", + "@budibase/bbui": "^1.0.219-alpha.2", "lodash": "^4.17.21", "svelte": "^3.46.2" } diff --git a/packages/server/package.json b/packages/server/package.json index f89c74605c..6f6481c1a6 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.1", + "version": "1.0.219-alpha.2", "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.1", - "@budibase/client": "^1.0.219-alpha.1", + "@budibase/backend-core": "^1.0.219-alpha.2", + "@budibase/client": "^1.0.219-alpha.2", "@budibase/pro": "1.0.219-alpha.1", - "@budibase/string-templates": "^1.0.219-alpha.1", - "@budibase/types": "^1.0.219-alpha.1", + "@budibase/string-templates": "^1.0.219-alpha.2", + "@budibase/types": "^1.0.219-alpha.2", "@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 bd585344eb..3d983b376e 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.1", + "version": "1.0.219-alpha.2", "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 a3f0735616..9f453e8d47 100644 --- a/packages/types/package.json +++ b/packages/types/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/types", - "version": "1.0.219-alpha.1", + "version": "1.0.219-alpha.2", "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 ae5309d084..6d457e0541 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.1", + "version": "1.0.219-alpha.2", "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.1", + "@budibase/backend-core": "^1.0.219-alpha.2", "@budibase/pro": "1.0.219-alpha.1", - "@budibase/string-templates": "^1.0.219-alpha.1", - "@budibase/types": "^1.0.219-alpha.1", + "@budibase/string-templates": "^1.0.219-alpha.2", + "@budibase/types": "^1.0.219-alpha.2", "@koa/router": "8.0.8", "@sentry/node": "6.17.7", "@techpass/passport-openidconnect": "0.3.2", From 7b55dc5c31a4cc936fd8803668f214982efe83ed Mon Sep 17 00:00:00 2001 From: Budibase Staging Release Bot <> Date: Wed, 6 Jul 2022 12:48:30 +0000 Subject: [PATCH 08/12] v1.0.219-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 | 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 2095c8b22e..e803a4dadc 100644 --- a/lerna.json +++ b/lerna.json @@ -1,5 +1,5 @@ { - "version": "1.0.219-alpha.2", + "version": "1.0.219-alpha.3", "npmClient": "yarn", "packages": [ "packages/*" diff --git a/packages/backend-core/package.json b/packages/backend-core/package.json index ceea64a602..fb369a67e3 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.2", + "version": "1.0.219-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": "^1.0.219-alpha.2", + "@budibase/types": "^1.0.219-alpha.3", "@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 1bc475584a..0e28f500f4 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.2", + "version": "1.0.219-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": "^1.0.219-alpha.2", + "@budibase/string-templates": "^1.0.219-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 43aa383458..dda6d07002 100644 --- a/packages/builder/package.json +++ b/packages/builder/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/builder", - "version": "1.0.219-alpha.2", + "version": "1.0.219-alpha.3", "license": "GPL-3.0", "private": true, "scripts": { @@ -69,10 +69,10 @@ } }, "dependencies": { - "@budibase/bbui": "^1.0.219-alpha.2", - "@budibase/client": "^1.0.219-alpha.2", - "@budibase/frontend-core": "^1.0.219-alpha.2", - "@budibase/string-templates": "^1.0.219-alpha.2", + "@budibase/bbui": "^1.0.219-alpha.3", + "@budibase/client": "^1.0.219-alpha.3", + "@budibase/frontend-core": "^1.0.219-alpha.3", + "@budibase/string-templates": "^1.0.219-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 9faa5334f5..510f090792 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/cli", - "version": "1.0.219-alpha.2", + "version": "1.0.219-alpha.3", "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 3a4bc0cf91..c9bf0bd100 100644 --- a/packages/client/package.json +++ b/packages/client/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/client", - "version": "1.0.219-alpha.2", + "version": "1.0.219-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": "^1.0.219-alpha.2", - "@budibase/frontend-core": "^1.0.219-alpha.2", - "@budibase/string-templates": "^1.0.219-alpha.2", + "@budibase/bbui": "^1.0.219-alpha.3", + "@budibase/frontend-core": "^1.0.219-alpha.3", + "@budibase/string-templates": "^1.0.219-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 7d2ef8aafa..c69606283f 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.2", + "version": "1.0.219-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": "^1.0.219-alpha.2", + "@budibase/bbui": "^1.0.219-alpha.3", "lodash": "^4.17.21", "svelte": "^3.46.2" } diff --git a/packages/server/package.json b/packages/server/package.json index 6f6481c1a6..0a273fa5c5 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.2", + "version": "1.0.219-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": "^1.0.219-alpha.2", - "@budibase/client": "^1.0.219-alpha.2", + "@budibase/backend-core": "^1.0.219-alpha.3", + "@budibase/client": "^1.0.219-alpha.3", "@budibase/pro": "1.0.219-alpha.1", - "@budibase/string-templates": "^1.0.219-alpha.2", - "@budibase/types": "^1.0.219-alpha.2", + "@budibase/string-templates": "^1.0.219-alpha.3", + "@budibase/types": "^1.0.219-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 3d983b376e..1c47e1f786 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.2", + "version": "1.0.219-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 9f453e8d47..6d640ebc57 100644 --- a/packages/types/package.json +++ b/packages/types/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/types", - "version": "1.0.219-alpha.2", + "version": "1.0.219-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 6d457e0541..4b944b4494 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.2", + "version": "1.0.219-alpha.3", "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.2", + "@budibase/backend-core": "^1.0.219-alpha.3", "@budibase/pro": "1.0.219-alpha.1", - "@budibase/string-templates": "^1.0.219-alpha.2", - "@budibase/types": "^1.0.219-alpha.2", + "@budibase/string-templates": "^1.0.219-alpha.3", + "@budibase/types": "^1.0.219-alpha.3", "@koa/router": "8.0.8", "@sentry/node": "6.17.7", "@techpass/passport-openidconnect": "0.3.2", From 14818be40c27d839306121d128fcbcdabe27e70a Mon Sep 17 00:00:00 2001 From: Budibase Staging Release Bot <> Date: Wed, 6 Jul 2022 12:49:59 +0000 Subject: [PATCH 09/12] Update pro version to 1.0.219-alpha.3 --- 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 0a273fa5c5..af72a72509 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.3", "@budibase/client": "^1.0.219-alpha.3", - "@budibase/pro": "1.0.219-alpha.1", + "@budibase/pro": "1.0.219-alpha.3", "@budibase/string-templates": "^1.0.219-alpha.3", "@budibase/types": "^1.0.219-alpha.3", "@bull-board/api": "3.7.0", diff --git a/packages/worker/package.json b/packages/worker/package.json index 4b944b4494..718119ce7b 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.3", - "@budibase/pro": "1.0.219-alpha.1", + "@budibase/pro": "1.0.219-alpha.3", "@budibase/string-templates": "^1.0.219-alpha.3", "@budibase/types": "^1.0.219-alpha.3", "@koa/router": "8.0.8", From 3cc8b7d4a96059d7025da8e367d7743b86f8090d Mon Sep 17 00:00:00 2001 From: mike12345567 Date: Wed, 6 Jul 2022 14:04:04 +0100 Subject: [PATCH 10/12] Updating logging to typescript to fix build issue. --- packages/backend-core/src/{logging.js => logging.ts} | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) rename packages/backend-core/src/{logging.js => logging.ts} (72%) diff --git a/packages/backend-core/src/logging.js b/packages/backend-core/src/logging.ts similarity index 72% rename from packages/backend-core/src/logging.js rename to packages/backend-core/src/logging.ts index 425d7f8133..68c3307b2f 100644 --- a/packages/backend-core/src/logging.js +++ b/packages/backend-core/src/logging.ts @@ -1,10 +1,10 @@ const NonErrors = ["AccountError"] -function isSuppressed(e) { +function isSuppressed(e?: any) { return e && e["suppressAlert"] } -module.exports.logAlert = (message, e = null) => { +export function logAlert(message: string, e?: any) { if (e && NonErrors.includes(e.name) && isSuppressed(e)) { return } @@ -14,3 +14,7 @@ module.exports.logAlert = (message, e = null) => { } console.error(`bb-alert: ${message} ${errorJson}`) } + +export default { + logAlert, +} From 4ad3c6062b451811f6a143cdf53ccdbd3d3b8692 Mon Sep 17 00:00:00 2001 From: Budibase Staging Release Bot <> Date: Wed, 6 Jul 2022 13:14:14 +0000 Subject: [PATCH 11/12] v1.0.219-alpha.4 --- 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 e803a4dadc..c09909feef 100644 --- a/lerna.json +++ b/lerna.json @@ -1,5 +1,5 @@ { - "version": "1.0.219-alpha.3", + "version": "1.0.219-alpha.4", "npmClient": "yarn", "packages": [ "packages/*" diff --git a/packages/backend-core/package.json b/packages/backend-core/package.json index fb369a67e3..a2a2dcba42 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.3", + "version": "1.0.219-alpha.4", "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.3", + "@budibase/types": "^1.0.219-alpha.4", "@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 0e28f500f4..fccfe931f3 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.3", + "version": "1.0.219-alpha.4", "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.3", + "@budibase/string-templates": "^1.0.219-alpha.4", "@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 dda6d07002..9ac12795a8 100644 --- a/packages/builder/package.json +++ b/packages/builder/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/builder", - "version": "1.0.219-alpha.3", + "version": "1.0.219-alpha.4", "license": "GPL-3.0", "private": true, "scripts": { @@ -69,10 +69,10 @@ } }, "dependencies": { - "@budibase/bbui": "^1.0.219-alpha.3", - "@budibase/client": "^1.0.219-alpha.3", - "@budibase/frontend-core": "^1.0.219-alpha.3", - "@budibase/string-templates": "^1.0.219-alpha.3", + "@budibase/bbui": "^1.0.219-alpha.4", + "@budibase/client": "^1.0.219-alpha.4", + "@budibase/frontend-core": "^1.0.219-alpha.4", + "@budibase/string-templates": "^1.0.219-alpha.4", "@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 510f090792..132b84b52a 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/cli", - "version": "1.0.219-alpha.3", + "version": "1.0.219-alpha.4", "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 c9bf0bd100..3f31fc0629 100644 --- a/packages/client/package.json +++ b/packages/client/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/client", - "version": "1.0.219-alpha.3", + "version": "1.0.219-alpha.4", "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.3", - "@budibase/frontend-core": "^1.0.219-alpha.3", - "@budibase/string-templates": "^1.0.219-alpha.3", + "@budibase/bbui": "^1.0.219-alpha.4", + "@budibase/frontend-core": "^1.0.219-alpha.4", + "@budibase/string-templates": "^1.0.219-alpha.4", "@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 c69606283f..6e58680277 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.3", + "version": "1.0.219-alpha.4", "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.3", + "@budibase/bbui": "^1.0.219-alpha.4", "lodash": "^4.17.21", "svelte": "^3.46.2" } diff --git a/packages/server/package.json b/packages/server/package.json index af72a72509..b6454ad5ed 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.3", + "version": "1.0.219-alpha.4", "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.3", - "@budibase/client": "^1.0.219-alpha.3", + "@budibase/backend-core": "^1.0.219-alpha.4", + "@budibase/client": "^1.0.219-alpha.4", "@budibase/pro": "1.0.219-alpha.3", - "@budibase/string-templates": "^1.0.219-alpha.3", - "@budibase/types": "^1.0.219-alpha.3", + "@budibase/string-templates": "^1.0.219-alpha.4", + "@budibase/types": "^1.0.219-alpha.4", "@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 1c47e1f786..69f13e9c24 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.3", + "version": "1.0.219-alpha.4", "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 6d640ebc57..c584e755c1 100644 --- a/packages/types/package.json +++ b/packages/types/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/types", - "version": "1.0.219-alpha.3", + "version": "1.0.219-alpha.4", "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 718119ce7b..0d07429892 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.3", + "version": "1.0.219-alpha.4", "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.3", + "@budibase/backend-core": "^1.0.219-alpha.4", "@budibase/pro": "1.0.219-alpha.3", - "@budibase/string-templates": "^1.0.219-alpha.3", - "@budibase/types": "^1.0.219-alpha.3", + "@budibase/string-templates": "^1.0.219-alpha.4", + "@budibase/types": "^1.0.219-alpha.4", "@koa/router": "8.0.8", "@sentry/node": "6.17.7", "@techpass/passport-openidconnect": "0.3.2", From b8c017879c627257398b5015b0d43d653e76186e Mon Sep 17 00:00:00 2001 From: Budibase Staging Release Bot <> Date: Wed, 6 Jul 2022 13:15:48 +0000 Subject: [PATCH 12/12] Update pro version to 1.0.219-alpha.4 --- 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 b6454ad5ed..b3080d89f4 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.4", "@budibase/client": "^1.0.219-alpha.4", - "@budibase/pro": "1.0.219-alpha.3", + "@budibase/pro": "1.0.219-alpha.4", "@budibase/string-templates": "^1.0.219-alpha.4", "@budibase/types": "^1.0.219-alpha.4", "@bull-board/api": "3.7.0", diff --git a/packages/worker/package.json b/packages/worker/package.json index 0d07429892..51c812c673 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.4", - "@budibase/pro": "1.0.219-alpha.3", + "@budibase/pro": "1.0.219-alpha.4", "@budibase/string-templates": "^1.0.219-alpha.4", "@budibase/types": "^1.0.219-alpha.4", "@koa/router": "8.0.8",