@orpc/openapi 0.0.0-next.9306271 → 0.0.0-next.93e7a4c

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.
@@ -1,49 +0,0 @@
1
- // src/utils.ts
2
- import { isContractProcedure } from "@orpc/contract";
3
- import { isLazy, isProcedure, ROUTER_CONTRACT_SYMBOL } from "@orpc/server";
4
- function eachContractProcedureLeaf(options, callback, result = [], isCurrentRouterContract = false) {
5
- if (!isCurrentRouterContract && ROUTER_CONTRACT_SYMBOL in options.router && options.router[ROUTER_CONTRACT_SYMBOL]) {
6
- return eachContractProcedureLeaf(
7
- {
8
- path: options.path,
9
- router: options.router[ROUTER_CONTRACT_SYMBOL]
10
- },
11
- callback,
12
- result,
13
- true
14
- );
15
- }
16
- if (isLazy(options.router)) {
17
- result.push({
18
- lazy: options.router,
19
- path: options.path
20
- });
21
- } else if (isProcedure(options.router)) {
22
- callback({
23
- contract: options.router.zz$p.contract,
24
- path: options.path
25
- });
26
- } else if (isContractProcedure(options.router)) {
27
- callback({
28
- contract: options.router,
29
- path: options.path
30
- });
31
- } else {
32
- for (const key in options.router) {
33
- eachContractProcedureLeaf(
34
- {
35
- router: options.router[key],
36
- path: [...options.path, key]
37
- },
38
- callback,
39
- result
40
- );
41
- }
42
- }
43
- return result;
44
- }
45
-
46
- export {
47
- eachContractProcedureLeaf
48
- };
49
- //# sourceMappingURL=chunk-KZIT2WCV.js.map
@@ -1,15 +0,0 @@
1
- import type { HTTPPath } from '@orpc/contract';
2
- import type { ANY_LAZY_PROCEDURE, ANY_PROCEDURE, Router } from '@orpc/server';
3
- import type { FetchHandler } from '@orpc/server/fetch';
4
- import type { Router as HonoRouter } from 'hono/router';
5
- export type ResolveRouter = (router: Router<any>, method: string, pathname: string) => Promise<{
6
- path: string[];
7
- procedure: ANY_PROCEDURE | ANY_LAZY_PROCEDURE;
8
- params: Record<string, string>;
9
- } | undefined>;
10
- type Routing = HonoRouter<string[]>;
11
- export declare function createOpenAPIHandler(createHonoRouter: () => Routing): FetchHandler;
12
- export declare function createResolveRouter(createHonoRouter: () => Routing): ResolveRouter;
13
- export declare function openAPIPathToRouterPath(path: HTTPPath): string;
14
- export {};
15
- //# sourceMappingURL=base-handler.d.ts.map
@@ -1,3 +0,0 @@
1
- import type { FetchHandler } from '@orpc/server/fetch';
2
- export declare function createOpenAPIServerHandler(): FetchHandler;
3
- //# sourceMappingURL=server-handler.d.ts.map
@@ -1,3 +0,0 @@
1
- import type { FetchHandler } from '@orpc/server/fetch';
2
- export declare function createOpenAPIServerlessHandler(): FetchHandler;
3
- //# sourceMappingURL=serverless-handler.d.ts.map