@mastra/koa 1.1.3-alpha.0 → 1.1.3

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.
Files changed (2) hide show
  1. package/CHANGELOG.md +37 -0
  2. package/package.json +10 -10
package/CHANGELOG.md CHANGED
@@ -1,5 +1,42 @@
1
1
  # @mastra/koa
2
2
 
3
+ ## 1.1.3
4
+
5
+ ### Patch Changes
6
+
7
+ - Fixed DELETE requests with JSON bodies not being parsed. Now parses request bodies for DELETE methods (previously only POST, PUT, PATCH). ([#12747](https://github.com/mastra-ai/mastra/pull/12747))
8
+
9
+ - Fixed custom API routes registered via `registerApiRoute()` being silently ignored by Koa, Express, Fastify, and Hono server adapters. Routes previously appeared in the OpenAPI spec but returned 404 at runtime. Custom routes now work correctly across all server adapters. ([#12960](https://github.com/mastra-ai/mastra/pull/12960))
10
+
11
+ **Example:**
12
+
13
+ ```ts
14
+ import Koa from 'koa';
15
+ import { Mastra } from '@mastra/core';
16
+ import { registerApiRoute } from '@mastra/core/server';
17
+ import { MastraServer } from '@mastra/koa';
18
+
19
+ const mastra = new Mastra({
20
+ server: {
21
+ apiRoutes: [
22
+ registerApiRoute('/hello', {
23
+ method: 'GET',
24
+ handler: async c => c.json({ message: 'Hello!' }),
25
+ }),
26
+ ],
27
+ },
28
+ });
29
+
30
+ const app = new Koa();
31
+ const server = new MastraServer({ app, mastra });
32
+ await server.init();
33
+ // GET /hello now returns 200 instead of 404
34
+ ```
35
+
36
+ - 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)]:
37
+ - @mastra/core@1.4.0
38
+ - @mastra/server@1.4.0
39
+
3
40
  ## 1.1.3-alpha.0
4
41
 
5
42
  ### Patch Changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mastra/koa",
3
- "version": "1.1.3-alpha.0",
3
+ "version": "1.1.3",
4
4
  "description": "Mastra Koa adapter for the server",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -21,7 +21,7 @@
21
21
  "license": "Apache-2.0",
22
22
  "dependencies": {
23
23
  "@fastify/busboy": "^3.2.0",
24
- "@mastra/server": "1.4.0-alpha.0"
24
+ "@mastra/server": "1.4.0"
25
25
  },
26
26
  "devDependencies": {
27
27
  "@types/node": "^20.19.30",
@@ -35,15 +35,15 @@
35
35
  "@types/koa-bodyparser": "^4.3.13",
36
36
  "@ai-sdk/openai": "^2.0.62",
37
37
  "zod": "^3.25.0",
38
- "@internal/lint": "0.0.58",
39
- "@internal/storage-test-utils": "0.0.54",
40
- "@internal/server-adapter-test-utils": "0.0.4",
41
- "@mastra/core": "1.4.0-alpha.0",
42
- "@mastra/libsql": "1.4.0-alpha.0",
38
+ "@internal/lint": "0.0.59",
39
+ "@internal/storage-test-utils": "0.0.55",
40
+ "@mastra/core": "1.4.0",
41
+ "@internal/server-adapter-test-utils": "0.0.5",
42
+ "@mastra/libsql": "1.4.0",
43
+ "@mastra/evals": "1.1.1",
43
44
  "@mastra/observability": "1.2.0",
44
- "@mastra/memory": "1.3.0-alpha.0",
45
- "@internal/types-builder": "0.0.33",
46
- "@mastra/evals": "1.1.1"
45
+ "@mastra/memory": "1.3.0",
46
+ "@internal/types-builder": "0.0.34"
47
47
  },
48
48
  "peerDependencies": {
49
49
  "@mastra/core": ">=1.0.0-0 <2.0.0-0",