Merge branch 'master' of github.com:Budibase/budibase into develop

This commit is contained in:
mike12345567 2023-02-14 17:57:23 +00:00
commit 3f7f66257d
22 changed files with 130 additions and 114 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.13",
"npmClient": "yarn",
"packages": [
"packages/*"

View File

@ -1,6 +1,6 @@
{
"name": "@budibase/backend-core",
"version": "2.3.11-alpha.0",
"version": "2.3.13",
"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.13",
"@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.13",
"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.13",
"@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.13",
"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.13",
"@budibase/client": "^2.3.13",
"@budibase/frontend-core": "^2.3.13",
"@budibase/string-templates": "^2.3.13",
"@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.13",
"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.13",
"@budibase/string-templates": "^2.3.13",
"@budibase/types": "^2.3.13",
"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.13",
"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.13",
"@budibase/frontend-core": "^2.3.13",
"@budibase/string-templates": "^2.3.13",
"@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.13",
"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.13",
"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.13",
"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.13",
"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.13",
"@budibase/client": "^2.3.13",
"@budibase/pro": "2.3.13",
"@budibase/string-templates": "^2.3.13",
"@budibase/types": "^2.3.13",
"@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,13 @@
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.13":
version "2.3.13"
resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-2.3.13.tgz#330e020191f9d1776fa74a2dba43b7b20d9edf7e"
integrity sha512-uJzkBsB/Xne9/cSYhOzd1rlFqRL41/0EFDKlVd3AFdDi6oq8IVlPiztSedV4I5nynjd8Pg9kmJuMzx/Kh70UQA==
dependencies:
"@budibase/nano" "10.1.1"
"@budibase/pouchdb-replication-stream" "1.2.10"
"@budibase/types" "2.3.11-alpha.0"
"@budibase/types" "^2.3.13"
"@shopify/jest-koa-mocks" "5.0.1"
"@techpass/passport-openidconnect" "0.3.2"
aws-cloudfront-sign "2.2.0"
@ -1310,6 +1309,7 @@
posthog-node "1.3.0"
pouchdb "7.3.0"
pouchdb-find "7.2.2"
pouchdb-replication-stream "1.2.9"
redlock "4.2.0"
sanitize-s3-objectkey "0.0.1"
semver "7.3.7"
@ -1379,26 +1379,13 @@
qs "^6.11.0"
tough-cookie "^4.1.2"
"@budibase/pouchdb-replication-stream@1.2.10":
version "1.2.10"
resolved "https://registry.yarnpkg.com/@budibase/pouchdb-replication-stream/-/pouchdb-replication-stream-1.2.10.tgz#4100df2effd7c823edadddcdbdc380f6827eebf5"
integrity sha512-1zeorOwbelZ7HF5vFB+pKE8Mnh31om8k1M6T3AZXVULYTHLsyJrMTozSv5CJ1P8ZfOIJab09HDzCXDh2icFekg==
"@budibase/pro@2.3.13":
version "2.3.13"
resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-2.3.13.tgz#df8b07e6a471c3352fe2aecb54d4638c3538ccd4"
integrity sha512-sMls8N84NTr0tWDzl/z+sqmVBwh//6pGUG3OachZDPKCxoSd3ZGFiBLjxiPqIJ+7zcpShVTFfqCdSOeCfgkkXw==
dependencies:
argsarray "0.0.1"
inherits "^2.0.3"
lodash.pick "^4.0.0"
ndjson "^1.4.3"
pouch-stream "^0.4.0"
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==
dependencies:
"@budibase/backend-core" "2.3.11-alpha.0"
"@budibase/types" "2.3.11-alpha.0"
"@budibase/backend-core" "2.3.13"
"@budibase/types" "2.3.13"
"@koa/router" "8.0.8"
bull "4.10.1"
joi "17.6.0"
@ -1424,10 +1411,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.13", "@budibase/types@^2.3.13":
version "2.3.13"
resolved "https://registry.yarnpkg.com/@budibase/types/-/types-2.3.13.tgz#d20edf6afc54513b3e8c7f59bf817ad1366bba60"
integrity sha512-7rih50GUg3J3Lvk6AIMSBoMmqFBWphGOTxrqRSyjjsq2Y1HtraMxh0xpomkx4jtTzZSrRdElJ/bB2HHa1AsLHw==
"@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.13",
"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.13",
"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.13",
"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.13",
"@budibase/pro": "2.3.13",
"@budibase/string-templates": "^2.3.13",
"@budibase/types": "^2.3.13",
"@koa/router": "8.0.8",
"@sentry/node": "6.17.7",
"@techpass/passport-openidconnect": "0.3.2",

View File

@ -475,14 +475,13 @@
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.13":
version "2.3.13"
resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-2.3.13.tgz#330e020191f9d1776fa74a2dba43b7b20d9edf7e"
integrity sha512-uJzkBsB/Xne9/cSYhOzd1rlFqRL41/0EFDKlVd3AFdDi6oq8IVlPiztSedV4I5nynjd8Pg9kmJuMzx/Kh70UQA==
dependencies:
"@budibase/nano" "10.1.1"
"@budibase/pouchdb-replication-stream" "1.2.10"
"@budibase/types" "2.3.11-alpha.0"
"@budibase/types" "^2.3.13"
"@shopify/jest-koa-mocks" "5.0.1"
"@techpass/passport-openidconnect" "0.3.2"
aws-cloudfront-sign "2.2.0"
@ -507,6 +506,7 @@
posthog-node "1.3.0"
pouchdb "7.3.0"
pouchdb-find "7.2.2"
pouchdb-replication-stream "1.2.9"
redlock "4.2.0"
sanitize-s3-objectkey "0.0.1"
semver "7.3.7"
@ -526,26 +526,13 @@
qs "^6.11.0"
tough-cookie "^4.1.2"
"@budibase/pouchdb-replication-stream@1.2.10":
version "1.2.10"
resolved "https://registry.yarnpkg.com/@budibase/pouchdb-replication-stream/-/pouchdb-replication-stream-1.2.10.tgz#4100df2effd7c823edadddcdbdc380f6827eebf5"
integrity sha512-1zeorOwbelZ7HF5vFB+pKE8Mnh31om8k1M6T3AZXVULYTHLsyJrMTozSv5CJ1P8ZfOIJab09HDzCXDh2icFekg==
"@budibase/pro@2.3.13":
version "2.3.13"
resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-2.3.13.tgz#df8b07e6a471c3352fe2aecb54d4638c3538ccd4"
integrity sha512-sMls8N84NTr0tWDzl/z+sqmVBwh//6pGUG3OachZDPKCxoSd3ZGFiBLjxiPqIJ+7zcpShVTFfqCdSOeCfgkkXw==
dependencies:
argsarray "0.0.1"
inherits "^2.0.3"
lodash.pick "^4.0.0"
ndjson "^1.4.3"
pouch-stream "^0.4.0"
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==
dependencies:
"@budibase/backend-core" "2.3.11-alpha.0"
"@budibase/types" "2.3.11-alpha.0"
"@budibase/backend-core" "2.3.13"
"@budibase/types" "2.3.13"
"@koa/router" "8.0.8"
bull "4.10.1"
joi "17.6.0"
@ -553,10 +540,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.13", "@budibase/types@^2.3.13":
version "2.3.13"
resolved "https://registry.yarnpkg.com/@budibase/types/-/types-2.3.13.tgz#d20edf6afc54513b3e8c7f59bf817ad1366bba60"
integrity sha512-7rih50GUg3J3Lvk6AIMSBoMmqFBWphGOTxrqRSyjjsq2Y1HtraMxh0xpomkx4jtTzZSrRdElJ/bB2HHa1AsLHw==
"@cspotcode/source-map-support@^0.8.0":
version "0.8.1"
@ -6561,6 +6548,19 @@ pouchdb-promise@6.4.3, pouchdb-promise@^6.0.4:
dependencies:
lie "3.1.1"
pouchdb-replication-stream@1.2.9:
version "1.2.9"
resolved "https://registry.yarnpkg.com/pouchdb-replication-stream/-/pouchdb-replication-stream-1.2.9.tgz#aa4fa5d8f52df4825392f18e07c7e11acffc650a"
integrity sha512-hM8XRBfamTTUwRhKwLS/jSNouBhn9R/4ugdHNRD1EvJzwV8iImh6sDYbCU9PGuznjyOjXz6vpFRzKeI2KYfwnQ==
dependencies:
argsarray "0.0.1"
inherits "^2.0.3"
lodash.pick "^4.0.0"
ndjson "^1.4.3"
pouch-stream "^0.4.0"
pouchdb-promise "^6.0.4"
through2 "^2.0.0"
pouchdb-selector-core@7.2.2:
version "7.2.2"
resolved "https://registry.yarnpkg.com/pouchdb-selector-core/-/pouchdb-selector-core-7.2.2.tgz#264d7436a8c8ac3801f39960e79875ef7f3879a0"