Merge branch 'develop' of github.com:Budibase/budibase into feature/automation-rework

This commit is contained in:
mike12345567 2021-09-10 11:16:43 +01:00
commit da9d78d1fb
13 changed files with 38 additions and 32 deletions

View File

@ -1,5 +1,5 @@
{ {
"version": "0.9.123-alpha.3", "version": "0.9.123-alpha.6",
"npmClient": "yarn", "npmClient": "yarn",
"packages": [ "packages": [
"packages/*" "packages/*"

View File

@ -1,6 +1,6 @@
{ {
"name": "@budibase/auth", "name": "@budibase/auth",
"version": "0.9.123-alpha.3", "version": "0.9.123-alpha.6",
"description": "Authentication middlewares for budibase builder and apps", "description": "Authentication middlewares for budibase builder and apps",
"main": "src/index.js", "main": "src/index.js",
"author": "Budibase", "author": "Budibase",

View File

@ -56,9 +56,13 @@ function init() {
if (CLIENT) { if (CLIENT) {
CLIENT.disconnect() CLIENT.disconnect()
} }
const { opts, host, port } = getRedisOptions(CLUSTERED)
const { redisProtocolUrl, opts, host, port } = getRedisOptions(CLUSTERED)
if (CLUSTERED) { if (CLUSTERED) {
CLIENT = new Redis.Cluster([{ host, port }], opts) CLIENT = new Redis.Cluster([{ host, port }], opts)
} else if (redisProtocolUrl) {
CLIENT = new Redis(redisProtocolUrl)
} else { } else {
CLIENT = new Redis(opts) CLIENT = new Redis(opts)
} }

View File

@ -18,7 +18,15 @@ exports.Databases = {
exports.SEPARATOR = SEPARATOR exports.SEPARATOR = SEPARATOR
exports.getRedisOptions = (clustered = false) => { exports.getRedisOptions = (clustered = false) => {
const [host, port] = REDIS_URL.split(":") const [host, port, ...rest] = REDIS_URL.split(":")
let redisProtocolUrl
// fully qualified redis URL
if (rest.length && /rediss?/.test(host)) {
redisProtocolUrl = REDIS_URL
}
const opts = { const opts = {
connectTimeout: CONNECT_TIMEOUT_MS, connectTimeout: CONNECT_TIMEOUT_MS,
} }
@ -33,7 +41,7 @@ exports.getRedisOptions = (clustered = false) => {
opts.port = port opts.port = port
opts.password = REDIS_PASSWORD opts.password = REDIS_PASSWORD
} }
return { opts, host, port } return { opts, host, port, redisProtocolUrl }
} }
exports.addDbPrefix = (db, key) => { exports.addDbPrefix = (db, key) => {

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": "0.9.123-alpha.3", "version": "0.9.123-alpha.6",
"license": "AGPL-3.0", "license": "AGPL-3.0",
"svelte": "src/index.js", "svelte": "src/index.js",
"module": "dist/bbui.es.js", "module": "dist/bbui.es.js",

View File

@ -42,7 +42,7 @@
<div <div
on:click on:click
class:spectrum-ProgressCircle--indeterminate={!value} class:spectrum-ProgressCircle--indeterminate={value == null}
class:spectrum-ProgressCircle--overBackground={overBackground} class:spectrum-ProgressCircle--overBackground={overBackground}
class="spectrum-ProgressCircle spectrum-ProgressCircle--{convertSize(size)}" class="spectrum-ProgressCircle spectrum-ProgressCircle--{convertSize(size)}"
> >

View File

@ -1,6 +1,6 @@
{ {
"name": "@budibase/builder", "name": "@budibase/builder",
"version": "0.9.123-alpha.3", "version": "0.9.123-alpha.6",
"license": "AGPL-3.0", "license": "AGPL-3.0",
"private": true, "private": true,
"scripts": { "scripts": {
@ -65,10 +65,10 @@
} }
}, },
"dependencies": { "dependencies": {
"@budibase/bbui": "^0.9.123-alpha.3", "@budibase/bbui": "^0.9.123-alpha.6",
"@budibase/client": "^0.9.123-alpha.3", "@budibase/client": "^0.9.123-alpha.6",
"@budibase/colorpicker": "1.1.2", "@budibase/colorpicker": "1.1.2",
"@budibase/string-templates": "^0.9.123-alpha.3", "@budibase/string-templates": "^0.9.123-alpha.6",
"@sentry/browser": "5.19.1", "@sentry/browser": "5.19.1",
"@spectrum-css/page": "^3.0.1", "@spectrum-css/page": "^3.0.1",
"@spectrum-css/vars": "^3.0.1", "@spectrum-css/vars": "^3.0.1",

View File

@ -25,20 +25,14 @@ export function createAdminStore() {
`/api/global/configs/checklist?tenantId=${tenantId}` `/api/global/configs/checklist?tenantId=${tenantId}`
) )
const json = await response.json() const json = await response.json()
const totalSteps = Object.keys(json).length
const onboardingSteps = Object.keys(json) const completedSteps = Object.values(json).filter(x => x?.checked).length
const stepsComplete = onboardingSteps.reduce(
(score, step) => (score + step.checked ? 1 : 0),
0
)
await getFlags() await getFlags()
admin.update(store => { admin.update(store => {
store.loaded = true store.loaded = true
store.checklist = json store.checklist = json
store.onboardingProgress = store.onboardingProgress = (completedSteps / totalSteps) * 100
(stepsComplete / onboardingSteps.length) * 100
return store return store
}) })
} catch (err) { } catch (err) {

View File

@ -1,6 +1,6 @@
{ {
"name": "@budibase/cli", "name": "@budibase/cli",
"version": "0.9.123-alpha.3", "version": "0.9.123-alpha.6",
"description": "Budibase CLI, for developers, self hosting and migrations.", "description": "Budibase CLI, for developers, self hosting and migrations.",
"main": "src/index.js", "main": "src/index.js",
"bin": { "bin": {

View File

@ -1,6 +1,6 @@
{ {
"name": "@budibase/client", "name": "@budibase/client",
"version": "0.9.123-alpha.3", "version": "0.9.123-alpha.6",
"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,8 +19,8 @@
"dev:builder": "rollup -cw" "dev:builder": "rollup -cw"
}, },
"dependencies": { "dependencies": {
"@budibase/bbui": "^0.9.123-alpha.3", "@budibase/bbui": "^0.9.123-alpha.6",
"@budibase/string-templates": "^0.9.123-alpha.3", "@budibase/string-templates": "^0.9.123-alpha.6",
"regexparam": "^1.3.0", "regexparam": "^1.3.0",
"shortid": "^2.2.15", "shortid": "^2.2.15",
"svelte-spa-router": "^3.0.5" "svelte-spa-router": "^3.0.5"

View File

@ -1,7 +1,7 @@
{ {
"name": "@budibase/server", "name": "@budibase/server",
"email": "hi@budibase.com", "email": "hi@budibase.com",
"version": "0.9.123-alpha.3", "version": "0.9.123-alpha.6",
"description": "Budibase Web Server", "description": "Budibase Web Server",
"main": "src/index.js", "main": "src/index.js",
"repository": { "repository": {
@ -61,9 +61,9 @@
"author": "Budibase", "author": "Budibase",
"license": "AGPL-3.0-or-later", "license": "AGPL-3.0-or-later",
"dependencies": { "dependencies": {
"@budibase/auth": "^0.9.123-alpha.3", "@budibase/auth": "^0.9.123-alpha.6",
"@budibase/client": "^0.9.123-alpha.3", "@budibase/client": "^0.9.123-alpha.6",
"@budibase/string-templates": "^0.9.123-alpha.3", "@budibase/string-templates": "^0.9.123-alpha.6",
"@elastic/elasticsearch": "7.10.0", "@elastic/elasticsearch": "7.10.0",
"@koa/router": "8.0.0", "@koa/router": "8.0.0",
"@sendgrid/mail": "7.1.1", "@sendgrid/mail": "7.1.1",

View File

@ -1,6 +1,6 @@
{ {
"name": "@budibase/string-templates", "name": "@budibase/string-templates",
"version": "0.9.123-alpha.3", "version": "0.9.123-alpha.6",
"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,7 +1,7 @@
{ {
"name": "@budibase/worker", "name": "@budibase/worker",
"email": "hi@budibase.com", "email": "hi@budibase.com",
"version": "0.9.123-alpha.3", "version": "0.9.123-alpha.6",
"description": "Budibase background service", "description": "Budibase background service",
"main": "src/index.js", "main": "src/index.js",
"repository": { "repository": {
@ -23,8 +23,8 @@
"author": "Budibase", "author": "Budibase",
"license": "AGPL-3.0-or-later", "license": "AGPL-3.0-or-later",
"dependencies": { "dependencies": {
"@budibase/auth": "^0.9.123-alpha.3", "@budibase/auth": "^0.9.123-alpha.6",
"@budibase/string-templates": "^0.9.123-alpha.3", "@budibase/string-templates": "^0.9.123-alpha.6",
"@koa/router": "^8.0.0", "@koa/router": "^8.0.0",
"@techpass/passport-openidconnect": "^0.3.0", "@techpass/passport-openidconnect": "^0.3.0",
"aws-sdk": "^2.811.0", "aws-sdk": "^2.811.0",