diff --git a/lerna.json b/lerna.json index 9c19e33343..7899c71f2d 100644 --- a/lerna.json +++ b/lerna.json @@ -1,5 +1,5 @@ { - "version": "1.0.41", + "version": "1.0.47", "npmClient": "yarn", "packages": [ "packages/*" diff --git a/packages/backend-core/package.json b/packages/backend-core/package.json index 03b215be56..ef49cd6307 100644 --- a/packages/backend-core/package.json +++ b/packages/backend-core/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/backend-core", - "version": "1.0.41", + "version": "1.0.47", "description": "Budibase backend core libraries used in server and worker", "main": "src/index.js", "author": "Budibase", diff --git a/packages/backend-core/src/environment.js b/packages/backend-core/src/environment.js index 3db59ab321..c26ad1c199 100644 --- a/packages/backend-core/src/environment.js +++ b/packages/backend-core/src/environment.js @@ -6,13 +6,6 @@ function isTest() { ) } -function isDev() { - return ( - process.env.NODE_ENV !== "production" && - process.env.BUDIBASE_ENVIRONMENT !== "production" - ) -} - module.exports = { JWT_SECRET: process.env.JWT_SECRET, COUCH_DB_URL: process.env.COUCH_DB_URL, @@ -34,7 +27,6 @@ module.exports = { COOKIE_DOMAIN: process.env.COOKIE_DOMAIN, PLATFORM_URL: process.env.PLATFORM_URL, isTest, - isDev, _set(key, value) { process.env[key] = value module.exports[key] = value diff --git a/packages/backend-core/src/middleware/passport/datasource/google.js b/packages/backend-core/src/middleware/passport/datasource/google.js index 474cb948a8..bfc2e4a61e 100644 --- a/packages/backend-core/src/middleware/passport/datasource/google.js +++ b/packages/backend-core/src/middleware/passport/datasource/google.js @@ -24,6 +24,8 @@ async function preAuth(passport, ctx, next) { return passport.authenticate(strategy, { scope: ["profile", "email", "https://www.googleapis.com/auth/spreadsheets"], + accessType: "offline", + prompt: "consent", })(ctx, next) } @@ -58,12 +60,10 @@ async function postAuth(passport, ctx, next) { // update the DB for the datasource with all the user info const db = getDB(authStateCookie.appId) const datasource = await db.get(authStateCookie.datasourceId) - datasource.config = { - auth: { - type: "google", - ...tokens, - }, + if (!datasource.config) { + datasource.config = {} } + datasource.config.auth = { type: "google", ...tokens } await db.put(datasource) ctx.redirect( `/builder/app/${authStateCookie.appId}/data/datasource/${authStateCookie.datasourceId}` diff --git a/packages/backend-core/src/utils.js b/packages/backend-core/src/utils.js index 37193885f1..8c00f2a8b8 100644 --- a/packages/backend-core/src/utils.js +++ b/packages/backend-core/src/utils.js @@ -23,7 +23,6 @@ const { getUserSessions, invalidateSessions } = require("./security/sessions") const { migrateIfRequired } = require("./migrations") const { USER_EMAIL_VIEW_CASING } = require("./migrations").MIGRATIONS const { GLOBAL_DB } = require("./migrations").MIGRATION_DBS -const { isDev, isTest } = require("./environment") const APP_PREFIX = DocumentTypes.APP + SEPARATOR @@ -109,11 +108,6 @@ exports.setCookie = (ctx, value, name = "builder", opts = { sign: true }) => { overwrite: true, } - if (!isDev() && !isTest()) { - config.sameSite = "none" - config.secure = true - } - if (environment.COOKIE_DOMAIN) { config.domain = environment.COOKIE_DOMAIN } diff --git a/packages/bbui/package.json b/packages/bbui/package.json index 02a1f3fdb5..04a8d2e522 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.41", + "version": "1.0.47", "license": "MPL-2.0", "svelte": "src/index.js", "module": "dist/bbui.es.js", diff --git a/packages/builder/package.json b/packages/builder/package.json index 555bb0701f..1d4e37c665 100644 --- a/packages/builder/package.json +++ b/packages/builder/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/builder", - "version": "1.0.41", + "version": "1.0.47", "license": "GPL-3.0", "private": true, "scripts": { @@ -65,10 +65,10 @@ } }, "dependencies": { - "@budibase/bbui": "^1.0.41", - "@budibase/client": "^1.0.41", + "@budibase/bbui": "^1.0.47", + "@budibase/client": "^1.0.47", "@budibase/colorpicker": "1.1.2", - "@budibase/string-templates": "^1.0.41", + "@budibase/string-templates": "^1.0.47", "@sentry/browser": "5.19.1", "@spectrum-css/page": "^3.0.1", "@spectrum-css/vars": "^3.0.1", diff --git a/packages/builder/src/components/design/PropertiesPanel/PropertyControls/ButtonActionEditor/actions/ExecuteQuery.svelte b/packages/builder/src/components/design/PropertiesPanel/PropertyControls/ButtonActionEditor/actions/ExecuteQuery.svelte index 88c7e87054..8c438e4b22 100644 --- a/packages/builder/src/components/design/PropertiesPanel/PropertyControls/ButtonActionEditor/actions/ExecuteQuery.svelte +++ b/packages/builder/src/components/design/PropertiesPanel/PropertyControls/ButtonActionEditor/actions/ExecuteQuery.svelte @@ -55,8 +55,8 @@