@mastra/deployer 1.58.0-alpha.12 → 1.58.0-alpha.13
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 +8 -0
- package/dist/docs/SKILL.md +1 -1
- package/dist/docs/assets/SOURCE_MAP.json +1 -1
- package/dist/server/index.cjs +9 -4
- package/dist/server/index.cjs.map +1 -1
- package/dist/server/index.d.ts.map +1 -1
- package/dist/server/index.js +9 -4
- package/dist/server/index.js.map +1 -1
- package/package.json +5 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# @mastra/deployer
|
|
2
2
|
|
|
3
|
+
## 1.58.0-alpha.13
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies [[`9571e3a`](https://github.com/mastra-ai/mastra/commit/9571e3a06ed2c5220196460bf82a2129255c3a8b), [`d6c56f9`](https://github.com/mastra-ai/mastra/commit/d6c56f951db3213330b98b0abafa9778c8770e58), [`9571e3a`](https://github.com/mastra-ai/mastra/commit/9571e3a06ed2c5220196460bf82a2129255c3a8b), [`acc3513`](https://github.com/mastra-ai/mastra/commit/acc3513b19f79bf0a7ec2998694580edca54086c), [`94e7ae9`](https://github.com/mastra-ai/mastra/commit/94e7ae970b37c888cd1244ef013292639a2fe6d1), [`6a667b4`](https://github.com/mastra-ai/mastra/commit/6a667b4b7cd6a93fe41fcdd357b08c5a8c09b9ab), [`2440e09`](https://github.com/mastra-ai/mastra/commit/2440e096ea6c2def1ccc1eb2d0f3f5b88c4af940), [`d6c56f9`](https://github.com/mastra-ai/mastra/commit/d6c56f951db3213330b98b0abafa9778c8770e58), [`a59049b`](https://github.com/mastra-ai/mastra/commit/a59049b1652a13efff66ac826326b5ed9a550342)]:
|
|
8
|
+
- @mastra/core@1.58.0-alpha.13
|
|
9
|
+
- @mastra/server@1.58.0-alpha.13
|
|
10
|
+
|
|
3
11
|
## 1.58.0-alpha.12
|
|
4
12
|
|
|
5
13
|
### Patch Changes
|
package/dist/docs/SKILL.md
CHANGED
|
@@ -3,7 +3,7 @@ name: mastra-deployer
|
|
|
3
3
|
description: Documentation for @mastra/deployer. Use when working with @mastra/deployer APIs, configuration, or implementation.
|
|
4
4
|
metadata:
|
|
5
5
|
package: "@mastra/deployer"
|
|
6
|
-
version: "1.58.0-alpha.
|
|
6
|
+
version: "1.58.0-alpha.13"
|
|
7
7
|
---
|
|
8
8
|
|
|
9
9
|
## When to use
|
package/dist/server/index.cjs
CHANGED
|
@@ -3555,8 +3555,8 @@ var MastraServer = class extends _mastra_server_server_adapter.MastraServer {
|
|
|
3555
3555
|
});
|
|
3556
3556
|
}
|
|
3557
3557
|
async registerCustomApiRoutes() {
|
|
3558
|
-
|
|
3559
|
-
|
|
3558
|
+
const routes = await this.registerSchemaApiRoutes();
|
|
3559
|
+
if (!await this.buildCustomRouteHandler(routes)) return;
|
|
3560
3560
|
for (const route of routes) {
|
|
3561
3561
|
const serverRoute = {
|
|
3562
3562
|
method: route.method,
|
|
@@ -4368,6 +4368,9 @@ const getStudioPath = () => {
|
|
|
4368
4368
|
if (require("url").pathToFileURL(__filename).href) __dirname = (0, path.dirname)((0, url.fileURLToPath)(require("url").pathToFileURL(__filename).href));
|
|
4369
4369
|
return process.env.MASTRA_STUDIO_PATH || (0, path.join)(__dirname, "studio");
|
|
4370
4370
|
};
|
|
4371
|
+
function isSchemaApiRoute(route) {
|
|
4372
|
+
return "_mastraSchemaRoute" in route && route._mastraSchemaRoute === true;
|
|
4373
|
+
}
|
|
4371
4374
|
const DEFAULT_CORS_ALLOW_METHODS = [
|
|
4372
4375
|
"GET",
|
|
4373
4376
|
"POST",
|
|
@@ -4399,7 +4402,8 @@ function getCorsConfig(serverCors, credentialsDefault) {
|
|
|
4399
4402
|
};
|
|
4400
4403
|
}
|
|
4401
4404
|
function getRouteCorsConfig(apiRoutes, pathname, method) {
|
|
4402
|
-
|
|
4405
|
+
const route = (0, _mastra_server_auth.findMatchingCustomRoute)(pathname, method, apiRoutes)?.route;
|
|
4406
|
+
return route && !isSchemaApiRoute(route) ? route.cors : void 0;
|
|
4403
4407
|
}
|
|
4404
4408
|
function getToolExports(tools) {
|
|
4405
4409
|
try {
|
|
@@ -4425,7 +4429,8 @@ async function createHonoServer(mastra, options = { tools: {} }) {
|
|
|
4425
4429
|
const apiPrefix = server?.apiPrefix ?? "/api";
|
|
4426
4430
|
const a2aTaskStore = new _mastra_server_a2a_store.InMemoryTaskStore();
|
|
4427
4431
|
const processedRoutes = (server?.apiRoutes)?.map((route) => {
|
|
4428
|
-
if (
|
|
4432
|
+
if (isSchemaApiRoute(route)) return route;
|
|
4433
|
+
if (route.openapi) {
|
|
4429
4434
|
const existingMiddleware = route.middleware ? Array.isArray(route.middleware) ? route.middleware : [route.middleware] : [];
|
|
4430
4435
|
return {
|
|
4431
4436
|
...route,
|