snow-flow 10.0.190 → 10.0.192

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/package.json",
3
- "version": "10.0.190",
3
+ "version": "10.0.192",
4
4
  "name": "snow-flow",
5
5
  "description": "Snow-Flow - ServiceNow Multi-Agent Development Framework powered by AI",
6
6
  "license": "Elastic-2.0",
@@ -1,16 +1,21 @@
1
1
  import { describeRoute, type DescribeRouteOptions } from "hono-openapi"
2
- import type { MiddlewareHandler } from "hono"
2
+ import { createMiddleware } from "hono/factory"
3
3
 
4
4
  /**
5
5
  * Typed wrapper around hono-openapi's `describeRoute` that preserves
6
6
  * middleware type-chain compatibility.
7
7
  *
8
- * `describeRoute()` returns a plain `MiddlewareHandler` (no type params),
9
- * which causes overload-resolution failures in tsgo (native TS compiler)
8
+ * `describeRoute()` returns `MiddlewareHandler` with a fixed string path
9
+ * parameter, which causes overload-resolution failures in tsgo on Linux
10
10
  * when combined with `validator()` middleware in a route handler chain.
11
11
  *
12
- * This wrapper casts the result so that Hono's `HandlerInterface` overloads
13
- * resolve correctly on all platforms.
12
+ * This wrapper calls `describeRoute` internally but returns a properly
13
+ * typed middleware created via Hono's `createMiddleware`, which preserves
14
+ * generic type parameters through the handler chain.
14
15
  */
15
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
16
- export const describe = describeRoute as (spec: DescribeRouteOptions) => MiddlewareHandler<any, any, {}>
16
+ export function describe(spec: DescribeRouteOptions) {
17
+ const original = describeRoute(spec)
18
+ return createMiddleware(async (c, next) => {
19
+ return original(c, next)
20
+ })
21
+ }