@budibase/server 1.3.13 → 1.3.15
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.fb22f106.js → index.3953692d.js} +166 -165
- package/builder/assets/{index.e50bda9f.css → index.a70e216a.css} +1 -1
- package/builder/index.html +2 -2
- package/coverage/clover.xml +90 -68
- package/coverage/coverage-final.json +7 -7
- 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 +1 -1
- package/coverage/lcov-report/api/controllers/backup.js.html +8 -5
- 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 +1 -1
- package/coverage/lcov-report/api/controllers/dev.js.html +1 -1
- package/coverage/lcov-report/api/controllers/index.html +7 -7
- 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 +1 -1
- package/coverage/lcov-report/api/controllers/row/index.html +1 -1
- package/coverage/lcov-report/api/controllers/row/internal.js.html +1 -1
- package/coverage/lcov-report/api/controllers/row/internalSearch.js.html +1 -1
- package/coverage/lcov-report/api/controllers/row/staticFormula.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/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 +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/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/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 +1 -1
- package/coverage/lcov-report/automations/bullboard.js.html +1 -1
- package/coverage/lcov-report/automations/index.html +24 -24
- package/coverage/lcov-report/automations/index.js.html +18 -9
- 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 +1 -1
- package/coverage/lcov-report/automations/steps/index.html +1 -1
- 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 +126 -24
- 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 +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 +5 -5
- 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 +34 -34
- 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 +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/publicApi.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/utils.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 +19 -19
- package/coverage/lcov-report/utilities/index.js.html +40 -16
- 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 +5 -5
- package/coverage/lcov-report/utilities/rowProcessor/index.js.html +1 -1
- package/coverage/lcov-report/utilities/rowProcessor/utils.js.html +4 -4
- package/coverage/lcov-report/utilities/scriptRunner.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/usageQuota/index.html +1 -1
- package/coverage/lcov-report/utilities/usageQuota/rows.js.html +6 -3
- 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 +167 -127
- package/dist/api/controllers/application.js +1 -5
- package/dist/api/controllers/backup.js +2 -1
- package/dist/api/controllers/deploy/index.js +17 -2
- package/dist/api/controllers/row/ExternalRequest.js +1 -1
- package/dist/automations/index.js +10 -5
- package/dist/automations/triggers.js +39 -5
- package/dist/automations/utils.js +16 -7
- package/dist/environment.js +2 -2
- package/dist/integrations/rest.js +16 -1
- package/dist/package.json +6 -6
- package/dist/threads/automation.js +6 -0
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/dist/utilities/fileSystem/index.js +16 -7
- package/dist/utilities/index.js +8 -0
- package/dist/utilities/rowProcessor/utils.js +1 -1
- package/dist/utilities/usageQuota/rows.js +2 -1
- package/package.json +7 -7
- package/src/api/controllers/application.ts +1 -5
- package/src/api/controllers/backup.js +2 -1
- package/src/api/controllers/deploy/index.ts +17 -4
- package/src/api/controllers/row/ExternalRequest.ts +1 -1
- package/src/api/routes/tests/query.spec.js +3 -3
- package/src/automations/index.js +6 -3
- package/src/automations/triggers.js +44 -10
- package/src/automations/utils.ts +21 -9
- package/src/definitions/datasource.ts +1 -0
- package/src/environment.js +2 -2
- package/src/integrations/rest.ts +14 -1
- package/src/integrations/tests/rest.spec.js +38 -3
- package/src/threads/automation.ts +6 -0
- package/src/utilities/fileSystem/index.js +15 -7
- package/src/utilities/index.js +8 -0
- package/src/utilities/rowProcessor/utils.js +1 -1
- package/src/utilities/usageQuota/rows.js +2 -1
|
@@ -19,23 +19,28 @@ const { checkTestFlag } = require("../utilities/redis");
|
|
|
19
19
|
const utils = require("./utils");
|
|
20
20
|
const env = require("../environment");
|
|
21
21
|
const { doInAppContext, getAppDB } = require("@budibase/backend-core/context");
|
|
22
|
+
const { getAllApps } = require("@budibase/backend-core/db");
|
|
22
23
|
const TRIGGER_DEFINITIONS = definitions;
|
|
23
24
|
const JOB_OPTS = {
|
|
24
25
|
removeOnComplete: true,
|
|
25
26
|
removeOnFail: true,
|
|
26
27
|
};
|
|
28
|
+
function getAllAutomations() {
|
|
29
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
30
|
+
const db = getAppDB();
|
|
31
|
+
let automations = yield db.allDocs(getAutomationParams(null, { include_docs: true }));
|
|
32
|
+
return automations.rows.map(row => row.doc);
|
|
33
|
+
});
|
|
34
|
+
}
|
|
27
35
|
function queueRelevantRowAutomations(event, eventType) {
|
|
28
36
|
return __awaiter(this, void 0, void 0, function* () {
|
|
29
37
|
if (event.appId == null) {
|
|
30
38
|
throw `No appId specified for ${eventType} - check event emitters.`;
|
|
31
39
|
}
|
|
32
40
|
doInAppContext(event.appId, () => __awaiter(this, void 0, void 0, function* () {
|
|
33
|
-
|
|
34
|
-
let automations = yield db.allDocs(getAutomationParams(null, { include_docs: true }));
|
|
41
|
+
let automations = yield getAllAutomations();
|
|
35
42
|
// filter down to the correct event type
|
|
36
|
-
automations = automations.
|
|
37
|
-
.map(automation => automation.doc)
|
|
38
|
-
.filter(automation => {
|
|
43
|
+
automations = automations.filter(automation => {
|
|
39
44
|
const trigger = automation.definition.trigger;
|
|
40
45
|
return trigger && trigger.event === eventType;
|
|
41
46
|
});
|
|
@@ -109,4 +114,33 @@ exports.externalTrigger = function (automation, params, { getResponses } = {}) {
|
|
|
109
114
|
}
|
|
110
115
|
});
|
|
111
116
|
};
|
|
117
|
+
exports.rebootTrigger = () => __awaiter(void 0, void 0, void 0, function* () {
|
|
118
|
+
// reboot cron option is only available on the main thread at
|
|
119
|
+
// startup and only usable in self host
|
|
120
|
+
if (env.isInThread() || !env.SELF_HOSTED) {
|
|
121
|
+
return;
|
|
122
|
+
}
|
|
123
|
+
// iterate through all production apps, find the reboot crons
|
|
124
|
+
// and trigger events for them
|
|
125
|
+
const appIds = yield getAllApps({ dev: false, idsOnly: true });
|
|
126
|
+
for (let prodAppId of appIds) {
|
|
127
|
+
yield doInAppContext(prodAppId, () => __awaiter(void 0, void 0, void 0, function* () {
|
|
128
|
+
let automations = yield getAllAutomations();
|
|
129
|
+
let rebootEvents = [];
|
|
130
|
+
for (let automation of automations) {
|
|
131
|
+
if (utils.isRebootTrigger(automation)) {
|
|
132
|
+
const job = {
|
|
133
|
+
automation,
|
|
134
|
+
event: {
|
|
135
|
+
appId: prodAppId,
|
|
136
|
+
timestamp: Date.now(),
|
|
137
|
+
},
|
|
138
|
+
};
|
|
139
|
+
rebootEvents.push(queue.add(job, JOB_OPTS));
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
yield Promise.all(rebootEvents);
|
|
143
|
+
}));
|
|
144
|
+
}
|
|
145
|
+
});
|
|
112
146
|
exports.TRIGGER_DEFINITIONS = TRIGGER_DEFINITIONS;
|
|
@@ -35,7 +35,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
35
35
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
36
36
|
};
|
|
37
37
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
38
|
-
exports.isErrorInOutput = exports.isRecurring = exports.cleanupAutomations = exports.checkForWebhooks = exports.enableCronTrigger = exports.clearMetadata = exports.disableCron = exports.disableAllCrons = exports.removeDeprecated = exports.updateTestHistory = exports.processEvent = void 0;
|
|
38
|
+
exports.isErrorInOutput = exports.isRecurring = exports.cleanupAutomations = exports.checkForWebhooks = exports.enableCronTrigger = exports.isRebootTrigger = exports.isCronTrigger = exports.clearMetadata = exports.disableCron = exports.disableAllCrons = exports.removeDeprecated = exports.updateTestHistory = exports.processEvent = void 0;
|
|
39
39
|
const threads_1 = require("../threads");
|
|
40
40
|
const triggerInfo_1 = require("./triggerInfo");
|
|
41
41
|
const webhooks = __importStar(require("../api/controllers/webhook"));
|
|
@@ -49,6 +49,7 @@ const fp_1 = require("lodash/fp");
|
|
|
49
49
|
const context_1 = require("@budibase/backend-core/context");
|
|
50
50
|
const backend_core_1 = require("@budibase/backend-core");
|
|
51
51
|
const pro_1 = require("@budibase/pro");
|
|
52
|
+
const REBOOT_CRON = "@reboot";
|
|
52
53
|
const WH_STEP_ID = triggerInfo_1.definitions.WEBHOOK.stepId;
|
|
53
54
|
const CRON_STEP_ID = triggerInfo_1.definitions.CRON.stepId;
|
|
54
55
|
const Runner = new threads_1.Thread(threads_1.ThreadType.AUTOMATION);
|
|
@@ -139,6 +140,17 @@ function clearMetadata() {
|
|
|
139
140
|
});
|
|
140
141
|
}
|
|
141
142
|
exports.clearMetadata = clearMetadata;
|
|
143
|
+
function isCronTrigger(auto) {
|
|
144
|
+
return (auto &&
|
|
145
|
+
auto.definition.trigger &&
|
|
146
|
+
auto.definition.trigger.stepId === CRON_STEP_ID);
|
|
147
|
+
}
|
|
148
|
+
exports.isCronTrigger = isCronTrigger;
|
|
149
|
+
function isRebootTrigger(auto) {
|
|
150
|
+
const trigger = auto ? auto.definition.trigger : null;
|
|
151
|
+
return isCronTrigger(auto) && (trigger === null || trigger === void 0 ? void 0 : trigger.inputs.cron) === REBOOT_CRON;
|
|
152
|
+
}
|
|
153
|
+
exports.isRebootTrigger = isRebootTrigger;
|
|
142
154
|
/**
|
|
143
155
|
* This function handles checking of any cron jobs that need to be enabled/updated.
|
|
144
156
|
* @param {string} appId The ID of the app in which we are checking for webhooks
|
|
@@ -147,13 +159,10 @@ exports.clearMetadata = clearMetadata;
|
|
|
147
159
|
function enableCronTrigger(appId, automation) {
|
|
148
160
|
return __awaiter(this, void 0, void 0, function* () {
|
|
149
161
|
const trigger = automation ? automation.definition.trigger : null;
|
|
150
|
-
function isCronTrigger(auto) {
|
|
151
|
-
return (auto &&
|
|
152
|
-
auto.definition.trigger &&
|
|
153
|
-
auto.definition.trigger.stepId === CRON_STEP_ID);
|
|
154
|
-
}
|
|
155
162
|
// need to create cron job
|
|
156
|
-
if (isCronTrigger(automation) &&
|
|
163
|
+
if (isCronTrigger(automation) &&
|
|
164
|
+
!isRebootTrigger(automation) &&
|
|
165
|
+
(trigger === null || trigger === void 0 ? void 0 : trigger.inputs.cron)) {
|
|
157
166
|
// make a job id rather than letting Bull decide, makes it easier to handle on way out
|
|
158
167
|
const jobId = `${appId}_cron_${(0, newid_1.default)()}`;
|
|
159
168
|
const job = yield bullboard_1.queue.add({
|
package/dist/environment.js
CHANGED
|
@@ -28,8 +28,8 @@ function parseIntSafe(number) {
|
|
|
28
28
|
}
|
|
29
29
|
let inThread = false;
|
|
30
30
|
module.exports = {
|
|
31
|
-
// important
|
|
32
|
-
PORT: process.env.
|
|
31
|
+
// important - prefer app port to generic port
|
|
32
|
+
PORT: process.env.APP_PORT || process.env.PORT,
|
|
33
33
|
JWT_SECRET: process.env.JWT_SECRET,
|
|
34
34
|
COUCH_DB_URL: process.env.COUCH_DB_URL,
|
|
35
35
|
MINIO_URL: process.env.MINIO_URL,
|
|
@@ -8,10 +8,14 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
8
8
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
9
|
});
|
|
10
10
|
};
|
|
11
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
12
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
|
+
};
|
|
11
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
15
|
const types_1 = require("@budibase/types");
|
|
13
16
|
const datasource_1 = require("../definitions/datasource");
|
|
14
17
|
const lodash_1 = require("lodash");
|
|
18
|
+
const querystring_1 = __importDefault(require("querystring"));
|
|
15
19
|
const BodyTypes = {
|
|
16
20
|
NONE: "none",
|
|
17
21
|
FORM_DATA: "form",
|
|
@@ -70,6 +74,12 @@ var RestModule;
|
|
|
70
74
|
required: false,
|
|
71
75
|
default: {},
|
|
72
76
|
},
|
|
77
|
+
legacyHttpParser: {
|
|
78
|
+
display: "Legacy HTTP Support",
|
|
79
|
+
type: types_1.DatasourceFieldType.BOOLEAN,
|
|
80
|
+
required: false,
|
|
81
|
+
default: false,
|
|
82
|
+
},
|
|
73
83
|
},
|
|
74
84
|
query: {
|
|
75
85
|
create: {
|
|
@@ -189,7 +199,8 @@ var RestModule;
|
|
|
189
199
|
queryString = `${paginationString}&${queryString}`;
|
|
190
200
|
}
|
|
191
201
|
}
|
|
192
|
-
|
|
202
|
+
// make sure the query string is fully encoded
|
|
203
|
+
const main = `${path}?${querystring_1.default.encode(querystring_1.default.decode(queryString))}`;
|
|
193
204
|
let complete = main;
|
|
194
205
|
if (this.config.url && !main.startsWith("http")) {
|
|
195
206
|
complete = !this.config.url ? main : `${this.config.url}/${main}`;
|
|
@@ -309,6 +320,10 @@ var RestModule;
|
|
|
309
320
|
}
|
|
310
321
|
let input = { method, headers: this.headers };
|
|
311
322
|
input = this.addBody(bodyType, requestBody, input, pagination, paginationValues);
|
|
323
|
+
if (this.config.legacyHttpParser) {
|
|
324
|
+
// https://github.com/nodejs/node/issues/43798
|
|
325
|
+
input.extraHttpOptions = { insecureHTTPParser: true };
|
|
326
|
+
}
|
|
312
327
|
this.startTimeMs = performance.now();
|
|
313
328
|
const url = this.getUrl(path, queryString, pagination, paginationValues);
|
|
314
329
|
const response = yield fetch(url, input);
|
package/dist/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@budibase/server",
|
|
3
3
|
"email": "hi@budibase.com",
|
|
4
|
-
"version": "1.3.
|
|
4
|
+
"version": "1.3.14",
|
|
5
5
|
"description": "Budibase Web Server",
|
|
6
6
|
"main": "src/index.ts",
|
|
7
7
|
"repository": {
|
|
@@ -77,11 +77,11 @@
|
|
|
77
77
|
"license": "GPL-3.0",
|
|
78
78
|
"dependencies": {
|
|
79
79
|
"@apidevtools/swagger-parser": "10.0.3",
|
|
80
|
-
"@budibase/backend-core": "^1.3.
|
|
81
|
-
"@budibase/client": "^1.3.
|
|
82
|
-
"@budibase/pro": "1.3.
|
|
83
|
-
"@budibase/string-templates": "^1.3.
|
|
84
|
-
"@budibase/types": "^1.3.
|
|
80
|
+
"@budibase/backend-core": "^1.3.14",
|
|
81
|
+
"@budibase/client": "^1.3.14",
|
|
82
|
+
"@budibase/pro": "1.3.13",
|
|
83
|
+
"@budibase/string-templates": "^1.3.14",
|
|
84
|
+
"@budibase/types": "^1.3.14",
|
|
85
85
|
"@bull-board/api": "3.7.0",
|
|
86
86
|
"@bull-board/koa": "3.9.4",
|
|
87
87
|
"@elastic/elasticsearch": "7.10.0",
|
|
@@ -392,6 +392,9 @@ class Orchestrator {
|
|
|
392
392
|
}
|
|
393
393
|
function execute(input, callback) {
|
|
394
394
|
const appId = input.data.event.appId;
|
|
395
|
+
if (!appId) {
|
|
396
|
+
throw new Error("Unable to execute, event doesn't contain app ID.");
|
|
397
|
+
}
|
|
395
398
|
doInAppContext(appId, () => __awaiter(this, void 0, void 0, function* () {
|
|
396
399
|
const automationOrchestrator = new Orchestrator(input.data.automation, input.data.event, input.opts);
|
|
397
400
|
try {
|
|
@@ -406,6 +409,9 @@ function execute(input, callback) {
|
|
|
406
409
|
exports.execute = execute;
|
|
407
410
|
const removeStalled = (input) => __awaiter(void 0, void 0, void 0, function* () {
|
|
408
411
|
const appId = input.data.event.appId;
|
|
412
|
+
if (!appId) {
|
|
413
|
+
throw new Error("Unable to execute, event doesn't contain app ID.");
|
|
414
|
+
}
|
|
409
415
|
yield doInAppContext(appId, () => __awaiter(void 0, void 0, void 0, function* () {
|
|
410
416
|
const automationOrchestrator = new Orchestrator(input.data.automation, input.data.event, input.opts);
|
|
411
417
|
yield automationOrchestrator.stopCron("stalled");
|