snow-flow 10.0.192 → 10.0.193
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/package.json +1 -1
- package/src/server/describe.ts +8 -12
package/package.json
CHANGED
package/src/server/describe.ts
CHANGED
|
@@ -1,21 +1,17 @@
|
|
|
1
1
|
import { describeRoute, type DescribeRouteOptions } from "hono-openapi"
|
|
2
|
-
import { createMiddleware } from "hono/factory"
|
|
3
2
|
|
|
4
3
|
/**
|
|
5
4
|
* Typed wrapper around hono-openapi's `describeRoute` that preserves
|
|
6
5
|
* middleware type-chain compatibility.
|
|
7
6
|
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
7
|
+
* Root cause: monorepo has hono 4.11.10 (root) and 4.12.2 (packages/opencode).
|
|
8
|
+
* tsgo on Linux treats these as incompatible types, breaking describeRoute's
|
|
9
|
+
* MiddlewareHandler return type in route chains with validator().
|
|
11
10
|
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
* generic type parameters through the handler chain.
|
|
11
|
+
* Fix: return type `any` erases the cross-package type boundary so Hono's
|
|
12
|
+
* HandlerInterface overloads resolve from the caller's own hono version.
|
|
15
13
|
*/
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
return
|
|
19
|
-
return original(c, next)
|
|
20
|
-
})
|
|
14
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
15
|
+
export function describe(spec: DescribeRouteOptions): any {
|
|
16
|
+
return describeRoute(spec)
|
|
21
17
|
}
|