Merge branch 'master' into feature/layout-poc
This commit is contained in:
commit
a66d3456b8
|
@ -14,7 +14,6 @@ services:
|
||||||
environment:
|
environment:
|
||||||
MINIO_ACCESS_KEY: ${MINIO_ACCESS_KEY}
|
MINIO_ACCESS_KEY: ${MINIO_ACCESS_KEY}
|
||||||
MINIO_SECRET_KEY: ${MINIO_SECRET_KEY}
|
MINIO_SECRET_KEY: ${MINIO_SECRET_KEY}
|
||||||
MINIO_BROWSER: "off"
|
|
||||||
command: server /data
|
command: server /data
|
||||||
healthcheck:
|
healthcheck:
|
||||||
test: ["CMD", "curl", "-f", "http://localhost:9000/minio/health/live"]
|
test: ["CMD", "curl", "-f", "http://localhost:9000/minio/health/live"]
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
"version": "0.9.41",
|
"version": "0.9.43",
|
||||||
"npmClient": "yarn",
|
"npmClient": "yarn",
|
||||||
"packages": [
|
"packages": [
|
||||||
"packages/*"
|
"packages/*"
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "@budibase/auth",
|
"name": "@budibase/auth",
|
||||||
"version": "0.9.41",
|
"version": "0.9.43",
|
||||||
"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.41",
|
"version": "0.9.43",
|
||||||
"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.41",
|
"version": "0.9.43",
|
||||||
"license": "AGPL-3.0",
|
"license": "AGPL-3.0",
|
||||||
"private": true,
|
"private": true,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
@ -65,10 +65,10 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@budibase/bbui": "^0.9.41",
|
"@budibase/bbui": "^0.9.43",
|
||||||
"@budibase/client": "^0.9.41",
|
"@budibase/client": "^0.9.43",
|
||||||
"@budibase/colorpicker": "1.1.2",
|
"@budibase/colorpicker": "1.1.2",
|
||||||
"@budibase/string-templates": "^0.9.41",
|
"@budibase/string-templates": "^0.9.43",
|
||||||
"@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",
|
||||||
|
|
|
@ -5,16 +5,18 @@
|
||||||
Heading,
|
Heading,
|
||||||
Divider,
|
Divider,
|
||||||
Label,
|
Label,
|
||||||
Page,
|
|
||||||
notifications,
|
notifications,
|
||||||
Layout,
|
Layout,
|
||||||
Input,
|
Input,
|
||||||
|
Select,
|
||||||
Body,
|
Body,
|
||||||
Table,
|
Table,
|
||||||
|
Checkbox,
|
||||||
} from "@budibase/bbui"
|
} from "@budibase/bbui"
|
||||||
import { email } from "stores/portal"
|
import { email } from "stores/portal"
|
||||||
import TemplateLink from "./_components/TemplateLink.svelte"
|
import TemplateLink from "./_components/TemplateLink.svelte"
|
||||||
import api from "builderStore/api"
|
import api from "builderStore/api"
|
||||||
|
import { cloneDeep } from "lodash/fp"
|
||||||
|
|
||||||
const ConfigTypes = {
|
const ConfigTypes = {
|
||||||
SMTP: "smtp",
|
SMTP: "smtp",
|
||||||
|
@ -36,10 +38,16 @@
|
||||||
|
|
||||||
let smtpConfig
|
let smtpConfig
|
||||||
let loading
|
let loading
|
||||||
|
let requireAuth = false
|
||||||
|
|
||||||
async function saveSmtp() {
|
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
|
// 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) {
|
if (response.status !== 200) {
|
||||||
const error = await response.text()
|
const error = await response.text()
|
||||||
|
@ -66,15 +74,19 @@
|
||||||
smtpConfig = {
|
smtpConfig = {
|
||||||
type: ConfigTypes.SMTP,
|
type: ConfigTypes.SMTP,
|
||||||
config: {
|
config: {
|
||||||
auth: {
|
secure: true,
|
||||||
type: "login",
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
smtpConfig = smtpDoc
|
smtpConfig = smtpDoc
|
||||||
}
|
}
|
||||||
loading = false
|
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()
|
fetchSmtp()
|
||||||
|
@ -103,22 +115,35 @@
|
||||||
<Label size="L">Host</Label>
|
<Label size="L">Host</Label>
|
||||||
<Input bind:value={smtpConfig.config.host} />
|
<Input bind:value={smtpConfig.config.host} />
|
||||||
</div>
|
</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">
|
<div class="form-row">
|
||||||
<Label size="L">Port</Label>
|
<Label size="L">Port</Label>
|
||||||
<Input type="number" bind:value={smtpConfig.config.port} />
|
<Input type="number" bind:value={smtpConfig.config.port} />
|
||||||
</div>
|
</div>
|
||||||
<div class="form-row">
|
|
||||||
<Label size="L">User</Label>
|
|
||||||
<Input bind:value={smtpConfig.config.auth.user} />
|
|
||||||
</div>
|
|
||||||
<div class="form-row">
|
|
||||||
<Label size="L">Password</Label>
|
|
||||||
<Input type="password" bind:value={smtpConfig.config.auth.pass} />
|
|
||||||
</div>
|
|
||||||
<div class="form-row">
|
<div class="form-row">
|
||||||
<Label size="L">From email address</Label>
|
<Label size="L">From email address</Label>
|
||||||
<Input type="email" bind:value={smtpConfig.config.from} />
|
<Input type="email" bind:value={smtpConfig.config.from} />
|
||||||
</div>
|
</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} />
|
||||||
|
</div>
|
||||||
|
<div class="form-row">
|
||||||
|
<Label size="L">Password</Label>
|
||||||
|
<Input type="password" bind:value={smtpConfig.config.auth.pass} />
|
||||||
|
</div>
|
||||||
|
{/if}
|
||||||
</Layout>
|
</Layout>
|
||||||
<div>
|
<div>
|
||||||
<Button cta on:click={saveSmtp}>Save</Button>
|
<Button cta on:click={saveSmtp}>Save</Button>
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "@budibase/cli",
|
"name": "@budibase/cli",
|
||||||
"version": "0.9.41",
|
"version": "0.9.43",
|
||||||
"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.41",
|
"version": "0.9.43",
|
||||||
"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",
|
||||||
|
@ -18,13 +18,13 @@
|
||||||
"dev:builder": "rollup -cw"
|
"dev:builder": "rollup -cw"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@budibase/string-templates": "^0.9.41",
|
"@budibase/string-templates": "^0.9.43",
|
||||||
"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.41",
|
"@budibase/standard-components": "^0.9.43",
|
||||||
"@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.41",
|
"version": "0.9.43",
|
||||||
"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.41",
|
"@budibase/auth": "^0.9.43",
|
||||||
"@budibase/client": "^0.9.41",
|
"@budibase/client": "^0.9.43",
|
||||||
"@budibase/string-templates": "^0.9.41",
|
"@budibase/string-templates": "^0.9.43",
|
||||||
"@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.41",
|
"@budibase/standard-components": "^0.9.43",
|
||||||
"@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",
|
||||||
|
|
|
@ -71,7 +71,7 @@ exports.uploadFile = async function (ctx) {
|
||||||
|
|
||||||
return prepareUpload({
|
return prepareUpload({
|
||||||
file,
|
file,
|
||||||
s3Key: `assets/${ctx.appId}/attachments/${processedFileName}`,
|
s3Key: `${ctx.appId}/attachments/${processedFileName}`,
|
||||||
bucket: ObjectStoreBuckets.APPS,
|
bucket: ObjectStoreBuckets.APPS,
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
|
@ -385,7 +385,7 @@ describe("/rows", () => {
|
||||||
name: "test",
|
name: "test",
|
||||||
description: "test",
|
description: "test",
|
||||||
attachment: [{
|
attachment: [{
|
||||||
key: `${config.getAppId()}/attachment/test/thing.csv`,
|
key: `${config.getAppId()}/attachments/test/thing.csv`,
|
||||||
}],
|
}],
|
||||||
tableId: table._id,
|
tableId: table._id,
|
||||||
})
|
})
|
||||||
|
@ -393,7 +393,7 @@ describe("/rows", () => {
|
||||||
await setup.switchToSelfHosted(async () => {
|
await setup.switchToSelfHosted(async () => {
|
||||||
const enriched = await outputProcessing(config.getAppId(), table, [row])
|
const enriched = await outputProcessing(config.getAppId(), table, [row])
|
||||||
expect(enriched[0].attachment[0].url).toBe(
|
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`
|
||||||
)
|
)
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
|
@ -29,11 +29,11 @@
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"svelte"
|
"svelte"
|
||||||
],
|
],
|
||||||
"version": "0.9.41",
|
"version": "0.9.43",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"gitHead": "d1836a898cab3f8ab80ee6d8f42be1a9eed7dcdc",
|
"gitHead": "d1836a898cab3f8ab80ee6d8f42be1a9eed7dcdc",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@budibase/bbui": "^0.9.41",
|
"@budibase/bbui": "^0.9.43",
|
||||||
"@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",
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "@budibase/string-templates",
|
"name": "@budibase/string-templates",
|
||||||
"version": "0.9.41",
|
"version": "0.9.43",
|
||||||
"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.41",
|
"version": "0.9.43",
|
||||||
"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.41",
|
"@budibase/auth": "^0.9.43",
|
||||||
"@budibase/string-templates": "^0.9.41",
|
"@budibase/string-templates": "^0.9.43",
|
||||||
"@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",
|
||||||
|
|
|
@ -20,11 +20,16 @@ const FULL_EMAIL_PURPOSES = [
|
||||||
|
|
||||||
function createSMTPTransport(config) {
|
function createSMTPTransport(config) {
|
||||||
let options
|
let options
|
||||||
|
let secure = config.secure
|
||||||
|
// default it if not specified
|
||||||
|
if (secure == null) {
|
||||||
|
secure = config.port === 465
|
||||||
|
}
|
||||||
if (!TEST_MODE) {
|
if (!TEST_MODE) {
|
||||||
options = {
|
options = {
|
||||||
port: config.port,
|
port: config.port,
|
||||||
host: config.host,
|
host: config.host,
|
||||||
secure: config.secure || false,
|
secure: secure,
|
||||||
auth: config.auth,
|
auth: config.auth,
|
||||||
}
|
}
|
||||||
options.tls = {
|
options.tls = {
|
||||||
|
|
Loading…
Reference in New Issue