@skrillex1224/playwright-toolkit 2.1.90 → 2.1.91
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/dist/index.cjs +7 -3
- package/dist/index.cjs.map +2 -2
- package/dist/index.js +7 -3
- package/dist/index.js.map +2 -2
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -1350,13 +1350,17 @@ var Sse = {
|
|
|
1350
1350
|
initialTimer = null;
|
|
1351
1351
|
overallTimer = null;
|
|
1352
1352
|
};
|
|
1353
|
+
let streamIndex = 0;
|
|
1353
1354
|
const workPromise = new Promise((resolve, reject) => {
|
|
1354
1355
|
page.route(urlPattern, async (route) => {
|
|
1356
|
+
streamIndex++;
|
|
1357
|
+
const currentStreamIndex = streamIndex;
|
|
1355
1358
|
const request = route.request();
|
|
1356
|
-
|
|
1359
|
+
const postData = request.postData();
|
|
1360
|
+
const postPreview = postData ? postData.substring(0, 1e3) : "(\u65E0POST\u6570\u636E)";
|
|
1361
|
+
logger8.info(`[MITM] \u{1F539} \u6D41#${currentStreamIndex} \u62E6\u622A\u8BF7\u6C42: ${request.url()} POST\u9884\u89C8: ${postPreview}`);
|
|
1357
1362
|
try {
|
|
1358
1363
|
const headers = await request.allHeaders();
|
|
1359
|
-
const postData = request.postData();
|
|
1360
1364
|
const urlObj = new import_url.URL(request.url());
|
|
1361
1365
|
delete headers["accept-encoding"];
|
|
1362
1366
|
delete headers["content-length"];
|
|
@@ -1392,7 +1396,7 @@ var Sse = {
|
|
|
1392
1396
|
}
|
|
1393
1397
|
});
|
|
1394
1398
|
res.on("end", () => {
|
|
1395
|
-
logger8.info(
|
|
1399
|
+
logger8.info(`[MITM] \u{1F539} \u6D41#${currentStreamIndex} \u4E0A\u6E38\u54CD\u5E94\u7ED3\u675F | \u7D2F\u8BA1\u5B57\u7B26\u6570: ${accumulatedText.length}`);
|
|
1396
1400
|
clearAllTimers();
|
|
1397
1401
|
if (onEnd) {
|
|
1398
1402
|
try {
|