Merge branch 'master' of github.com:Budibase/budibase into develop

This commit is contained in:
mike12345567 2022-07-22 19:14:35 +01:00
commit d8d2749733
21 changed files with 64 additions and 55 deletions

View File

@ -31,6 +31,9 @@ A clear and concise description of what you expected to happen.
**Screenshots** **Screenshots**
If applicable, add screenshots to help explain your problem. 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):** **Desktop (please complete the following information):**
- OS: [e.g. iOS] - OS: [e.g. iOS]

View File

@ -108,7 +108,7 @@ RUN chmod +x install.sh && ./install.sh
WORKDIR / WORKDIR /
ADD hosting/single/runner.sh . ADD hosting/single/runner.sh .
RUN chmod +x ./runner.sh RUN chmod +x ./runner.sh
ADD hosting/scripts/healthcheck.sh . ADD hosting/single/healthcheck.sh .
RUN chmod +x ./healthcheck.sh RUN chmod +x ./healthcheck.sh
ADD hosting/scripts/build-target-paths.sh . ADD hosting/scripts/build-target-paths.sh .

View File

@ -1,6 +1,10 @@
#!/usr/bin/env bash #!/usr/bin/env bash
healthy=true 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 if [[ $(curl -Lfk -s -w "%{http_code}\n" http://localhost/ -o /dev/null) -ne 200 ]]; then
echo 'ERROR: Budibase is not running'; echo 'ERROR: Budibase is not running';
healthy=false healthy=false

View File

@ -1,5 +1,5 @@
{ {
"version": "1.1.18-alpha.5", "version": "1.1.21",
"npmClient": "yarn", "npmClient": "yarn",
"packages": [ "packages": [
"packages/*" "packages/*"

View File

@ -1,6 +1,6 @@
{ {
"name": "@budibase/backend-core", "name": "@budibase/backend-core",
"version": "1.1.18-alpha.5", "version": "1.1.21",
"description": "Budibase backend core libraries used in server and worker", "description": "Budibase backend core libraries used in server and worker",
"main": "dist/src/index.js", "main": "dist/src/index.js",
"types": "dist/src/index.d.ts", "types": "dist/src/index.d.ts",
@ -20,7 +20,7 @@
"test:watch": "jest --watchAll" "test:watch": "jest --watchAll"
}, },
"dependencies": { "dependencies": {
"@budibase/types": "^1.1.18-alpha.5", "@budibase/types": "^1.1.21",
"@techpass/passport-openidconnect": "0.3.2", "@techpass/passport-openidconnect": "0.3.2",
"aws-sdk": "2.1030.0", "aws-sdk": "2.1030.0",
"bcrypt": "5.0.1", "bcrypt": "5.0.1",

View File

@ -1,7 +1,7 @@
{ {
"name": "@budibase/bbui", "name": "@budibase/bbui",
"description": "A UI solution used in the different Budibase projects.", "description": "A UI solution used in the different Budibase projects.",
"version": "1.1.18-alpha.5", "version": "1.1.21",
"license": "MPL-2.0", "license": "MPL-2.0",
"svelte": "src/index.js", "svelte": "src/index.js",
"module": "dist/bbui.es.js", "module": "dist/bbui.es.js",
@ -38,7 +38,7 @@
], ],
"dependencies": { "dependencies": {
"@adobe/spectrum-css-workflow-icons": "^1.2.1", "@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/actionbutton": "^1.0.1",
"@spectrum-css/actiongroup": "^1.0.1", "@spectrum-css/actiongroup": "^1.0.1",
"@spectrum-css/avatar": "^3.0.2", "@spectrum-css/avatar": "^3.0.2",

View File

@ -1,6 +1,6 @@
{ {
"name": "@budibase/builder", "name": "@budibase/builder",
"version": "1.1.18-alpha.5", "version": "1.1.21",
"license": "GPL-3.0", "license": "GPL-3.0",
"private": true, "private": true,
"scripts": { "scripts": {
@ -69,10 +69,10 @@
} }
}, },
"dependencies": { "dependencies": {
"@budibase/bbui": "^1.1.18-alpha.5", "@budibase/bbui": "^1.1.21",
"@budibase/client": "^1.1.18-alpha.5", "@budibase/client": "^1.1.21",
"@budibase/frontend-core": "^1.1.18-alpha.5", "@budibase/frontend-core": "^1.1.21",
"@budibase/string-templates": "^1.1.18-alpha.5", "@budibase/string-templates": "^1.1.21",
"@sentry/browser": "5.19.1", "@sentry/browser": "5.19.1",
"@spectrum-css/page": "^3.0.1", "@spectrum-css/page": "^3.0.1",
"@spectrum-css/vars": "^3.0.1", "@spectrum-css/vars": "^3.0.1",

View File

@ -58,7 +58,7 @@
thin thin
disabled={bindable} disabled={bindable}
on:change={evt => onBindingChange(binding.name, evt.detail)} on:change={evt => onBindingChange(binding.name, evt.detail)}
value={runtimeToReadableBinding(bindings, binding.default)} bind:value={binding.default}
/> />
{#if bindable} {#if bindable}
<DrawerBindableInput <DrawerBindableInput

View File

@ -16,7 +16,7 @@
// Get root li element // Get root li element
const el = document.getElementById(`component-${component?._id}`) const el = document.getElementById(`component-${component?._id}`)
// Get inner nav item content element // Get inner nav item content element
const child = el?.childNodes[0]?.childNodes[0] const child = el?.children[0]?.children[0]
if (!el) { if (!el) {
return return
} }

View File

@ -1,6 +1,6 @@
{ {
"name": "@budibase/cli", "name": "@budibase/cli",
"version": "1.1.18-alpha.5", "version": "1.1.21",
"description": "Budibase CLI, for developers, self hosting and migrations.", "description": "Budibase CLI, for developers, self hosting and migrations.",
"main": "src/index.js", "main": "src/index.js",
"bin": { "bin": {

View File

@ -1,6 +1,6 @@
{ {
"name": "@budibase/client", "name": "@budibase/client",
"version": "1.1.18-alpha.5", "version": "1.1.21",
"license": "MPL-2.0", "license": "MPL-2.0",
"module": "dist/budibase-client.js", "module": "dist/budibase-client.js",
"main": "dist/budibase-client.js", "main": "dist/budibase-client.js",
@ -19,9 +19,9 @@
"dev:builder": "rollup -cw" "dev:builder": "rollup -cw"
}, },
"dependencies": { "dependencies": {
"@budibase/bbui": "^1.1.18-alpha.5", "@budibase/bbui": "^1.1.21",
"@budibase/frontend-core": "^1.1.18-alpha.5", "@budibase/frontend-core": "^1.1.21",
"@budibase/string-templates": "^1.1.18-alpha.5", "@budibase/string-templates": "^1.1.21",
"@spectrum-css/button": "^3.0.3", "@spectrum-css/button": "^3.0.3",
"@spectrum-css/card": "^3.0.3", "@spectrum-css/card": "^3.0.3",
"@spectrum-css/divider": "^1.0.3", "@spectrum-css/divider": "^1.0.3",

View File

@ -401,7 +401,7 @@
} }
const scrollIntoView = () => { const scrollIntoView = () => {
const node = document.getElementsByClassName(id)?.[0]?.childNodes[0] const node = document.getElementsByClassName(id)?.[0]?.children[0]
if (!node) { if (!node) {
return return
} }

View File

@ -35,8 +35,8 @@
const getDOMNodeForComponent = component => { const getDOMNodeForComponent = component => {
const parent = component.closest(".component") const parent = component.closest(".component")
const children = Array.from(parent.childNodes) const children = Array.from(parent.children)
return children?.find(node => node?.nodeType === 1) return children[0]
} }
// Callback when initially starting a drag on a draggable component // Callback when initially starting a drag on a draggable component

View File

@ -71,8 +71,7 @@
// Extract valid children // Extract valid children
// Sanity limit of 100 active indicators // Sanity limit of 100 active indicators
const children = Array.from(parents) const children = Array.from(parents)
.map(parent => parent?.childNodes?.[0]) .map(parent => parent?.children?.[0])
.filter(node => node?.nodeType === 1)
.slice(0, 100) .slice(0, 100)
// If there aren't any nodes then reset // If there aren't any nodes then reset

View File

@ -37,7 +37,7 @@
} }
const id = $builderStore.selectedComponentId const id = $builderStore.selectedComponentId
const parent = document.getElementsByClassName(id)?.[0] 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 // 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, // as we want to be able to render the settings bar wider than the screen,

View File

@ -1,12 +1,12 @@
{ {
"name": "@budibase/frontend-core", "name": "@budibase/frontend-core",
"version": "1.1.18-alpha.5", "version": "1.1.21",
"description": "Budibase frontend core libraries used in builder and client", "description": "Budibase frontend core libraries used in builder and client",
"author": "Budibase", "author": "Budibase",
"license": "MPL-2.0", "license": "MPL-2.0",
"svelte": "src/index.js", "svelte": "src/index.js",
"dependencies": { "dependencies": {
"@budibase/bbui": "^1.1.18-alpha.5", "@budibase/bbui": "^1.1.21",
"lodash": "^4.17.21", "lodash": "^4.17.21",
"svelte": "^3.46.2" "svelte": "^3.46.2"
} }

View File

@ -1,7 +1,7 @@
{ {
"name": "@budibase/server", "name": "@budibase/server",
"email": "hi@budibase.com", "email": "hi@budibase.com",
"version": "1.1.18-alpha.5", "version": "1.1.21",
"description": "Budibase Web Server", "description": "Budibase Web Server",
"main": "src/index.ts", "main": "src/index.ts",
"repository": { "repository": {
@ -77,11 +77,11 @@
"license": "GPL-3.0", "license": "GPL-3.0",
"dependencies": { "dependencies": {
"@apidevtools/swagger-parser": "10.0.3", "@apidevtools/swagger-parser": "10.0.3",
"@budibase/backend-core": "^1.1.18-alpha.5", "@budibase/backend-core": "^1.1.21",
"@budibase/client": "^1.1.18-alpha.5", "@budibase/client": "^1.1.21",
"@budibase/pro": "1.1.18-alpha.5", "@budibase/pro": "1.1.21",
"@budibase/string-templates": "^1.1.18-alpha.5", "@budibase/string-templates": "^1.1.21",
"@budibase/types": "^1.1.18-alpha.5", "@budibase/types": "^1.1.21",
"@bull-board/api": "3.7.0", "@bull-board/api": "3.7.0",
"@bull-board/koa": "3.9.4", "@bull-board/koa": "3.9.4",
"@elastic/elasticsearch": "7.10.0", "@elastic/elasticsearch": "7.10.0",

View File

@ -1,5 +1,5 @@
const { getAllApps } = require("@budibase/backend-core/db") 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 { search as stringSearch, addRev } from "./utils"
import * as controller from "../application" import * as controller from "../application"
import { Application } from "../../../definitions/common" 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) { export async function read(ctx: any, next: any) {
updateAppId(ctx.params.appId) await doInAppContext(ctx.params.appId, async () => {
await setResponseApp(ctx) await setResponseApp(ctx)
await next() await next()
})
} }
export async function update(ctx: any, next: any) { export async function update(ctx: any, next: any) {
ctx.request.body = await addRev(fixAppID(ctx.request.body, ctx.params)) ctx.request.body = await addRev(fixAppID(ctx.request.body, ctx.params))
updateAppId(ctx.params.appId) await doInAppContext(ctx.params.appId, async () => {
await controller.update(ctx) await controller.update(ctx)
await setResponseApp(ctx) await setResponseApp(ctx)
await next() await next()
})
} }
export async function destroy(ctx: any, next: any) { export async function destroy(ctx: any, next: any) {
updateAppId(ctx.params.appId) await doInAppContext(ctx.params.appId, async () => {
// get the app before deleting it // get the app before deleting it
await setResponseApp(ctx) await setResponseApp(ctx)
const body = ctx.body const body = ctx.body
await controller.destroy(ctx) await controller.destroy(ctx)
// overwrite the body again // overwrite the body again
ctx.body = body ctx.body = body
await next() await next()
})
} }
export default { export default {

View File

@ -1,6 +1,6 @@
{ {
"name": "@budibase/string-templates", "name": "@budibase/string-templates",
"version": "1.1.18-alpha.5", "version": "1.1.21",
"description": "Handlebars wrapper for Budibase templating.", "description": "Handlebars wrapper for Budibase templating.",
"main": "src/index.cjs", "main": "src/index.cjs",
"module": "dist/bundle.mjs", "module": "dist/bundle.mjs",

View File

@ -1,6 +1,6 @@
{ {
"name": "@budibase/types", "name": "@budibase/types",
"version": "1.1.18-alpha.5", "version": "1.1.21",
"description": "Budibase types", "description": "Budibase types",
"main": "dist/index.js", "main": "dist/index.js",
"types": "dist/index.d.ts", "types": "dist/index.d.ts",

View File

@ -1,7 +1,7 @@
{ {
"name": "@budibase/worker", "name": "@budibase/worker",
"email": "hi@budibase.com", "email": "hi@budibase.com",
"version": "1.1.18-alpha.5", "version": "1.1.21",
"description": "Budibase background service", "description": "Budibase background service",
"main": "src/index.ts", "main": "src/index.ts",
"repository": { "repository": {
@ -35,10 +35,10 @@
"author": "Budibase", "author": "Budibase",
"license": "GPL-3.0", "license": "GPL-3.0",
"dependencies": { "dependencies": {
"@budibase/backend-core": "^1.1.18-alpha.5", "@budibase/backend-core": "^1.1.21",
"@budibase/pro": "1.1.18-alpha.5", "@budibase/pro": "1.1.21",
"@budibase/string-templates": "^1.1.18-alpha.5", "@budibase/string-templates": "^1.1.21",
"@budibase/types": "^1.1.18-alpha.5", "@budibase/types": "^1.1.21",
"@koa/router": "8.0.8", "@koa/router": "8.0.8",
"@sentry/node": "6.17.7", "@sentry/node": "6.17.7",
"@techpass/passport-openidconnect": "0.3.2", "@techpass/passport-openidconnect": "0.3.2",