tt-help-cli-ycl 1.4.24 → 1.4.25

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tt-help-cli-ycl",
3
- "version": "1.4.24",
3
+ "version": "1.4.25",
4
4
  "description": "TikTok user & video data scraper - extract ttSeller, verified, locationCreated from HTML source",
5
5
  "type": "module",
6
6
  "bin": {
@@ -22,17 +22,24 @@ export function handleRawSync(parsed) {
22
22
  args.push("--batch", String(parsed.rawSyncBatch));
23
23
  if (parsed.rawSyncOnce) args.push("--once");
24
24
 
25
- console.error(`[raw-sync] 启动同步程序: node ${SCRIPT} ${args.join(" ")}`);
25
+ console.error(`[raw-sync] 启动同步程序: ${SCRIPT}`);
26
26
 
27
- const child = spawn("node", [SCRIPT, ...args], {
27
+ const child = spawn(process.execPath, [SCRIPT, ...args], {
28
28
  stdio: "inherit",
29
+ windowsHide: true,
30
+ });
31
+
32
+ child.on("error", (err) => {
33
+ console.error(`[raw-sync] 启动失败: ${err.message}`);
34
+ console.error(`[raw-sync] 检查脚本是否存在: ${SCRIPT}`);
35
+ process.exit(1);
29
36
  });
30
37
 
31
38
  child.on("exit", (code) => {
32
39
  if (code !== 0) {
33
40
  console.error(`[raw-sync] 同步程序退出,退出码: ${code}`);
34
41
  }
35
- process.exit(code);
42
+ process.exit(code != null ? code : 0);
36
43
  });
37
44
 
38
45
  // 转发信号给子进程