@mastra/deployer 1.56.0-alpha.4 → 1.56.0-alpha.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.
- package/CHANGELOG.md +16 -0
- package/dist/docs/SKILL.md +1 -1
- package/dist/docs/assets/SOURCE_MAP.json +1 -1
- package/dist/server/index.cjs +10 -6
- package/dist/server/index.cjs.map +1 -1
- package/dist/server/index.js +10 -6
- package/dist/server/index.js.map +1 -1
- package/package.json +7 -7
package/dist/server/index.js
CHANGED
|
@@ -2451,7 +2451,7 @@ var MastraServer$1 = class extends MastraServer {
|
|
|
2451
2451
|
if (streamFormat === "sse" && route.sseFlushOnConnect) await stream.write(": connected\n\n");
|
|
2452
2452
|
const reader = (result instanceof ReadableStream ? result : result.fullStream).getReader();
|
|
2453
2453
|
stream.onAbort(() => {
|
|
2454
|
-
reader.cancel("request aborted");
|
|
2454
|
+
reader.cancel("request aborted").catch(() => {});
|
|
2455
2455
|
});
|
|
2456
2456
|
try {
|
|
2457
2457
|
while (true) {
|
|
@@ -2608,14 +2608,18 @@ var MastraServer$1 = class extends MastraServer {
|
|
|
2608
2608
|
const shouldApplyBodyLimit = this.bodyLimitOptions && [
|
|
2609
2609
|
"POST",
|
|
2610
2610
|
"PUT",
|
|
2611
|
-
"PATCH"
|
|
2611
|
+
"PATCH",
|
|
2612
|
+
"DELETE"
|
|
2612
2613
|
].includes(route.method.toUpperCase());
|
|
2613
2614
|
const maxSize = route.maxBodySize ?? this.bodyLimitOptions?.maxSize;
|
|
2614
2615
|
const middlewares = [];
|
|
2615
|
-
if (shouldApplyBodyLimit && maxSize && this.bodyLimitOptions)
|
|
2616
|
-
|
|
2617
|
-
|
|
2618
|
-
|
|
2616
|
+
if (shouldApplyBodyLimit && maxSize && this.bodyLimitOptions) {
|
|
2617
|
+
const { onError } = this.bodyLimitOptions;
|
|
2618
|
+
middlewares.push(bodyLimit({
|
|
2619
|
+
maxSize,
|
|
2620
|
+
onError: (c) => c.json(onError({ error: "Request body too large" }), 413)
|
|
2621
|
+
}));
|
|
2622
|
+
}
|
|
2619
2623
|
app[route.method.toLowerCase()](`${prefix}${route.path}`, ...middlewares, async (c) => {
|
|
2620
2624
|
const authResult = await this.checkRouteAuth(route, {
|
|
2621
2625
|
path: c.req.path,
|