@mastra/deployer 1.76.0-alpha.8 → 1.76.0-alpha.9
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/dist/server/index.js
CHANGED
|
@@ -13,7 +13,7 @@ import process$1, { versions } from "process";
|
|
|
13
13
|
import { getMimeType } from "hono/utils/mime";
|
|
14
14
|
import { html } from "hono/html";
|
|
15
15
|
import { Tool } from "@mastra/core/tools";
|
|
16
|
-
import { MASTRA_FRAMEWORK_PUBLIC_KEY, MastraServer, applyMcpRequestAuth, checkRouteFGA, getCustomHTTPExceptionResponse, getFGAProvider, isZodError, normalizeQueryParams, redactStreamChunk, serializeStreamChunk } from "@mastra/server/server-adapter";
|
|
16
|
+
import { MASTRA_FRAMEWORK_PUBLIC_KEY, MastraServer, applyMcpRequestAuth, checkRouteFGA, getCustomHTTPExceptionResponse, getFGAProvider, isSafeObjectKey, isZodError, normalizeQueryParams, redactStreamChunk, serializeStreamChunk } from "@mastra/server/server-adapter";
|
|
17
17
|
import util from "util";
|
|
18
18
|
import { Buffer as Buffer$1 } from "buffer";
|
|
19
19
|
import { bodyLimit } from "hono/body-limit";
|
|
@@ -3497,15 +3497,18 @@ var MastraServer$1 = class extends MastraServer {
|
|
|
3497
3497
|
*/
|
|
3498
3498
|
async parseFormData(formData) {
|
|
3499
3499
|
const result = {};
|
|
3500
|
-
for (const [key, value] of formData.entries())
|
|
3501
|
-
|
|
3502
|
-
|
|
3503
|
-
|
|
3504
|
-
|
|
3505
|
-
|
|
3506
|
-
|
|
3500
|
+
for (const [key, value] of formData.entries()) {
|
|
3501
|
+
if (!isSafeObjectKey(key)) continue;
|
|
3502
|
+
if (value instanceof File) {
|
|
3503
|
+
const arrayBuffer = await value.arrayBuffer();
|
|
3504
|
+
result[key] = Buffer.from(arrayBuffer);
|
|
3505
|
+
} else if (typeof value === "string") try {
|
|
3506
|
+
result[key] = JSON.parse(value);
|
|
3507
|
+
} catch {
|
|
3508
|
+
result[key] = value;
|
|
3509
|
+
}
|
|
3510
|
+
else result[key] = value;
|
|
3507
3511
|
}
|
|
3508
|
-
else result[key] = value;
|
|
3509
3512
|
return result;
|
|
3510
3513
|
}
|
|
3511
3514
|
async sendResponse(route, response, result, prefix) {
|