@budibase/server 0.9.125-alpha.13 → 0.9.125-alpha.17
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.a81dae34.js → index.19252c21.js} +2 -2
- package/builder/assets/{index.632f1ff0.css → index.1db0f42f.css} +1 -1
- package/builder/assets/{slack.10ae18c6.svg → slack.1e1f7cfb.svg} +1 -1
- package/builder/index.html +2 -2
- package/coverage/clover.xml +31 -25
- package/coverage/coverage-final.json +2 -2
- package/coverage/lcov-report/api/controllers/analytics.js.html +1 -1
- package/coverage/lcov-report/api/controllers/apikeys.js.html +1 -1
- package/coverage/lcov-report/api/controllers/application.js.html +1 -1
- package/coverage/lcov-report/api/controllers/auth.js.html +1 -1
- package/coverage/lcov-report/api/controllers/automation.js.html +47 -11
- package/coverage/lcov-report/api/controllers/backup.js.html +1 -1
- package/coverage/lcov-report/api/controllers/component.js.html +1 -1
- package/coverage/lcov-report/api/controllers/datasource.js.html +1 -1
- package/coverage/lcov-report/api/controllers/dev.js.html +1 -1
- package/coverage/lcov-report/api/controllers/hosting.js.html +1 -1
- package/coverage/lcov-report/api/controllers/index.html +19 -19
- 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/permission.js.html +1 -1
- package/coverage/lcov-report/api/controllers/query.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 +1 -1
- package/coverage/lcov-report/api/controllers/row/index.html +1 -1
- package/coverage/lcov-report/api/controllers/row/index.js.html +1 -1
- package/coverage/lcov-report/api/controllers/row/internal.js.html +1 -1
- package/coverage/lcov-report/api/controllers/row/utils.js.html +1 -1
- 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/index.html +1 -1
- package/coverage/lcov-report/api/controllers/table/index.js.html +1 -1
- package/coverage/lcov-report/api/controllers/table/utils.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/viewBuilder.js.html +1 -1
- package/coverage/lcov-report/api/controllers/webhook.js.html +1 -1
- package/coverage/lcov-report/api/index.html +1 -1
- package/coverage/lcov-report/api/index.js.html +1 -1
- 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/application.js.html +1 -1
- package/coverage/lcov-report/api/routes/auth.js.html +1 -1
- package/coverage/lcov-report/api/routes/automation.js.html +1 -1
- package/coverage/lcov-report/api/routes/backup.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/hosting.js.html +1 -1
- package/coverage/lcov-report/api/routes/index.html +1 -1
- package/coverage/lcov-report/api/routes/index.js.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/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/row.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/static.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/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 +1 -1
- package/coverage/lcov-report/automations/bullboard.js.html +1 -1
- package/coverage/lcov-report/automations/index.html +1 -1
- 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/createRow.js.html +1 -1
- package/coverage/lcov-report/automations/steps/delay.js.html +1 -1
- package/coverage/lcov-report/automations/steps/deleteRow.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 +1 -1
- package/coverage/lcov-report/automations/steps/index.html +5 -5
- package/coverage/lcov-report/automations/steps/integromat.js.html +1 -1
- package/coverage/lcov-report/automations/steps/outgoingWebhook.js.html +19 -7
- 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/thread.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 +1 -1
- package/coverage/lcov-report/automations/utils.js.html +1 -1
- 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/client.js.html +1 -1
- package/coverage/lcov-report/db/index.html +1 -1
- 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 +1 -1
- package/coverage/lcov-report/db/linkedRows/index.js.html +1 -1
- package/coverage/lcov-report/db/linkedRows/linkUtils.js.html +1 -1
- package/coverage/lcov-report/db/newid.js.html +1 -1
- package/coverage/lcov-report/db/utils.js.html +1 -1
- 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 +20 -20
- 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/authorized.js.html +1 -1
- package/coverage/lcov-report/middleware/builder.js.html +1 -1
- package/coverage/lcov-report/middleware/currentapp.js.html +1 -1
- package/coverage/lcov-report/middleware/index.html +1 -1
- package/coverage/lcov-report/middleware/joi-validator.js.html +1 -1
- package/coverage/lcov-report/middleware/resourceId.js.html +1 -1
- package/coverage/lcov-report/middleware/selfhost.js.html +1 -1
- package/coverage/lcov-report/middleware/usageQuota.js.html +1 -1
- package/coverage/lcov-report/utilities/bcrypt.js.html +1 -1
- 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 +1 -1
- package/coverage/lcov-report/utilities/index.html +1 -1
- package/coverage/lcov-report/utilities/index.js.html +1 -1
- package/coverage/lcov-report/utilities/queue/inMemoryQueue.js.html +1 -1
- 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/security.js.html +1 -1
- package/coverage/lcov-report/utilities/statusCodes.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 +42 -26
- package/dist/api/controllers/automation.js +12 -1
- package/dist/automations/steps/outgoingWebhook.js +6 -3
- package/dist/package.json +4 -4
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +5 -5
- package/src/api/controllers/automation.js +13 -1
- package/src/api/routes/tests/metadata.spec.js +1 -1
- package/src/automations/steps/outgoingWebhook.js +7 -3
- package/src/automations/tests/automation.spec.js +1 -1
- package/src/automations/tests/delay.spec.js +1 -1
- package/src/automations/tests/filter.spec.js +1 -1
- package/src/automations/tests/queryRows.spec.js +1 -1
|
@@ -265,7 +265,7 @@ exports.CURRENTLY_SUPPORTED_LEVELS = CURRENTLY_SUPPORTED_LEVELS
|
|
|
265
265
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
266
266
|
Code coverage generated by
|
|
267
267
|
<a href="https://istanbul.js.org/" target="_blank">istanbul</a>
|
|
268
|
-
at
|
|
268
|
+
at Fri Sep 17 2021 16:44:17 GMT+0000 (Coordinated Universal Time)
|
|
269
269
|
</div>
|
|
270
270
|
</div>
|
|
271
271
|
<script src="../prettify.js"></script>
|
|
@@ -85,7 +85,7 @@
|
|
|
85
85
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
86
86
|
Code coverage generated by
|
|
87
87
|
<a href="https://istanbul.js.org/" target="_blank">istanbul</a>
|
|
88
|
-
at
|
|
88
|
+
at Fri Sep 17 2021 16:44:17 GMT+0000 (Coordinated Universal Time)
|
|
89
89
|
</div>
|
|
90
90
|
</div>
|
|
91
91
|
<script src="../prettify.js"></script>
|
|
@@ -136,7 +136,7 @@ exports.getFullUser = async (ctx, userId) => {
|
|
|
136
136
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
137
137
|
Code coverage generated by
|
|
138
138
|
<a href="https://istanbul.js.org/" target="_blank">istanbul</a>
|
|
139
|
-
at
|
|
139
|
+
at Fri Sep 17 2021 16:44:17 GMT+0000 (Coordinated Universal Time)
|
|
140
140
|
</div>
|
|
141
141
|
</div>
|
|
142
142
|
<script src="../prettify.js"></script>
|
|
@@ -493,7 +493,7 @@ exports.removeAppFromUserRoles = async (ctx, appId) => {
|
|
|
493
493
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
494
494
|
Code coverage generated by
|
|
495
495
|
<a href="https://istanbul.js.org/" target="_blank">istanbul</a>
|
|
496
|
-
at
|
|
496
|
+
at Fri Sep 17 2021 16:44:17 GMT+0000 (Coordinated Universal Time)
|
|
497
497
|
</div>
|
|
498
498
|
</div>
|
|
499
499
|
<script src="../prettify.js"></script>
|
package/coverage/lcov.info
CHANGED
|
@@ -393,9 +393,10 @@ FN:157,(anonymous_8)
|
|
|
393
393
|
FN:161,(anonymous_9)
|
|
394
394
|
FN:165,(anonymous_10)
|
|
395
395
|
FN:178,(anonymous_11)
|
|
396
|
-
FN:192,
|
|
397
|
-
|
|
398
|
-
|
|
396
|
+
FN:192,prepareTestInput
|
|
397
|
+
FN:203,(anonymous_13)
|
|
398
|
+
FNF:14
|
|
399
|
+
FNH:13
|
|
399
400
|
FNDA:1,cleanupAutomationMetadata
|
|
400
401
|
FNDA:22,cleanAutomationInputs
|
|
401
402
|
FNDA:21,(anonymous_2)
|
|
@@ -408,7 +409,8 @@ FNDA:1,(anonymous_8)
|
|
|
408
409
|
FNDA:1,(anonymous_9)
|
|
409
410
|
FNDA:1,(anonymous_10)
|
|
410
411
|
FNDA:0,(anonymous_11)
|
|
411
|
-
FNDA:2,
|
|
412
|
+
FNDA:2,prepareTestInput
|
|
413
|
+
FNDA:2,(anonymous_13)
|
|
412
414
|
DA:1,33
|
|
413
415
|
DA:2,33
|
|
414
416
|
DA:3,33
|
|
@@ -488,17 +490,23 @@ DA:180,0
|
|
|
488
490
|
DA:181,0
|
|
489
491
|
DA:182,0
|
|
490
492
|
DA:186,0
|
|
491
|
-
DA:192,33
|
|
492
|
-
DA:193,2
|
|
493
493
|
DA:194,2
|
|
494
|
-
DA:195,
|
|
495
|
-
DA:196,2
|
|
494
|
+
DA:195,0
|
|
496
495
|
DA:197,2
|
|
496
|
+
DA:198,0
|
|
497
|
+
DA:200,2
|
|
498
|
+
DA:203,33
|
|
499
|
+
DA:204,2
|
|
500
|
+
DA:205,2
|
|
497
501
|
DA:206,2
|
|
498
|
-
DA:
|
|
499
|
-
DA:
|
|
500
|
-
|
|
501
|
-
|
|
502
|
+
DA:207,2
|
|
503
|
+
DA:208,2
|
|
504
|
+
DA:209,2
|
|
505
|
+
DA:218,2
|
|
506
|
+
DA:222,2
|
|
507
|
+
DA:223,2
|
|
508
|
+
LF:94
|
|
509
|
+
LH:84
|
|
502
510
|
BRDA:33,0,0,0
|
|
503
511
|
BRDA:33,0,1,22
|
|
504
512
|
BRDA:40,1,0,18
|
|
@@ -523,8 +531,16 @@ BRDA:106,10,0,2
|
|
|
523
531
|
BRDA:106,10,1,2
|
|
524
532
|
BRDA:110,11,0,1
|
|
525
533
|
BRDA:110,11,1,1
|
|
526
|
-
|
|
527
|
-
|
|
534
|
+
BRDA:194,12,0,0
|
|
535
|
+
BRDA:194,12,1,2
|
|
536
|
+
BRDA:194,13,0,2
|
|
537
|
+
BRDA:194,13,1,0
|
|
538
|
+
BRDA:197,14,0,0
|
|
539
|
+
BRDA:197,14,1,2
|
|
540
|
+
BRDA:197,15,0,2
|
|
541
|
+
BRDA:197,15,1,0
|
|
542
|
+
BRF:32
|
|
543
|
+
BRH:23
|
|
528
544
|
end_of_record
|
|
529
545
|
TN:
|
|
530
546
|
SF:src/api/controllers/backup.js
|
|
@@ -4127,15 +4143,15 @@ DA:92,1
|
|
|
4127
4143
|
DA:96,1
|
|
4128
4144
|
DA:100,1
|
|
4129
4145
|
DA:101,0
|
|
4130
|
-
DA:102,0
|
|
4131
4146
|
DA:103,0
|
|
4132
|
-
DA:
|
|
4133
|
-
DA:
|
|
4134
|
-
DA:
|
|
4135
|
-
DA:113,1
|
|
4136
|
-
DA:115,2
|
|
4147
|
+
DA:104,0
|
|
4148
|
+
DA:106,0
|
|
4149
|
+
DA:114,2
|
|
4137
4150
|
DA:116,2
|
|
4138
|
-
DA:117,
|
|
4151
|
+
DA:117,1
|
|
4152
|
+
DA:119,2
|
|
4153
|
+
DA:120,2
|
|
4154
|
+
DA:121,2
|
|
4139
4155
|
LF:24
|
|
4140
4156
|
LH:20
|
|
4141
4157
|
BRDA:81,0,0,2
|
|
@@ -4149,12 +4165,12 @@ BRDA:93,3,0,1
|
|
|
4149
4165
|
BRDA:93,3,1,0
|
|
4150
4166
|
BRDA:100,4,0,0
|
|
4151
4167
|
BRDA:100,4,1,1
|
|
4152
|
-
BRDA:
|
|
4153
|
-
BRDA:
|
|
4154
|
-
BRDA:
|
|
4155
|
-
BRDA:
|
|
4168
|
+
BRDA:103,5,0,0
|
|
4169
|
+
BRDA:103,5,1,0
|
|
4170
|
+
BRDA:116,6,0,1
|
|
4171
|
+
BRDA:116,6,1,1
|
|
4156
4172
|
BRF:15
|
|
4157
|
-
BRH:
|
|
4173
|
+
BRH:10
|
|
4158
4174
|
end_of_record
|
|
4159
4175
|
TN:
|
|
4160
4176
|
SF:src/automations/steps/queryRows.js
|
|
@@ -170,13 +170,24 @@ exports.trigger = function (ctx) {
|
|
|
170
170
|
};
|
|
171
171
|
});
|
|
172
172
|
};
|
|
173
|
+
function prepareTestInput(input) {
|
|
174
|
+
// prepare the test parameters
|
|
175
|
+
if (input.id && input.row) {
|
|
176
|
+
input.row._id = input.id;
|
|
177
|
+
}
|
|
178
|
+
if (input.revision && input.row) {
|
|
179
|
+
input.row._rev = input.revision;
|
|
180
|
+
}
|
|
181
|
+
return input;
|
|
182
|
+
}
|
|
173
183
|
exports.test = function (ctx) {
|
|
174
184
|
return __awaiter(this, void 0, void 0, function* () {
|
|
175
185
|
const appId = ctx.appId;
|
|
176
186
|
const db = new CouchDB(appId);
|
|
177
187
|
let automation = yield db.get(ctx.params.id);
|
|
178
188
|
yield setTestFlag(automation._id);
|
|
179
|
-
const
|
|
189
|
+
const testInput = prepareTestInput(ctx.request.body);
|
|
190
|
+
const response = yield triggers.externalTrigger(automation, Object.assign(Object.assign({}, testInput), { appId }), { getResponses: true });
|
|
180
191
|
// save a test history run
|
|
181
192
|
yield updateTestHistory(ctx.appId, automation, Object.assign(Object.assign({}, ctx.request.body), { occurredAt: new Date().getTime() }));
|
|
182
193
|
yield clearTestFlag(automation._id);
|
|
@@ -100,13 +100,16 @@ exports.run = function ({ inputs }) {
|
|
|
100
100
|
request.headers = {
|
|
101
101
|
"Content-Type": "application/json",
|
|
102
102
|
};
|
|
103
|
-
if (headers
|
|
103
|
+
if (headers) {
|
|
104
104
|
try {
|
|
105
|
-
const customHeaders = JSON.parse(headers);
|
|
105
|
+
const customHeaders = typeof headers === "string" ? JSON.parse(headers) : headers;
|
|
106
106
|
request.headers = Object.assign(Object.assign({}, request.headers), customHeaders);
|
|
107
107
|
}
|
|
108
108
|
catch (err) {
|
|
109
|
-
|
|
109
|
+
return {
|
|
110
|
+
success: false,
|
|
111
|
+
response: "Unable to process headers, must be a JSON object.",
|
|
112
|
+
};
|
|
110
113
|
}
|
|
111
114
|
}
|
|
112
115
|
}
|
package/dist/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@budibase/server",
|
|
3
3
|
"email": "hi@budibase.com",
|
|
4
|
-
"version": "0.9.125-alpha.
|
|
4
|
+
"version": "0.9.125-alpha.16",
|
|
5
5
|
"description": "Budibase Web Server",
|
|
6
6
|
"main": "src/index.js",
|
|
7
7
|
"repository": {
|
|
@@ -64,9 +64,9 @@
|
|
|
64
64
|
"author": "Budibase",
|
|
65
65
|
"license": "AGPL-3.0-or-later",
|
|
66
66
|
"dependencies": {
|
|
67
|
-
"@budibase/auth": "^0.9.125-alpha.
|
|
68
|
-
"@budibase/client": "^0.9.125-alpha.
|
|
69
|
-
"@budibase/string-templates": "^0.9.125-alpha.
|
|
67
|
+
"@budibase/auth": "^0.9.125-alpha.16",
|
|
68
|
+
"@budibase/client": "^0.9.125-alpha.16",
|
|
69
|
+
"@budibase/string-templates": "^0.9.125-alpha.16",
|
|
70
70
|
"@elastic/elasticsearch": "7.10.0",
|
|
71
71
|
"@koa/router": "8.0.0",
|
|
72
72
|
"@sendgrid/mail": "7.1.1",
|