Merge branch 'master' of github.com:Budibase/budibase into interactive-layouts
This commit is contained in:
commit
d8c49ac168
|
@ -172,7 +172,7 @@ For more information, see [CONTRIBUTING.md](https://github.com/Budibase/budibase
|
|||
|
||||
## 📝 License
|
||||
|
||||
Budibase is open-source. The builder is licensed [AGPL v3](https://www.gnu.org/licenses/agpl-3.0.en.html), the server is licensed [GPL v3](https://www.gnu.org/licenses/gpl-3.0.en.html), and the client is licensed [MPL](https://directory.fsf.org/wiki/License:MPL-2.0).
|
||||
Budibase is open-source, licensed as [GPL v3](https://www.gnu.org/licenses/gpl-3.0.en.html). The client and component libraries are licensed as [MPL](https://directory.fsf.org/wiki/License:MPL-2.0) - so the apps that you build can be licensed however you like.
|
||||
|
||||
|
||||
---
|
||||
|
|
|
@ -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"]
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"version": "0.9.41",
|
||||
"version": "0.9.46",
|
||||
"npmClient": "yarn",
|
||||
"packages": [
|
||||
"packages/*"
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@budibase/auth",
|
||||
"version": "0.9.41",
|
||||
"version": "0.9.46",
|
||||
"description": "Authentication middlewares for budibase builder and apps",
|
||||
"main": "src/index.js",
|
||||
"author": "Budibase",
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"name": "@budibase/bbui",
|
||||
"description": "A UI solution used in the different Budibase projects.",
|
||||
"version": "0.9.41",
|
||||
"version": "0.9.46",
|
||||
"license": "AGPL-3.0",
|
||||
"svelte": "src/index.js",
|
||||
"module": "dist/bbui.es.js",
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@budibase/builder",
|
||||
"version": "0.9.41",
|
||||
"version": "0.9.46",
|
||||
"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.46",
|
||||
"@budibase/client": "^0.9.46",
|
||||
"@budibase/colorpicker": "1.1.2",
|
||||
"@budibase/string-templates": "^0.9.41",
|
||||
"@budibase/string-templates": "^0.9.46",
|
||||
"@sentry/browser": "5.19.1",
|
||||
"@spectrum-css/page": "^3.0.1",
|
||||
"@spectrum-css/vars": "^3.0.1",
|
||||
|
|
|
@ -98,6 +98,16 @@
|
|||
</script>
|
||||
|
||||
<Button secondary on:click={publishModal.show}>Publish</Button>
|
||||
<Modal bind:this={feedbackModal}>
|
||||
<ModalContent
|
||||
title="Enjoying Budibase?"
|
||||
size="L"
|
||||
showConfirmButton={false}
|
||||
showCancelButton={false}
|
||||
>
|
||||
<FeedbackIframe on:finished={feedbackModal.hide} />
|
||||
</ModalContent>
|
||||
</Modal>
|
||||
<Modal bind:this={publishModal}>
|
||||
<ModalContent
|
||||
title="Publish to Production"
|
||||
|
|
|
@ -127,7 +127,9 @@
|
|||
return
|
||||
}
|
||||
try {
|
||||
const response = await del(`/api/applications/${selectedApp.prodId}`)
|
||||
const response = await del(
|
||||
`/api/applications/${selectedApp.prodId}?unpublish=1`
|
||||
)
|
||||
if (response.status !== 200) {
|
||||
const json = await response.json()
|
||||
throw json.message
|
||||
|
|
|
@ -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,22 +115,35 @@
|
|||
<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">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">
|
||||
<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} />
|
||||
</div>
|
||||
<div class="form-row">
|
||||
<Label size="L">Password</Label>
|
||||
<Input type="password" bind:value={smtpConfig.config.auth.pass} />
|
||||
</div>
|
||||
{/if}
|
||||
</Layout>
|
||||
<div>
|
||||
<Button cta on:click={saveSmtp}>Save</Button>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@budibase/cli",
|
||||
"version": "0.9.41",
|
||||
"version": "0.9.46",
|
||||
"description": "Budibase CLI, for developers, self hosting and migrations.",
|
||||
"main": "src/index.js",
|
||||
"bin": {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@budibase/client",
|
||||
"version": "0.9.41",
|
||||
"version": "0.9.46",
|
||||
"license": "MPL-2.0",
|
||||
"module": "dist/budibase-client.js",
|
||||
"main": "dist/budibase-client.js",
|
||||
|
@ -18,17 +18,19 @@
|
|||
"dev:builder": "rollup -cw"
|
||||
},
|
||||
"dependencies": {
|
||||
"@budibase/bbui": "^0.9.27",
|
||||
"@budibase/standard-components": "^0.9.41",
|
||||
"@budibase/string-templates": "^0.9.41",
|
||||
"@budibase/string-templates": "^0.9.46",
|
||||
"regexparam": "^1.3.0",
|
||||
"shortid": "^2.2.15",
|
||||
"svelte-spa-router": "^3.0.5"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@rollup/plugin-commonjs": "^19.0.0",
|
||||
"@rollup/plugin-node-resolve": "^13.0.0",
|
||||
"postcss": "^8.3.2",
|
||||
"rollup": "^2.51.2",
|
||||
"@budibase/standard-components": "^0.9.46",
|
||||
"@rollup/plugin-commonjs": "^18.0.0",
|
||||
"@rollup/plugin-node-resolve": "^11.2.1",
|
||||
"fs-extra": "^8.1.0",
|
||||
"jsdom": "^16.0.1",
|
||||
"postcss": "^8.2.10",
|
||||
"rollup": "^2.44.0",
|
||||
"rollup-plugin-json": "^4.0.0",
|
||||
"rollup-plugin-node-builtins": "^2.1.2",
|
||||
"rollup-plugin-node-globals": "^1.4.0",
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"name": "@budibase/server",
|
||||
"email": "hi@budibase.com",
|
||||
"version": "0.9.41",
|
||||
"version": "0.9.46",
|
||||
"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.46",
|
||||
"@budibase/client": "^0.9.46",
|
||||
"@budibase/string-templates": "^0.9.46",
|
||||
"@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.46",
|
||||
"@jest/test-sequencer": "^24.8.0",
|
||||
"babel-jest": "^27.0.2",
|
||||
"docker-compose": "^0.23.6",
|
||||
|
|
|
@ -245,9 +245,10 @@ exports.update = async function (ctx) {
|
|||
|
||||
exports.delete = async function (ctx) {
|
||||
const db = new CouchDB(ctx.params.appId)
|
||||
|
||||
const result = await db.destroy()
|
||||
/* istanbul ignore next */
|
||||
if (!env.isTest()) {
|
||||
if (!env.isTest() && !ctx.query.unpublish) {
|
||||
await deleteApp(ctx.params.appId)
|
||||
}
|
||||
// make sure the app/role doesn't stick around after the app has been deleted
|
||||
|
|
|
@ -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,
|
||||
})
|
||||
})
|
||||
|
|
|
@ -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`
|
||||
)
|
||||
})
|
||||
})
|
||||
|
|
|
@ -29,11 +29,11 @@
|
|||
"keywords": [
|
||||
"svelte"
|
||||
],
|
||||
"version": "0.9.41",
|
||||
"version": "0.9.46",
|
||||
"license": "MIT",
|
||||
"gitHead": "d1836a898cab3f8ab80ee6d8f42be1a9eed7dcdc",
|
||||
"dependencies": {
|
||||
"@budibase/bbui": "^0.9.41",
|
||||
"@budibase/bbui": "^0.9.46",
|
||||
"@spectrum-css/page": "^3.0.1",
|
||||
"@spectrum-css/vars": "^3.0.1",
|
||||
"apexcharts": "^3.22.1",
|
||||
|
|
|
@ -245,7 +245,7 @@
|
|||
"options"
|
||||
],
|
||||
"numArgs": 3,
|
||||
"example": "{{equalsLength [1, 2, 3] 3}} -> true",
|
||||
"example": "{{equalsLength '[1,2,3]' 3}} -> true",
|
||||
"description": "<p>Returns true if the the length of the given <code>value</code> is equal to the given <code>length</code>. Can be used as a block or inline helper.</p>\n"
|
||||
},
|
||||
"last": {
|
||||
|
@ -262,7 +262,7 @@
|
|||
"value"
|
||||
],
|
||||
"numArgs": 1,
|
||||
"example": "{{length [1, 2, 3]}} -> 3",
|
||||
"example": "{{length '[1, 2, 3]'}} -> 3",
|
||||
"description": "<p>Returns the length of the given string or array.</p>\n"
|
||||
},
|
||||
"lengthEqual": {
|
||||
|
@ -272,7 +272,7 @@
|
|||
"options"
|
||||
],
|
||||
"numArgs": 3,
|
||||
"example": "{{equalsLength [1, 2, 3] 3}} -> true",
|
||||
"example": "{{equalsLength '[1,2,3]' 3}} -> true",
|
||||
"description": "<p>Returns true if the the length of the given <code>value</code> is equal to the given <code>length</code>. Can be used as a block or inline helper.</p>\n"
|
||||
},
|
||||
"map": {
|
||||
|
@ -1097,8 +1097,8 @@
|
|||
"format"
|
||||
],
|
||||
"numArgs": 2,
|
||||
"example": "{{date now \"DD-MM-YYYY\"}} -> 21-01-2021",
|
||||
"description": "<p>Format a date using moment.js date formatting.</p>\n"
|
||||
"example": "{{date now \"DD-MM-YYYY\" \"America/New_York\" }} -> 21-01-2021",
|
||||
"description": "<p>Format a date using moment.js date formatting - the timezone is optional and uses the tz database.</p>\n"
|
||||
},
|
||||
"duration": {
|
||||
"args": [
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@budibase/string-templates",
|
||||
"version": "0.9.41",
|
||||
"version": "0.9.46",
|
||||
"description": "Handlebars wrapper for Budibase templating.",
|
||||
"main": "src/index.cjs",
|
||||
"module": "dist/bundle.mjs",
|
||||
|
@ -20,7 +20,7 @@
|
|||
"manifest": "node ./scripts/gen-collection-info.js"
|
||||
},
|
||||
"dependencies": {
|
||||
"@budibase/handlebars-helpers": "^0.11.3",
|
||||
"@budibase/handlebars-helpers": "^0.11.4",
|
||||
"dayjs": "^1.10.4",
|
||||
"handlebars": "^4.7.6",
|
||||
"handlebars-utils": "^1.0.6",
|
||||
|
|
|
@ -305,6 +305,17 @@ describe("Test the object/array helper", () => {
|
|||
const output = await processString("{{ literal ( sum ( pluck items 'price' ) ) }}", context)
|
||||
expect(output).toBe(50)
|
||||
})
|
||||
|
||||
it("should allow use of the length helper", async () => {
|
||||
const array = [1, 2, 3]
|
||||
const output = await processString("{{ length array }}", { array })
|
||||
expect(output).toBe("3")
|
||||
})
|
||||
|
||||
it("should allow use of the length helper inline", async () => {
|
||||
const output = await processString(`{{ length '[1, 2, 3]' }}`, {})
|
||||
expect(output).toBe("3")
|
||||
})
|
||||
})
|
||||
|
||||
describe("Test the literal helper", () => {
|
||||
|
|
|
@ -270,10 +270,10 @@
|
|||
resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39"
|
||||
integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==
|
||||
|
||||
"@budibase/handlebars-helpers@^0.11.3":
|
||||
version "0.11.3"
|
||||
resolved "https://registry.yarnpkg.com/@budibase/handlebars-helpers/-/handlebars-helpers-0.11.3.tgz#b6e5c91b83e8906e7d7ff10ddde277a3d561016e"
|
||||
integrity sha512-MS1ptZEYq8o9J3tNLM7cZ2RGSSJIer4GiMIUHtbBI3sC9UKqZebao1JYNfmZKpNjntuqhZKgjqc5GfnVIEjsYQ==
|
||||
"@budibase/handlebars-helpers@^0.11.4":
|
||||
version "0.11.4"
|
||||
resolved "https://registry.yarnpkg.com/@budibase/handlebars-helpers/-/handlebars-helpers-0.11.4.tgz#8acfa2ee84134f7be4b2906e710fce6d25c5d000"
|
||||
integrity sha512-AJNJYlJnxZmn9QJ8tBl8nrm4YxbwHP4AR0pbiVGK+EoOylkNBlUnZ/QDL1VyqM5fTkAE/Z2IZVLKrrG3kxuWLA==
|
||||
dependencies:
|
||||
arr-flatten "^1.1.0"
|
||||
array-sort "^0.1.4"
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"name": "@budibase/worker",
|
||||
"email": "hi@budibase.com",
|
||||
"version": "0.9.41",
|
||||
"version": "0.9.46",
|
||||
"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.46",
|
||||
"@budibase/string-templates": "^0.9.46",
|
||||
"@koa/router": "^8.0.0",
|
||||
"aws-sdk": "^2.811.0",
|
||||
"bcryptjs": "^2.4.3",
|
||||
|
|
|
@ -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 = {
|
||||
|
|
Loading…
Reference in New Issue