diff --git a/lerna.json b/lerna.json index 4192189369..afd0db6374 100644 --- a/lerna.json +++ b/lerna.json @@ -1,6 +1,6 @@ { "$schema": "node_modules/lerna/schemas/lerna-schema.json", - "version": "3.2.25", + "version": "3.2.26", "npmClient": "yarn", "concurrency": 20, "command": { diff --git a/packages/backend-core/src/cache/invite.ts b/packages/backend-core/src/cache/invite.ts index e3d698bcc6..5d896ba04c 100644 --- a/packages/backend-core/src/cache/invite.ts +++ b/packages/backend-core/src/cache/invite.ts @@ -3,18 +3,10 @@ import { Duration } from "../utils" import env from "../environment" import { getTenantId } from "../context" import * as redis from "../redis/init" +import { Invite, InviteWithCode } from "@budibase/types" const TTL_SECONDS = Duration.fromDays(7).toSeconds() -interface Invite { - email: string - info: any -} - -interface InviteWithCode extends Invite { - code: string -} - /** * Given an invite code and invite body, allow the update an existing/valid invite in redis * @param code The invite code for an invite in redis diff --git a/packages/builder/src/components/automation/AutomationBuilder/FlowChart/TestDataModal.svelte b/packages/builder/src/components/automation/AutomationBuilder/FlowChart/TestDataModal.svelte index 5ec66870a8..eebd977e6c 100644 --- a/packages/builder/src/components/automation/AutomationBuilder/FlowChart/TestDataModal.svelte +++ b/packages/builder/src/components/automation/AutomationBuilder/FlowChart/TestDataModal.svelte @@ -46,7 +46,7 @@ } } else { // Leave the core data as it is - return testData + return cloneDeep(testData) } } @@ -63,7 +63,10 @@ return true } - $: testData = testData || parseTestData($selectedAutomation.data.testData) + $: currentTestData = $selectedAutomation.data.testData + + // Can be updated locally to avoid race condition when testing + $: testData = parseTestData(currentTestData) $: { // clone the trigger so we're not mutating the reference @@ -85,7 +88,7 @@ required => testData?.[required] || required !== "row" ) - function parseTestJSON(e) { + async function parseTestJSON(e) { let jsonUpdate try { @@ -105,7 +108,9 @@ } } - automationStore.actions.addTestDataToAutomation(jsonUpdate) + const updatedAuto = + automationStore.actions.addTestDataToAutomation(jsonUpdate) + await automationStore.actions.save(updatedAuto) } const testAutomation = async () => { @@ -150,10 +155,14 @@ {#if selectedValues}
{ + const { testData: updatedTestData } = e.detail + testData = updatedTestData + }} />
{/if} @@ -162,7 +171,7 @@