@mastra/deployer 0.3.3-alpha.0 → 0.3.3-alpha.1

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.
@@ -2078,7 +2078,7 @@ async function createHonoServer(mastra, options = {}) {
2078
2078
  span.setAttribute("http.request_id", requestId);
2079
2079
  span.updateName(`${c2.req.method} ${c2.req.path}`);
2080
2080
  const newCtx = core.Telemetry.setBaggage({
2081
- "http.request_id": requestId
2081
+ "http.request_id": { value: requestId }
2082
2082
  });
2083
2083
  await new Promise((resolve) => {
2084
2084
  core.Telemetry.withContext(newCtx, async () => {
@@ -2121,7 +2121,7 @@ async function createHonoServer(mastra, options = {}) {
2121
2121
  app.use("*", timeout.timeout(server?.timeout ?? 3 * 60 * 1e3), cors.cors(corsConfig));
2122
2122
  }
2123
2123
  const bodyLimitOptions = {
2124
- maxSize: 4.5 * 1024 * 1024,
2124
+ maxSize: server?.bodySizeLimit ?? 4.5 * 1024 * 1024,
2125
2125
  // 4.5 MB,
2126
2126
  onError: (c2) => c2.json({ error: "Request body too large" }, 413)
2127
2127
  };
@@ -2150,14 +2150,17 @@ async function createHonoServer(mastra, options = {}) {
2150
2150
  if (route.openapi) {
2151
2151
  middlewares.push(h(route.openapi));
2152
2152
  }
2153
+ const handler = "handler" in route ? route.handler : await route.createHandler({ mastra });
2153
2154
  if (route.method === "GET") {
2154
- app.get(route.path, ...middlewares, route.handler);
2155
+ app.get(route.path, ...middlewares, handler);
2155
2156
  } else if (route.method === "POST") {
2156
- app.post(route.path, ...middlewares, route.handler);
2157
+ app.post(route.path, ...middlewares, handler);
2157
2158
  } else if (route.method === "PUT") {
2158
- app.put(route.path, ...middlewares, route.handler);
2159
+ app.put(route.path, ...middlewares, handler);
2159
2160
  } else if (route.method === "DELETE") {
2160
- app.delete(route.path, ...middlewares, route.handler);
2161
+ app.delete(route.path, ...middlewares, handler);
2162
+ } else if (route.method === "ALL") {
2163
+ app.all(route.path, ...middlewares, handler);
2161
2164
  }
2162
2165
  }
2163
2166
  }
@@ -2072,7 +2072,7 @@ async function createHonoServer(mastra, options = {}) {
2072
2072
  span.setAttribute("http.request_id", requestId);
2073
2073
  span.updateName(`${c2.req.method} ${c2.req.path}`);
2074
2074
  const newCtx = Telemetry.setBaggage({
2075
- "http.request_id": requestId
2075
+ "http.request_id": { value: requestId }
2076
2076
  });
2077
2077
  await new Promise((resolve) => {
2078
2078
  Telemetry.withContext(newCtx, async () => {
@@ -2115,7 +2115,7 @@ async function createHonoServer(mastra, options = {}) {
2115
2115
  app.use("*", timeout(server?.timeout ?? 3 * 60 * 1e3), cors(corsConfig));
2116
2116
  }
2117
2117
  const bodyLimitOptions = {
2118
- maxSize: 4.5 * 1024 * 1024,
2118
+ maxSize: server?.bodySizeLimit ?? 4.5 * 1024 * 1024,
2119
2119
  // 4.5 MB,
2120
2120
  onError: (c2) => c2.json({ error: "Request body too large" }, 413)
2121
2121
  };
@@ -2144,14 +2144,17 @@ async function createHonoServer(mastra, options = {}) {
2144
2144
  if (route.openapi) {
2145
2145
  middlewares.push(h(route.openapi));
2146
2146
  }
2147
+ const handler = "handler" in route ? route.handler : await route.createHandler({ mastra });
2147
2148
  if (route.method === "GET") {
2148
- app.get(route.path, ...middlewares, route.handler);
2149
+ app.get(route.path, ...middlewares, handler);
2149
2150
  } else if (route.method === "POST") {
2150
- app.post(route.path, ...middlewares, route.handler);
2151
+ app.post(route.path, ...middlewares, handler);
2151
2152
  } else if (route.method === "PUT") {
2152
- app.put(route.path, ...middlewares, route.handler);
2153
+ app.put(route.path, ...middlewares, handler);
2153
2154
  } else if (route.method === "DELETE") {
2154
- app.delete(route.path, ...middlewares, route.handler);
2155
+ app.delete(route.path, ...middlewares, handler);
2156
+ } else if (route.method === "ALL") {
2157
+ app.all(route.path, ...middlewares, handler);
2155
2158
  }
2156
2159
  }
2157
2160
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mastra/deployer",
3
- "version": "0.3.3-alpha.0",
3
+ "version": "0.3.3-alpha.1",
4
4
  "description": "",
5
5
  "type": "module",
6
6
  "files": [
@@ -107,8 +107,8 @@
107
107
  "rollup-plugin-node-externals": "^8.0.0",
108
108
  "typescript-paths": "^1.5.1",
109
109
  "zod": "^3.24.3",
110
- "@mastra/core": "^0.9.3-alpha.0",
111
- "@mastra/server": "^2.0.3-alpha.0"
110
+ "@mastra/core": "^0.9.3-alpha.1",
111
+ "@mastra/server": "^2.0.3-alpha.1"
112
112
  },
113
113
  "devDependencies": {
114
114
  "@hono/node-server": "^1.13.8",