diff --git a/hosting/couchdb/sqs/arm/better_sqlite3.node b/hosting/couchdb/sqs/arm/better_sqlite3.node index 3c4ed6d327..4d1bd84cf9 100755 Binary files a/hosting/couchdb/sqs/arm/better_sqlite3.node and b/hosting/couchdb/sqs/arm/better_sqlite3.node differ diff --git a/hosting/couchdb/sqs/arm/sqs b/hosting/couchdb/sqs/arm/sqs index a52eaaa2a3..d251ce0e06 100755 Binary files a/hosting/couchdb/sqs/arm/sqs and b/hosting/couchdb/sqs/arm/sqs differ diff --git a/hosting/couchdb/sqs/x86/better_sqlite3.node b/hosting/couchdb/sqs/x86/better_sqlite3.node index bec4c79958..a7a39fc4a5 100755 Binary files a/hosting/couchdb/sqs/x86/better_sqlite3.node and b/hosting/couchdb/sqs/x86/better_sqlite3.node differ diff --git a/hosting/couchdb/sqs/x86/sqs b/hosting/couchdb/sqs/x86/sqs index 9de3349267..fb971be232 100755 Binary files a/hosting/couchdb/sqs/x86/sqs and b/hosting/couchdb/sqs/x86/sqs differ diff --git a/hosting/single/runner.sh b/hosting/single/runner.sh index fc8d4d8b2d..b89bf8ffd4 100644 --- a/hosting/single/runner.sh +++ b/hosting/single/runner.sh @@ -80,7 +80,11 @@ ln -s ${DATA_DIR}/.env /worker/.env # make these directories in runner, incase of mount mkdir -p ${DATA_DIR}/minio chown -R couchdb:couchdb ${DATA_DIR}/couch -redis-server --requirepass $REDIS_PASSWORD > /dev/stdout 2>&1 & +if [[ -n "${REDIS_PASSWORD}" ]]; then + redis-server --requirepass $REDIS_PASSWORD > /dev/stdout 2>&1 & +else + redis-server > /dev/stdout 2>&1 & +fi /bbcouch-runner.sh & # only start minio if use s3 isn't passed diff --git a/lerna.json b/lerna.json index 035e98d606..c9b38f1031 100644 --- a/lerna.json +++ b/lerna.json @@ -1,6 +1,6 @@ { "$schema": "node_modules/lerna/schemas/lerna-schema.json", - "version": "2.30.0", + "version": "2.30.2", "npmClient": "yarn", "packages": [ "packages/*", diff --git a/packages/backend-core/src/security/auth.ts b/packages/backend-core/src/security/auth.ts index 1cce35a0af..7dacecdb3b 100644 --- a/packages/backend-core/src/security/auth.ts +++ b/packages/backend-core/src/security/auth.ts @@ -1,6 +1,6 @@ import env from "../environment" -export const PASSWORD_MIN_LENGTH = +(env.PASSWORD_MIN_LENGTH || 8) +export const PASSWORD_MIN_LENGTH = +(env.PASSWORD_MIN_LENGTH || 12) export const PASSWORD_MAX_LENGTH = +(env.PASSWORD_MAX_LENGTH || 512) export function validatePassword( diff --git a/packages/backend-core/src/security/tests/auth.spec.ts b/packages/backend-core/src/security/tests/auth.spec.ts index b1835fdfb3..78e25b0a81 100644 --- a/packages/backend-core/src/security/tests/auth.spec.ts +++ b/packages/backend-core/src/security/tests/auth.spec.ts @@ -4,7 +4,7 @@ import { PASSWORD_MAX_LENGTH, validatePassword } from "../auth" describe("auth", () => { describe("validatePassword", () => { it("a valid password returns successful", () => { - expect(validatePassword("password")).toEqual({ valid: true }) + expect(validatePassword("password123!")).toEqual({ valid: true }) }) it.each([ @@ -14,7 +14,7 @@ describe("auth", () => { ])("%s returns unsuccessful", (_, password) => { expect(validatePassword(password as string)).toEqual({ valid: false, - error: "Password invalid. Minimum 8 characters.", + error: "Password invalid. Minimum 12 characters.", }) }) diff --git a/packages/backend-core/tests/core/utilities/structures/users.ts b/packages/backend-core/tests/core/utilities/structures/users.ts index db90887af2..0171353e23 100644 --- a/packages/backend-core/tests/core/utilities/structures/users.ts +++ b/packages/backend-core/tests/core/utilities/structures/users.ts @@ -21,7 +21,7 @@ export const user = (userProps?: Partial>): User => { _id: userId, userId, email: newEmail(), - password: "password", + password: "password123!", roles: { app_test: "admin" }, firstName: generator.first(), lastName: generator.last(), diff --git a/packages/bbui/src/Form/Core/Select.svelte b/packages/bbui/src/Form/Core/Select.svelte index 3806281438..7d325bb6cc 100644 --- a/packages/bbui/src/Form/Core/Select.svelte +++ b/packages/bbui/src/Form/Core/Select.svelte @@ -102,7 +102,9 @@ {onOptionMouseenter} {onOptionMouseleave} isPlaceholder={value == null || value === ""} - placeholderOption={placeholder === false ? null : placeholder} + placeholderOption={placeholder === false + ? null + : placeholder || "Choose an option"} isOptionSelected={option => compareOptionAndValue(option, value)} onSelectOption={selectOption} {loading} diff --git a/packages/builder/src/components/automation/SetupPanel/RowSelectorTypes.svelte b/packages/builder/src/components/automation/SetupPanel/RowSelectorTypes.svelte index 85d57e665a..ee9fd12c0c 100644 --- a/packages/builder/src/components/automation/SetupPanel/RowSelectorTypes.svelte +++ b/packages/builder/src/components/automation/SetupPanel/RowSelectorTypes.svelte @@ -157,7 +157,7 @@ {:else if schema.type === "link"} onChange({ @@ -169,7 +169,7 @@ /> {:else if schema.type === "bb_reference" || schema.type === "bb_reference_single"} diff --git a/packages/builder/src/components/backend/DataTable/RowFieldControl.svelte b/packages/builder/src/components/backend/DataTable/RowFieldControl.svelte index b012766171..745f29d56a 100644 --- a/packages/builder/src/components/backend/DataTable/RowFieldControl.svelte +++ b/packages/builder/src/components/backend/DataTable/RowFieldControl.svelte @@ -146,7 +146,7 @@ {:else if type === "link"} (value = e.detail)} /> diff --git a/packages/builder/src/components/common/LinkedRowSelector.svelte b/packages/builder/src/components/common/LinkedRowSelector.svelte index 8db4a7dc03..009d943456 100644 --- a/packages/builder/src/components/common/LinkedRowSelector.svelte +++ b/packages/builder/src/components/common/LinkedRowSelector.svelte @@ -6,7 +6,7 @@ import { createEventDispatcher } from "svelte" export let schema - export let linkedRows = [] + export let linkedData export let useLabel = true export let linkedTableId export let label @@ -15,14 +15,26 @@ let rows = [] let linkedIds = [] - $: linkedIds = (Array.isArray(linkedRows) ? linkedRows : [])?.map( - row => row?._id || row - ) + $: fieldValue = getFieldValue(linkedData, schema) $: label = label || capitalise(schema.name) $: linkedTableId = linkedTableId || schema.tableId $: linkedTable = $tables.list.find(table => table._id === linkedTableId) $: fetchRows(linkedTableId) + const getFieldValue = val => { + const linkedIds = (Array.isArray(val) ? val : [])?.map( + row => row?._id || row + ) + if ( + schema.relationshipType === "one-to-many" || + schema.type === "bb_reference_single" + ) { + return linkedIds[0] + } else { + return linkedIds + } + } + async function fetchRows(linkedTableId) { try { rows = await API.fetchTableData(linkedTableId) @@ -45,7 +57,7 @@ {:else if schema.relationshipType === "one-to-many" || schema.type === "bb_reference_single"}