@mastra/deployer 1.38.0 → 1.39.0-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.
- package/CHANGELOG.md +10 -0
- package/dist/docs/SKILL.md +1 -1
- package/dist/docs/assets/SOURCE_MAP.json +1 -1
- package/dist/server/index.cjs +9 -2
- package/dist/server/index.cjs.map +1 -1
- package/dist/server/index.d.ts.map +1 -1
- package/dist/server/index.js +9 -2
- package/dist/server/index.js.map +1 -1
- package/package.json +6 -6
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/server/index.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAIlD,OAAO,KAAK,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAIhE,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/server/index.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAIlD,OAAO,KAAK,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAIhE,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAa5B,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAoBnD,KAAK,QAAQ,GAAG,YAAY,CAAC;AAE7B,KAAK,SAAS,GAAG,aAAa,GAAG;IAC/B,OAAO,EAAE,GAAG,CAAC;QAAE,UAAU,EAAE,+BAA+B,CAAA;KAAE,CAAC,CAAC;CAC/D,CAAC;AAkCF,wBAAgB,cAAc,CAAC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,QAAQ,CAAC,EAAE,wCAmB/D;AAED,wBAAsB,gBAAgB,CACpC,MAAM,EAAE,MAAM,EACd,OAAO,GAAE,mBAER;cAegC,QAAQ;eAAa,SAAS;2CA0ZhE;AAED,wBAAsB,gBAAgB,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,GAAE,mBAAmC,mDAgHlG"}
|
package/dist/server/index.js
CHANGED
|
@@ -4122,7 +4122,13 @@ async function createHonoServer(mastra, options = {
|
|
|
4122
4122
|
const processedRoutes = routes?.map((route) => {
|
|
4123
4123
|
if ("openapi" in route && route.openapi) {
|
|
4124
4124
|
const existingMiddleware = route.middleware ? Array.isArray(route.middleware) ? route.middleware : [route.middleware] : [];
|
|
4125
|
-
return {
|
|
4125
|
+
return {
|
|
4126
|
+
...route,
|
|
4127
|
+
middleware: [
|
|
4128
|
+
describeRoute(route.openapi),
|
|
4129
|
+
...existingMiddleware
|
|
4130
|
+
]
|
|
4131
|
+
};
|
|
4126
4132
|
}
|
|
4127
4133
|
return route;
|
|
4128
4134
|
});
|
|
@@ -4197,7 +4203,8 @@ async function createHonoServer(mastra, options = {
|
|
|
4197
4203
|
const pathname = new URL(c.req.url).pathname;
|
|
4198
4204
|
const method = c.req.method === "OPTIONS" ? c.req.header("Access-Control-Request-Method") ?? c.req.method : c.req.method;
|
|
4199
4205
|
const routeCors = getRouteCorsConfig(processedRoutes, pathname, method);
|
|
4200
|
-
|
|
4206
|
+
const corsOptions = routeCors ? getCorsConfig(routeCors, false) : getCorsConfig(server?.cors, hasAuth);
|
|
4207
|
+
return cors(corsOptions)(c, next);
|
|
4201
4208
|
});
|
|
4202
4209
|
}
|
|
4203
4210
|
app.get(
|