Merge branch 'develop' of github.com:Budibase/budibase into feature/audit-logs

This commit is contained in:
mike12345567 2023-02-15 11:29:04 +00:00
commit 6977502d01
22 changed files with 115 additions and 86 deletions

View File

@ -69,4 +69,4 @@ volumes:
minio_data:
driver: local
redis_data:
driver: local
driver: local

View File

@ -1,5 +1,5 @@
{
"version": "2.3.11-alpha.0",
"version": "2.3.14-alpha.0",
"npmClient": "yarn",
"packages": [
"packages/*"

View File

@ -1,6 +1,6 @@
{
"name": "@budibase/backend-core",
"version": "2.3.11-alpha.0",
"version": "2.3.14-alpha.0",
"description": "Budibase backend core libraries used in server and worker",
"main": "dist/src/index.js",
"types": "dist/src/index.d.ts",
@ -24,7 +24,7 @@
"dependencies": {
"@budibase/nano": "10.1.1",
"@budibase/pouchdb-replication-stream": "1.2.10",
"@budibase/types": "2.3.11-alpha.0",
"@budibase/types": "2.3.14-alpha.0",
"@shopify/jest-koa-mocks": "5.0.1",
"@techpass/passport-openidconnect": "0.3.2",
"aws-cloudfront-sign": "2.2.0",

View File

@ -1,7 +1,7 @@
{
"name": "@budibase/bbui",
"description": "A UI solution used in the different Budibase projects.",
"version": "2.3.11-alpha.0",
"version": "2.3.14-alpha.0",
"license": "MPL-2.0",
"svelte": "src/index.js",
"module": "dist/bbui.es.js",
@ -38,7 +38,7 @@
],
"dependencies": {
"@adobe/spectrum-css-workflow-icons": "1.2.1",
"@budibase/string-templates": "2.3.11-alpha.0",
"@budibase/string-templates": "2.3.14-alpha.0",
"@spectrum-css/accordion": "3.0.24",
"@spectrum-css/actionbutton": "1.0.1",
"@spectrum-css/actiongroup": "1.0.1",

View File

@ -1,6 +1,6 @@
{
"name": "@budibase/builder",
"version": "2.3.11-alpha.0",
"version": "2.3.14-alpha.0",
"license": "GPL-3.0",
"private": true,
"scripts": {
@ -58,10 +58,10 @@
}
},
"dependencies": {
"@budibase/bbui": "2.3.11-alpha.0",
"@budibase/client": "2.3.11-alpha.0",
"@budibase/frontend-core": "2.3.11-alpha.0",
"@budibase/string-templates": "2.3.11-alpha.0",
"@budibase/bbui": "2.3.14-alpha.0",
"@budibase/client": "2.3.14-alpha.0",
"@budibase/frontend-core": "2.3.14-alpha.0",
"@budibase/string-templates": "2.3.14-alpha.0",
"@fortawesome/fontawesome-svg-core": "^6.2.1",
"@fortawesome/free-brands-svg-icons": "^6.2.1",
"@fortawesome/free-solid-svg-icons": "^6.2.1",

View File

@ -152,7 +152,7 @@
fromTable,
throughTable,
fromTable.primary[0],
throughFromKey
throughToKey
),
throughToKey:
errorChecker.manyForeignKeySet(throughToKey) ||
@ -160,7 +160,7 @@
toTable,
throughTable,
toTable.primary[0],
throughToKey
throughFromKey
),
fromForeign:
errorChecker.foreignKeySet(fromForeign) ||
@ -391,24 +391,14 @@
options={Object.keys(getTable(throughId)?.schema)}
bind:value={throughToKey}
bind:error={errors.throughToKey}
on:change={e =>
changed(() => {
if (throughFromKey === e.detail) {
throughFromKey = null
}
})}
on:change={changed}
/>
<Select
label={`Foreign Key (${getTable(toId)?.name})`}
options={Object.keys(getTable(throughId)?.schema)}
bind:value={throughFromKey}
bind:error={errors.throughFromKey}
on:change={e =>
changed(() => {
if (throughToKey === e.detail) {
throughToKey = null
}
})}
on:change={changed}
/>
{/if}
{:else if isManyToOne && toId}

View File

@ -105,7 +105,9 @@
title="Create Table"
confirmText="Create"
onConfirm={saveTable}
disabled={error || !name || (rows.length && !allValid)}
disabled={error ||
!name ||
(rows.length && (!allValid || displayColumn == null))}
>
<Input
thin

View File

@ -25,8 +25,8 @@
const getOptions = (schema, type) => {
let entries = Object.entries(schema ?? {})
let types = []
if (type === "field/options") {
// allow options to be used on both options and string fields
if (type === "field/options" || type === "field/longform") {
// allow options and longform to be used on string fields as well
types = [type, "field/string"]
} else {
types = [type]

View File

@ -1,6 +1,6 @@
{
"name": "@budibase/cli",
"version": "2.3.11-alpha.0",
"version": "2.3.14-alpha.0",
"description": "Budibase CLI, for developers, self hosting and migrations.",
"main": "src/index.js",
"bin": {
@ -26,9 +26,9 @@
"outputPath": "build"
},
"dependencies": {
"@budibase/backend-core": "2.3.11-alpha.0",
"@budibase/string-templates": "2.3.11-alpha.0",
"@budibase/types": "2.3.11-alpha.0",
"@budibase/backend-core": "2.3.14-alpha.0",
"@budibase/string-templates": "2.3.14-alpha.0",
"@budibase/types": "2.3.14-alpha.0",
"axios": "0.21.2",
"chalk": "4.1.0",
"cli-progress": "3.11.2",

View File

@ -1,6 +1,6 @@
{
"name": "@budibase/client",
"version": "2.3.11-alpha.0",
"version": "2.3.14-alpha.0",
"license": "MPL-2.0",
"module": "dist/budibase-client.js",
"main": "dist/budibase-client.js",
@ -19,9 +19,9 @@
"dev:builder": "rollup -cw"
},
"dependencies": {
"@budibase/bbui": "2.3.11-alpha.0",
"@budibase/frontend-core": "2.3.11-alpha.0",
"@budibase/string-templates": "2.3.11-alpha.0",
"@budibase/bbui": "2.3.14-alpha.0",
"@budibase/frontend-core": "2.3.14-alpha.0",
"@budibase/string-templates": "2.3.14-alpha.0",
"@spectrum-css/button": "^3.0.3",
"@spectrum-css/card": "^3.0.3",
"@spectrum-css/divider": "^1.0.3",

View File

@ -85,7 +85,7 @@
</Skeleton>
{:else if !fieldState}
<Placeholder />
{:else if schemaType && schemaType !== type && type !== "options"}
{:else if schemaType && schemaType !== type && !["options", "longform"].includes(type)}
<Placeholder
text="This Field setting is the wrong data type for this component"
/>

View File

@ -1,12 +1,12 @@
{
"name": "@budibase/frontend-core",
"version": "2.3.11-alpha.0",
"version": "2.3.14-alpha.0",
"description": "Budibase frontend core libraries used in builder and client",
"author": "Budibase",
"license": "MPL-2.0",
"svelte": "src/index.js",
"dependencies": {
"@budibase/bbui": "2.3.11-alpha.0",
"@budibase/bbui": "2.3.14-alpha.0",
"lodash": "^4.17.21",
"svelte": "^3.46.2"
}

View File

@ -1,6 +1,6 @@
{
"name": "@budibase/sdk",
"version": "2.3.11-alpha.0",
"version": "2.3.14-alpha.0",
"description": "Budibase Public API SDK",
"author": "Budibase",
"license": "MPL-2.0",

View File

@ -1,7 +1,7 @@
{
"name": "@budibase/server",
"email": "hi@budibase.com",
"version": "2.3.11-alpha.0",
"version": "2.3.14-alpha.0",
"description": "Budibase Web Server",
"main": "src/index.ts",
"repository": {
@ -43,11 +43,11 @@
"license": "GPL-3.0",
"dependencies": {
"@apidevtools/swagger-parser": "10.0.3",
"@budibase/backend-core": "2.3.11-alpha.0",
"@budibase/client": "2.3.11-alpha.0",
"@budibase/pro": "2.3.11-alpha.0",
"@budibase/string-templates": "2.3.11-alpha.0",
"@budibase/types": "2.3.11-alpha.0",
"@budibase/backend-core": "2.3.14-alpha.0",
"@budibase/client": "2.3.14-alpha.0",
"@budibase/pro": "2.3.14-alpha.0",
"@budibase/string-templates": "2.3.14-alpha.0",
"@budibase/types": "2.3.14-alpha.0",
"@bull-board/api": "3.7.0",
"@bull-board/koa": "3.9.4",
"@elastic/elasticsearch": "7.10.0",

View File

@ -0,0 +1,32 @@
SELECT 'CREATE DATABASE main'
WHERE NOT EXISTS (SELECT FROM pg_database WHERE datname = 'main')\gexec
CREATE SCHEMA test;
CREATE TABLE territories (
territory_id character varying(20) PRIMARY KEY,
territory_description character varying(60) NOT NULL
);
CREATE TABLE employees (
employee_id smallint PRIMARY KEY,
last_name character varying(20) NOT NULL,
first_name character varying(10) NOT NULL,
title character varying(30),
title_of_courtesy character varying(25),
birth_date date,
hire_date date,
address character varying(60),
city character varying(15),
region character varying(15),
postal_code character varying(10),
country character varying(15),
home_phone character varying(24),
extension character varying(4),
photo bytea,
notes text,
reports_to smallint REFERENCES employees(employee_id),
photo_path character varying(255)
);
CREATE TABLE employee_territories (
employee_id smallint REFERENCES employees(employee_id),
territory_id character varying(20) REFERENCES territories(territory_id),
CONSTRAINT pk_employee_territories PRIMARY KEY (employee_id, territory_id)
);

View File

@ -27,13 +27,17 @@ const destroyable = require("server-destroy")
const app = new Koa()
let mbNumber = parseInt(env.HTTP_MB_LIMIT || "10")
if (!mbNumber || isNaN(mbNumber)) {
mbNumber = 10
}
// set up top level koa middleware
app.use(
koaBody({
multipart: true,
formLimit: "10mb",
jsonLimit: "10mb",
textLimit: "10mb",
formLimit: `${mbNumber}mb`,
jsonLimit: `${mbNumber}mb`,
textLimit: `${mbNumber}mb`,
// @ts-ignore
enableTypes: ["json", "form", "text"],
parsedMethods: ["POST", "PUT", "PATCH", "DELETE"],

View File

@ -83,6 +83,7 @@ const environment = {
MULTI_TENANCY: process.env.MULTI_TENANCY,
ENABLE_ANALYTICS: process.env.ENABLE_ANALYTICS,
SELF_HOSTED: process.env.SELF_HOSTED,
HTTP_MB_LIMIT: process.env.HTTP_MB_LIMIT,
// old
CLIENT_ID: process.env.CLIENT_ID,
_set(key: string, value: any) {

View File

@ -1278,14 +1278,14 @@
resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39"
integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==
"@budibase/backend-core@2.3.11-alpha.0":
version "2.3.11-alpha.0"
resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-2.3.11-alpha.0.tgz#361e30139a1a26d023902c6bdb4fdcac2610b69f"
integrity sha512-hlaeTkYsSJJYIwwqL3LJ7Pxzq0tOgSjQ38+nFiBPIzjkDSaV0UPwi0rZAZq/kPvaT7AKdTEcf8tn1wiui/VkYA==
"@budibase/backend-core@2.3.14-alpha.0":
version "2.3.14-alpha.0"
resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-2.3.14-alpha.0.tgz#8d60c93e9861301296907f61e770bdf1881b560c"
integrity sha512-lvRl6o9CCUx1VQ6ftu4FYuTp5mGgvbshNYoeaH0DbWFfhLNbibEHxx+pR+6M1ufhbu/EO6jKEr7DDeNiRBBMTw==
dependencies:
"@budibase/nano" "10.1.1"
"@budibase/pouchdb-replication-stream" "1.2.10"
"@budibase/types" "2.3.11-alpha.0"
"@budibase/types" "2.3.14-alpha.0"
"@shopify/jest-koa-mocks" "5.0.1"
"@techpass/passport-openidconnect" "0.3.2"
aws-cloudfront-sign "2.2.0"
@ -1392,13 +1392,13 @@
pouchdb-promise "^6.0.4"
through2 "^2.0.0"
"@budibase/pro@2.3.11-alpha.0":
version "2.3.11-alpha.0"
resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-2.3.11-alpha.0.tgz#b59edba2c04e2a490f3d9246cd328d8dd3213295"
integrity sha512-z7tLgRKYKm1psNZGdRErQT8tV+vSj9hXJkD/H/uFxsJ3IQkjWbcFP5FUBPads5RnvCtqOfYu8OpRHCJfNNBoCA==
"@budibase/pro@2.3.14-alpha.0":
version "2.3.14-alpha.0"
resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-2.3.14-alpha.0.tgz#db8ac1d0cacea21240c59458c4143e3e55663a4d"
integrity sha512-RJqXlvZmYrKCLxe7uVnc2KmDwE5OmoUZCA9M6b5Ne7ZHqrhtaNB/4Xlr1ESG79///epEWLv+Fde7mpHPzCvsZw==
dependencies:
"@budibase/backend-core" "2.3.11-alpha.0"
"@budibase/types" "2.3.11-alpha.0"
"@budibase/backend-core" "2.3.14-alpha.0"
"@budibase/types" "2.3.14-alpha.0"
"@koa/router" "8.0.8"
bull "4.10.1"
joi "17.6.0"
@ -1424,10 +1424,10 @@
svelte-apexcharts "^1.0.2"
svelte-flatpickr "^3.1.0"
"@budibase/types@2.3.11-alpha.0":
version "2.3.11-alpha.0"
resolved "https://registry.yarnpkg.com/@budibase/types/-/types-2.3.11-alpha.0.tgz#55cdcef6fb30c79e9d7d90ae8789e4f0cc6a2b63"
integrity sha512-SFW9vManFRJ45bgMW7wkDiNxiQQfAME8HOmSqCHKDC0OPzsDydygIl7BNeF/domFvCXxDD3NPu7HC2JXMlV6cw==
"@budibase/types@2.3.14-alpha.0":
version "2.3.14-alpha.0"
resolved "https://registry.yarnpkg.com/@budibase/types/-/types-2.3.14-alpha.0.tgz#03072a669c016c616278dc01c577119dd710e4fe"
integrity sha512-D5qOD7YJhHUrPy81C9OpTlVzsXBmZwbF9WdoxYo/M8JYmhTJfj7Fu5dGTyDpipPQVqknFpTsig5kQqG3r08ZZw==
"@bull-board/api@3.7.0":
version "3.7.0"

View File

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

View File

@ -1,6 +1,6 @@
{
"name": "@budibase/types",
"version": "2.3.11-alpha.0",
"version": "2.3.14-alpha.0",
"description": "Budibase types",
"main": "dist/index.js",
"types": "dist/index.d.ts",

View File

@ -1,7 +1,7 @@
{
"name": "@budibase/worker",
"email": "hi@budibase.com",
"version": "2.3.11-alpha.0",
"version": "2.3.14-alpha.0",
"description": "Budibase background service",
"main": "src/index.ts",
"repository": {
@ -36,10 +36,10 @@
"author": "Budibase",
"license": "GPL-3.0",
"dependencies": {
"@budibase/backend-core": "2.3.11-alpha.0",
"@budibase/pro": "2.3.11-alpha.0",
"@budibase/string-templates": "2.3.11-alpha.0",
"@budibase/types": "2.3.11-alpha.0",
"@budibase/backend-core": "2.3.14-alpha.0",
"@budibase/pro": "2.3.14-alpha.0",
"@budibase/string-templates": "2.3.14-alpha.0",
"@budibase/types": "2.3.14-alpha.0",
"@koa/router": "8.0.8",
"@sentry/node": "6.17.7",
"@techpass/passport-openidconnect": "0.3.2",

View File

@ -475,14 +475,14 @@
resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39"
integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==
"@budibase/backend-core@2.3.11-alpha.0":
version "2.3.11-alpha.0"
resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-2.3.11-alpha.0.tgz#361e30139a1a26d023902c6bdb4fdcac2610b69f"
integrity sha512-hlaeTkYsSJJYIwwqL3LJ7Pxzq0tOgSjQ38+nFiBPIzjkDSaV0UPwi0rZAZq/kPvaT7AKdTEcf8tn1wiui/VkYA==
"@budibase/backend-core@2.3.14-alpha.0":
version "2.3.14-alpha.0"
resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-2.3.14-alpha.0.tgz#8d60c93e9861301296907f61e770bdf1881b560c"
integrity sha512-lvRl6o9CCUx1VQ6ftu4FYuTp5mGgvbshNYoeaH0DbWFfhLNbibEHxx+pR+6M1ufhbu/EO6jKEr7DDeNiRBBMTw==
dependencies:
"@budibase/nano" "10.1.1"
"@budibase/pouchdb-replication-stream" "1.2.10"
"@budibase/types" "2.3.11-alpha.0"
"@budibase/types" "2.3.14-alpha.0"
"@shopify/jest-koa-mocks" "5.0.1"
"@techpass/passport-openidconnect" "0.3.2"
aws-cloudfront-sign "2.2.0"
@ -539,13 +539,13 @@
pouchdb-promise "^6.0.4"
through2 "^2.0.0"
"@budibase/pro@2.3.11-alpha.0":
version "2.3.11-alpha.0"
resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-2.3.11-alpha.0.tgz#b59edba2c04e2a490f3d9246cd328d8dd3213295"
integrity sha512-z7tLgRKYKm1psNZGdRErQT8tV+vSj9hXJkD/H/uFxsJ3IQkjWbcFP5FUBPads5RnvCtqOfYu8OpRHCJfNNBoCA==
"@budibase/pro@2.3.14-alpha.0":
version "2.3.14-alpha.0"
resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-2.3.14-alpha.0.tgz#db8ac1d0cacea21240c59458c4143e3e55663a4d"
integrity sha512-RJqXlvZmYrKCLxe7uVnc2KmDwE5OmoUZCA9M6b5Ne7ZHqrhtaNB/4Xlr1ESG79///epEWLv+Fde7mpHPzCvsZw==
dependencies:
"@budibase/backend-core" "2.3.11-alpha.0"
"@budibase/types" "2.3.11-alpha.0"
"@budibase/backend-core" "2.3.14-alpha.0"
"@budibase/types" "2.3.14-alpha.0"
"@koa/router" "8.0.8"
bull "4.10.1"
joi "17.6.0"
@ -553,10 +553,10 @@
lru-cache "^7.14.1"
node-fetch "^2.6.1"
"@budibase/types@2.3.11-alpha.0":
version "2.3.11-alpha.0"
resolved "https://registry.yarnpkg.com/@budibase/types/-/types-2.3.11-alpha.0.tgz#55cdcef6fb30c79e9d7d90ae8789e4f0cc6a2b63"
integrity sha512-SFW9vManFRJ45bgMW7wkDiNxiQQfAME8HOmSqCHKDC0OPzsDydygIl7BNeF/domFvCXxDD3NPu7HC2JXMlV6cw==
"@budibase/types@2.3.14-alpha.0":
version "2.3.14-alpha.0"
resolved "https://registry.yarnpkg.com/@budibase/types/-/types-2.3.14-alpha.0.tgz#03072a669c016c616278dc01c577119dd710e4fe"
integrity sha512-D5qOD7YJhHUrPy81C9OpTlVzsXBmZwbF9WdoxYo/M8JYmhTJfj7Fu5dGTyDpipPQVqknFpTsig5kQqG3r08ZZw==
"@cspotcode/source-map-support@^0.8.0":
version "0.8.1"