@xbrowser/cli 1.33.0 → 1.34.0

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.
@@ -21,7 +21,7 @@ import {
21
21
  saveSessionDiskMeta,
22
22
  setActivePage,
23
23
  touchSession
24
- } from "./chunk-5MYC6LVL.js";
24
+ } from "./chunk-3E6VVMK2.js";
25
25
  import "./chunk-SMYSNO4M.js";
26
26
  import "./chunk-2KPI5GKP.js";
27
27
  import "./chunk-GDKLH7ZY.js";
@@ -21,8 +21,8 @@ import {
21
21
  saveSessionDiskMeta,
22
22
  setActivePage,
23
23
  touchSession
24
- } from "./chunk-DDHHVII7.js";
25
- import "./chunk-YX5KVWGX.js";
24
+ } from "./chunk-N7DFS4V7.js";
25
+ import "./chunk-YIL44YDX.js";
26
26
  import "./chunk-SMYSNO4M.js";
27
27
  import "./chunk-2KPI5GKP.js";
28
28
  import "./chunk-GDKLH7ZY.js";
@@ -21,8 +21,8 @@ import {
21
21
  saveSessionDiskMeta,
22
22
  setActivePage,
23
23
  touchSession
24
- } from "./chunk-OVAUGFM6.js";
25
- import "./chunk-H25ECCYJ.js";
24
+ } from "./chunk-DZ6XEPAH.js";
25
+ import "./chunk-R7AG7ONI.js";
26
26
  import "./chunk-A7NEA4PA.js";
27
27
  import "./chunk-SMYSNO4M.js";
28
28
  import "./chunk-2KPI5GKP.js";
@@ -1881,6 +1881,13 @@ function setupPageEvents(options) {
1881
1881
  options.emit("framenavigated", options.mainFrame());
1882
1882
  })
1883
1883
  );
1884
+ options.addSubscription(
1885
+ options.conn.subscribe("Page.navigatedWithinDocument", options.sessionId, (params) => {
1886
+ const p = params;
1887
+ const url = p?.url ?? p?.frame?.url;
1888
+ if (url) options.setUrl(url);
1889
+ })
1890
+ );
1884
1891
  options.addSubscription(
1885
1892
  options.conn.subscribe("Page.loadEventFired", options.sessionId, () => {
1886
1893
  options.markLoadFired();
@@ -14,7 +14,7 @@ import {
14
14
  scrollIntoView,
15
15
  waitForActionable,
16
16
  waitForNetworkIdle
17
- } from "./chunk-H25ECCYJ.js";
17
+ } from "./chunk-R7AG7ONI.js";
18
18
  import "./chunk-A7NEA4PA.js";
19
19
  import "./chunk-SMYSNO4M.js";
20
20
  import {
@@ -14,7 +14,7 @@ import {
14
14
  scrollIntoView,
15
15
  waitForActionable,
16
16
  waitForNetworkIdle
17
- } from "./chunk-YX5KVWGX.js";
17
+ } from "./chunk-YIL44YDX.js";
18
18
  import "./chunk-SMYSNO4M.js";
19
19
  import {
20
20
  connectToCDP,
@@ -1954,6 +1954,13 @@ function setupPageEvents(options) {
1954
1954
  options.emit("framenavigated", options.mainFrame());
1955
1955
  })
1956
1956
  );
1957
+ options.addSubscription(
1958
+ options.conn.subscribe("Page.navigatedWithinDocument", options.sessionId, (params) => {
1959
+ const p = params;
1960
+ const url = p?.url ?? p?.frame?.url;
1961
+ if (url) options.setUrl(url);
1962
+ })
1963
+ );
1957
1964
  options.addSubscription(
1958
1965
  options.conn.subscribe("Page.loadEventFired", options.sessionId, () => {
1959
1966
  options.markLoadFired();
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  createRuleEngine,
3
3
  launch
4
- } from "./chunk-H25ECCYJ.js";
4
+ } from "./chunk-R7AG7ONI.js";
5
5
  import {
6
6
  errMsg
7
7
  } from "./chunk-GDKLH7ZY.js";
@@ -20,7 +20,7 @@ import {
20
20
  resolveLaunchOpts,
21
21
  saveSessionDiskMeta,
22
22
  setActivePage
23
- } from "./chunk-5MYC6LVL.js";
23
+ } from "./chunk-3E6VVMK2.js";
24
24
  import {
25
25
  rand,
26
26
  sleep,
@@ -9178,7 +9178,7 @@ async function executeCommand(commandName, params, sessionName = "default", extr
9178
9178
  }
9179
9179
  let targetPageOverride = null;
9180
9180
  if (_target && extraOpts?.cdpEndpoint) {
9181
- const { findTargetPage } = await import("./browser-3LBSVDSS.js");
9181
+ const { findTargetPage } = await import("./browser-GXL6V2JW.js");
9182
9182
  targetPageOverride = await findTargetPage(extraOpts.cdpEndpoint, _target);
9183
9183
  if (!targetPageOverride) {
9184
9184
  return errorResult(`Target "${_target}" not found. Use 'xbrowser targets --cdp ${extraOpts.cdpEndpoint}' to list available pages.`);
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  launch
3
- } from "./chunk-YX5KVWGX.js";
3
+ } from "./chunk-YIL44YDX.js";
4
4
  import {
5
5
  errMsg
6
6
  } from "./chunk-GDKLH7ZY.js";
@@ -9,7 +9,7 @@ import {
9
9
  resolveLaunchOpts,
10
10
  saveSessionDiskMeta,
11
11
  setActivePage
12
- } from "./chunk-DDHHVII7.js";
12
+ } from "./chunk-N7DFS4V7.js";
13
13
  import {
14
14
  detectAntiBot,
15
15
  formatDetectionMessage
@@ -9495,7 +9495,7 @@ async function executeCommand(commandName, params, sessionName = "default", extr
9495
9495
  }
9496
9496
  let targetPageOverride = null;
9497
9497
  if (_target && extraOpts?.cdpEndpoint) {
9498
- const { findTargetPage } = await import("./browser-D7RFPTD4.js");
9498
+ const { findTargetPage } = await import("./browser-X7LO42UI.js");
9499
9499
  targetPageOverride = await findTargetPage(extraOpts.cdpEndpoint, _target);
9500
9500
  if (!targetPageOverride) {
9501
9501
  return errorResult(`Target "${_target}" not found. Use 'xbrowser targets --cdp ${extraOpts.cdpEndpoint}' to list available pages.`);
@@ -1782,6 +1782,13 @@ function setupPageEvents(options) {
1782
1782
  options.emit("framenavigated", options.mainFrame());
1783
1783
  })
1784
1784
  );
1785
+ options.addSubscription(
1786
+ options.conn.subscribe("Page.navigatedWithinDocument", options.sessionId, (params) => {
1787
+ const p = params;
1788
+ const url = p?.url ?? p?.frame?.url;
1789
+ if (url) options.setUrl(url);
1790
+ })
1791
+ );
1785
1792
  options.addSubscription(
1786
1793
  options.conn.subscribe("Page.loadEventFired", options.sessionId, () => {
1787
1794
  options.markLoadFired();
@@ -1883,6 +1883,13 @@ function setupPageEvents(options) {
1883
1883
  options.emit("framenavigated", options.mainFrame());
1884
1884
  })
1885
1885
  );
1886
+ options.addSubscription(
1887
+ options.conn.subscribe("Page.navigatedWithinDocument", options.sessionId, (params) => {
1888
+ const p = params;
1889
+ const url = p?.url ?? p?.frame?.url;
1890
+ if (url) options.setUrl(url);
1891
+ })
1892
+ );
1886
1893
  options.addSubscription(
1887
1894
  options.conn.subscribe("Page.loadEventFired", options.sessionId, () => {
1888
1895
  options.markLoadFired();
package/dist/cli.js CHANGED
@@ -17,7 +17,7 @@ import {
17
17
  loadHooks,
18
18
  parsePluginParams,
19
19
  readJsonFile
20
- } from "./chunk-ACPMC47K.js";
20
+ } from "./chunk-J4NOL5XX.js";
21
21
  import "./chunk-JKVUFP3G.js";
22
22
  import {
23
23
  daemonPing,
@@ -84,7 +84,7 @@ import {
84
84
  findSession,
85
85
  getAllSessions,
86
86
  saveSessionDiskMeta
87
- } from "./chunk-5MYC6LVL.js";
87
+ } from "./chunk-3E6VVMK2.js";
88
88
  import "./chunk-SMYSNO4M.js";
89
89
  import "./chunk-2KPI5GKP.js";
90
90
  import {
@@ -6137,7 +6137,7 @@ async function handleRemote(args, options, mode) {
6137
6137
  }
6138
6138
  }
6139
6139
  async function startMcpServer() {
6140
- const { startMcpStdio } = await import("./server-6CTC3RHV.js");
6140
+ const { startMcpStdio } = await import("./server-R4OYD7ZC.js");
6141
6141
  startMcpStdio();
6142
6142
  }
6143
6143
 
@@ -6455,7 +6455,7 @@ Run "xbrowser ${command} ${subCommand} --help" to see available parameters.`
6455
6455
  const targetPage = pages[cmdTabIndex];
6456
6456
  await targetPage.bringToFront().catch(() => {
6457
6457
  });
6458
- const { setActivePage } = await import("./browser-3LBSVDSS.js");
6458
+ const { setActivePage } = await import("./browser-GXL6V2JW.js");
6459
6459
  setActivePage(session, targetPage);
6460
6460
  }
6461
6461
  }
@@ -6713,7 +6713,7 @@ async function main() {
6713
6713
  const command = process.argv[2];
6714
6714
  const isLongRunning = command === "preview" || command === "serve" || command === "mcp" || command === "console-panel";
6715
6715
  if (!isLongRunning) {
6716
- const { ensureProcessCanExit } = await import("./browser-3LBSVDSS.js");
6716
+ const { ensureProcessCanExit } = await import("./browser-GXL6V2JW.js");
6717
6717
  await ensureProcessCanExit().catch(() => {
6718
6718
  });
6719
6719
  process.exit(process.exitCode || exitCode);
@@ -39,10 +39,10 @@ import {
39
39
  resolveLaunchOpts,
40
40
  saveSessionDiskMeta,
41
41
  setActivePage
42
- } from "./chunk-OVAUGFM6.js";
42
+ } from "./chunk-DZ6XEPAH.js";
43
43
  import {
44
44
  createRuleEngine
45
- } from "./chunk-H25ECCYJ.js";
45
+ } from "./chunk-R7AG7ONI.js";
46
46
  import {
47
47
  queryJS
48
48
  } from "./chunk-A7NEA4PA.js";
@@ -8610,7 +8610,7 @@ async function executeCommand(commandName, params, sessionName = "default", extr
8610
8610
  }
8611
8611
  let targetPageOverride = null;
8612
8612
  if (_target && extraOpts?.cdpEndpoint) {
8613
- const { findTargetPage } = await import("./browser-23BMBCH2.js");
8613
+ const { findTargetPage } = await import("./browser-ZWEJ663M.js");
8614
8614
  targetPageOverride = await findTargetPage(extraOpts.cdpEndpoint, _target);
8615
8615
  if (!targetPageOverride) {
8616
8616
  return errorResult(`Target "${_target}" not found. Use 'xbrowser targets --cdp ${extraOpts.cdpEndpoint}' to list available pages.`);
@@ -10197,7 +10197,7 @@ function createRPCHandler() {
10197
10197
  if (isNewFormat) {
10198
10198
  try {
10199
10199
  const replayErrors = [];
10200
- const { SessionReplayer } = await import("./session-replayer-IGRRA2QC.js");
10200
+ const { SessionReplayer } = await import("./session-replayer-GHEFFNGV.js");
10201
10201
  const replayer = new SessionReplayer({
10202
10202
  page: session.page,
10203
10203
  stepDelay: slowMo * 500,
package/dist/index.js CHANGED
@@ -48,7 +48,7 @@ import {
48
48
  splitCommand,
49
49
  waitForAIResponse,
50
50
  waitForPage
51
- } from "./chunk-AKT3WLZM.js";
51
+ } from "./chunk-R57Z5KZX.js";
52
52
  import {
53
53
  SessionRecorder,
54
54
  readMarkdownSummary
@@ -64,7 +64,7 @@ import {
64
64
  getBrowser,
65
65
  resetForTesting,
66
66
  saveSessionDiskMeta
67
- } from "./chunk-DDHHVII7.js";
67
+ } from "./chunk-N7DFS4V7.js";
68
68
  import "./chunk-JKVUFP3G.js";
69
69
  import {
70
70
  daemonPing,
@@ -123,7 +123,7 @@ import {
123
123
  generateJSScript,
124
124
  generatePythonScript
125
125
  } from "./chunk-ETCO4SNK.js";
126
- import "./chunk-YX5KVWGX.js";
126
+ import "./chunk-YIL44YDX.js";
127
127
  import "./chunk-SMYSNO4M.js";
128
128
  import "./chunk-2KPI5GKP.js";
129
129
  import {
@@ -6232,7 +6232,7 @@ async function handleRemote(args, options, mode) {
6232
6232
  }
6233
6233
  }
6234
6234
  async function startMcpServer() {
6235
- const { startMcpStdio } = await import("./server-5JHB4TML.js");
6235
+ const { startMcpStdio } = await import("./server-5U56MQD2.js");
6236
6236
  startMcpStdio();
6237
6237
  }
6238
6238
 
@@ -6550,7 +6550,7 @@ Run "xbrowser ${command} ${subCommand} --help" to see available parameters.`
6550
6550
  const targetPage = pages[cmdTabIndex];
6551
6551
  await targetPage.bringToFront().catch(() => {
6552
6552
  });
6553
- const { setActivePage } = await import("./browser-D7RFPTD4.js");
6553
+ const { setActivePage } = await import("./browser-X7LO42UI.js");
6554
6554
  setActivePage(session, targetPage);
6555
6555
  }
6556
6556
  }
@@ -9824,7 +9824,7 @@ var DataCollector = class {
9824
9824
  return results;
9825
9825
  }
9826
9826
  async createBrowserContext() {
9827
- const { launch } = await import("./cdp-driver-GE6Y6LPI.js");
9827
+ const { launch } = await import("./cdp-driver-QOUSRPR2.js");
9828
9828
  const { browser } = await launch({
9829
9829
  headless: true,
9830
9830
  args: ["--no-sandbox", "--disable-setuid-sandbox"]
@@ -1,13 +1,13 @@
1
1
  import {
2
2
  executeChain,
3
3
  executeCommand
4
- } from "./chunk-AKT3WLZM.js";
5
- import "./chunk-DDHHVII7.js";
4
+ } from "./chunk-R57Z5KZX.js";
5
+ import "./chunk-N7DFS4V7.js";
6
6
  import "./chunk-JKVUFP3G.js";
7
7
  import "./chunk-3OD76SUE.js";
8
8
  import "./chunk-ZTHE5RBZ.js";
9
9
  import "./chunk-Q2DFJQGS.js";
10
- import "./chunk-YX5KVWGX.js";
10
+ import "./chunk-YIL44YDX.js";
11
11
  import "./chunk-SMYSNO4M.js";
12
12
  import "./chunk-2KPI5GKP.js";
13
13
  import "./chunk-GDKLH7ZY.js";
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  executeChain,
3
3
  executeCommand
4
- } from "./chunk-ACPMC47K.js";
4
+ } from "./chunk-J4NOL5XX.js";
5
5
  import "./chunk-JKVUFP3G.js";
6
6
  import "./chunk-3OD76SUE.js";
7
7
  import "./chunk-ZTHE5RBZ.js";
8
8
  import "./chunk-Q2DFJQGS.js";
9
- import "./chunk-5MYC6LVL.js";
9
+ import "./chunk-3E6VVMK2.js";
10
10
  import "./chunk-SMYSNO4M.js";
11
11
  import "./chunk-2KPI5GKP.js";
12
12
  import "./chunk-GDKLH7ZY.js";
@@ -142,7 +142,7 @@ var SessionReplayer = class {
142
142
  if (this.opts.page) {
143
143
  this.page = this.opts.page;
144
144
  } else if (this.opts.cdpUrl) {
145
- const { launch } = await import("./cdp-driver-B5KVVI4O.js");
145
+ const { launch } = await import("./cdp-driver-GCFEMRFJ.js");
146
146
  const { browser } = await launch({ cdpEndpoint: this.opts.cdpUrl });
147
147
  let contexts = browser.contexts();
148
148
  for (let i = 0; i < 10 && contexts.length === 0; i++) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xbrowser/cli",
3
- "version": "1.33.0",
3
+ "version": "1.34.0",
4
4
  "description": "Browser automation CLI for web scraping, headless browsing, SEO analysis, and AI agent workflows. A command-line alternative to Playwright, Puppeteer, and Selenium.",
5
5
  "type": "module",
6
6
  "bin": {