@budibase/server 2.3.17-alpha.8 → 2.3.18-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/builder/assets/{index.9d8c3105.js → index.e7d5703a.js} +2 -2
- package/builder/index.html +1 -1
- package/dist/api/controllers/row/staticFormula.js +5 -1
- package/dist/automations/steps/discord.js +29 -11
- package/dist/automations/steps/integromat.js +31 -13
- package/dist/automations/steps/slack.js +27 -9
- package/dist/automations/steps/zapier.js +32 -14
- package/dist/package.json +6 -6
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +7 -7
- package/src/api/controllers/row/staticFormula.ts +7 -1
- package/src/automations/steps/discord.ts +27 -11
- package/src/automations/steps/integromat.ts +29 -13
- package/src/automations/steps/slack.ts +25 -9
- package/src/automations/steps/zapier.ts +30 -14
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@budibase/server",
|
|
3
3
|
"email": "hi@budibase.com",
|
|
4
|
-
"version": "2.3.
|
|
4
|
+
"version": "2.3.18-alpha.0",
|
|
5
5
|
"description": "Budibase Web Server",
|
|
6
6
|
"main": "src/index.ts",
|
|
7
7
|
"repository": {
|
|
@@ -43,11 +43,11 @@
|
|
|
43
43
|
"license": "GPL-3.0",
|
|
44
44
|
"dependencies": {
|
|
45
45
|
"@apidevtools/swagger-parser": "10.0.3",
|
|
46
|
-
"@budibase/backend-core": "2.3.
|
|
47
|
-
"@budibase/client": "2.3.
|
|
48
|
-
"@budibase/pro": "2.3.17
|
|
49
|
-
"@budibase/string-templates": "2.3.
|
|
50
|
-
"@budibase/types": "2.3.
|
|
46
|
+
"@budibase/backend-core": "2.3.18-alpha.0",
|
|
47
|
+
"@budibase/client": "2.3.18-alpha.0",
|
|
48
|
+
"@budibase/pro": "2.3.17",
|
|
49
|
+
"@budibase/string-templates": "2.3.18-alpha.0",
|
|
50
|
+
"@budibase/types": "2.3.18-alpha.0",
|
|
51
51
|
"@bull-board/api": "3.7.0",
|
|
52
52
|
"@bull-board/koa": "3.9.4",
|
|
53
53
|
"@elastic/elasticsearch": "7.10.0",
|
|
@@ -173,5 +173,5 @@
|
|
|
173
173
|
"optionalDependencies": {
|
|
174
174
|
"oracledb": "5.3.0"
|
|
175
175
|
},
|
|
176
|
-
"gitHead": "
|
|
176
|
+
"gitHead": "f4dd710b75eb0a7a65e6f9d8b8f709d3b76c435b"
|
|
177
177
|
}
|
|
@@ -38,7 +38,13 @@ export async function updateRelatedFormula(
|
|
|
38
38
|
if (!relatedRows[relatedTableId]) {
|
|
39
39
|
relatedRows[relatedTableId] = []
|
|
40
40
|
}
|
|
41
|
-
|
|
41
|
+
// filter down to the rows which are not already included in related
|
|
42
|
+
const currentIds = relatedRows[relatedTableId].map(row => row._id)
|
|
43
|
+
const uniqueRelatedRows = field.filter(
|
|
44
|
+
(row: Row) => !currentIds.includes(row._id)
|
|
45
|
+
)
|
|
46
|
+
relatedRows[relatedTableId] =
|
|
47
|
+
relatedRows[relatedTableId].concat(uniqueRelatedRows)
|
|
42
48
|
}
|
|
43
49
|
}
|
|
44
50
|
for (let tableId of table.relatedFormula) {
|
|
@@ -67,17 +67,33 @@ export async function run({ inputs }: AutomationStepInput) {
|
|
|
67
67
|
if (!avatar_url) {
|
|
68
68
|
avatar_url = DEFAULT_AVATAR_URL
|
|
69
69
|
}
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
70
|
+
if (!url?.trim()?.length) {
|
|
71
|
+
return {
|
|
72
|
+
httpStatus: 400,
|
|
73
|
+
response: "Missing Webhook URL",
|
|
74
|
+
success: false,
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
let response
|
|
78
|
+
try {
|
|
79
|
+
response = await fetch(url, {
|
|
80
|
+
method: "post",
|
|
81
|
+
body: JSON.stringify({
|
|
82
|
+
username,
|
|
83
|
+
avatar_url,
|
|
84
|
+
content,
|
|
85
|
+
}),
|
|
86
|
+
headers: {
|
|
87
|
+
"Content-Type": "application/json",
|
|
88
|
+
},
|
|
89
|
+
})
|
|
90
|
+
} catch (err: any) {
|
|
91
|
+
return {
|
|
92
|
+
httpStatus: 400,
|
|
93
|
+
response: err.message,
|
|
94
|
+
success: false,
|
|
95
|
+
}
|
|
96
|
+
}
|
|
81
97
|
|
|
82
98
|
const { status, message } = await getFetchResponse(response)
|
|
83
99
|
return {
|
|
@@ -69,19 +69,35 @@ export const definition: AutomationStepSchema = {
|
|
|
69
69
|
export async function run({ inputs }: AutomationStepInput) {
|
|
70
70
|
const { url, value1, value2, value3, value4, value5 } = inputs
|
|
71
71
|
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
72
|
+
if (!url?.trim()?.length) {
|
|
73
|
+
return {
|
|
74
|
+
httpStatus: 400,
|
|
75
|
+
response: "Missing Webhook URL",
|
|
76
|
+
success: false,
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
let response
|
|
80
|
+
try {
|
|
81
|
+
response = await fetch(url, {
|
|
82
|
+
method: "post",
|
|
83
|
+
body: JSON.stringify({
|
|
84
|
+
value1,
|
|
85
|
+
value2,
|
|
86
|
+
value3,
|
|
87
|
+
value4,
|
|
88
|
+
value5,
|
|
89
|
+
}),
|
|
90
|
+
headers: {
|
|
91
|
+
"Content-Type": "application/json",
|
|
92
|
+
},
|
|
93
|
+
})
|
|
94
|
+
} catch (err: any) {
|
|
95
|
+
return {
|
|
96
|
+
httpStatus: 400,
|
|
97
|
+
response: err.message,
|
|
98
|
+
success: false,
|
|
99
|
+
}
|
|
100
|
+
}
|
|
85
101
|
|
|
86
102
|
const { status, message } = await getFetchResponse(response)
|
|
87
103
|
return {
|
|
@@ -50,15 +50,31 @@ export const definition: AutomationStepSchema = {
|
|
|
50
50
|
|
|
51
51
|
export async function run({ inputs }: AutomationStepInput) {
|
|
52
52
|
let { url, text } = inputs
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
53
|
+
if (!url?.trim()?.length) {
|
|
54
|
+
return {
|
|
55
|
+
httpStatus: 400,
|
|
56
|
+
response: "Missing Webhook URL",
|
|
57
|
+
success: false,
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
let response
|
|
61
|
+
try {
|
|
62
|
+
response = await fetch(url, {
|
|
63
|
+
method: "post",
|
|
64
|
+
body: JSON.stringify({
|
|
65
|
+
text,
|
|
66
|
+
}),
|
|
67
|
+
headers: {
|
|
68
|
+
"Content-Type": "application/json",
|
|
69
|
+
},
|
|
70
|
+
})
|
|
71
|
+
} catch (err: any) {
|
|
72
|
+
return {
|
|
73
|
+
httpStatus: 400,
|
|
74
|
+
response: err.message,
|
|
75
|
+
success: false,
|
|
76
|
+
}
|
|
77
|
+
}
|
|
62
78
|
|
|
63
79
|
const { status, message } = await getFetchResponse(response)
|
|
64
80
|
return {
|
|
@@ -63,22 +63,38 @@ export const definition: AutomationStepSchema = {
|
|
|
63
63
|
export async function run({ inputs }: AutomationStepInput) {
|
|
64
64
|
const { url, value1, value2, value3, value4, value5 } = inputs
|
|
65
65
|
|
|
66
|
+
if (!url?.trim()?.length) {
|
|
67
|
+
return {
|
|
68
|
+
httpStatus: 400,
|
|
69
|
+
response: "Missing Webhook URL",
|
|
70
|
+
success: false,
|
|
71
|
+
}
|
|
72
|
+
}
|
|
66
73
|
// send the platform to make sure zaps always work, even
|
|
67
74
|
// if no values supplied
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
75
|
+
let response
|
|
76
|
+
try {
|
|
77
|
+
response = await fetch(url, {
|
|
78
|
+
method: "post",
|
|
79
|
+
body: JSON.stringify({
|
|
80
|
+
platform: "budibase",
|
|
81
|
+
value1,
|
|
82
|
+
value2,
|
|
83
|
+
value3,
|
|
84
|
+
value4,
|
|
85
|
+
value5,
|
|
86
|
+
}),
|
|
87
|
+
headers: {
|
|
88
|
+
"Content-Type": "application/json",
|
|
89
|
+
},
|
|
90
|
+
})
|
|
91
|
+
} catch (err: any) {
|
|
92
|
+
return {
|
|
93
|
+
httpStatus: 400,
|
|
94
|
+
response: err.message,
|
|
95
|
+
success: false,
|
|
96
|
+
}
|
|
97
|
+
}
|
|
82
98
|
|
|
83
99
|
const { status, message } = await getFetchResponse(response)
|
|
84
100
|
|