Merge branch 'master' into feature/layout-poc

This commit is contained in:
Keviin Åberg Kultalahti 2021-06-10 13:55:48 +02:00
commit a66d3456b8
15 changed files with 69 additions and 40 deletions

View File

@ -14,7 +14,6 @@ services:
environment:
MINIO_ACCESS_KEY: ${MINIO_ACCESS_KEY}
MINIO_SECRET_KEY: ${MINIO_SECRET_KEY}
MINIO_BROWSER: "off"
command: server /data
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:9000/minio/health/live"]

View File

@ -1,5 +1,5 @@
{
"version": "0.9.41",
"version": "0.9.43",
"npmClient": "yarn",
"packages": [
"packages/*"

View File

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

View File

@ -1,7 +1,7 @@
{
"name": "@budibase/bbui",
"description": "A UI solution used in the different Budibase projects.",
"version": "0.9.41",
"version": "0.9.43",
"license": "AGPL-3.0",
"svelte": "src/index.js",
"module": "dist/bbui.es.js",

View File

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

View File

@ -5,16 +5,18 @@
Heading,
Divider,
Label,
Page,
notifications,
Layout,
Input,
Select,
Body,
Table,
Checkbox,
} from "@budibase/bbui"
import { email } from "stores/portal"
import TemplateLink from "./_components/TemplateLink.svelte"
import api from "builderStore/api"
import { cloneDeep } from "lodash/fp"
const ConfigTypes = {
SMTP: "smtp",
@ -36,10 +38,16 @@
let smtpConfig
let loading
let requireAuth = false
async function saveSmtp() {
// clone it so we can remove stuff if required
const smtp = cloneDeep(smtpConfig)
if (!requireAuth) {
delete smtp.config.auth
}
// Save your SMTP config
const response = await api.post(`/api/admin/configs`, smtpConfig)
const response = await api.post(`/api/admin/configs`, smtp)
if (response.status !== 200) {
const error = await response.text()
@ -66,15 +74,19 @@
smtpConfig = {
type: ConfigTypes.SMTP,
config: {
auth: {
type: "login",
},
secure: true,
},
}
} else {
smtpConfig = smtpDoc
}
loading = false
requireAuth = smtpConfig.config.auth != null
// always attach the auth for the forms purpose -
// this will be removed later if required
smtpConfig.config.auth = {
type: "login",
}
}
fetchSmtp()
@ -103,10 +115,26 @@
<Label size="L">Host</Label>
<Input bind:value={smtpConfig.config.host} />
</div>
<div class="form-row">
<Label size="L">Security type</Label>
<Select
bind:value={smtpConfig.config.secure}
options={[
{ label: "SSL/TLS", value: true },
{ label: "None/STARTTLS", value: false },
]}
/>
</div>
<div class="form-row">
<Label size="L">Port</Label>
<Input type="number" bind:value={smtpConfig.config.port} />
</div>
<div class="form-row">
<Label size="L">From email address</Label>
<Input type="email" bind:value={smtpConfig.config.from} />
</div>
<Checkbox bind:value={requireAuth} text="Require sign-in" />
{#if requireAuth}
<div class="form-row">
<Label size="L">User</Label>
<Input bind:value={smtpConfig.config.auth.user} />
@ -115,10 +143,7 @@
<Label size="L">Password</Label>
<Input type="password" bind:value={smtpConfig.config.auth.pass} />
</div>
<div class="form-row">
<Label size="L">From email address</Label>
<Input type="email" bind:value={smtpConfig.config.from} />
</div>
{/if}
</Layout>
<div>
<Button cta on:click={saveSmtp}>Save</Button>

View File

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

View File

@ -1,6 +1,6 @@
{
"name": "@budibase/client",
"version": "0.9.41",
"version": "0.9.43",
"license": "MPL-2.0",
"module": "dist/budibase-client.js",
"main": "dist/budibase-client.js",
@ -18,13 +18,13 @@
"dev:builder": "rollup -cw"
},
"dependencies": {
"@budibase/string-templates": "^0.9.41",
"@budibase/string-templates": "^0.9.43",
"regexparam": "^1.3.0",
"shortid": "^2.2.15",
"svelte-spa-router": "^3.0.5"
},
"devDependencies": {
"@budibase/standard-components": "^0.9.41",
"@budibase/standard-components": "^0.9.43",
"@rollup/plugin-commonjs": "^18.0.0",
"@rollup/plugin-node-resolve": "^11.2.1",
"fs-extra": "^8.1.0",

View File

@ -1,7 +1,7 @@
{
"name": "@budibase/server",
"email": "hi@budibase.com",
"version": "0.9.41",
"version": "0.9.43",
"description": "Budibase Web Server",
"main": "src/electron.js",
"repository": {
@ -55,9 +55,9 @@
"author": "Budibase",
"license": "AGPL-3.0-or-later",
"dependencies": {
"@budibase/auth": "^0.9.41",
"@budibase/client": "^0.9.41",
"@budibase/string-templates": "^0.9.41",
"@budibase/auth": "^0.9.43",
"@budibase/client": "^0.9.43",
"@budibase/string-templates": "^0.9.43",
"@elastic/elasticsearch": "7.10.0",
"@koa/router": "8.0.0",
"@sendgrid/mail": "7.1.1",
@ -109,7 +109,7 @@
"devDependencies": {
"@babel/core": "^7.14.3",
"@babel/preset-env": "^7.14.4",
"@budibase/standard-components": "^0.9.41",
"@budibase/standard-components": "^0.9.43",
"@jest/test-sequencer": "^24.8.0",
"babel-jest": "^27.0.2",
"docker-compose": "^0.23.6",

View File

@ -71,7 +71,7 @@ exports.uploadFile = async function (ctx) {
return prepareUpload({
file,
s3Key: `assets/${ctx.appId}/attachments/${processedFileName}`,
s3Key: `${ctx.appId}/attachments/${processedFileName}`,
bucket: ObjectStoreBuckets.APPS,
})
})

View File

@ -385,7 +385,7 @@ describe("/rows", () => {
name: "test",
description: "test",
attachment: [{
key: `${config.getAppId()}/attachment/test/thing.csv`,
key: `${config.getAppId()}/attachments/test/thing.csv`,
}],
tableId: table._id,
})
@ -393,7 +393,7 @@ describe("/rows", () => {
await setup.switchToSelfHosted(async () => {
const enriched = await outputProcessing(config.getAppId(), table, [row])
expect(enriched[0].attachment[0].url).toBe(
`/prod-budi-app-assets/${config.getAppId()}/attachment/test/thing.csv`
`/prod-budi-app-assets/${config.getAppId()}/attachments/test/thing.csv`
)
})
})

View File

@ -29,11 +29,11 @@
"keywords": [
"svelte"
],
"version": "0.9.41",
"version": "0.9.43",
"license": "MIT",
"gitHead": "d1836a898cab3f8ab80ee6d8f42be1a9eed7dcdc",
"dependencies": {
"@budibase/bbui": "^0.9.41",
"@budibase/bbui": "^0.9.43",
"@spectrum-css/page": "^3.0.1",
"@spectrum-css/vars": "^3.0.1",
"apexcharts": "^3.22.1",

View File

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

View File

@ -1,7 +1,7 @@
{
"name": "@budibase/worker",
"email": "hi@budibase.com",
"version": "0.9.41",
"version": "0.9.43",
"description": "Budibase background service",
"main": "src/index.js",
"repository": {
@ -21,8 +21,8 @@
"author": "Budibase",
"license": "AGPL-3.0-or-later",
"dependencies": {
"@budibase/auth": "^0.9.41",
"@budibase/string-templates": "^0.9.41",
"@budibase/auth": "^0.9.43",
"@budibase/string-templates": "^0.9.43",
"@koa/router": "^8.0.0",
"aws-sdk": "^2.811.0",
"bcryptjs": "^2.4.3",

View File

@ -20,11 +20,16 @@ const FULL_EMAIL_PURPOSES = [
function createSMTPTransport(config) {
let options
let secure = config.secure
// default it if not specified
if (secure == null) {
secure = config.port === 465
}
if (!TEST_MODE) {
options = {
port: config.port,
host: config.host,
secure: config.secure || false,
secure: secure,
auth: config.auth,
}
options.tls = {