1
0
Fork 0
mirror of synced 2024-09-08 05:31:47 +12:00

Merge branch 'develop' of github.com:Budibase/budibase into test/coverage-bckend-core

This commit is contained in:
mike12345567 2023-03-30 14:14:25 +01:00
commit d6f38bc0ba
24 changed files with 169 additions and 80 deletions

View file

@ -1,5 +1,5 @@
{ {
"version": "2.4.42-alpha.2", "version": "2.4.42-alpha.4",
"npmClient": "yarn", "npmClient": "yarn",
"packages": [ "packages": [
"packages/*" "packages/*"

View file

@ -1,6 +1,6 @@
{ {
"name": "@budibase/backend-core", "name": "@budibase/backend-core",
"version": "2.4.42-alpha.2", "version": "2.4.42-alpha.4",
"description": "Budibase backend core libraries used in server and worker", "description": "Budibase backend core libraries used in server and worker",
"main": "dist/src/index.js", "main": "dist/src/index.js",
"types": "dist/src/index.d.ts", "types": "dist/src/index.d.ts",
@ -24,7 +24,7 @@
"dependencies": { "dependencies": {
"@budibase/nano": "10.1.2", "@budibase/nano": "10.1.2",
"@budibase/pouchdb-replication-stream": "1.2.10", "@budibase/pouchdb-replication-stream": "1.2.10",
"@budibase/types": "2.4.42-alpha.2", "@budibase/types": "2.4.42-alpha.4",
"@shopify/jest-koa-mocks": "5.0.1", "@shopify/jest-koa-mocks": "5.0.1",
"@techpass/passport-openidconnect": "0.3.2", "@techpass/passport-openidconnect": "0.3.2",
"aws-cloudfront-sign": "2.2.0", "aws-cloudfront-sign": "2.2.0",

View file

@ -162,7 +162,7 @@ export async function getGoogleConfig(): Promise<
export async function getGoogleDatasourceConfig(): Promise< export async function getGoogleDatasourceConfig(): Promise<
GoogleInnerConfig | undefined GoogleInnerConfig | undefined
> { > {
if (!env.isDev() && !env.SELF_HOSTED) { if (!env.SELF_HOSTED) {
// always use the env vars in cloud // always use the env vars in cloud
return getDefaultGoogleConfig() return getDefaultGoogleConfig()
} }

View file

@ -1,4 +1,9 @@
import { DBTestConfiguration, generator, testEnv } from "../../../tests" import {
DBTestConfiguration,
generator,
testEnv,
structures,
} from "../../../tests"
import { ConfigType } from "@budibase/types" import { ConfigType } from "@budibase/types"
import env from "../../environment" import env from "../../environment"
import * as configs from "../configs" import * as configs from "../configs"
@ -113,4 +118,71 @@ describe("configs", () => {
}) })
}) })
}) })
describe("getGoogleDatasourceConfig", () => {
function setEnvVars() {
env.GOOGLE_CLIENT_SECRET = "test"
env.GOOGLE_CLIENT_ID = "test"
}
function unsetEnvVars() {
env.GOOGLE_CLIENT_SECRET = undefined
env.GOOGLE_CLIENT_ID = undefined
}
describe("cloud", () => {
beforeEach(() => {
testEnv.cloudHosted()
})
it("returns from env vars", async () => {
await config.doInTenant(async () => {
setEnvVars()
const config = await configs.getGoogleDatasourceConfig()
unsetEnvVars()
expect(config).toEqual({
activated: true,
clientID: "test",
clientSecret: "test",
})
})
})
it("returns undefined when no env vars are configured", async () => {
await config.doInTenant(async () => {
const config = await configs.getGoogleDatasourceConfig()
expect(config).toBeUndefined()
})
})
})
describe("self host", () => {
beforeEach(() => {
testEnv.selfHosted()
})
it("returns from config", async () => {
await config.doInTenant(async () => {
const googleDoc = structures.sso.googleConfigDoc()
await configs.save(googleDoc)
const config = await configs.getGoogleDatasourceConfig()
expect(config).toEqual(googleDoc.config)
})
})
it("falls back to env vars when config is disabled", async () => {
await config.doInTenant(async () => {
setEnvVars()
const config = await configs.getGoogleDatasourceConfig()
unsetEnvVars()
expect(config).toEqual({
activated: true,
clientID: "test",
clientSecret: "test",
})
})
})
})
})
}) })

View file

@ -1,4 +1,6 @@
import { import {
ConfigType,
GoogleConfig,
GoogleInnerConfig, GoogleInnerConfig,
JwtClaims, JwtClaims,
OAuth2, OAuth2,
@ -10,10 +12,10 @@ import {
User, User,
} from "@budibase/types" } from "@budibase/types"
import { generator } from "./generator" import { generator } from "./generator"
import { uuid, email } from "./common" import { email, uuid } from "./common"
import * as shared from "./shared" import * as shared from "./shared"
import _ from "lodash"
import { user } from "./shared" import { user } from "./shared"
import _ from "lodash"
export function OAuth(): OAuth2 { export function OAuth(): OAuth2 {
return { return {
@ -107,3 +109,11 @@ export function googleConfig(): GoogleInnerConfig {
clientSecret: generator.string(), clientSecret: generator.string(),
} }
} }
export function googleConfigDoc(): GoogleConfig {
return {
_id: "config_google",
type: ConfigType.GOOGLE,
config: googleConfig(),
}
}

View file

@ -1,7 +1,7 @@
{ {
"name": "@budibase/bbui", "name": "@budibase/bbui",
"description": "A UI solution used in the different Budibase projects.", "description": "A UI solution used in the different Budibase projects.",
"version": "2.4.42-alpha.2", "version": "2.4.42-alpha.4",
"license": "MPL-2.0", "license": "MPL-2.0",
"svelte": "src/index.js", "svelte": "src/index.js",
"module": "dist/bbui.es.js", "module": "dist/bbui.es.js",
@ -38,8 +38,8 @@
], ],
"dependencies": { "dependencies": {
"@adobe/spectrum-css-workflow-icons": "1.2.1", "@adobe/spectrum-css-workflow-icons": "1.2.1",
"@budibase/shared-core": "2.4.42-alpha.2", "@budibase/shared-core": "2.4.42-alpha.4",
"@budibase/string-templates": "2.4.42-alpha.2", "@budibase/string-templates": "2.4.42-alpha.4",
"@spectrum-css/accordion": "3.0.24", "@spectrum-css/accordion": "3.0.24",
"@spectrum-css/actionbutton": "1.0.1", "@spectrum-css/actionbutton": "1.0.1",
"@spectrum-css/actiongroup": "1.0.1", "@spectrum-css/actiongroup": "1.0.1",

View file

@ -1,6 +1,6 @@
{ {
"name": "@budibase/builder", "name": "@budibase/builder",
"version": "2.4.42-alpha.2", "version": "2.4.42-alpha.4",
"license": "GPL-3.0", "license": "GPL-3.0",
"private": true, "private": true,
"scripts": { "scripts": {
@ -58,11 +58,11 @@
} }
}, },
"dependencies": { "dependencies": {
"@budibase/bbui": "2.4.42-alpha.2", "@budibase/bbui": "2.4.42-alpha.4",
"@budibase/client": "2.4.42-alpha.2", "@budibase/client": "2.4.42-alpha.4",
"@budibase/frontend-core": "2.4.42-alpha.2", "@budibase/frontend-core": "2.4.42-alpha.4",
"@budibase/shared-core": "2.4.42-alpha.2", "@budibase/shared-core": "2.4.42-alpha.4",
"@budibase/string-templates": "2.4.42-alpha.2", "@budibase/string-templates": "2.4.42-alpha.4",
"@fortawesome/fontawesome-svg-core": "^6.2.1", "@fortawesome/fontawesome-svg-core": "^6.2.1",
"@fortawesome/free-brands-svg-icons": "^6.2.1", "@fortawesome/free-brands-svg-icons": "^6.2.1",
"@fortawesome/free-solid-svg-icons": "^6.2.1", "@fortawesome/free-solid-svg-icons": "^6.2.1",

View file

@ -12,7 +12,7 @@
// kill the reference so the input isn't saved // kill the reference so the input isn't saved
let datasource = cloneDeep(integration) let datasource = cloneDeep(integration)
$: isGoogleConfigured = !!$organisation.google $: isGoogleConfigured = !!$organisation.googleDatasourceConfigured
onMount(async () => { onMount(async () => {
await organisation.init() await organisation.init()

View file

@ -19,6 +19,7 @@ const DEFAULT_CONFIG = {
company: "Budibase", company: "Budibase",
oidc: undefined, oidc: undefined,
google: undefined, google: undefined,
googleDatasourceConfigured: undefined,
oidcCallbackUrl: "", oidcCallbackUrl: "",
googleCallbackUrl: "", googleCallbackUrl: "",
isSSOEnforced: false, isSSOEnforced: false,
@ -39,6 +40,7 @@ export function createOrganisationStore() {
const storeConfig = _.cloneDeep(get(store)) const storeConfig = _.cloneDeep(get(store))
delete storeConfig.oidc delete storeConfig.oidc
delete storeConfig.google delete storeConfig.google
delete storeConfig.googleDatasourceConfigured
delete storeConfig.oidcCallbackUrl delete storeConfig.oidcCallbackUrl
delete storeConfig.googleCallbackUrl delete storeConfig.googleCallbackUrl
await API.saveConfig({ await API.saveConfig({

View file

@ -1,6 +1,6 @@
{ {
"name": "@budibase/cli", "name": "@budibase/cli",
"version": "2.4.42-alpha.2", "version": "2.4.42-alpha.4",
"description": "Budibase CLI, for developers, self hosting and migrations.", "description": "Budibase CLI, for developers, self hosting and migrations.",
"main": "dist/index.js", "main": "dist/index.js",
"bin": { "bin": {
@ -29,9 +29,9 @@
"outputPath": "build" "outputPath": "build"
}, },
"dependencies": { "dependencies": {
"@budibase/backend-core": "2.4.42-alpha.2", "@budibase/backend-core": "2.4.42-alpha.4",
"@budibase/string-templates": "2.4.42-alpha.2", "@budibase/string-templates": "2.4.42-alpha.4",
"@budibase/types": "2.4.42-alpha.2", "@budibase/types": "2.4.42-alpha.4",
"axios": "0.21.2", "axios": "0.21.2",
"chalk": "4.1.0", "chalk": "4.1.0",
"cli-progress": "3.11.2", "cli-progress": "3.11.2",

View file

@ -1,6 +1,6 @@
{ {
"name": "@budibase/client", "name": "@budibase/client",
"version": "2.4.42-alpha.2", "version": "2.4.42-alpha.4",
"license": "MPL-2.0", "license": "MPL-2.0",
"module": "dist/budibase-client.js", "module": "dist/budibase-client.js",
"main": "dist/budibase-client.js", "main": "dist/budibase-client.js",
@ -19,11 +19,11 @@
"dev:builder": "rollup -cw" "dev:builder": "rollup -cw"
}, },
"dependencies": { "dependencies": {
"@budibase/bbui": "2.4.42-alpha.2", "@budibase/bbui": "2.4.42-alpha.4",
"@budibase/frontend-core": "2.4.42-alpha.2", "@budibase/frontend-core": "2.4.42-alpha.4",
"@budibase/shared-core": "2.4.42-alpha.2", "@budibase/shared-core": "2.4.42-alpha.4",
"@budibase/string-templates": "2.4.42-alpha.2", "@budibase/string-templates": "2.4.42-alpha.4",
"@budibase/types": "2.4.42-alpha.2", "@budibase/types": "2.4.42-alpha.4",
"@spectrum-css/button": "^3.0.3", "@spectrum-css/button": "^3.0.3",
"@spectrum-css/card": "^3.0.3", "@spectrum-css/card": "^3.0.3",
"@spectrum-css/divider": "^1.0.3", "@spectrum-css/divider": "^1.0.3",

View file

@ -1,13 +1,13 @@
{ {
"name": "@budibase/frontend-core", "name": "@budibase/frontend-core",
"version": "2.4.42-alpha.2", "version": "2.4.42-alpha.4",
"description": "Budibase frontend core libraries used in builder and client", "description": "Budibase frontend core libraries used in builder and client",
"author": "Budibase", "author": "Budibase",
"license": "MPL-2.0", "license": "MPL-2.0",
"svelte": "src/index.js", "svelte": "src/index.js",
"dependencies": { "dependencies": {
"@budibase/bbui": "2.4.42-alpha.2", "@budibase/bbui": "2.4.42-alpha.4",
"@budibase/shared-core": "2.4.42-alpha.2", "@budibase/shared-core": "2.4.42-alpha.4",
"lodash": "^4.17.21", "lodash": "^4.17.21",
"svelte": "^3.46.2" "svelte": "^3.46.2"
} }

View file

@ -1,6 +1,6 @@
{ {
"name": "@budibase/sdk", "name": "@budibase/sdk",
"version": "2.4.42-alpha.2", "version": "2.4.42-alpha.4",
"description": "Budibase Public API SDK", "description": "Budibase Public API SDK",
"author": "Budibase", "author": "Budibase",
"license": "MPL-2.0", "license": "MPL-2.0",

View file

@ -1,7 +1,7 @@
{ {
"name": "@budibase/server", "name": "@budibase/server",
"email": "hi@budibase.com", "email": "hi@budibase.com",
"version": "2.4.42-alpha.2", "version": "2.4.42-alpha.4",
"description": "Budibase Web Server", "description": "Budibase Web Server",
"main": "src/index.ts", "main": "src/index.ts",
"repository": { "repository": {
@ -44,12 +44,12 @@
"license": "GPL-3.0", "license": "GPL-3.0",
"dependencies": { "dependencies": {
"@apidevtools/swagger-parser": "10.0.3", "@apidevtools/swagger-parser": "10.0.3",
"@budibase/backend-core": "2.4.42-alpha.2", "@budibase/backend-core": "2.4.42-alpha.4",
"@budibase/client": "2.4.42-alpha.2", "@budibase/client": "2.4.42-alpha.4",
"@budibase/pro": "2.4.42-alpha.2", "@budibase/pro": "2.4.42-alpha.4",
"@budibase/shared-core": "2.4.42-alpha.2", "@budibase/shared-core": "2.4.42-alpha.4",
"@budibase/string-templates": "2.4.42-alpha.2", "@budibase/string-templates": "2.4.42-alpha.4",
"@budibase/types": "2.4.42-alpha.2", "@budibase/types": "2.4.42-alpha.4",
"@bull-board/api": "3.7.0", "@bull-board/api": "3.7.0",
"@bull-board/koa": "3.9.4", "@bull-board/koa": "3.9.4",
"@elastic/elasticsearch": "7.10.0", "@elastic/elasticsearch": "7.10.0",

View file

@ -23,7 +23,7 @@
<!-- Opengraph Meta Tags --> <!-- Opengraph Meta Tags -->
<meta property="og:site_name" content="Budibase" /> <meta property="og:site_name" content="Budibase" />
<meta property="og:title" content="{title} - built with Budibase" /> <meta property="og:title" content={metaTitle} />
<meta property="og:description" content={metaDescription} /> <meta property="og:description" content={metaDescription} />
<meta property="og:type" content="website" /> <meta property="og:type" content="website" />
<meta property="og:image" content={metaImage} /> <meta property="og:image" content={metaImage} />
@ -32,8 +32,8 @@
<meta property="twitter:card" content="summary_large_image" /> <meta property="twitter:card" content="summary_large_image" />
<meta property="twitter:site" content="@budibase" /> <meta property="twitter:site" content="@budibase" />
<meta property="twitter:image" content={metaImage} /> <meta property="twitter:image" content={metaImage} />
<meta property="twitter:image:alt" content="{title} - built with Budibase" /> <meta property="twitter:image:alt" content={metaTitle} />
<meta property="twitter:title" content="{title} - built with Budibase" /> <meta property="twitter:title" content={metaTitle} />
<meta property="twitter:description" content={metaDescription} /> <meta property="twitter:description" content={metaDescription} />
<title>{title}</title> <title>{title}</title>

View file

@ -1290,14 +1290,14 @@
resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39" resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39"
integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw== integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==
"@budibase/backend-core@2.4.42-alpha.2": "@budibase/backend-core@2.4.42-alpha.4":
version "2.4.42-alpha.2" version "2.4.42-alpha.4"
resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-2.4.42-alpha.2.tgz#b51c6fadb97f9f0a6d980a132d073e88c1c53bf8" resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-2.4.42-alpha.4.tgz#e4e86811dab639e211c3c4ad540841279f634115"
integrity sha512-lgEiSHHioKAOn34DT0mfZ31S/SvPxDn671Zjazc33QCwAEEtzPuU6/z3N/xkwDYc32fZkh1up5CuAce55UPU6w== integrity sha512-var93QWJbwPHQtR4zIy/7g8ABOT2fQb43FMC2A+CLAQnJxBCu0Rcvk/5jkwOe18Te2+AiylC1OIGfvVbD3TTYA==
dependencies: dependencies:
"@budibase/nano" "10.1.2" "@budibase/nano" "10.1.2"
"@budibase/pouchdb-replication-stream" "1.2.10" "@budibase/pouchdb-replication-stream" "1.2.10"
"@budibase/types" "2.4.42-alpha.2" "@budibase/types" "2.4.42-alpha.4"
"@shopify/jest-koa-mocks" "5.0.1" "@shopify/jest-koa-mocks" "5.0.1"
"@techpass/passport-openidconnect" "0.3.2" "@techpass/passport-openidconnect" "0.3.2"
aws-cloudfront-sign "2.2.0" aws-cloudfront-sign "2.2.0"
@ -1429,14 +1429,14 @@
pouchdb-promise "^6.0.4" pouchdb-promise "^6.0.4"
through2 "^2.0.0" through2 "^2.0.0"
"@budibase/pro@2.4.42-alpha.2": "@budibase/pro@2.4.42-alpha.4":
version "2.4.42-alpha.2" version "2.4.42-alpha.4"
resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-2.4.42-alpha.2.tgz#037bc36e8a64b35f31d5625f9a6c2687b2bc22b2" resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-2.4.42-alpha.4.tgz#8e81d08b4363c59e6aa872f532287327c2ef5e1e"
integrity sha512-fpdBvSuz2mrNPxI9zDtBi1TFuGHw6xQNHJhNjwtJXFxDbPiIUsxitrQA4neZvYQ0BH/0PPSw5tmrE+2uemZcEw== integrity sha512-6/CMcDnLRSzimR1JVy2FindRzN0YEo/B4lwYPtS2T5ORyCSBL24flwD15lhp2W4g0e1TF/+fPK/EaEXhJZglBg==
dependencies: dependencies:
"@budibase/backend-core" "2.4.42-alpha.2" "@budibase/backend-core" "2.4.42-alpha.4"
"@budibase/string-templates" "2.3.20" "@budibase/string-templates" "2.3.20"
"@budibase/types" "2.4.42-alpha.2" "@budibase/types" "2.4.42-alpha.4"
"@koa/router" "8.0.8" "@koa/router" "8.0.8"
bull "4.10.1" bull "4.10.1"
joi "17.6.0" joi "17.6.0"
@ -1475,10 +1475,10 @@
lodash "^4.17.20" lodash "^4.17.20"
vm2 "^3.9.4" vm2 "^3.9.4"
"@budibase/types@2.4.42-alpha.2": "@budibase/types@2.4.42-alpha.4":
version "2.4.42-alpha.2" version "2.4.42-alpha.4"
resolved "https://registry.yarnpkg.com/@budibase/types/-/types-2.4.42-alpha.2.tgz#57eb9c224dd13c4a25cf3f6b1c440a1354fd38e0" resolved "https://registry.yarnpkg.com/@budibase/types/-/types-2.4.42-alpha.4.tgz#4a1ae0a9cd03e4ee0f81f64a494fbfd13ddbfdf6"
integrity sha512-LzmMywUeK82YHOXw9mhrh/PXryOn+JahB/zZWkcSjiIPF+VPEfhGK4ZSKV9jvNrVycAjcwzgEGbjrXfT289Qqg== integrity sha512-eBB+VVtkld140Jno/quRlwlu9Q1GkeLyUQeXSrOed8dlmmImS4UKpOpAru+YxTklIvexJsM9H+AQw39IZR7L3g==
"@bull-board/api@3.7.0": "@bull-board/api@3.7.0":
version "3.7.0" version "3.7.0"

View file

@ -1,6 +1,6 @@
{ {
"name": "@budibase/shared-core", "name": "@budibase/shared-core",
"version": "2.4.42-alpha.2", "version": "2.4.42-alpha.4",
"description": "Shared data utils", "description": "Shared data utils",
"main": "dist/cjs/src/index.js", "main": "dist/cjs/src/index.js",
"types": "dist/mjs/src/index.d.ts", "types": "dist/mjs/src/index.d.ts",
@ -20,7 +20,7 @@
"dev:builder": "yarn prebuild && concurrently \"tsc -p tsconfig.build.json --watch\" \"tsc -p tsconfig-cjs.build.json --watch\"" "dev:builder": "yarn prebuild && concurrently \"tsc -p tsconfig.build.json --watch\" \"tsc -p tsconfig-cjs.build.json --watch\""
}, },
"dependencies": { "dependencies": {
"@budibase/types": "2.4.42-alpha.2" "@budibase/types": "2.4.42-alpha.4"
}, },
"devDependencies": { "devDependencies": {
"concurrently": "^7.6.0", "concurrently": "^7.6.0",

View file

@ -1,6 +1,6 @@
{ {
"name": "@budibase/string-templates", "name": "@budibase/string-templates",
"version": "2.4.42-alpha.2", "version": "2.4.42-alpha.4",
"description": "Handlebars wrapper for Budibase templating.", "description": "Handlebars wrapper for Budibase templating.",
"main": "src/index.cjs", "main": "src/index.cjs",
"module": "dist/bundle.mjs", "module": "dist/bundle.mjs",

View file

@ -1,6 +1,6 @@
{ {
"name": "@budibase/types", "name": "@budibase/types",
"version": "2.4.42-alpha.2", "version": "2.4.42-alpha.4",
"description": "Budibase types", "description": "Budibase types",
"main": "dist/cjs/index.js", "main": "dist/cjs/index.js",
"types": "dist/mjs/index.d.ts", "types": "dist/mjs/index.d.ts",

View file

@ -5,6 +5,7 @@ import { SettingsConfig, SettingsInnerConfig } from "../../../documents"
*/ */
export interface PublicSettingsInnerConfig extends SettingsInnerConfig { export interface PublicSettingsInnerConfig extends SettingsInnerConfig {
google: boolean google: boolean
googleDatasourceConfigured: boolean
oidc: boolean oidc: boolean
oidcCallbackUrl: string oidcCallbackUrl: string
googleCallbackUrl: string googleCallbackUrl: string

View file

@ -1,7 +1,7 @@
{ {
"name": "@budibase/worker", "name": "@budibase/worker",
"email": "hi@budibase.com", "email": "hi@budibase.com",
"version": "2.4.42-alpha.2", "version": "2.4.42-alpha.4",
"description": "Budibase background service", "description": "Budibase background service",
"main": "src/index.ts", "main": "src/index.ts",
"repository": { "repository": {
@ -36,10 +36,10 @@
"author": "Budibase", "author": "Budibase",
"license": "GPL-3.0", "license": "GPL-3.0",
"dependencies": { "dependencies": {
"@budibase/backend-core": "2.4.42-alpha.2", "@budibase/backend-core": "2.4.42-alpha.4",
"@budibase/pro": "2.4.42-alpha.2", "@budibase/pro": "2.4.42-alpha.4",
"@budibase/string-templates": "2.4.42-alpha.2", "@budibase/string-templates": "2.4.42-alpha.4",
"@budibase/types": "2.4.42-alpha.2", "@budibase/types": "2.4.42-alpha.4",
"@koa/router": "8.0.8", "@koa/router": "8.0.8",
"@sentry/node": "6.17.7", "@sentry/node": "6.17.7",
"@techpass/passport-openidconnect": "0.3.2", "@techpass/passport-openidconnect": "0.3.2",

View file

@ -332,6 +332,8 @@ export async function publicSettings(
// google // google
const googleConfig = await configs.getGoogleConfig() const googleConfig = await configs.getGoogleConfig()
const googleDatasourceConfigured =
!!(await configs.getGoogleDatasourceConfig())
const preActivated = googleConfig && googleConfig.activated == null const preActivated = googleConfig && googleConfig.activated == null
const google = preActivated || !!googleConfig?.activated const google = preActivated || !!googleConfig?.activated
const _googleCallbackUrl = await googleCallbackUrl(googleConfig) const _googleCallbackUrl = await googleCallbackUrl(googleConfig)
@ -352,6 +354,7 @@ export async function publicSettings(
...config, ...config,
...branding, ...branding,
google, google,
googleDatasourceConfigured,
oidc, oidc,
isSSOEnforced, isSSOEnforced,
oidcCallbackUrl: _oidcCallbackUrl, oidcCallbackUrl: _oidcCallbackUrl,

View file

@ -290,6 +290,7 @@ describe("configs", () => {
logoUrl: "", logoUrl: "",
analyticsEnabled: false, analyticsEnabled: false,
google: false, google: false,
googleDatasourceConfigured: false,
googleCallbackUrl: `http://localhost:10000/api/global/auth/${config.tenantId}/google/callback`, googleCallbackUrl: `http://localhost:10000/api/global/auth/${config.tenantId}/google/callback`,
isSSOEnforced: false, isSSOEnforced: false,
oidc: false, oidc: false,

View file

@ -475,14 +475,14 @@
resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39" resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39"
integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw== integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==
"@budibase/backend-core@2.4.42-alpha.2": "@budibase/backend-core@2.4.42-alpha.4":
version "2.4.42-alpha.2" version "2.4.42-alpha.4"
resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-2.4.42-alpha.2.tgz#b51c6fadb97f9f0a6d980a132d073e88c1c53bf8" resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-2.4.42-alpha.4.tgz#e4e86811dab639e211c3c4ad540841279f634115"
integrity sha512-lgEiSHHioKAOn34DT0mfZ31S/SvPxDn671Zjazc33QCwAEEtzPuU6/z3N/xkwDYc32fZkh1up5CuAce55UPU6w== integrity sha512-var93QWJbwPHQtR4zIy/7g8ABOT2fQb43FMC2A+CLAQnJxBCu0Rcvk/5jkwOe18Te2+AiylC1OIGfvVbD3TTYA==
dependencies: dependencies:
"@budibase/nano" "10.1.2" "@budibase/nano" "10.1.2"
"@budibase/pouchdb-replication-stream" "1.2.10" "@budibase/pouchdb-replication-stream" "1.2.10"
"@budibase/types" "2.4.42-alpha.2" "@budibase/types" "2.4.42-alpha.4"
"@shopify/jest-koa-mocks" "5.0.1" "@shopify/jest-koa-mocks" "5.0.1"
"@techpass/passport-openidconnect" "0.3.2" "@techpass/passport-openidconnect" "0.3.2"
aws-cloudfront-sign "2.2.0" aws-cloudfront-sign "2.2.0"
@ -564,14 +564,14 @@
pouchdb-promise "^6.0.4" pouchdb-promise "^6.0.4"
through2 "^2.0.0" through2 "^2.0.0"
"@budibase/pro@2.4.42-alpha.2": "@budibase/pro@2.4.42-alpha.4":
version "2.4.42-alpha.2" version "2.4.42-alpha.4"
resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-2.4.42-alpha.2.tgz#037bc36e8a64b35f31d5625f9a6c2687b2bc22b2" resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-2.4.42-alpha.4.tgz#8e81d08b4363c59e6aa872f532287327c2ef5e1e"
integrity sha512-fpdBvSuz2mrNPxI9zDtBi1TFuGHw6xQNHJhNjwtJXFxDbPiIUsxitrQA4neZvYQ0BH/0PPSw5tmrE+2uemZcEw== integrity sha512-6/CMcDnLRSzimR1JVy2FindRzN0YEo/B4lwYPtS2T5ORyCSBL24flwD15lhp2W4g0e1TF/+fPK/EaEXhJZglBg==
dependencies: dependencies:
"@budibase/backend-core" "2.4.42-alpha.2" "@budibase/backend-core" "2.4.42-alpha.4"
"@budibase/string-templates" "2.3.20" "@budibase/string-templates" "2.3.20"
"@budibase/types" "2.4.42-alpha.2" "@budibase/types" "2.4.42-alpha.4"
"@koa/router" "8.0.8" "@koa/router" "8.0.8"
bull "4.10.1" bull "4.10.1"
joi "17.6.0" joi "17.6.0"
@ -592,10 +592,10 @@
lodash "^4.17.20" lodash "^4.17.20"
vm2 "^3.9.4" vm2 "^3.9.4"
"@budibase/types@2.4.42-alpha.2": "@budibase/types@2.4.42-alpha.4":
version "2.4.42-alpha.2" version "2.4.42-alpha.4"
resolved "https://registry.yarnpkg.com/@budibase/types/-/types-2.4.42-alpha.2.tgz#57eb9c224dd13c4a25cf3f6b1c440a1354fd38e0" resolved "https://registry.yarnpkg.com/@budibase/types/-/types-2.4.42-alpha.4.tgz#4a1ae0a9cd03e4ee0f81f64a494fbfd13ddbfdf6"
integrity sha512-LzmMywUeK82YHOXw9mhrh/PXryOn+JahB/zZWkcSjiIPF+VPEfhGK4ZSKV9jvNrVycAjcwzgEGbjrXfT289Qqg== integrity sha512-eBB+VVtkld140Jno/quRlwlu9Q1GkeLyUQeXSrOed8dlmmImS4UKpOpAru+YxTklIvexJsM9H+AQw39IZR7L3g==
"@cspotcode/source-map-support@^0.8.0": "@cspotcode/source-map-support@^0.8.0":
version "0.8.1" version "0.8.1"