weifuwu 0.54.0 → 0.54.1

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.
@@ -130,7 +130,10 @@ function renderComponent(Comp, props, vnode, ctx) {
130
130
  errHandler(e);
131
131
  childVNode = null;
132
132
  } else {
133
- console.error("Component render error:", e);
133
+ console.error(
134
+ `[weifuwu] Component render error in <${Comp.name || "anonymous"}> (id: ${vnode._id ?? "?"}, phase: mount)`,
135
+ e
136
+ );
134
137
  childVNode = null;
135
138
  }
136
139
  }
@@ -309,7 +312,10 @@ function patchValue(parent, oldNode, oldInput, newInput, ctx) {
309
312
  errHandler(e);
310
313
  childNew = null;
311
314
  } else {
312
- console.error("Component render error:", e);
315
+ console.error(
316
+ `[weifuwu] Component render error in <${comp?.name || "anonymous"}> (id: ${oldV._id ?? "?"}, phase: update)`,
317
+ e
318
+ );
313
319
  childNew = null;
314
320
  }
315
321
  }
@@ -536,7 +536,10 @@ function renderComponent(Comp, props, vnode, ctx) {
536
536
  errHandler(e);
537
537
  childVNode = null;
538
538
  } else {
539
- console.error("Component render error:", e);
539
+ console.error(
540
+ `[weifuwu] Component render error in <${Comp.name || "anonymous"}> (id: ${vnode._id ?? "?"}, phase: mount)`,
541
+ e
542
+ );
540
543
  childVNode = null;
541
544
  }
542
545
  }
@@ -6,7 +6,7 @@ export interface ServeOptions {
6
6
  signal?: AbortSignal;
7
7
  /** Max request body size in bytes. Default: 10MB. Set to 0 for unlimited. */
8
8
  maxBodySize?: number;
9
- /** Socket timeout in ms (inactivity). Default: 30_000. */
9
+ /** Socket timeout in ms (inactivity). Default: 120_000(2 分钟,适配 LLM 生成等长任务). */
10
10
  timeout?: number;
11
11
  /** Keep-Alive idle timeout in ms. Default: 5_000. */
12
12
  keepAliveTimeout?: number;
package/dist/index.js CHANGED
@@ -104,7 +104,7 @@ function serve(router, options) {
104
104
  res.end("Internal Server Error");
105
105
  }
106
106
  });
107
- server.timeout = options?.timeout ?? 3e4;
107
+ server.timeout = options?.timeout ?? 12e4;
108
108
  server.keepAliveTimeout = options?.keepAliveTimeout ?? 5e3;
109
109
  server.headersTimeout = options?.headersTimeout ?? 6e3;
110
110
  server.on("upgrade", ws);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "weifuwu",
3
3
  "type": "module",
4
- "version": "0.54.0",
4
+ "version": "0.54.1",
5
5
  "description": "AI SaaS framework — (req, ctx) => Response",
6
6
  "exports": {
7
7
  ".": {