From cf82be6bec2aa4832bca11bec9a001894f6fa737 Mon Sep 17 00:00:00 2001 From: Antor Date: Fri, 18 Nov 2022 23:26:06 +0100 Subject: [PATCH 1/7] remove duplicate "LOG_LEVEL" env variable "LOG_LEVEL" was already declared. remove duplicate declaration --- charts/budibase/templates/app-service-deployment.yaml | 2 -- 1 file changed, 2 deletions(-) diff --git a/charts/budibase/templates/app-service-deployment.yaml b/charts/budibase/templates/app-service-deployment.yaml index bf1b672d37..72d9fc93a9 100644 --- a/charts/budibase/templates/app-service-deployment.yaml +++ b/charts/budibase/templates/app-service-deployment.yaml @@ -60,8 +60,6 @@ spec: secretKeyRef: name: {{ template "budibase.fullname" . }} key: jwtSecret - - name: LOG_LEVEL - value: {{ .Values.services.apps.logLevel | default "info" | quote }} {{ if .Values.services.objectStore.region }} - name: AWS_REGION value: {{ .Values.services.objectStore.region }} From b7d33dfa5f16e0bbe1139ec771e0a0dd218d6b74 Mon Sep 17 00:00:00 2001 From: Rory Powell Date: Tue, 22 Nov 2022 16:28:51 +0000 Subject: [PATCH 2/7] Fix view creation --- packages/backend-core/src/db/views.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/backend-core/src/db/views.ts b/packages/backend-core/src/db/views.ts index 5c63ce4689..c563d55be3 100644 --- a/packages/backend-core/src/db/views.ts +++ b/packages/backend-core/src/db/views.ts @@ -145,7 +145,9 @@ export const queryView = async ( return docs.length <= 1 ? (docs[0] as T) : (docs as T[]) } } catch (err: any) { - if (err != null && err.name === "not_found") { + const pouchNotFound = err && err.name === "not_found" + const couchNotFound = err && err.status === 404 + if (pouchNotFound || couchNotFound) { await removeDeprecated(db, viewName) await createFunc() return queryView(viewName, params, db, createFunc, opts) From e8ebef0a915f25d6e9908a38c2b141196d53613f Mon Sep 17 00:00:00 2001 From: Budibase Staging Release Bot <> Date: Tue, 22 Nov 2022 17:00:36 +0000 Subject: [PATCH 3/7] v2.1.32-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 | 8 ++++---- packages/client/package.json | 8 ++++---- packages/frontend-core/package.json | 4 ++-- packages/sdk/package.json | 2 +- packages/server/package.json | 10 +++++----- packages/string-templates/package.json | 2 +- packages/types/package.json | 2 +- packages/worker/package.json | 8 ++++---- 12 files changed, 32 insertions(+), 32 deletions(-) diff --git a/lerna.json b/lerna.json index 24172a05b0..48b80e9e6c 100644 --- a/lerna.json +++ b/lerna.json @@ -1,5 +1,5 @@ { - "version": "2.1.32-alpha.3", + "version": "2.1.32-alpha.4", "npmClient": "yarn", "packages": [ "packages/*" diff --git a/packages/backend-core/package.json b/packages/backend-core/package.json index 6a54c16c89..4cfc5de3dc 100644 --- a/packages/backend-core/package.json +++ b/packages/backend-core/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/backend-core", - "version": "2.1.32-alpha.3", + "version": "2.1.32-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": "2.1.32-alpha.3", + "@budibase/types": "2.1.32-alpha.4", "@shopify/jest-koa-mocks": "5.0.1", "@techpass/passport-openidconnect": "0.3.2", "aws-sdk": "2.1030.0", diff --git a/packages/bbui/package.json b/packages/bbui/package.json index b619e85651..cafb9eb86b 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": "2.1.32-alpha.3", + "version": "2.1.32-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": "2.1.32-alpha.3", + "@budibase/string-templates": "2.1.32-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 2e8367db1f..a87c871f76 100644 --- a/packages/builder/package.json +++ b/packages/builder/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/builder", - "version": "2.1.32-alpha.3", + "version": "2.1.32-alpha.4", "license": "GPL-3.0", "private": true, "scripts": { @@ -71,10 +71,10 @@ } }, "dependencies": { - "@budibase/bbui": "2.1.32-alpha.3", - "@budibase/client": "2.1.32-alpha.3", - "@budibase/frontend-core": "2.1.32-alpha.3", - "@budibase/string-templates": "2.1.32-alpha.3", + "@budibase/bbui": "2.1.32-alpha.4", + "@budibase/client": "2.1.32-alpha.4", + "@budibase/frontend-core": "2.1.32-alpha.4", + "@budibase/string-templates": "2.1.32-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 45f269b1a3..3d3b615b90 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/cli", - "version": "2.1.32-alpha.3", + "version": "2.1.32-alpha.4", "description": "Budibase CLI, for developers, self hosting and migrations.", "main": "src/index.js", "bin": { @@ -26,9 +26,9 @@ "outputPath": "build" }, "dependencies": { - "@budibase/backend-core": "2.1.32-alpha.3", - "@budibase/string-templates": "2.1.32-alpha.3", - "@budibase/types": "2.1.32-alpha.3", + "@budibase/backend-core": "2.1.32-alpha.4", + "@budibase/string-templates": "2.1.32-alpha.4", + "@budibase/types": "2.1.32-alpha.4", "axios": "0.21.2", "chalk": "4.1.0", "cli-progress": "3.11.2", diff --git a/packages/client/package.json b/packages/client/package.json index 14ecbbf5d8..537709132d 100644 --- a/packages/client/package.json +++ b/packages/client/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/client", - "version": "2.1.32-alpha.3", + "version": "2.1.32-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": "2.1.32-alpha.3", - "@budibase/frontend-core": "2.1.32-alpha.3", - "@budibase/string-templates": "2.1.32-alpha.3", + "@budibase/bbui": "2.1.32-alpha.4", + "@budibase/frontend-core": "2.1.32-alpha.4", + "@budibase/string-templates": "2.1.32-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 5fa508f8c1..fe095fb45c 100644 --- a/packages/frontend-core/package.json +++ b/packages/frontend-core/package.json @@ -1,12 +1,12 @@ { "name": "@budibase/frontend-core", - "version": "2.1.32-alpha.3", + "version": "2.1.32-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": "2.1.32-alpha.3", + "@budibase/bbui": "2.1.32-alpha.4", "lodash": "^4.17.21", "svelte": "^3.46.2" } diff --git a/packages/sdk/package.json b/packages/sdk/package.json index 9c1efd78f3..d4a54007e5 100644 --- a/packages/sdk/package.json +++ b/packages/sdk/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/sdk", - "version": "2.1.32-alpha.3", + "version": "2.1.32-alpha.4", "description": "Budibase Public API SDK", "author": "Budibase", "license": "MPL-2.0", diff --git a/packages/server/package.json b/packages/server/package.json index 62b2395ad5..ce4470260a 100644 --- a/packages/server/package.json +++ b/packages/server/package.json @@ -1,7 +1,7 @@ { "name": "@budibase/server", "email": "hi@budibase.com", - "version": "2.1.32-alpha.3", + "version": "2.1.32-alpha.4", "description": "Budibase Web Server", "main": "src/index.ts", "repository": { @@ -43,11 +43,11 @@ "license": "GPL-3.0", "dependencies": { "@apidevtools/swagger-parser": "10.0.3", - "@budibase/backend-core": "2.1.32-alpha.3", - "@budibase/client": "2.1.32-alpha.3", + "@budibase/backend-core": "2.1.32-alpha.4", + "@budibase/client": "2.1.32-alpha.4", "@budibase/pro": "2.1.32-alpha.3", - "@budibase/string-templates": "2.1.32-alpha.3", - "@budibase/types": "2.1.32-alpha.3", + "@budibase/string-templates": "2.1.32-alpha.4", + "@budibase/types": "2.1.32-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 fd8fbbbeb1..6153b04363 100644 --- a/packages/string-templates/package.json +++ b/packages/string-templates/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/string-templates", - "version": "2.1.32-alpha.3", + "version": "2.1.32-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 2d689c56b7..7c9c389af8 100644 --- a/packages/types/package.json +++ b/packages/types/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/types", - "version": "2.1.32-alpha.3", + "version": "2.1.32-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 3e41075cb8..11d8f63dc0 100644 --- a/packages/worker/package.json +++ b/packages/worker/package.json @@ -1,7 +1,7 @@ { "name": "@budibase/worker", "email": "hi@budibase.com", - "version": "2.1.32-alpha.3", + "version": "2.1.32-alpha.4", "description": "Budibase background service", "main": "src/index.ts", "repository": { @@ -36,10 +36,10 @@ "author": "Budibase", "license": "GPL-3.0", "dependencies": { - "@budibase/backend-core": "2.1.32-alpha.3", + "@budibase/backend-core": "2.1.32-alpha.4", "@budibase/pro": "2.1.32-alpha.3", - "@budibase/string-templates": "2.1.32-alpha.3", - "@budibase/types": "2.1.32-alpha.3", + "@budibase/string-templates": "2.1.32-alpha.4", + "@budibase/types": "2.1.32-alpha.4", "@koa/router": "8.0.8", "@sentry/node": "6.17.7", "@techpass/passport-openidconnect": "0.3.2", From e7ce1660754c599c9565252a6eceabd42b145d56 Mon Sep 17 00:00:00 2001 From: Budibase Staging Release Bot <> Date: Tue, 22 Nov 2022 17:04:40 +0000 Subject: [PATCH 4/7] Update pro version to 2.1.32-alpha.4 --- packages/server/package.json | 2 +- packages/server/yarn.lock | 30 +++++++++++++++--------------- packages/worker/package.json | 2 +- packages/worker/yarn.lock | 30 +++++++++++++++--------------- 4 files changed, 32 insertions(+), 32 deletions(-) diff --git a/packages/server/package.json b/packages/server/package.json index ce4470260a..60af02db61 100644 --- a/packages/server/package.json +++ b/packages/server/package.json @@ -45,7 +45,7 @@ "@apidevtools/swagger-parser": "10.0.3", "@budibase/backend-core": "2.1.32-alpha.4", "@budibase/client": "2.1.32-alpha.4", - "@budibase/pro": "2.1.32-alpha.3", + "@budibase/pro": "2.1.32-alpha.4", "@budibase/string-templates": "2.1.32-alpha.4", "@budibase/types": "2.1.32-alpha.4", "@bull-board/api": "3.7.0", diff --git a/packages/server/yarn.lock b/packages/server/yarn.lock index 9dddbe8ea3..ca7e080694 100644 --- a/packages/server/yarn.lock +++ b/packages/server/yarn.lock @@ -1273,12 +1273,12 @@ resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39" integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw== -"@budibase/backend-core@2.1.32-alpha.3": - version "2.1.32-alpha.3" - resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-2.1.32-alpha.3.tgz#d65f97f6c147e75aa83cfb4c22a5b3bd568bf62d" - integrity sha512-CSRn29z64bLEW3GLo6cTwpGjvTgIsfDOBwAiStEOlezzMNlDslvcOBCW0pQUo/0rf5C4zsTy4U1oHDElz7JJ2w== +"@budibase/backend-core@2.1.32-alpha.4": + version "2.1.32-alpha.4" + resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-2.1.32-alpha.4.tgz#f5ecc6a5348b61a4f8ebd3f6cd541d7892bc38bd" + integrity sha512-CbjK7fLWXjdHaFlLnmrUE+zEpltgdWzA+sfT9WrKAWlyrI18/0Hs5E5Q3s8NUk3slixktvs2Bs3nYDbTZj7coA== dependencies: - "@budibase/types" "2.1.32-alpha.3" + "@budibase/types" "2.1.32-alpha.4" "@shopify/jest-koa-mocks" "5.0.1" "@techpass/passport-openidconnect" "0.3.2" aws-sdk "2.1030.0" @@ -1361,13 +1361,13 @@ svelte-flatpickr "^3.2.3" svelte-portal "^1.0.0" -"@budibase/pro@2.1.32-alpha.3": - version "2.1.32-alpha.3" - resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-2.1.32-alpha.3.tgz#32d67f5fe3aa6a993022e685f55a298b4fc364b5" - integrity sha512-FwaWZLI8NVSH3Y4RcSvD1ySJXa5yWFgfGha5Zz5rvy3Tw3oSr/AfH91VW4ZLyzpuBQrMJHxLtDmaz3Ywd/jSkQ== +"@budibase/pro@2.1.32-alpha.4": + version "2.1.32-alpha.4" + resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-2.1.32-alpha.4.tgz#b760fe8e1cc2db64564d61c84b749a3555861be2" + integrity sha512-+D0YeIlylRu5VkBsEDhkNYLlsDGfEOZJ7c67liPPRSBfHNh8oyTMTptyqcyFYhemFNPjoyxBCzi1RIFCk8Eg2w== dependencies: - "@budibase/backend-core" "2.1.32-alpha.3" - "@budibase/types" "2.1.32-alpha.3" + "@budibase/backend-core" "2.1.32-alpha.4" + "@budibase/types" "2.1.32-alpha.4" "@koa/router" "8.0.8" bull "4.10.1" joi "17.6.0" @@ -1391,10 +1391,10 @@ svelte-apexcharts "^1.0.2" svelte-flatpickr "^3.1.0" -"@budibase/types@2.1.32-alpha.3": - version "2.1.32-alpha.3" - resolved "https://registry.yarnpkg.com/@budibase/types/-/types-2.1.32-alpha.3.tgz#87d53d7b5730f0067c1526a62f85afb13db82a51" - integrity sha512-4MGPfe63IKJMSS+4HdznyjEnExKGk1rMa2sfVOvRAZWzdVhgo5m0UarwoKf49lDF3NPiqTLdXQnB4p7AmwQbbg== +"@budibase/types@2.1.32-alpha.4": + version "2.1.32-alpha.4" + resolved "https://registry.yarnpkg.com/@budibase/types/-/types-2.1.32-alpha.4.tgz#47d25d028b4e9e5295e311a06bf801fbb14c98d7" + integrity sha512-ZwaPQVcOdoqaO7fr8mQ0hIfsjBFhsowu3Sv3/o3Z4qCdth6EZ8LnbeW1dQeQRRbqe3gNhaotfzgxwqbFxmtqzg== "@bull-board/api@3.7.0": version "3.7.0" diff --git a/packages/worker/package.json b/packages/worker/package.json index 11d8f63dc0..f6d8d45c21 100644 --- a/packages/worker/package.json +++ b/packages/worker/package.json @@ -37,7 +37,7 @@ "license": "GPL-3.0", "dependencies": { "@budibase/backend-core": "2.1.32-alpha.4", - "@budibase/pro": "2.1.32-alpha.3", + "@budibase/pro": "2.1.32-alpha.4", "@budibase/string-templates": "2.1.32-alpha.4", "@budibase/types": "2.1.32-alpha.4", "@koa/router": "8.0.8", diff --git a/packages/worker/yarn.lock b/packages/worker/yarn.lock index ecc432d8e6..a1aa2dfcfc 100644 --- a/packages/worker/yarn.lock +++ b/packages/worker/yarn.lock @@ -470,12 +470,12 @@ resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39" integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw== -"@budibase/backend-core@2.1.32-alpha.3": - version "2.1.32-alpha.3" - resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-2.1.32-alpha.3.tgz#d65f97f6c147e75aa83cfb4c22a5b3bd568bf62d" - integrity sha512-CSRn29z64bLEW3GLo6cTwpGjvTgIsfDOBwAiStEOlezzMNlDslvcOBCW0pQUo/0rf5C4zsTy4U1oHDElz7JJ2w== +"@budibase/backend-core@2.1.32-alpha.4": + version "2.1.32-alpha.4" + resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-2.1.32-alpha.4.tgz#f5ecc6a5348b61a4f8ebd3f6cd541d7892bc38bd" + integrity sha512-CbjK7fLWXjdHaFlLnmrUE+zEpltgdWzA+sfT9WrKAWlyrI18/0Hs5E5Q3s8NUk3slixktvs2Bs3nYDbTZj7coA== dependencies: - "@budibase/types" "2.1.32-alpha.3" + "@budibase/types" "2.1.32-alpha.4" "@shopify/jest-koa-mocks" "5.0.1" "@techpass/passport-openidconnect" "0.3.2" aws-sdk "2.1030.0" @@ -508,22 +508,22 @@ uuid "8.3.2" zlib "1.0.5" -"@budibase/pro@2.1.32-alpha.3": - version "2.1.32-alpha.3" - resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-2.1.32-alpha.3.tgz#32d67f5fe3aa6a993022e685f55a298b4fc364b5" - integrity sha512-FwaWZLI8NVSH3Y4RcSvD1ySJXa5yWFgfGha5Zz5rvy3Tw3oSr/AfH91VW4ZLyzpuBQrMJHxLtDmaz3Ywd/jSkQ== +"@budibase/pro@2.1.32-alpha.4": + version "2.1.32-alpha.4" + resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-2.1.32-alpha.4.tgz#b760fe8e1cc2db64564d61c84b749a3555861be2" + integrity sha512-+D0YeIlylRu5VkBsEDhkNYLlsDGfEOZJ7c67liPPRSBfHNh8oyTMTptyqcyFYhemFNPjoyxBCzi1RIFCk8Eg2w== dependencies: - "@budibase/backend-core" "2.1.32-alpha.3" - "@budibase/types" "2.1.32-alpha.3" + "@budibase/backend-core" "2.1.32-alpha.4" + "@budibase/types" "2.1.32-alpha.4" "@koa/router" "8.0.8" bull "4.10.1" joi "17.6.0" node-fetch "^2.6.1" -"@budibase/types@2.1.32-alpha.3": - version "2.1.32-alpha.3" - resolved "https://registry.yarnpkg.com/@budibase/types/-/types-2.1.32-alpha.3.tgz#87d53d7b5730f0067c1526a62f85afb13db82a51" - integrity sha512-4MGPfe63IKJMSS+4HdznyjEnExKGk1rMa2sfVOvRAZWzdVhgo5m0UarwoKf49lDF3NPiqTLdXQnB4p7AmwQbbg== +"@budibase/types@2.1.32-alpha.4": + version "2.1.32-alpha.4" + resolved "https://registry.yarnpkg.com/@budibase/types/-/types-2.1.32-alpha.4.tgz#47d25d028b4e9e5295e311a06bf801fbb14c98d7" + integrity sha512-ZwaPQVcOdoqaO7fr8mQ0hIfsjBFhsowu3Sv3/o3Z4qCdth6EZ8LnbeW1dQeQRRbqe3gNhaotfzgxwqbFxmtqzg== "@cspotcode/source-map-support@^0.8.0": version "0.8.1" From 70016dc7e4c83b16bc550ba801b1e0416f5ea0c1 Mon Sep 17 00:00:00 2001 From: Rory Powell Date: Tue, 22 Nov 2022 22:24:45 +0000 Subject: [PATCH 5/7] Account portal <-> backend-core fixes --- packages/backend-core/src/security/sessions.ts | 1 + packages/types/src/sdk/auth.ts | 2 ++ packages/types/src/sdk/featureFlag.ts | 7 +++++++ packages/types/src/sdk/index.ts | 1 + packages/types/src/sdk/koa.ts | 9 ++++++--- 5 files changed, 17 insertions(+), 3 deletions(-) create mode 100644 packages/types/src/sdk/featureFlag.ts diff --git a/packages/backend-core/src/security/sessions.ts b/packages/backend-core/src/security/sessions.ts index 33230afc60..48e75b0d60 100644 --- a/packages/backend-core/src/security/sessions.ts +++ b/packages/backend-core/src/security/sessions.ts @@ -89,6 +89,7 @@ export async function createASession( userId, } await client.store(key, session, EXPIRY_SECONDS) + return session } export async function updateSessionTTL(session: Session) { diff --git a/packages/types/src/sdk/auth.ts b/packages/types/src/sdk/auth.ts index 766d18a606..edcaf197e2 100644 --- a/packages/types/src/sdk/auth.ts +++ b/packages/types/src/sdk/auth.ts @@ -1,4 +1,5 @@ import { BBContext } from "./koa" +import { Hosting } from "./hosting" export interface AuthToken { userId: string @@ -10,6 +11,7 @@ export interface CreateSession { sessionId: string tenantId: string csrfToken?: string + hosting?: Hosting } export interface Session extends CreateSession { diff --git a/packages/types/src/sdk/featureFlag.ts b/packages/types/src/sdk/featureFlag.ts new file mode 100644 index 0000000000..53aa4842c4 --- /dev/null +++ b/packages/types/src/sdk/featureFlag.ts @@ -0,0 +1,7 @@ +export enum FeatureFlag { + LICENSING = "LICENSING", +} + +export interface TenantFeatureFlags { + [key: string]: FeatureFlag[] +} diff --git a/packages/types/src/sdk/index.ts b/packages/types/src/sdk/index.ts index a32c8e2077..e5512b062b 100644 --- a/packages/types/src/sdk/index.ts +++ b/packages/types/src/sdk/index.ts @@ -10,3 +10,4 @@ export * from "./auth" export * from "./locks" export * from "./db" export * from "./middleware" +export * from "./featureFlag" diff --git a/packages/types/src/sdk/koa.ts b/packages/types/src/sdk/koa.ts index ffbb1cf053..a9d3cc4231 100644 --- a/packages/types/src/sdk/koa.ts +++ b/packages/types/src/sdk/koa.ts @@ -1,15 +1,18 @@ import { Context, Request } from "koa" -import { User, Role, UserRoles } from "../documents" -import { License } from "../sdk" +import { User, Role, UserRoles, Account } from "../documents" +import { FeatureFlag, License } from "../sdk" export interface ContextUser extends Omit { globalId?: string - license: License + license?: License userId?: string roleId?: string | null role?: Role roles?: UserRoles csrfToken?: string + featureFlags?: FeatureFlag[] + accountPortalAccess?: boolean + account?: Account } export interface BBRequest extends Request { From 50f7a03afc17442dc9d7f6a657dcb3a98bf0921e Mon Sep 17 00:00:00 2001 From: Budibase Staging Release Bot <> Date: Wed, 23 Nov 2022 08:45:13 +0000 Subject: [PATCH 6/7] v2.1.32-alpha.5 --- lerna.json | 2 +- packages/backend-core/package.json | 4 ++-- packages/bbui/package.json | 4 ++-- packages/builder/package.json | 10 +++++----- packages/cli/package.json | 8 ++++---- packages/client/package.json | 8 ++++---- packages/frontend-core/package.json | 4 ++-- packages/sdk/package.json | 2 +- packages/server/package.json | 10 +++++----- packages/string-templates/package.json | 2 +- packages/types/package.json | 2 +- packages/worker/package.json | 8 ++++---- 12 files changed, 32 insertions(+), 32 deletions(-) diff --git a/lerna.json b/lerna.json index 48b80e9e6c..4c90dcb882 100644 --- a/lerna.json +++ b/lerna.json @@ -1,5 +1,5 @@ { - "version": "2.1.32-alpha.4", + "version": "2.1.32-alpha.5", "npmClient": "yarn", "packages": [ "packages/*" diff --git a/packages/backend-core/package.json b/packages/backend-core/package.json index 4cfc5de3dc..6af1808bdb 100644 --- a/packages/backend-core/package.json +++ b/packages/backend-core/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/backend-core", - "version": "2.1.32-alpha.4", + "version": "2.1.32-alpha.5", "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": "2.1.32-alpha.4", + "@budibase/types": "2.1.32-alpha.5", "@shopify/jest-koa-mocks": "5.0.1", "@techpass/passport-openidconnect": "0.3.2", "aws-sdk": "2.1030.0", diff --git a/packages/bbui/package.json b/packages/bbui/package.json index cafb9eb86b..92f5493bcf 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": "2.1.32-alpha.4", + "version": "2.1.32-alpha.5", "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": "2.1.32-alpha.4", + "@budibase/string-templates": "2.1.32-alpha.5", "@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 a87c871f76..5b3ba61776 100644 --- a/packages/builder/package.json +++ b/packages/builder/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/builder", - "version": "2.1.32-alpha.4", + "version": "2.1.32-alpha.5", "license": "GPL-3.0", "private": true, "scripts": { @@ -71,10 +71,10 @@ } }, "dependencies": { - "@budibase/bbui": "2.1.32-alpha.4", - "@budibase/client": "2.1.32-alpha.4", - "@budibase/frontend-core": "2.1.32-alpha.4", - "@budibase/string-templates": "2.1.32-alpha.4", + "@budibase/bbui": "2.1.32-alpha.5", + "@budibase/client": "2.1.32-alpha.5", + "@budibase/frontend-core": "2.1.32-alpha.5", + "@budibase/string-templates": "2.1.32-alpha.5", "@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 3d3b615b90..3ec4f5c35e 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/cli", - "version": "2.1.32-alpha.4", + "version": "2.1.32-alpha.5", "description": "Budibase CLI, for developers, self hosting and migrations.", "main": "src/index.js", "bin": { @@ -26,9 +26,9 @@ "outputPath": "build" }, "dependencies": { - "@budibase/backend-core": "2.1.32-alpha.4", - "@budibase/string-templates": "2.1.32-alpha.4", - "@budibase/types": "2.1.32-alpha.4", + "@budibase/backend-core": "2.1.32-alpha.5", + "@budibase/string-templates": "2.1.32-alpha.5", + "@budibase/types": "2.1.32-alpha.5", "axios": "0.21.2", "chalk": "4.1.0", "cli-progress": "3.11.2", diff --git a/packages/client/package.json b/packages/client/package.json index 537709132d..74ee686497 100644 --- a/packages/client/package.json +++ b/packages/client/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/client", - "version": "2.1.32-alpha.4", + "version": "2.1.32-alpha.5", "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": "2.1.32-alpha.4", - "@budibase/frontend-core": "2.1.32-alpha.4", - "@budibase/string-templates": "2.1.32-alpha.4", + "@budibase/bbui": "2.1.32-alpha.5", + "@budibase/frontend-core": "2.1.32-alpha.5", + "@budibase/string-templates": "2.1.32-alpha.5", "@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 fe095fb45c..bf89d51e96 100644 --- a/packages/frontend-core/package.json +++ b/packages/frontend-core/package.json @@ -1,12 +1,12 @@ { "name": "@budibase/frontend-core", - "version": "2.1.32-alpha.4", + "version": "2.1.32-alpha.5", "description": "Budibase frontend core libraries used in builder and client", "author": "Budibase", "license": "MPL-2.0", "svelte": "src/index.js", "dependencies": { - "@budibase/bbui": "2.1.32-alpha.4", + "@budibase/bbui": "2.1.32-alpha.5", "lodash": "^4.17.21", "svelte": "^3.46.2" } diff --git a/packages/sdk/package.json b/packages/sdk/package.json index d4a54007e5..4f6aa17bbb 100644 --- a/packages/sdk/package.json +++ b/packages/sdk/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/sdk", - "version": "2.1.32-alpha.4", + "version": "2.1.32-alpha.5", "description": "Budibase Public API SDK", "author": "Budibase", "license": "MPL-2.0", diff --git a/packages/server/package.json b/packages/server/package.json index 60af02db61..cb69e49090 100644 --- a/packages/server/package.json +++ b/packages/server/package.json @@ -1,7 +1,7 @@ { "name": "@budibase/server", "email": "hi@budibase.com", - "version": "2.1.32-alpha.4", + "version": "2.1.32-alpha.5", "description": "Budibase Web Server", "main": "src/index.ts", "repository": { @@ -43,11 +43,11 @@ "license": "GPL-3.0", "dependencies": { "@apidevtools/swagger-parser": "10.0.3", - "@budibase/backend-core": "2.1.32-alpha.4", - "@budibase/client": "2.1.32-alpha.4", + "@budibase/backend-core": "2.1.32-alpha.5", + "@budibase/client": "2.1.32-alpha.5", "@budibase/pro": "2.1.32-alpha.4", - "@budibase/string-templates": "2.1.32-alpha.4", - "@budibase/types": "2.1.32-alpha.4", + "@budibase/string-templates": "2.1.32-alpha.5", + "@budibase/types": "2.1.32-alpha.5", "@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 6153b04363..ffa0ab112f 100644 --- a/packages/string-templates/package.json +++ b/packages/string-templates/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/string-templates", - "version": "2.1.32-alpha.4", + "version": "2.1.32-alpha.5", "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 7c9c389af8..ad1f19774c 100644 --- a/packages/types/package.json +++ b/packages/types/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/types", - "version": "2.1.32-alpha.4", + "version": "2.1.32-alpha.5", "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 f6d8d45c21..a901b92805 100644 --- a/packages/worker/package.json +++ b/packages/worker/package.json @@ -1,7 +1,7 @@ { "name": "@budibase/worker", "email": "hi@budibase.com", - "version": "2.1.32-alpha.4", + "version": "2.1.32-alpha.5", "description": "Budibase background service", "main": "src/index.ts", "repository": { @@ -36,10 +36,10 @@ "author": "Budibase", "license": "GPL-3.0", "dependencies": { - "@budibase/backend-core": "2.1.32-alpha.4", + "@budibase/backend-core": "2.1.32-alpha.5", "@budibase/pro": "2.1.32-alpha.4", - "@budibase/string-templates": "2.1.32-alpha.4", - "@budibase/types": "2.1.32-alpha.4", + "@budibase/string-templates": "2.1.32-alpha.5", + "@budibase/types": "2.1.32-alpha.5", "@koa/router": "8.0.8", "@sentry/node": "6.17.7", "@techpass/passport-openidconnect": "0.3.2", From ee9e00d48fe333ecb1a62315f8779ebd140549ff Mon Sep 17 00:00:00 2001 From: Budibase Staging Release Bot <> Date: Wed, 23 Nov 2022 08:48:45 +0000 Subject: [PATCH 7/7] Update pro version to 2.1.32-alpha.5 --- packages/server/package.json | 2 +- packages/server/yarn.lock | 30 +++++++++++++++--------------- packages/worker/package.json | 2 +- packages/worker/yarn.lock | 30 +++++++++++++++--------------- 4 files changed, 32 insertions(+), 32 deletions(-) diff --git a/packages/server/package.json b/packages/server/package.json index cb69e49090..04d043cc50 100644 --- a/packages/server/package.json +++ b/packages/server/package.json @@ -45,7 +45,7 @@ "@apidevtools/swagger-parser": "10.0.3", "@budibase/backend-core": "2.1.32-alpha.5", "@budibase/client": "2.1.32-alpha.5", - "@budibase/pro": "2.1.32-alpha.4", + "@budibase/pro": "2.1.32-alpha.5", "@budibase/string-templates": "2.1.32-alpha.5", "@budibase/types": "2.1.32-alpha.5", "@bull-board/api": "3.7.0", diff --git a/packages/server/yarn.lock b/packages/server/yarn.lock index ca7e080694..f97eae1133 100644 --- a/packages/server/yarn.lock +++ b/packages/server/yarn.lock @@ -1273,12 +1273,12 @@ resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39" integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw== -"@budibase/backend-core@2.1.32-alpha.4": - version "2.1.32-alpha.4" - resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-2.1.32-alpha.4.tgz#f5ecc6a5348b61a4f8ebd3f6cd541d7892bc38bd" - integrity sha512-CbjK7fLWXjdHaFlLnmrUE+zEpltgdWzA+sfT9WrKAWlyrI18/0Hs5E5Q3s8NUk3slixktvs2Bs3nYDbTZj7coA== +"@budibase/backend-core@2.1.32-alpha.5": + version "2.1.32-alpha.5" + resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-2.1.32-alpha.5.tgz#85d94d85f44c6e9220ce8ce6d7d3e62d15d6bc25" + integrity sha512-UV7ng+o7bo+GHAocd3rn6okFsCjf5RfGNs+CRgyB7rW0DZYCTwn1jj71HGYO6eI0FWgkaFYEeiOaNz0BeCssnw== dependencies: - "@budibase/types" "2.1.32-alpha.4" + "@budibase/types" "2.1.32-alpha.5" "@shopify/jest-koa-mocks" "5.0.1" "@techpass/passport-openidconnect" "0.3.2" aws-sdk "2.1030.0" @@ -1361,13 +1361,13 @@ svelte-flatpickr "^3.2.3" svelte-portal "^1.0.0" -"@budibase/pro@2.1.32-alpha.4": - version "2.1.32-alpha.4" - resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-2.1.32-alpha.4.tgz#b760fe8e1cc2db64564d61c84b749a3555861be2" - integrity sha512-+D0YeIlylRu5VkBsEDhkNYLlsDGfEOZJ7c67liPPRSBfHNh8oyTMTptyqcyFYhemFNPjoyxBCzi1RIFCk8Eg2w== +"@budibase/pro@2.1.32-alpha.5": + version "2.1.32-alpha.5" + resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-2.1.32-alpha.5.tgz#ca75dcf90d275e1d78a9ab837a763b703963908d" + integrity sha512-OwtCJugVYz+V2IaBLITCec6AtQr7HgABLw0dRrS481o/ibyJh+Syooafwx1ijrvfNl4i8YQVuJuzoPYsZHVwqw== dependencies: - "@budibase/backend-core" "2.1.32-alpha.4" - "@budibase/types" "2.1.32-alpha.4" + "@budibase/backend-core" "2.1.32-alpha.5" + "@budibase/types" "2.1.32-alpha.5" "@koa/router" "8.0.8" bull "4.10.1" joi "17.6.0" @@ -1391,10 +1391,10 @@ svelte-apexcharts "^1.0.2" svelte-flatpickr "^3.1.0" -"@budibase/types@2.1.32-alpha.4": - version "2.1.32-alpha.4" - resolved "https://registry.yarnpkg.com/@budibase/types/-/types-2.1.32-alpha.4.tgz#47d25d028b4e9e5295e311a06bf801fbb14c98d7" - integrity sha512-ZwaPQVcOdoqaO7fr8mQ0hIfsjBFhsowu3Sv3/o3Z4qCdth6EZ8LnbeW1dQeQRRbqe3gNhaotfzgxwqbFxmtqzg== +"@budibase/types@2.1.32-alpha.5": + version "2.1.32-alpha.5" + resolved "https://registry.yarnpkg.com/@budibase/types/-/types-2.1.32-alpha.5.tgz#08389b921673c0e4cbbbaba41ba92356c186dd0f" + integrity sha512-/vbEClKbiNdhDuDjYt5DF2e82u6kFe79BETU8ssaJ4lfI6y2YxMnrLSKB38QfCG/XjijAPMO0THTFoSVgqTQCA== "@bull-board/api@3.7.0": version "3.7.0" diff --git a/packages/worker/package.json b/packages/worker/package.json index a901b92805..217d634997 100644 --- a/packages/worker/package.json +++ b/packages/worker/package.json @@ -37,7 +37,7 @@ "license": "GPL-3.0", "dependencies": { "@budibase/backend-core": "2.1.32-alpha.5", - "@budibase/pro": "2.1.32-alpha.4", + "@budibase/pro": "2.1.32-alpha.5", "@budibase/string-templates": "2.1.32-alpha.5", "@budibase/types": "2.1.32-alpha.5", "@koa/router": "8.0.8", diff --git a/packages/worker/yarn.lock b/packages/worker/yarn.lock index a1aa2dfcfc..4f23ce5c03 100644 --- a/packages/worker/yarn.lock +++ b/packages/worker/yarn.lock @@ -470,12 +470,12 @@ resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39" integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw== -"@budibase/backend-core@2.1.32-alpha.4": - version "2.1.32-alpha.4" - resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-2.1.32-alpha.4.tgz#f5ecc6a5348b61a4f8ebd3f6cd541d7892bc38bd" - integrity sha512-CbjK7fLWXjdHaFlLnmrUE+zEpltgdWzA+sfT9WrKAWlyrI18/0Hs5E5Q3s8NUk3slixktvs2Bs3nYDbTZj7coA== +"@budibase/backend-core@2.1.32-alpha.5": + version "2.1.32-alpha.5" + resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-2.1.32-alpha.5.tgz#85d94d85f44c6e9220ce8ce6d7d3e62d15d6bc25" + integrity sha512-UV7ng+o7bo+GHAocd3rn6okFsCjf5RfGNs+CRgyB7rW0DZYCTwn1jj71HGYO6eI0FWgkaFYEeiOaNz0BeCssnw== dependencies: - "@budibase/types" "2.1.32-alpha.4" + "@budibase/types" "2.1.32-alpha.5" "@shopify/jest-koa-mocks" "5.0.1" "@techpass/passport-openidconnect" "0.3.2" aws-sdk "2.1030.0" @@ -508,22 +508,22 @@ uuid "8.3.2" zlib "1.0.5" -"@budibase/pro@2.1.32-alpha.4": - version "2.1.32-alpha.4" - resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-2.1.32-alpha.4.tgz#b760fe8e1cc2db64564d61c84b749a3555861be2" - integrity sha512-+D0YeIlylRu5VkBsEDhkNYLlsDGfEOZJ7c67liPPRSBfHNh8oyTMTptyqcyFYhemFNPjoyxBCzi1RIFCk8Eg2w== +"@budibase/pro@2.1.32-alpha.5": + version "2.1.32-alpha.5" + resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-2.1.32-alpha.5.tgz#ca75dcf90d275e1d78a9ab837a763b703963908d" + integrity sha512-OwtCJugVYz+V2IaBLITCec6AtQr7HgABLw0dRrS481o/ibyJh+Syooafwx1ijrvfNl4i8YQVuJuzoPYsZHVwqw== dependencies: - "@budibase/backend-core" "2.1.32-alpha.4" - "@budibase/types" "2.1.32-alpha.4" + "@budibase/backend-core" "2.1.32-alpha.5" + "@budibase/types" "2.1.32-alpha.5" "@koa/router" "8.0.8" bull "4.10.1" joi "17.6.0" node-fetch "^2.6.1" -"@budibase/types@2.1.32-alpha.4": - version "2.1.32-alpha.4" - resolved "https://registry.yarnpkg.com/@budibase/types/-/types-2.1.32-alpha.4.tgz#47d25d028b4e9e5295e311a06bf801fbb14c98d7" - integrity sha512-ZwaPQVcOdoqaO7fr8mQ0hIfsjBFhsowu3Sv3/o3Z4qCdth6EZ8LnbeW1dQeQRRbqe3gNhaotfzgxwqbFxmtqzg== +"@budibase/types@2.1.32-alpha.5": + version "2.1.32-alpha.5" + resolved "https://registry.yarnpkg.com/@budibase/types/-/types-2.1.32-alpha.5.tgz#08389b921673c0e4cbbbaba41ba92356c186dd0f" + integrity sha512-/vbEClKbiNdhDuDjYt5DF2e82u6kFe79BETU8ssaJ4lfI6y2YxMnrLSKB38QfCG/XjijAPMO0THTFoSVgqTQCA== "@cspotcode/source-map-support@^0.8.0": version "0.8.1"