@mastra/deployer 1.76.0-alpha.7 → 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.
@@ -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()) if (value instanceof File) {
3501
- const arrayBuffer = await value.arrayBuffer();
3502
- result[key] = Buffer.from(arrayBuffer);
3503
- } else if (typeof value === "string") try {
3504
- result[key] = JSON.parse(value);
3505
- } catch {
3506
- result[key] = value;
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) {
@@ -4027,7 +4030,7 @@ async function healthHandler(c) {
4027
4030
  async function restartAllActiveWorkflowRunsHandler(c) {
4028
4031
  try {
4029
4032
  const mastra = c.get("mastra");
4030
- mastra.restartAllActiveWorkflowRuns().catch((error) => {
4033
+ if (mastra.recoveryConfig?.workflows !== "off") mastra.restartAllActiveWorkflowRuns().catch((error) => {
4031
4034
  mastra.getLogger().error("Failed to restart active workflow runs during server startup", { error });
4032
4035
  });
4033
4036
  if (mastra.recoveryConfig?.durableAgents === "auto") mastra.recoverAllDurableAgents().catch((error) => {