diff --git a/.eslintrc.json b/.eslintrc.json
index 75584b8163..f6f03c6523 100644
--- a/.eslintrc.json
+++ b/.eslintrc.json
@@ -19,6 +19,7 @@
"bundle.js"
],
"extends": ["eslint:recommended"],
+ "plugins": ["import", "eslint-plugin-local-rules"],
"overrides": [
{
"files": ["**/*.svelte"],
@@ -30,7 +31,6 @@
"sourceType": "module",
"allowImportExportEverywhere": true
}
-
},
{
"files": ["**/*.ts"],
@@ -42,13 +42,22 @@
"no-case-declarations": "off",
"no-useless-escape": "off",
"no-undef": "off",
- "no-prototype-builtins": "off"
+ "no-prototype-builtins": "off",
+ "local-rules/no-budibase-imports": "error"
}
}
],
"rules": {
"no-self-assign": "off",
- "no-unused-vars": ["error", { "varsIgnorePattern": "^_", "argsIgnorePattern": "^_", "destructuredArrayIgnorePattern": "^_" }]
+ "no-unused-vars": [
+ "error",
+ {
+ "varsIgnorePattern": "^_",
+ "argsIgnorePattern": "^_",
+ "destructuredArrayIgnorePattern": "^_"
+ }
+ ],
+ "import/no-relative-packages": "error"
},
"globals": {
"GeolocationPositionError": true
diff --git a/.github/workflows/budibase_ci.yml b/.github/workflows/budibase_ci.yml
index c73d013b78..cb71d0702b 100644
--- a/.github/workflows/budibase_ci.yml
+++ b/.github/workflows/budibase_ci.yml
@@ -18,51 +18,42 @@ env:
BASE_BRANCH: ${{ github.event.pull_request.base.ref}}
PERSONAL_ACCESS_TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
NX_BASE_BRANCH: origin/${{ github.base_ref }}
- USE_NX_AFFECTED: ${{ github.event_name == 'pull_request' && github.base_ref != 'master'}}
+ USE_NX_AFFECTED: ${{ github.event_name == 'pull_request' }}
+ IS_OSS_CONTRIBUTOR: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name != 'Budibase/budibase' }}
jobs:
lint:
runs-on: ubuntu-latest
steps:
- - name: Checkout repo and submodules
+ - name: Checkout repo
uses: actions/checkout@v3
- if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == 'Budibase/budibase'
with:
- submodules: true
+ submodules: ${{ env.IS_OSS_CONTRIBUTOR == 'false' }}
token: ${{ secrets.PERSONAL_ACCESS_TOKEN || github.token }}
- - name: Checkout repo only
- uses: actions/checkout@v3
- if: github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name != 'Budibase/budibase'
- name: Use Node.js 18.x
uses: actions/setup-node@v3
with:
node-version: 18.x
- cache: "yarn"
+ cache: yarn
- run: yarn --frozen-lockfile
- run: yarn lint
build:
runs-on: ubuntu-latest
steps:
- - name: Checkout repo and submodules
+ - name: Checkout repo
uses: actions/checkout@v3
- if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == 'Budibase/budibase'
with:
- submodules: true
+ submodules: ${{ env.IS_OSS_CONTRIBUTOR == 'false' }}
token: ${{ secrets.PERSONAL_ACCESS_TOKEN || github.token }}
fetch-depth: 0
- - name: Checkout repo only
- uses: actions/checkout@v3
- if: github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name != 'Budibase/budibase'
- with:
- fetch-depth: 0
- name: Use Node.js 18.x
uses: actions/setup-node@v3
with:
node-version: 18.x
- cache: "yarn"
+ cache: yarn
- run: yarn --frozen-lockfile
# Run build all the projects
@@ -81,24 +72,18 @@ jobs:
test-libraries:
runs-on: ubuntu-latest
steps:
- - name: Checkout repo and submodules
+ - name: Checkout repo
uses: actions/checkout@v3
- if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == 'Budibase/budibase'
with:
- submodules: true
+ submodules: ${{ env.IS_OSS_CONTRIBUTOR == 'false' }}
token: ${{ secrets.PERSONAL_ACCESS_TOKEN || github.token }}
fetch-depth: 0
- - name: Checkout repo only
- uses: actions/checkout@v3
- if: github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name != 'Budibase/budibase'
- with:
- fetch-depth: 0
- name: Use Node.js 18.x
uses: actions/setup-node@v3
with:
node-version: 18.x
- cache: "yarn"
+ cache: yarn
- run: yarn --frozen-lockfile
- name: Test
run: |
@@ -116,24 +101,18 @@ jobs:
test-worker:
runs-on: ubuntu-latest
steps:
- - name: Checkout repo and submodules
+ - name: Checkout repo
uses: actions/checkout@v3
- if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == 'Budibase/budibase'
with:
- submodules: true
+ submodules: ${{ env.IS_OSS_CONTRIBUTOR == 'false' }}
token: ${{ secrets.PERSONAL_ACCESS_TOKEN || github.token }}
fetch-depth: 0
- - name: Checkout repo only
- uses: actions/checkout@v3
- if: github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name != 'Budibase/budibase'
- with:
- fetch-depth: 0
- name: Use Node.js 18.x
uses: actions/setup-node@v3
with:
node-version: 18.x
- cache: "yarn"
+ cache: yarn
- run: yarn --frozen-lockfile
- name: Test worker
run: |
@@ -152,24 +131,18 @@ jobs:
test-server:
runs-on: ubuntu-latest
steps:
- - name: Checkout repo and submodules
+ - name: Checkout repo
uses: actions/checkout@v3
- if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == 'Budibase/budibase'
with:
- submodules: true
+ submodules: ${{ env.IS_OSS_CONTRIBUTOR == 'false' }}
token: ${{ secrets.PERSONAL_ACCESS_TOKEN || github.token }}
fetch-depth: 0
- - name: Checkout repo only
- uses: actions/checkout@v3
- if: github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name != 'Budibase/budibase'
- with:
- fetch-depth: 0
- name: Use Node.js 18.x
uses: actions/setup-node@v3
with:
node-version: 18.x
- cache: "yarn"
+ cache: yarn
- run: yarn --frozen-lockfile
- name: Test server
run: |
@@ -200,7 +173,7 @@ jobs:
uses: actions/setup-node@v3
with:
node-version: 18.x
- cache: "yarn"
+ cache: yarn
- run: yarn --frozen-lockfile
- name: Test
run: |
@@ -213,21 +186,17 @@ jobs:
integration-test:
runs-on: ubuntu-latest
steps:
- - name: Checkout repo and submodules
+ - name: Checkout repo
uses: actions/checkout@v3
- if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == 'Budibase/budibase'
with:
- submodules: true
+ submodules: ${{ env.IS_OSS_CONTRIBUTOR == 'false' }}
token: ${{ secrets.PERSONAL_ACCESS_TOKEN || github.token }}
- - name: Checkout repo only
- uses: actions/checkout@v3
- if: github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name != 'Budibase/budibase'
- name: Use Node.js 18.x
uses: actions/setup-node@v3
with:
node-version: 18.x
- cache: "yarn"
+ cache: yarn
- run: yarn --frozen-lockfile
- name: Build packages
run: yarn build --scope @budibase/server --scope @budibase/worker
diff --git a/.github/workflows/deploy-cloud.yaml b/.github/workflows/deploy-cloud.yaml
deleted file mode 100644
index 389b10f7d3..0000000000
--- a/.github/workflows/deploy-cloud.yaml
+++ /dev/null
@@ -1,48 +0,0 @@
-name: Budibase Deploy Production
-
-on:
- workflow_dispatch:
- inputs:
- version:
- description: Budibase release version. For example - 1.0.0
- required: false
-
-jobs:
- release:
- runs-on: ubuntu-latest
-
- steps:
- - name: Fail if not a tag
- run: |
- if [[ $GITHUB_REF != refs/tags/* ]]; then
- echo "Workflow Dispatch can only be run on tags"
- exit 1
- fi
- - uses: actions/checkout@v2
- with:
- fetch-depth: 0
-
- - name: Fail if tag is not in master
- run: |
- if ! git merge-base --is-ancestor ${{ github.sha }} origin/master; then
- echo "Tag is not in master. This pipeline can only execute tags that are present on the master branch"
- exit 1
- fi
-
- - name: Get the latest budibase release version
- id: version
- run: |
- if [ -z "${{ github.event.inputs.version }}" ]; then
- release_version=$(cat lerna.json | jq -r '.version')
- else
- release_version=${{ github.event.inputs.version }}
- fi
- echo "RELEASE_VERSION=$release_version" >> $GITHUB_ENV
-
- - uses: passeidireto/trigger-external-workflow-action@main
- env:
- PAYLOAD_VERSION: ${{ env.RELEASE_VERSION }}
- with:
- repository: budibase/budibase-deploys
- event: budicloud-prod-deploy
- github_pat: ${{ secrets.GH_ACCESS_TOKEN }}
diff --git a/.github/workflows/deploy-qa.yml b/.github/workflows/deploy-qa.yml
index a3fff65f35..1339ad2eb9 100644
--- a/.github/workflows/deploy-qa.yml
+++ b/.github/workflows/deploy-qa.yml
@@ -4,7 +4,6 @@ on:
push:
branches:
- master
- - BUDI-7641/push_v2_images_to_qa
workflow_dispatch:
jobs:
@@ -12,10 +11,12 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: peter-evans/repository-dispatch@v2
- env:
- PAYLOAD_VERSION: ${{ github.sha }}
- REF_NAME: ${{ github.ref_name}}
with:
repository: budibase/budibase-deploys
event-type: budicloud-qa-deploy
token: ${{ secrets.GH_ACCESS_TOKEN }}
+ client-payload: |-
+ {
+ "VERSION": "${{ github.sha }}",
+ "REF_NAME": "${{ github.ref_name}}"
+ }
diff --git a/.github/workflows/release-master.yml b/.github/workflows/release-master.yml
deleted file mode 100644
index 9ab8530341..0000000000
--- a/.github/workflows/release-master.yml
+++ /dev/null
@@ -1,130 +0,0 @@
-name: Budibase Release
-concurrency:
- group: release
- cancel-in-progress: false
-
-on:
- push:
- tags:
- - "[0-9]+.[0-9]+.[0-9]+"
- # Exclude all pre-releases
- - "!*[0-9]+.[0-9]+.[0-9]+-*"
-
-env:
- # Posthog token used by ui at build time
- POSTHOG_TOKEN: phc_bIjZL7oh2GEUd2vqvTBH8WvrX0fWTFQMs6H5KQxiUxU
- INTERCOM_TOKEN: ${{ secrets.INTERCOM_TOKEN }}
- PERSONAL_ACCESS_TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
-
-jobs:
- release-images:
- runs-on: ubuntu-latest
- steps:
- - uses: actions/checkout@v2
- with:
- submodules: true
- token: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
- fetch-depth: 0
-
- - name: Fail if tag is not in master
- run: |
- if ! git merge-base --is-ancestor ${{ github.sha }} origin/master; then
- echo "Tag is not in master. This pipeline can only execute tags that are present on the master branch"
- exit 1
- fi
-
- - uses: actions/setup-node@v1
- with:
- node-version: 18.x
-
- - run: yarn install --frozen-lockfile
- - name: Update versions
- run: ./scripts/updateVersions.sh
- - run: yarn lint
- - run: yarn build
- - run: yarn build:sdk
-
- - name: Publish budibase packages to NPM
- env:
- NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
- run: |
- # setup the username and email. I tend to use 'GitHub Actions Bot' with no email by default
- git config --global user.name "Budibase Release Bot"
- git config --global user.email "<>"
- git submodule foreach git commit -a -m 'Release process'
- git commit -a -m 'Release process'
- echo //registry.npmjs.org/:_authToken=${NPM_TOKEN} >> .npmrc
- yarn release
-
- - name: "Get Current tag"
- id: currenttag
- run: |
- version=$(./scripts/getCurrentVersion.sh)
- echo "Using tag $version"
- echo "version=$version" >> "$GITHUB_OUTPUT"
-
- - name: Build/release Docker images
- run: |
- docker login -u $DOCKER_USER -p $DOCKER_PASSWORD
- yarn build:docker
- env:
- DOCKER_USER: ${{ secrets.DOCKER_USERNAME }}
- DOCKER_PASSWORD: ${{ secrets.DOCKER_API_KEY }}
- BUDIBASE_RELEASE_VERSION: ${{ steps.currenttag.outputs.version }}
-
- release-helm-chart:
- needs: [release-images]
- runs-on: ubuntu-latest
- steps:
- - uses: actions/checkout@v2
- - name: Setup Helm
- uses: azure/setup-helm@v1
- id: helm-install
-
- - name: Get the latest budibase release version
- id: version
- run: |
- release_version=$(cat lerna.json | jq -r '.version')
- echo "RELEASE_VERSION=$release_version" >> $GITHUB_ENV
-
- # due to helm repo index issue: https://github.com/helm/helm/issues/7363
- # we need to create new package in a different dir, merge the index and move the package back
- - name: Build and release helm chart
- run: |
- git config user.name "Budibase Helm Bot"
- git config user.email "<>"
- git reset --hard
- git fetch
- mkdir sync
- echo "Packaging chart to sync dir"
- helm package charts/budibase --version 0.0.0-master --app-version "$RELEASE_VERSION" --destination sync
- echo "Packaging successful"
- git checkout gh-pages
- echo "Indexing helm repo"
- helm repo index --merge docs/index.yaml sync
- mv -f sync/* docs
- rm -rf sync
- echo "Pushing new helm release"
- git add -A
- git commit -m "Helm Release: ${{ env.RELEASE_VERSION }}"
- git push
-
- trigger-deploy-to-qa-env:
- needs: [release-helm-chart]
- runs-on: ubuntu-latest
- steps:
- - uses: actions/checkout@v2
- - name: Get the current budibase release version
- id: version
- run: |
- release_version=$(cat lerna.json | jq -r '.version')
- echo "RELEASE_VERSION=$release_version" >> $GITHUB_ENV
-
- - uses: passeidireto/trigger-external-workflow-action@main
- env:
- PAYLOAD_VERSION: ${{ env.RELEASE_VERSION }}
- REF_NAME: ${{ github.ref_name}}
- with:
- repository: budibase/budibase-deploys
- event: budicloud-qa-deploy
- github_pat: ${{ secrets.GH_ACCESS_TOKEN }}
diff --git a/.github/workflows/release-selfhost.yml b/.github/workflows/release-selfhost.yml
deleted file mode 100644
index d2689a0ea0..0000000000
--- a/.github/workflows/release-selfhost.yml
+++ /dev/null
@@ -1,125 +0,0 @@
-name: Budibase Release Selfhost
-
-on:
- workflow_dispatch:
-
-jobs:
- release:
- runs-on: ubuntu-latest
-
- steps:
- - name: Fail if not a tag
- run: |
- if [[ $GITHUB_REF != refs/tags/* ]]; then
- echo "Workflow Dispatch can only be run on tags"
- exit 1
- fi
-
- - uses: actions/checkout@v2
- with:
- submodules: true
- token: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
- fetch-depth: 0
-
- - name: Fail if tag is not in master
- run: |
- if ! git merge-base --is-ancestor ${{ github.sha }} origin/master; then
- echo "Tag is not in master. This pipeline can only execute tags that are present on the master branch"
- exit 1
- fi
-
- - name: Use Node.js 18.x
- uses: actions/setup-node@v1
- with:
- node-version: 18.x
-
- - name: Get the latest budibase release version
- id: version
- run: |
- release_version=$(cat lerna.json | jq -r '.version')
- echo "RELEASE_VERSION=$release_version" >> $GITHUB_ENV
-
- - name: Tag and release Docker images (Self Host)
- run: |
- docker login -u $DOCKER_USER -p $DOCKER_PASSWORD
-
- release_tag=${{ env.RELEASE_VERSION }}
-
- # Pull apps and worker images
- docker pull budibase/apps:$release_tag
- docker pull budibase/worker:$release_tag
- docker pull budibase/proxy:$release_tag
-
- # Tag apps and worker images
- docker tag budibase/apps:$release_tag budibase/apps:$SELFHOST_TAG
- docker tag budibase/worker:$release_tag budibase/worker:$SELFHOST_TAG
- docker tag budibase/proxy:$release_tag budibase/proxy:$SELFHOST_TAG
-
- # Push images
- docker push budibase/apps:$SELFHOST_TAG
- docker push budibase/worker:$SELFHOST_TAG
- docker push budibase/proxy:$SELFHOST_TAG
- env:
- DOCKER_USER: ${{ secrets.DOCKER_USERNAME }}
- DOCKER_PASSWORD: ${{ secrets.DOCKER_API_KEY }}
- SELFHOST_TAG: latest
-
- - name: Bootstrap and build (CLI)
- run: |
- yarn
- yarn build
-
- - name: Build OpenAPI spec
- run: |
- pushd packages/server
- yarn
- yarn specs
- popd
-
- - name: Setup Helm
- uses: azure/setup-helm@v1
- id: helm-install
-
- # due to helm repo index issue: https://github.com/helm/helm/issues/7363
- # we need to create new package in a different dir, merge the index and move the package back
- - name: Build and release helm chart
- run: |
- git config user.name "Budibase Helm Bot"
- git config user.email "<>"
- git reset --hard
- git fetch
- mkdir sync
- echo "Packaging chart to sync dir"
- helm package charts/budibase --version "$RELEASE_VERSION" --app-version "$RELEASE_VERSION" --destination sync
- echo "Packaging successful"
- git checkout gh-pages
- echo "Indexing helm repo"
- helm repo index --merge docs/index.yaml sync
- mv -f sync/* docs
- rm -rf sync
- echo "Pushing new helm release"
- git add -A
- git commit -m "Helm Release: ${{ env.RELEASE_VERSION }}"
- git push
- env:
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
-
- - name: Perform Github Release
- uses: softprops/action-gh-release@v1
- with:
- name: ${{ env.RELEASE_VERSION }}
- tag_name: ${{ env.RELEASE_VERSION }}
- generate_release_notes: true
- files: |
- packages/cli/build/cli-win.exe
- packages/cli/build/cli-linux
- packages/cli/build/cli-macos
- packages/server/specs/openapi.yaml
- packages/server/specs/openapi.json
-
- - name: Discord Webhook Action
- uses: tsickert/discord-webhook@v4.0.0
- with:
- webhook-url: ${{ secrets.PROD_DEPLOY_WEBHOOK_URL }}
- content: "Self Host Deployment Complete: ${{ env.RELEASE_VERSION }} deployed to Self Host."
- embed-title: ${{ env.RELEASE_VERSION }}
diff --git a/.github/workflows/release-singleimage-test.yml b/.github/workflows/release-singleimage-test.yml
deleted file mode 100644
index 79b9afdd44..0000000000
--- a/.github/workflows/release-singleimage-test.yml
+++ /dev/null
@@ -1,69 +0,0 @@
-name: Test
-
-on:
- workflow_dispatch:
-
-env:
- CI: true
- PERSONAL_ACCESS_TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
- REGISTRY_URL: registry.hub.docker.com
- NX_CLOUD_ACCESS_TOKEN: ${{ secrets.NX_CLOUD_ACCESS_TOKEN }}
-jobs:
- build:
- name: "build"
- runs-on: ubuntu-latest
- strategy:
- matrix:
- node-version: [18.x]
- steps:
- - name: "Checkout"
- uses: actions/checkout@v4
- with:
- submodules: true
- token: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
-
- - name: Use Node.js ${{ matrix.node-version }}
- uses: actions/setup-node@v3
- with:
- node-version: ${{ matrix.node-version }}
- cache: "yarn"
- - name: Setup QEMU
- uses: docker/setup-qemu-action@v3
- - name: Setup Docker Buildx
- id: buildx
- uses: docker/setup-buildx-action@v3
- - name: Run Yarn
- run: yarn
- - name: Run Yarn Build
- run: yarn build --scope @budibase/server --scope @budibase/worker
- - name: Login to Docker Hub
- uses: docker/login-action@v2
- with:
- username: ${{ secrets.DOCKER_USERNAME }}
- password: ${{ secrets.DOCKER_API_KEY }}
- - name: Get the latest release version
- id: version
- run: |
- release_version=$(cat lerna.json | jq -r '.version')
- echo $release_version
- echo "RELEASE_VERSION=$release_version" >> $GITHUB_ENV
- - name: Tag and release Budibase service docker image
- uses: docker/build-push-action@v5
- with:
- context: .
- push: true
- pull: true
- platforms: linux/amd64,linux/arm64
- tags: budibase/budibase-test:test
- file: ./hosting/single/Dockerfile.v2
- cache-from: type=registry,ref=budibase/budibase-test:test
- cache-to: type=inline
- - name: Tag and release Budibase Azure App Service docker image
- uses: docker/build-push-action@v2
- with:
- context: .
- push: true
- platforms: linux/amd64
- build-args: TARGETBUILD=aas
- tags: budibase/budibase-test:aas
- file: ./hosting/single/Dockerfile.v2
diff --git a/.github/workflows/release-singleimage.yml b/.github/workflows/release-singleimage.yml
deleted file mode 100644
index f7f87f6e4c..0000000000
--- a/.github/workflows/release-singleimage.yml
+++ /dev/null
@@ -1,79 +0,0 @@
-name: Deploy Budibase Single Container Image to DockerHub
-
-on:
- workflow_dispatch:
-
-env:
- CI: true
- PERSONAL_ACCESS_TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
- REGISTRY_URL: registry.hub.docker.com
-jobs:
- build:
- name: "build"
- runs-on: ubuntu-latest
- strategy:
- matrix:
- node-version: [18.x]
- steps:
- - name: Maximize build space
- uses: easimon/maximize-build-space@master
- with:
- root-reserve-mb: 30000
- swap-size-mb: 1024
- remove-android: "true"
- remove-dotnet: "true"
- - name: Fail if not a tag
- run: |
- if [[ $GITHUB_REF != refs/tags/* ]]; then
- echo "Workflow Dispatch can only be run on tags"
- exit 1
- fi
- - name: "Checkout"
- uses: actions/checkout@v2
- with:
- submodules: true
- token: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
-
- - name: Use Node.js ${{ matrix.node-version }}
- uses: actions/setup-node@v1
- with:
- node-version: ${{ matrix.node-version }}
- - name: Setup QEMU
- uses: docker/setup-qemu-action@v1
- - name: Setup Docker Buildx
- id: buildx
- uses: docker/setup-buildx-action@v1
- - name: Run Yarn
- run: yarn
- - name: Update versions
- run: ./scripts/updateVersions.sh
- - name: Run Yarn Build
- run: yarn build
- - name: Login to Docker Hub
- uses: docker/login-action@v2
- with:
- username: ${{ secrets.DOCKER_USERNAME }}
- password: ${{ secrets.DOCKER_API_KEY }}
- - name: Get the latest release version
- id: version
- run: |
- release_version=$(cat lerna.json | jq -r '.version')
- echo $release_version
- echo "RELEASE_VERSION=$release_version" >> $GITHUB_ENV
- - name: Tag and release Budibase service docker image
- uses: docker/build-push-action@v2
- with:
- context: .
- push: true
- platforms: linux/amd64,linux/arm64
- tags: budibase/budibase,budibase/budibase:${{ env.RELEASE_VERSION }}
- file: ./hosting/single/Dockerfile
- - name: Tag and release Budibase Azure App Service docker image
- uses: docker/build-push-action@v2
- with:
- context: .
- push: true
- platforms: linux/amd64
- build-args: TARGETBUILD=aas
- tags: budibase/budibase-aas,budibase/budibase-aas:${{ env.RELEASE_VERSION }}
- file: ./hosting/single/Dockerfile
diff --git a/.github/workflows/tag-release.yml b/.github/workflows/tag-release.yml
index eaf71ae61a..13d59d1019 100644
--- a/.github/workflows/tag-release.yml
+++ b/.github/workflows/tag-release.yml
@@ -1,4 +1,4 @@
-name: Tag release
+name: Release
concurrency:
group: tag-release
cancel-in-progress: false
@@ -19,6 +19,8 @@ on:
jobs:
tag-release:
runs-on: ubuntu-latest
+ outputs:
+ version: ${{ steps.tag-release.outputs.version }}
steps:
- name: Fail if branch is not master
@@ -33,6 +35,7 @@ jobs:
- run: cd scripts && yarn
- name: Tag release
+ id: tag-release
run: |
cd scripts
# setup the username and email.
@@ -41,3 +44,23 @@ jobs:
BUMP_TYPE_INPUT=${{ github.event.inputs.versioning }}
BUMP_TYPE=${BUMP_TYPE_INPUT:-"patch"}
./versionCommit.sh $BUMP_TYPE
+
+ cd ..
+ new_version=$(./scripts/getCurrentVersion.sh)
+ echo "version=$new_version" >> $GITHUB_OUTPUT
+
+ trigger-release:
+ needs: [tag-release]
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v2
+
+ - uses: peter-evans/repository-dispatch@v2
+ with:
+ repository: budibase/budibase-deploys
+ event-type: release-prod
+ token: ${{ secrets.GH_ACCESS_TOKEN }}
+ client-payload: |-
+ {
+ "TAG": "${{ needs.tag-release.outputs.version }}"
+ }
diff --git a/README.md b/README.md
index 9deb16cd4f..35b84a8816 100644
--- a/README.md
+++ b/README.md
@@ -1,6 +1,6 @@
-
+
@@ -126,13 +126,6 @@ You can learn more about the Budibase API at the following places:
- [Build an app with Budibase and Next.js](https://budibase.com/blog/building-a-crud-app-with-budibase-and-next.js/)
-
-
-
-
-
-
-
## 🏁 Get started
Deploy Budibase self-hosted in your existing infrastructure, using Docker, Kubernetes, and Digital Ocean.
diff --git a/eslint-local-rules/index.js b/eslint-local-rules/index.js
new file mode 100644
index 0000000000..af02599c90
--- /dev/null
+++ b/eslint-local-rules/index.js
@@ -0,0 +1,21 @@
+module.exports = {
+ "no-budibase-imports": {
+ create: function (context) {
+ return {
+ ImportDeclaration(node) {
+ const importPath = node.source.value
+
+ if (
+ /^@budibase\/[^/]+\/.*$/.test(importPath) &&
+ importPath !== "@budibase/backend-core/tests"
+ ) {
+ context.report({
+ node,
+ message: `Importing from @budibase is not allowed, except for @budibase/backend-core/tests.`,
+ })
+ }
+ },
+ }
+ },
+ },
+}
diff --git a/hosting/couchdb/build-target-paths.sh b/hosting/couchdb/build-target-paths.sh
index 67e1765ca8..34227011f4 100644
--- a/hosting/couchdb/build-target-paths.sh
+++ b/hosting/couchdb/build-target-paths.sh
@@ -2,8 +2,8 @@
echo ${TARGETBUILD} > /buildtarget.txt
if [[ "${TARGETBUILD}" = "aas" ]]; then
- # Azure AppService uses /home for persisent data & SSH on port 2222
- DATA_DIR=/home
+ # Azure AppService uses /home for persistent data & SSH on port 2222
+ DATA_DIR="${DATA_DIR:-/home}"
WEBSITES_ENABLE_APP_SERVICE_STORAGE=true
mkdir -p $DATA_DIR/{search,minio,couch}
mkdir -p $DATA_DIR/couch/{dbs,views}
diff --git a/hosting/docker-compose.build.yaml b/hosting/docker-compose.build.yaml
index e192620b59..7ead001a1c 100644
--- a/hosting/docker-compose.build.yaml
+++ b/hosting/docker-compose.build.yaml
@@ -7,6 +7,8 @@ services:
build:
context: ..
dockerfile: packages/server/Dockerfile.v2
+ args:
+ - BUDIBASE_VERSION=0.0.0+dev-docker
container_name: build-bbapps
environment:
SELF_HOSTED: 1
@@ -30,13 +32,13 @@ services:
depends_on:
- worker-service
- redis-service
- # volumes:
- # - /some/path/to/plugins:/plugins
worker-service:
build:
context: ..
dockerfile: packages/worker/Dockerfile.v2
+ args:
+ - BUDIBASE_VERSION=0.0.0+dev-docker
container_name: build-bbworker
environment:
SELF_HOSTED: 1
diff --git a/hosting/letsencrypt/nginx-ssl.conf b/hosting/letsencrypt/nginx-ssl.conf
index 50c5e0198a..b3f51e5cc5 100644
--- a/hosting/letsencrypt/nginx-ssl.conf
+++ b/hosting/letsencrypt/nginx-ssl.conf
@@ -2,16 +2,18 @@ server {
listen 443 ssl default_server;
listen [::]:443 ssl default_server;
server_name _;
- ssl_certificate /etc/letsencrypt/live/CUSTOM_DOMAIN/fullchain.pem;
- ssl_certificate_key /etc/letsencrypt/live/CUSTOM_DOMAIN/privkey.pem;
- include /etc/letsencrypt/options-ssl-nginx.conf;
- ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem;
-
+ error_log /dev/stderr warn;
+ access_log /dev/stdout main;
client_max_body_size 1000m;
ignore_invalid_headers off;
proxy_buffering off;
# port_in_redirect off;
+ ssl_certificate /etc/letsencrypt/live/CUSTOM_DOMAIN/fullchain.pem;
+ ssl_certificate_key /etc/letsencrypt/live/CUSTOM_DOMAIN/privkey.pem;
+ include /etc/letsencrypt/options-ssl-nginx.conf;
+ ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem;
+
location ^~ /.well-known/acme-challenge/ {
default_type "text/plain";
root /var/www/html;
@@ -47,6 +49,24 @@ server {
rewrite ^/worker/(.*)$ /$1 break;
}
+ location /api/backups/ {
+ # calls to export apps are limited
+ limit_req zone=ratelimit burst=20 nodelay;
+
+ # 1800s timeout for app export requests
+ proxy_read_timeout 1800s;
+ proxy_connect_timeout 1800s;
+ proxy_send_timeout 1800s;
+
+ proxy_http_version 1.1;
+ proxy_set_header Connection $connection_upgrade;
+ proxy_set_header Upgrade $http_upgrade;
+ proxy_set_header X-Real-IP $remote_addr;
+ proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
+
+ proxy_pass http://127.0.0.1:4001;
+ }
+
location /api/ {
# calls to the API are rate limited with bursting
limit_req zone=ratelimit burst=20 nodelay;
@@ -70,18 +90,49 @@ server {
rewrite ^/db/(.*)$ /$1 break;
}
+ location /socket/ {
+ proxy_http_version 1.1;
+ proxy_set_header Upgrade $http_upgrade;
+ proxy_set_header Connection 'upgrade';
+ proxy_set_header Host $host;
+ proxy_cache_bypass $http_upgrade;
+ proxy_pass http://127.0.0.1:4001;
+ }
+
location / {
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
+ proxy_set_header Host $http_host;
proxy_connect_timeout 300;
proxy_http_version 1.1;
proxy_set_header Connection "";
chunked_transfer_encoding off;
+
proxy_pass http://127.0.0.1:9000;
}
+ location /files/signed/ {
+ proxy_set_header X-Real-IP $remote_addr;
+ proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
+ proxy_set_header X-Forwarded-Proto $scheme;
+
+ # IMPORTANT: Signed urls will inspect the host header of the request.
+ # Normally a signed url will need to be generated with a specified client host in mind.
+ # To support dynamic hosts, e.g. some unknown self-hosted installation url,
+ # use a predefined host header. The host 'minio-service' is also used at the time of url signing.
+ proxy_set_header Host minio-service;
+
+ proxy_connect_timeout 300;
+ proxy_http_version 1.1;
+ proxy_set_header Connection "";
+ chunked_transfer_encoding off;
+
+ proxy_pass http://127.0.0.1:9000;
+ rewrite ^/files/signed/(.*)$ /$1 break;
+ }
+
client_header_timeout 60;
client_body_timeout 60;
keepalive_timeout 60;
diff --git a/hosting/proxy/error.html b/hosting/proxy/error.html
index 023c1ebaff..545d6c7f6d 100644
--- a/hosting/proxy/error.html
+++ b/hosting/proxy/error.html
@@ -57,8 +57,8 @@
--spectrum-global-color-gray-600: rgb(144,144,144);
--spectrum-global-color-gray-900: rgb(255,255,255);
--spectrum-global-color-gray-800: rgb(227,227,227);
- --spectrum-global-color-static-blue-600: rgb(20,115,230);
- --spectrum-global-color-static-blue-hover: rgb( 18, 103, 207);
+ --bb-indigo: #6E56FF;
+ --bb-indigo-light: #9F8FFF;
}
html, body {
@@ -90,15 +90,8 @@
.info {
display: flex;
flex-direction: column;
- align-items: left;
+ align-items: flex-start;
}
-
- @media only screen and (max-width: 600px) {
- .info {
- align-items: center;
- }
- }
-
.status {
color: var(--spectrum-global-color-gray-600)
}
@@ -113,13 +106,14 @@
.buttons {
display: flex;
flex-direction: row;
+ justify-content: flex-start;
margin-top: 15px;
}
.homeButton {
- background-color: var(--spectrum-global-color-static-blue-600);
+ background-color: var(--bb-indigo);
}
.homeButton:hover {
- background-color: var(--spectrum-global-color-static-blue-hover);
+ background-color: var(--bb-indigo-light);
}
.statusButton {
background-color: transparent;
@@ -127,20 +121,30 @@
border: none;
}
.hero {
- height: 160px;
- width: 160px;
- margin-right: 80px;
+ height: 60px;
+ margin: 10px 40px 10px 0;
+ }
+ .hero img {
+ height: 100%;
}
.content {
display: flex;
flex-direction: row;
- align-items: flex-end;
+ align-items: center;
justify-content: center;
+ padding: 0 40px;
+ }
+ h1 {
+ margin-bottom: 10px;
+ }
+ h3 {
+ margin-top: 0;
}
@media only screen and (max-width: 600px) {
.content {
flex-direction: column;
+ align-items: flex-start;
}
}
@@ -152,16 +156,15 @@
-
+
-
+
Houston we have a problem!
-
-
+
diff --git a/packages/bbui/src/Form/Core/TextArea.svelte b/packages/bbui/src/Form/Core/TextArea.svelte
index 465212cd44..be7eed466d 100644
--- a/packages/bbui/src/Form/Core/TextArea.svelte
+++ b/packages/bbui/src/Form/Core/TextArea.svelte
@@ -5,6 +5,7 @@
export let value = ""
export let placeholder = null
export let disabled = false
+ export let readonly = false
export let error = null
export let id = null
export let height = null
@@ -61,6 +62,7 @@
class="spectrum-Textfield-input"
style={align ? `text-align: ${align}` : ""}
{disabled}
+ {readonly}
{id}
on:focus={() => (focus = true)}
on:blur={onChange}
diff --git a/packages/bbui/src/Form/DatePicker.svelte b/packages/bbui/src/Form/DatePicker.svelte
index 04ce8b5467..f17871a576 100644
--- a/packages/bbui/src/Form/DatePicker.svelte
+++ b/packages/bbui/src/Form/DatePicker.svelte
@@ -7,6 +7,7 @@
export let label = null
export let labelPosition = "above"
export let disabled = false
+ export let readonly = false
export let error = null
export let enableTime = true
export let timeOnly = false
@@ -33,6 +34,7 @@
{
if (mde && val !== latestValue) {
@@ -54,6 +58,7 @@
easyMDEOptions={{
initialValue: value,
placeholder,
+ toolbar: disabled || readonly ? false : undefined,
...easyMDEOptions,
}}
/>
diff --git a/packages/bbui/src/Table/Table.svelte b/packages/bbui/src/Table/Table.svelte
index 529d1144ee..2610d6106c 100644
--- a/packages/bbui/src/Table/Table.svelte
+++ b/packages/bbui/src/Table/Table.svelte
@@ -106,6 +106,13 @@
name: fieldName,
}
}
+
+ // Delete numeric only widths as these are grid widths and should be
+ // ignored
+ const width = fixedSchema[fieldName].width
+ if (width != null && `${width}`.trim().match(/^[0-9]+$/)) {
+ delete fixedSchema[fieldName].width
+ }
})
return fixedSchema
}
diff --git a/packages/bbui/src/bbui.css b/packages/bbui/src/bbui.css
index 343aa77b27..9b5d89f61c 100644
--- a/packages/bbui/src/bbui.css
+++ b/packages/bbui/src/bbui.css
@@ -2,6 +2,15 @@
--background: #ffffff;
--ink: #000000;
+ /* Brand colours */
+ --bb-coral: #FF4E4E;
+ --bb-coral-light: #F97777;
+ --bb-indigo: #6E56FF;
+ --bb-indigo-light: #9F8FFF;
+ --bb-lime: #ECFFB5;
+ --bb-forest-green: #053835;
+ --bb-beige: #F6EFEA;
+
--grey-1: #fafafa;
--grey-2: #f5f5f5;
--grey-3: #eeeeee;
diff --git a/packages/builder/.gitignore b/packages/builder/.gitignore
index e5c961d509..abc5671984 100644
--- a/packages/builder/.gitignore
+++ b/packages/builder/.gitignore
@@ -5,4 +5,5 @@ package-lock.json
release/
dist/
routify
-.routify/
\ No newline at end of file
+.routify/
+svelte.config.js
\ No newline at end of file
diff --git a/packages/builder/assets/bb-emblem.svg b/packages/builder/assets/bb-emblem.svg
index 7d499e4862..26d09cc97f 100644
--- a/packages/builder/assets/bb-emblem.svg
+++ b/packages/builder/assets/bb-emblem.svg
@@ -1,80 +1,13 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
diff --git a/packages/builder/assets/bb-space-black.svg b/packages/builder/assets/bb-space-black.svg
deleted file mode 100644
index fa1743f90c..0000000000
--- a/packages/builder/assets/bb-space-black.svg
+++ /dev/null
@@ -1,18 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/packages/builder/assets/bb-space-purple.svg b/packages/builder/assets/bb-space-purple.svg
deleted file mode 100644
index ccfb8b220d..0000000000
--- a/packages/builder/assets/bb-space-purple.svg
+++ /dev/null
@@ -1,25 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/packages/builder/public/bblogo.png b/packages/builder/public/bblogo.png
index 8c89c12f19..aa5ee4466e 100644
Binary files a/packages/builder/public/bblogo.png and b/packages/builder/public/bblogo.png differ
diff --git a/packages/builder/src/builderStore/componentUtils.js b/packages/builder/src/builderStore/componentUtils.js
index 16b972058e..522dbae416 100644
--- a/packages/builder/src/builderStore/componentUtils.js
+++ b/packages/builder/src/builderStore/componentUtils.js
@@ -5,6 +5,7 @@ import {
encodeJSBinding,
findHBSBlocks,
} from "@budibase/string-templates"
+import { capitalise } from "helpers"
/**
* Recursively searches for a specific component ID
@@ -235,3 +236,13 @@ export const makeComponentUnique = component => {
// Recurse on all children
return JSON.parse(definition)
}
+
+export const getComponentText = component => {
+ if (component?._instanceName) {
+ return component._instanceName
+ }
+ const type =
+ component._component.replace("@budibase/standard-components/", "") ||
+ "component"
+ return capitalise(type)
+}
diff --git a/packages/builder/src/builderStore/store/automation/index.js b/packages/builder/src/builderStore/store/automation/index.js
index c22240370b..ba2458f414 100644
--- a/packages/builder/src/builderStore/store/automation/index.js
+++ b/packages/builder/src/builderStore/store/automation/index.js
@@ -3,6 +3,7 @@ import { API } from "api"
import { cloneDeep } from "lodash/fp"
import { generate } from "shortid"
import { selectedAutomation } from "builderStore"
+import { notifications } from "@budibase/bbui"
const initialAutomationState = {
automations: [],
@@ -21,6 +22,37 @@ export const getAutomationStore = () => {
return store
}
+const updateReferencesInObject = (obj, modifiedIndex, action) => {
+ const regex = /{{\s*steps\.(\d+)\./g
+ for (const key in obj) {
+ if (typeof obj[key] === "string") {
+ let matches
+ while ((matches = regex.exec(obj[key])) !== null) {
+ const referencedStep = parseInt(matches[1])
+ if (action === "add" && referencedStep >= modifiedIndex) {
+ obj[key] = obj[key].replace(
+ `{{ steps.${referencedStep}.`,
+ `{{ steps.${referencedStep + 1}.`
+ )
+ } else if (action === "delete" && referencedStep > modifiedIndex) {
+ obj[key] = obj[key].replace(
+ `{{ steps.${referencedStep}.`,
+ `{{ steps.${referencedStep - 1}.`
+ )
+ }
+ }
+ } else if (typeof obj[key] === "object" && obj[key] !== null) {
+ updateReferencesInObject(obj[key], modifiedIndex, action)
+ }
+ }
+}
+
+const updateStepReferences = (steps, modifiedIndex, action) => {
+ steps.forEach(step => {
+ updateReferencesInObject(step.inputs, modifiedIndex, action)
+ })
+}
+
const automationActions = store => ({
definitions: async () => {
const response = await API.getAutomationDefinitions()
@@ -218,10 +250,40 @@ const automationActions = store => ({
if (!automation) {
return
}
+
+ try {
+ updateStepReferences(newAutomation.definition.steps, blockIdx, "add")
+ } catch (e) {
+ notifications.error("Error adding automation block")
+ }
newAutomation.definition.steps.splice(blockIdx, 0, block)
await store.actions.save(newAutomation)
},
- deleteAutomationBlock: async block => {
+ saveAutomationName: async (blockId, name) => {
+ const automation = get(selectedAutomation)
+ let newAutomation = cloneDeep(automation)
+ if (!automation) {
+ return
+ }
+ newAutomation.definition.stepNames = {
+ ...newAutomation.definition.stepNames,
+ [blockId]: name.trim(),
+ }
+
+ await store.actions.save(newAutomation)
+ },
+ deleteAutomationName: async blockId => {
+ const automation = get(selectedAutomation)
+ let newAutomation = cloneDeep(automation)
+ if (!automation) {
+ return
+ }
+ delete newAutomation.definition.stepNames[blockId]
+
+ await store.actions.save(newAutomation)
+ },
+
+ deleteAutomationBlock: async (block, blockIdx) => {
const automation = get(selectedAutomation)
let newAutomation = cloneDeep(automation)
@@ -233,7 +295,14 @@ const automationActions = store => ({
newAutomation.definition.steps = newAutomation.definition.steps.filter(
step => step.id !== block.id
)
+ delete newAutomation.definition.stepNames?.[block.id]
}
+ try {
+ updateStepReferences(newAutomation.definition.steps, blockIdx, "delete")
+ } catch (e) {
+ notifications.error("Error deleting automation block")
+ }
+
await store.actions.save(newAutomation)
},
replace: async (automationId, automation) => {
diff --git a/packages/builder/src/builderStore/store/frontend.js b/packages/builder/src/builderStore/store/frontend.js
index a567caf87f..a4729b4a8a 100644
--- a/packages/builder/src/builderStore/store/frontend.js
+++ b/packages/builder/src/builderStore/store/frontend.js
@@ -580,7 +580,7 @@ export const getFrontendStore = () => {
let table = validTables.find(table => {
return (
table.sourceId !== BUDIBASE_INTERNAL_DB_ID &&
- table.type === DB_TYPE_INTERNAL
+ table.sourceType === DB_TYPE_INTERNAL
)
})
if (table) {
@@ -591,7 +591,7 @@ export const getFrontendStore = () => {
table = validTables.find(table => {
return (
table.sourceId === BUDIBASE_INTERNAL_DB_ID &&
- table.type === DB_TYPE_INTERNAL
+ table.sourceType === DB_TYPE_INTERNAL
)
})
if (table) {
@@ -599,7 +599,7 @@ export const getFrontendStore = () => {
}
// Finally try an external table
- return validTables.find(table => table.type === DB_TYPE_EXTERNAL)
+ return validTables.find(table => table.sourceType === DB_TYPE_EXTERNAL)
},
enrichEmptySettings: (component, opts) => {
if (!component?._component) {
diff --git a/packages/builder/src/builderStore/store/screenTemplates/rowListScreen.js b/packages/builder/src/builderStore/store/screenTemplates/rowListScreen.js
index b17bd99e10..59bcd0d5e8 100644
--- a/packages/builder/src/builderStore/store/screenTemplates/rowListScreen.js
+++ b/packages/builder/src/builderStore/store/screenTemplates/rowListScreen.js
@@ -2,14 +2,14 @@ import sanitizeUrl from "./utils/sanitizeUrl"
import { Screen } from "./utils/Screen"
import { Component } from "./utils/Component"
-export default function (datasources) {
+export default function (datasources, mode = "table") {
if (!Array.isArray(datasources)) {
return []
}
return datasources.map(datasource => {
return {
name: `${datasource.label} - List`,
- create: () => createScreen(datasource),
+ create: () => createScreen(datasource, mode),
id: ROW_LIST_TEMPLATE,
resourceId: datasource.resourceId,
}
@@ -40,10 +40,24 @@ const generateTableBlock = datasource => {
return tableBlock
}
-const createScreen = datasource => {
+const generateGridBlock = datasource => {
+ const gridBlock = new Component("@budibase/standard-components/gridblock")
+ gridBlock
+ .customProps({
+ table: datasource,
+ })
+ .instanceName(`${datasource.label} - Grid block`)
+ return gridBlock
+}
+
+const createScreen = (datasource, mode) => {
return new Screen()
.route(rowListUrl(datasource))
.instanceName(`${datasource.label} - List`)
- .addChild(generateTableBlock(datasource))
+ .addChild(
+ mode === "table"
+ ? generateTableBlock(datasource)
+ : generateGridBlock(datasource)
+ )
.json()
}
diff --git a/packages/builder/src/components/automation/AutomationBuilder/FlowChart/FlowChart.svelte b/packages/builder/src/components/automation/AutomationBuilder/FlowChart/FlowChart.svelte
index 63a3478ef3..54e098c9d5 100644
--- a/packages/builder/src/components/automation/AutomationBuilder/FlowChart/FlowChart.svelte
+++ b/packages/builder/src/components/automation/AutomationBuilder/FlowChart/FlowChart.svelte
@@ -5,13 +5,7 @@
import TestDataModal from "./TestDataModal.svelte"
import { flip } from "svelte/animate"
import { fly } from "svelte/transition"
- import {
- Heading,
- Icon,
- ActionButton,
- notifications,
- Modal,
- } from "@budibase/bbui"
+ import { Icon, notifications, Modal } from "@budibase/bbui"
import { ActionStepID } from "constants/backend/automations"
import UndoRedoControl from "components/common/UndoRedoControl.svelte"
import { automationHistoryStore } from "builderStore"
@@ -20,9 +14,8 @@
let testDataModal
let confirmDeleteDialog
-
- $: blocks = getBlocks(automation)
-
+ let scrolling = false
+ $: blocks = getBlocks(automation).filter(x => x.stepId !== ActionStepID.LOOP)
const getBlocks = automation => {
let blocks = []
if (automation.definition.trigger) {
@@ -32,58 +25,71 @@
return blocks
}
- async function deleteAutomation() {
+ const deleteAutomation = async () => {
try {
await automationStore.actions.delete($selectedAutomation)
} catch (error) {
notifications.error("Error deleting automation")
}
}
+
+ const handleScroll = e => {
+ if (e.target.scrollTop >= 30) {
+ scrolling = true
+ } else if (e.target.scrollTop) {
+ // Set scrolling back to false if scrolled back to less than 100px
+ scrolling = false
+ }
+ }
-
-