@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.
|
|
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
package/dist/engine.js
CHANGED
package/package.json
CHANGED