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/browser.d.ts +9 -0
- package/dist/browser.d.ts.map +1 -1
- package/dist/browser.js +46 -1
- package/dist/browser.js.map +1 -1
- package/dist/cli.js +5 -2
- package/dist/cli.js.map +1 -1
- package/dist/utils.d.ts +35 -0
- package/dist/utils.d.ts.map +1 -1
- package/dist/utils.js +68 -0
- package/dist/utils.js.map +1 -1
- package/package.json +1 -1
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
|
|
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
|
-
|
|
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
|
}
|