@orpc/openapi 0.0.0-next.f22c7ec → 0.0.0-next.f397ca2

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 (68) hide show
  1. package/README.md +104 -0
  2. package/dist/adapters/aws-lambda/index.d.mts +20 -0
  3. package/dist/adapters/aws-lambda/index.d.ts +20 -0
  4. package/dist/adapters/aws-lambda/index.mjs +18 -0
  5. package/dist/adapters/fastify/index.d.mts +23 -0
  6. package/dist/adapters/fastify/index.d.ts +23 -0
  7. package/dist/adapters/fastify/index.mjs +18 -0
  8. package/dist/adapters/fetch/index.d.mts +23 -0
  9. package/dist/adapters/fetch/index.d.ts +23 -0
  10. package/dist/adapters/fetch/index.mjs +18 -0
  11. package/dist/adapters/node/index.d.mts +23 -0
  12. package/dist/adapters/node/index.d.ts +23 -0
  13. package/dist/adapters/node/index.mjs +18 -0
  14. package/dist/adapters/standard/index.d.mts +20 -0
  15. package/dist/adapters/standard/index.d.ts +20 -0
  16. package/dist/adapters/standard/index.mjs +9 -0
  17. package/dist/index.d.mts +116 -0
  18. package/dist/index.d.ts +116 -0
  19. package/dist/index.mjs +41 -0
  20. package/dist/plugins/index.d.mts +84 -0
  21. package/dist/plugins/index.d.ts +84 -0
  22. package/dist/plugins/index.mjs +148 -0
  23. package/dist/shared/openapi.BfNjg7j9.d.mts +120 -0
  24. package/dist/shared/openapi.BfNjg7j9.d.ts +120 -0
  25. package/dist/shared/openapi.CzHcOMxv.mjs +853 -0
  26. package/dist/shared/openapi.DIt-Z9W1.mjs +190 -0
  27. package/dist/shared/openapi.DwaweYRb.d.mts +54 -0
  28. package/dist/shared/openapi.DwaweYRb.d.ts +54 -0
  29. package/package.json +39 -38
  30. package/dist/chunk-N7JLIFHD.js +0 -25
  31. package/dist/chunk-TW72MGM2.js +0 -651
  32. package/dist/chunk-V4HFPIEN.js +0 -107
  33. package/dist/fetch.js +0 -34
  34. package/dist/hono.js +0 -34
  35. package/dist/index.js +0 -550
  36. package/dist/next.js +0 -34
  37. package/dist/node.js +0 -46
  38. package/dist/src/adapters/fetch/bracket-notation.d.ts +0 -84
  39. package/dist/src/adapters/fetch/index.d.ts +0 -10
  40. package/dist/src/adapters/fetch/input-structure-compact.d.ts +0 -6
  41. package/dist/src/adapters/fetch/input-structure-detailed.d.ts +0 -11
  42. package/dist/src/adapters/fetch/openapi-handler-server.d.ts +0 -7
  43. package/dist/src/adapters/fetch/openapi-handler-serverless.d.ts +0 -7
  44. package/dist/src/adapters/fetch/openapi-handler.d.ts +0 -32
  45. package/dist/src/adapters/fetch/openapi-payload-codec.d.ts +0 -15
  46. package/dist/src/adapters/fetch/openapi-procedure-matcher.d.ts +0 -19
  47. package/dist/src/adapters/fetch/schema-coercer.d.ts +0 -10
  48. package/dist/src/adapters/hono/index.d.ts +0 -2
  49. package/dist/src/adapters/next/index.d.ts +0 -2
  50. package/dist/src/adapters/node/index.d.ts +0 -5
  51. package/dist/src/adapters/node/openapi-handler-server.d.ts +0 -7
  52. package/dist/src/adapters/node/openapi-handler-serverless.d.ts +0 -7
  53. package/dist/src/adapters/node/openapi-handler.d.ts +0 -11
  54. package/dist/src/adapters/node/types.d.ts +0 -2
  55. package/dist/src/index.d.ts +0 -12
  56. package/dist/src/json-serializer.d.ts +0 -5
  57. package/dist/src/openapi-content-builder.d.ts +0 -10
  58. package/dist/src/openapi-error.d.ts +0 -3
  59. package/dist/src/openapi-generator.d.ts +0 -67
  60. package/dist/src/openapi-input-structure-parser.d.ts +0 -22
  61. package/dist/src/openapi-output-structure-parser.d.ts +0 -18
  62. package/dist/src/openapi-parameters-builder.d.ts +0 -12
  63. package/dist/src/openapi-path-parser.d.ts +0 -8
  64. package/dist/src/openapi.d.ts +0 -3
  65. package/dist/src/schema-converter.d.ts +0 -16
  66. package/dist/src/schema-utils.d.ts +0 -11
  67. package/dist/src/schema.d.ts +0 -12
  68. package/dist/src/utils.d.ts +0 -18
@@ -0,0 +1,190 @@
1
+ import { standardizeHTTPPath, StandardOpenAPIJsonSerializer, StandardBracketNotationSerializer, StandardOpenAPISerializer } from '@orpc/openapi-client/standard';
2
+ import { StandardHandler } from '@orpc/server/standard';
3
+ import { isORPCErrorStatus } from '@orpc/client';
4
+ import { fallbackContractConfig } from '@orpc/contract';
5
+ import { isObject, stringifyJSON, tryDecodeURIComponent, value } from '@orpc/shared';
6
+ import { toHttpPath } from '@orpc/client/standard';
7
+ import { traverseContractProcedures, isProcedure, getLazyMeta, unlazy, getRouter, createContractedProcedure } from '@orpc/server';
8
+ import { createRouter, addRoute, findRoute } from 'rou3';
9
+
10
+ class StandardOpenAPICodec {
11
+ constructor(serializer, options = {}) {
12
+ this.serializer = serializer;
13
+ this.customErrorResponseBodyEncoder = options.customErrorResponseBodyEncoder;
14
+ }
15
+ customErrorResponseBodyEncoder;
16
+ async decode(request, params, procedure) {
17
+ const inputStructure = fallbackContractConfig("defaultInputStructure", procedure["~orpc"].route.inputStructure);
18
+ if (inputStructure === "compact") {
19
+ const data = request.method === "GET" ? this.serializer.deserialize(request.url.searchParams) : this.serializer.deserialize(await request.body());
20
+ if (data === void 0) {
21
+ return params;
22
+ }
23
+ if (isObject(data)) {
24
+ return {
25
+ ...params,
26
+ ...data
27
+ };
28
+ }
29
+ return data;
30
+ }
31
+ const deserializeSearchParams = () => {
32
+ return this.serializer.deserialize(request.url.searchParams);
33
+ };
34
+ return {
35
+ params,
36
+ get query() {
37
+ const value = deserializeSearchParams();
38
+ Object.defineProperty(this, "query", { value, writable: true });
39
+ return value;
40
+ },
41
+ set query(value) {
42
+ Object.defineProperty(this, "query", { value, writable: true });
43
+ },
44
+ headers: request.headers,
45
+ body: this.serializer.deserialize(await request.body())
46
+ };
47
+ }
48
+ encode(output, procedure) {
49
+ const successStatus = fallbackContractConfig("defaultSuccessStatus", procedure["~orpc"].route.successStatus);
50
+ const outputStructure = fallbackContractConfig("defaultOutputStructure", procedure["~orpc"].route.outputStructure);
51
+ if (outputStructure === "compact") {
52
+ return {
53
+ status: successStatus,
54
+ headers: {},
55
+ body: this.serializer.serialize(output)
56
+ };
57
+ }
58
+ if (!this.#isDetailedOutput(output)) {
59
+ throw new Error(`
60
+ Invalid "detailed" output structure:
61
+ \u2022 Expected an object with optional properties:
62
+ - status (number 200-399)
63
+ - headers (Record<string, string | string[]>)
64
+ - body (any)
65
+ \u2022 No extra keys allowed.
66
+
67
+ Actual value:
68
+ ${stringifyJSON(output)}
69
+ `);
70
+ }
71
+ return {
72
+ status: output.status ?? successStatus,
73
+ headers: output.headers ?? {},
74
+ body: this.serializer.serialize(output.body)
75
+ };
76
+ }
77
+ encodeError(error) {
78
+ const body = this.customErrorResponseBodyEncoder?.(error) ?? error.toJSON();
79
+ return {
80
+ status: error.status,
81
+ headers: {},
82
+ body: this.serializer.serialize(body, { outputFormat: "plain" })
83
+ };
84
+ }
85
+ #isDetailedOutput(output) {
86
+ if (!isObject(output)) {
87
+ return false;
88
+ }
89
+ if (output.headers && !isObject(output.headers)) {
90
+ return false;
91
+ }
92
+ if (output.status !== void 0 && (typeof output.status !== "number" || !Number.isInteger(output.status) || isORPCErrorStatus(output.status))) {
93
+ return false;
94
+ }
95
+ return true;
96
+ }
97
+ }
98
+
99
+ function toRou3Pattern(path) {
100
+ return standardizeHTTPPath(path).replace(/\/\{\+([^}]+)\}/g, "/**:$1").replace(/\/\{([^}]+)\}/g, "/:$1");
101
+ }
102
+ function decodeParams(params) {
103
+ return Object.fromEntries(Object.entries(params).map(([key, value]) => [key, tryDecodeURIComponent(value)]));
104
+ }
105
+
106
+ class StandardOpenAPIMatcher {
107
+ filter;
108
+ tree = createRouter();
109
+ pendingRouters = [];
110
+ constructor(options = {}) {
111
+ this.filter = options.filter ?? true;
112
+ }
113
+ init(router, path = []) {
114
+ const laziedOptions = traverseContractProcedures({ router, path }, (traverseOptions) => {
115
+ if (!value(this.filter, traverseOptions)) {
116
+ return;
117
+ }
118
+ const { path: path2, contract } = traverseOptions;
119
+ const method = fallbackContractConfig("defaultMethod", contract["~orpc"].route.method);
120
+ const httpPath = toRou3Pattern(contract["~orpc"].route.path ?? toHttpPath(path2));
121
+ if (isProcedure(contract)) {
122
+ addRoute(this.tree, method, httpPath, {
123
+ path: path2,
124
+ contract,
125
+ procedure: contract,
126
+ // this mean dev not used contract-first so we can used contract as procedure directly
127
+ router
128
+ });
129
+ } else {
130
+ addRoute(this.tree, method, httpPath, {
131
+ path: path2,
132
+ contract,
133
+ procedure: void 0,
134
+ router
135
+ });
136
+ }
137
+ });
138
+ this.pendingRouters.push(...laziedOptions.map((option) => ({
139
+ ...option,
140
+ httpPathPrefix: toHttpPath(option.path),
141
+ laziedPrefix: getLazyMeta(option.router).prefix
142
+ })));
143
+ }
144
+ async match(method, pathname) {
145
+ if (this.pendingRouters.length) {
146
+ const newPendingRouters = [];
147
+ for (const pendingRouter of this.pendingRouters) {
148
+ if (!pendingRouter.laziedPrefix || pathname.startsWith(pendingRouter.laziedPrefix) || pathname.startsWith(pendingRouter.httpPathPrefix)) {
149
+ const { default: router } = await unlazy(pendingRouter.router);
150
+ this.init(router, pendingRouter.path);
151
+ } else {
152
+ newPendingRouters.push(pendingRouter);
153
+ }
154
+ }
155
+ this.pendingRouters = newPendingRouters;
156
+ }
157
+ const match = findRoute(this.tree, method, pathname);
158
+ if (!match) {
159
+ return void 0;
160
+ }
161
+ if (!match.data.procedure) {
162
+ const { default: maybeProcedure } = await unlazy(getRouter(match.data.router, match.data.path));
163
+ if (!isProcedure(maybeProcedure)) {
164
+ throw new Error(`
165
+ [Contract-First] Missing or invalid implementation for procedure at path: ${toHttpPath(match.data.path)}.
166
+ Ensure that the procedure is correctly defined and matches the expected contract.
167
+ `);
168
+ }
169
+ match.data.procedure = createContractedProcedure(maybeProcedure, match.data.contract);
170
+ }
171
+ return {
172
+ path: match.data.path,
173
+ procedure: match.data.procedure,
174
+ params: match.params ? decodeParams(match.params) : void 0
175
+ };
176
+ }
177
+ }
178
+
179
+ class StandardOpenAPIHandler extends StandardHandler {
180
+ constructor(router, options) {
181
+ const jsonSerializer = new StandardOpenAPIJsonSerializer(options);
182
+ const bracketNotationSerializer = new StandardBracketNotationSerializer(options);
183
+ const serializer = new StandardOpenAPISerializer(jsonSerializer, bracketNotationSerializer);
184
+ const matcher = new StandardOpenAPIMatcher(options);
185
+ const codec = new StandardOpenAPICodec(serializer, options);
186
+ super(router, matcher, codec, options);
187
+ }
188
+ }
189
+
190
+ export { StandardOpenAPICodec as S, StandardOpenAPIHandler as a, StandardOpenAPIMatcher as b, decodeParams as d, toRou3Pattern as t };
@@ -0,0 +1,54 @@
1
+ import { StandardOpenAPISerializer, StandardOpenAPIJsonSerializerOptions, StandardBracketNotationSerializerOptions } from '@orpc/openapi-client/standard';
2
+ import { AnyProcedure, TraverseContractProcedureCallbackOptions, AnyRouter, Context, Router } from '@orpc/server';
3
+ import { StandardCodec, StandardParams, StandardMatcher, StandardMatchResult, StandardHandlerOptions, StandardHandler } from '@orpc/server/standard';
4
+ import { ORPCError, HTTPPath } from '@orpc/client';
5
+ import { StandardLazyRequest, StandardResponse } from '@orpc/standard-server';
6
+ import { Value } from '@orpc/shared';
7
+
8
+ interface StandardOpenAPICodecOptions {
9
+ /**
10
+ * Customize how an ORPC error is encoded into a response body.
11
+ * Use this if your API needs a different error output structure.
12
+ *
13
+ * @remarks
14
+ * - Return `null | undefined` to fallback to default behavior
15
+ *
16
+ * @default ((e) => e.toJSON())
17
+ */
18
+ customErrorResponseBodyEncoder?: (error: ORPCError<any, any>) => unknown;
19
+ }
20
+ declare class StandardOpenAPICodec implements StandardCodec {
21
+ #private;
22
+ private readonly serializer;
23
+ private readonly customErrorResponseBodyEncoder;
24
+ constructor(serializer: StandardOpenAPISerializer, options?: StandardOpenAPICodecOptions);
25
+ decode(request: StandardLazyRequest, params: StandardParams | undefined, procedure: AnyProcedure): Promise<unknown>;
26
+ encode(output: unknown, procedure: AnyProcedure): StandardResponse;
27
+ encodeError(error: ORPCError<any, any>): StandardResponse;
28
+ }
29
+
30
+ interface StandardOpenAPIMatcherOptions {
31
+ /**
32
+ * Filter procedures. Return `false` to exclude a procedure from matching.
33
+ *
34
+ * @default true
35
+ */
36
+ filter?: Value<boolean, [options: TraverseContractProcedureCallbackOptions]>;
37
+ }
38
+ declare class StandardOpenAPIMatcher implements StandardMatcher {
39
+ private readonly filter;
40
+ private readonly tree;
41
+ private pendingRouters;
42
+ constructor(options?: StandardOpenAPIMatcherOptions);
43
+ init(router: AnyRouter, path?: readonly string[]): void;
44
+ match(method: string, pathname: HTTPPath): Promise<StandardMatchResult>;
45
+ }
46
+
47
+ interface StandardOpenAPIHandlerOptions<T extends Context> extends StandardHandlerOptions<T>, StandardOpenAPIJsonSerializerOptions, StandardBracketNotationSerializerOptions, StandardOpenAPIMatcherOptions, StandardOpenAPICodecOptions {
48
+ }
49
+ declare class StandardOpenAPIHandler<T extends Context> extends StandardHandler<T> {
50
+ constructor(router: Router<any, T>, options: NoInfer<StandardOpenAPIHandlerOptions<T>>);
51
+ }
52
+
53
+ export { StandardOpenAPICodec as a, StandardOpenAPIHandler as c, StandardOpenAPIMatcher as e };
54
+ export type { StandardOpenAPICodecOptions as S, StandardOpenAPIHandlerOptions as b, StandardOpenAPIMatcherOptions as d };
@@ -0,0 +1,54 @@
1
+ import { StandardOpenAPISerializer, StandardOpenAPIJsonSerializerOptions, StandardBracketNotationSerializerOptions } from '@orpc/openapi-client/standard';
2
+ import { AnyProcedure, TraverseContractProcedureCallbackOptions, AnyRouter, Context, Router } from '@orpc/server';
3
+ import { StandardCodec, StandardParams, StandardMatcher, StandardMatchResult, StandardHandlerOptions, StandardHandler } from '@orpc/server/standard';
4
+ import { ORPCError, HTTPPath } from '@orpc/client';
5
+ import { StandardLazyRequest, StandardResponse } from '@orpc/standard-server';
6
+ import { Value } from '@orpc/shared';
7
+
8
+ interface StandardOpenAPICodecOptions {
9
+ /**
10
+ * Customize how an ORPC error is encoded into a response body.
11
+ * Use this if your API needs a different error output structure.
12
+ *
13
+ * @remarks
14
+ * - Return `null | undefined` to fallback to default behavior
15
+ *
16
+ * @default ((e) => e.toJSON())
17
+ */
18
+ customErrorResponseBodyEncoder?: (error: ORPCError<any, any>) => unknown;
19
+ }
20
+ declare class StandardOpenAPICodec implements StandardCodec {
21
+ #private;
22
+ private readonly serializer;
23
+ private readonly customErrorResponseBodyEncoder;
24
+ constructor(serializer: StandardOpenAPISerializer, options?: StandardOpenAPICodecOptions);
25
+ decode(request: StandardLazyRequest, params: StandardParams | undefined, procedure: AnyProcedure): Promise<unknown>;
26
+ encode(output: unknown, procedure: AnyProcedure): StandardResponse;
27
+ encodeError(error: ORPCError<any, any>): StandardResponse;
28
+ }
29
+
30
+ interface StandardOpenAPIMatcherOptions {
31
+ /**
32
+ * Filter procedures. Return `false` to exclude a procedure from matching.
33
+ *
34
+ * @default true
35
+ */
36
+ filter?: Value<boolean, [options: TraverseContractProcedureCallbackOptions]>;
37
+ }
38
+ declare class StandardOpenAPIMatcher implements StandardMatcher {
39
+ private readonly filter;
40
+ private readonly tree;
41
+ private pendingRouters;
42
+ constructor(options?: StandardOpenAPIMatcherOptions);
43
+ init(router: AnyRouter, path?: readonly string[]): void;
44
+ match(method: string, pathname: HTTPPath): Promise<StandardMatchResult>;
45
+ }
46
+
47
+ interface StandardOpenAPIHandlerOptions<T extends Context> extends StandardHandlerOptions<T>, StandardOpenAPIJsonSerializerOptions, StandardBracketNotationSerializerOptions, StandardOpenAPIMatcherOptions, StandardOpenAPICodecOptions {
48
+ }
49
+ declare class StandardOpenAPIHandler<T extends Context> extends StandardHandler<T> {
50
+ constructor(router: Router<any, T>, options: NoInfer<StandardOpenAPIHandlerOptions<T>>);
51
+ }
52
+
53
+ export { StandardOpenAPICodec as a, StandardOpenAPIHandler as c, StandardOpenAPIMatcher as e };
54
+ export type { StandardOpenAPICodecOptions as S, StandardOpenAPIHandlerOptions as b, StandardOpenAPIMatcherOptions as d };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@orpc/openapi",
3
3
  "type": "module",
4
- "version": "0.0.0-next.f22c7ec",
4
+ "version": "0.0.0-next.f397ca2",
5
5
  "license": "MIT",
6
6
  "homepage": "https://orpc.unnoq.com",
7
7
  "repository": {
@@ -15,59 +15,60 @@
15
15
  ],
16
16
  "exports": {
17
17
  ".": {
18
- "types": "./dist/src/index.d.ts",
19
- "import": "./dist/index.js",
20
- "default": "./dist/index.js"
18
+ "types": "./dist/index.d.mts",
19
+ "import": "./dist/index.mjs",
20
+ "default": "./dist/index.mjs"
21
21
  },
22
- "./fetch": {
23
- "types": "./dist/src/adapters/fetch/index.d.ts",
24
- "import": "./dist/fetch.js",
25
- "default": "./dist/fetch.js"
22
+ "./plugins": {
23
+ "types": "./dist/plugins/index.d.mts",
24
+ "import": "./dist/plugins/index.mjs",
25
+ "default": "./dist/plugins/index.mjs"
26
26
  },
27
- "./hono": {
28
- "types": "./dist/src/adapters/hono/index.d.ts",
29
- "import": "./dist/hono.js",
30
- "default": "./dist/hono.js"
27
+ "./standard": {
28
+ "types": "./dist/adapters/standard/index.d.mts",
29
+ "import": "./dist/adapters/standard/index.mjs",
30
+ "default": "./dist/adapters/standard/index.mjs"
31
31
  },
32
- "./next": {
33
- "types": "./dist/src/adapters/next/index.d.ts",
34
- "import": "./dist/next.js",
35
- "default": "./dist/next.js"
32
+ "./fetch": {
33
+ "types": "./dist/adapters/fetch/index.d.mts",
34
+ "import": "./dist/adapters/fetch/index.mjs",
35
+ "default": "./dist/adapters/fetch/index.mjs"
36
36
  },
37
37
  "./node": {
38
- "types": "./dist/src/adapters/node/index.d.ts",
39
- "import": "./dist/node.js",
40
- "default": "./dist/node.js"
38
+ "types": "./dist/adapters/node/index.d.mts",
39
+ "import": "./dist/adapters/node/index.mjs",
40
+ "default": "./dist/adapters/node/index.mjs"
41
+ },
42
+ "./fastify": {
43
+ "types": "./dist/adapters/fastify/index.d.mts",
44
+ "import": "./dist/adapters/fastify/index.mjs",
45
+ "default": "./dist/adapters/fastify/index.mjs"
41
46
  },
42
- "./🔒/*": {
43
- "types": "./dist/src/*.d.ts"
47
+ "./aws-lambda": {
48
+ "types": "./dist/adapters/aws-lambda/index.d.mts",
49
+ "import": "./dist/adapters/aws-lambda/index.mjs",
50
+ "default": "./dist/adapters/aws-lambda/index.mjs"
44
51
  }
45
52
  },
46
53
  "files": [
47
- "!**/*.map",
48
- "!**/*.tsbuildinfo",
49
54
  "dist"
50
55
  ],
51
56
  "dependencies": {
52
- "@standard-schema/spec": "1.0.0-beta.4",
53
- "@types/content-disposition": "^0.5.8",
54
- "content-disposition": "^0.5.4",
55
- "escape-string-regexp": "^5.0.0",
56
- "fast-content-type-parse": "^2.0.0",
57
- "hono": "^4.6.12",
58
- "json-schema-typed": "^8.0.1",
59
- "openapi3-ts": "^4.4.0",
60
- "wildcard-match": "^5.1.3",
61
- "@orpc/contract": "0.0.0-next.f22c7ec",
62
- "@orpc/shared": "0.0.0-next.f22c7ec",
63
- "@orpc/server": "0.0.0-next.f22c7ec"
57
+ "rou3": "^0.7.10",
58
+ "@orpc/client": "0.0.0-next.f397ca2",
59
+ "@orpc/contract": "0.0.0-next.f397ca2",
60
+ "@orpc/interop": "0.0.0-next.f397ca2",
61
+ "@orpc/openapi-client": "0.0.0-next.f397ca2",
62
+ "@orpc/shared": "0.0.0-next.f397ca2",
63
+ "@orpc/standard-server": "0.0.0-next.f397ca2",
64
+ "@orpc/server": "0.0.0-next.f397ca2"
64
65
  },
65
66
  "devDependencies": {
66
- "@readme/openapi-parser": "^2.6.0",
67
- "zod": "^3.24.1"
67
+ "fastify": "^5.6.2",
68
+ "zod": "^4.1.12"
68
69
  },
69
70
  "scripts": {
70
- "build": "tsup --onSuccess='tsc -b --noCheck'",
71
+ "build": "unbuild",
71
72
  "build:watch": "pnpm run build --watch",
72
73
  "type:check": "tsc -b"
73
74
  }
@@ -1,25 +0,0 @@
1
- import {
2
- OpenAPIHandler
3
- } from "./chunk-TW72MGM2.js";
4
-
5
- // src/adapters/fetch/openapi-handler-server.ts
6
- import { TrieRouter } from "hono/router/trie-router";
7
- var OpenAPIServerHandler = class extends OpenAPIHandler {
8
- constructor(router, options) {
9
- super(new TrieRouter(), router, options);
10
- }
11
- };
12
-
13
- // src/adapters/fetch/openapi-handler-serverless.ts
14
- import { LinearRouter } from "hono/router/linear-router";
15
- var OpenAPIServerlessHandler = class extends OpenAPIHandler {
16
- constructor(router, options) {
17
- super(new LinearRouter(), router, options);
18
- }
19
- };
20
-
21
- export {
22
- OpenAPIServerHandler,
23
- OpenAPIServerlessHandler
24
- };
25
- //# sourceMappingURL=chunk-N7JLIFHD.js.map