merge
This commit is contained in:
commit
88a3fd7d4c
|
@ -139,5 +139,5 @@ static_resources:
|
||||||
address:
|
address:
|
||||||
socket_address:
|
socket_address:
|
||||||
address: watchtower-service
|
address: watchtower-service
|
||||||
port_value: 6161
|
port_value: 8080
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
"version": "0.9.51",
|
"version": "0.9.53",
|
||||||
"npmClient": "yarn",
|
"npmClient": "yarn",
|
||||||
"packages": [
|
"packages": [
|
||||||
"packages/*"
|
"packages/*"
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "@budibase/auth",
|
"name": "@budibase/auth",
|
||||||
"version": "0.9.51",
|
"version": "0.9.53",
|
||||||
"description": "Authentication middlewares for budibase builder and apps",
|
"description": "Authentication middlewares for budibase builder and apps",
|
||||||
"main": "src/index.js",
|
"main": "src/index.js",
|
||||||
"author": "Budibase",
|
"author": "Budibase",
|
||||||
|
|
|
@ -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": "0.9.51",
|
"version": "0.9.53",
|
||||||
"license": "AGPL-3.0",
|
"license": "AGPL-3.0",
|
||||||
"svelte": "src/index.js",
|
"svelte": "src/index.js",
|
||||||
"module": "dist/bbui.es.js",
|
"module": "dist/bbui.es.js",
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "@budibase/builder",
|
"name": "@budibase/builder",
|
||||||
"version": "0.9.51",
|
"version": "0.9.53",
|
||||||
"license": "AGPL-3.0",
|
"license": "AGPL-3.0",
|
||||||
"private": true,
|
"private": true,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
@ -65,10 +65,10 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@budibase/bbui": "^0.9.51",
|
"@budibase/bbui": "^0.9.53",
|
||||||
"@budibase/client": "^0.9.51",
|
"@budibase/client": "^0.9.53",
|
||||||
"@budibase/colorpicker": "1.1.2",
|
"@budibase/colorpicker": "1.1.2",
|
||||||
"@budibase/string-templates": "^0.9.51",
|
"@budibase/string-templates": "^0.9.53",
|
||||||
"@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",
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "@budibase/cli",
|
"name": "@budibase/cli",
|
||||||
"version": "0.9.51",
|
"version": "0.9.53",
|
||||||
"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": {
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "@budibase/client",
|
"name": "@budibase/client",
|
||||||
"version": "0.9.51",
|
"version": "0.9.53",
|
||||||
"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",
|
||||||
|
@ -18,9 +18,9 @@
|
||||||
"dev:builder": "rollup -cw"
|
"dev:builder": "rollup -cw"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@budibase/bbui": "^0.9.51",
|
"@budibase/bbui": "^0.9.53",
|
||||||
"@budibase/standard-components": "^0.9.51",
|
"@budibase/standard-components": "^0.9.53",
|
||||||
"@budibase/string-templates": "^0.9.51",
|
"@budibase/string-templates": "^0.9.53",
|
||||||
"regexparam": "^1.3.0",
|
"regexparam": "^1.3.0",
|
||||||
"shortid": "^2.2.15",
|
"shortid": "^2.2.15",
|
||||||
"svelte-spa-router": "^3.0.5"
|
"svelte-spa-router": "^3.0.5"
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
"name": "@budibase/server",
|
"name": "@budibase/server",
|
||||||
"email": "hi@budibase.com",
|
"email": "hi@budibase.com",
|
||||||
"version": "0.9.51",
|
"version": "0.9.53",
|
||||||
"description": "Budibase Web Server",
|
"description": "Budibase Web Server",
|
||||||
"main": "src/electron.js",
|
"main": "src/electron.js",
|
||||||
"repository": {
|
"repository": {
|
||||||
|
@ -55,9 +55,9 @@
|
||||||
"author": "Budibase",
|
"author": "Budibase",
|
||||||
"license": "AGPL-3.0-or-later",
|
"license": "AGPL-3.0-or-later",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@budibase/auth": "^0.9.51",
|
"@budibase/auth": "^0.9.53",
|
||||||
"@budibase/client": "^0.9.51",
|
"@budibase/client": "^0.9.53",
|
||||||
"@budibase/string-templates": "^0.9.51",
|
"@budibase/string-templates": "^0.9.53",
|
||||||
"@elastic/elasticsearch": "7.10.0",
|
"@elastic/elasticsearch": "7.10.0",
|
||||||
"@koa/router": "8.0.0",
|
"@koa/router": "8.0.0",
|
||||||
"@sendgrid/mail": "7.1.1",
|
"@sendgrid/mail": "7.1.1",
|
||||||
|
@ -109,7 +109,7 @@
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@babel/core": "^7.14.3",
|
"@babel/core": "^7.14.3",
|
||||||
"@babel/preset-env": "^7.14.4",
|
"@babel/preset-env": "^7.14.4",
|
||||||
"@budibase/standard-components": "^0.9.51",
|
"@budibase/standard-components": "^0.9.53",
|
||||||
"@jest/test-sequencer": "^24.8.0",
|
"@jest/test-sequencer": "^24.8.0",
|
||||||
"babel-jest": "^27.0.2",
|
"babel-jest": "^27.0.2",
|
||||||
"docker-compose": "^0.23.6",
|
"docker-compose": "^0.23.6",
|
||||||
|
|
|
@ -3,13 +3,15 @@ const vm = require("vm")
|
||||||
|
|
||||||
class ScriptExecutor {
|
class ScriptExecutor {
|
||||||
constructor(body) {
|
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 = vm.createContext(body.context)
|
||||||
this.context.fetch = fetch
|
this.context.fetch = fetch
|
||||||
}
|
}
|
||||||
|
|
||||||
execute() {
|
execute() {
|
||||||
return this.script.runInContext(this.context)
|
this.script.runInContext(this.context)
|
||||||
|
return this.context.out
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -7,6 +7,7 @@ const executeScript = require("./steps/executeScript")
|
||||||
const bash = require("./steps/bash")
|
const bash = require("./steps/bash")
|
||||||
const executeQuery = require("./steps/executeQuery")
|
const executeQuery = require("./steps/executeQuery")
|
||||||
const outgoingWebhook = require("./steps/outgoingWebhook")
|
const outgoingWebhook = require("./steps/outgoingWebhook")
|
||||||
|
const serverLog = require("./steps/serverLog")
|
||||||
const env = require("../environment")
|
const env = require("../environment")
|
||||||
const Sentry = require("@sentry/node")
|
const Sentry = require("@sentry/node")
|
||||||
const {
|
const {
|
||||||
|
@ -24,6 +25,7 @@ const BUILTIN_ACTIONS = {
|
||||||
EXECUTE_SCRIPT: executeScript.run,
|
EXECUTE_SCRIPT: executeScript.run,
|
||||||
EXECUTE_BASH: bash.run,
|
EXECUTE_BASH: bash.run,
|
||||||
EXECUTE_QUERY: executeQuery.run,
|
EXECUTE_QUERY: executeQuery.run,
|
||||||
|
SERVER_LOG: serverLog.run,
|
||||||
}
|
}
|
||||||
const BUILTIN_DEFINITIONS = {
|
const BUILTIN_DEFINITIONS = {
|
||||||
SEND_EMAIL: sendgridEmail.definition,
|
SEND_EMAIL: sendgridEmail.definition,
|
||||||
|
@ -35,6 +37,7 @@ const BUILTIN_DEFINITIONS = {
|
||||||
EXECUTE_SCRIPT: executeScript.definition,
|
EXECUTE_SCRIPT: executeScript.definition,
|
||||||
EXECUTE_QUERY: executeQuery.definition,
|
EXECUTE_QUERY: executeQuery.definition,
|
||||||
EXECUTE_BASH: bash.definition,
|
EXECUTE_BASH: bash.definition,
|
||||||
|
SERVER_LOG: serverLog.definition,
|
||||||
}
|
}
|
||||||
|
|
||||||
let MANIFEST = null
|
let MANIFEST = null
|
||||||
|
|
|
@ -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}`)
|
||||||
|
}
|
|
@ -211,14 +211,17 @@ class LinkController {
|
||||||
// iterate through the link IDs in the row field, see if any don't exist already
|
// iterate through the link IDs in the row field, see if any don't exist already
|
||||||
for (let linkId of rowField) {
|
for (let linkId of rowField) {
|
||||||
if (linkedSchema.relationshipType === RelationshipTypes.ONE_TO_MANY) {
|
if (linkedSchema.relationshipType === RelationshipTypes.ONE_TO_MANY) {
|
||||||
const links = (
|
let links = (
|
||||||
await getLinkDocuments({
|
await getLinkDocuments({
|
||||||
appId: this._appId,
|
appId: this._appId,
|
||||||
tableId: field.tableId,
|
tableId: field.tableId,
|
||||||
rowId: linkId,
|
rowId: linkId,
|
||||||
includeDocs: IncludeDocs.EXCLUDE,
|
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
|
// The 1 side of 1:N is already related to something else
|
||||||
// You must remove the existing relationship
|
// You must remove the existing relationship
|
||||||
|
|
|
@ -29,12 +29,12 @@
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"svelte"
|
"svelte"
|
||||||
],
|
],
|
||||||
"version": "0.9.51",
|
"version": "0.9.53",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"gitHead": "d1836a898cab3f8ab80ee6d8f42be1a9eed7dcdc",
|
"gitHead": "d1836a898cab3f8ab80ee6d8f42be1a9eed7dcdc",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@spectrum-css/link": "^3.1.3",
|
"@spectrum-css/link": "^3.1.3",
|
||||||
"@budibase/bbui": "^0.9.51",
|
"@budibase/bbui": "^0.9.53",
|
||||||
"@spectrum-css/page": "^3.0.1",
|
"@spectrum-css/page": "^3.0.1",
|
||||||
"@spectrum-css/vars": "^3.0.1",
|
"@spectrum-css/vars": "^3.0.1",
|
||||||
"apexcharts": "^3.22.1",
|
"apexcharts": "^3.22.1",
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "@budibase/string-templates",
|
"name": "@budibase/string-templates",
|
||||||
"version": "0.9.51",
|
"version": "0.9.53",
|
||||||
"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",
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
"name": "@budibase/worker",
|
"name": "@budibase/worker",
|
||||||
"email": "hi@budibase.com",
|
"email": "hi@budibase.com",
|
||||||
"version": "0.9.51",
|
"version": "0.9.53",
|
||||||
"description": "Budibase background service",
|
"description": "Budibase background service",
|
||||||
"main": "src/index.js",
|
"main": "src/index.js",
|
||||||
"repository": {
|
"repository": {
|
||||||
|
@ -21,8 +21,8 @@
|
||||||
"author": "Budibase",
|
"author": "Budibase",
|
||||||
"license": "AGPL-3.0-or-later",
|
"license": "AGPL-3.0-or-later",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@budibase/auth": "^0.9.51",
|
"@budibase/auth": "^0.9.53",
|
||||||
"@budibase/string-templates": "^0.9.51",
|
"@budibase/string-templates": "^0.9.53",
|
||||||
"@koa/router": "^8.0.0",
|
"@koa/router": "^8.0.0",
|
||||||
"aws-sdk": "^2.811.0",
|
"aws-sdk": "^2.811.0",
|
||||||
"bcryptjs": "^2.4.3",
|
"bcryptjs": "^2.4.3",
|
||||||
|
|
|
@ -53,7 +53,6 @@ describe("/api/admin/email", () => {
|
||||||
|
|
||||||
it("should be able to send a welcome email", async () => {
|
it("should be able to send a welcome email", async () => {
|
||||||
await sendRealEmail(EmailTemplatePurpose.WELCOME)
|
await sendRealEmail(EmailTemplatePurpose.WELCOME)
|
||||||
|
|
||||||
})
|
})
|
||||||
|
|
||||||
it("should be able to send a invitation email", async () => {
|
it("should be able to send a invitation email", async () => {
|
||||||
|
|
Loading…
Reference in New Issue