@dev-blinq/cucumber_client 1.0.1450-dev → 1.0.1451-dev

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.
@@ -15,6 +15,7 @@ import chokidar from "chokidar";
15
15
  import { unEscapeNonPrintables } from "../cucumber/utils.js";
16
16
  import { findAvailablePort } from "../utils/index.js";
17
17
  import socketLogger from "../utils/socket_logger.js";
18
+ import { tmpdir } from "os";
18
19
  const __dirname = path.dirname(url.fileURLToPath(import.meta.url));
19
20
 
20
21
  const delay = (ms) => new Promise((resolve) => setTimeout(resolve, ms));
@@ -188,6 +189,10 @@ export class BVTRecorder {
188
189
  this.world = { attach: () => {} };
189
190
  this.shouldTakeScreenshot = true;
190
191
  this.watcher = null;
192
+ this.networkEventsFolder = path.join(tmpdir(), "blinq_network_events");
193
+ if (existsSync(this.networkEventsFolder)) {
194
+ rmSync(this.networkEventsFolder, { recursive: true, force: true });
195
+ }
191
196
  }
192
197
  events = {
193
198
  onFrameNavigate: "BVTRecorder.onFrameNavigate",
@@ -840,9 +845,9 @@ export class BVTRecorder {
840
845
  this.bvtContext.navigate = true;
841
846
  this.bvtContext.loadedRoutes = null;
842
847
  if (listenNetwork) {
843
- process.env.STORE_DETAILED_NETWORK_DATA = "true";
848
+ this.bvtContext.STORE_DETAILED_NETWORK_DATA = true;
844
849
  } else {
845
- process.env.STORE_DETAILED_NETWORK_DATA = "false";
850
+ this.bvtContext.STORE_DETAILED_NETWORK_DATA = false;
846
851
  }
847
852
  for (const [key, value] of Object.entries(_env)) {
848
853
  process.env[key] = value;
@@ -1223,4 +1228,10 @@ export class BVTRecorder {
1223
1228
  }
1224
1229
  return {};
1225
1230
  }
1231
+
1232
+ stopRecordingNetwork(input) {
1233
+ if (this.bvtContext) {
1234
+ this.bvtContext.STORE_DETAILED_NETWORK_DATA = false;
1235
+ }
1236
+ }
1226
1237
  }
@@ -265,6 +265,9 @@ const init = ({ envName, projectDir, roomId, TOKEN }) => {
265
265
  "recorderWindow.resetExecution": async (input) => {
266
266
  return await recorder.resetExecution(input);
267
267
  },
268
+ "recorderWindow.stopRecordingNetwork": async (input) => {
269
+ return recorder.stopRecordingNetwork(input);
270
+ },
268
271
  });
269
272
  socket.on("targetBrowser.command.event", async (input) => {
270
273
  return recorder.onAction(input);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dev-blinq/cucumber_client",
3
- "version": "1.0.1450-dev",
3
+ "version": "1.0.1451-dev",
4
4
  "description": " ",
5
5
  "main": "bin/index.js",
6
6
  "types": "bin/index.d.ts",
@@ -39,7 +39,7 @@
39
39
  "@cucumber/tag-expressions": "^6.1.1",
40
40
  "@dev-blinq/cucumber-js": "1.0.184-dev",
41
41
  "@faker-js/faker": "^8.1.0",
42
- "automation_model": "1.0.839-dev",
42
+ "automation_model": "1.0.841-dev",
43
43
  "axios": "^1.7.4",
44
44
  "chokidar": "^3.6.0",
45
45
  "create-require": "^1.1.1",