@artilleryio/int-core 2.19.0-0d134b4 → 2.19.0-6267e2b
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/lib/engine_http.js +11 -7
- package/package.json +2 -2
package/lib/engine_http.js
CHANGED
|
@@ -26,7 +26,7 @@ const decompressResponse = require('decompress-response');
|
|
|
26
26
|
const fs = require('fs');
|
|
27
27
|
const path = require('path');
|
|
28
28
|
|
|
29
|
-
const { promisify
|
|
29
|
+
const { promisify } = require('node:util');
|
|
30
30
|
|
|
31
31
|
const crypto = require('node:crypto');
|
|
32
32
|
|
|
@@ -222,15 +222,19 @@ HttpEngine.prototype.step = function step(requestSpec, ee, opts) {
|
|
|
222
222
|
return function (context, callback) {
|
|
223
223
|
let processFunc = self.config.processor[requestSpec.function];
|
|
224
224
|
if (processFunc) {
|
|
225
|
-
let f;
|
|
226
225
|
if (processFunc.constructor.name === 'Function') {
|
|
227
|
-
|
|
226
|
+
return processFunc(context, ee, function (hookErr) {
|
|
227
|
+
return callback(hookErr, context);
|
|
228
|
+
});
|
|
228
229
|
} else {
|
|
229
|
-
|
|
230
|
+
return processFunc(context, ee)
|
|
231
|
+
.then(() => {
|
|
232
|
+
callback(null, context);
|
|
233
|
+
})
|
|
234
|
+
.catch((err) => {
|
|
235
|
+
callback(err, context);
|
|
236
|
+
});
|
|
230
237
|
}
|
|
231
|
-
return f(context, ee, function (hookErr) {
|
|
232
|
-
return callback(hookErr, context);
|
|
233
|
-
});
|
|
234
238
|
} else {
|
|
235
239
|
debug(`Function "${requestSpec.function}" not defined`);
|
|
236
240
|
debug('processor: %o', self.config.processor);
|
package/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@artilleryio/int-core",
|
|
3
|
-
"version": "2.19.0-
|
|
3
|
+
"version": "2.19.0-6267e2b",
|
|
4
4
|
"main": "./index.js",
|
|
5
5
|
"license": "MPL-2.0",
|
|
6
6
|
"dependencies": {
|
|
7
|
-
"@artilleryio/int-commons": "2.15.0-
|
|
7
|
+
"@artilleryio/int-commons": "2.15.0-6267e2b",
|
|
8
8
|
"@artilleryio/sketches-js": "^2.1.1",
|
|
9
9
|
"agentkeepalive": "^4.1.0",
|
|
10
10
|
"arrivals": "^2.1.2",
|