@mastra/deployer 1.3.0-alpha.2 → 1.4.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 CHANGED
@@ -1,5 +1,56 @@
1
1
  # @mastra/deployer
2
2
 
3
+ ## 1.4.0-alpha.0
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [[`7ef618f`](https://github.com/mastra-ai/mastra/commit/7ef618f3c49c27e2f6b27d7f564c557c0734325b), [`b373564`](https://github.com/mastra-ai/mastra/commit/b37356491d43b4d53067f10cb669abaf2502f218), [`927c2af`](https://github.com/mastra-ai/mastra/commit/927c2af9792286c122e04409efce0f3c804f777f), [`927c2af`](https://github.com/mastra-ai/mastra/commit/927c2af9792286c122e04409efce0f3c804f777f), [`5fbb1a8`](https://github.com/mastra-ai/mastra/commit/5fbb1a8f68a5953b4c7a60dd6d081c33111223f4), [`b896b41`](https://github.com/mastra-ai/mastra/commit/b896b41343de7fcc14442fb40fe82d189e65bbe2), [`6415277`](https://github.com/mastra-ai/mastra/commit/6415277a438faa00db2af850ead5dee25f40c428), [`0831bbb`](https://github.com/mastra-ai/mastra/commit/0831bbb5bc750c18e9b22b45f18687c964b70828), [`6297864`](https://github.com/mastra-ai/mastra/commit/62978644cd93b0782eae75c9f202fe846e7802d7), [`63f7eda`](https://github.com/mastra-ai/mastra/commit/63f7eda605eb3e0c8c35ee3912ffe7c999c69f69), [`a5b67a3`](https://github.com/mastra-ai/mastra/commit/a5b67a3589a74415feb663a55d1858324a2afde9), [`877b02c`](https://github.com/mastra-ai/mastra/commit/877b02cdbb15e199184c7f2b8f217be8d3ebada7), [`877b02c`](https://github.com/mastra-ai/mastra/commit/877b02cdbb15e199184c7f2b8f217be8d3ebada7), [`d87e96b`](https://github.com/mastra-ai/mastra/commit/d87e96b63cb47f0fe87d9147b915ebd0509f4ca3), [`7567222`](https://github.com/mastra-ai/mastra/commit/7567222b1366f0d39980594792dd9d5060bfe2ab), [`af71458`](https://github.com/mastra-ai/mastra/commit/af71458e3b566f09c11d0e5a0a836dc818e7a24a), [`eb36bd8`](https://github.com/mastra-ai/mastra/commit/eb36bd8c52fcd6ec9674ac3b7a6412405b5983e1), [`3cbf121`](https://github.com/mastra-ai/mastra/commit/3cbf121f55418141924754a83102aade89835947), [`6415277`](https://github.com/mastra-ai/mastra/commit/6415277a438faa00db2af850ead5dee25f40c428)]:
8
+ - @mastra/core@1.4.0-alpha.0
9
+ - @mastra/server@1.4.0-alpha.0
10
+
11
+ ## 1.3.0
12
+
13
+ ### Minor Changes
14
+
15
+ - Added support for request context presets in Mastra Studio. You can now define a JSON file with named requestContext presets and pass it via the `--request-context-presets` CLI flag to both `mastra dev` and `mastra studio` commands. A dropdown selector appears in the Studio Playground, allowing you to quickly switch between preset configurations. ([#12501](https://github.com/mastra-ai/mastra/pull/12501))
16
+
17
+ **Usage:**
18
+
19
+ ```bash
20
+ mastra dev --request-context-presets ./presets.json
21
+ mastra studio --request-context-presets ./presets.json
22
+ ```
23
+
24
+ **Presets file format:**
25
+
26
+ ```json
27
+ {
28
+ "development": { "userId": "dev-user", "env": "development" },
29
+ "production": { "userId": "prod-user", "env": "production" }
30
+ }
31
+ ```
32
+
33
+ When presets are loaded, a dropdown appears above the JSON editor on the Request Context page. Selecting a preset populates the editor, and manually editing the JSON automatically switches back to "Custom".
34
+
35
+ ### Patch Changes
36
+
37
+ - Fixed bundling of workspace packages in monorepo setups. ([#12645](https://github.com/mastra-ai/mastra/pull/12645))
38
+
39
+ **What was fixed:**
40
+ - Bundles now correctly include workspace packages with hyphenated names
41
+ - Workspace TypeScript sources compile correctly when resolved through workspace symlinks
42
+ - Transitive workspace dependencies are included when the entry point is generated
43
+
44
+ **Why this happened:**
45
+
46
+ Earlier workspace resolution logic skipped some workspace paths and virtual entries, so those dependencies were missed.
47
+
48
+ - Fixed TypeScript path alias resolution in workspace packages configured with `transpilePackages`. The bundler now correctly resolves imports using path aliases (e.g., `@/_` → `./src/_`) in transpiled workspace packages, preventing build failures in monorepo setups. ([#12239](https://github.com/mastra-ai/mastra/pull/12239))
49
+
50
+ - Updated dependencies [[`717ffab`](https://github.com/mastra-ai/mastra/commit/717ffab42cfd58ff723b5c19ada4939997773004), [`b31c922`](https://github.com/mastra-ai/mastra/commit/b31c922215b513791d98feaea1b98784aa00803a), [`e4b6dab`](https://github.com/mastra-ai/mastra/commit/e4b6dab171c5960e340b3ea3ea6da8d64d2b8672), [`6c40593`](https://github.com/mastra-ai/mastra/commit/6c40593d6d2b1b68b0c45d1a3a4c6ac5ecac3937), [`5719fa8`](https://github.com/mastra-ai/mastra/commit/5719fa8880e86e8affe698ec4b3807c7e0e0a06f), [`83cda45`](https://github.com/mastra-ai/mastra/commit/83cda4523e588558466892bff8f80f631a36945a), [`11804ad`](https://github.com/mastra-ai/mastra/commit/11804adf1d6be46ebe216be40a43b39bb8b397d7), [`11804ad`](https://github.com/mastra-ai/mastra/commit/11804adf1d6be46ebe216be40a43b39bb8b397d7), [`aa95f95`](https://github.com/mastra-ai/mastra/commit/aa95f958b186ae5c9f4219c88e268f5565c277a2), [`90f7894`](https://github.com/mastra-ai/mastra/commit/90f7894568dc9481f40a4d29672234fae23090bb), [`f5501ae`](https://github.com/mastra-ai/mastra/commit/f5501aedb0a11106c7db7e480d6eaf3971b7bda8), [`44573af`](https://github.com/mastra-ai/mastra/commit/44573afad0a4bc86f627d6cbc0207961cdcb3bc3), [`00e3861`](https://github.com/mastra-ai/mastra/commit/00e3861863fbfee78faeb1ebbdc7c0223aae13ff), [`8109aee`](https://github.com/mastra-ai/mastra/commit/8109aeeab758e16cd4255a6c36f044b70eefc6a6), [`7bfbc52`](https://github.com/mastra-ai/mastra/commit/7bfbc52a8604feb0fff2c0a082c13c0c2a3df1a2), [`8109aee`](https://github.com/mastra-ai/mastra/commit/8109aeeab758e16cd4255a6c36f044b70eefc6a6), [`1445994`](https://github.com/mastra-ai/mastra/commit/1445994aee19c9334a6a101cf7bd80ca7ed4d186), [`fdad759`](https://github.com/mastra-ai/mastra/commit/fdad75939ff008b27625f5ec0ce9c6915d99d9ec), [`61f44a2`](https://github.com/mastra-ai/mastra/commit/61f44a26861c89e364f367ff40825bdb7f19df55), [`37145d2`](https://github.com/mastra-ai/mastra/commit/37145d25f99dc31f1a9105576e5452609843ce32), [`fdad759`](https://github.com/mastra-ai/mastra/commit/fdad75939ff008b27625f5ec0ce9c6915d99d9ec), [`e4569c5`](https://github.com/mastra-ai/mastra/commit/e4569c589e00c4061a686c9eb85afe1b7050b0a8), [`7309a85`](https://github.com/mastra-ai/mastra/commit/7309a85427281a8be23f4fb80ca52e18eaffd596), [`4be93d0`](https://github.com/mastra-ai/mastra/commit/4be93d09d68e20aaf0ea3f210749422719618b5f), [`b7fe535`](https://github.com/mastra-ai/mastra/commit/b7fe535fedcff7920fc0c5263da1761b704b81b3), [`27e9a34`](https://github.com/mastra-ai/mastra/commit/27e9a34bdb67c6aa59bd45cbaba619b9bd1f44a0), [`1d8cd0a`](https://github.com/mastra-ai/mastra/commit/1d8cd0ac18e4ba45200093f2bc0c3067cbc6471b), [`99424f6`](https://github.com/mastra-ai/mastra/commit/99424f6862ffb679c4ec6765501486034754a4c2), [`44eb452`](https://github.com/mastra-ai/mastra/commit/44eb4529b10603c279688318bebf3048543a1d61), [`a211248`](https://github.com/mastra-ai/mastra/commit/a21124845b1b1321b6075a8377c341c7f5cda1b6), [`218849f`](https://github.com/mastra-ai/mastra/commit/218849fd337e13c35f788456744d75c6f5102b6b), [`e4b6dab`](https://github.com/mastra-ai/mastra/commit/e4b6dab171c5960e340b3ea3ea6da8d64d2b8672), [`6c40593`](https://github.com/mastra-ai/mastra/commit/6c40593d6d2b1b68b0c45d1a3a4c6ac5ecac3937), [`8c1135d`](https://github.com/mastra-ai/mastra/commit/8c1135dfb91b057283eae7ee11f9ec28753cc64f), [`dd39e54`](https://github.com/mastra-ai/mastra/commit/dd39e54ea34532c995b33bee6e0e808bf41a7341), [`b6fad9a`](https://github.com/mastra-ai/mastra/commit/b6fad9a602182b1cc0df47cd8c55004fa829ad61), [`4129c07`](https://github.com/mastra-ai/mastra/commit/4129c073349b5a66643fd8136ebfe9d7097cf793), [`a211248`](https://github.com/mastra-ai/mastra/commit/a21124845b1b1321b6075a8377c341c7f5cda1b6), [`d917195`](https://github.com/mastra-ai/mastra/commit/d917195995422dff39ee46a516fe7f7205158858), [`5b930ab`](https://github.com/mastra-ai/mastra/commit/5b930aba1834d9898e8460a49d15106f31ac7c8d), [`4be93d0`](https://github.com/mastra-ai/mastra/commit/4be93d09d68e20aaf0ea3f210749422719618b5f), [`047635c`](https://github.com/mastra-ai/mastra/commit/047635ccd7861d726c62d135560c0022a5490aec), [`8c90ff4`](https://github.com/mastra-ai/mastra/commit/8c90ff4d3414e7f2a2d216ea91274644f7b29133), [`ed232d1`](https://github.com/mastra-ai/mastra/commit/ed232d1583f403925dc5ae45f7bee948cf2a182b), [`5b930ab`](https://github.com/mastra-ai/mastra/commit/5b930aba1834d9898e8460a49d15106f31ac7c8d), [`3891795`](https://github.com/mastra-ai/mastra/commit/38917953518eb4154a984ee36e6ededdcfe80f72), [`4f955b2`](https://github.com/mastra-ai/mastra/commit/4f955b20c7f66ed282ee1fd8709696fa64c4f19d), [`55a4c90`](https://github.com/mastra-ai/mastra/commit/55a4c9044ac7454349b9f6aeba0bbab5ee65d10f)]:
51
+ - @mastra/core@1.3.0
52
+ - @mastra/server@1.3.0
53
+
3
54
  ## 1.3.0-alpha.2
4
55
 
5
56
  ### Patch Changes
@@ -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.3.0-alpha.2"
6
+ version: "1.4.0-alpha.0"
7
7
  ---
8
8
 
9
9
  ## When to use
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "1.3.0-alpha.2",
2
+ "version": "1.4.0-alpha.0",
3
3
  "package": "@mastra/deployer",
4
4
  "exports": {
5
5
  "Deps": {
@@ -9,7 +9,7 @@ The following guides show how to deploy Mastra to specific cloud providers:
9
9
  - [Amazon EC2](https://mastra.ai/guides/deployment/amazon-ec2)
10
10
  - [AWS Lambda](https://mastra.ai/guides/deployment/aws-lambda)
11
11
  - [Azure App Services](https://mastra.ai/guides/deployment/azure-app-services)
12
- - [Cloudflare](https://mastra.ai/guides/deployment/cloudflare-deployer)
12
+ - [Cloudflare](https://mastra.ai/guides/deployment/cloudflare)
13
13
  - [Digital Ocean](https://mastra.ai/guides/deployment/digital-ocean)
14
14
  - [Netlify](https://mastra.ai/guides/deployment/netlify)
15
15
  - [Vercel](https://mastra.ai/guides/deployment/vercel)
@@ -34,7 +34,7 @@ Use this option for auto-scaling, minimal infrastructure management, or when you
34
34
  - [Amazon EC2](https://mastra.ai/guides/deployment/amazon-ec2)
35
35
  - [AWS Lambda](https://mastra.ai/guides/deployment/aws-lambda)
36
36
  - [Azure App Services](https://mastra.ai/guides/deployment/azure-app-services)
37
- - [Cloudflare](https://mastra.ai/guides/deployment/cloudflare-deployer)
37
+ - [Cloudflare](https://mastra.ai/guides/deployment/cloudflare)
38
38
  - [Digital Ocean](https://mastra.ai/guides/deployment/digital-ocean)
39
39
  - [Netlify](https://mastra.ai/guides/deployment/netlify)
40
40
  - [Vercel](https://mastra.ai/guides/deployment/vercel)
@@ -3298,7 +3298,7 @@ var MastraServer = class extends serverAdapter.MastraServer {
3298
3298
  const queryParams = serverAdapter.normalizeQueryParams(request.queries());
3299
3299
  let body;
3300
3300
  let bodyParseError;
3301
- if (route.method === "POST" || route.method === "PUT" || route.method === "PATCH") {
3301
+ if (route.method === "POST" || route.method === "PUT" || route.method === "PATCH" || route.method === "DELETE") {
3302
3302
  const contentType = request.header("content-type") || "";
3303
3303
  if (contentType.includes("multipart/form-data")) {
3304
3304
  try {
@@ -3517,6 +3517,21 @@ var MastraServer = class extends serverAdapter.MastraServer {
3517
3517
  }
3518
3518
  );
3519
3519
  }
3520
+ async registerCustomApiRoutes() {
3521
+ const routes = this.customApiRoutes ?? this.mastra.getServer()?.apiRoutes;
3522
+ if (!routes || routes.length === 0) return;
3523
+ for (const route of routes) {
3524
+ const handler = "handler" in route && route.handler ? route.handler : "createHandler" in route ? await route.createHandler({ mastra: this.mastra }) : void 0;
3525
+ if (!handler) continue;
3526
+ const middlewares = [];
3527
+ if (route.middleware) {
3528
+ middlewares.push(...Array.isArray(route.middleware) ? route.middleware : [route.middleware]);
3529
+ }
3530
+ const allHandlers = [...middlewares, handler];
3531
+ const method = route.method.toLowerCase();
3532
+ this.app[method](route.path, allHandlers[0], ...allHandlers.slice(1));
3533
+ }
3534
+ }
3520
3535
  registerContextMiddleware() {
3521
3536
  this.app.use("*", this.createContextMiddleware());
3522
3537
  }