@budibase/server 1.0.219-alpha.7 → 1.0.219
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/__mocks__/node-fetch.ts +0 -9
- package/builder/assets/index.1c640a53.js +1316 -0
- package/builder/assets/index.24307ca0.css +6 -0
- package/builder/assets/{vendor.001dcf8c.js → vendor.9bf2fcb4.js} +163 -163
- package/builder/index.html +3 -3
- package/coverage/clover.xml +794 -868
- package/coverage/coverage-final.json +26 -26
- package/coverage/lcov-report/api/controllers/apikeys.js.html +1 -1
- package/coverage/lcov-report/api/controllers/auth.js.html +1 -1
- package/coverage/lcov-report/api/controllers/automation.js.html +12 -111
- package/coverage/lcov-report/api/controllers/backup.js.html +6 -9
- package/coverage/lcov-report/api/controllers/cloud.js.html +1 -1
- package/coverage/lcov-report/api/controllers/component.js.html +1 -1
- package/coverage/lcov-report/api/controllers/datasource.js.html +16 -16
- package/coverage/lcov-report/api/controllers/dev.js.html +1 -1
- package/coverage/lcov-report/api/controllers/index.html +21 -21
- package/coverage/lcov-report/api/controllers/integration.js.html +1 -1
- package/coverage/lcov-report/api/controllers/layout.js.html +1 -1
- package/coverage/lcov-report/api/controllers/metadata.js.html +1 -1
- package/coverage/lcov-report/api/controllers/migrations.js.html +1 -1
- package/coverage/lcov-report/api/controllers/permission.js.html +1 -1
- package/coverage/lcov-report/api/controllers/query/index.html +1 -1
- package/coverage/lcov-report/api/controllers/query/validation.js.html +1 -1
- package/coverage/lcov-report/api/controllers/role.js.html +1 -1
- package/coverage/lcov-report/api/controllers/routing.js.html +1 -1
- package/coverage/lcov-report/api/controllers/row/external.js.html +17 -47
- package/coverage/lcov-report/api/controllers/row/index.html +34 -34
- package/coverage/lcov-report/api/controllers/row/internal.js.html +1 -1
- package/coverage/lcov-report/api/controllers/row/internalSearch.js.html +11 -95
- package/coverage/lcov-report/api/controllers/row/staticFormula.js.html +1 -1
- package/coverage/lcov-report/api/controllers/row/utils.js.html +8 -17
- package/coverage/lcov-report/api/controllers/screen.js.html +1 -1
- package/coverage/lcov-report/api/controllers/script.js.html +1 -1
- package/coverage/lcov-report/api/controllers/table/bulkFormula.js.html +1 -1
- package/coverage/lcov-report/api/controllers/table/external.js.html +1 -1
- package/coverage/lcov-report/api/controllers/table/index.html +1 -1
- package/coverage/lcov-report/api/controllers/table/index.js.html +1 -1
- package/coverage/lcov-report/api/controllers/templates.js.html +1 -1
- package/coverage/lcov-report/api/controllers/user.js.html +1 -1
- package/coverage/lcov-report/api/controllers/view/exporters.js.html +1 -1
- package/coverage/lcov-report/api/controllers/view/index.html +1 -1
- package/coverage/lcov-report/api/controllers/view/index.js.html +1 -1
- package/coverage/lcov-report/api/controllers/view/utils.js.html +1 -1
- package/coverage/lcov-report/api/controllers/view/viewBuilder.js.html +1 -1
- package/coverage/lcov-report/api/controllers/webhook.js.html +1 -1
- package/coverage/lcov-report/api/index.html +15 -15
- package/coverage/lcov-report/api/index.js.html +13 -22
- package/coverage/lcov-report/api/routes/analytics.js.html +1 -1
- package/coverage/lcov-report/api/routes/apikeys.js.html +1 -1
- package/coverage/lcov-report/api/routes/auth.js.html +1 -1
- package/coverage/lcov-report/api/routes/automation.js.html +2 -32
- package/coverage/lcov-report/api/routes/backup.js.html +1 -1
- package/coverage/lcov-report/api/routes/cloud.js.html +1 -1
- package/coverage/lcov-report/api/routes/component.js.html +1 -1
- package/coverage/lcov-report/api/routes/datasource.js.html +1 -1
- package/coverage/lcov-report/api/routes/deploy.js.html +1 -1
- package/coverage/lcov-report/api/routes/dev.js.html +1 -1
- package/coverage/lcov-report/api/routes/index.html +1 -1
- package/coverage/lcov-report/api/routes/integration.js.html +1 -1
- package/coverage/lcov-report/api/routes/layout.js.html +1 -1
- package/coverage/lcov-report/api/routes/metadata.js.html +1 -1
- package/coverage/lcov-report/api/routes/migrations.js.html +1 -1
- package/coverage/lcov-report/api/routes/permission.js.html +1 -1
- package/coverage/lcov-report/api/routes/query.js.html +1 -1
- package/coverage/lcov-report/api/routes/role.js.html +1 -1
- package/coverage/lcov-report/api/routes/routing.js.html +1 -1
- package/coverage/lcov-report/api/routes/screen.js.html +1 -1
- package/coverage/lcov-report/api/routes/script.js.html +1 -1
- package/coverage/lcov-report/api/routes/table.js.html +1 -1
- package/coverage/lcov-report/api/routes/templates.js.html +1 -1
- package/coverage/lcov-report/api/routes/user.js.html +1 -1
- package/coverage/lcov-report/api/routes/utils/index.html +1 -1
- package/coverage/lcov-report/api/routes/utils/validators.js.html +1 -1
- package/coverage/lcov-report/api/routes/view.js.html +1 -1
- package/coverage/lcov-report/api/routes/webhook.js.html +1 -1
- package/coverage/lcov-report/automations/actions.js.html +1 -1
- package/coverage/lcov-report/automations/automationUtils.js.html +12 -57
- package/coverage/lcov-report/automations/bullboard.js.html +1 -1
- package/coverage/lcov-report/automations/index.html +17 -17
- package/coverage/lcov-report/automations/index.js.html +1 -1
- package/coverage/lcov-report/automations/steps/bash.js.html +1 -1
- package/coverage/lcov-report/automations/steps/delay.js.html +1 -1
- package/coverage/lcov-report/automations/steps/discord.js.html +1 -1
- package/coverage/lcov-report/automations/steps/executeQuery.js.html +1 -1
- package/coverage/lcov-report/automations/steps/executeScript.js.html +1 -1
- package/coverage/lcov-report/automations/steps/filter.js.html +34 -58
- package/coverage/lcov-report/automations/steps/index.html +11 -11
- package/coverage/lcov-report/automations/steps/integromat.js.html +1 -1
- package/coverage/lcov-report/automations/steps/loop.js.html +1 -1
- package/coverage/lcov-report/automations/steps/outgoingWebhook.js.html +1 -1
- package/coverage/lcov-report/automations/steps/queryRows.js.html +1 -1
- package/coverage/lcov-report/automations/steps/sendSmtpEmail.js.html +1 -1
- package/coverage/lcov-report/automations/steps/serverLog.js.html +1 -1
- package/coverage/lcov-report/automations/steps/slack.js.html +1 -1
- package/coverage/lcov-report/automations/steps/updateRow.js.html +1 -1
- package/coverage/lcov-report/automations/steps/utils.js.html +1 -1
- package/coverage/lcov-report/automations/steps/zapier.js.html +1 -1
- package/coverage/lcov-report/automations/triggerInfo/app.js.html +1 -1
- package/coverage/lcov-report/automations/triggerInfo/cron.js.html +1 -1
- package/coverage/lcov-report/automations/triggerInfo/index.html +1 -1
- package/coverage/lcov-report/automations/triggerInfo/index.js.html +1 -1
- package/coverage/lcov-report/automations/triggerInfo/rowDeleted.js.html +1 -1
- package/coverage/lcov-report/automations/triggerInfo/rowSaved.js.html +1 -1
- package/coverage/lcov-report/automations/triggerInfo/rowUpdated.js.html +1 -1
- package/coverage/lcov-report/automations/triggerInfo/webhook.js.html +1 -1
- package/coverage/lcov-report/automations/triggers.js.html +4 -4
- package/coverage/lcov-report/constants/index.html +1 -1
- package/coverage/lcov-report/constants/index.js.html +1 -1
- package/coverage/lcov-report/constants/layouts.js.html +1 -1
- package/coverage/lcov-report/constants/screens.js.html +1 -1
- package/coverage/lcov-report/db/inMemoryView.js.html +1 -1
- package/coverage/lcov-report/db/index.html +14 -14
- package/coverage/lcov-report/db/index.js.html +1 -1
- package/coverage/lcov-report/db/linkedRows/LinkController.js.html +1 -1
- package/coverage/lcov-report/db/linkedRows/index.html +13 -13
- package/coverage/lcov-report/db/linkedRows/index.js.html +7 -10
- package/coverage/lcov-report/db/linkedRows/linkUtils.js.html +1 -1
- package/coverage/lcov-report/db/newid.js.html +2 -2
- package/coverage/lcov-report/db/utils.js.html +51 -27
- package/coverage/lcov-report/events/AutomationEmitter.js.html +1 -1
- package/coverage/lcov-report/events/index.html +1 -1
- package/coverage/lcov-report/events/index.js.html +1 -1
- package/coverage/lcov-report/events/utils.js.html +1 -1
- package/coverage/lcov-report/index.html +74 -74
- package/coverage/lcov-report/integrations/tests/TestConfiguration.js.html +1 -1
- package/coverage/lcov-report/integrations/tests/index.html +1 -1
- package/coverage/lcov-report/middleware/appInfo.js.html +1 -1
- package/coverage/lcov-report/middleware/builder.js.html +12 -12
- package/coverage/lcov-report/middleware/currentapp.js.html +33 -33
- package/coverage/lcov-report/middleware/index.html +1 -1
- package/coverage/lcov-report/middleware/joi-validator.js.html +10 -10
- package/coverage/lcov-report/middleware/publicApi.js.html +1 -1
- package/coverage/lcov-report/middleware/resourceId.js.html +7 -7
- package/coverage/lcov-report/middleware/selfhost.js.html +1 -1
- package/coverage/lcov-report/middleware/utils.js.html +2 -2
- package/coverage/lcov-report/threads/automation.js.html +9 -18
- package/coverage/lcov-report/threads/index.html +25 -25
- package/coverage/lcov-report/threads/query.js.html +76 -283
- package/coverage/lcov-report/threads/utils.js.html +4 -4
- package/coverage/lcov-report/utilities/budibaseDir.js.html +1 -1
- package/coverage/lcov-report/utilities/centralPath.js.html +1 -1
- package/coverage/lcov-report/utilities/csvParser.js.html +1 -1
- package/coverage/lcov-report/utilities/global.js.html +14 -14
- package/coverage/lcov-report/utilities/index.html +1 -1
- package/coverage/lcov-report/utilities/index.js.html +9 -9
- package/coverage/lcov-report/utilities/queue/inMemoryQueue.js.html +2 -2
- package/coverage/lcov-report/utilities/queue/index.html +1 -1
- package/coverage/lcov-report/utilities/routing/index.html +1 -1
- package/coverage/lcov-report/utilities/routing/index.js.html +1 -1
- package/coverage/lcov-report/utilities/rowProcessor/index.html +1 -1
- package/coverage/lcov-report/utilities/rowProcessor/index.js.html +1 -1
- package/coverage/lcov-report/utilities/rowProcessor/utils.js.html +1 -1
- package/coverage/lcov-report/utilities/scriptRunner.js.html +1 -1
- package/coverage/lcov-report/utilities/security.js.html +2 -2
- package/coverage/lcov-report/utilities/statusCodes.js.html +1 -1
- package/coverage/lcov-report/utilities/usageQuota/index.html +1 -1
- package/coverage/lcov-report/utilities/usageQuota/rows.js.html +1 -1
- package/coverage/lcov-report/utilities/usageQuota/usageQuoteReset.js.html +1 -1
- package/coverage/lcov-report/utilities/users.js.html +1 -1
- package/coverage/lcov-report/utilities/workerRequests.js.html +1 -1
- package/coverage/lcov.info +1425 -1553
- package/dist/api/controllers/application.js +15 -18
- package/dist/api/controllers/automation.js +2 -28
- package/dist/api/controllers/backup.js +2 -3
- package/dist/api/controllers/query/index.js +0 -25
- package/dist/api/controllers/row/external.js +7 -19
- package/dist/api/controllers/row/internalSearch.js +1 -22
- package/dist/api/controllers/row/utils.js +0 -3
- package/dist/api/index.js +1 -4
- package/dist/api/routes/automation.js +0 -2
- package/dist/automations/automationUtils.js +4 -16
- package/dist/automations/steps/filter.js +29 -38
- package/dist/automations/triggers.js +1 -1
- package/dist/db/linkedRows/index.js +0 -1
- package/dist/db/utils.js +31 -4
- package/dist/definitions/datasource.js +0 -1
- package/dist/environment.js +0 -1
- package/dist/integrations/airtable.js +0 -1
- package/dist/integrations/arangodb.js +0 -1
- package/dist/integrations/base/sql.js +3 -20
- package/dist/integrations/couchdb.js +0 -1
- package/dist/integrations/dynamodb.js +0 -1
- package/dist/integrations/elasticsearch.js +0 -1
- package/dist/integrations/firebase.js +0 -1
- package/dist/integrations/googlesheets.js +0 -1
- package/dist/integrations/index.js +0 -4
- package/dist/integrations/microsoftSqlServer.js +1 -2
- package/dist/integrations/mongodb.js +0 -1
- package/dist/integrations/mysql.js +1 -2
- package/dist/integrations/oracle.js +0 -1
- package/dist/integrations/postgres.js +1 -2
- package/dist/integrations/queries/sql.js +0 -3
- package/dist/integrations/redis.js +0 -1
- package/dist/integrations/rest.js +1 -2
- package/dist/integrations/s3.js +0 -1
- package/dist/package.json +6 -7
- package/dist/tests/utilities/TestConfiguration.js +6 -19
- package/dist/threads/automation.js +3 -6
- package/dist/threads/index.js +1 -15
- package/dist/threads/query.js +8 -54
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/dist/utilities/fileSystem/index.js +6 -16
- package/package.json +7 -8
- package/src/api/controllers/application.ts +14 -18
- package/src/api/controllers/automation.js +2 -35
- package/src/api/controllers/backup.js +2 -3
- package/src/api/controllers/query/index.ts +1 -29
- package/src/api/controllers/row/external.js +9 -19
- package/src/api/controllers/row/internalSearch.js +0 -28
- package/src/api/controllers/row/utils.js +0 -3
- package/src/api/index.js +1 -4
- package/src/api/routes/automation.js +0 -10
- package/src/api/routes/tests/query.spec.js +0 -166
- package/src/automations/automationUtils.js +4 -19
- package/src/automations/steps/filter.js +28 -36
- package/src/automations/tests/filter.spec.js +1 -2
- package/src/automations/triggers.js +1 -1
- package/src/db/linkedRows/index.js +0 -1
- package/src/db/utils.js +13 -5
- package/src/definitions/common.ts +0 -1
- package/src/definitions/datasource.ts +0 -2
- package/src/environment.js +0 -1
- package/src/integrations/airtable.ts +0 -1
- package/src/integrations/arangodb.ts +0 -1
- package/src/integrations/base/sql.ts +11 -25
- package/src/integrations/couchdb.ts +0 -1
- package/src/integrations/dynamodb.ts +0 -1
- package/src/integrations/elasticsearch.ts +0 -1
- package/src/integrations/firebase.ts +0 -1
- package/src/integrations/googlesheets.ts +0 -1
- package/src/integrations/index.ts +0 -4
- package/src/integrations/microsoftSqlServer.ts +0 -2
- package/src/integrations/mongodb.ts +0 -1
- package/src/integrations/mysql.ts +0 -2
- package/src/integrations/oracle.ts +0 -1
- package/src/integrations/postgres.ts +0 -2
- package/src/integrations/queries/sql.ts +1 -3
- package/src/integrations/redis.ts +0 -1
- package/src/integrations/rest.ts +1 -2
- package/src/integrations/s3.ts +0 -1
- package/src/integrations/tests/rest.spec.js +1 -16
- package/src/migrations/tests/index.spec.ts +2 -18
- package/src/module.d.ts +0 -2
- package/src/tests/utilities/TestConfiguration.js +3 -22
- package/src/threads/automation.js +3 -6
- package/src/threads/index.ts +1 -5
- package/src/threads/query.js +10 -79
- package/src/utilities/fileSystem/index.js +8 -22
- package/builder/assets/index.5a233c3d.js +0 -977
- package/builder/assets/index.7786f497.css +0 -6
- package/dist/automations/logging/index.js +0 -70
- package/dist/integrations/snowflake.js +0 -102
- package/scripts/integrations/oracle/instantclient/linux/arm64/basiclite-19.10.zip +0 -0
- package/scripts/integrations/oracle/instantclient/linux/arm64/install.sh +0 -23
- package/scripts/integrations/oracle/instantclient/linux/install.sh +0 -10
- package/src/automations/logging/index.ts +0 -35
- package/src/integrations/snowflake.ts +0 -99
|
@@ -50,51 +50,43 @@ exports.definition = {
|
|
|
50
50
|
outputs: {
|
|
51
51
|
properties: {
|
|
52
52
|
success: {
|
|
53
|
-
type: "boolean",
|
|
54
|
-
description: "Whether the action was successful",
|
|
55
|
-
},
|
|
56
|
-
result: {
|
|
57
53
|
type: "boolean",
|
|
58
54
|
description: "Whether the logic block passed",
|
|
59
55
|
},
|
|
60
56
|
},
|
|
61
|
-
required: ["success"
|
|
57
|
+
required: ["success"],
|
|
62
58
|
},
|
|
63
59
|
},
|
|
64
60
|
}
|
|
65
61
|
|
|
66
62
|
exports.run = async function filter({ inputs }) {
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
break
|
|
92
|
-
}
|
|
93
|
-
} else {
|
|
94
|
-
result = false
|
|
63
|
+
let { field, condition, value } = inputs
|
|
64
|
+
// coerce types so that we can use them
|
|
65
|
+
if (!isNaN(value) && !isNaN(field)) {
|
|
66
|
+
value = parseFloat(value)
|
|
67
|
+
field = parseFloat(field)
|
|
68
|
+
} else if (!isNaN(Date.parse(value)) && !isNaN(Date.parse(field))) {
|
|
69
|
+
value = Date.parse(value)
|
|
70
|
+
field = Date.parse(field)
|
|
71
|
+
}
|
|
72
|
+
let success = false
|
|
73
|
+
if (typeof field !== "object" && typeof value !== "object") {
|
|
74
|
+
switch (condition) {
|
|
75
|
+
case FilterConditions.EQUAL:
|
|
76
|
+
success = field === value
|
|
77
|
+
break
|
|
78
|
+
case FilterConditions.NOT_EQUAL:
|
|
79
|
+
success = field !== value
|
|
80
|
+
break
|
|
81
|
+
case FilterConditions.GREATER_THAN:
|
|
82
|
+
success = field > value
|
|
83
|
+
break
|
|
84
|
+
case FilterConditions.LESS_THAN:
|
|
85
|
+
success = field < value
|
|
86
|
+
break
|
|
95
87
|
}
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
return { success: false, result: false }
|
|
88
|
+
} else {
|
|
89
|
+
success = false
|
|
99
90
|
}
|
|
91
|
+
return { success }
|
|
100
92
|
}
|
|
@@ -6,8 +6,7 @@ describe("test the filter logic", () => {
|
|
|
6
6
|
let res = await setup.runStep(setup.actions.FILTER.stepId,
|
|
7
7
|
{ field, condition, value }
|
|
8
8
|
)
|
|
9
|
-
expect(res.
|
|
10
|
-
expect(res.success).toEqual(true)
|
|
9
|
+
expect(res.success).toEqual(pass)
|
|
11
10
|
}
|
|
12
11
|
|
|
13
12
|
it("should be able test equality", async () => {
|
|
@@ -97,7 +97,7 @@ exports.externalTrigger = async function (
|
|
|
97
97
|
// values are likely to be submitted as strings, so we shall convert to correct type
|
|
98
98
|
const coercedFields = {}
|
|
99
99
|
const fields = automation.definition.trigger.inputs.fields
|
|
100
|
-
for (let key of Object.keys(fields
|
|
100
|
+
for (let key of Object.keys(fields)) {
|
|
101
101
|
coercedFields[key] = coerce(params.fields[key], fields[key])
|
|
102
102
|
}
|
|
103
103
|
params.fields = coercedFields
|
|
@@ -65,7 +65,6 @@ async function getLinksForRows(rows) {
|
|
|
65
65
|
// return duplicates, could be querying for both tables in a relation
|
|
66
66
|
return getUniqueByProp(
|
|
67
67
|
responses
|
|
68
|
-
.filter(el => el != null)
|
|
69
68
|
// create a unique ID which we can use for getting only unique ones
|
|
70
69
|
.map(el => ({ ...el, unique: el.id + el.thisId + el.fieldName })),
|
|
71
70
|
"unique"
|
package/src/db/utils.js
CHANGED
|
@@ -11,8 +11,6 @@ const {
|
|
|
11
11
|
isProdAppID,
|
|
12
12
|
getDevelopmentAppID,
|
|
13
13
|
generateAppID,
|
|
14
|
-
getQueryIndex,
|
|
15
|
-
ViewNames,
|
|
16
14
|
} = require("@budibase/backend-core/db")
|
|
17
15
|
|
|
18
16
|
const UNICODE_MAX = "\ufff0"
|
|
@@ -24,7 +22,11 @@ const AppStatus = {
|
|
|
24
22
|
}
|
|
25
23
|
|
|
26
24
|
const DocumentTypes = {
|
|
27
|
-
|
|
25
|
+
APP: CoreDocTypes.APP,
|
|
26
|
+
DEV: CoreDocTypes.DEV,
|
|
27
|
+
APP_DEV: CoreDocTypes.APP_DEV,
|
|
28
|
+
APP_METADATA: CoreDocTypes.APP_METADATA,
|
|
29
|
+
ROLE: CoreDocTypes.ROLE,
|
|
28
30
|
TABLE: "ta",
|
|
29
31
|
ROW: "ro",
|
|
30
32
|
USER: "us",
|
|
@@ -43,6 +45,11 @@ const DocumentTypes = {
|
|
|
43
45
|
USER_FLAG: "flag",
|
|
44
46
|
}
|
|
45
47
|
|
|
48
|
+
const ViewNames = {
|
|
49
|
+
LINK: "by_link",
|
|
50
|
+
ROUTING: "screen_routes",
|
|
51
|
+
}
|
|
52
|
+
|
|
46
53
|
const InternalTables = {
|
|
47
54
|
USER_METADATA: "ta_users",
|
|
48
55
|
}
|
|
@@ -67,7 +74,6 @@ exports.isDevAppID = isDevAppID
|
|
|
67
74
|
exports.isProdAppID = isProdAppID
|
|
68
75
|
exports.USER_METDATA_PREFIX = `${DocumentTypes.ROW}${SEPARATOR}${InternalTables.USER_METADATA}${SEPARATOR}`
|
|
69
76
|
exports.LINK_USER_METADATA_PREFIX = `${DocumentTypes.LINK}${SEPARATOR}${InternalTables.USER_METADATA}${SEPARATOR}`
|
|
70
|
-
exports.TABLE_ROW_PREFIX = `${DocumentTypes.ROW}${SEPARATOR}${DocumentTypes.TABLE}`
|
|
71
77
|
exports.ViewNames = ViewNames
|
|
72
78
|
exports.InternalTables = InternalTables
|
|
73
79
|
exports.DocumentTypes = DocumentTypes
|
|
@@ -82,7 +88,9 @@ exports.generateDevAppID = getDevelopmentAppID
|
|
|
82
88
|
exports.generateRoleID = generateRoleID
|
|
83
89
|
exports.getRoleParams = getRoleParams
|
|
84
90
|
|
|
85
|
-
exports.getQueryIndex =
|
|
91
|
+
exports.getQueryIndex = viewName => {
|
|
92
|
+
return `database/${viewName}`
|
|
93
|
+
}
|
|
86
94
|
|
|
87
95
|
/**
|
|
88
96
|
* If creating DB allDocs/query params with only a single top level ID this can be used, this
|
|
@@ -50,7 +50,6 @@ export enum SourceNames {
|
|
|
50
50
|
GOOGLE_SHEETS = "GOOGLE_SHEETS",
|
|
51
51
|
FIRESTORE = "FIRESTORE",
|
|
52
52
|
REDIS = "REDIS",
|
|
53
|
-
SNOWFLAKE = "SNOWFLAKE",
|
|
54
53
|
}
|
|
55
54
|
|
|
56
55
|
export enum IncludeRelationships {
|
|
@@ -94,7 +93,6 @@ export interface Integration {
|
|
|
94
93
|
relationships?: boolean
|
|
95
94
|
description: string
|
|
96
95
|
friendlyName: string
|
|
97
|
-
type?: string
|
|
98
96
|
datasource: {}
|
|
99
97
|
query: {
|
|
100
98
|
[key: string]: QueryDefinition
|
package/src/environment.js
CHANGED
|
@@ -78,7 +78,6 @@ module.exports = {
|
|
|
78
78
|
ALLOW_DEV_AUTOMATIONS: process.env.ALLOW_DEV_AUTOMATIONS,
|
|
79
79
|
DISABLE_THREADING: process.env.DISABLE_THREADING,
|
|
80
80
|
DISABLE_DEVELOPER_LICENSE: process.env.DISABLE_DEVELOPER_LICENSE,
|
|
81
|
-
DISABLE_AUTOMATION_LOGS: process.env.DISABLE_AUTOMATION_LOGS,
|
|
82
81
|
MULTI_TENANCY: process.env.MULTI_TENANCY,
|
|
83
82
|
ENABLE_ANALYTICS: process.env.ENABLE_ANALYTICS,
|
|
84
83
|
SELF_HOSTED: process.env.SELF_HOSTED,
|
|
@@ -18,7 +18,6 @@ module AirtableModule {
|
|
|
18
18
|
description:
|
|
19
19
|
"Airtable is a spreadsheet-database hybrid, with the features of a database but applied to a spreadsheet.",
|
|
20
20
|
friendlyName: "Airtable",
|
|
21
|
-
type: "Spreadsheet",
|
|
22
21
|
datasource: {
|
|
23
22
|
apiKey: {
|
|
24
23
|
type: DatasourceFieldTypes.PASSWORD,
|
|
@@ -19,7 +19,6 @@ module ArangoModule {
|
|
|
19
19
|
const SCHEMA: Integration = {
|
|
20
20
|
docs: "https://github.com/arangodb/arangojs",
|
|
21
21
|
friendlyName: "ArangoDB",
|
|
22
|
-
type: "Non-relational",
|
|
23
22
|
description:
|
|
24
23
|
"ArangoDB is a scalable open-source multi-model database natively supporting graph, document and search. All supported data models & access patterns can be combined in queries allowing for maximal flexibility. ",
|
|
25
24
|
datasource: {
|
|
@@ -89,28 +89,6 @@ function parseFilters(filters: SearchFilters | undefined): SearchFilters {
|
|
|
89
89
|
return filters
|
|
90
90
|
}
|
|
91
91
|
|
|
92
|
-
function generateSelectStatement(
|
|
93
|
-
json: QueryJson,
|
|
94
|
-
knex: Knex
|
|
95
|
-
): (string | Knex.Raw)[] {
|
|
96
|
-
const { resource, meta } = json
|
|
97
|
-
const schema = meta?.table?.schema
|
|
98
|
-
return resource.fields.map(field => {
|
|
99
|
-
const fieldNames = field.split(/\./g)
|
|
100
|
-
const tableName = fieldNames[0]
|
|
101
|
-
const columnName = fieldNames[1]
|
|
102
|
-
if (columnName && knex.client.config.client === SqlClients.POSTGRES) {
|
|
103
|
-
const externalType = schema?.[columnName].externalType
|
|
104
|
-
if (externalType?.includes("money")) {
|
|
105
|
-
return knex.raw(
|
|
106
|
-
`"${tableName}"."${columnName}"::money::numeric as "${field}"`
|
|
107
|
-
)
|
|
108
|
-
}
|
|
109
|
-
}
|
|
110
|
-
return `${field} as ${field}`
|
|
111
|
-
})
|
|
112
|
-
}
|
|
113
|
-
|
|
114
92
|
class InternalBuilder {
|
|
115
93
|
private readonly client: string
|
|
116
94
|
|
|
@@ -238,7 +216,9 @@ class InternalBuilder {
|
|
|
238
216
|
}
|
|
239
217
|
|
|
240
218
|
addRelationships(
|
|
219
|
+
knex: Knex,
|
|
241
220
|
query: KnexQuery,
|
|
221
|
+
fields: string | string[],
|
|
242
222
|
fromTable: string,
|
|
243
223
|
relationships: RelationshipsJson[] | undefined
|
|
244
224
|
): KnexQuery {
|
|
@@ -343,12 +323,12 @@ class InternalBuilder {
|
|
|
343
323
|
if (!resource) {
|
|
344
324
|
resource = { fields: [] }
|
|
345
325
|
}
|
|
346
|
-
let selectStatement: string |
|
|
326
|
+
let selectStatement: string | string[] = "*"
|
|
347
327
|
// handle select
|
|
348
328
|
if (resource.fields && resource.fields.length > 0) {
|
|
349
329
|
// select the resources as the format "table.columnName" - this is what is provided
|
|
350
330
|
// by the resource builder further up
|
|
351
|
-
selectStatement =
|
|
331
|
+
selectStatement = resource.fields.map(field => `${field} as ${field}`)
|
|
352
332
|
}
|
|
353
333
|
let foundLimit = limit || BASE_LIMIT
|
|
354
334
|
// handle pagination
|
|
@@ -383,7 +363,13 @@ class InternalBuilder {
|
|
|
383
363
|
preQuery = this.addSorting(preQuery, json)
|
|
384
364
|
}
|
|
385
365
|
// handle joins
|
|
386
|
-
query = this.addRelationships(
|
|
366
|
+
query = this.addRelationships(
|
|
367
|
+
knex,
|
|
368
|
+
preQuery,
|
|
369
|
+
selectStatement,
|
|
370
|
+
tableName,
|
|
371
|
+
relationships
|
|
372
|
+
)
|
|
387
373
|
return this.addFilters(query, filters, { relationship: true })
|
|
388
374
|
}
|
|
389
375
|
|
|
@@ -16,7 +16,6 @@ module CouchDBModule {
|
|
|
16
16
|
const SCHEMA: Integration = {
|
|
17
17
|
docs: "https://docs.couchdb.org/en/stable/",
|
|
18
18
|
friendlyName: "CouchDB",
|
|
19
|
-
type: "Non-relational",
|
|
20
19
|
description:
|
|
21
20
|
"Apache CouchDB is an open-source document-oriented NoSQL database, implemented in Erlang.",
|
|
22
21
|
datasource: {
|
|
@@ -21,7 +21,6 @@ module DynamoModule {
|
|
|
21
21
|
description:
|
|
22
22
|
"Amazon DynamoDB is a key-value and document database that delivers single-digit millisecond performance at any scale.",
|
|
23
23
|
friendlyName: "DynamoDB",
|
|
24
|
-
type: "Non-relational",
|
|
25
24
|
datasource: {
|
|
26
25
|
region: {
|
|
27
26
|
type: DatasourceFieldTypes.STRING,
|
|
@@ -17,7 +17,6 @@ module ElasticsearchModule {
|
|
|
17
17
|
description:
|
|
18
18
|
"Elasticsearch is a search engine based on the Lucene library. It provides a distributed, multitenant-capable full-text search engine with an HTTP web interface and schema-free JSON documents.",
|
|
19
19
|
friendlyName: "ElasticSearch",
|
|
20
|
-
type: "Non-relational",
|
|
21
20
|
datasource: {
|
|
22
21
|
url: {
|
|
23
22
|
type: DatasourceFieldTypes.STRING,
|
|
@@ -16,7 +16,6 @@ module Firebase {
|
|
|
16
16
|
const SCHEMA: Integration = {
|
|
17
17
|
docs: "https://firebase.google.com/docs/firestore/quickstart",
|
|
18
18
|
friendlyName: "Firestore",
|
|
19
|
-
type: "Non-relational",
|
|
20
19
|
description:
|
|
21
20
|
"Cloud Firestore is a flexible, scalable database for mobile, web, and server development from Firebase and Google Cloud.",
|
|
22
21
|
datasource: {
|
|
@@ -12,7 +12,6 @@ const rest = require("./rest")
|
|
|
12
12
|
const googlesheets = require("./googlesheets")
|
|
13
13
|
const firebase = require("./firebase")
|
|
14
14
|
const redis = require("./redis")
|
|
15
|
-
const snowflake = require("./snowflake")
|
|
16
15
|
const { SourceNames } = require("../definitions/datasource")
|
|
17
16
|
const environment = require("../environment")
|
|
18
17
|
|
|
@@ -30,7 +29,6 @@ const DEFINITIONS = {
|
|
|
30
29
|
[SourceNames.REST]: rest.schema,
|
|
31
30
|
[SourceNames.FIRESTORE]: firebase.schema,
|
|
32
31
|
[SourceNames.REDIS]: redis.schema,
|
|
33
|
-
[SourceNames.SNOWFLAKE]: snowflake.schema,
|
|
34
32
|
}
|
|
35
33
|
|
|
36
34
|
const INTEGRATIONS = {
|
|
@@ -48,8 +46,6 @@ const INTEGRATIONS = {
|
|
|
48
46
|
[SourceNames.FIRESTORE]: firebase.integration,
|
|
49
47
|
[SourceNames.GOOGLE_SHEETS]: googlesheets.integration,
|
|
50
48
|
[SourceNames.REDIS]: redis.integration,
|
|
51
|
-
[SourceNames.FIREBASE]: firebase.integration,
|
|
52
|
-
[SourceNames.SNOWFLAKE]: snowflake.integration,
|
|
53
49
|
}
|
|
54
50
|
|
|
55
51
|
// optionally add oracle integration if the oracle binary can be installed
|
|
@@ -44,7 +44,6 @@ module MSSQLModule {
|
|
|
44
44
|
description:
|
|
45
45
|
"Microsoft SQL Server is a relational database management system developed by Microsoft. ",
|
|
46
46
|
friendlyName: "MS SQL Server",
|
|
47
|
-
type: "Relational",
|
|
48
47
|
datasource: {
|
|
49
48
|
user: {
|
|
50
49
|
type: DatasourceFieldTypes.STRING,
|
|
@@ -247,7 +246,6 @@ module MSSQLModule {
|
|
|
247
246
|
autocolumn: !!autoColumns.find((col: string) => col === name),
|
|
248
247
|
name: name,
|
|
249
248
|
...convertSqlType(def.DATA_TYPE),
|
|
250
|
-
externalType: def.DATA_TYPE,
|
|
251
249
|
}
|
|
252
250
|
}
|
|
253
251
|
tables[tableName] = {
|
|
@@ -24,7 +24,6 @@ module MongoDBModule {
|
|
|
24
24
|
const SCHEMA: Integration = {
|
|
25
25
|
docs: "https://github.com/mongodb/node-mongodb-native",
|
|
26
26
|
friendlyName: "MongoDB",
|
|
27
|
-
type: "Non-relational",
|
|
28
27
|
description:
|
|
29
28
|
"MongoDB is a general purpose, document-based, distributed database built for modern application developers and for the cloud era.",
|
|
30
29
|
datasource: {
|
|
@@ -36,7 +36,6 @@ module MySQLModule {
|
|
|
36
36
|
docs: "https://github.com/sidorares/node-mysql2",
|
|
37
37
|
plus: true,
|
|
38
38
|
friendlyName: "MySQL",
|
|
39
|
-
type: "Relational",
|
|
40
39
|
description:
|
|
41
40
|
"MySQL Database Service is a fully managed database service to deploy cloud-native applications. ",
|
|
42
41
|
datasource: {
|
|
@@ -233,7 +232,6 @@ module MySQLModule {
|
|
|
233
232
|
autocolumn: isAuto,
|
|
234
233
|
constraints,
|
|
235
234
|
...convertSqlType(column.Type),
|
|
236
|
-
externalType: column.Type,
|
|
237
235
|
}
|
|
238
236
|
}
|
|
239
237
|
if (!tables[tableName]) {
|
|
@@ -40,7 +40,6 @@ module OracleModule {
|
|
|
40
40
|
docs: "https://github.com/oracle/node-oracledb",
|
|
41
41
|
plus: true,
|
|
42
42
|
friendlyName: "Oracle",
|
|
43
|
-
type: "Relational",
|
|
44
43
|
description:
|
|
45
44
|
"Oracle Database is an object-relational database management system developed by Oracle Corporation",
|
|
46
45
|
datasource: {
|
|
@@ -47,7 +47,6 @@ module PostgresModule {
|
|
|
47
47
|
docs: "https://node-postgres.com",
|
|
48
48
|
plus: true,
|
|
49
49
|
friendlyName: "PostgreSQL",
|
|
50
|
-
type: "Relational",
|
|
51
50
|
description:
|
|
52
51
|
"PostgreSQL, also known as Postgres, is a free and open-source relational database management system emphasizing extensibility and SQL compliance.",
|
|
53
52
|
datasource: {
|
|
@@ -272,7 +271,6 @@ module PostgresModule {
|
|
|
272
271
|
autocolumn: isAuto,
|
|
273
272
|
name: columnName,
|
|
274
273
|
...convertSqlType(column.data_type),
|
|
275
|
-
externalType: column.data_type,
|
|
276
274
|
}
|
|
277
275
|
}
|
|
278
276
|
|
|
@@ -9,9 +9,7 @@ export function enrichQueryFields(
|
|
|
9
9
|
parameters = {}
|
|
10
10
|
) {
|
|
11
11
|
const enrichedQuery: { [key: string]: any } = Array.isArray(fields) ? [] : {}
|
|
12
|
-
|
|
13
|
-
return enrichedQuery
|
|
14
|
-
}
|
|
12
|
+
|
|
15
13
|
// enrich the fields with dynamic parameters
|
|
16
14
|
for (let key of Object.keys(fields)) {
|
|
17
15
|
if (fields[key] == null) {
|
package/src/integrations/rest.ts
CHANGED
|
@@ -64,7 +64,6 @@ module RestModule {
|
|
|
64
64
|
description:
|
|
65
65
|
"With the REST API datasource, you can connect, query and pull data from multiple REST APIs. You can then use the retrieved data to build apps.",
|
|
66
66
|
friendlyName: "REST API",
|
|
67
|
-
type: "API",
|
|
68
67
|
datasource: {
|
|
69
68
|
url: {
|
|
70
69
|
type: DatasourceFieldTypes.STRING,
|
|
@@ -287,7 +286,7 @@ module RestModule {
|
|
|
287
286
|
input.body = form
|
|
288
287
|
break
|
|
289
288
|
case BodyTypes.XML:
|
|
290
|
-
if (object != null
|
|
289
|
+
if (object != null) {
|
|
291
290
|
string = new XmlBuilder().buildObject(object)
|
|
292
291
|
}
|
|
293
292
|
input.body = string
|
package/src/integrations/s3.ts
CHANGED
|
@@ -17,7 +17,6 @@ module S3Module {
|
|
|
17
17
|
description:
|
|
18
18
|
"Amazon Simple Storage Service (Amazon S3) is an object storage service that offers industry-leading scalability, data availability, security, and performance.",
|
|
19
19
|
friendlyName: "Amazon S3",
|
|
20
|
-
type: "Object store",
|
|
21
20
|
datasource: {
|
|
22
21
|
region: {
|
|
23
22
|
type: "string",
|
|
@@ -155,27 +155,12 @@ describe("REST Integration", () => {
|
|
|
155
155
|
expect(output.headers["Content-Type"]).toEqual("application/json")
|
|
156
156
|
})
|
|
157
157
|
|
|
158
|
-
it("should allow
|
|
159
|
-
const output = config.integration.addBody("xml", "<a>1</a><b>2</b>", {})
|
|
160
|
-
expect(output.body.includes("<a>1</a>")).toEqual(true)
|
|
161
|
-
expect(output.body.includes("<b>2</b>")).toEqual(true)
|
|
162
|
-
expect(output.headers["Content-Type"]).toEqual("application/xml")
|
|
163
|
-
})
|
|
164
|
-
|
|
165
|
-
it("should allow a valid js object and parse the contents to xml", () => {
|
|
158
|
+
it("should allow XML", () => {
|
|
166
159
|
const output = config.integration.addBody("xml", input, {})
|
|
167
160
|
expect(output.body.includes("<a>1</a>")).toEqual(true)
|
|
168
161
|
expect(output.body.includes("<b>2</b>")).toEqual(true)
|
|
169
162
|
expect(output.headers["Content-Type"]).toEqual("application/xml")
|
|
170
163
|
})
|
|
171
|
-
|
|
172
|
-
it("should allow a valid json string and parse the contents to xml", () => {
|
|
173
|
-
const output = config.integration.addBody("xml", JSON.stringify(input), {})
|
|
174
|
-
expect(output.body.includes("<a>1</a>")).toEqual(true)
|
|
175
|
-
expect(output.body.includes("<b>2</b>")).toEqual(true)
|
|
176
|
-
expect(output.headers["Content-Type"]).toEqual("application/xml")
|
|
177
|
-
})
|
|
178
|
-
|
|
179
164
|
})
|
|
180
165
|
|
|
181
166
|
describe("response", () => {
|
|
@@ -93,24 +93,8 @@ describe("migrations", () => {
|
|
|
93
93
|
await clearMigrations()
|
|
94
94
|
const appId = config.prodAppId
|
|
95
95
|
const roles = { [appId]: "role_12345" }
|
|
96
|
-
await config.createUser(
|
|
97
|
-
|
|
98
|
-
undefined,
|
|
99
|
-
undefined,
|
|
100
|
-
undefined,
|
|
101
|
-
false,
|
|
102
|
-
true,
|
|
103
|
-
roles
|
|
104
|
-
) // admin only
|
|
105
|
-
await config.createUser(
|
|
106
|
-
undefined,
|
|
107
|
-
undefined,
|
|
108
|
-
undefined,
|
|
109
|
-
undefined,
|
|
110
|
-
false,
|
|
111
|
-
false,
|
|
112
|
-
roles
|
|
113
|
-
) // non admin non builder
|
|
96
|
+
await config.createUser(undefined, undefined, false, true, roles) // admin only
|
|
97
|
+
await config.createUser(undefined, undefined, false, false, roles) // non admin non builder
|
|
114
98
|
await config.createTable()
|
|
115
99
|
await config.createRow()
|
|
116
100
|
await config.createRow()
|
package/src/module.d.ts
CHANGED
|
@@ -8,5 +8,3 @@ declare module "@budibase/backend-core/constants"
|
|
|
8
8
|
declare module "@budibase/backend-core/auth"
|
|
9
9
|
declare module "@budibase/backend-core/sessions"
|
|
10
10
|
declare module "@budibase/backend-core/encryption"
|
|
11
|
-
declare module "@budibase/backend-core/utils"
|
|
12
|
-
declare module "@budibase/backend-core/redis"
|
|
@@ -28,8 +28,6 @@ const { encrypt } = require("@budibase/backend-core/encryption")
|
|
|
28
28
|
|
|
29
29
|
const GLOBAL_USER_ID = "us_uuid1"
|
|
30
30
|
const EMAIL = "babs@babs.com"
|
|
31
|
-
const FIRSTNAME = "Barbara"
|
|
32
|
-
const LASTNAME = "Barbington"
|
|
33
31
|
const CSRF_TOKEN = "e3727778-7af0-4226-b5eb-f43cbe60a306"
|
|
34
32
|
|
|
35
33
|
class TestConfiguration {
|
|
@@ -61,15 +59,6 @@ class TestConfiguration {
|
|
|
61
59
|
return this.prodAppId
|
|
62
60
|
}
|
|
63
61
|
|
|
64
|
-
getUserDetails() {
|
|
65
|
-
return {
|
|
66
|
-
globalId: GLOBAL_USER_ID,
|
|
67
|
-
email: EMAIL,
|
|
68
|
-
firstName: FIRSTNAME,
|
|
69
|
-
lastName: LASTNAME,
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
|
|
73
62
|
async doInContext(appId, task) {
|
|
74
63
|
if (!appId) {
|
|
75
64
|
appId = this.appId
|
|
@@ -129,8 +118,6 @@ class TestConfiguration {
|
|
|
129
118
|
// USER / AUTH
|
|
130
119
|
async globalUser({
|
|
131
120
|
id = GLOBAL_USER_ID,
|
|
132
|
-
firstName = FIRSTNAME,
|
|
133
|
-
lastName = LASTNAME,
|
|
134
121
|
builder = true,
|
|
135
122
|
admin = false,
|
|
136
123
|
email = EMAIL,
|
|
@@ -148,8 +135,6 @@ class TestConfiguration {
|
|
|
148
135
|
...existing,
|
|
149
136
|
roles: roles || {},
|
|
150
137
|
tenantId: TENANT_ID,
|
|
151
|
-
firstName,
|
|
152
|
-
lastName,
|
|
153
138
|
}
|
|
154
139
|
await createASession(id, {
|
|
155
140
|
sessionId: "sessionid",
|
|
@@ -176,8 +161,6 @@ class TestConfiguration {
|
|
|
176
161
|
|
|
177
162
|
async createUser(
|
|
178
163
|
id = null,
|
|
179
|
-
firstName = FIRSTNAME,
|
|
180
|
-
lastName = LASTNAME,
|
|
181
164
|
email = EMAIL,
|
|
182
165
|
builder = true,
|
|
183
166
|
admin = false,
|
|
@@ -186,8 +169,6 @@ class TestConfiguration {
|
|
|
186
169
|
const globalId = !id ? `us_${Math.random()}` : `us_${id}`
|
|
187
170
|
const resp = await this.globalUser({
|
|
188
171
|
id: globalId,
|
|
189
|
-
firstName,
|
|
190
|
-
lastName,
|
|
191
172
|
email,
|
|
192
173
|
builder,
|
|
193
174
|
admin,
|
|
@@ -539,14 +520,14 @@ class TestConfiguration {
|
|
|
539
520
|
|
|
540
521
|
// QUERY
|
|
541
522
|
|
|
542
|
-
async previewQuery(request, config, datasource, fields
|
|
523
|
+
async previewQuery(request, config, datasource, fields) {
|
|
543
524
|
return request
|
|
544
525
|
.post(`/api/queries/preview`)
|
|
545
526
|
.send({
|
|
546
527
|
datasourceId: datasource._id,
|
|
547
|
-
parameters:
|
|
528
|
+
parameters: {},
|
|
548
529
|
fields,
|
|
549
|
-
queryVerb:
|
|
530
|
+
queryVerb: "read",
|
|
550
531
|
name: datasource.name,
|
|
551
532
|
})
|
|
552
533
|
.set(config.defaultHeaders())
|
|
@@ -9,12 +9,11 @@ const { doInTenant } = require("@budibase/backend-core/tenancy")
|
|
|
9
9
|
const { definitions: triggerDefs } = require("../automations/triggerInfo")
|
|
10
10
|
const { doInAppContext, getAppDB } = require("@budibase/backend-core/context")
|
|
11
11
|
const { AutomationErrors, LoopStepTypes } = require("../constants")
|
|
12
|
-
const { storeLog } = require("../automations/logging")
|
|
13
12
|
const FILTER_STEP_ID = actions.ACTION_DEFINITIONS.FILTER.stepId
|
|
14
13
|
const LOOP_STEP_ID = actions.ACTION_DEFINITIONS.LOOP.stepId
|
|
15
14
|
|
|
16
15
|
const CRON_STEP_ID = triggerDefs.CRON.stepId
|
|
17
|
-
const STOPPED_STATUS = { success:
|
|
16
|
+
const STOPPED_STATUS = { success: false, status: "STOPPED" }
|
|
18
17
|
const { cloneDeep } = require("lodash/fp")
|
|
19
18
|
const env = require("../environment")
|
|
20
19
|
|
|
@@ -219,7 +218,7 @@ class Orchestrator {
|
|
|
219
218
|
}
|
|
220
219
|
}
|
|
221
220
|
if (
|
|
222
|
-
index === env.
|
|
221
|
+
index === parseInt(env.AUTOMATION_MAX_ITERATIONS) ||
|
|
223
222
|
index === parseInt(loopStep.inputs.iterations)
|
|
224
223
|
) {
|
|
225
224
|
this.updateContextAndOutput(loopStepNumber, step, tempOutput, {
|
|
@@ -276,7 +275,7 @@ class Orchestrator {
|
|
|
276
275
|
this._context.steps[stepCount] = outputs
|
|
277
276
|
// if filter causes us to stop execution don't break the loop, set a var
|
|
278
277
|
// so that we can finish iterating through the steps and record that it stopped
|
|
279
|
-
if (step.stepId === FILTER_STEP_ID && !outputs.
|
|
278
|
+
if (step.stepId === FILTER_STEP_ID && !outputs.success) {
|
|
280
279
|
stopped = true
|
|
281
280
|
this.updateExecutionOutput(step.id, step.stepId, step.inputs, {
|
|
282
281
|
...outputs,
|
|
@@ -326,8 +325,6 @@ class Orchestrator {
|
|
|
326
325
|
}
|
|
327
326
|
}
|
|
328
327
|
|
|
329
|
-
// store the logs for the automation run
|
|
330
|
-
await storeLog(this._automation, this.executionOutput)
|
|
331
328
|
return this.executionOutput
|
|
332
329
|
}
|
|
333
330
|
}
|