From 27946e5aaeb53a4f555e8511b70457cff9c96cf0 Mon Sep 17 00:00:00 2001 From: Rory Powell Date: Thu, 22 Jul 2021 17:21:12 +0100 Subject: [PATCH 01/14] Add lerna prereleases --- .github/workflows/release-develop.yml | 52 +++++++++++++++++++++++++++ package.json | 1 + 2 files changed, 53 insertions(+) create mode 100644 .github/workflows/release-develop.yml diff --git a/.github/workflows/release-develop.yml b/.github/workflows/release-develop.yml new file mode 100644 index 0000000000..f457b1e85c --- /dev/null +++ b/.github/workflows/release-develop.yml @@ -0,0 +1,52 @@ +name: Budibase Release + +on: + push: + branches: + - develop + +env: + POSTHOG_TOKEN: ${{ secrets.POSTHOG_TOKEN }} + POSTHOG_URL: ${{ secrets.POSTHOG_URL }} + SENTRY_DSN: ${{ secrets.SENTRY_DSN }} + +jobs: + release: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-node@v1 + with: + node-version: 12.x + - run: yarn + - run: yarn bootstrap + - run: yarn lint + - run: yarn build + - run: yarn test + + - name: Configure AWS Credentials + uses: aws-actions/configure-aws-credentials@v1 + with: + aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} + aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} + aws-region: eu-west-1 + + - name: Publish budibase packages to NPM + env: + NPM_TOKEN: ${{ secrets.NPM_TOKEN }} + run: | + # setup the username and email. I tend to use 'GitHub Actions Bot' with no email by default + git config user.name "Budibase Release Bot" + git config user.email "<>" + echo //registry.npmjs.org/:_authToken=${NPM_TOKEN} >> .npmrc + yarn release:develop + + - name: Build/release Docker images + run: | + docker login -u $DOCKER_USER -p $DOCKER_PASSWORD + yarn build + yarn build:docker + env: + DOCKER_USER: ${{ secrets.DOCKER_USERNAME }} + DOCKER_PASSWORD: ${{ secrets.DOCKER_API_KEY }} diff --git a/package.json b/package.json index 61ff67b076..4f545d935f 100644 --- a/package.json +++ b/package.json @@ -23,6 +23,7 @@ "publishdev": "lerna run publishdev", "publishnpm": "yarn build && lerna publish --force-publish", "release": "yarn build && lerna publish patch --yes --force-publish", + "release:develop": "yarn build && lerna publish prerelease --yes --force-publish --dist-tag develop", "restore": "yarn run clean && yarn run bootstrap && yarn run build", "nuke": "yarn run nuke:packages && yarn run nuke:docker", "nuke:packages": "yarn run restore", From 8a89c222ae62ff03d4ead9aaa60ca77287460e4a Mon Sep 17 00:00:00 2001 From: Rory Powell Date: Fri, 23 Jul 2021 09:44:03 +0100 Subject: [PATCH 02/14] Add unique name to staging release bot --- .github/workflows/release-develop.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release-develop.yml b/.github/workflows/release-develop.yml index f457b1e85c..daf3dae8c2 100644 --- a/.github/workflows/release-develop.yml +++ b/.github/workflows/release-develop.yml @@ -37,7 +37,7 @@ jobs: NPM_TOKEN: ${{ secrets.NPM_TOKEN }} run: | # setup the username and email. I tend to use 'GitHub Actions Bot' with no email by default - git config user.name "Budibase Release Bot" + git config user.name "Budibase Staging Release Bot" git config user.email "<>" echo //registry.npmjs.org/:_authToken=${NPM_TOKEN} >> .npmrc yarn release:develop From ff5e3ed94dc012b574dd450e11c8ac253b8c0d54 Mon Sep 17 00:00:00 2001 From: Rory Powell Date: Fri, 23 Jul 2021 10:02:12 +0100 Subject: [PATCH 03/14] Update build:docker -> build:docker:develop --- .github/workflows/release-develop.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release-develop.yml b/.github/workflows/release-develop.yml index daf3dae8c2..33f955fea1 100644 --- a/.github/workflows/release-develop.yml +++ b/.github/workflows/release-develop.yml @@ -46,7 +46,7 @@ jobs: run: | docker login -u $DOCKER_USER -p $DOCKER_PASSWORD yarn build - yarn build:docker + yarn build:docker:develop env: DOCKER_USER: ${{ secrets.DOCKER_USERNAME }} DOCKER_PASSWORD: ${{ secrets.DOCKER_API_KEY }} From f3f60aee781634a640900ca5f286ecfda0225984 Mon Sep 17 00:00:00 2001 From: Budibase Staging Release Bot <> Date: Fri, 23 Jul 2021 09:37:21 +0000 Subject: [PATCH 04/14] v0.9.79-alpha.0 --- lerna.json | 2 +- packages/auth/package.json | 6 +++--- packages/bbui/package.json | 2 +- packages/builder/package.json | 8 ++++---- packages/cli/package.json | 2 +- packages/client/package.json | 8 ++++---- packages/server/package.json | 10 +++++----- packages/standard-components/package.json | 4 ++-- packages/string-templates/package.json | 2 +- packages/worker/package.json | 8 ++++---- 10 files changed, 26 insertions(+), 26 deletions(-) diff --git a/lerna.json b/lerna.json index 27fbed5858..8b292a9a30 100644 --- a/lerna.json +++ b/lerna.json @@ -1,5 +1,5 @@ { - "version": "0.9.78", + "version": "0.9.79-alpha.0", "npmClient": "yarn", "packages": [ "packages/*" diff --git a/packages/auth/package.json b/packages/auth/package.json index 6ad144687a..87c16e7ae1 100644 --- a/packages/auth/package.json +++ b/packages/auth/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/auth", - "version": "0.9.78", + "version": "0.9.79-alpha.0", "description": "Authentication middlewares for budibase builder and apps", "main": "src/index.js", "author": "Budibase", @@ -10,6 +10,7 @@ "test:watch": "jest --watchAll" }, "dependencies": { + "@techpass/passport-openidconnect": "^0.3.0", "aws-sdk": "^2.901.0", "bcryptjs": "^2.4.3", "ioredis": "^4.27.1", @@ -17,7 +18,6 @@ "koa-passport": "^4.1.4", "lodash": "^4.17.21", "node-fetch": "^2.6.1", - "@techpass/passport-openidconnect": "^0.3.0", "passport-google-auth": "^1.0.2", "passport-google-oauth": "^2.0.0", "passport-jwt": "^4.0.0", @@ -35,8 +35,8 @@ "devDependencies": { "ioredis-mock": "^5.5.5", "jest": "^26.6.3", - "pouchdb-adapter-memory": "^7.2.2", "pouchdb": "^7.2.1", + "pouchdb-adapter-memory": "^7.2.2", "pouchdb-all-dbs": "^1.0.2" }, "gitHead": "d1836a898cab3f8ab80ee6d8f42be1a9eed7dcdc" diff --git a/packages/bbui/package.json b/packages/bbui/package.json index 5e11c19012..d9dcc53116 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": "0.9.78", + "version": "0.9.79-alpha.0", "license": "AGPL-3.0", "svelte": "src/index.js", "module": "dist/bbui.es.js", diff --git a/packages/builder/package.json b/packages/builder/package.json index aa6b165731..4b5c32d80c 100644 --- a/packages/builder/package.json +++ b/packages/builder/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/builder", - "version": "0.9.78", + "version": "0.9.79-alpha.0", "license": "AGPL-3.0", "private": true, "scripts": { @@ -65,10 +65,10 @@ } }, "dependencies": { - "@budibase/bbui": "^0.9.78", - "@budibase/client": "^0.9.78", + "@budibase/bbui": "^0.9.79-alpha.0", + "@budibase/client": "^0.9.79-alpha.0", "@budibase/colorpicker": "1.1.2", - "@budibase/string-templates": "^0.9.78", + "@budibase/string-templates": "^0.9.79-alpha.0", "@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 bb0dac5262..39a670b18b 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/cli", - "version": "0.9.78", + "version": "0.9.79-alpha.0", "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 5c75abd6b8..106cb0d729 100644 --- a/packages/client/package.json +++ b/packages/client/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/client", - "version": "0.9.78", + "version": "0.9.79-alpha.0", "license": "MPL-2.0", "module": "dist/budibase-client.js", "main": "dist/budibase-client.js", @@ -18,9 +18,9 @@ "dev:builder": "rollup -cw" }, "dependencies": { - "@budibase/bbui": "^0.9.78", - "@budibase/standard-components": "^0.9.78", - "@budibase/string-templates": "^0.9.78", + "@budibase/bbui": "^0.9.79-alpha.0", + "@budibase/standard-components": "^0.9.79-alpha.0", + "@budibase/string-templates": "^0.9.79-alpha.0", "regexparam": "^1.3.0", "shortid": "^2.2.15", "svelte-spa-router": "^3.0.5" diff --git a/packages/server/package.json b/packages/server/package.json index d3a2eea138..83101913bf 100644 --- a/packages/server/package.json +++ b/packages/server/package.json @@ -1,7 +1,7 @@ { "name": "@budibase/server", "email": "hi@budibase.com", - "version": "0.9.78", + "version": "0.9.79-alpha.0", "description": "Budibase Web Server", "main": "src/index.js", "repository": { @@ -60,9 +60,9 @@ "author": "Budibase", "license": "AGPL-3.0-or-later", "dependencies": { - "@budibase/auth": "^0.9.78", - "@budibase/client": "^0.9.78", - "@budibase/string-templates": "^0.9.78", + "@budibase/auth": "^0.9.79-alpha.0", + "@budibase/client": "^0.9.79-alpha.0", + "@budibase/string-templates": "^0.9.79-alpha.0", "@elastic/elasticsearch": "7.10.0", "@koa/router": "8.0.0", "@sendgrid/mail": "7.1.1", @@ -115,7 +115,7 @@ "devDependencies": { "@babel/core": "^7.14.3", "@babel/preset-env": "^7.14.4", - "@budibase/standard-components": "^0.9.78", + "@budibase/standard-components": "^0.9.79-alpha.0", "@jest/test-sequencer": "^24.8.0", "@types/bull": "^3.15.1", "@types/jest": "^26.0.23", diff --git a/packages/standard-components/package.json b/packages/standard-components/package.json index 0b7a7b9d57..955feffa42 100644 --- a/packages/standard-components/package.json +++ b/packages/standard-components/package.json @@ -29,12 +29,12 @@ "keywords": [ "svelte" ], - "version": "0.9.78", + "version": "0.9.79-alpha.0", "license": "MIT", "gitHead": "d1836a898cab3f8ab80ee6d8f42be1a9eed7dcdc", "dependencies": { + "@budibase/bbui": "^0.9.79-alpha.0", "@spectrum-css/card": "^3.0.3", - "@budibase/bbui": "^0.9.78", "@spectrum-css/link": "^3.1.3", "@spectrum-css/page": "^3.0.1", "@spectrum-css/typography": "^3.0.2", diff --git a/packages/string-templates/package.json b/packages/string-templates/package.json index b120864673..1d81b5f624 100644 --- a/packages/string-templates/package.json +++ b/packages/string-templates/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/string-templates", - "version": "0.9.78", + "version": "0.9.79-alpha.0", "description": "Handlebars wrapper for Budibase templating.", "main": "src/index.cjs", "module": "dist/bundle.mjs", diff --git a/packages/worker/package.json b/packages/worker/package.json index c50a6bf096..7824904210 100644 --- a/packages/worker/package.json +++ b/packages/worker/package.json @@ -1,7 +1,7 @@ { "name": "@budibase/worker", "email": "hi@budibase.com", - "version": "0.9.78", + "version": "0.9.79-alpha.0", "description": "Budibase background service", "main": "src/index.js", "repository": { @@ -21,9 +21,10 @@ "author": "Budibase", "license": "AGPL-3.0-or-later", "dependencies": { - "@budibase/auth": "^0.9.78", - "@budibase/string-templates": "^0.9.78", + "@budibase/auth": "^0.9.79-alpha.0", + "@budibase/string-templates": "^0.9.79-alpha.0", "@koa/router": "^8.0.0", + "@techpass/passport-openidconnect": "^0.3.0", "aws-sdk": "^2.811.0", "bcryptjs": "^2.4.3", "dotenv": "^8.2.0", @@ -39,7 +40,6 @@ "koa-static": "^5.0.0", "node-fetch": "^2.6.1", "nodemailer": "^6.5.0", - "@techpass/passport-openidconnect": "^0.3.0", "passport-google-oauth": "^2.0.0", "passport-jwt": "^4.0.0", "passport-local": "^1.0.0", From 249df467708e54b284566e0d2b8dc0a73750e158 Mon Sep 17 00:00:00 2001 From: Rory Powell Date: Fri, 23 Jul 2021 11:38:17 +0100 Subject: [PATCH 05/14] Mark google activated by default for old configs --- .../server/src/api/routes/tests/misc.spec.js | 8 +++++++- .../src/api/controllers/admin/configs.js | 20 +++++++++---------- 2 files changed, 17 insertions(+), 11 deletions(-) diff --git a/packages/server/src/api/routes/tests/misc.spec.js b/packages/server/src/api/routes/tests/misc.spec.js index 04a5c62431..b1dd683060 100644 --- a/packages/server/src/api/routes/tests/misc.spec.js +++ b/packages/server/src/api/routes/tests/misc.spec.js @@ -31,7 +31,13 @@ describe("run misc tests", () => { describe("/version", () => { it("should confirm version", async () => { const res = await request.get("/version").expect(200) - expect(res.text.split(".").length).toEqual(3) + const text = res.text + if (text.includes("alpha")) { + expect(text.split(".").length).toEqual(4) + } else { + expect(text.split(".").length).toEqual(3) + } + }) }) diff --git a/packages/worker/src/api/controllers/admin/configs.js b/packages/worker/src/api/controllers/admin/configs.js index 7dfb5b75be..4e907ed356 100644 --- a/packages/worker/src/api/controllers/admin/configs.js +++ b/packages/worker/src/api/controllers/admin/configs.js @@ -149,16 +149,16 @@ exports.publicSettings = async function (ctx) { config = publicConfig } - config.config.google = !googleConfig - ? !!googleConfig - : !googleConfig.config.activated - ? false - : true - config.config.oidc = !oidcConfig - ? !!oidcConfig - : !oidcConfig.config.configs[0].activated - ? false - : true + // google button flag + const googleActivated = + googleConfig.config.activated == undefined || // activated by default for configs pre-activated flag + googleConfig.config.activated + config.config.google = !googleConfig ? false : googleActivated + + // oidc button flag + const oidcActivated = !oidcConfig.config.configs[0].activated + config.config.oidc = !oidcConfig ? false : oidcActivated + ctx.body = config } catch (err) { ctx.throw(err.status, err) From 885d3003fef6b157301ccb66e9c667b37303f44f Mon Sep 17 00:00:00 2001 From: Budibase Staging Release Bot <> Date: Fri, 23 Jul 2021 11:08:21 +0000 Subject: [PATCH 06/14] v0.9.79-alpha.1 --- lerna.json | 2 +- packages/auth/package.json | 2 +- packages/bbui/package.json | 2 +- packages/builder/package.json | 8 ++++---- packages/cli/package.json | 2 +- packages/client/package.json | 8 ++++---- packages/server/package.json | 10 +++++----- packages/standard-components/package.json | 4 ++-- packages/string-templates/package.json | 2 +- packages/worker/package.json | 6 +++--- 10 files changed, 23 insertions(+), 23 deletions(-) diff --git a/lerna.json b/lerna.json index 8b292a9a30..8095b95c78 100644 --- a/lerna.json +++ b/lerna.json @@ -1,5 +1,5 @@ { - "version": "0.9.79-alpha.0", + "version": "0.9.79-alpha.1", "npmClient": "yarn", "packages": [ "packages/*" diff --git a/packages/auth/package.json b/packages/auth/package.json index 87c16e7ae1..8192509d4c 100644 --- a/packages/auth/package.json +++ b/packages/auth/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/auth", - "version": "0.9.79-alpha.0", + "version": "0.9.79-alpha.1", "description": "Authentication middlewares for budibase builder and apps", "main": "src/index.js", "author": "Budibase", diff --git a/packages/bbui/package.json b/packages/bbui/package.json index d9dcc53116..abd6297829 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": "0.9.79-alpha.0", + "version": "0.9.79-alpha.1", "license": "AGPL-3.0", "svelte": "src/index.js", "module": "dist/bbui.es.js", diff --git a/packages/builder/package.json b/packages/builder/package.json index 4b5c32d80c..da8269d7b9 100644 --- a/packages/builder/package.json +++ b/packages/builder/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/builder", - "version": "0.9.79-alpha.0", + "version": "0.9.79-alpha.1", "license": "AGPL-3.0", "private": true, "scripts": { @@ -65,10 +65,10 @@ } }, "dependencies": { - "@budibase/bbui": "^0.9.79-alpha.0", - "@budibase/client": "^0.9.79-alpha.0", + "@budibase/bbui": "^0.9.79-alpha.1", + "@budibase/client": "^0.9.79-alpha.1", "@budibase/colorpicker": "1.1.2", - "@budibase/string-templates": "^0.9.79-alpha.0", + "@budibase/string-templates": "^0.9.79-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 39a670b18b..575bce078e 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/cli", - "version": "0.9.79-alpha.0", + "version": "0.9.79-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 106cb0d729..e8ffa6f9fe 100644 --- a/packages/client/package.json +++ b/packages/client/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/client", - "version": "0.9.79-alpha.0", + "version": "0.9.79-alpha.1", "license": "MPL-2.0", "module": "dist/budibase-client.js", "main": "dist/budibase-client.js", @@ -18,9 +18,9 @@ "dev:builder": "rollup -cw" }, "dependencies": { - "@budibase/bbui": "^0.9.79-alpha.0", - "@budibase/standard-components": "^0.9.79-alpha.0", - "@budibase/string-templates": "^0.9.79-alpha.0", + "@budibase/bbui": "^0.9.79-alpha.1", + "@budibase/standard-components": "^0.9.79-alpha.1", + "@budibase/string-templates": "^0.9.79-alpha.1", "regexparam": "^1.3.0", "shortid": "^2.2.15", "svelte-spa-router": "^3.0.5" diff --git a/packages/server/package.json b/packages/server/package.json index 83101913bf..5b8fe416d2 100644 --- a/packages/server/package.json +++ b/packages/server/package.json @@ -1,7 +1,7 @@ { "name": "@budibase/server", "email": "hi@budibase.com", - "version": "0.9.79-alpha.0", + "version": "0.9.79-alpha.1", "description": "Budibase Web Server", "main": "src/index.js", "repository": { @@ -60,9 +60,9 @@ "author": "Budibase", "license": "AGPL-3.0-or-later", "dependencies": { - "@budibase/auth": "^0.9.79-alpha.0", - "@budibase/client": "^0.9.79-alpha.0", - "@budibase/string-templates": "^0.9.79-alpha.0", + "@budibase/auth": "^0.9.79-alpha.1", + "@budibase/client": "^0.9.79-alpha.1", + "@budibase/string-templates": "^0.9.79-alpha.1", "@elastic/elasticsearch": "7.10.0", "@koa/router": "8.0.0", "@sendgrid/mail": "7.1.1", @@ -115,7 +115,7 @@ "devDependencies": { "@babel/core": "^7.14.3", "@babel/preset-env": "^7.14.4", - "@budibase/standard-components": "^0.9.79-alpha.0", + "@budibase/standard-components": "^0.9.79-alpha.1", "@jest/test-sequencer": "^24.8.0", "@types/bull": "^3.15.1", "@types/jest": "^26.0.23", diff --git a/packages/standard-components/package.json b/packages/standard-components/package.json index 955feffa42..ec27c34da9 100644 --- a/packages/standard-components/package.json +++ b/packages/standard-components/package.json @@ -29,11 +29,11 @@ "keywords": [ "svelte" ], - "version": "0.9.79-alpha.0", + "version": "0.9.79-alpha.1", "license": "MIT", "gitHead": "d1836a898cab3f8ab80ee6d8f42be1a9eed7dcdc", "dependencies": { - "@budibase/bbui": "^0.9.79-alpha.0", + "@budibase/bbui": "^0.9.79-alpha.1", "@spectrum-css/card": "^3.0.3", "@spectrum-css/link": "^3.1.3", "@spectrum-css/page": "^3.0.1", diff --git a/packages/string-templates/package.json b/packages/string-templates/package.json index 1d81b5f624..674277b6f7 100644 --- a/packages/string-templates/package.json +++ b/packages/string-templates/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/string-templates", - "version": "0.9.79-alpha.0", + "version": "0.9.79-alpha.1", "description": "Handlebars wrapper for Budibase templating.", "main": "src/index.cjs", "module": "dist/bundle.mjs", diff --git a/packages/worker/package.json b/packages/worker/package.json index 7824904210..fc2662bc89 100644 --- a/packages/worker/package.json +++ b/packages/worker/package.json @@ -1,7 +1,7 @@ { "name": "@budibase/worker", "email": "hi@budibase.com", - "version": "0.9.79-alpha.0", + "version": "0.9.79-alpha.1", "description": "Budibase background service", "main": "src/index.js", "repository": { @@ -21,8 +21,8 @@ "author": "Budibase", "license": "AGPL-3.0-or-later", "dependencies": { - "@budibase/auth": "^0.9.79-alpha.0", - "@budibase/string-templates": "^0.9.79-alpha.0", + "@budibase/auth": "^0.9.79-alpha.1", + "@budibase/string-templates": "^0.9.79-alpha.1", "@koa/router": "^8.0.0", "@techpass/passport-openidconnect": "^0.3.0", "aws-sdk": "^2.811.0", From f95b550b15274cf4c7a2c58c14807fb835dccbbb Mon Sep 17 00:00:00 2001 From: Rory Powell Date: Fri, 23 Jul 2021 14:40:22 +0100 Subject: [PATCH 07/14] Mark google activated by default for old configs --- .../src/api/controllers/admin/configs.js | 22 ++++++++++++++----- 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/packages/worker/src/api/controllers/admin/configs.js b/packages/worker/src/api/controllers/admin/configs.js index 4e907ed356..78d5fdd061 100644 --- a/packages/worker/src/api/controllers/admin/configs.js +++ b/packages/worker/src/api/controllers/admin/configs.js @@ -150,14 +150,24 @@ exports.publicSettings = async function (ctx) { } // google button flag - const googleActivated = - googleConfig.config.activated == undefined || // activated by default for configs pre-activated flag - googleConfig.config.activated - config.config.google = !googleConfig ? false : googleActivated + if (googleConfig && googleConfig.config) { + const googleActivated = + googleConfig.config.activated == undefined || // activated by default for configs pre-activated flag + googleConfig.config.activated + config.config.google = googleActivated + } else { + config.config.google = false + } + // oidc button flag - const oidcActivated = !oidcConfig.config.configs[0].activated - config.config.oidc = !oidcConfig ? false : oidcActivated + if (oidcConfig && oidcConfig.config) { + const oidcActivated = oidcConfig.config.configs[0].activated + config.config.oidc = oidcActivated + } else { + config.config.oidc = false + } + ctx.body = config } catch (err) { From 418637cb6b979ad1d5e18a1bbac18dfbd10fdb5d Mon Sep 17 00:00:00 2001 From: Rory Powell Date: Fri, 23 Jul 2021 14:42:28 +0100 Subject: [PATCH 08/14] Linting --- packages/worker/src/api/controllers/admin/configs.js | 2 -- 1 file changed, 2 deletions(-) diff --git a/packages/worker/src/api/controllers/admin/configs.js b/packages/worker/src/api/controllers/admin/configs.js index 78d5fdd061..78caa817b2 100644 --- a/packages/worker/src/api/controllers/admin/configs.js +++ b/packages/worker/src/api/controllers/admin/configs.js @@ -158,7 +158,6 @@ exports.publicSettings = async function (ctx) { } else { config.config.google = false } - // oidc button flag if (oidcConfig && oidcConfig.config) { @@ -167,7 +166,6 @@ exports.publicSettings = async function (ctx) { } else { config.config.oidc = false } - ctx.body = config } catch (err) { From 32cf13202279430f2975441ac6472dfc5c37e97b Mon Sep 17 00:00:00 2001 From: Budibase Staging Release Bot <> Date: Fri, 23 Jul 2021 14:05:23 +0000 Subject: [PATCH 09/14] v0.9.79-alpha.2 --- lerna.json | 2 +- packages/auth/package.json | 2 +- packages/bbui/package.json | 2 +- packages/builder/package.json | 8 ++++---- packages/cli/package.json | 2 +- packages/client/package.json | 8 ++++---- packages/server/package.json | 10 +++++----- packages/standard-components/package.json | 4 ++-- packages/string-templates/package.json | 2 +- packages/worker/package.json | 6 +++--- 10 files changed, 23 insertions(+), 23 deletions(-) diff --git a/lerna.json b/lerna.json index 8095b95c78..7bbdd8e39d 100644 --- a/lerna.json +++ b/lerna.json @@ -1,5 +1,5 @@ { - "version": "0.9.79-alpha.1", + "version": "0.9.79-alpha.2", "npmClient": "yarn", "packages": [ "packages/*" diff --git a/packages/auth/package.json b/packages/auth/package.json index 8192509d4c..2c706a12e8 100644 --- a/packages/auth/package.json +++ b/packages/auth/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/auth", - "version": "0.9.79-alpha.1", + "version": "0.9.79-alpha.2", "description": "Authentication middlewares for budibase builder and apps", "main": "src/index.js", "author": "Budibase", diff --git a/packages/bbui/package.json b/packages/bbui/package.json index abd6297829..1cb99d549e 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": "0.9.79-alpha.1", + "version": "0.9.79-alpha.2", "license": "AGPL-3.0", "svelte": "src/index.js", "module": "dist/bbui.es.js", diff --git a/packages/builder/package.json b/packages/builder/package.json index da8269d7b9..da9fabf8f9 100644 --- a/packages/builder/package.json +++ b/packages/builder/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/builder", - "version": "0.9.79-alpha.1", + "version": "0.9.79-alpha.2", "license": "AGPL-3.0", "private": true, "scripts": { @@ -65,10 +65,10 @@ } }, "dependencies": { - "@budibase/bbui": "^0.9.79-alpha.1", - "@budibase/client": "^0.9.79-alpha.1", + "@budibase/bbui": "^0.9.79-alpha.2", + "@budibase/client": "^0.9.79-alpha.2", "@budibase/colorpicker": "1.1.2", - "@budibase/string-templates": "^0.9.79-alpha.1", + "@budibase/string-templates": "^0.9.79-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 575bce078e..a74c6905c7 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/cli", - "version": "0.9.79-alpha.1", + "version": "0.9.79-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 e8ffa6f9fe..a22216a125 100644 --- a/packages/client/package.json +++ b/packages/client/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/client", - "version": "0.9.79-alpha.1", + "version": "0.9.79-alpha.2", "license": "MPL-2.0", "module": "dist/budibase-client.js", "main": "dist/budibase-client.js", @@ -18,9 +18,9 @@ "dev:builder": "rollup -cw" }, "dependencies": { - "@budibase/bbui": "^0.9.79-alpha.1", - "@budibase/standard-components": "^0.9.79-alpha.1", - "@budibase/string-templates": "^0.9.79-alpha.1", + "@budibase/bbui": "^0.9.79-alpha.2", + "@budibase/standard-components": "^0.9.79-alpha.2", + "@budibase/string-templates": "^0.9.79-alpha.2", "regexparam": "^1.3.0", "shortid": "^2.2.15", "svelte-spa-router": "^3.0.5" diff --git a/packages/server/package.json b/packages/server/package.json index 5b8fe416d2..67ae0b138c 100644 --- a/packages/server/package.json +++ b/packages/server/package.json @@ -1,7 +1,7 @@ { "name": "@budibase/server", "email": "hi@budibase.com", - "version": "0.9.79-alpha.1", + "version": "0.9.79-alpha.2", "description": "Budibase Web Server", "main": "src/index.js", "repository": { @@ -60,9 +60,9 @@ "author": "Budibase", "license": "AGPL-3.0-or-later", "dependencies": { - "@budibase/auth": "^0.9.79-alpha.1", - "@budibase/client": "^0.9.79-alpha.1", - "@budibase/string-templates": "^0.9.79-alpha.1", + "@budibase/auth": "^0.9.79-alpha.2", + "@budibase/client": "^0.9.79-alpha.2", + "@budibase/string-templates": "^0.9.79-alpha.2", "@elastic/elasticsearch": "7.10.0", "@koa/router": "8.0.0", "@sendgrid/mail": "7.1.1", @@ -115,7 +115,7 @@ "devDependencies": { "@babel/core": "^7.14.3", "@babel/preset-env": "^7.14.4", - "@budibase/standard-components": "^0.9.79-alpha.1", + "@budibase/standard-components": "^0.9.79-alpha.2", "@jest/test-sequencer": "^24.8.0", "@types/bull": "^3.15.1", "@types/jest": "^26.0.23", diff --git a/packages/standard-components/package.json b/packages/standard-components/package.json index ec27c34da9..7e610ef1f9 100644 --- a/packages/standard-components/package.json +++ b/packages/standard-components/package.json @@ -29,11 +29,11 @@ "keywords": [ "svelte" ], - "version": "0.9.79-alpha.1", + "version": "0.9.79-alpha.2", "license": "MIT", "gitHead": "d1836a898cab3f8ab80ee6d8f42be1a9eed7dcdc", "dependencies": { - "@budibase/bbui": "^0.9.79-alpha.1", + "@budibase/bbui": "^0.9.79-alpha.2", "@spectrum-css/card": "^3.0.3", "@spectrum-css/link": "^3.1.3", "@spectrum-css/page": "^3.0.1", diff --git a/packages/string-templates/package.json b/packages/string-templates/package.json index 674277b6f7..aab91fc139 100644 --- a/packages/string-templates/package.json +++ b/packages/string-templates/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/string-templates", - "version": "0.9.79-alpha.1", + "version": "0.9.79-alpha.2", "description": "Handlebars wrapper for Budibase templating.", "main": "src/index.cjs", "module": "dist/bundle.mjs", diff --git a/packages/worker/package.json b/packages/worker/package.json index fc2662bc89..79215a1a43 100644 --- a/packages/worker/package.json +++ b/packages/worker/package.json @@ -1,7 +1,7 @@ { "name": "@budibase/worker", "email": "hi@budibase.com", - "version": "0.9.79-alpha.1", + "version": "0.9.79-alpha.2", "description": "Budibase background service", "main": "src/index.js", "repository": { @@ -21,8 +21,8 @@ "author": "Budibase", "license": "AGPL-3.0-or-later", "dependencies": { - "@budibase/auth": "^0.9.79-alpha.1", - "@budibase/string-templates": "^0.9.79-alpha.1", + "@budibase/auth": "^0.9.79-alpha.2", + "@budibase/string-templates": "^0.9.79-alpha.2", "@koa/router": "^8.0.0", "@techpass/passport-openidconnect": "^0.3.0", "aws-sdk": "^2.811.0", From eb8d8578643072aa47d0b16633099c023072f3da Mon Sep 17 00:00:00 2001 From: Rory Powell Date: Fri, 23 Jul 2021 15:47:48 +0100 Subject: [PATCH 10/14] Require https callback in production, allow for http otherwise --- packages/worker/src/api/controllers/admin/auth.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/worker/src/api/controllers/admin/auth.js b/packages/worker/src/api/controllers/admin/auth.js index 2a641e6194..3cdfc1b774 100644 --- a/packages/worker/src/api/controllers/admin/auth.js +++ b/packages/worker/src/api/controllers/admin/auth.js @@ -144,7 +144,9 @@ async function oidcStrategyFactory(ctx, configId) { const chosenConfig = config.configs.filter(c => c.uuid === configId)[0] - const callbackUrl = `${ctx.protocol}://${ctx.host}/api/admin/auth/oidc/callback` + // require https callback in production + const protocol = process.env.NODE_ENV === "production" ? "https" : "http" + const callbackUrl = `${protocol}://${ctx.host}/api/admin/auth/oidc/callback` return oidc.strategyFactory(chosenConfig, callbackUrl) } From 6359f3db64be48562ed3fa383b2487507024da1c Mon Sep 17 00:00:00 2001 From: Rory Powell Date: Fri, 23 Jul 2021 16:02:38 +0100 Subject: [PATCH 11/14] Default google activated form toggle to true for older configs --- .../builder/src/pages/builder/portal/manage/auth/index.svelte | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/packages/builder/src/pages/builder/portal/manage/auth/index.svelte b/packages/builder/src/pages/builder/portal/manage/auth/index.svelte index 70abf7d376..13a5f3e04c 100644 --- a/packages/builder/src/pages/builder/portal/manage/auth/index.svelte +++ b/packages/builder/src/pages/builder/portal/manage/auth/index.svelte @@ -217,6 +217,10 @@ } originalGoogleDoc = cloneDeep(googleDoc) } else { + // default activated to true for older configs + if (googleDoc.config.activated === undefined) { + googleDoc.config.activated = true + } originalGoogleDoc = cloneDeep(googleDoc) providers.google = googleDoc } From fbbd070113ce6786361944a0434e9576172e2578 Mon Sep 17 00:00:00 2001 From: Rory Powell Date: Fri, 23 Jul 2021 16:17:05 +0100 Subject: [PATCH 12/14] Remove docker push from main CI job in favour of release-develop --- .github/workflows/budibase_ci.yml | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/.github/workflows/budibase_ci.yml b/.github/workflows/budibase_ci.yml index b351d6edbf..eb9eeebb37 100644 --- a/.github/workflows/budibase_ci.yml +++ b/.github/workflows/budibase_ci.yml @@ -42,15 +42,3 @@ jobs: name: codecov-umbrella verbose: true - run: yarn test:e2e:ci - - - name: Build and Push Development Docker Image - # Only run on push - if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/develop' }} - run: | - docker login -u $DOCKER_USER -p $DOCKER_PASSWORD - yarn build - yarn build:docker:develop - env: - DOCKER_USER: ${{ secrets.DOCKER_USERNAME }} - DOCKER_PASSWORD: ${{ secrets.DOCKER_API_KEY }} - From 5d362c40838793811555922992b5805883aa7061 Mon Sep 17 00:00:00 2001 From: Rory Powell Date: Fri, 23 Jul 2021 16:19:43 +0100 Subject: [PATCH 13/14] Rename staging release job to be more clear --- .github/workflows/release-develop.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release-develop.yml b/.github/workflows/release-develop.yml index 33f955fea1..ce41fcc3e6 100644 --- a/.github/workflows/release-develop.yml +++ b/.github/workflows/release-develop.yml @@ -1,4 +1,4 @@ -name: Budibase Release +name: Budibase Release Staging on: push: From 69b2bee2e1e107f478aa329c2a2a8f95d27efa24 Mon Sep 17 00:00:00 2001 From: Budibase Staging Release Bot <> Date: Fri, 23 Jul 2021 15:46:11 +0000 Subject: [PATCH 14/14] v0.9.79-alpha.3 --- lerna.json | 2 +- packages/auth/package.json | 2 +- packages/bbui/package.json | 2 +- packages/builder/package.json | 8 ++++---- packages/cli/package.json | 2 +- packages/client/package.json | 8 ++++---- packages/server/package.json | 10 +++++----- packages/standard-components/package.json | 4 ++-- packages/string-templates/package.json | 2 +- packages/worker/package.json | 6 +++--- 10 files changed, 23 insertions(+), 23 deletions(-) diff --git a/lerna.json b/lerna.json index 7bbdd8e39d..dd2d7c4e0a 100644 --- a/lerna.json +++ b/lerna.json @@ -1,5 +1,5 @@ { - "version": "0.9.79-alpha.2", + "version": "0.9.79-alpha.3", "npmClient": "yarn", "packages": [ "packages/*" diff --git a/packages/auth/package.json b/packages/auth/package.json index 2c706a12e8..687005e7f0 100644 --- a/packages/auth/package.json +++ b/packages/auth/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/auth", - "version": "0.9.79-alpha.2", + "version": "0.9.79-alpha.3", "description": "Authentication middlewares for budibase builder and apps", "main": "src/index.js", "author": "Budibase", diff --git a/packages/bbui/package.json b/packages/bbui/package.json index 1cb99d549e..bcb08a577d 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": "0.9.79-alpha.2", + "version": "0.9.79-alpha.3", "license": "AGPL-3.0", "svelte": "src/index.js", "module": "dist/bbui.es.js", diff --git a/packages/builder/package.json b/packages/builder/package.json index da9fabf8f9..21735ba9db 100644 --- a/packages/builder/package.json +++ b/packages/builder/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/builder", - "version": "0.9.79-alpha.2", + "version": "0.9.79-alpha.3", "license": "AGPL-3.0", "private": true, "scripts": { @@ -65,10 +65,10 @@ } }, "dependencies": { - "@budibase/bbui": "^0.9.79-alpha.2", - "@budibase/client": "^0.9.79-alpha.2", + "@budibase/bbui": "^0.9.79-alpha.3", + "@budibase/client": "^0.9.79-alpha.3", "@budibase/colorpicker": "1.1.2", - "@budibase/string-templates": "^0.9.79-alpha.2", + "@budibase/string-templates": "^0.9.79-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 a74c6905c7..a3dafcaefb 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/cli", - "version": "0.9.79-alpha.2", + "version": "0.9.79-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 a22216a125..5a8ba1e096 100644 --- a/packages/client/package.json +++ b/packages/client/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/client", - "version": "0.9.79-alpha.2", + "version": "0.9.79-alpha.3", "license": "MPL-2.0", "module": "dist/budibase-client.js", "main": "dist/budibase-client.js", @@ -18,9 +18,9 @@ "dev:builder": "rollup -cw" }, "dependencies": { - "@budibase/bbui": "^0.9.79-alpha.2", - "@budibase/standard-components": "^0.9.79-alpha.2", - "@budibase/string-templates": "^0.9.79-alpha.2", + "@budibase/bbui": "^0.9.79-alpha.3", + "@budibase/standard-components": "^0.9.79-alpha.3", + "@budibase/string-templates": "^0.9.79-alpha.3", "regexparam": "^1.3.0", "shortid": "^2.2.15", "svelte-spa-router": "^3.0.5" diff --git a/packages/server/package.json b/packages/server/package.json index 67ae0b138c..8d2a12b773 100644 --- a/packages/server/package.json +++ b/packages/server/package.json @@ -1,7 +1,7 @@ { "name": "@budibase/server", "email": "hi@budibase.com", - "version": "0.9.79-alpha.2", + "version": "0.9.79-alpha.3", "description": "Budibase Web Server", "main": "src/index.js", "repository": { @@ -60,9 +60,9 @@ "author": "Budibase", "license": "AGPL-3.0-or-later", "dependencies": { - "@budibase/auth": "^0.9.79-alpha.2", - "@budibase/client": "^0.9.79-alpha.2", - "@budibase/string-templates": "^0.9.79-alpha.2", + "@budibase/auth": "^0.9.79-alpha.3", + "@budibase/client": "^0.9.79-alpha.3", + "@budibase/string-templates": "^0.9.79-alpha.3", "@elastic/elasticsearch": "7.10.0", "@koa/router": "8.0.0", "@sendgrid/mail": "7.1.1", @@ -115,7 +115,7 @@ "devDependencies": { "@babel/core": "^7.14.3", "@babel/preset-env": "^7.14.4", - "@budibase/standard-components": "^0.9.79-alpha.2", + "@budibase/standard-components": "^0.9.79-alpha.3", "@jest/test-sequencer": "^24.8.0", "@types/bull": "^3.15.1", "@types/jest": "^26.0.23", diff --git a/packages/standard-components/package.json b/packages/standard-components/package.json index 7e610ef1f9..a9764563ab 100644 --- a/packages/standard-components/package.json +++ b/packages/standard-components/package.json @@ -29,11 +29,11 @@ "keywords": [ "svelte" ], - "version": "0.9.79-alpha.2", + "version": "0.9.79-alpha.3", "license": "MIT", "gitHead": "d1836a898cab3f8ab80ee6d8f42be1a9eed7dcdc", "dependencies": { - "@budibase/bbui": "^0.9.79-alpha.2", + "@budibase/bbui": "^0.9.79-alpha.3", "@spectrum-css/card": "^3.0.3", "@spectrum-css/link": "^3.1.3", "@spectrum-css/page": "^3.0.1", diff --git a/packages/string-templates/package.json b/packages/string-templates/package.json index aab91fc139..f93e69b59a 100644 --- a/packages/string-templates/package.json +++ b/packages/string-templates/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/string-templates", - "version": "0.9.79-alpha.2", + "version": "0.9.79-alpha.3", "description": "Handlebars wrapper for Budibase templating.", "main": "src/index.cjs", "module": "dist/bundle.mjs", diff --git a/packages/worker/package.json b/packages/worker/package.json index 79215a1a43..f55b8de669 100644 --- a/packages/worker/package.json +++ b/packages/worker/package.json @@ -1,7 +1,7 @@ { "name": "@budibase/worker", "email": "hi@budibase.com", - "version": "0.9.79-alpha.2", + "version": "0.9.79-alpha.3", "description": "Budibase background service", "main": "src/index.js", "repository": { @@ -21,8 +21,8 @@ "author": "Budibase", "license": "AGPL-3.0-or-later", "dependencies": { - "@budibase/auth": "^0.9.79-alpha.2", - "@budibase/string-templates": "^0.9.79-alpha.2", + "@budibase/auth": "^0.9.79-alpha.3", + "@budibase/string-templates": "^0.9.79-alpha.3", "@koa/router": "^8.0.0", "@techpass/passport-openidconnect": "^0.3.0", "aws-sdk": "^2.811.0",