1
0
Fork 0
mirror of synced 2024-06-29 03:20:34 +12:00
This commit is contained in:
Martin McKeaveney 2021-06-21 11:16:44 +01:00
commit 88a3fd7d4c
16 changed files with 77 additions and 29 deletions

View file

@ -139,5 +139,5 @@ static_resources:
address:
socket_address:
address: watchtower-service
port_value: 6161
port_value: 8080

View file

@ -1,5 +1,5 @@
{
"version": "0.9.51",
"version": "0.9.53",
"npmClient": "yarn",
"packages": [
"packages/*"

View file

@ -1,6 +1,6 @@
{
"name": "@budibase/auth",
"version": "0.9.51",
"version": "0.9.53",
"description": "Authentication middlewares for budibase builder and apps",
"main": "src/index.js",
"author": "Budibase",

View file

@ -1,7 +1,7 @@
{
"name": "@budibase/bbui",
"description": "A UI solution used in the different Budibase projects.",
"version": "0.9.51",
"version": "0.9.53",
"license": "AGPL-3.0",
"svelte": "src/index.js",
"module": "dist/bbui.es.js",

View file

@ -1,6 +1,6 @@
{
"name": "@budibase/builder",
"version": "0.9.51",
"version": "0.9.53",
"license": "AGPL-3.0",
"private": true,
"scripts": {
@ -65,10 +65,10 @@
}
},
"dependencies": {
"@budibase/bbui": "^0.9.51",
"@budibase/client": "^0.9.51",
"@budibase/bbui": "^0.9.53",
"@budibase/client": "^0.9.53",
"@budibase/colorpicker": "1.1.2",
"@budibase/string-templates": "^0.9.51",
"@budibase/string-templates": "^0.9.53",
"@sentry/browser": "5.19.1",
"@spectrum-css/page": "^3.0.1",
"@spectrum-css/vars": "^3.0.1",

View file

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

View file

@ -1,6 +1,6 @@
{
"name": "@budibase/client",
"version": "0.9.51",
"version": "0.9.53",
"license": "MPL-2.0",
"module": "dist/budibase-client.js",
"main": "dist/budibase-client.js",
@ -18,9 +18,9 @@
"dev:builder": "rollup -cw"
},
"dependencies": {
"@budibase/bbui": "^0.9.51",
"@budibase/standard-components": "^0.9.51",
"@budibase/string-templates": "^0.9.51",
"@budibase/bbui": "^0.9.53",
"@budibase/standard-components": "^0.9.53",
"@budibase/string-templates": "^0.9.53",
"regexparam": "^1.3.0",
"shortid": "^2.2.15",
"svelte-spa-router": "^3.0.5"

View file

@ -1,7 +1,7 @@
{
"name": "@budibase/server",
"email": "hi@budibase.com",
"version": "0.9.51",
"version": "0.9.53",
"description": "Budibase Web Server",
"main": "src/electron.js",
"repository": {
@ -55,9 +55,9 @@
"author": "Budibase",
"license": "AGPL-3.0-or-later",
"dependencies": {
"@budibase/auth": "^0.9.51",
"@budibase/client": "^0.9.51",
"@budibase/string-templates": "^0.9.51",
"@budibase/auth": "^0.9.53",
"@budibase/client": "^0.9.53",
"@budibase/string-templates": "^0.9.53",
"@elastic/elasticsearch": "7.10.0",
"@koa/router": "8.0.0",
"@sendgrid/mail": "7.1.1",
@ -109,7 +109,7 @@
"devDependencies": {
"@babel/core": "^7.14.3",
"@babel/preset-env": "^7.14.4",
"@budibase/standard-components": "^0.9.51",
"@budibase/standard-components": "^0.9.53",
"@jest/test-sequencer": "^24.8.0",
"babel-jest": "^27.0.2",
"docker-compose": "^0.23.6",

View file

@ -3,13 +3,15 @@ const vm = require("vm")
class ScriptExecutor {
constructor(body) {
this.script = new vm.Script(body.script)
const code = `let fn = () => {\n${body.script}\n}; out = fn();`
this.script = new vm.Script(code)
this.context = vm.createContext(body.context)
this.context.fetch = fetch
}
execute() {
return this.script.runInContext(this.context)
this.script.runInContext(this.context)
return this.context.out
}
}

View file

@ -7,6 +7,7 @@ const executeScript = require("./steps/executeScript")
const bash = require("./steps/bash")
const executeQuery = require("./steps/executeQuery")
const outgoingWebhook = require("./steps/outgoingWebhook")
const serverLog = require("./steps/serverLog")
const env = require("../environment")
const Sentry = require("@sentry/node")
const {
@ -24,6 +25,7 @@ const BUILTIN_ACTIONS = {
EXECUTE_SCRIPT: executeScript.run,
EXECUTE_BASH: bash.run,
EXECUTE_QUERY: executeQuery.run,
SERVER_LOG: serverLog.run,
}
const BUILTIN_DEFINITIONS = {
SEND_EMAIL: sendgridEmail.definition,
@ -35,6 +37,7 @@ const BUILTIN_DEFINITIONS = {
EXECUTE_SCRIPT: executeScript.definition,
EXECUTE_QUERY: executeQuery.definition,
EXECUTE_BASH: bash.definition,
SERVER_LOG: serverLog.definition,
}
let MANIFEST = null

View file

@ -0,0 +1,41 @@
/**
* Note, there is some functionality in this that is not currently exposed as it
* is complex and maybe better to be opinionated here.
* GET/DELETE requests cannot handle body elements so they will not be sent if configured.
*/
module.exports.definition = {
name: "Backend log",
tagline: "Console log a value in the backend",
icon: "ri-server-line",
description: "Logs the given text to the server (using console.log)",
type: "ACTION",
stepId: "SERVER_LOG",
inputs: {
text: "",
},
schema: {
inputs: {
properties: {
text: {
type: "string",
title: "URL",
},
},
required: ["text"],
},
outputs: {
properties: {
success: {
type: "boolean",
description: "Whether the action was successful",
},
},
required: ["success"],
},
},
}
module.exports.run = async function ({ inputs, appId }) {
console.log(`App ${appId} - ${inputs.text}`)
}

View file

@ -211,14 +211,17 @@ class LinkController {
// iterate through the link IDs in the row field, see if any don't exist already
for (let linkId of rowField) {
if (linkedSchema.relationshipType === RelationshipTypes.ONE_TO_MANY) {
const links = (
let links = (
await getLinkDocuments({
appId: this._appId,
tableId: field.tableId,
rowId: linkId,
includeDocs: IncludeDocs.EXCLUDE,
})
).filter(link => link.id !== row._id)
).filter(
link =>
link.id !== row._id && link.fieldName === linkedSchema.name
)
// The 1 side of 1:N is already related to something else
// You must remove the existing relationship

View file

@ -29,12 +29,12 @@
"keywords": [
"svelte"
],
"version": "0.9.51",
"version": "0.9.53",
"license": "MIT",
"gitHead": "d1836a898cab3f8ab80ee6d8f42be1a9eed7dcdc",
"dependencies": {
"@spectrum-css/link": "^3.1.3",
"@budibase/bbui": "^0.9.51",
"@budibase/bbui": "^0.9.53",
"@spectrum-css/page": "^3.0.1",
"@spectrum-css/vars": "^3.0.1",
"apexcharts": "^3.22.1",

View file

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

View file

@ -1,7 +1,7 @@
{
"name": "@budibase/worker",
"email": "hi@budibase.com",
"version": "0.9.51",
"version": "0.9.53",
"description": "Budibase background service",
"main": "src/index.js",
"repository": {
@ -21,8 +21,8 @@
"author": "Budibase",
"license": "AGPL-3.0-or-later",
"dependencies": {
"@budibase/auth": "^0.9.51",
"@budibase/string-templates": "^0.9.51",
"@budibase/auth": "^0.9.53",
"@budibase/string-templates": "^0.9.53",
"@koa/router": "^8.0.0",
"aws-sdk": "^2.811.0",
"bcryptjs": "^2.4.3",

View file

@ -53,7 +53,6 @@ describe("/api/admin/email", () => {
it("should be able to send a welcome email", async () => {
await sendRealEmail(EmailTemplatePurpose.WELCOME)
})
it("should be able to send a invitation email", async () => {