@orpc/openapi 0.0.0-next.e7ee5a9 → 0.0.0-next.e82d760

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 (36) hide show
  1. package/README.md +28 -20
  2. package/dist/adapters/aws-lambda/index.d.mts +17 -0
  3. package/dist/adapters/aws-lambda/index.d.ts +17 -0
  4. package/dist/adapters/aws-lambda/index.mjs +18 -0
  5. package/dist/adapters/fetch/index.d.mts +12 -9
  6. package/dist/adapters/fetch/index.d.ts +12 -9
  7. package/dist/adapters/fetch/index.mjs +14 -6
  8. package/dist/adapters/node/index.d.mts +12 -9
  9. package/dist/adapters/node/index.d.ts +12 -9
  10. package/dist/adapters/node/index.mjs +9 -20
  11. package/dist/adapters/standard/index.d.mts +22 -11
  12. package/dist/adapters/standard/index.d.ts +22 -11
  13. package/dist/adapters/standard/index.mjs +5 -3
  14. package/dist/index.d.mts +96 -155
  15. package/dist/index.d.ts +96 -155
  16. package/dist/index.mjs +34 -654
  17. package/dist/plugins/index.d.mts +69 -0
  18. package/dist/plugins/index.d.ts +69 -0
  19. package/dist/plugins/index.mjs +108 -0
  20. package/dist/shared/openapi.B3hexduL.d.mts +101 -0
  21. package/dist/shared/openapi.B3hexduL.d.ts +101 -0
  22. package/dist/shared/{openapi.CDsfPHgw.mjs → openapi.C_UtQ8Us.mjs} +61 -30
  23. package/dist/shared/openapi.D3j94c9n.d.mts +12 -0
  24. package/dist/shared/openapi.D3j94c9n.d.ts +12 -0
  25. package/dist/shared/openapi.DrrBsJ0w.mjs +738 -0
  26. package/package.json +19 -22
  27. package/dist/adapters/hono/index.d.mts +0 -7
  28. package/dist/adapters/hono/index.d.ts +0 -7
  29. package/dist/adapters/hono/index.mjs +0 -10
  30. package/dist/adapters/next/index.d.mts +0 -7
  31. package/dist/adapters/next/index.d.ts +0 -7
  32. package/dist/adapters/next/index.mjs +0 -10
  33. package/dist/shared/openapi.BHG_gu5Z.mjs +0 -8
  34. package/dist/shared/openapi.D0VMNR6V.mjs +0 -25
  35. package/dist/shared/openapi.Dz_6xooR.d.mts +0 -7
  36. package/dist/shared/openapi.Dz_6xooR.d.ts +0 -7
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.e7ee5a9",
4
+ "version": "0.0.0-next.e82d760",
5
5
  "license": "MIT",
6
6
  "homepage": "https://orpc.unnoq.com",
7
7
  "repository": {
@@ -19,6 +19,11 @@
19
19
  "import": "./dist/index.mjs",
20
20
  "default": "./dist/index.mjs"
21
21
  },
22
+ "./plugins": {
23
+ "types": "./dist/plugins/index.d.mts",
24
+ "import": "./dist/plugins/index.mjs",
25
+ "default": "./dist/plugins/index.mjs"
26
+ },
22
27
  "./standard": {
23
28
  "types": "./dist/adapters/standard/index.d.mts",
24
29
  "import": "./dist/adapters/standard/index.mjs",
@@ -29,20 +34,15 @@
29
34
  "import": "./dist/adapters/fetch/index.mjs",
30
35
  "default": "./dist/adapters/fetch/index.mjs"
31
36
  },
32
- "./hono": {
33
- "types": "./dist/adapters/hono/index.d.mts",
34
- "import": "./dist/adapters/hono/index.mjs",
35
- "default": "./dist/adapters/hono/index.mjs"
36
- },
37
- "./next": {
38
- "types": "./dist/adapters/next/index.d.mts",
39
- "import": "./dist/adapters/next/index.mjs",
40
- "default": "./dist/adapters/next/index.mjs"
41
- },
42
37
  "./node": {
43
38
  "types": "./dist/adapters/node/index.d.mts",
44
39
  "import": "./dist/adapters/node/index.mjs",
45
40
  "default": "./dist/adapters/node/index.mjs"
41
+ },
42
+ "./aws-lambda": {
43
+ "types": "./dist/adapters/aws-lambda/index.d.mts",
44
+ "import": "./dist/adapters/aws-lambda/index.mjs",
45
+ "default": "./dist/adapters/aws-lambda/index.mjs"
46
46
  }
47
47
  },
48
48
  "files": [
@@ -50,19 +50,16 @@
50
50
  ],
51
51
  "dependencies": {
52
52
  "json-schema-typed": "^8.0.1",
53
- "openapi3-ts": "^4.4.0",
54
- "rou3": "^0.5.1",
55
- "@orpc/contract": "0.0.0-next.e7ee5a9",
56
- "@orpc/openapi-client": "0.0.0-next.e7ee5a9",
57
- "@orpc/client": "0.0.0-next.e7ee5a9",
58
- "@orpc/server": "0.0.0-next.e7ee5a9",
59
- "@orpc/shared": "0.0.0-next.e7ee5a9",
60
- "@orpc/standard-server-fetch": "0.0.0-next.e7ee5a9",
61
- "@orpc/standard-server": "0.0.0-next.e7ee5a9",
62
- "@orpc/standard-server-node": "0.0.0-next.e7ee5a9"
53
+ "rou3": "^0.7.3",
54
+ "@orpc/client": "0.0.0-next.e82d760",
55
+ "@orpc/openapi-client": "0.0.0-next.e82d760",
56
+ "@orpc/contract": "0.0.0-next.e82d760",
57
+ "@orpc/server": "0.0.0-next.e82d760",
58
+ "@orpc/shared": "0.0.0-next.e82d760",
59
+ "@orpc/standard-server": "0.0.0-next.e82d760"
63
60
  },
64
61
  "devDependencies": {
65
- "zod": "^3.24.1"
62
+ "zod": "^3.25.67"
66
63
  },
67
64
  "scripts": {
68
65
  "build": "unbuild",
@@ -1,7 +0,0 @@
1
- export { OpenAPIHandler } from '../fetch/index.mjs';
2
- import '@orpc/server';
3
- import '@orpc/server/fetch';
4
- import '@orpc/server/standard';
5
- import '@orpc/shared';
6
- import '@orpc/standard-server-fetch';
7
- import '../../shared/openapi.Dz_6xooR.mjs';
@@ -1,7 +0,0 @@
1
- export { OpenAPIHandler } from '../fetch/index.js';
2
- import '@orpc/server';
3
- import '@orpc/server/fetch';
4
- import '@orpc/server/standard';
5
- import '@orpc/shared';
6
- import '@orpc/standard-server-fetch';
7
- import '../../shared/openapi.Dz_6xooR.js';
@@ -1,10 +0,0 @@
1
- export { O as OpenAPIHandler } from '../../shared/openapi.D0VMNR6V.mjs';
2
- import '@orpc/server/standard';
3
- import '@orpc/standard-server-fetch';
4
- import '../../shared/openapi.CDsfPHgw.mjs';
5
- import '@orpc/contract';
6
- import '@orpc/openapi-client/standard';
7
- import '@orpc/shared';
8
- import '@orpc/server';
9
- import 'rou3';
10
- import '../../shared/openapi.BHG_gu5Z.mjs';
@@ -1,7 +0,0 @@
1
- export { OpenAPIHandler } from '../fetch/index.mjs';
2
- import '@orpc/server';
3
- import '@orpc/server/fetch';
4
- import '@orpc/server/standard';
5
- import '@orpc/shared';
6
- import '@orpc/standard-server-fetch';
7
- import '../../shared/openapi.Dz_6xooR.mjs';
@@ -1,7 +0,0 @@
1
- export { OpenAPIHandler } from '../fetch/index.js';
2
- import '@orpc/server';
3
- import '@orpc/server/fetch';
4
- import '@orpc/server/standard';
5
- import '@orpc/shared';
6
- import '@orpc/standard-server-fetch';
7
- import '../../shared/openapi.Dz_6xooR.js';
@@ -1,10 +0,0 @@
1
- export { O as OpenAPIHandler } from '../../shared/openapi.D0VMNR6V.mjs';
2
- import '@orpc/server/standard';
3
- import '@orpc/standard-server-fetch';
4
- import '../../shared/openapi.CDsfPHgw.mjs';
5
- import '@orpc/contract';
6
- import '@orpc/openapi-client/standard';
7
- import '@orpc/shared';
8
- import '@orpc/server';
9
- import 'rou3';
10
- import '../../shared/openapi.BHG_gu5Z.mjs';
@@ -1,8 +0,0 @@
1
- function standardizeHTTPPath(path) {
2
- return `/${path.replace(/\/{2,}/g, "/").replace(/^\/|\/$/g, "")}`;
3
- }
4
- function toOpenAPI31RoutePattern(path) {
5
- return standardizeHTTPPath(path).replace(/\{\+([^}]+)\}/g, "{$1}");
6
- }
7
-
8
- export { standardizeHTTPPath as s, toOpenAPI31RoutePattern as t };
@@ -1,25 +0,0 @@
1
- import { StandardHandler } from '@orpc/server/standard';
2
- import { toStandardRequest, toFetchResponse } from '@orpc/standard-server-fetch';
3
- import { a as OpenAPIMatcher, O as OpenAPICodec } from './openapi.CDsfPHgw.mjs';
4
-
5
- class OpenAPIHandler {
6
- standardHandler;
7
- constructor(router, options) {
8
- const matcher = options?.matcher ?? new OpenAPIMatcher();
9
- const codec = options?.codec ?? new OpenAPICodec();
10
- this.standardHandler = new StandardHandler(router, matcher, codec, options);
11
- }
12
- async handle(request, ...[options]) {
13
- const standardRequest = toStandardRequest(request);
14
- const result = await this.standardHandler.handle(standardRequest, options);
15
- if (!result.matched) {
16
- return result;
17
- }
18
- return {
19
- matched: true,
20
- response: toFetchResponse(result.response, options)
21
- };
22
- }
23
- }
24
-
25
- export { OpenAPIHandler as O };
@@ -1,7 +0,0 @@
1
- import { Context } from '@orpc/server';
2
- import { RPCHandlerOptions } from '@orpc/server/standard';
3
-
4
- interface OpenAPIHandlerOptions<T extends Context> extends RPCHandlerOptions<T> {
5
- }
6
-
7
- export type { OpenAPIHandlerOptions as O };
@@ -1,7 +0,0 @@
1
- import { Context } from '@orpc/server';
2
- import { RPCHandlerOptions } from '@orpc/server/standard';
3
-
4
- interface OpenAPIHandlerOptions<T extends Context> extends RPCHandlerOptions<T> {
5
- }
6
-
7
- export type { OpenAPIHandlerOptions as O };