@mastra/deployer 0.10.9 → 0.10.10-alpha.0
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.
|
@@ -233,7 +233,7 @@ declare abstract class EnvService {
|
|
|
233
233
|
export { EnvService }
|
|
234
234
|
export { EnvService as EnvService_alias_1 }
|
|
235
235
|
|
|
236
|
-
export declare function errorHandler(err: Error, c: Context): Response;
|
|
236
|
+
export declare function errorHandler(err: Error, c: Context, isDev?: boolean): Response;
|
|
237
237
|
|
|
238
238
|
export declare function executeAgentToolHandler(c: Context): Promise<Response>;
|
|
239
239
|
|
|
@@ -233,7 +233,7 @@ declare abstract class EnvService {
|
|
|
233
233
|
export { EnvService }
|
|
234
234
|
export { EnvService as EnvService_alias_1 }
|
|
235
235
|
|
|
236
|
-
export declare function errorHandler(err: Error, c: Context): Response;
|
|
236
|
+
export declare function errorHandler(err: Error, c: Context, isDev?: boolean): Response;
|
|
237
237
|
|
|
238
238
|
export declare function executeAgentToolHandler(c: Context): Promise<Response>;
|
|
239
239
|
|
package/dist/server/index.cjs
CHANGED
|
@@ -936,11 +936,15 @@ async function getAgentExecutionHandler(c2) {
|
|
|
936
936
|
function handleError(error, defaultMessage) {
|
|
937
937
|
const apiError = error;
|
|
938
938
|
throw new httpException.HTTPException(apiError.status || 500, {
|
|
939
|
-
message: apiError.message || defaultMessage
|
|
939
|
+
message: apiError.message || defaultMessage,
|
|
940
|
+
cause: apiError.cause
|
|
940
941
|
});
|
|
941
942
|
}
|
|
942
|
-
function errorHandler(err, c2) {
|
|
943
|
+
function errorHandler(err, c2, isDev) {
|
|
943
944
|
if (err instanceof httpException.HTTPException) {
|
|
945
|
+
if (isDev) {
|
|
946
|
+
return c2.json({ error: err.message, cause: err.cause, stack: err.stack }, err.status);
|
|
947
|
+
}
|
|
944
948
|
return c2.json({ error: err.message }, err.status);
|
|
945
949
|
}
|
|
946
950
|
console.error(err);
|
|
@@ -4717,7 +4721,7 @@ ${err.stack.split("\n").slice(1).join("\n")}
|
|
|
4717
4721
|
await next();
|
|
4718
4722
|
}
|
|
4719
4723
|
});
|
|
4720
|
-
app.onError(errorHandler);
|
|
4724
|
+
app.onError((err, c2) => errorHandler(err, c2, options.isDev));
|
|
4721
4725
|
app.use("*", async function setContext(c2, next) {
|
|
4722
4726
|
let runtimeContext$1 = new runtimeContext.RuntimeContext();
|
|
4723
4727
|
if (c2.req.method === "POST" || c2.req.method === "PUT") {
|
package/dist/server/index.js
CHANGED
|
@@ -929,11 +929,15 @@ async function getAgentExecutionHandler(c2) {
|
|
|
929
929
|
function handleError(error, defaultMessage) {
|
|
930
930
|
const apiError = error;
|
|
931
931
|
throw new HTTPException(apiError.status || 500, {
|
|
932
|
-
message: apiError.message || defaultMessage
|
|
932
|
+
message: apiError.message || defaultMessage,
|
|
933
|
+
cause: apiError.cause
|
|
933
934
|
});
|
|
934
935
|
}
|
|
935
|
-
function errorHandler(err, c2) {
|
|
936
|
+
function errorHandler(err, c2, isDev) {
|
|
936
937
|
if (err instanceof HTTPException) {
|
|
938
|
+
if (isDev) {
|
|
939
|
+
return c2.json({ error: err.message, cause: err.cause, stack: err.stack }, err.status);
|
|
940
|
+
}
|
|
937
941
|
return c2.json({ error: err.message }, err.status);
|
|
938
942
|
}
|
|
939
943
|
console.error(err);
|
|
@@ -4710,7 +4714,7 @@ ${err.stack.split("\n").slice(1).join("\n")}
|
|
|
4710
4714
|
await next();
|
|
4711
4715
|
}
|
|
4712
4716
|
});
|
|
4713
|
-
app.onError(errorHandler);
|
|
4717
|
+
app.onError((err, c2) => errorHandler(err, c2, options.isDev));
|
|
4714
4718
|
app.use("*", async function setContext(c2, next) {
|
|
4715
4719
|
let runtimeContext = new RuntimeContext();
|
|
4716
4720
|
if (c2.req.method === "POST" || c2.req.method === "PUT") {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mastra/deployer",
|
|
3
|
-
"version": "0.10.
|
|
3
|
+
"version": "0.10.10-alpha.0",
|
|
4
4
|
"description": "",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"files": [
|
|
@@ -108,7 +108,7 @@
|
|
|
108
108
|
"rollup-plugin-node-externals": "^8.0.1",
|
|
109
109
|
"typescript-paths": "^1.5.1",
|
|
110
110
|
"zod": "^3.25.67",
|
|
111
|
-
"@mastra/server": "^0.10.
|
|
111
|
+
"@mastra/server": "^0.10.10-alpha.0"
|
|
112
112
|
},
|
|
113
113
|
"devDependencies": {
|
|
114
114
|
"@hono/node-server": "^1.14.4",
|
|
@@ -128,8 +128,8 @@
|
|
|
128
128
|
"typescript": "^5.8.3",
|
|
129
129
|
"vitest": "^3.2.4",
|
|
130
130
|
"@internal/lint": "0.0.16",
|
|
131
|
-
"@mastra/
|
|
132
|
-
"@mastra/
|
|
131
|
+
"@mastra/core": "0.10.10-alpha.0",
|
|
132
|
+
"@mastra/mcp": "^0.10.5"
|
|
133
133
|
},
|
|
134
134
|
"peerDependencies": {
|
|
135
135
|
"@mastra/core": ">=0.10.9-0 <0.11.0-0"
|