@xbrowser/cli 1.11.0 → 1.13.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.
- package/dist/{browser-XNU7JQYC.js → browser-AQ2AT2YZ.js} +2 -2
- package/dist/{browser-Q5APBNF6.js → browser-OMGJMSBB.js} +1 -1
- package/dist/{browser-V3JIWSTR.js → browser-T7OVLAEC.js} +4 -3
- package/dist/{cdp-driver-XFTTZI5O.js → cdp-driver-ALDNOZYD.js} +1176 -13
- package/dist/{cdp-driver-GD6YBBGE.js → cdp-driver-HYCLE4YP.js} +2 -1
- package/dist/{cdp-driver-VEK6BNN6.js → cdp-driver-VS7Z7W7Y.js} +1 -1
- package/dist/chunk-A6LPGFAL.js +437 -0
- package/dist/{chunk-JEDP4PJW.js → chunk-BY5TT6WZ.js} +912 -688
- package/dist/{chunk-XKQVUFUS.js → chunk-CW7L53JE.js} +2 -2
- package/dist/{chunk-ABXMBNQ6.js → chunk-H2A5JUK5.js} +37 -466
- package/dist/{chunk-BNO7OKO4.js → chunk-HBMEFSTB.js} +39 -0
- package/dist/chunk-HD4FX2N5.js +1255 -0
- package/dist/{chunk-DWDXEGVK.js → chunk-NKW4A74J.js} +9 -3
- package/dist/{chunk-SQHSZENE.js → chunk-OMU63E6J.js} +3 -22
- package/dist/{chunk-7OFM755Z.js → chunk-R2POF2GP.js} +236 -13
- package/dist/{chunk-WHPBNUKB.js → chunk-SH6OTPXN.js} +42 -46
- package/dist/{chunk-XQ4HRPDJ.js → chunk-T2CNKWPV.js} +1177 -13
- package/dist/{chunk-MWFHZUIY.js → chunk-TEXCXIBW.js} +1 -1
- package/dist/{chunk-IIM5GOD7.js → chunk-ZTHE5RBZ.js} +7 -1
- package/dist/cli.js +1075 -569
- package/dist/{daemon-client-MMDRYCF5.js → daemon-client-7D6EZNOE.js} +42 -46
- package/dist/{daemon-client-Y2YSZCGK.js → daemon-client-HEGAXWGK.js} +1 -1
- package/dist/daemon-main.js +950 -499
- package/dist/{human-interaction-5AO42MBA.js → human-interaction-4YR2N6R6.js} +2 -2
- package/dist/{human-interaction-C5OEGXGO.js → human-interaction-Y5IDH6LD.js} +1 -1
- package/dist/{human-interaction-ISXZTAYY.js → human-interaction-ZUTR5AC2.js} +2 -2
- package/dist/index.d.ts +2 -0
- package/dist/index.js +1086 -578
- package/dist/{proxy-C6CK3UH5.js → proxy-LUR4U5YF.js} +2 -1
- package/dist/{recovery-J2ISVGUL.js → recovery-FTZGV6VY.js} +2 -2
- package/dist/{recovery-ZJVVHP7N.js → recovery-L5GLDX4O.js} +1 -1
- package/dist/{recovery-EF33LKRJ.js → recovery-Z3RDZENA.js} +2 -2
- package/dist/{session-replayer-WIUYVN5J.js → session-replayer-UVH5FGY2.js} +1 -1
- package/package.json +1 -1
- package/dist/chunk-HVPUVVSA.js +0 -2194
|
@@ -1,3 +1,40 @@
|
|
|
1
|
+
// src/config.ts
|
|
2
|
+
import { homedir, tmpdir } from "os";
|
|
3
|
+
import { join } from "path";
|
|
4
|
+
import { loadConfig as coreLoadConfig, saveConfig as coreSaveConfig } from "@dyyz1993/xcli-core";
|
|
5
|
+
function getConfigSource() {
|
|
6
|
+
return { configDir: join(homedir() || tmpdir(), ".xbrowser") };
|
|
7
|
+
}
|
|
8
|
+
function loadConfig() {
|
|
9
|
+
return coreLoadConfig(getConfigSource());
|
|
10
|
+
}
|
|
11
|
+
function getConfigValue(key) {
|
|
12
|
+
const parts = key.split(".");
|
|
13
|
+
let obj = loadConfig();
|
|
14
|
+
for (const part of parts) {
|
|
15
|
+
if (obj && typeof obj === "object") {
|
|
16
|
+
obj = obj[part];
|
|
17
|
+
} else {
|
|
18
|
+
return void 0;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
return obj;
|
|
22
|
+
}
|
|
23
|
+
function getCaptchaConfig() {
|
|
24
|
+
const config = loadConfig();
|
|
25
|
+
return {
|
|
26
|
+
notifyUrl: process.env.XBROWSER_NOTIFY_URL || config.captcha?.notifyUrl,
|
|
27
|
+
autoOpen: process.env.XBROWSER_AUTO_OPEN === "true" || config.captcha?.autoOpen === true,
|
|
28
|
+
timeout: parseInt(process.env.XBROWSER_CAPTCHA_TIMEOUT || "") || config.captcha?.timeout || 120,
|
|
29
|
+
previewPort: parseInt(process.env.XBROWSER_PREVIEW_PORT || "") || config.preview?.port || 9223
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
function resolveScreenshotsDir() {
|
|
33
|
+
const configured = getConfigValue("screenshots.dir");
|
|
34
|
+
if (typeof configured === "string" && configured.trim()) return configured.trim();
|
|
35
|
+
return join(tmpdir(), "xbrowser", "screenshots");
|
|
36
|
+
}
|
|
37
|
+
|
|
1
38
|
// src/screencast.ts
|
|
2
39
|
var ScreencastCapturer = class {
|
|
3
40
|
interval;
|
|
@@ -140,5 +177,7 @@ var ScreencastCapturer = class {
|
|
|
140
177
|
};
|
|
141
178
|
|
|
142
179
|
export {
|
|
180
|
+
getCaptchaConfig,
|
|
181
|
+
resolveScreenshotsDir,
|
|
143
182
|
ScreencastCapturer
|
|
144
183
|
};
|