diff --git a/lerna.json b/lerna.json index 202e1c6f49..48af3c36b2 100644 --- a/lerna.json +++ b/lerna.json @@ -1,5 +1,5 @@ { - "version": "2.6.8", + "version": "2.6.10", "npmClient": "yarn", "useWorkspaces": true, "packages": ["packages/*"], diff --git a/packages/backend-core/package.json b/packages/backend-core/package.json index 03dae9feca..9cfc572101 100644 --- a/packages/backend-core/package.json +++ b/packages/backend-core/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/backend-core", - "version": "2.6.8", + "version": "2.6.10", "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.2", "@budibase/pouchdb-replication-stream": "1.2.10", - "@budibase/types": "^2.6.8", + "@budibase/types": "^2.6.10", "@shopify/jest-koa-mocks": "5.0.1", "@techpass/passport-openidconnect": "0.3.2", "aws-cloudfront-sign": "2.2.0", diff --git a/packages/bbui/package.json b/packages/bbui/package.json index f0fe559705..60bf76f61a 100644 --- a/packages/bbui/package.json +++ b/packages/bbui/package.json @@ -1,7 +1,7 @@ { "name": "@budibase/bbui", "description": "A UI solution used in the different Budibase projects.", - "version": "2.6.8", + "version": "2.6.10", "license": "MPL-2.0", "svelte": "src/index.js", "module": "dist/bbui.es.js", @@ -38,8 +38,8 @@ ], "dependencies": { "@adobe/spectrum-css-workflow-icons": "1.2.1", - "@budibase/shared-core": "^2.6.8", - "@budibase/string-templates": "^2.6.8", + "@budibase/shared-core": "^2.6.10", + "@budibase/string-templates": "^2.6.10", "@spectrum-css/accordion": "3.0.24", "@spectrum-css/actionbutton": "1.0.1", "@spectrum-css/actiongroup": "1.0.1", diff --git a/packages/builder/package.json b/packages/builder/package.json index 1b69c7aaac..d015fb61a5 100644 --- a/packages/builder/package.json +++ b/packages/builder/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/builder", - "version": "2.6.8", + "version": "2.6.10", "license": "GPL-3.0", "private": true, "scripts": { @@ -58,10 +58,10 @@ } }, "dependencies": { - "@budibase/bbui": "^2.6.8", - "@budibase/frontend-core": "^2.6.8", - "@budibase/shared-core": "^2.6.8", - "@budibase/string-templates": "^2.6.8", + "@budibase/bbui": "^2.6.10", + "@budibase/frontend-core": "^2.6.10", + "@budibase/shared-core": "^2.6.10", + "@budibase/string-templates": "^2.6.10", "@fortawesome/fontawesome-svg-core": "^6.2.1", "@fortawesome/free-brands-svg-icons": "^6.2.1", "@fortawesome/free-solid-svg-icons": "^6.2.1", diff --git a/packages/builder/src/pages/builder/portal/apps/onboarding/index.svelte b/packages/builder/src/pages/builder/portal/apps/onboarding/index.svelte index 8e018ae907..546f5f57ba 100644 --- a/packages/builder/src/pages/builder/portal/apps/onboarding/index.svelte +++ b/packages/builder/src/pages/builder/portal/apps/onboarding/index.svelte @@ -107,8 +107,9 @@ useSampleData, isGoogle, }) => { + let app try { - const app = await createApp(useSampleData) + app = await createApp(useSampleData) let datasource if (datasourceConfig) { @@ -134,6 +135,17 @@ console.log(e) creationLoading = false notifications.error("There was a problem creating your app") + + // Reset the store so that we don't send up stale headers + store.actions.reset() + + // If we successfully created an app, delete it again so that we + // can try again once the error has been corrected. + // This also ensures onboarding can't be skipped by entering invalid + // data credentials. + if (app?.appId) { + await API.deleteApp(app.appId) + } } } @@ -146,80 +158,87 @@ /> - - {#if stage === "name"} - (stage = "data")} /> - {:else if googleComplete} -
- Please login to your Google account in the new tab which as opened to - continue. -
- {:else if integrationsLoading || creationLoading} -
- -
- {:else if stage === "data"} - (stage = "name")}> -
- handleCreateApp({ useSampleData: true })}> -
-
- -
- Budibase Sample data -
-
+
+ + {#if stage === "name"} + (stage = "data")} /> + {:else if googleComplete} +
+ Please login to your Google account in the new tab which as opened to + continue.
-
- -
-
- -
- Upload data (CSV or JSON) -
-
+ {:else if integrationsLoading || creationLoading} +
+
- {#each Object.entries(plusIntegrations) as [integrationType, schema]} + {:else if stage === "data"} + (stage = "name")}>
- (stage = integrationType)}> + handleCreateApp({ useSampleData: true })} + >
- +
- {schema.friendlyName} + Budibase Sample data
- {/each} -
- {:else if stage in plusIntegrations} - (stage = "data")} - onNext={data => { - const isGoogle = data.isGoogle - delete data.isGoogle - return handleCreateApp({ datasourceConfig: data, isGoogle }) - }} - /> - {:else} -

There was an problem. Please refresh the page and try again.

- {/if} -
- -
- +
+ +
+
+ +
+ Upload data (CSV or JSON) +
+
+
+ {#each Object.entries(plusIntegrations) as [integrationType, schema]} +
+ (stage = integrationType)}> +
+
+ +
+ {schema.friendlyName} +
+
+
+ {/each} + + {:else if stage in plusIntegrations} + (stage = "data")} + onNext={data => { + const isGoogle = data.isGoogle + delete data.isGoogle + return handleCreateApp({ datasourceConfig: data, isGoogle }) + }} + /> + {:else} +

There was an problem. Please refresh the page and try again.

+ {/if} +
+ +
+ +