diff --git a/lerna.json b/lerna.json index 0f81f6bcba..a320a884d1 100644 --- a/lerna.json +++ b/lerna.json @@ -1,5 +1,5 @@ { - "version": "2.2.12-alpha.25", + "version": "2.2.12-alpha.28", "npmClient": "yarn", "packages": [ "packages/*" diff --git a/packages/backend-core/package.json b/packages/backend-core/package.json index 40b75959cc..400a188e17 100644 --- a/packages/backend-core/package.json +++ b/packages/backend-core/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/backend-core", - "version": "2.2.12-alpha.25", + "version": "2.2.12-alpha.28", "description": "Budibase backend core libraries used in server and worker", "main": "dist/src/index.js", "types": "dist/src/index.d.ts", @@ -23,7 +23,7 @@ }, "dependencies": { "@budibase/nano": "10.1.1", - "@budibase/types": "2.2.12-alpha.25", + "@budibase/types": "2.2.12-alpha.28", "@shopify/jest-koa-mocks": "5.0.1", "@techpass/passport-openidconnect": "0.3.2", "aws-cloudfront-sign": "2.2.0", diff --git a/packages/bbui/package.json b/packages/bbui/package.json index 323603bb89..f85f38af0b 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.2.12-alpha.25", + "version": "2.2.12-alpha.28", "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.2.12-alpha.25", + "@budibase/string-templates": "2.2.12-alpha.28", "@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 e393bba22d..c1afae62cd 100644 --- a/packages/builder/package.json +++ b/packages/builder/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/builder", - "version": "2.2.12-alpha.25", + "version": "2.2.12-alpha.28", "license": "GPL-3.0", "private": true, "scripts": { @@ -71,10 +71,10 @@ } }, "dependencies": { - "@budibase/bbui": "2.2.12-alpha.25", - "@budibase/client": "2.2.12-alpha.25", - "@budibase/frontend-core": "2.2.12-alpha.25", - "@budibase/string-templates": "2.2.12-alpha.25", + "@budibase/bbui": "2.2.12-alpha.28", + "@budibase/client": "2.2.12-alpha.28", + "@budibase/frontend-core": "2.2.12-alpha.28", + "@budibase/string-templates": "2.2.12-alpha.28", "@sentry/browser": "5.19.1", "@spectrum-css/page": "^3.0.1", "@spectrum-css/vars": "^3.0.1", diff --git a/packages/builder/src/pages/builder/portal/settings/auth/index.svelte b/packages/builder/src/pages/builder/portal/settings/auth/index.svelte index 412a75ec0a..f0ca5c9797 100644 --- a/packages/builder/src/pages/builder/portal/settings/auth/index.svelte +++ b/packages/builder/src/pages/builder/portal/settings/auth/index.svelte @@ -172,6 +172,8 @@ delete element.createdAt delete element.updatedAt + const { activated } = element.config + if (element.type === ConfigTypes.OIDC) { // Add a UUID here so each config is distinguishable when it arrives at the login page for (let config of element.config.configs) { @@ -181,30 +183,26 @@ // Callback urls shouldn't be included delete config.callbackURL } - if (partialOidc) { - if (!oidcComplete) { - notifications.error( - `Please fill in all required ${ConfigTypes.OIDC} fields` - ) - } else { - calls.push(API.saveConfig(element)) - // Turn the save button grey when clicked - oidcSaveButtonDisabled = true - originalOidcDoc = cloneDeep(providers.oidc) - } + if ((partialOidc || activated) && !oidcComplete) { + notifications.error( + `Please fill in all required ${ConfigTypes.OIDC} fields` + ) + } else if (oidcComplete || !activated) { + calls.push(API.saveConfig(element)) + // Turn the save button grey when clicked + oidcSaveButtonDisabled = true + originalOidcDoc = cloneDeep(providers.oidc) } } if (element.type === ConfigTypes.Google) { - if (partialGoogle) { - if (!googleComplete) { - notifications.error( - `Please fill in all required ${ConfigTypes.Google} fields` - ) - } else { - calls.push(API.saveConfig(element)) - googleSaveButtonDisabled = true - originalGoogleDoc = cloneDeep(providers.google) - } + if ((partialGoogle || activated) && !googleComplete) { + notifications.error( + `Please fill in all required ${ConfigTypes.Google} fields` + ) + } else if (googleComplete || !activated) { + calls.push(API.saveConfig(element)) + googleSaveButtonDisabled = true + originalGoogleDoc = cloneDeep(providers.google) } } }) diff --git a/packages/cli/package.json b/packages/cli/package.json index 145308a4e5..b314f23e75 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/cli", - "version": "2.2.12-alpha.25", + "version": "2.2.12-alpha.28", "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.2.12-alpha.25", - "@budibase/string-templates": "2.2.12-alpha.25", - "@budibase/types": "2.2.12-alpha.25", + "@budibase/backend-core": "2.2.12-alpha.28", + "@budibase/string-templates": "2.2.12-alpha.28", + "@budibase/types": "2.2.12-alpha.28", "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 45d1254275..ecd9f06f48 100644 --- a/packages/client/package.json +++ b/packages/client/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/client", - "version": "2.2.12-alpha.25", + "version": "2.2.12-alpha.28", "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.2.12-alpha.25", - "@budibase/frontend-core": "2.2.12-alpha.25", - "@budibase/string-templates": "2.2.12-alpha.25", + "@budibase/bbui": "2.2.12-alpha.28", + "@budibase/frontend-core": "2.2.12-alpha.28", + "@budibase/string-templates": "2.2.12-alpha.28", "@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 55ee2ff846..eacb6b45df 100644 --- a/packages/frontend-core/package.json +++ b/packages/frontend-core/package.json @@ -1,12 +1,12 @@ { "name": "@budibase/frontend-core", - "version": "2.2.12-alpha.25", + "version": "2.2.12-alpha.28", "description": "Budibase frontend core libraries used in builder and client", "author": "Budibase", "license": "MPL-2.0", "svelte": "src/index.js", "dependencies": { - "@budibase/bbui": "2.2.12-alpha.25", + "@budibase/bbui": "2.2.12-alpha.28", "lodash": "^4.17.21", "svelte": "^3.46.2" } diff --git a/packages/sdk/package.json b/packages/sdk/package.json index e9c64b8f61..e626caa2ca 100644 --- a/packages/sdk/package.json +++ b/packages/sdk/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/sdk", - "version": "2.2.12-alpha.25", + "version": "2.2.12-alpha.28", "description": "Budibase Public API SDK", "author": "Budibase", "license": "MPL-2.0", diff --git a/packages/server/package.json b/packages/server/package.json index 75c408626e..0e556e0446 100644 --- a/packages/server/package.json +++ b/packages/server/package.json @@ -1,7 +1,7 @@ { "name": "@budibase/server", "email": "hi@budibase.com", - "version": "2.2.12-alpha.25", + "version": "2.2.12-alpha.28", "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.2.12-alpha.25", - "@budibase/client": "2.2.12-alpha.25", - "@budibase/pro": "2.2.12-alpha.24", - "@budibase/string-templates": "2.2.12-alpha.25", - "@budibase/types": "2.2.12-alpha.25", + "@budibase/backend-core": "2.2.12-alpha.28", + "@budibase/client": "2.2.12-alpha.28", + "@budibase/pro": "2.2.12-alpha.28", + "@budibase/string-templates": "2.2.12-alpha.28", + "@budibase/types": "2.2.12-alpha.28", "@bull-board/api": "3.7.0", "@bull-board/koa": "3.9.4", "@elastic/elasticsearch": "7.10.0", @@ -77,7 +77,7 @@ "joi": "17.6.0", "js-yaml": "4.1.0", "jsonschema": "1.4.0", - "knex": "0.95.15", + "knex": "2.4.0", "koa": "2.13.4", "koa-body": "4.2.0", "koa-compress": "4.0.1", diff --git a/packages/server/src/api/controllers/row/ExternalRequest.ts b/packages/server/src/api/controllers/row/ExternalRequest.ts index 80ba4fd808..6085921423 100644 --- a/packages/server/src/api/controllers/row/ExternalRequest.ts +++ b/packages/server/src/api/controllers/row/ExternalRequest.ts @@ -681,6 +681,12 @@ export class ExternalRequest { config, table ) + //if the sort column is a formula, remove it + for (let sortColumn of Object.keys(sort || {})) { + if (table.schema[sortColumn]?.type === "formula") { + delete sort?.[sortColumn] + } + } filters = buildFilters(id, filters || {}, table) const relationships = this.buildRelationships(table) // clean up row on ingress using schema diff --git a/packages/server/yarn.lock b/packages/server/yarn.lock index 3f48e19b5c..03577c402a 100644 --- a/packages/server/yarn.lock +++ b/packages/server/yarn.lock @@ -1273,13 +1273,13 @@ resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39" integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw== -"@budibase/backend-core@2.2.12-alpha.24": - version "2.2.12-alpha.24" - resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-2.2.12-alpha.24.tgz#4ac9654b56982c62ebb2c789382aface4233a6fa" - integrity sha512-ok6NvCyXmHVp1MEWaOTy1kQ4sPr/DmQ/R+tKE4OHLSsfXbdO9vUh4a3m1nI6Cqxmg55Wr9G0dC9uKgDGmKTbrg== +"@budibase/backend-core@2.2.12-alpha.28": + version "2.2.12-alpha.28" + resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-2.2.12-alpha.28.tgz#c35db9d7ddb5f381b99b1226b90bc0c41ace74e5" + integrity sha512-D3j3HhDsBuuMf+LlMTLoiPQuUkp9bMksJcNlTMqh/HAqCWxBNA933KKdv30CVQ5htY5lLGtpDuK/uxUzu36nNw== dependencies: "@budibase/nano" "10.1.1" - "@budibase/types" "2.2.12-alpha.24" + "@budibase/types" "2.2.12-alpha.28" "@shopify/jest-koa-mocks" "5.0.1" "@techpass/passport-openidconnect" "0.3.2" aws-cloudfront-sign "2.2.0" @@ -1374,13 +1374,13 @@ qs "^6.11.0" tough-cookie "^4.1.2" -"@budibase/pro@2.2.12-alpha.24": - version "2.2.12-alpha.24" - resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-2.2.12-alpha.24.tgz#49095913dca367a1cb67a414b206455dc1bbc7e6" - integrity sha512-Fw1Op8bJnWR+4ALYrfz5QjXOqVAfqoOkHD39zbiaOaQ+bcQPyFMfwUIWJeK+W87k2WrGoiO2QQPtqw6HkiDpXg== +"@budibase/pro@2.2.12-alpha.28": + version "2.2.12-alpha.28" + resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-2.2.12-alpha.28.tgz#3f3150e5833fcbf6b7ad67b51a46d37bc3f4f785" + integrity sha512-0zLOHuI55Hp/6nrAu52i12/Z4agiyStSVREIBm5iXgRN3rLFAS4uu/oqGt5uXtHB4X5WOZ/e29r0uwTGamLhlg== dependencies: - "@budibase/backend-core" "2.2.12-alpha.24" - "@budibase/types" "2.2.12-alpha.24" + "@budibase/backend-core" "2.2.12-alpha.28" + "@budibase/types" "2.2.12-alpha.28" "@koa/router" "8.0.8" bull "4.10.1" joi "17.6.0" @@ -1405,10 +1405,10 @@ svelte-apexcharts "^1.0.2" svelte-flatpickr "^3.1.0" -"@budibase/types@2.2.12-alpha.24": - version "2.2.12-alpha.24" - resolved "https://registry.yarnpkg.com/@budibase/types/-/types-2.2.12-alpha.24.tgz#e3721e29dd158fd00e1f574d10ed59a7c6250097" - integrity sha512-Pu6qenqPFVfwTuepuXXTDZFoTK+4KU2XDwWRKvuzqxnTO5h/q1ObE93cN4+fXNgKCmAFapQX6rwzlNbtWRIizA== +"@budibase/types@2.2.12-alpha.28": + version "2.2.12-alpha.28" + resolved "https://registry.yarnpkg.com/@budibase/types/-/types-2.2.12-alpha.28.tgz#3e937aa478b32ff220ef5482036198e717165768" + integrity sha512-anQMAI27PeA94iHh2NPhFg3ARgVUxErMk2W9fWwj7kOoq1xxhYj1AI9+65v+5HUa3Q0AR9Dx25ja5ZJ7Lhg2ew== "@bull-board/api@3.7.0": version "3.7.0" @@ -5306,15 +5306,10 @@ color@^3.1.3: color-convert "^1.9.3" color-string "^1.6.0" -colorette@2.0.16: - version "2.0.16" - resolved "https://registry.yarnpkg.com/colorette/-/colorette-2.0.16.tgz#713b9af84fdb000139f04546bd4a93f62a5085da" - integrity sha512-hUewv7oMjCp+wkBv5Rm0v87eJhq4woh5rSR+42YSQJKecCqgIqNkZ6lAlQms/BwHPJA5NKMRlpxPRv0n8HQW6g== - -colorette@^2.0.14: - version "2.0.17" - resolved "https://registry.yarnpkg.com/colorette/-/colorette-2.0.17.tgz#5dd4c0d15e2984b7433cb4a9f2ead45063b80c47" - integrity sha512-hJo+3Bkn0NCHybn9Tu35fIeoOKGOk5OCC32y4Hz2It+qlCO2Q3DeQ1hRn/tDDMQKRYUEzqsl7jbF6dYKjlE60g== +colorette@2.0.19, colorette@^2.0.14: + version "2.0.19" + resolved "https://registry.yarnpkg.com/colorette/-/colorette-2.0.19.tgz#cdf044f47ad41a0f4b56b3a0d5b4e6e1a2d5a798" + integrity sha512-3tlv/dIP7FWvj3BsbHrGLJ6l/oKh1O3TcgBqMn+yyCagOxc23fyzDS6HypQbgxWbkpDnf52p1LuR4eWDQ/K9WQ== colorspace@1.1.x: version "1.1.4" @@ -5351,7 +5346,7 @@ commander@^5.1.0: resolved "https://registry.yarnpkg.com/commander/-/commander-5.1.0.tgz#46abbd1652f8e059bddaef99bbdcb2ad9cf179ae" integrity sha512-P0CysNDQ7rtVw4QIQtm+MRxV66vKFSvlsQvGYXZWR3qFU0jlMKHZZZgw8e+8DSah4UDKMqnknRDQz+xuQXQ/Zg== -commander@^7.0.0, commander@^7.1.0: +commander@^7.0.0: version "7.2.0" resolved "https://registry.yarnpkg.com/commander/-/commander-7.2.0.tgz#a36cb57d0b501ce108e4d20559a150a391d97ab7" integrity sha512-QrWXB+ZQSVPmIWIhtEO9H+gwHaMGYiF5ChvoJ+K9ZGHG/sVsa6yiesAD1GC/x46sET00Xlwo1u49RVVVzvcSkw== @@ -5361,6 +5356,11 @@ commander@^8.3.0: resolved "https://registry.yarnpkg.com/commander/-/commander-8.3.0.tgz#4837ea1b2da67b9c616a67afbb0fafee567bca66" integrity sha512-OkTL9umf+He2DZkUq8f8J9of7yL6RJKI24dVITBmNfZBmri9zYZQrKkuXiKhyfPSu8tUhnVBB1iKXevvnlR4Ww== +commander@^9.1.0: + version "9.5.0" + resolved "https://registry.yarnpkg.com/commander/-/commander-9.5.0.tgz#bc08d1eb5cedf7ccb797a96199d41c7bc3e60d30" + integrity sha512-KRs7WVDKg86PWiuAqhDrAQnTXZKraVcCc6vFdL14qrZ/DcWwuRo7VoiYXalXO7S5GKpqYiVEwCbgFDfxNHKJBQ== + commoner@^0.10.1: version "0.10.8" resolved "https://registry.yarnpkg.com/commoner/-/commoner-0.10.8.tgz#34fc3672cd24393e8bb47e70caa0293811f4f2c5" @@ -5664,20 +5664,13 @@ dayjs@^1.10.4, dayjs@^1.10.5: resolved "https://registry.yarnpkg.com/dayjs/-/dayjs-1.11.3.tgz#4754eb694a624057b9ad2224b67b15d552589258" integrity sha512-xxwlswWOlGhzgQ4TKzASQkUhqERI3egRNqgV4ScR8wlANA/A9tZ7miXa44vTTKEq5l7vWoL5G57bG3zA+Kow0A== -debug@4, debug@^4, debug@^4.0.1, debug@^4.1.0, debug@^4.1.1, debug@^4.3.1, debug@^4.3.2, debug@^4.3.4, debug@~4.3.1, debug@~4.3.2: +debug@4, debug@4.3.4, debug@^4, debug@^4.0.1, debug@^4.1.0, debug@^4.1.1, debug@^4.3.1, debug@^4.3.2, debug@^4.3.4, debug@~4.3.1, debug@~4.3.2: version "4.3.4" resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.4.tgz#1319f6579357f2338d3337d2cdd4914bb5dcc865" integrity sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ== dependencies: ms "2.1.2" -debug@4.3.2: - version "4.3.2" - resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.2.tgz#f0a49c18ac8779e31d4a0c6029dfb76873c7428b" - integrity sha512-mOp8wKcvj7XxC78zLgw/ZA+6TSgkoE2C/ienthhRD298T7UNwAg9diBpLRxC0mOezLl4B0xV7M0cCO6P/O0Xhw== - dependencies: - ms "2.1.2" - debug@^2.2.0, debug@^2.3.3: version "2.6.9" resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f" @@ -7446,10 +7439,10 @@ get-value@^2.0.3, get-value@^2.0.6: resolved "https://registry.yarnpkg.com/get-value/-/get-value-2.0.6.tgz#dc15ca1c672387ca76bd37ac0a395ba2042a2c28" integrity sha512-Ln0UQDlxH1BapMu3GPtf7CuYNwRZf2gwCuPqbyG6pB8WfmFpzqcy4xtAaAMUhnNqjMKTiCPZG2oMT3YSx8U2NA== -getopts@2.2.5: - version "2.2.5" - resolved "https://registry.yarnpkg.com/getopts/-/getopts-2.2.5.tgz#67a0fe471cacb9c687d817cab6450b96dde8313b" - integrity sha512-9jb7AW5p3in+IiJWhQiZmmwkpLaR/ccTWdWQCtZM66HJcHHLegowh4q4tSD7gouUyeNvFWRavfK9GXosQHDpFA== +getopts@2.3.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/getopts/-/getopts-2.3.0.tgz#71e5593284807e03e2427449d4f6712a268666f4" + integrity sha512-5eDf9fuSXwxBL6q5HX+dhDj+dslFGWzU5thZ9kNKUkcPtaPdatmUFKwHFrLb/uf/WpA4BHET+AX3Scl56cAjpA== getpass@^0.1.1: version "0.1.7" @@ -9830,23 +9823,24 @@ kleur@^3.0.3: resolved "https://registry.yarnpkg.com/kleur/-/kleur-3.0.3.tgz#a79c9ecc86ee1ce3fa6206d1216c501f147fc07e" integrity sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w== -knex@0.95.15: - version "0.95.15" - resolved "https://registry.yarnpkg.com/knex/-/knex-0.95.15.tgz#39d7e7110a6e2ad7de5d673d2dea94143015e0e7" - integrity sha512-Loq6WgHaWlmL2bfZGWPsy4l8xw4pOE+tmLGkPG0auBppxpI0UcK+GYCycJcqz9W54f2LiGewkCVLBm3Wq4ur/w== +knex@2.4.0: + version "2.4.0" + resolved "https://registry.yarnpkg.com/knex/-/knex-2.4.0.tgz#7d33cc36f320cdac98741010544b4c6a98b8b19e" + integrity sha512-i0GWwqYp1Hs2yvc2rlDO6nzzkLhwdyOZKRdsMTB8ZxOs2IXQyL5rBjSbS1krowCh6V65T4X9CJaKtuIfkaPGSA== dependencies: - colorette "2.0.16" - commander "^7.1.0" - debug "4.3.2" + colorette "2.0.19" + commander "^9.1.0" + debug "4.3.4" escalade "^3.1.1" esm "^3.2.25" - getopts "2.2.5" + get-package-type "^0.1.0" + getopts "2.3.0" interpret "^2.2.0" lodash "^4.17.21" pg-connection-string "2.5.0" - rechoir "0.7.0" + rechoir "^0.8.0" resolve-from "^5.0.0" - tarn "^3.0.1" + tarn "^3.0.2" tildify "2.0.0" koa-body@4.2.0: @@ -12566,13 +12560,6 @@ recast@^0.11.17: private "~0.1.5" source-map "~0.5.0" -rechoir@0.7.0: - version "0.7.0" - resolved "https://registry.yarnpkg.com/rechoir/-/rechoir-0.7.0.tgz#32650fd52c21ab252aa5d65b19310441c7e03aca" - integrity sha512-ADsDEH2bvbjltXEP+hTIAmeFekTFK0V2BTxMkok6qILyAJEXV0AFfoWcAq4yfll5VdIMd/RVXq0lR+wQi5ZU3Q== - dependencies: - resolve "^1.9.0" - rechoir@^0.7.0: version "0.7.1" resolved "https://registry.yarnpkg.com/rechoir/-/rechoir-0.7.1.tgz#9478a96a1ca135b5e88fc027f03ee92d6c645686" @@ -12580,6 +12567,13 @@ rechoir@^0.7.0: dependencies: resolve "^1.9.0" +rechoir@^0.8.0: + version "0.8.0" + resolved "https://registry.yarnpkg.com/rechoir/-/rechoir-0.8.0.tgz#49f866e0d32146142da3ad8f0eff352b3215ff22" + integrity sha512-/vxpCXddiX8NGfGO/mTafwjq4aFa/71pvamip0++IQk3zG8cbCj0fifNPrjjF1XMXUne91jL9OoxmdykoEtifQ== + dependencies: + resolve "^1.20.0" + redis-commands@1.7.0, redis-commands@^1.7.0: version "1.7.0" resolved "https://registry.yarnpkg.com/redis-commands/-/redis-commands-1.7.0.tgz#15a6fea2d58281e27b1cd1acfb4b293e278c3a89" @@ -14056,7 +14050,7 @@ tarn@^1.1.5: resolved "https://registry.yarnpkg.com/tarn/-/tarn-1.1.5.tgz#7be88622e951738b9fa3fb77477309242cdddc2d" integrity sha512-PMtJ3HCLAZeedWjJPgGnCvcphbCOMbtZpjKgLq3qM5Qq9aQud+XHrL0WlrlgnTyS8U+jrjGbEXprFcQrxPy52g== -tarn@^3.0.1: +tarn@^3.0.2: version "3.0.2" resolved "https://registry.yarnpkg.com/tarn/-/tarn-3.0.2.tgz#73b6140fbb881b71559c4f8bfde3d9a4b3d27693" integrity sha512-51LAVKUSZSVfI05vjPESNc5vwqqZpbXCsU+/+wxlOrUjk2SnFTt97v9ZgQrD4YmxYW1Px6w2KjaDitCfkvgxMQ== diff --git a/packages/string-templates/package.json b/packages/string-templates/package.json index cfb1dfeeff..5a340ac4c3 100644 --- a/packages/string-templates/package.json +++ b/packages/string-templates/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/string-templates", - "version": "2.2.12-alpha.25", + "version": "2.2.12-alpha.28", "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 672e441454..80cd277851 100644 --- a/packages/types/package.json +++ b/packages/types/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/types", - "version": "2.2.12-alpha.25", + "version": "2.2.12-alpha.28", "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 d8008332c6..1be6e2c4e0 100644 --- a/packages/worker/package.json +++ b/packages/worker/package.json @@ -1,7 +1,7 @@ { "name": "@budibase/worker", "email": "hi@budibase.com", - "version": "2.2.12-alpha.25", + "version": "2.2.12-alpha.28", "description": "Budibase background service", "main": "src/index.ts", "repository": { @@ -36,10 +36,10 @@ "author": "Budibase", "license": "GPL-3.0", "dependencies": { - "@budibase/backend-core": "2.2.12-alpha.25", - "@budibase/pro": "2.2.12-alpha.24", - "@budibase/string-templates": "2.2.12-alpha.25", - "@budibase/types": "2.2.12-alpha.25", + "@budibase/backend-core": "2.2.12-alpha.28", + "@budibase/pro": "2.2.12-alpha.28", + "@budibase/string-templates": "2.2.12-alpha.28", + "@budibase/types": "2.2.12-alpha.28", "@koa/router": "8.0.8", "@sentry/node": "6.17.7", "@techpass/passport-openidconnect": "0.3.2", diff --git a/packages/worker/src/api/routes/global/configs.ts b/packages/worker/src/api/routes/global/configs.ts index 7420d749c2..38a31a28e6 100644 --- a/packages/worker/src/api/routes/global/configs.ts +++ b/packages/worker/src/api/routes/global/configs.ts @@ -34,8 +34,8 @@ function settingValidation() { function googleValidation() { // prettier-ignore return Joi.object({ - clientID: Joi.string().required(), - clientSecret: Joi.string().required(), + clientID: Joi.when('activated', { is: true, then: Joi.string().required() }), + clientSecret: Joi.when('activated', { is: true, then: Joi.string().required() }), activated: Joi.boolean().required(), }).unknown(true) } @@ -45,12 +45,12 @@ function oidcValidation() { return Joi.object({ configs: Joi.array().items( Joi.object({ - clientID: Joi.string().required(), - clientSecret: Joi.string().required(), - configUrl: Joi.string().required(), + clientID: Joi.when('activated', { is: true, then: Joi.string().required() }), + clientSecret: Joi.when('activated', { is: true, then: Joi.string().required() }), + configUrl: Joi.when('activated', { is: true, then: Joi.string().required() }), logo: Joi.string().allow("", null), name: Joi.string().allow("", null), - uuid: Joi.string().required(), + uuid: Joi.when('activated', { is: true, then: Joi.string().required() }), activated: Joi.boolean().required(), scopes: Joi.array().optional() }) diff --git a/packages/worker/yarn.lock b/packages/worker/yarn.lock index d974dd3f72..a88d5f4cc8 100644 --- a/packages/worker/yarn.lock +++ b/packages/worker/yarn.lock @@ -470,13 +470,13 @@ resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39" integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw== -"@budibase/backend-core@2.2.12-alpha.24": - version "2.2.12-alpha.24" - resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-2.2.12-alpha.24.tgz#4ac9654b56982c62ebb2c789382aface4233a6fa" - integrity sha512-ok6NvCyXmHVp1MEWaOTy1kQ4sPr/DmQ/R+tKE4OHLSsfXbdO9vUh4a3m1nI6Cqxmg55Wr9G0dC9uKgDGmKTbrg== +"@budibase/backend-core@2.2.12-alpha.28": + version "2.2.12-alpha.28" + resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-2.2.12-alpha.28.tgz#c35db9d7ddb5f381b99b1226b90bc0c41ace74e5" + integrity sha512-D3j3HhDsBuuMf+LlMTLoiPQuUkp9bMksJcNlTMqh/HAqCWxBNA933KKdv30CVQ5htY5lLGtpDuK/uxUzu36nNw== dependencies: "@budibase/nano" "10.1.1" - "@budibase/types" "2.2.12-alpha.24" + "@budibase/types" "2.2.12-alpha.28" "@shopify/jest-koa-mocks" "5.0.1" "@techpass/passport-openidconnect" "0.3.2" aws-cloudfront-sign "2.2.0" @@ -521,23 +521,23 @@ qs "^6.11.0" tough-cookie "^4.1.2" -"@budibase/pro@2.2.12-alpha.24": - version "2.2.12-alpha.24" - resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-2.2.12-alpha.24.tgz#49095913dca367a1cb67a414b206455dc1bbc7e6" - integrity sha512-Fw1Op8bJnWR+4ALYrfz5QjXOqVAfqoOkHD39zbiaOaQ+bcQPyFMfwUIWJeK+W87k2WrGoiO2QQPtqw6HkiDpXg== +"@budibase/pro@2.2.12-alpha.28": + version "2.2.12-alpha.28" + resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-2.2.12-alpha.28.tgz#3f3150e5833fcbf6b7ad67b51a46d37bc3f4f785" + integrity sha512-0zLOHuI55Hp/6nrAu52i12/Z4agiyStSVREIBm5iXgRN3rLFAS4uu/oqGt5uXtHB4X5WOZ/e29r0uwTGamLhlg== dependencies: - "@budibase/backend-core" "2.2.12-alpha.24" - "@budibase/types" "2.2.12-alpha.24" + "@budibase/backend-core" "2.2.12-alpha.28" + "@budibase/types" "2.2.12-alpha.28" "@koa/router" "8.0.8" bull "4.10.1" joi "17.6.0" jsonwebtoken "8.5.1" node-fetch "^2.6.1" -"@budibase/types@2.2.12-alpha.24": - version "2.2.12-alpha.24" - resolved "https://registry.yarnpkg.com/@budibase/types/-/types-2.2.12-alpha.24.tgz#e3721e29dd158fd00e1f574d10ed59a7c6250097" - integrity sha512-Pu6qenqPFVfwTuepuXXTDZFoTK+4KU2XDwWRKvuzqxnTO5h/q1ObE93cN4+fXNgKCmAFapQX6rwzlNbtWRIizA== +"@budibase/types@2.2.12-alpha.28": + version "2.2.12-alpha.28" + resolved "https://registry.yarnpkg.com/@budibase/types/-/types-2.2.12-alpha.28.tgz#3e937aa478b32ff220ef5482036198e717165768" + integrity sha512-anQMAI27PeA94iHh2NPhFg3ARgVUxErMk2W9fWwj7kOoq1xxhYj1AI9+65v+5HUa3Q0AR9Dx25ja5ZJ7Lhg2ew== "@cspotcode/source-map-support@^0.8.0": version "0.8.1"