@flowriki/agent 0.1.0-beta.25 → 0.1.0-beta.26

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.
@@ -6,7 +6,7 @@ import os from "os";
6
6
  import path from "path";
7
7
  import { createRequire } from "module";
8
8
  import { spawnSync } from "child_process";
9
- var AGENT_VERSION = "0.1.0-beta.25";
9
+ var AGENT_VERSION = "0.1.0-beta.26";
10
10
  async function prepareBrowsers() {
11
11
  if (browsersReady()) {
12
12
  return { ok: true, already: true, message: "chromium is already installed" };
@@ -3587,8 +3587,11 @@ var RunActors = class {
3587
3587
  this.sessions.set(id, session);
3588
3588
  await this.opts.onCreate?.(session);
3589
3589
  }
3590
+ const switching = this.current !== session;
3590
3591
  this.current = session;
3591
3592
  this.currentId = id;
3593
+ if (switching && this.opts.headless === false) await session.page.bringToFront().catch(() => {
3594
+ });
3592
3595
  if (this.initialized.has(id)) return;
3593
3596
  if (startUrl) await session.page.goto(startUrl, { waitUntil: "domcontentloaded" });
3594
3597
  if (actor?.startSignedIn) {
package/dist/cli.js CHANGED
@@ -8,7 +8,7 @@ import {
8
8
  resolveCheckouts,
9
9
  start,
10
10
  status
11
- } from "./chunk-WJ643WHC.js";
11
+ } from "./chunk-IH7KFCV4.js";
12
12
 
13
13
  // src/cli.ts
14
14
  import { parseArgs } from "util";
package/dist/engine.js CHANGED
@@ -9,7 +9,7 @@ import {
9
9
  resolveCheckouts,
10
10
  start,
11
11
  status
12
- } from "./chunk-WJ643WHC.js";
12
+ } from "./chunk-IH7KFCV4.js";
13
13
  export {
14
14
  AGENT_VERSION,
15
15
  browsersReady,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flowriki/agent",
3
- "version": "0.1.0-beta.25",
3
+ "version": "0.1.0-beta.26",
4
4
  "description": "Run Flowriki UI tests on your own computer. Connects this machine to your Flowriki account.",
5
5
  "license": "SEE LICENSE IN LICENSE",
6
6
  "type": "module",