@budibase/server 2.6.4 → 2.6.6
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.a535cd7c.js → index.821e6877.js} +1 -1
- package/builder/assets/make.3cbeb1d5.svg +1 -0
- package/builder/index.html +1 -1
- package/dist/automations/actions.js +3 -3
- package/dist/automations/steps/{integromat.js → make.js} +4 -3
- package/dist/environment.js +1 -6
- package/dist/threads/index.js +3 -0
- package/dist/threads/utils.js +1 -3
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/dist/utilities/rowProcessor/map.js +17 -1
- package/package.json +8 -8
- package/src/api/routes/tests/row.spec.js +3 -0
- package/src/automations/actions.ts +3 -3
- package/src/automations/steps/{integromat.ts → make.ts} +4 -3
- package/src/environment.ts +1 -7
- package/src/threads/index.ts +6 -0
- package/src/threads/utils.ts +1 -3
- package/src/utilities/rowProcessor/map.ts +16 -1
- package/builder/assets/integromat.42212f11.png +0 -0
|
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.TYPE_TRANSFORM_MAP = void 0;
|
|
4
4
|
// @ts-nocheck
|
|
5
5
|
const constants_1 = require("../../constants");
|
|
6
|
+
const backend_core_1 = require("@budibase/backend-core");
|
|
6
7
|
/**
|
|
7
8
|
* A map of how we convert various properties in rows to each other based on the row type.
|
|
8
9
|
*/
|
|
@@ -69,9 +70,24 @@ exports.TYPE_TRANSFORM_MAP = {
|
|
|
69
70
|
},
|
|
70
71
|
},
|
|
71
72
|
[constants_1.FieldTypes.ATTACHMENT]: {
|
|
72
|
-
"": [],
|
|
73
73
|
[null]: [],
|
|
74
74
|
[undefined]: undefined,
|
|
75
|
+
parse: attachments => {
|
|
76
|
+
if (typeof attachments === "string") {
|
|
77
|
+
if (attachments === "") {
|
|
78
|
+
return [];
|
|
79
|
+
}
|
|
80
|
+
let result;
|
|
81
|
+
try {
|
|
82
|
+
result = JSON.parse(attachments);
|
|
83
|
+
}
|
|
84
|
+
catch (e) {
|
|
85
|
+
backend_core_1.logging.logAlert("Could not parse attachments", e);
|
|
86
|
+
}
|
|
87
|
+
return result;
|
|
88
|
+
}
|
|
89
|
+
return attachments;
|
|
90
|
+
},
|
|
75
91
|
},
|
|
76
92
|
[constants_1.FieldTypes.BOOLEAN]: {
|
|
77
93
|
"": null,
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@budibase/server",
|
|
3
3
|
"email": "hi@budibase.com",
|
|
4
|
-
"version": "2.6.
|
|
4
|
+
"version": "2.6.6",
|
|
5
5
|
"description": "Budibase Web Server",
|
|
6
6
|
"main": "src/index.ts",
|
|
7
7
|
"repository": {
|
|
@@ -45,12 +45,12 @@
|
|
|
45
45
|
"license": "GPL-3.0",
|
|
46
46
|
"dependencies": {
|
|
47
47
|
"@apidevtools/swagger-parser": "10.0.3",
|
|
48
|
-
"@budibase/backend-core": "^2.6.
|
|
49
|
-
"@budibase/client": "^2.6.
|
|
50
|
-
"@budibase/pro": "2.6.
|
|
51
|
-
"@budibase/shared-core": "^2.6.
|
|
52
|
-
"@budibase/string-templates": "^2.6.
|
|
53
|
-
"@budibase/types": "^2.6.
|
|
48
|
+
"@budibase/backend-core": "^2.6.6",
|
|
49
|
+
"@budibase/client": "^2.6.6",
|
|
50
|
+
"@budibase/pro": "2.6.5",
|
|
51
|
+
"@budibase/shared-core": "^2.6.6",
|
|
52
|
+
"@budibase/string-templates": "^2.6.6",
|
|
53
|
+
"@budibase/types": "^2.6.6",
|
|
54
54
|
"@bull-board/api": "3.7.0",
|
|
55
55
|
"@bull-board/koa": "3.9.4",
|
|
56
56
|
"@elastic/elasticsearch": "7.10.0",
|
|
@@ -176,5 +176,5 @@
|
|
|
176
176
|
"optionalDependencies": {
|
|
177
177
|
"oracledb": "5.3.0"
|
|
178
178
|
},
|
|
179
|
-
"gitHead": "
|
|
179
|
+
"gitHead": "10190c268354c5181da9150194a99964ce721bb5"
|
|
180
180
|
}
|
|
@@ -212,6 +212,7 @@ describe("/rows", () => {
|
|
|
212
212
|
attachmentNull: attachment,
|
|
213
213
|
attachmentUndefined: attachment,
|
|
214
214
|
attachmentEmpty: attachment,
|
|
215
|
+
attachmentEmptyArrayStr: attachment
|
|
215
216
|
},
|
|
216
217
|
})
|
|
217
218
|
|
|
@@ -239,6 +240,7 @@ describe("/rows", () => {
|
|
|
239
240
|
attachmentNull: null,
|
|
240
241
|
attachmentUndefined: undefined,
|
|
241
242
|
attachmentEmpty: "",
|
|
243
|
+
attachmentEmptyArrayStr: "[]",
|
|
242
244
|
}
|
|
243
245
|
|
|
244
246
|
const id = (await config.createRow(row))._id
|
|
@@ -268,6 +270,7 @@ describe("/rows", () => {
|
|
|
268
270
|
expect(saved.attachmentNull).toEqual([])
|
|
269
271
|
expect(saved.attachmentUndefined).toBe(undefined)
|
|
270
272
|
expect(saved.attachmentEmpty).toEqual([])
|
|
273
|
+
expect(saved.attachmentEmptyArrayStr).toEqual([])
|
|
271
274
|
})
|
|
272
275
|
})
|
|
273
276
|
|
|
@@ -9,7 +9,7 @@ import * as serverLog from "./steps/serverLog"
|
|
|
9
9
|
import * as discord from "./steps/discord"
|
|
10
10
|
import * as slack from "./steps/slack"
|
|
11
11
|
import * as zapier from "./steps/zapier"
|
|
12
|
-
import * as
|
|
12
|
+
import * as make from "./steps/make"
|
|
13
13
|
import * as filter from "./steps/filter"
|
|
14
14
|
import * as delay from "./steps/delay"
|
|
15
15
|
import * as queryRow from "./steps/queryRows"
|
|
@@ -43,7 +43,7 @@ const ACTION_IMPLS: Record<
|
|
|
43
43
|
discord: discord.run,
|
|
44
44
|
slack: slack.run,
|
|
45
45
|
zapier: zapier.run,
|
|
46
|
-
integromat:
|
|
46
|
+
integromat: make.run,
|
|
47
47
|
}
|
|
48
48
|
export const BUILTIN_ACTION_DEFINITIONS: Record<string, AutomationStepSchema> =
|
|
49
49
|
{
|
|
@@ -63,7 +63,7 @@ export const BUILTIN_ACTION_DEFINITIONS: Record<string, AutomationStepSchema> =
|
|
|
63
63
|
discord: discord.definition,
|
|
64
64
|
slack: slack.definition,
|
|
65
65
|
zapier: zapier.definition,
|
|
66
|
-
integromat:
|
|
66
|
+
integromat: make.definition,
|
|
67
67
|
}
|
|
68
68
|
|
|
69
69
|
// don't add the bash script/definitions unless in self host
|
|
@@ -9,10 +9,11 @@ import {
|
|
|
9
9
|
} from "@budibase/types"
|
|
10
10
|
|
|
11
11
|
export const definition: AutomationStepSchema = {
|
|
12
|
-
name: "
|
|
13
|
-
|
|
12
|
+
name: "Make Integration",
|
|
13
|
+
stepTitle: "Make",
|
|
14
|
+
tagline: "Trigger a Make scenario",
|
|
14
15
|
description:
|
|
15
|
-
"Performs a webhook call to
|
|
16
|
+
"Performs a webhook call to Make and gets the response (if configured)",
|
|
16
17
|
icon: "ri-shut-down-line",
|
|
17
18
|
stepId: AutomationActionStepId.integromat,
|
|
18
19
|
type: AutomationStepType.ACTION,
|
package/src/environment.ts
CHANGED
|
@@ -34,8 +34,6 @@ function parseIntSafe(number?: string) {
|
|
|
34
34
|
}
|
|
35
35
|
}
|
|
36
36
|
|
|
37
|
-
let inThread = false
|
|
38
|
-
|
|
39
37
|
const environment = {
|
|
40
38
|
// important - prefer app port to generic port
|
|
41
39
|
PORT: process.env.APP_PORT || process.env.PORT,
|
|
@@ -95,12 +93,8 @@ const environment = {
|
|
|
95
93
|
isProd: () => {
|
|
96
94
|
return !isDev()
|
|
97
95
|
},
|
|
98
|
-
// used to check if already in a thread, don't thread further
|
|
99
|
-
setInThread: () => {
|
|
100
|
-
inThread = true
|
|
101
|
-
},
|
|
102
96
|
isInThread: () => {
|
|
103
|
-
return
|
|
97
|
+
return process.env.FORKED_PROCESS
|
|
104
98
|
},
|
|
105
99
|
}
|
|
106
100
|
|
package/src/threads/index.ts
CHANGED
|
@@ -39,6 +39,12 @@ export class Thread {
|
|
|
39
39
|
const workerOpts: any = {
|
|
40
40
|
autoStart: true,
|
|
41
41
|
maxConcurrentWorkers: this.count,
|
|
42
|
+
workerOptions: {
|
|
43
|
+
env: {
|
|
44
|
+
...process.env,
|
|
45
|
+
FORKED_PROCESS: "1",
|
|
46
|
+
},
|
|
47
|
+
},
|
|
42
48
|
}
|
|
43
49
|
if (opts.timeoutMs) {
|
|
44
50
|
this.timeoutMs = opts.timeoutMs
|
package/src/threads/utils.ts
CHANGED
|
@@ -25,11 +25,9 @@ function makeVariableKey(queryId: string, variable: string) {
|
|
|
25
25
|
|
|
26
26
|
export function threadSetup() {
|
|
27
27
|
// don't run this if not threading
|
|
28
|
-
if (env.isTest() || env.DISABLE_THREADING) {
|
|
28
|
+
if (env.isTest() || env.DISABLE_THREADING || !env.isInThread()) {
|
|
29
29
|
return
|
|
30
30
|
}
|
|
31
|
-
// when thread starts, make sure it is recorded
|
|
32
|
-
env.setInThread()
|
|
33
31
|
db.init()
|
|
34
32
|
}
|
|
35
33
|
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
// @ts-nocheck
|
|
2
2
|
import { FieldTypes } from "../../constants"
|
|
3
|
+
import { logging } from "@budibase/backend-core"
|
|
3
4
|
|
|
4
5
|
/**
|
|
5
6
|
* A map of how we convert various properties in rows to each other based on the row type.
|
|
@@ -67,9 +68,23 @@ export const TYPE_TRANSFORM_MAP: any = {
|
|
|
67
68
|
},
|
|
68
69
|
},
|
|
69
70
|
[FieldTypes.ATTACHMENT]: {
|
|
70
|
-
"": [],
|
|
71
71
|
[null]: [],
|
|
72
72
|
[undefined]: undefined,
|
|
73
|
+
parse: attachments => {
|
|
74
|
+
if (typeof attachments === "string") {
|
|
75
|
+
if (attachments === "") {
|
|
76
|
+
return []
|
|
77
|
+
}
|
|
78
|
+
let result
|
|
79
|
+
try {
|
|
80
|
+
result = JSON.parse(attachments)
|
|
81
|
+
} catch (e) {
|
|
82
|
+
logging.logAlert("Could not parse attachments", e)
|
|
83
|
+
}
|
|
84
|
+
return result
|
|
85
|
+
}
|
|
86
|
+
return attachments
|
|
87
|
+
},
|
|
73
88
|
},
|
|
74
89
|
[FieldTypes.BOOLEAN]: {
|
|
75
90
|
"": null,
|
|
Binary file
|