@lightcone-ai/daemon 0.9.11 → 0.9.12

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 (2) hide show
  1. package/package.json +1 -1
  2. package/src/xhs-login.js +6 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lightcone-ai/daemon",
3
- "version": "0.9.11",
3
+ "version": "0.9.12",
4
4
  "type": "module",
5
5
  "main": "src/index.js",
6
6
  "bin": {
package/src/xhs-login.js CHANGED
@@ -55,6 +55,12 @@ export class XhsLoginSession {
55
55
  detached: false,
56
56
  });
57
57
 
58
+ this._proc.on('error', (err) => {
59
+ console.error(`[XhsLogin] Chrome spawn error: ${err.message}`);
60
+ this._stopTimers();
61
+ connection.send({ type: 'xhs:login_error', error: `Chrome 启动失败: ${err.message}。请确认 Chrome 已安装(路径: ${CHROME_BIN}),或通过 CHROME_BIN 环境变量指定路径` });
62
+ });
63
+
58
64
  this._proc.on('exit', (code) => {
59
65
  console.log(`[XhsLogin] Chrome exited (code=${code})`);
60
66
  this._stopTimers();