diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index b4f7739293..457d2c1451 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -31,6 +31,9 @@ A clear and concise description of what you expected to happen. **Screenshots** If applicable, add screenshots to help explain your problem. + +**App Export** +If possible - please attach an export of your budibase application for debugging/reproduction purposes. **Desktop (please complete the following information):** - OS: [e.g. iOS] diff --git a/hosting/single/Dockerfile b/hosting/single/Dockerfile index 4e3239d960..b5bf17adde 100644 --- a/hosting/single/Dockerfile +++ b/hosting/single/Dockerfile @@ -108,7 +108,7 @@ RUN chmod +x install.sh && ./install.sh WORKDIR / ADD hosting/single/runner.sh . RUN chmod +x ./runner.sh -ADD hosting/scripts/healthcheck.sh . +ADD hosting/single/healthcheck.sh . RUN chmod +x ./healthcheck.sh ADD hosting/scripts/build-target-paths.sh . diff --git a/hosting/scripts/healthcheck.sh b/hosting/single/healthcheck.sh similarity index 93% rename from hosting/scripts/healthcheck.sh rename to hosting/single/healthcheck.sh index 80f2ece0b6..b92cd153a3 100644 --- a/hosting/scripts/healthcheck.sh +++ b/hosting/single/healthcheck.sh @@ -1,6 +1,10 @@ #!/usr/bin/env bash healthy=true +if [ -f "/data/.env" ]; then + export $(cat /data/.env | xargs) +fi + if [[ $(curl -Lfk -s -w "%{http_code}\n" http://localhost/ -o /dev/null) -ne 200 ]]; then echo 'ERROR: Budibase is not running'; healthy=false diff --git a/lerna.json b/lerna.json index 0f8f5cf16f..904cdf8fd6 100644 --- a/lerna.json +++ b/lerna.json @@ -1,5 +1,5 @@ { - "version": "1.1.18-alpha.5", + "version": "1.1.21", "npmClient": "yarn", "packages": [ "packages/*" diff --git a/packages/backend-core/package.json b/packages/backend-core/package.json index 616c89e417..6050311ca0 100644 --- a/packages/backend-core/package.json +++ b/packages/backend-core/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/backend-core", - "version": "1.1.18-alpha.5", + "version": "1.1.21", "description": "Budibase backend core libraries used in server and worker", "main": "dist/src/index.js", "types": "dist/src/index.d.ts", @@ -20,7 +20,7 @@ "test:watch": "jest --watchAll" }, "dependencies": { - "@budibase/types": "^1.1.18-alpha.5", + "@budibase/types": "^1.1.21", "@techpass/passport-openidconnect": "0.3.2", "aws-sdk": "2.1030.0", "bcrypt": "5.0.1", diff --git a/packages/bbui/package.json b/packages/bbui/package.json index feca151043..c049cf328e 100644 --- a/packages/bbui/package.json +++ b/packages/bbui/package.json @@ -1,7 +1,7 @@ { "name": "@budibase/bbui", "description": "A UI solution used in the different Budibase projects.", - "version": "1.1.18-alpha.5", + "version": "1.1.21", "license": "MPL-2.0", "svelte": "src/index.js", "module": "dist/bbui.es.js", @@ -38,7 +38,7 @@ ], "dependencies": { "@adobe/spectrum-css-workflow-icons": "^1.2.1", - "@budibase/string-templates": "^1.1.18-alpha.5", + "@budibase/string-templates": "^1.1.21", "@spectrum-css/actionbutton": "^1.0.1", "@spectrum-css/actiongroup": "^1.0.1", "@spectrum-css/avatar": "^3.0.2", diff --git a/packages/builder/package.json b/packages/builder/package.json index a3fb670911..ff72c02910 100644 --- a/packages/builder/package.json +++ b/packages/builder/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/builder", - "version": "1.1.18-alpha.5", + "version": "1.1.21", "license": "GPL-3.0", "private": true, "scripts": { @@ -69,10 +69,10 @@ } }, "dependencies": { - "@budibase/bbui": "^1.1.18-alpha.5", - "@budibase/client": "^1.1.18-alpha.5", - "@budibase/frontend-core": "^1.1.18-alpha.5", - "@budibase/string-templates": "^1.1.18-alpha.5", + "@budibase/bbui": "^1.1.21", + "@budibase/client": "^1.1.21", + "@budibase/frontend-core": "^1.1.21", + "@budibase/string-templates": "^1.1.21", "@sentry/browser": "5.19.1", "@spectrum-css/page": "^3.0.1", "@spectrum-css/vars": "^3.0.1", diff --git a/packages/builder/src/components/integration/QueryBindingBuilder.svelte b/packages/builder/src/components/integration/QueryBindingBuilder.svelte index 7f6bd5ffd5..255bee21dd 100644 --- a/packages/builder/src/components/integration/QueryBindingBuilder.svelte +++ b/packages/builder/src/components/integration/QueryBindingBuilder.svelte @@ -58,7 +58,7 @@ thin disabled={bindable} on:change={evt => onBindingChange(binding.name, evt.detail)} - value={runtimeToReadableBinding(bindings, binding.default)} + bind:value={binding.default} /> {#if bindable} { - const node = document.getElementsByClassName(id)?.[0]?.childNodes[0] + const node = document.getElementsByClassName(id)?.[0]?.children[0] if (!node) { return } diff --git a/packages/client/src/components/preview/DNDHandler.svelte b/packages/client/src/components/preview/DNDHandler.svelte index 6c1922ecff..c37eb93afa 100644 --- a/packages/client/src/components/preview/DNDHandler.svelte +++ b/packages/client/src/components/preview/DNDHandler.svelte @@ -35,8 +35,8 @@ const getDOMNodeForComponent = component => { const parent = component.closest(".component") - const children = Array.from(parent.childNodes) - return children?.find(node => node?.nodeType === 1) + const children = Array.from(parent.children) + return children[0] } // Callback when initially starting a drag on a draggable component diff --git a/packages/client/src/components/preview/IndicatorSet.svelte b/packages/client/src/components/preview/IndicatorSet.svelte index b9113f9532..bbd03aa974 100644 --- a/packages/client/src/components/preview/IndicatorSet.svelte +++ b/packages/client/src/components/preview/IndicatorSet.svelte @@ -71,8 +71,7 @@ // Extract valid children // Sanity limit of 100 active indicators const children = Array.from(parents) - .map(parent => parent?.childNodes?.[0]) - .filter(node => node?.nodeType === 1) + .map(parent => parent?.children?.[0]) .slice(0, 100) // If there aren't any nodes then reset diff --git a/packages/client/src/components/preview/SettingsBar.svelte b/packages/client/src/components/preview/SettingsBar.svelte index bc227c87d9..5ea9b2339f 100644 --- a/packages/client/src/components/preview/SettingsBar.svelte +++ b/packages/client/src/components/preview/SettingsBar.svelte @@ -37,7 +37,7 @@ } const id = $builderStore.selectedComponentId const parent = document.getElementsByClassName(id)?.[0] - const element = parent?.childNodes?.[0] + const element = parent?.children?.[0] // The settings bar is higher in the dom tree than the selection indicators // as we want to be able to render the settings bar wider than the screen, diff --git a/packages/frontend-core/package.json b/packages/frontend-core/package.json index 6a9ca9dbdb..d1ab255484 100644 --- a/packages/frontend-core/package.json +++ b/packages/frontend-core/package.json @@ -1,12 +1,12 @@ { "name": "@budibase/frontend-core", - "version": "1.1.18-alpha.5", + "version": "1.1.21", "description": "Budibase frontend core libraries used in builder and client", "author": "Budibase", "license": "MPL-2.0", "svelte": "src/index.js", "dependencies": { - "@budibase/bbui": "^1.1.18-alpha.5", + "@budibase/bbui": "^1.1.21", "lodash": "^4.17.21", "svelte": "^3.46.2" } diff --git a/packages/server/package.json b/packages/server/package.json index 8860026d4d..062a7d4e35 100644 --- a/packages/server/package.json +++ b/packages/server/package.json @@ -1,7 +1,7 @@ { "name": "@budibase/server", "email": "hi@budibase.com", - "version": "1.1.18-alpha.5", + "version": "1.1.21", "description": "Budibase Web Server", "main": "src/index.ts", "repository": { @@ -77,11 +77,11 @@ "license": "GPL-3.0", "dependencies": { "@apidevtools/swagger-parser": "10.0.3", - "@budibase/backend-core": "^1.1.18-alpha.5", - "@budibase/client": "^1.1.18-alpha.5", - "@budibase/pro": "1.1.18-alpha.5", - "@budibase/string-templates": "^1.1.18-alpha.5", - "@budibase/types": "^1.1.18-alpha.5", + "@budibase/backend-core": "^1.1.21", + "@budibase/client": "^1.1.21", + "@budibase/pro": "1.1.21", + "@budibase/string-templates": "^1.1.21", + "@budibase/types": "^1.1.21", "@bull-board/api": "3.7.0", "@bull-board/koa": "3.9.4", "@elastic/elasticsearch": "7.10.0", diff --git a/packages/server/src/api/controllers/public/applications.ts b/packages/server/src/api/controllers/public/applications.ts index 6fa5185d23..c2c62ffc28 100644 --- a/packages/server/src/api/controllers/public/applications.ts +++ b/packages/server/src/api/controllers/public/applications.ts @@ -1,5 +1,5 @@ const { getAllApps } = require("@budibase/backend-core/db") -const { updateAppId } = require("@budibase/backend-core/context") +const { doInAppContext } = require("@budibase/backend-core/context") import { search as stringSearch, addRev } from "./utils" import * as controller from "../application" import { Application } from "../../../definitions/common" @@ -41,28 +41,31 @@ export async function create(ctx: any, next: any) { } export async function read(ctx: any, next: any) { - updateAppId(ctx.params.appId) - await setResponseApp(ctx) - await next() + await doInAppContext(ctx.params.appId, async () => { + await setResponseApp(ctx) + await next() + }) } export async function update(ctx: any, next: any) { ctx.request.body = await addRev(fixAppID(ctx.request.body, ctx.params)) - updateAppId(ctx.params.appId) - await controller.update(ctx) - await setResponseApp(ctx) - await next() + await doInAppContext(ctx.params.appId, async () => { + await controller.update(ctx) + await setResponseApp(ctx) + await next() + }) } export async function destroy(ctx: any, next: any) { - updateAppId(ctx.params.appId) - // get the app before deleting it - await setResponseApp(ctx) - const body = ctx.body - await controller.destroy(ctx) - // overwrite the body again - ctx.body = body - await next() + await doInAppContext(ctx.params.appId, async () => { + // get the app before deleting it + await setResponseApp(ctx) + const body = ctx.body + await controller.destroy(ctx) + // overwrite the body again + ctx.body = body + await next() + }) } export default { diff --git a/packages/string-templates/package.json b/packages/string-templates/package.json index d55a3e17a7..7e9ff93214 100644 --- a/packages/string-templates/package.json +++ b/packages/string-templates/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/string-templates", - "version": "1.1.18-alpha.5", + "version": "1.1.21", "description": "Handlebars wrapper for Budibase templating.", "main": "src/index.cjs", "module": "dist/bundle.mjs", diff --git a/packages/types/package.json b/packages/types/package.json index 725f3edd49..6ea09c4fd2 100644 --- a/packages/types/package.json +++ b/packages/types/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/types", - "version": "1.1.18-alpha.5", + "version": "1.1.21", "description": "Budibase types", "main": "dist/index.js", "types": "dist/index.d.ts", diff --git a/packages/worker/package.json b/packages/worker/package.json index 57db310c11..b70109d066 100644 --- a/packages/worker/package.json +++ b/packages/worker/package.json @@ -1,7 +1,7 @@ { "name": "@budibase/worker", "email": "hi@budibase.com", - "version": "1.1.18-alpha.5", + "version": "1.1.21", "description": "Budibase background service", "main": "src/index.ts", "repository": { @@ -35,10 +35,10 @@ "author": "Budibase", "license": "GPL-3.0", "dependencies": { - "@budibase/backend-core": "^1.1.18-alpha.5", - "@budibase/pro": "1.1.18-alpha.5", - "@budibase/string-templates": "^1.1.18-alpha.5", - "@budibase/types": "^1.1.18-alpha.5", + "@budibase/backend-core": "^1.1.21", + "@budibase/pro": "1.1.21", + "@budibase/string-templates": "^1.1.21", + "@budibase/types": "^1.1.21", "@koa/router": "8.0.8", "@sentry/node": "6.17.7", "@techpass/passport-openidconnect": "0.3.2",