runner-runtime 1.0.67 → 1.0.69
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/api.js +10 -6
- package/package.json +2 -2
package/events/api.js
CHANGED
|
@@ -21,7 +21,7 @@ const { v4: uuidv4 } = require("uuid");
|
|
|
21
21
|
|
|
22
22
|
const fs = require("fs");
|
|
23
23
|
const { minimatch } = require("minimatch");
|
|
24
|
-
const runtime = require("postman-runtime-
|
|
24
|
+
const runtime = require("postman-runtime-plus");
|
|
25
25
|
|
|
26
26
|
// 将api转postman请求参数
|
|
27
27
|
const convert2PostmanRequest = (request, option) => {
|
|
@@ -844,7 +844,11 @@ const convert2PostmanEvent = (request, listen, option) => {
|
|
|
844
844
|
|
|
845
845
|
`
|
|
846
846
|
const getMainProcessSocketPath = ()=>{
|
|
847
|
-
|
|
847
|
+
try{
|
|
848
|
+
return atob("${_.get(process, 'env.ELECTRON_PIPE')}");
|
|
849
|
+
}catch(e){
|
|
850
|
+
return "${_.get(process, 'env.ELECTRON_PIPE')}";
|
|
851
|
+
}
|
|
848
852
|
}
|
|
849
853
|
`,
|
|
850
854
|
|
|
@@ -2054,7 +2058,7 @@ const initRequestJson = (event, option) => {
|
|
|
2054
2058
|
_.set(requestJson, "url", smartUrlJoin(envPreUrl, requestUrl));
|
|
2055
2059
|
}
|
|
2056
2060
|
}
|
|
2057
|
-
|
|
2061
|
+
|
|
2058
2062
|
// 设置 initVarReplacedUrl
|
|
2059
2063
|
let initVarReplacedUrl = requestJson?.url;
|
|
2060
2064
|
_.forEach(_.assign({}, globals, _.get(env, 'environment')), (value, key) => {
|
|
@@ -2089,7 +2093,7 @@ const initRequestJson = (event, option) => {
|
|
|
2089
2093
|
"data": _.assign({
|
|
2090
2094
|
"connectionId": "",
|
|
2091
2095
|
"query": "",
|
|
2092
|
-
"isConsoleOutput":
|
|
2096
|
+
"isConsoleOutput": 1,
|
|
2093
2097
|
"variables": []
|
|
2094
2098
|
}, event?.data)
|
|
2095
2099
|
}
|
|
@@ -2283,7 +2287,7 @@ module.exports = (event, option, callback, eventRuntimeData, eventResultList) =>
|
|
|
2283
2287
|
)
|
|
2284
2288
|
}
|
|
2285
2289
|
}
|
|
2286
|
-
|
|
2290
|
+
|
|
2287
2291
|
const requestOptions = convert2EchoRequest(request, requestJson, postmanJSON, history);
|
|
2288
2292
|
_.set(eventRuntimeData, [event?.event_id, "request"], requestOptions);
|
|
2289
2293
|
|
|
@@ -2408,7 +2412,7 @@ module.exports = (event, option, callback, eventRuntimeData, eventResultList) =>
|
|
|
2408
2412
|
event_id: event?.event_id,
|
|
2409
2413
|
}
|
|
2410
2414
|
);
|
|
2411
|
-
|
|
2415
|
+
|
|
2412
2416
|
if (scene === 'auto_test' || requestJson?.target_type === 'sse') { // 纯粹为了兼容老的数据返回格式 todo...
|
|
2413
2417
|
if (_.includes(['assert', 'assert_visual', 'api', 'sample', 'script', 'sql'], event?.type)) {
|
|
2414
2418
|
eventResultList.push(_.assign(camelCaseToSnakeCase(_.get(_.cloneDeep(eventRuntimeData), event?.event_id)), _.pick(event, ['type', 'event_id', 'test_id', 'iteration_id'])));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "runner-runtime",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.69",
|
|
4
4
|
"description": "runner-runtime.",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"is-image": "^3.0.0",
|
|
31
31
|
"is-svg": "^4.3.2",
|
|
32
32
|
"json-bigint": "^1.0.0",
|
|
33
|
-
"json-schema-faker-pro": "^0.5.
|
|
33
|
+
"json-schema-faker-pro": "^0.5.24",
|
|
34
34
|
"json5": "^2.2.3",
|
|
35
35
|
"jsonpath": "^1.1.1",
|
|
36
36
|
"lodash": "^4.17.21",
|