runner-runtime 1.0.53 → 1.0.54
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/events/wait.js +2 -2
- package/index.js +5 -3
- package/libs/utils.js +0 -2
- package/package.json +1 -1
- package/tmp/request.js +1 -1
package/events/wait.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
const atomicSleep = require("atomic-sleep"),
|
|
2
2
|
_ = require('lodash');
|
|
3
|
-
const { variableReplace } = require("../libs/utils");
|
|
3
|
+
const { variableReplace, convertEndRuntimeState } = require("../libs/utils");
|
|
4
4
|
|
|
5
5
|
module.exports = async (event, option, callback, eventRuntimeData, eventResultList) => {
|
|
6
6
|
try {
|
|
@@ -27,7 +27,7 @@ module.exports = async (event, option, callback, eventRuntimeData, eventResultLi
|
|
|
27
27
|
atomicSleep(sleep)
|
|
28
28
|
}
|
|
29
29
|
} catch (e) {
|
|
30
|
-
throw({
|
|
30
|
+
throw ({
|
|
31
31
|
action: 'stystemError',
|
|
32
32
|
message: String(e),
|
|
33
33
|
event_id: event?.event_id
|
package/index.js
CHANGED
|
@@ -3,8 +3,6 @@ const _ = require('lodash');
|
|
|
3
3
|
const moment = require('moment');
|
|
4
4
|
const aTools = require("apipost-tools");
|
|
5
5
|
const { executeEvent, iterationEvent } = require('./events');
|
|
6
|
-
const { resolve } = require('superagent/lib/request-base');
|
|
7
|
-
const { da } = require('@faker-js/faker');
|
|
8
6
|
const ABORT_RECURSION_ERROR = ['stystemError']; //需要跳出递归的错误
|
|
9
7
|
|
|
10
8
|
// 执行场景
|
|
@@ -61,7 +59,11 @@ const run = async (events, option, callback) => {
|
|
|
61
59
|
// 自动化测试
|
|
62
60
|
if (!_.isEmpty(finalEvents)) {
|
|
63
61
|
const total = _.size(finalEvents);
|
|
64
|
-
|
|
62
|
+
try {
|
|
63
|
+
await iterationEvent(finalEvents, _.assign(eventOptions, { iterationDataArr, total }), callback, eventRuntimeData, eventResultList);
|
|
64
|
+
} catch (e) {
|
|
65
|
+
callback(e)
|
|
66
|
+
}
|
|
65
67
|
}
|
|
66
68
|
|
|
67
69
|
const tempVars = _.pick(_.get(eventRuntimeData, 'variables'), ['environment', '_globals']);
|
package/libs/utils.js
CHANGED
package/package.json
CHANGED