autosnippet 2.19.5 → 2.19.6

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.
@@ -268,13 +268,13 @@ export class HttpServer {
268
268
  });
269
269
  });
270
270
 
271
- // 404 处理
272
- this.app.use('*', (req, res) => {
271
+ // 404 处理(使用 app.all 确保 layer.route 存在,mountDashboard 依赖此属性定位并重排路由栈)
272
+ this.app.all('*', (req, res) => {
273
273
  res.status(404).json({
274
274
  success: false,
275
275
  error: {
276
276
  code: 'NOT_FOUND',
277
- message: `Route not found: ${req.method} ${req.path}`,
277
+ message: `Route not found: ${req.method} ${req.originalUrl}`,
278
278
  },
279
279
  });
280
280
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "autosnippet",
3
- "version": "2.19.5",
3
+ "version": "2.19.6",
4
4
  "description": "AutoSnippet - 连接开发者、AI 与项目知识库的工具",
5
5
  "type": "module",
6
6
  "main": "lib/bootstrap.js",