cbrowser 18.72.2 → 18.72.3

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/cli.js CHANGED
@@ -25,6 +25,7 @@ import { startRemoteMcpServer } from "./mcp-server-remote.js";
25
25
  import { startDaemon, stopDaemon, getDaemonStatus, isDaemonRunning, sendToDaemon, runDaemonServer } from "./daemon.js";
26
26
  import { getStatusInfo, formatStatus, getDataDir, getPaths } from "./config.js";
27
27
  import { existsSync, mkdirSync, readFileSync, readdirSync, statSync, unlinkSync, writeFileSync } from "node:fs";
28
+ import { resolveCookieDomain, hostFromUrl } from "./utils.js";
28
29
  import { dirname, join, resolve } from "node:path";
29
30
  import { VideoCaptureSession } from "./recording/engine.js";
30
31
  import { changeSignal, parseManifest } from "./recording/types.js";
@@ -4011,7 +4012,7 @@ Documentation: https://github.com/alexandriashai/cbrowser/wiki
4011
4012
  if (options.url) {
4012
4013
  await browser.navigate(options.url);
4013
4014
  }
4014
- const domain = options.domain || "localhost";
4015
+ const domain = resolveCookieDomain(options.domain, options.url);
4015
4016
  const path = options.path || "/";
4016
4017
  await browser.setCookies([{
4017
4018
  name,
@@ -4035,7 +4036,9 @@ Documentation: https://github.com/alexandriashai/cbrowser/wiki
4035
4036
  if (options.url) {
4036
4037
  await browser.navigate(options.url);
4037
4038
  }
4038
- await browser.deleteCookie(name, options.domain);
4039
+ const delDomain = options.domain
4040
+ ?? (options.url ? hostFromUrl(options.url) ?? undefined : undefined);
4041
+ await browser.deleteCookie(name, delDomain);
4039
4042
  console.log(`✓ Cookie deleted: ${name}`);
4040
4043
  break;
4041
4044
  }