From 5669e82277b41ad2a30c7141f28d404919bf03ff Mon Sep 17 00:00:00 2001 From: Jonny McCullagh Date: Tue, 15 Aug 2023 10:59:46 +0100 Subject: [PATCH 01/14] adoptjdk repo has changed to adoptium (#11521) --- hosting/couchdb/Dockerfile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/hosting/couchdb/Dockerfile b/hosting/couchdb/Dockerfile index 70b4413859..ce77002052 100644 --- a/hosting/couchdb/Dockerfile +++ b/hosting/couchdb/Dockerfile @@ -5,11 +5,11 @@ ENV COUCHDB_PASSWORD admin EXPOSE 5984 RUN apt-get update && apt-get install -y --no-install-recommends software-properties-common wget unzip curl && \ - wget -qO - https://adoptopenjdk.jfrog.io/adoptopenjdk/api/gpg/key/public | apt-key add - && \ + wget -O - https://packages.adoptium.net/artifactory/api/gpg/key/public | sudo apt-key add - && \ apt-add-repository 'deb http://security.debian.org/debian-security bullseye-security/updates main' && \ apt-add-repository 'deb http://archive.debian.org/debian stretch-backports main' && \ - apt-add-repository --yes https://adoptopenjdk.jfrog.io/adoptopenjdk/deb/ && \ - apt-get update && apt-get install -y --no-install-recommends adoptopenjdk-8-hotspot && \ + apt-add-repository 'deb https://packages.adoptium.net/artifactory/deb bullseye main' && \ + apt-get update && apt-get install -y --no-install-recommends temurin-8-jdk && \ rm -rf /var/lib/apt/lists/ # setup clouseau From f0ee662d32e9283f5bf842ff0c3f94e58f8dd42e Mon Sep 17 00:00:00 2001 From: Martin McKeaveney Date: Wed, 16 Aug 2023 17:17:05 +0100 Subject: [PATCH 02/14] adding offline mode to .env --- hosting/docker-compose.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hosting/docker-compose.yaml b/hosting/docker-compose.yaml index bad34a20ea..b3887c15fa 100644 --- a/hosting/docker-compose.yaml +++ b/hosting/docker-compose.yaml @@ -27,6 +27,7 @@ services: BB_ADMIN_USER_EMAIL: ${BB_ADMIN_USER_EMAIL} BB_ADMIN_USER_PASSWORD: ${BB_ADMIN_USER_PASSWORD} PLUGINS_DIR: ${PLUGINS_DIR} + OFFLINE_MODE: ${OFFLINE_MODE} depends_on: - worker-service - redis-service @@ -54,6 +55,7 @@ services: INTERNAL_API_KEY: ${INTERNAL_API_KEY} REDIS_URL: redis-service:6379 REDIS_PASSWORD: ${REDIS_PASSWORD} + OFFLINE_MODE: ${OFFLINE_MODE} depends_on: - redis-service - minio-service From 8576f165836d6b38320bf6a86b85c25485acbd31 Mon Sep 17 00:00:00 2001 From: Budibase Staging Release Bot <> Date: Wed, 16 Aug 2023 21:07:29 +0000 Subject: [PATCH 03/14] Bump version to 2.9.26 --- lerna.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lerna.json b/lerna.json index d00419f904..708cc9da5f 100644 --- a/lerna.json +++ b/lerna.json @@ -1,5 +1,5 @@ { - "version": "2.9.26-alpha.2", + "version": "2.9.26", "npmClient": "yarn", "packages": [ "packages/*" From 6d40a54fd533d6516f5de93b3fb535719526171a Mon Sep 17 00:00:00 2001 From: melohagan <101575380+melohagan@users.noreply.github.com> Date: Thu, 17 Aug 2023 10:10:52 +0100 Subject: [PATCH 04/14] Only get definition for given schema (#11532) --- .vscode/launch.json | 2 -- .../server/src/integrations/microsoftSqlServer.ts | 12 +++++++----- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.vscode/launch.json b/.vscode/launch.json index 6c0089bb6b..15fc7dcf6e 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -8,7 +8,6 @@ "name": "Budibase Server", "type": "node", "request": "launch", - "runtimeVersion": "14.20.1", "runtimeArgs": ["--nolazy", "-r", "ts-node/register/transpile-only"], "args": ["${workspaceFolder}/packages/server/src/index.ts"], "cwd": "${workspaceFolder}/packages/server" @@ -17,7 +16,6 @@ "name": "Budibase Worker", "type": "node", "request": "launch", - "runtimeVersion": "14.20.1", "runtimeArgs": ["--nolazy", "-r", "ts-node/register/transpile-only"], "args": ["${workspaceFolder}/packages/worker/src/index.ts"], "cwd": "${workspaceFolder}/packages/worker" diff --git a/packages/server/src/integrations/microsoftSqlServer.ts b/packages/server/src/integrations/microsoftSqlServer.ts index 2669277512..cd62e590d8 100644 --- a/packages/server/src/integrations/microsoftSqlServer.ts +++ b/packages/server/src/integrations/microsoftSqlServer.ts @@ -341,10 +341,10 @@ class SqlServerIntegration extends Sql implements DatasourcePlus { } } - getDefinitionSQL(tableName: string) { + getDefinitionSQL(tableName: string, schemaName: string) { return `select * from INFORMATION_SCHEMA.COLUMNS - where TABLE_NAME='${tableName}'` + where TABLE_NAME='${tableName}' AND TABLE_SCHEMA='${schemaName}'` } getConstraintsSQL(tableName: string) { @@ -388,16 +388,18 @@ class SqlServerIntegration extends Sql implements DatasourcePlus { throw "Unable to get list of tables in database" } - const schema = this.config.schema || DEFAULT_SCHEMA + const schemaName = this.config.schema || DEFAULT_SCHEMA const tableNames = tableInfo - .filter((record: any) => record.TABLE_SCHEMA === schema) + .filter((record: any) => record.TABLE_SCHEMA === schemaName) .map((record: any) => record.TABLE_NAME) .filter((name: string) => this.MASTER_TABLES.indexOf(name) === -1) const tables: Record = {} for (let tableName of tableNames) { // get the column definition (type) - const definition = await this.runSQL(this.getDefinitionSQL(tableName)) + const definition = await this.runSQL( + this.getDefinitionSQL(tableName, schemaName) + ) // find primary key constraints const constraints = await this.runSQL(this.getConstraintsSQL(tableName)) // find the computed and identity columns (auto columns) From 6ec948907e90b2189bd8fe02124363c4c8db51c0 Mon Sep 17 00:00:00 2001 From: Budibase Staging Release Bot <> Date: Thu, 17 Aug 2023 09:11:10 +0000 Subject: [PATCH 05/14] Bump version to 2.9.26-alpha.3 --- lerna.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lerna.json b/lerna.json index d00419f904..c23b30da74 100644 --- a/lerna.json +++ b/lerna.json @@ -1,5 +1,5 @@ { - "version": "2.9.26-alpha.2", + "version": "2.9.26-alpha.3", "npmClient": "yarn", "packages": [ "packages/*" From 07da8a5e0f69bc998b2626fc68f80006ee01d8fc Mon Sep 17 00:00:00 2001 From: Jonny McCullagh Date: Thu, 17 Aug 2023 10:14:09 +0100 Subject: [PATCH 06/14] remove enabled from probe values.yaml (#11546) --- charts/budibase/values.yaml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/charts/budibase/values.yaml b/charts/budibase/values.yaml index e5ce4f53fd..e5f1eabb53 100644 --- a/charts/budibase/values.yaml +++ b/charts/budibase/values.yaml @@ -137,7 +137,6 @@ services: path: /health port: 10000 scheme: HTTP - enabled: true periodSeconds: 3 failureThreshold: 1 livenessProbe: @@ -170,7 +169,6 @@ services: path: /health port: 4002 scheme: HTTP - enabled: true periodSeconds: 3 failureThreshold: 1 livenessProbe: @@ -204,7 +202,6 @@ services: path: /health port: 4003 scheme: HTTP - enabled: true periodSeconds: 3 failureThreshold: 1 livenessProbe: @@ -411,14 +408,12 @@ couchdb: ## Ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-probes/#configure-probes # FOR COUCHDB livenessProbe: - enabled: true failureThreshold: 3 initialDelaySeconds: 0 periodSeconds: 10 successThreshold: 1 timeoutSeconds: 1 readinessProbe: - enabled: true failureThreshold: 3 initialDelaySeconds: 0 periodSeconds: 10 From 2fab9a3ded83ae0a308de338c0d013023c95c200 Mon Sep 17 00:00:00 2001 From: Budibase Staging Release Bot <> Date: Thu, 17 Aug 2023 09:14:28 +0000 Subject: [PATCH 07/14] Bump version to 2.9.27 --- lerna.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lerna.json b/lerna.json index 708cc9da5f..d64c4c2b1b 100644 --- a/lerna.json +++ b/lerna.json @@ -1,5 +1,5 @@ { - "version": "2.9.26", + "version": "2.9.27", "npmClient": "yarn", "packages": [ "packages/*" From fd099658a069e17f5247586940ae648c9172dbae Mon Sep 17 00:00:00 2001 From: Martin McKeaveney Date: Thu, 17 Aug 2023 10:28:15 +0100 Subject: [PATCH 08/14] revert develop into master --- .github/workflows/budibase_ci.yml | 113 +-- .../workflows/check_unreleased_changes.yml | 29 - .github/workflows/release-develop.yml | 2 +- .nvmrc | 2 +- .tool-versions | 4 +- .vscode/launch.json | 72 +- docs/CONTRIBUTING.md | 2 +- hosting/single/Dockerfile | 4 +- package.json | 4 +- .../backend-core/src/security/permissions.ts | 4 + .../core/utilities/testContainerUtils.ts | 2 +- .../actions/ChangeFormStep.svelte | 10 +- .../controls/FilterEditor/FilterDrawer.svelte | 11 +- packages/client/manifest.json | 9 - .../src/components/app/forms/Form.svelte | 11 +- .../src/components/app/forms/InnerForm.svelte | 2 +- packages/server/Dockerfile | 4 +- packages/server/package.json | 2 +- packages/server/scripts/test.sh | 5 +- .../server/src/api/controllers/query/index.ts | 4 +- .../src/api/controllers/row/external.ts | 13 +- .../server/src/api/controllers/row/index.ts | 7 +- .../src/api/controllers/row/internal.ts | 23 +- .../server/src/api/controllers/row/utils.ts | 17 +- .../server/src/api/controllers/row/views.ts | 78 ++- .../src/api/controllers/table/external.ts | 20 +- .../server/src/api/controllers/table/index.ts | 4 +- .../src/api/controllers/table/internal.ts | 35 +- .../server/src/api/controllers/table/utils.ts | 2 +- packages/server/src/api/routes/row.ts | 170 +++-- .../server/src/api/routes/tests/row.spec.ts | 656 +++++++++--------- .../src/api/routes/tests/viewV2.spec.ts | 18 +- packages/server/src/api/routes/view.ts | 2 +- .../tests/{filter.spec.ts => filter.spec.js} | 23 +- packages/server/src/db/utils.ts | 17 +- packages/server/src/integrations/mysql.ts | 66 +- packages/server/src/middleware/noViewData.ts | 9 + .../src/middleware/tests/noViewData.spec.ts | 83 +++ .../middleware/tests/trimViewRowInfo.spec.ts | 27 +- .../server/src/middleware/trimViewRowInfo.ts | 33 +- packages/server/src/sdk/app/rows/search.ts | 16 +- .../src/sdk/app/rows/search/external.ts | 3 +- .../src/sdk/app/rows/search/internal.ts | 4 +- .../app/rows/search/tests/external.spec.ts | 11 +- .../app/rows/search/tests/internal.spec.ts | 3 +- packages/server/src/sdk/app/views/index.ts | 49 +- .../src/sdk/app/views/tests/views.spec.ts | 383 ++-------- .../server/src/tests/utilities/api/row.ts | 37 +- .../server/src/tests/utilities/api/viewV2.ts | 74 +- packages/server/src/threads/definitions.ts | 6 - packages/server/src/threads/query.ts | 8 +- packages/server/src/utilities/security.ts | 8 +- packages/shared-core/package.json | 11 - packages/shared-core/src/filters.ts | 86 ++- packages/shared-core/tsconfig.build.json | 2 +- packages/types/src/api/web/app/rows.ts | 13 +- packages/types/src/api/web/app/table.ts | 12 +- packages/types/src/api/web/index.ts | 1 - packages/types/src/api/web/searchFilter.ts | 51 -- packages/types/src/documents/app/view.ts | 7 +- packages/types/src/documents/document.ts | 6 - packages/types/src/sdk/datasources.ts | 6 - packages/types/src/sdk/index.ts | 1 - packages/types/src/sdk/permissions.ts | 1 + packages/types/src/sdk/row.ts | 16 - packages/worker/Dockerfile | 2 +- .../validators/dynamodb.integration.spec.ts | 4 +- scripts/build.js | 1 + yarn.lock | 30 +- 69 files changed, 1035 insertions(+), 1416 deletions(-) delete mode 100644 .github/workflows/check_unreleased_changes.yml rename packages/server/src/automations/tests/{filter.spec.ts => filter.spec.js} (76%) create mode 100644 packages/server/src/middleware/noViewData.ts create mode 100644 packages/server/src/middleware/tests/noViewData.spec.ts delete mode 100644 packages/types/src/api/web/searchFilter.ts delete mode 100644 packages/types/src/sdk/row.ts diff --git a/.github/workflows/budibase_ci.yml b/.github/workflows/budibase_ci.yml index 6cdfba068b..9da52f8bc0 100644 --- a/.github/workflows/budibase_ci.yml +++ b/.github/workflows/budibase_ci.yml @@ -18,8 +18,6 @@ env: BRANCH: ${{ github.event.pull_request.head.ref }} 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'}} jobs: lint: @@ -27,20 +25,20 @@ jobs: steps: - name: Checkout repo and submodules uses: actions/checkout@v3 - if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == 'Budibase/budibase' + if: github.repository == 'Budibase/budibase' with: submodules: true 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' + if: github.repository != 'Budibase/budibase' - - name: Use Node.js 18.x + - name: Use Node.js 14.x uses: actions/setup-node@v3 with: - node-version: 18.x + node-version: 14.x cache: "yarn" - - run: yarn --frozen-lockfile + - run: yarn - run: yarn lint build: @@ -48,66 +46,45 @@ jobs: steps: - name: Checkout repo and submodules uses: actions/checkout@v3 - if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == 'Budibase/budibase' + if: github.repository == 'Budibase/budibase' with: submodules: true 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 + if: github.repository != 'Budibase/budibase' - - name: Use Node.js 18.x + - name: Use Node.js 14.x uses: actions/setup-node@v3 with: - node-version: 18.x + node-version: 14.x cache: "yarn" - - run: yarn --frozen-lockfile - + - run: yarn # Run build all the projects - - name: Build - run: | - yarn build + - run: yarn build # Check the types of the projects built via esbuild - - name: Check types - run: | - if ${{ env.USE_NX_AFFECTED }}; then - yarn check:types --since=${{ env.NX_BASE_BRANCH }} - else - yarn check:types - fi + - run: yarn check:types test-libraries: runs-on: ubuntu-latest steps: - name: Checkout repo and submodules uses: actions/checkout@v3 - if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == 'Budibase/budibase' + if: github.repository == 'Budibase/budibase' with: submodules: true 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 + if: github.repository != 'Budibase/budibase' - - name: Use Node.js 18.x + - name: Use Node.js 14.x uses: actions/setup-node@v3 with: - node-version: 18.x + node-version: 14.x cache: "yarn" - - run: yarn --frozen-lockfile - - name: Test - run: | - if ${{ env.USE_NX_AFFECTED }}; then - yarn test --ignore=@budibase/worker --ignore=@budibase/server --ignore=@budibase/pro --since=${{ env.NX_BASE_BRANCH }} - else - yarn test --ignore=@budibase/worker --ignore=@budibase/server --ignore=@budibase/pro - fi + - run: yarn + - run: yarn test --ignore=@budibase/worker --ignore=@budibase/server --ignore=@budibase/pro - uses: codecov/codecov-action@v3 with: token: ${{ secrets.CODECOV_TOKEN }} # not required for public repos @@ -119,31 +96,21 @@ jobs: steps: - name: Checkout repo and submodules uses: actions/checkout@v3 - if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == 'Budibase/budibase' + if: github.repository == 'Budibase/budibase' with: submodules: true 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 + if: github.repository != 'Budibase/budibase' - - name: Use Node.js 18.x + - name: Use Node.js 14.x uses: actions/setup-node@v3 with: - node-version: 18.x + node-version: 14.x cache: "yarn" - - run: yarn --frozen-lockfile - - name: Test worker and server - run: | - if ${{ env.USE_NX_AFFECTED }}; then - yarn test --scope=@budibase/worker --scope=@budibase/server --since=${{ env.NX_BASE_BRANCH }} - else - yarn test --scope=@budibase/worker --scope=@budibase/server - fi - + - run: yarn + - run: yarn test --scope=@budibase/worker --scope=@budibase/server - uses: codecov/codecov-action@v3 with: token: ${{ secrets.CODECOV_TOKEN || github.token }} # not required for public repos @@ -152,49 +119,42 @@ jobs: test-pro: runs-on: ubuntu-latest - if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == 'Budibase/budibase' + if: github.repository == 'Budibase/budibase' steps: - name: Checkout repo and submodules uses: actions/checkout@v3 with: submodules: true token: ${{ secrets.PERSONAL_ACCESS_TOKEN || github.token }} - fetch-depth: 0 - - name: Use Node.js 18.x + - name: Use Node.js 14.x uses: actions/setup-node@v3 with: - node-version: 18.x + node-version: 14.x cache: "yarn" - - run: yarn --frozen-lockfile - - name: Test - run: | - if ${{ env.USE_NX_AFFECTED }}; then - yarn test --scope=@budibase/pro --since=${{ env.NX_BASE_BRANCH }} - else - yarn test --scope=@budibase/pro - fi + - run: yarn + - run: yarn test --scope=@budibase/pro integration-test: runs-on: ubuntu-latest steps: - name: Checkout repo and submodules uses: actions/checkout@v3 - if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == 'Budibase/budibase' + if: github.repository == 'Budibase/budibase' with: submodules: true 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' + if: github.repository != 'Budibase/budibase' - - name: Use Node.js 18.x + - name: Use Node.js 14.x uses: actions/setup-node@v3 with: - node-version: 18.x + node-version: 14.x cache: "yarn" - - run: yarn --frozen-lockfile - - run: yarn build --scope @budibase/server --scope @budibase/worker --scope @budibase/client + - run: yarn + - run: yarn build --projects=@budibase/server,@budibase/worker,@budibase/client - name: Run tests run: | cd qa-core @@ -206,12 +166,13 @@ jobs: check-pro-submodule: runs-on: ubuntu-latest - if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == 'Budibase/budibase' + if: github.repository == 'Budibase/budibase' steps: - name: Checkout repo and submodules uses: actions/checkout@v3 with: submodules: true + fetch-depth: 0 token: ${{ secrets.PERSONAL_ACCESS_TOKEN || github.token }} - name: Check pro commit diff --git a/.github/workflows/check_unreleased_changes.yml b/.github/workflows/check_unreleased_changes.yml deleted file mode 100644 index d558330545..0000000000 --- a/.github/workflows/check_unreleased_changes.yml +++ /dev/null @@ -1,29 +0,0 @@ -name: check_unreleased_changes - -on: - pull_request: - branches: - - master - -jobs: - check_unreleased: - runs-on: ubuntu-latest - steps: - - name: Check for unreleased changes - env: - REPO: "Budibase/budibase" - TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: | - RELEASE_TIMESTAMP=$(curl -s -H "Authorization: token $TOKEN" \ - "https://api.github.com/repos/$REPO/releases/latest" | \ - jq -r .published_at) - COMMIT_TIMESTAMP=$(curl -s -H "Authorization: token $TOKEN" \ - "https://api.github.com/repos/$REPO/commits/master" | \ - jq -r .commit.committer.date) - RELEASE_SECONDS=$(date --date="$RELEASE_TIMESTAMP" "+%s") - COMMIT_SECONDS=$(date --date="$COMMIT_TIMESTAMP" "+%s") - if (( COMMIT_SECONDS > RELEASE_SECONDS )); then - echo "There are unreleased changes. Please release these changes before merging." - exit 1 - fi - echo "No unreleased changes detected." diff --git a/.github/workflows/release-develop.yml b/.github/workflows/release-develop.yml index bd727b7865..61cb283e28 100644 --- a/.github/workflows/release-develop.yml +++ b/.github/workflows/release-develop.yml @@ -44,7 +44,7 @@ jobs: - uses: actions/setup-node@v1 with: - node-version: 18.x + node-version: 14.x - run: yarn install --frozen-lockfile - name: Update versions diff --git a/.nvmrc b/.nvmrc index 7950a44576..835d07c442 100644 --- a/.nvmrc +++ b/.nvmrc @@ -1 +1 @@ -v18.17.0 +v14.20.1 diff --git a/.tool-versions b/.tool-versions index a909d60941..9f2ea77b14 100644 --- a/.tool-versions +++ b/.tool-versions @@ -1,3 +1,3 @@ -nodejs 18.17.0 +nodejs 14.21.3 python 3.10.0 -yarn 1.22.19 +yarn 1.22.19 \ No newline at end of file diff --git a/.vscode/launch.json b/.vscode/launch.json index 6c0089bb6b..8cb49d5825 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -1,32 +1,42 @@ { - // Use IntelliSense to learn about possible attributes. - // Hover to view descriptions of existing attributes. - // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 - "version": "0.2.0", - "configurations": [ - { - "name": "Budibase Server", - "type": "node", - "request": "launch", - "runtimeVersion": "14.20.1", - "runtimeArgs": ["--nolazy", "-r", "ts-node/register/transpile-only"], - "args": ["${workspaceFolder}/packages/server/src/index.ts"], - "cwd": "${workspaceFolder}/packages/server" - }, - { - "name": "Budibase Worker", - "type": "node", - "request": "launch", - "runtimeVersion": "14.20.1", - "runtimeArgs": ["--nolazy", "-r", "ts-node/register/transpile-only"], - "args": ["${workspaceFolder}/packages/worker/src/index.ts"], - "cwd": "${workspaceFolder}/packages/worker" - } - ], - "compounds": [ - { - "name": "Start Budibase", - "configurations": ["Budibase Server", "Budibase Worker"] - } - ] -} + // Use IntelliSense to learn about possible attributes. + // Hover to view descriptions of existing attributes. + // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 + "version": "0.2.0", + "configurations": [ + { + "name": "Budibase Server", + "type": "node", + "request": "launch", + "runtimeArgs": [ + "--nolazy", + "-r", + "ts-node/register/transpile-only" + ], + "args": [ + "${workspaceFolder}/packages/server/src/index.ts" + ], + "cwd": "${workspaceFolder}/packages/server" + }, + { + "name": "Budibase Worker", + "type": "node", + "request": "launch", + "runtimeArgs": [ + "--nolazy", + "-r", + "ts-node/register/transpile-only" + ], + "args": [ + "${workspaceFolder}/packages/worker/src/index.ts" + ], + "cwd": "${workspaceFolder}/packages/worker" + }, + ], + "compounds": [ + { + "name": "Start Budibase", + "configurations": ["Budibase Server", "Budibase Worker"] + } + ] +} \ No newline at end of file diff --git a/docs/CONTRIBUTING.md b/docs/CONTRIBUTING.md index 70f198a84c..2fb4c36fa8 100644 --- a/docs/CONTRIBUTING.md +++ b/docs/CONTRIBUTING.md @@ -90,7 +90,7 @@ Component libraries are collections of components as well as the definition of t #### 1. Prerequisites -- NodeJS version `18.x.x` +- NodeJS version `14.x.x` - Python version `3.x` ### Using asdf (recommended) diff --git a/hosting/single/Dockerfile b/hosting/single/Dockerfile index 9fdf2449d1..e43e5ad10c 100644 --- a/hosting/single/Dockerfile +++ b/hosting/single/Dockerfile @@ -1,7 +1,7 @@ -FROM node:18-slim as build +FROM node:14-slim as build # install node-gyp dependencies -RUN apt-get update && apt-get upgrade -y && apt-get install -y --no-install-recommends apt-utils cron g++ make python3 +RUN apt-get update && apt-get upgrade -y && apt-get install -y --no-install-recommends apt-utils cron g++ make python # add pin script WORKDIR / diff --git a/package.json b/package.json index 4e4befb5f2..d27af2e27d 100644 --- a/package.json +++ b/package.json @@ -34,7 +34,7 @@ "preinstall": "node scripts/syncProPackage.js", "setup": "git config submodule.recurse true && git submodule update && node ./hosting/scripts/setup.js && yarn && yarn build && yarn dev", "bootstrap": "./scripts/link-dependencies.sh && echo '***BOOTSTRAP ONLY REQUIRED FOR USE WITH ACCOUNT PORTAL***'", - "build": "lerna run build --stream", + "build": "yarn nx run-many -t=build", "build:dev": "lerna run --stream prebuild && yarn nx run-many --target=build --output-style=dynamic --watch --preserveWatchOutput", "check:types": "lerna run check:types", "backend:bootstrap": "./scripts/scopeBackend.sh && yarn run bootstrap", @@ -109,7 +109,7 @@ "@budibase/types": "0.0.0" }, "engines": { - "node": ">=18.0.0 <19.0.0" + "node": ">=14.0.0 <15.0.0" }, "dependencies": {} } diff --git a/packages/backend-core/src/security/permissions.ts b/packages/backend-core/src/security/permissions.ts index aa0b20a30c..70dae57ae6 100644 --- a/packages/backend-core/src/security/permissions.ts +++ b/packages/backend-core/src/security/permissions.ts @@ -78,6 +78,7 @@ export const BUILTIN_PERMISSIONS = { permissions: [ new Permission(PermissionType.QUERY, PermissionLevel.READ), new Permission(PermissionType.TABLE, PermissionLevel.READ), + new Permission(PermissionType.VIEW, PermissionLevel.READ), ], }, WRITE: { @@ -86,6 +87,7 @@ export const BUILTIN_PERMISSIONS = { permissions: [ new Permission(PermissionType.QUERY, PermissionLevel.WRITE), new Permission(PermissionType.TABLE, PermissionLevel.WRITE), + new Permission(PermissionType.VIEW, PermissionLevel.READ), new Permission(PermissionType.AUTOMATION, PermissionLevel.EXECUTE), ], }, @@ -96,6 +98,7 @@ export const BUILTIN_PERMISSIONS = { new Permission(PermissionType.TABLE, PermissionLevel.WRITE), new Permission(PermissionType.USER, PermissionLevel.READ), new Permission(PermissionType.AUTOMATION, PermissionLevel.EXECUTE), + new Permission(PermissionType.VIEW, PermissionLevel.READ), new Permission(PermissionType.WEBHOOK, PermissionLevel.READ), ], }, @@ -106,6 +109,7 @@ export const BUILTIN_PERMISSIONS = { new Permission(PermissionType.TABLE, PermissionLevel.ADMIN), new Permission(PermissionType.USER, PermissionLevel.ADMIN), new Permission(PermissionType.AUTOMATION, PermissionLevel.ADMIN), + new Permission(PermissionType.VIEW, PermissionLevel.ADMIN), new Permission(PermissionType.WEBHOOK, PermissionLevel.READ), new Permission(PermissionType.QUERY, PermissionLevel.ADMIN), ], diff --git a/packages/backend-core/tests/core/utilities/testContainerUtils.ts b/packages/backend-core/tests/core/utilities/testContainerUtils.ts index 06bd91392e..f6c702f7ef 100644 --- a/packages/backend-core/tests/core/utilities/testContainerUtils.ts +++ b/packages/backend-core/tests/core/utilities/testContainerUtils.ts @@ -80,7 +80,7 @@ function getRedisConfig() { export function setupEnv(...envs: any[]) { const couch = getCouchConfig(), - minio = getMinioConfig(), + minio = getCouchConfig(), redis = getRedisConfig() const configs = [ { key: "COUCH_DB_PORT", value: couch.port }, diff --git a/packages/builder/src/components/design/settings/controls/ButtonActionEditor/actions/ChangeFormStep.svelte b/packages/builder/src/components/design/settings/controls/ButtonActionEditor/actions/ChangeFormStep.svelte index 81a2119474..ca2df71c6d 100644 --- a/packages/builder/src/components/design/settings/controls/ButtonActionEditor/actions/ChangeFormStep.svelte +++ b/packages/builder/src/components/design/settings/controls/ButtonActionEditor/actions/ChangeFormStep.svelte @@ -1,12 +1,10 @@