From 42d5140c7f60e8e152e773413e7bc344d7432462 Mon Sep 17 00:00:00 2001 From: Maurits Lourens Date: Tue, 5 Oct 2021 12:20:09 +0200 Subject: [PATCH 01/15] add a slash before the path and a questionmark before the querystring --- .../src/components/integration/index.svelte | 6 +++--- packages/server/src/integrations/rest.ts | 14 +++++++++----- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/packages/builder/src/components/integration/index.svelte b/packages/builder/src/components/integration/index.svelte index 5c821d3a53..a0e1b8c1c4 100644 --- a/packages/builder/src/components/integration/index.svelte +++ b/packages/builder/src/components/integration/index.svelte @@ -17,9 +17,9 @@ $: urlDisplay = schema.urlDisplay && - `${datasource.config.url}${query.fields.path ?? ""}${ - query.fields.queryString ?? "" - }` + `${datasource.config.url}${ + query.fields.path ? "/" + query.fields.path : "" + }${query.fields.queryString ? "?" + query.fields.queryString : ""}` function updateQuery({ detail }) { query.fields[schema.type] = detail.value diff --git a/packages/server/src/integrations/rest.ts b/packages/server/src/integrations/rest.ts index d6cf71e324..9c6ece52d6 100644 --- a/packages/server/src/integrations/rest.ts +++ b/packages/server/src/integrations/rest.ts @@ -152,13 +152,17 @@ module RestModule { } } + getUrl(path: string, queryString: string): string { + return `${this.config.url}/${path}?${queryString}` + } + async create({ path = "", queryString = "", headers = {}, json = {} }) { this.headers = { ...this.config.defaultHeaders, ...headers, } - const response = await fetch(this.config.url + path + queryString, { + const response = await fetch(this.getUrl(path, queryString), { method: "POST", headers: this.headers, body: JSON.stringify(json), @@ -173,7 +177,7 @@ module RestModule { ...headers, } - const response = await fetch(this.config.url + path + queryString, { + const response = await fetch(this.getUrl(path, queryString), { headers: this.headers, }) @@ -186,7 +190,7 @@ module RestModule { ...headers, } - const response = await fetch(this.config.url + path + queryString, { + const response = await fetch(this.getUrl(path, queryString), { method: "POST", headers: this.headers, body: JSON.stringify(json), @@ -201,7 +205,7 @@ module RestModule { ...headers, } - const response = await fetch(this.config.url + path + queryString, { + const response = await fetch(this.getUrl(path, queryString), { method: "PATCH", headers: this.headers, body: JSON.stringify(json), @@ -216,7 +220,7 @@ module RestModule { ...headers, } - const response = await fetch(this.config.url + path + queryString, { + const response = await fetch(this.getUrl(path, queryString), { method: "DELETE", headers: this.headers, }) From 53cfb8dc9c35d7cbc0e57ca9d89f075d011d7a29 Mon Sep 17 00:00:00 2001 From: Maurits Lourens Date: Tue, 5 Oct 2021 13:38:03 +0200 Subject: [PATCH 02/15] fix tests --- .../src/integrations/tests/rest.spec.js | 70 ++++++++++--------- 1 file changed, 36 insertions(+), 34 deletions(-) diff --git a/packages/server/src/integrations/tests/rest.spec.js b/packages/server/src/integrations/tests/rest.spec.js index a0b12f6c17..cb69d3c38d 100644 --- a/packages/server/src/integrations/tests/rest.spec.js +++ b/packages/server/src/integrations/tests/rest.spec.js @@ -1,98 +1,100 @@ -jest.mock("node-fetch", () => jest.fn(() => ({ json: jest.fn(), text: jest.fn() }))) +jest.mock("node-fetch", () => + jest.fn(() => ({ json: jest.fn(), text: jest.fn() })) +) const fetch = require("node-fetch") const RestIntegration = require("../rest") class TestConfiguration { constructor(config = {}) { - this.integration = new RestIntegration.integration(config) + this.integration = new RestIntegration.integration(config) } } describe("REST Integration", () => { const BASE_URL = "https://myapi.com" - let config + let config beforeEach(() => { config = new TestConfiguration({ - url: BASE_URL + url: BASE_URL, }) }) it("calls the create method with the correct params", async () => { const query = { - path: "/api", - queryString: "?test=1", + path: "api", + queryString: "test=1", headers: { - Accept: "application/json" + Accept: "application/json", }, json: { - name: "test" - } + name: "test", + }, } const response = await config.integration.create(query) expect(fetch).toHaveBeenCalledWith(`${BASE_URL}/api?test=1`, { method: "POST", - body: "{\"name\":\"test\"}", + body: '{"name":"test"}', headers: { - Accept: "application/json" - } + Accept: "application/json", + }, }) }) it("calls the read method with the correct params", async () => { const query = { - path: "/api", - queryString: "?test=1", + path: "api", + queryString: "test=1", headers: { - Accept: "text/html" - } + Accept: "text/html", + }, } const response = await config.integration.read(query) expect(fetch).toHaveBeenCalledWith(`${BASE_URL}/api?test=1`, { headers: { - Accept: "text/html" - } + Accept: "text/html", + }, }) }) it("calls the update method with the correct params", async () => { const query = { - path: "/api", - queryString: "?test=1", + path: "api", + queryString: "test=1", headers: { - Accept: "application/json" + Accept: "application/json", }, json: { - name: "test" - } + name: "test", + }, } const response = await config.integration.update(query) expect(fetch).toHaveBeenCalledWith(`${BASE_URL}/api?test=1`, { method: "POST", - body: "{\"name\":\"test\"}", + body: '{"name":"test"}', headers: { - Accept: "application/json" - } + Accept: "application/json", + }, }) }) it("calls the delete method with the correct params", async () => { const query = { - path: "/api", - queryString: "?test=1", + path: "api", + queryString: "test=1", headers: { - Accept: "application/json" + Accept: "application/json", }, json: { - name: "test" - } + name: "test", + }, } const response = await config.integration.delete(query) expect(fetch).toHaveBeenCalledWith(`${BASE_URL}/api?test=1`, { method: "DELETE", headers: { - Accept: "application/json" - } + Accept: "application/json", + }, }) }) -}) \ No newline at end of file +}) From b7bf662e6d24a9d9da6d85cd8ff26b6f76ff26e2 Mon Sep 17 00:00:00 2001 From: Rory Powell Date: Fri, 8 Oct 2021 13:13:16 +0100 Subject: [PATCH 03/15] Introduce dev modes, update contributor guide --- .github/CONTRIBUTING.md | 132 +++++++++++++++-------------- package.json | 17 ++-- packages/server/package.json | 14 +-- packages/server/scripts/account.js | 8 ++ packages/worker/package.json | 14 +-- packages/worker/scripts/account.js | 8 ++ 6 files changed, 112 insertions(+), 81 deletions(-) create mode 100644 packages/server/scripts/account.js create mode 100644 packages/worker/scripts/account.js diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index 696bd18986..7abfe537e9 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -2,7 +2,7 @@ From opening a bug report to creating a pull request: every contribution is appreciated and welcome. If you're planning to implement a new feature or change the api please create an issue first. This way we can ensure that your precious work is not in vain. -### Not Sure Where to Start? +## Not Sure Where to Start? Budibase is a low-code web application builder that creates svelte based web applications. @@ -14,6 +14,8 @@ Budibase is a monorepo managed by [lerna](https://github.com/lerna/lerna). Lerna - **packages/server** - The budibase server. This [Koa](https://koajs.com/) app is responsible for serving the JS for the builder and budibase apps, as well as providing the API for interaction with the database and file system. +- **packages/worker** - This [Koa](https://koajs.com/) app is responsible for providing global apis for managing your budibase installation. Authentication, Users, Email, Org and Auth configs are all provided by the worker. + ## Contributor License Agreement (CLA) In order to accept your pull request, we need you to submit a CLA. You only need to do this once. If you are submitting a pull request for the first time, just submit a Pull Request and our CLA Bot will give you instructions on how to sign the CLA before merging your Pull Request. @@ -62,8 +64,6 @@ A component is the basic frontend building block of a budibase app. Component libraries are collections of components as well as the definition of their props contained in a file called `components.json`. - - ## Contributing to Budibase * Please maintain the existing code style. @@ -74,31 +74,30 @@ Component libraries are collections of components as well as the definition of t * If the project diverges from your branch, please rebase instead of merging. This makes the commit graph easier to read. -* Once your work is completed, please raise a PR against the main branch with some information about what has changed and why. +* Once your work is completed, please raise a PR against the `develop` branch with some information about what has changed and why. ### Getting Started For Contributors - -### 1. Prerequisites +#### 1. Prerequisites *yarn -* `npm install -g yarn` *jest* - `npm install -g jest` -### 2. Clone this repository +#### 2. Clone this repository `git clone https://github.com/Budibase/budibase.git` then `cd ` into your local copy. -### 3. Install and Build +#### 3. Install and Build To develop the Budibase platform you'll need [Docker](https://www.docker.com/) and [Docker Compose](https://docs.docker.com/compose/) installed. -#### Quick method +##### Quick method `yarn setup` will check that all necessary components are installed and setup the repo for usage. -#### Manual method +##### Manual method The following commands can be executed to manually get Budibase up and running (assuming Docker/Docker Compose has been installed). @@ -108,15 +107,7 @@ The following commands can be executed to manually get Budibase up and running ( `yarn build` will build all budibase packages. -### 4. Initialising Budibase and Creating a Budibase App - -Starting up the budibase electron app should initialise budibase for you. A Budibase apps folder will have been created in `~/.budibase`. - -This is a blank apps folder, so you will need to create yourself an app, you can do this by clicking "Create New App" from the budibase builder. - -This will create a new budibase application in the `~/.budibase/` directory, and NPM install the component libraries for that application. Let's start building your app with the budibase builder! - -### 4. Running +#### 4. Running To run the budibase server and builder in dev mode (i.e. with live reloading): @@ -126,7 +117,7 @@ To run the budibase server and builder in dev mode (i.e. with live reloading): This will enable watch mode for both the builder app, server, client library and any component libraries. -### 5. Debugging using VS Code +#### 5. Debugging using VS Code To debug the budibase server and worker a VS Code launch configuration has been provided. @@ -135,75 +126,90 @@ Alternatively to start both components simultaneously select `Start Budibase`. In addition to the above, the remaining budibase components may be ran in dev mode using: `yarn dev:noserver`. -### 6. Cleanup +#### 6. Cleanup If you wish to delete all the apps created in development and reset the environment then run the following: 1. `yarn nuke:docker` will wipe all the Budibase services 2. `yarn dev` will restart all the services -## Data Storage - -When you are running locally, budibase stores data on disk using [PouchDB](https://pouchdb.com/), as well as some JSON on local files. After setting up budibase, you can find all of this data in the `~/.budibase` directory. - -A client can have one or more budibase applications. Budibase applications are stored in `~/.budibase/`. Files used by your budibase application when running are stored in the `public` directory. Everything else is dev files used for the development of your apps in the builder. - -#### Frontend - -To see the current individual JSON definitions for your pages and screens used by the builder, have a look at `~/.budibase//pages`. - -For your actual running application (not in dev), the frontend tree structure of the application (known as `clientFrontendDefinition`) is stored as JSON on disk. This is what the budibase client library reads to create your app at runtime. This can be found at `~/.budibase//public/clientFrontendDefinition.js` - -The HTML and CSS for your apps runtime pages, as well as the budibase client library JS is stored at: - -- `~/.budibase//public/main` -- `~/.budibase//public/unauthenticated` - -#### Backend +### Backend For the backend we run [Redis](https://redis.io/), [CouchDB](https://couchdb.apache.org/), [MinIO](https://min.io/) and [Envoy](https://www.envoyproxy.io/) in Docker compose. This means that to develop Budibase you will need Docker and Docker compose installed. The backend services are then ran separately as Node services with nodemon so that they can be debugged outside of Docker. -### Publishing Budibase to NPM +### Data Storage -#### Testing In Electron +When you are running locally, budibase stores data on disk using docker volumes. The volumes and the types of data associated with each are: -At budibase, we pride ourselves on giving our users a fast, native and slick local development experience. As a result, we use the electron to provide a native GUI for the budibase builder. In order to release budibase out into the wild, you should test your changes in a packaged electron application. To do this, first build budibase from the root directory. +- `redis_data` + - Sessions, email tokens +- `couchdb3_data` + - Global and app databases +- `minio_data` + - App manifest, budibase client, static assets + +### Devlopment Modes + +A combination of environment variables controls the mode that budibase runs in. +Yarn commands can be used to mimic the different modes that budibase can be ran in + +#### Self Hosted +The default mode. A single tenant installation with no usage restrictions. + +To enable this mode, use: ``` -yarn build +yarn mode:self ``` -Now everything is built, you can package up your electron application. +#### Cloud +The cloud mode, with account portal turned off. + +To enable this mode, use: ``` -cd packages/server -yarn build:electron +yarn mode:cloud ``` - -Your new electron application will be stored in `packages/server/dist/`. Open up the executable and make sure everything is working smoothly. +#### Cloud & Account +The cloud mode, with account portal turned on. This is a replica of the mode that runs at https://budibase.app -#### Publishing to NPM - -Once you are happy that your changes work in electron, you can publish all the latest versions of the monorepo packages by running: - +To enable this mode, use: ``` -yarn publishnpm +yarn mode:account ``` +### CI -from your root directory. +#### PR Job -#### CI Release +After your pr is submitted a github action (can be found at `.github/workflows/budibase_ci.yml`) will run to perform some checks against the changes such as linting, build and test. -After NPM has successfully published the budibase packages, a new tag will be pushed to master. This will kick off a github action (can be found at `.github/workflows/release.yml`) this will build and package the electron application for every OS (Windows, Mac, Linux). The binaries will be stored under the new tag on the [budibase releases page](https://github.com/Budibase/budibase/releases). +The job will run when changes are pushed to or targetted at `master` and `develop` +#### Release Develop + +To test changes before a release, a prerelease action (can be found at `.github/workflows/release-develop.yml`) will run to build and release develop versions of npm packages and docker images. On each subsequent commit to develop a new alpha version of npm packages will be created and released. + +For example: + +- `feature1` -> `develop` = `v0.9.160-alpha.1` +- `feature2` -> `develop` = `v0.9.160-alpha.0` + +The job will run when changes are pushed to `develop` +#### Release Job + +To release changes a release job (can be found at `.github/workflows/release.yml`) will run to create final versions of npm packages and docker images. + +Following the example above: + +- `develop` -> `master` = `v0.9.160` + +The job will run when changes are pushed to `master` + +#### Release Self Host Job + +To release the self hosted version of docker images, an additional job (can be found at `.github/workflows/release-selfhost.yml`) must be ran manually. This will releaae docker images to docker hub under the tag `latest` to be picked up by self hosted installations. ### Troubleshooting -Sometimes, things go wrong. This can be due to incompatible updates on the budibase platform. To clear down your development environment and start again: - -``` -rm -rf ~/.budibase -``` -Follow from **Step 3. Install and Build** in the setup guide above. You should have a fresh Budibase installation. - +Sometimes, things go wrong. This can be due to incompatible updates on the budibase platform. To clear down your development environment and start again follow **Step 6. Cleanup**, then proceed from **Step 3. Install and Build** in the setup guide above. You should have a fresh Budibase installation. ### Running tests #### End-to-end Tests diff --git a/package.json b/package.json index 3596ec7800..a3119d0d0e 100644 --- a/package.json +++ b/package.json @@ -46,12 +46,17 @@ "build:docker:production": "lerna run build:docker && cd hosting/scripts/linux/ && ./release-to-docker-hub.sh $BUDIBASE_RELEASE_VERSION release && cd -", "build:docker:develop": "node scripts/pinVersions && lerna run build:docker && cd hosting/scripts/linux/ && ./release-to-docker-hub.sh develop && cd -", "release:helm": "./scripts/release_helm_chart.sh", - "multi:enable": "lerna run multi:enable", - "multi:disable": "lerna run multi:disable", - "selfhost:enable": "lerna run selfhost:enable", - "selfhost:disable": "lerna run selfhost:disable", - "localdomain:enable": "lerna run localdomain:enable", - "localdomain:disable": "lerna run localdomain:disable", + "env:multi:enable": "lerna run env:multi:enable", + "env:multi:disable": "lerna run env:multi:disable", + "env:selfhost:enable": "lerna run env:selfhost:enable", + "env:selfhost:disable": "lerna run env:selfhost:disable", + "env:localdomain:enable": "lerna run env:localdomain:enable", + "env:localdomain:disable": "lerna run env:localdomain:disable", + "env:account:enable": "lerna run env:account:enable", + "env:account:disable": "lerna run env:account:disable", + "mode:self": "yarn env:selfhost:enable && yarn env:multi:disable && yarn env:account:disable", + "mode:cloud": "yarn env:selfhost:disable && yarn env:multi:enable && yarn env:account:disable", + "mode:account": "yarn mode:cloud && yarn env:account:enable", "postinstall": "husky install" } } diff --git a/packages/server/package.json b/packages/server/package.json index 1fb9e080e0..f0bc2d8f85 100644 --- a/packages/server/package.json +++ b/packages/server/package.json @@ -24,12 +24,14 @@ "lint": "eslint --fix src/", "lint:fix": "yarn run format && yarn run lint", "initialise": "node scripts/initialise.js", - "multi:enable": "node scripts/multiTenancy.js enable", - "multi:disable": "node scripts/multiTenancy.js disable", - "selfhost:enable": "node scripts/selfhost.js enable", - "selfhost:disable": "node scripts/selfhost.js disable", - "localdomain:enable": "node scripts/localdomain.js enable", - "localdomain:disable": "node scripts/localdomain.js disable" + "env:multi:enable": "node scripts/multiTenancy.js enable", + "env:multi:disable": "node scripts/multiTenancy.js disable", + "env:selfhost:enable": "node scripts/selfhost.js enable", + "env:selfhost:disable": "node scripts/selfhost.js disable", + "env:localdomain:enable": "node scripts/localdomain.js enable", + "env:localdomain:disable": "node scripts/localdomain.js disable", + "env:account:enable": "node scripts/account.js enable", + "env:account:disable": "node scripts/account.js disable" }, "jest": { "preset": "ts-jest", diff --git a/packages/server/scripts/account.js b/packages/server/scripts/account.js new file mode 100644 index 0000000000..69c0a94507 --- /dev/null +++ b/packages/server/scripts/account.js @@ -0,0 +1,8 @@ +#!/usr/bin/env node +const updateDotEnv = require("update-dotenv") + +const arg = process.argv.slice(2)[0] + +updateDotEnv({ + DISABLE_ACCOUNT_PORTAL: arg === "enable" ? "" : "1", +}).then(() => console.log("Updated server!")) diff --git a/packages/worker/package.json b/packages/worker/package.json index 3efafebca8..ff4594f655 100644 --- a/packages/worker/package.json +++ b/packages/worker/package.json @@ -17,12 +17,14 @@ "dev:stack:init": "node ./scripts/dev/manage.js init", "dev:builder": "npm run dev:stack:init && nodemon src/index.js", "test": "jest --runInBand", - "multi:enable": "node scripts/multiTenancy.js enable", - "multi:disable": "node scripts/multiTenancy.js disable", - "selfhost:enable": "node scripts/selfhost.js enable", - "selfhost:disable": "node scripts/selfhost.js disable", - "localdomain:enable": "node scripts/localdomain.js enable", - "localdomain:disable": "node scripts/localdomain.js disable" + "env:multi:enable": "node scripts/multiTenancy.js enable", + "env:multi:disable": "node scripts/multiTenancy.js disable", + "env:selfhost:enable": "node scripts/selfhost.js enable", + "env:selfhost:disable": "node scripts/selfhost.js disable", + "env:localdomain:enable": "node scripts/localdomain.js enable", + "env:localdomain:disable": "node scripts/localdomain.js disable", + "env:account:enable": "node scripts/account.js enable", + "env:account:disable": "node scripts/account.js disable" }, "author": "Budibase", "license": "AGPL-3.0-or-later", diff --git a/packages/worker/scripts/account.js b/packages/worker/scripts/account.js new file mode 100644 index 0000000000..bd96f98256 --- /dev/null +++ b/packages/worker/scripts/account.js @@ -0,0 +1,8 @@ +#!/usr/bin/env node +const updateDotEnv = require("update-dotenv") + +const arg = process.argv.slice(2)[0] + +updateDotEnv({ + DISABLE_ACCOUNT_PORTAL: arg === "enable" ? "" : "1", +}).then(() => console.log("Updated worker!")) From 4b60467eccff7d95da19536a650432e90c1e55ec Mon Sep 17 00:00:00 2001 From: Rory Powell Date: Fri, 8 Oct 2021 13:22:08 +0100 Subject: [PATCH 04/15] Fix linting --- packages/builder/cypress/support/commands.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/builder/cypress/support/commands.js b/packages/builder/cypress/support/commands.js index c8e01435aa..f179a24729 100644 --- a/packages/builder/cypress/support/commands.js +++ b/packages/builder/cypress/support/commands.js @@ -5,7 +5,7 @@ // *********************************************** // -Cypress.on('uncaught:exception', (err, runnable) => { +Cypress.on("uncaught:exception", () => { return false }) From d11f8fed59c308e614a1d68ba0f155b984dc6351 Mon Sep 17 00:00:00 2001 From: Peter Clement Date: Mon, 11 Oct 2021 11:10:26 +0100 Subject: [PATCH 05/15] fix issue where automation block was not being added in the correct order --- .../AutomationBuilder/FlowChart/ActionModal.svelte | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/builder/src/components/automation/AutomationBuilder/FlowChart/ActionModal.svelte b/packages/builder/src/components/automation/AutomationBuilder/FlowChart/ActionModal.svelte index acb945a96a..b076a8da86 100644 --- a/packages/builder/src/components/automation/AutomationBuilder/FlowChart/ActionModal.svelte +++ b/packages/builder/src/components/automation/AutomationBuilder/FlowChart/ActionModal.svelte @@ -4,10 +4,11 @@ import { externalActions } from "./ExternalActions" export let blockIdx + export let blockComplete + let selectedAction let actionVal let actions = Object.entries($automationStore.blockDefinitions.ACTION) - export let blockComplete const external = actions.reduce((acc, elm) => { const [k, v] = elm @@ -36,10 +37,9 @@ actionVal.stepId, actionVal ) - automationStore.actions.addBlockToAutomation(newBlock) + automationStore.actions.addBlockToAutomation(newBlock, blockIdx + 1) await automationStore.actions.save( - $automationStore.selectedAutomation?.automation, - blockIdx + $automationStore.selectedAutomation?.automation ) } From c0d46262bf456406f4bef9d485805a7effa0b23e Mon Sep 17 00:00:00 2001 From: Rory Powell Date: Mon, 11 Oct 2021 11:14:44 +0100 Subject: [PATCH 06/15] Don't perform account deletion check when self hosted --- packages/builder/cypress/support/commands.js | 2 +- .../worker/src/api/controllers/global/users.js | 18 ++++++++++-------- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/packages/builder/cypress/support/commands.js b/packages/builder/cypress/support/commands.js index c8e01435aa..f179a24729 100644 --- a/packages/builder/cypress/support/commands.js +++ b/packages/builder/cypress/support/commands.js @@ -5,7 +5,7 @@ // *********************************************** // -Cypress.on('uncaught:exception', (err, runnable) => { +Cypress.on("uncaught:exception", () => { return false }) diff --git a/packages/worker/src/api/controllers/global/users.js b/packages/worker/src/api/controllers/global/users.js index 38a814f465..1c3328ce61 100644 --- a/packages/worker/src/api/controllers/global/users.js +++ b/packages/worker/src/api/controllers/global/users.js @@ -111,14 +111,16 @@ exports.destroy = async ctx => { const db = getGlobalDB() const dbUser = await db.get(ctx.params.id) - // root account holder can't be deleted from inside budibase - const email = dbUser.email - const account = await accounts.getAccount(email) - if (account) { - if (email === ctx.user.email) { - ctx.throw(400, 'Please visit "Account" to delete this user') - } else { - ctx.throw(400, "Account holder cannot be deleted") + if (!env.SELF_HOSTED && !env.DISABLE_ACCOUNT_PORTAL) { + // root account holder can't be deleted from inside budibase + const email = dbUser.email + const account = await accounts.getAccount(email) + if (account) { + if (email === ctx.user.email) { + ctx.throw(400, 'Please visit "Account" to delete this user') + } else { + ctx.throw(400, "Account holder cannot be deleted") + } } } From 47adf12a4a35f5325fad47b65eeb5ad5aaa6243a Mon Sep 17 00:00:00 2001 From: Peter Clement Date: Mon, 11 Oct 2021 11:33:54 +0100 Subject: [PATCH 07/15] fix lint --- packages/builder/cypress/support/commands.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/builder/cypress/support/commands.js b/packages/builder/cypress/support/commands.js index c8e01435aa..f179a24729 100644 --- a/packages/builder/cypress/support/commands.js +++ b/packages/builder/cypress/support/commands.js @@ -5,7 +5,7 @@ // *********************************************** // -Cypress.on('uncaught:exception', (err, runnable) => { +Cypress.on("uncaught:exception", () => { return false }) From 8b97588851154069a37af82687d1676ed28aae5c Mon Sep 17 00:00:00 2001 From: Peter Clement Date: Mon, 11 Oct 2021 11:35:07 +0100 Subject: [PATCH 08/15] enable 'add action' button when inputs completed --- .../automation/AutomationBuilder/FlowChart/FlowItem.svelte | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/builder/src/components/automation/AutomationBuilder/FlowChart/FlowItem.svelte b/packages/builder/src/components/automation/AutomationBuilder/FlowChart/FlowItem.svelte index 0c0b79c3de..e69f5ec204 100644 --- a/packages/builder/src/components/automation/AutomationBuilder/FlowChart/FlowItem.svelte +++ b/packages/builder/src/components/automation/AutomationBuilder/FlowChart/FlowItem.svelte @@ -151,7 +151,7 @@ > {/if}