@cloud411716/fancy-webnovel 0.1.40 → 0.1.42

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/infra.js CHANGED
@@ -53,7 +53,9 @@ export function spawnScript(cmd, args, { timeout = 30000, cwd } = {}) {
53
53
  ok: parsed.ok === true,
54
54
  output: stdout,
55
55
  error: parsed.error
56
- ? (parsed.error.message || JSON.stringify(parsed.error))
56
+ ? (typeof parsed.error === 'object'
57
+ ? (parsed.error.message || JSON.stringify(parsed.error))
58
+ : String(parsed.error))
57
59
  : stderr || undefined,
58
60
  });
59
61
  } catch (_) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cloud411716/fancy-webnovel",
3
- "version": "0.1.40",
3
+ "version": "0.1.42",
4
4
  "type": "module",
5
5
  "main": "index.js",
6
6
  "exports": {
@@ -26,7 +26,7 @@ export const bootstrap = {
26
26
  case 'success':
27
27
  return '✅ 项目初始化完成!\n下一步:运行 /fancy-scan 扫榜';
28
28
  case 'error':
29
- return (err) => '❌ 初始化失败:' + err;
29
+ return '❌ 初始化失败:' + (typeof err === 'function' ? err() : err);
30
30
  default:
31
31
  return String(type);
32
32
  }