@xbrowser/cli 1.11.0 → 1.12.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.
Files changed (35) hide show
  1. package/dist/{browser-V3JIWSTR.js → browser-3HQKDZQ6.js} +4 -3
  2. package/dist/{browser-Q5APBNF6.js → browser-ILXTEWH4.js} +1 -1
  3. package/dist/{browser-XNU7JQYC.js → browser-XPDMY2NX.js} +2 -2
  4. package/dist/{cdp-driver-VEK6BNN6.js → cdp-driver-ESH3PDE6.js} +1 -1
  5. package/dist/{cdp-driver-XFTTZI5O.js → cdp-driver-N2E2ZNSC.js} +1142 -12
  6. package/dist/{cdp-driver-GD6YBBGE.js → cdp-driver-YIKR4BUX.js} +2 -1
  7. package/dist/chunk-A6LPGFAL.js +437 -0
  8. package/dist/{chunk-7OFM755Z.js → chunk-DKM2JOZL.js} +202 -12
  9. package/dist/{chunk-ABXMBNQ6.js → chunk-H2A5JUK5.js} +37 -466
  10. package/dist/{chunk-BNO7OKO4.js → chunk-HBMEFSTB.js} +39 -0
  11. package/dist/chunk-KJTABK3Z.js +1255 -0
  12. package/dist/{chunk-DWDXEGVK.js → chunk-NKW4A74J.js} +9 -3
  13. package/dist/{chunk-SQHSZENE.js → chunk-OMU63E6J.js} +3 -22
  14. package/dist/{chunk-JEDP4PJW.js → chunk-OVW2UEWN.js} +878 -687
  15. package/dist/{chunk-XKQVUFUS.js → chunk-R6IJ6PIV.js} +2 -2
  16. package/dist/{chunk-WHPBNUKB.js → chunk-SH6OTPXN.js} +42 -46
  17. package/dist/{chunk-MWFHZUIY.js → chunk-TEXCXIBW.js} +1 -1
  18. package/dist/{chunk-XQ4HRPDJ.js → chunk-Z6CUR3VG.js} +1143 -12
  19. package/dist/{chunk-IIM5GOD7.js → chunk-ZTHE5RBZ.js} +7 -1
  20. package/dist/cli.js +1075 -569
  21. package/dist/{daemon-client-MMDRYCF5.js → daemon-client-7D6EZNOE.js} +42 -46
  22. package/dist/{daemon-client-Y2YSZCGK.js → daemon-client-HEGAXWGK.js} +1 -1
  23. package/dist/daemon-main.js +950 -499
  24. package/dist/{human-interaction-5AO42MBA.js → human-interaction-4YR2N6R6.js} +2 -2
  25. package/dist/{human-interaction-C5OEGXGO.js → human-interaction-Y5IDH6LD.js} +1 -1
  26. package/dist/{human-interaction-ISXZTAYY.js → human-interaction-ZUTR5AC2.js} +2 -2
  27. package/dist/index.d.ts +2 -0
  28. package/dist/index.js +1086 -578
  29. package/dist/{proxy-C6CK3UH5.js → proxy-LUR4U5YF.js} +2 -1
  30. package/dist/{recovery-J2ISVGUL.js → recovery-FTZGV6VY.js} +2 -2
  31. package/dist/{recovery-ZJVVHP7N.js → recovery-L5GLDX4O.js} +1 -1
  32. package/dist/{recovery-EF33LKRJ.js → recovery-Z3RDZENA.js} +2 -2
  33. package/dist/{session-replayer-WIUYVN5J.js → session-replayer-K4A6OI4M.js} +1 -1
  34. package/package.json +1 -1
  35. package/dist/chunk-HVPUVVSA.js +0 -2194
@@ -356,6 +356,11 @@ function getCaptchaConfig() {
356
356
  previewPort: parseInt(process.env.XBROWSER_PREVIEW_PORT || "") || config.preview?.port || 9223
357
357
  };
358
358
  }
359
+ function resolveScreenshotsDir() {
360
+ const configured = getConfigValue("screenshots.dir");
361
+ if (typeof configured === "string" && configured.trim()) return configured.trim();
362
+ return join(tmpdir(), "xbrowser", "screenshots");
363
+ }
359
364
 
360
365
  // src/utils/shell-escape.ts
361
366
  function shellEscape(value) {
@@ -508,9 +513,6 @@ var HumanInteractionManager = class {
508
513
  };
509
514
 
510
515
  export {
511
- ScreencastCapturer,
512
- CaptchaDetector,
513
- WebhookNotifier,
514
516
  loadConfig,
515
517
  getConfigValue,
516
518
  setConfigValue,
@@ -519,5 +521,9 @@ export {
519
521
  getMarketplaceUrl,
520
522
  resolveNpmPackageWithFallback,
521
523
  getCaptchaConfig,
524
+ resolveScreenshotsDir,
525
+ ScreencastCapturer,
526
+ CaptchaDetector,
527
+ WebhookNotifier,
522
528
  HumanInteractionManager
523
529
  };
@@ -1,6 +1,7 @@
1
1
  import {
2
- ScreencastCapturer
3
- } from "./chunk-BNO7OKO4.js";
2
+ ScreencastCapturer,
3
+ getCaptchaConfig
4
+ } from "./chunk-HBMEFSTB.js";
4
5
 
5
6
  // src/human-interaction.ts
6
7
  import { execSync } from "child_process";
@@ -137,26 +138,6 @@ var WebhookNotifier = class {
137
138
  }
138
139
  };
139
140
 
140
- // src/config.ts
141
- import { homedir, tmpdir } from "os";
142
- import { join } from "path";
143
- import { loadConfig as coreLoadConfig, saveConfig as coreSaveConfig } from "@dyyz1993/xcli-core";
144
- function getConfigSource() {
145
- return { configDir: join(homedir() || tmpdir(), ".xbrowser") };
146
- }
147
- function loadConfig() {
148
- return coreLoadConfig(getConfigSource());
149
- }
150
- function getCaptchaConfig() {
151
- const config = loadConfig();
152
- return {
153
- notifyUrl: process.env.XBROWSER_NOTIFY_URL || config.captcha?.notifyUrl,
154
- autoOpen: process.env.XBROWSER_AUTO_OPEN === "true" || config.captcha?.autoOpen === true,
155
- timeout: parseInt(process.env.XBROWSER_CAPTCHA_TIMEOUT || "") || config.captcha?.timeout || 120,
156
- previewPort: parseInt(process.env.XBROWSER_PREVIEW_PORT || "") || config.preview?.port || 9223
157
- };
158
- }
159
-
160
141
  // src/utils/shell-escape.ts
161
142
  function shellEscape(value) {
162
143
  return `'${value.replace(/'/g, "'\\''")}'`;