@spfn/core 0.1.0-alpha.74 → 0.1.0-alpha.81
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/README.md +2 -1
- package/dist/client/index.d.ts +41 -2
- package/dist/client/index.js +14 -1
- package/dist/client/index.js.map +1 -1
- package/dist/codegen/generators/index.js +2 -2
- package/dist/codegen/generators/index.js.map +1 -1
- package/dist/codegen/index.d.ts +1 -1
- package/dist/codegen/index.js +2 -2
- package/dist/codegen/index.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +9 -2
- package/dist/index.js.map +1 -1
- package/dist/middleware/index.js +9 -2
- package/dist/middleware/index.js.map +1 -1
- package/dist/route/index.d.ts +2 -2
- package/dist/route/index.js +10 -6
- package/dist/route/index.js.map +1 -1
- package/dist/server/index.js +9 -2
- package/dist/server/index.js.map +1 -1
- package/dist/{types-Dzggq1Yb.d.ts → types-DYueuoD6.d.ts} +4 -12
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { AppFactory, ServerConfig, createServer, startServer } from './server/index.js';
|
|
2
|
-
export { H as HttpMethod, I as InferContract, R as RouteContext, a as RouteContract, b as RouteHandler, i as isHttpMethod } from './types-
|
|
2
|
+
export { H as HttpMethod, I as InferContract, R as RouteContext, a as RouteContract, b as RouteHandler, i as isHttpMethod } from './types-DYueuoD6.js';
|
|
3
3
|
import 'hono';
|
|
4
4
|
import 'hono/cors';
|
|
5
5
|
import '@hono/node-server';
|
package/dist/index.js
CHANGED
|
@@ -2951,13 +2951,20 @@ function ErrorHandler(options = {}) {
|
|
|
2951
2951
|
const errorType = err.name || "Error";
|
|
2952
2952
|
if (enableLogging) {
|
|
2953
2953
|
const logLevel = statusCode >= 500 ? "error" : "warn";
|
|
2954
|
-
|
|
2954
|
+
const logData = {
|
|
2955
2955
|
type: errorType,
|
|
2956
2956
|
message: err.message,
|
|
2957
2957
|
statusCode,
|
|
2958
2958
|
path: c.req.path,
|
|
2959
2959
|
method: c.req.method
|
|
2960
|
-
}
|
|
2960
|
+
};
|
|
2961
|
+
if (errorWithCode.details) {
|
|
2962
|
+
logData.details = errorWithCode.details;
|
|
2963
|
+
}
|
|
2964
|
+
if (statusCode >= 500 && includeStack) {
|
|
2965
|
+
logData.stack = err.stack;
|
|
2966
|
+
}
|
|
2967
|
+
errorLogger[logLevel]("Error occurred", logData);
|
|
2961
2968
|
}
|
|
2962
2969
|
const response = {
|
|
2963
2970
|
success: false,
|