From aedda408919806ada3a8843d3365867da4e993e6 Mon Sep 17 00:00:00 2001 From: Mel O'Hagan Date: Fri, 10 Jun 2022 14:04:34 +0100 Subject: [PATCH 1/4] Removed ServiceAccount to reduce confusion --- packages/server/src/integrations/firebase.ts | 30 +++++--------------- packages/server/yarn.lock | 18 ++++++------ packages/worker/yarn.lock | 18 ++++++------ 3 files changed, 25 insertions(+), 41 deletions(-) diff --git a/packages/server/src/integrations/firebase.ts b/packages/server/src/integrations/firebase.ts index b985797b4f..2e539f876a 100644 --- a/packages/server/src/integrations/firebase.ts +++ b/packages/server/src/integrations/firebase.ts @@ -11,7 +11,6 @@ module Firebase { email: string privateKey: string projectId: string - serviceAccount?: string } const SCHEMA: Integration = { @@ -32,10 +31,6 @@ module Firebase { type: DatasourceFieldTypes.STRING, required: true, }, - serviceAccount: { - type: DatasourceFieldTypes.JSON, - required: false, - }, }, query: { create: { @@ -96,24 +91,13 @@ module Firebase { constructor(config: FirebaseConfig) { this.config = config - if (config.serviceAccount) { - const serviceAccount = JSON.parse(config.serviceAccount) - this.client = new Firestore({ - projectId: serviceAccount.project_id, - credentials: { - client_email: serviceAccount.client_email, - private_key: serviceAccount.private_key, - }, - }) - } else { - this.client = new Firestore({ - projectId: config.projectId, - credentials: { - client_email: config.email, - private_key: config.privateKey, - }, - }) - } + this.client = new Firestore({ + projectId: config.projectId, + credentials: { + client_email: config.email, + private_key: config.privateKey, + }, + }) } async create(query: { json: object; extra: { [key: string]: string } }) { diff --git a/packages/server/yarn.lock b/packages/server/yarn.lock index cf9f013aa6..775765e4e8 100644 --- a/packages/server/yarn.lock +++ b/packages/server/yarn.lock @@ -1014,10 +1014,10 @@ resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39" integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw== -"@budibase/backend-core@1.0.197": - version "1.0.197" - resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-1.0.197.tgz#3458d70c6d44376b7930672d6af8c6e89ddf4069" - integrity sha512-Cgzr1bJWKRg3+jqte7rnKPziWiH5Q+r/piRvHuD7EVmh2+xJLfWUz9iml72aFfcgRIOX8SyhejG7KTwxILx/vg== +"@budibase/backend-core@1.0.198": + version "1.0.198" + resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-1.0.198.tgz#4b9a4dc4dabc73da31b5f95e38c6cfd2c87bfd09" + integrity sha512-IYTY3yuZQ0YVFy4v9zqX0L3ZhFowzY40DgthfbdCbdwHiaoLFpSi0+ynLHxholz3a7eCTcW6M5a3dHqy4kXtIQ== dependencies: "@techpass/passport-openidconnect" "^0.3.0" aws-sdk "^2.901.0" @@ -1092,12 +1092,12 @@ svelte-flatpickr "^3.2.3" svelte-portal "^1.0.0" -"@budibase/pro@1.0.197": - version "1.0.197" - resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-1.0.197.tgz#a171b46bb8ee6251881ae9262136270533b3958d" - integrity sha512-SCVKjNgpzefmrXnLmkpQJLvYViykyzA6B9TwL7qrb6fBeXwAiSZ3hXGjNgZkVpy/v43hccPWt9BJFzFp457wgQ== +"@budibase/pro@1.0.198": + version "1.0.198" + resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-1.0.198.tgz#b585e269e12317ede722e2b3814329bc63b60185" + integrity sha512-ow3R2MZZKwTsAZQ8knPQsVdzS28frAP5/csj0rW1O53mOsVu6K5LZLJMlZ72cLsLDZPHKtAku7Xgb+b+YWtbvA== dependencies: - "@budibase/backend-core" "1.0.197" + "@budibase/backend-core" "1.0.198" node-fetch "^2.6.1" "@budibase/standard-components@^0.9.139": diff --git a/packages/worker/yarn.lock b/packages/worker/yarn.lock index 977725108a..ab3baaf823 100644 --- a/packages/worker/yarn.lock +++ b/packages/worker/yarn.lock @@ -293,10 +293,10 @@ resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39" integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw== -"@budibase/backend-core@1.0.197": - version "1.0.197" - resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-1.0.197.tgz#3458d70c6d44376b7930672d6af8c6e89ddf4069" - integrity sha512-Cgzr1bJWKRg3+jqte7rnKPziWiH5Q+r/piRvHuD7EVmh2+xJLfWUz9iml72aFfcgRIOX8SyhejG7KTwxILx/vg== +"@budibase/backend-core@1.0.198": + version "1.0.198" + resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-1.0.198.tgz#4b9a4dc4dabc73da31b5f95e38c6cfd2c87bfd09" + integrity sha512-IYTY3yuZQ0YVFy4v9zqX0L3ZhFowzY40DgthfbdCbdwHiaoLFpSi0+ynLHxholz3a7eCTcW6M5a3dHqy4kXtIQ== dependencies: "@techpass/passport-openidconnect" "^0.3.0" aws-sdk "^2.901.0" @@ -322,12 +322,12 @@ uuid "^8.3.2" zlib "^1.0.5" -"@budibase/pro@1.0.197": - version "1.0.197" - resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-1.0.197.tgz#a171b46bb8ee6251881ae9262136270533b3958d" - integrity sha512-SCVKjNgpzefmrXnLmkpQJLvYViykyzA6B9TwL7qrb6fBeXwAiSZ3hXGjNgZkVpy/v43hccPWt9BJFzFp457wgQ== +"@budibase/pro@1.0.198": + version "1.0.198" + resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-1.0.198.tgz#b585e269e12317ede722e2b3814329bc63b60185" + integrity sha512-ow3R2MZZKwTsAZQ8knPQsVdzS28frAP5/csj0rW1O53mOsVu6K5LZLJMlZ72cLsLDZPHKtAku7Xgb+b+YWtbvA== dependencies: - "@budibase/backend-core" "1.0.197" + "@budibase/backend-core" "1.0.198" node-fetch "^2.6.1" "@cspotcode/source-map-consumer@0.8.0": From 86d0d37fd5904026da1ed063d5b3d448eea4c7f8 Mon Sep 17 00:00:00 2001 From: Mel O'Hagan Date: Fri, 10 Jun 2022 14:15:25 +0100 Subject: [PATCH 2/4] Fix for privatekey newline --- packages/server/src/integrations/firebase.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/server/src/integrations/firebase.ts b/packages/server/src/integrations/firebase.ts index 2e539f876a..e95bda8d46 100644 --- a/packages/server/src/integrations/firebase.ts +++ b/packages/server/src/integrations/firebase.ts @@ -95,7 +95,7 @@ module Firebase { projectId: config.projectId, credentials: { client_email: config.email, - private_key: config.privateKey, + private_key: config.privateKey?.replace(/\\n/g, "\n"), }, }) } From 2c737c1a615123b11482a239e7044356b27a268a Mon Sep 17 00:00:00 2001 From: Budibase Release Bot <> Date: Fri, 10 Jun 2022 13:43:23 +0000 Subject: [PATCH 3/4] v1.0.199 --- lerna.json | 2 +- packages/backend-core/package.json | 2 +- 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 | 8 ++++---- packages/string-templates/package.json | 2 +- packages/worker/package.json | 6 +++--- 10 files changed, 24 insertions(+), 24 deletions(-) diff --git a/lerna.json b/lerna.json index 0b22f120fd..d6f3b2a3ee 100644 --- a/lerna.json +++ b/lerna.json @@ -1,5 +1,5 @@ { - "version": "1.0.198", + "version": "1.0.199", "npmClient": "yarn", "packages": [ "packages/*" diff --git a/packages/backend-core/package.json b/packages/backend-core/package.json index 87435a888b..52aa101556 100644 --- a/packages/backend-core/package.json +++ b/packages/backend-core/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/backend-core", - "version": "1.0.198", + "version": "1.0.199", "description": "Budibase backend core libraries used in server and worker", "main": "src/index.js", "author": "Budibase", diff --git a/packages/bbui/package.json b/packages/bbui/package.json index 3d729bf425..d0c683deac 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.198", + "version": "1.0.199", "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.198", + "@budibase/string-templates": "^1.0.199", "@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 f64612913b..df12eaa332 100644 --- a/packages/builder/package.json +++ b/packages/builder/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/builder", - "version": "1.0.198", + "version": "1.0.199", "license": "GPL-3.0", "private": true, "scripts": { @@ -69,10 +69,10 @@ } }, "dependencies": { - "@budibase/bbui": "^1.0.198", - "@budibase/client": "^1.0.198", - "@budibase/frontend-core": "^1.0.198", - "@budibase/string-templates": "^1.0.198", + "@budibase/bbui": "^1.0.199", + "@budibase/client": "^1.0.199", + "@budibase/frontend-core": "^1.0.199", + "@budibase/string-templates": "^1.0.199", "@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 0f763d8799..ccedfb84e4 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/cli", - "version": "1.0.198", + "version": "1.0.199", "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 ee29745514..74d0e4f9e9 100644 --- a/packages/client/package.json +++ b/packages/client/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/client", - "version": "1.0.198", + "version": "1.0.199", "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.198", - "@budibase/frontend-core": "^1.0.198", - "@budibase/string-templates": "^1.0.198", + "@budibase/bbui": "^1.0.199", + "@budibase/frontend-core": "^1.0.199", + "@budibase/string-templates": "^1.0.199", "@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 33f3ec8750..aede01583c 100644 --- a/packages/frontend-core/package.json +++ b/packages/frontend-core/package.json @@ -1,12 +1,12 @@ { "name": "@budibase/frontend-core", - "version": "1.0.198", + "version": "1.0.199", "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.198", + "@budibase/bbui": "^1.0.199", "lodash": "^4.17.21", "svelte": "^3.46.2" } diff --git a/packages/server/package.json b/packages/server/package.json index 68fb655903..f3683b9649 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.198", + "version": "1.0.199", "description": "Budibase Web Server", "main": "src/index.ts", "repository": { @@ -70,10 +70,10 @@ "license": "GPL-3.0", "dependencies": { "@apidevtools/swagger-parser": "^10.0.3", - "@budibase/backend-core": "^1.0.198", - "@budibase/client": "^1.0.198", + "@budibase/backend-core": "^1.0.199", + "@budibase/client": "^1.0.199", "@budibase/pro": "1.0.198", - "@budibase/string-templates": "^1.0.198", + "@budibase/string-templates": "^1.0.199", "@bull-board/api": "^3.7.0", "@bull-board/koa": "^3.7.0", "@elastic/elasticsearch": "7.10.0", diff --git a/packages/string-templates/package.json b/packages/string-templates/package.json index a519680e12..7e44493457 100644 --- a/packages/string-templates/package.json +++ b/packages/string-templates/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/string-templates", - "version": "1.0.198", + "version": "1.0.199", "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 12e08cc06e..1ed63e6e85 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.198", + "version": "1.0.199", "description": "Budibase background service", "main": "src/index.ts", "repository": { @@ -32,9 +32,9 @@ "author": "Budibase", "license": "GPL-3.0", "dependencies": { - "@budibase/backend-core": "^1.0.198", + "@budibase/backend-core": "^1.0.199", "@budibase/pro": "1.0.198", - "@budibase/string-templates": "^1.0.198", + "@budibase/string-templates": "^1.0.199", "@koa/router": "^8.0.0", "@sentry/node": "6.17.7", "@techpass/passport-openidconnect": "^0.3.0", From 3761edb325ce2bf81757c006b4698e01fb9bf991 Mon Sep 17 00:00:00 2001 From: Budibase Release Bot <> Date: Fri, 10 Jun 2022 13:45:01 +0000 Subject: [PATCH 4/4] Update pro version to 1.0.199 --- 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 f3683b9649..1138ee74a6 100644 --- a/packages/server/package.json +++ b/packages/server/package.json @@ -72,7 +72,7 @@ "@apidevtools/swagger-parser": "^10.0.3", "@budibase/backend-core": "^1.0.199", "@budibase/client": "^1.0.199", - "@budibase/pro": "1.0.198", + "@budibase/pro": "1.0.199", "@budibase/string-templates": "^1.0.199", "@bull-board/api": "^3.7.0", "@bull-board/koa": "^3.7.0", diff --git a/packages/worker/package.json b/packages/worker/package.json index 1ed63e6e85..28828fce20 100644 --- a/packages/worker/package.json +++ b/packages/worker/package.json @@ -33,7 +33,7 @@ "license": "GPL-3.0", "dependencies": { "@budibase/backend-core": "^1.0.199", - "@budibase/pro": "1.0.198", + "@budibase/pro": "1.0.199", "@budibase/string-templates": "^1.0.199", "@koa/router": "^8.0.0", "@sentry/node": "6.17.7",