runner-runtime 1.0.12 → 1.0.13
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 -7
- package/package.json +1 -1
package/events/api.js
CHANGED
|
@@ -9,7 +9,7 @@ const FileType = require("file-type"),
|
|
|
9
9
|
tough = require("tough-cookie"),
|
|
10
10
|
Buffer = require("buffer/").Buffer,
|
|
11
11
|
isImage = require("is-image");
|
|
12
|
-
const { getAPIFromCollection, smartUrlJoin, replace2RegExp, getParentTargetIDs, base64toCacheFile, getInsideVariables, getCaseInsensitive,camelCaseToSnakeCase } = require('../libs/utils'),
|
|
12
|
+
const { getAPIFromCollection, smartUrlJoin, replace2RegExp, getParentTargetIDs, base64toCacheFile, getInsideVariables, getCaseInsensitive, camelCaseToSnakeCase } = require('../libs/utils'),
|
|
13
13
|
_ = require('lodash');
|
|
14
14
|
const sdk = require("postman-collection"),
|
|
15
15
|
Url = sdk.Url,
|
|
@@ -1552,9 +1552,9 @@ async function convert2EchoResponse(response, history) {
|
|
|
1552
1552
|
}
|
|
1553
1553
|
|
|
1554
1554
|
_.assign(cloneResponse, { mimeType, fitForShow });
|
|
1555
|
-
} catch (e) {
|
|
1555
|
+
} catch (e) {
|
|
1556
1556
|
|
|
1557
|
-
console.log(e,1111)
|
|
1557
|
+
console.log(e, 1111)
|
|
1558
1558
|
}
|
|
1559
1559
|
|
|
1560
1560
|
// 响应头对象
|
|
@@ -2228,11 +2228,14 @@ module.exports = (event, option, callback, eventRuntimeData, eventResultList) =>
|
|
|
2228
2228
|
|
|
2229
2229
|
responseData(cursor, data) {
|
|
2230
2230
|
callback({
|
|
2231
|
-
|
|
2231
|
+
event: "sse",
|
|
2232
2232
|
data: {
|
|
2233
|
-
|
|
2234
|
-
|
|
2235
|
-
|
|
2233
|
+
action: "sse",
|
|
2234
|
+
data: {
|
|
2235
|
+
stream: data,
|
|
2236
|
+
size: _.size(data),
|
|
2237
|
+
time: Date.now()
|
|
2238
|
+
},
|
|
2236
2239
|
},
|
|
2237
2240
|
msg: "success",
|
|
2238
2241
|
error: null,
|