Merge branch 'master' of github.com:Budibase/budibase into interactive-layouts
This commit is contained in:
commit
9040a0bd1c
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
"version": "0.9.39",
|
"version": "0.9.40",
|
||||||
"npmClient": "yarn",
|
"npmClient": "yarn",
|
||||||
"packages": [
|
"packages": [
|
||||||
"packages/*"
|
"packages/*"
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "@budibase/auth",
|
"name": "@budibase/auth",
|
||||||
"version": "0.9.39",
|
"version": "0.9.40",
|
||||||
"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",
|
||||||
|
|
|
@ -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.39",
|
"version": "0.9.40",
|
||||||
"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",
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "@budibase/builder",
|
"name": "@budibase/builder",
|
||||||
"version": "0.9.39",
|
"version": "0.9.40",
|
||||||
"license": "AGPL-3.0",
|
"license": "AGPL-3.0",
|
||||||
"private": true,
|
"private": true,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
@ -65,10 +65,10 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@budibase/bbui": "^0.9.39",
|
"@budibase/bbui": "^0.9.40",
|
||||||
"@budibase/client": "^0.9.39",
|
"@budibase/client": "^0.9.40",
|
||||||
"@budibase/colorpicker": "1.1.2",
|
"@budibase/colorpicker": "1.1.2",
|
||||||
"@budibase/string-templates": "^0.9.39",
|
"@budibase/string-templates": "^0.9.40",
|
||||||
"@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",
|
||||||
|
|
|
@ -38,17 +38,21 @@
|
||||||
let loading
|
let loading
|
||||||
|
|
||||||
async function saveSmtp() {
|
async function saveSmtp() {
|
||||||
try {
|
|
||||||
// Save your SMTP config
|
// Save your SMTP config
|
||||||
const response = await api.post(`/api/admin/configs`, smtpConfig)
|
const response = await api.post(`/api/admin/configs`, smtpConfig)
|
||||||
|
|
||||||
|
if (response.status !== 200) {
|
||||||
|
const error = await response.text()
|
||||||
|
let message = error
|
||||||
|
try {
|
||||||
|
message = JSON.parse(error).message
|
||||||
|
} catch (err) {}
|
||||||
|
notifications.error(`Failed to save email settings, reason: ${message}`)
|
||||||
|
} else {
|
||||||
const json = await response.json()
|
const json = await response.json()
|
||||||
if (response.status !== 200) throw new Error(json.message)
|
|
||||||
smtpConfig._rev = json._rev
|
smtpConfig._rev = json._rev
|
||||||
smtpConfig._id = json._id
|
smtpConfig._id = json._id
|
||||||
|
|
||||||
notifications.success(`Settings saved.`)
|
notifications.success(`Settings saved.`)
|
||||||
} catch (err) {
|
|
||||||
notifications.error(`Failed to save email settings. ${err}`)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "@budibase/cli",
|
"name": "@budibase/cli",
|
||||||
"version": "0.9.39",
|
"version": "0.9.40",
|
||||||
"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": {
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "@budibase/client",
|
"name": "@budibase/client",
|
||||||
"version": "0.9.39",
|
"version": "0.9.40",
|
||||||
"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,13 +19,13 @@
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@budibase/bbui": "^0.9.27",
|
"@budibase/bbui": "^0.9.27",
|
||||||
"@budibase/string-templates": "^0.9.39",
|
"@budibase/string-templates": "^0.9.40",
|
||||||
"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"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@budibase/standard-components": "^0.9.39",
|
"@budibase/standard-components": "^0.9.40",
|
||||||
"@rollup/plugin-commonjs": "^18.0.0",
|
"@rollup/plugin-commonjs": "^18.0.0",
|
||||||
"@rollup/plugin-node-resolve": "^11.2.1",
|
"@rollup/plugin-node-resolve": "^11.2.1",
|
||||||
"fs-extra": "^8.1.0",
|
"fs-extra": "^8.1.0",
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
"name": "@budibase/server",
|
"name": "@budibase/server",
|
||||||
"email": "hi@budibase.com",
|
"email": "hi@budibase.com",
|
||||||
"version": "0.9.39",
|
"version": "0.9.40",
|
||||||
"description": "Budibase Web Server",
|
"description": "Budibase Web Server",
|
||||||
"main": "src/electron.js",
|
"main": "src/electron.js",
|
||||||
"repository": {
|
"repository": {
|
||||||
|
@ -55,9 +55,9 @@
|
||||||
"author": "Budibase",
|
"author": "Budibase",
|
||||||
"license": "AGPL-3.0-or-later",
|
"license": "AGPL-3.0-or-later",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@budibase/auth": "^0.9.39",
|
"@budibase/auth": "^0.9.40",
|
||||||
"@budibase/client": "^0.9.39",
|
"@budibase/client": "^0.9.40",
|
||||||
"@budibase/string-templates": "^0.9.39",
|
"@budibase/string-templates": "^0.9.40",
|
||||||
"@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",
|
||||||
|
@ -109,7 +109,7 @@
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@babel/core": "^7.14.3",
|
"@babel/core": "^7.14.3",
|
||||||
"@babel/preset-env": "^7.14.4",
|
"@babel/preset-env": "^7.14.4",
|
||||||
"@budibase/standard-components": "^0.9.39",
|
"@budibase/standard-components": "^0.9.40",
|
||||||
"@jest/test-sequencer": "^24.8.0",
|
"@jest/test-sequencer": "^24.8.0",
|
||||||
"babel-jest": "^27.0.2",
|
"babel-jest": "^27.0.2",
|
||||||
"docker-compose": "^0.23.6",
|
"docker-compose": "^0.23.6",
|
||||||
|
|
|
@ -29,11 +29,11 @@
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"svelte"
|
"svelte"
|
||||||
],
|
],
|
||||||
"version": "0.9.39",
|
"version": "0.9.40",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"gitHead": "d1836a898cab3f8ab80ee6d8f42be1a9eed7dcdc",
|
"gitHead": "d1836a898cab3f8ab80ee6d8f42be1a9eed7dcdc",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@budibase/bbui": "^0.9.39",
|
"@budibase/bbui": "^0.9.40",
|
||||||
"@spectrum-css/page": "^3.0.1",
|
"@spectrum-css/page": "^3.0.1",
|
||||||
"@spectrum-css/vars": "^3.0.1",
|
"@spectrum-css/vars": "^3.0.1",
|
||||||
"apexcharts": "^3.22.1",
|
"apexcharts": "^3.22.1",
|
||||||
|
|
|
@ -13,7 +13,9 @@ export const buildLuceneQuery = filter => {
|
||||||
notEmpty: {},
|
notEmpty: {},
|
||||||
}
|
}
|
||||||
if (Array.isArray(filter)) {
|
if (Array.isArray(filter)) {
|
||||||
filter.forEach(({ operator, field, type, value }) => {
|
// Build up proper range filters
|
||||||
|
filter.forEach(expression => {
|
||||||
|
const { operator, field, type, value } = expression
|
||||||
if (operator.startsWith("range")) {
|
if (operator.startsWith("range")) {
|
||||||
if (!query.range[field]) {
|
if (!query.range[field]) {
|
||||||
query.range[field] = {
|
query.range[field] = {
|
||||||
|
@ -33,10 +35,24 @@ export const buildLuceneQuery = filter => {
|
||||||
query.range[field].high = value
|
query.range[field].high = value
|
||||||
}
|
}
|
||||||
} else if (query[operator]) {
|
} else if (query[operator]) {
|
||||||
|
if (type === "boolean") {
|
||||||
|
// Transform boolean filters to cope with null.
|
||||||
|
// "equals false" needs to be "not equals true"
|
||||||
|
// "not equals false" needs to be "equals true"
|
||||||
|
if (operator === "equal" && value === "false") {
|
||||||
|
query.notEqual[field] = "true"
|
||||||
|
} else if (operator === "notEqual" && value === "false") {
|
||||||
|
query.equal[field] = "true"
|
||||||
|
} else {
|
||||||
query[operator][field] = value
|
query[operator][field] = value
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
query[operator][field] = value
|
||||||
|
}
|
||||||
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
return query
|
return query
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "@budibase/string-templates",
|
"name": "@budibase/string-templates",
|
||||||
"version": "0.9.39",
|
"version": "0.9.40",
|
||||||
"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",
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
"name": "@budibase/worker",
|
"name": "@budibase/worker",
|
||||||
"email": "hi@budibase.com",
|
"email": "hi@budibase.com",
|
||||||
"version": "0.9.39",
|
"version": "0.9.40",
|
||||||
"description": "Budibase background service",
|
"description": "Budibase background service",
|
||||||
"main": "src/index.js",
|
"main": "src/index.js",
|
||||||
"repository": {
|
"repository": {
|
||||||
|
@ -21,8 +21,8 @@
|
||||||
"author": "Budibase",
|
"author": "Budibase",
|
||||||
"license": "AGPL-3.0-or-later",
|
"license": "AGPL-3.0-or-later",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@budibase/auth": "^0.9.39",
|
"@budibase/auth": "^0.9.40",
|
||||||
"@budibase/string-templates": "^0.9.39",
|
"@budibase/string-templates": "^0.9.40",
|
||||||
"@koa/router": "^8.0.0",
|
"@koa/router": "^8.0.0",
|
||||||
"aws-sdk": "^2.811.0",
|
"aws-sdk": "^2.811.0",
|
||||||
"bcryptjs": "^2.4.3",
|
"bcryptjs": "^2.4.3",
|
||||||
|
|
|
@ -27,12 +27,16 @@ exports.save = async function (ctx) {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
try {
|
||||||
// verify the configuration
|
// verify the configuration
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case Configs.SMTP:
|
case Configs.SMTP:
|
||||||
await email.verifyConfig(config)
|
await email.verifyConfig(config)
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
} catch (err) {
|
||||||
|
ctx.throw(400, err)
|
||||||
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const response = await db.put(ctx.request.body)
|
const response = await db.put(ctx.request.body)
|
||||||
|
@ -42,7 +46,7 @@ exports.save = async function (ctx) {
|
||||||
_rev: response.rev,
|
_rev: response.rev,
|
||||||
}
|
}
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
ctx.throw(err.status, err)
|
ctx.throw(400, err)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -14,7 +14,6 @@ function smtpValidation() {
|
||||||
host: Joi.string().required(),
|
host: Joi.string().required(),
|
||||||
from: Joi.string().email().required(),
|
from: Joi.string().email().required(),
|
||||||
secure: Joi.boolean().optional(),
|
secure: Joi.boolean().optional(),
|
||||||
selfSigned: Joi.boolean().optional(),
|
|
||||||
auth: Joi.object({
|
auth: Joi.object({
|
||||||
type: Joi.string().valid("login", "oauth2", null),
|
type: Joi.string().valid("login", "oauth2", null),
|
||||||
user: Joi.string().required(),
|
user: Joi.string().required(),
|
||||||
|
|
|
@ -27,11 +27,9 @@ function createSMTPTransport(config) {
|
||||||
secure: config.secure || false,
|
secure: config.secure || false,
|
||||||
auth: config.auth,
|
auth: config.auth,
|
||||||
}
|
}
|
||||||
if (config.selfSigned) {
|
|
||||||
options.tls = {
|
options.tls = {
|
||||||
rejectUnauthorized: false,
|
rejectUnauthorized: false,
|
||||||
}
|
}
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
options = {
|
options = {
|
||||||
port: 587,
|
port: 587,
|
||||||
|
|
Loading…
Reference in New Issue