@orpc/openapi 0.0.0-next.f17a1a0 → 0.0.0-next.f356b86

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 (58) hide show
  1. package/README.md +29 -21
  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 +17 -0
  6. package/dist/adapters/fetch/index.d.ts +17 -0
  7. package/dist/adapters/fetch/index.mjs +18 -0
  8. package/dist/adapters/node/index.d.mts +17 -0
  9. package/dist/adapters/node/index.d.ts +17 -0
  10. package/dist/adapters/node/index.mjs +18 -0
  11. package/dist/adapters/standard/index.d.mts +35 -0
  12. package/dist/adapters/standard/index.d.ts +35 -0
  13. package/dist/adapters/standard/index.mjs +9 -0
  14. package/dist/index.d.mts +110 -0
  15. package/dist/index.d.ts +110 -0
  16. package/dist/index.mjs +41 -0
  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/{chunk-PGCWJMRO.js → shared/openapi.-sXpEIAO.mjs} +65 -43
  21. package/dist/shared/openapi.8DHd5bRK.d.mts +101 -0
  22. package/dist/shared/openapi.8DHd5bRK.d.ts +101 -0
  23. package/dist/shared/openapi.BWrlhfev.d.mts +12 -0
  24. package/dist/shared/openapi.BWrlhfev.d.ts +12 -0
  25. package/dist/shared/openapi.DrrBsJ0w.mjs +738 -0
  26. package/package.json +31 -38
  27. package/dist/chunk-ATDLVTJE.js +0 -32
  28. package/dist/chunk-XGHV4TH3.js +0 -13
  29. package/dist/fetch.js +0 -9
  30. package/dist/hono.js +0 -9
  31. package/dist/index.js +0 -701
  32. package/dist/next.js +0 -9
  33. package/dist/node.js +0 -30
  34. package/dist/src/adapters/fetch/index.d.ts +0 -2
  35. package/dist/src/adapters/fetch/openapi-handler.d.ts +0 -11
  36. package/dist/src/adapters/hono/index.d.ts +0 -2
  37. package/dist/src/adapters/next/index.d.ts +0 -2
  38. package/dist/src/adapters/node/index.d.ts +0 -2
  39. package/dist/src/adapters/node/openapi-handler.d.ts +0 -11
  40. package/dist/src/adapters/standard/index.d.ts +0 -4
  41. package/dist/src/adapters/standard/openapi-codec.d.ts +0 -13
  42. package/dist/src/adapters/standard/openapi-handler.d.ts +0 -5
  43. package/dist/src/adapters/standard/openapi-matcher.d.ts +0 -10
  44. package/dist/src/index.d.ts +0 -16
  45. package/dist/src/openapi-content-builder.d.ts +0 -10
  46. package/dist/src/openapi-error.d.ts +0 -3
  47. package/dist/src/openapi-generator.d.ts +0 -67
  48. package/dist/src/openapi-input-structure-parser.d.ts +0 -22
  49. package/dist/src/openapi-operation-extender.d.ts +0 -7
  50. package/dist/src/openapi-output-structure-parser.d.ts +0 -18
  51. package/dist/src/openapi-parameters-builder.d.ts +0 -12
  52. package/dist/src/openapi-path-parser.d.ts +0 -8
  53. package/dist/src/openapi.d.ts +0 -3
  54. package/dist/src/schema-converter.d.ts +0 -16
  55. package/dist/src/schema-utils.d.ts +0 -11
  56. package/dist/src/schema.d.ts +0 -12
  57. package/dist/src/utils.d.ts +0 -4
  58. package/dist/standard.js +0 -10
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.f17a1a0",
4
+ "version": "0.0.0-next.f356b86",
5
5
  "license": "MIT",
6
6
  "homepage": "https://orpc.unnoq.com",
7
7
  "repository": {
@@ -15,61 +15,54 @@
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
+ },
22
+ "./plugins": {
23
+ "types": "./dist/plugins/index.d.mts",
24
+ "import": "./dist/plugins/index.mjs",
25
+ "default": "./dist/plugins/index.mjs"
21
26
  },
22
27
  "./standard": {
23
- "types": "./dist/src/adapters/standard/index.d.ts",
24
- "import": "./dist/standard.js",
25
- "default": "./dist/standard.js"
28
+ "types": "./dist/adapters/standard/index.d.mts",
29
+ "import": "./dist/adapters/standard/index.mjs",
30
+ "default": "./dist/adapters/standard/index.mjs"
26
31
  },
27
32
  "./fetch": {
28
- "types": "./dist/src/adapters/fetch/index.d.ts",
29
- "import": "./dist/fetch.js",
30
- "default": "./dist/fetch.js"
31
- },
32
- "./hono": {
33
- "types": "./dist/src/adapters/hono/index.d.ts",
34
- "import": "./dist/hono.js",
35
- "default": "./dist/hono.js"
36
- },
37
- "./next": {
38
- "types": "./dist/src/adapters/next/index.d.ts",
39
- "import": "./dist/next.js",
40
- "default": "./dist/next.js"
33
+ "types": "./dist/adapters/fetch/index.d.mts",
34
+ "import": "./dist/adapters/fetch/index.mjs",
35
+ "default": "./dist/adapters/fetch/index.mjs"
41
36
  },
42
37
  "./node": {
43
- "types": "./dist/src/adapters/node/index.d.ts",
44
- "import": "./dist/node.js",
45
- "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"
46
41
  },
47
- "./🔒/*": {
48
- "types": "./dist/src/*.d.ts"
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"
49
46
  }
50
47
  },
51
48
  "files": [
52
- "!**/*.map",
53
- "!**/*.tsbuildinfo",
54
49
  "dist"
55
50
  ],
56
51
  "dependencies": {
57
- "@orpc/server-standard": "^0.4.0",
58
- "@orpc/server-standard-fetch": "^0.4.0",
59
- "@orpc/server-standard-node": "^0.4.0",
60
52
  "json-schema-typed": "^8.0.1",
61
- "openapi3-ts": "^4.4.0",
62
- "rou3": "^0.5.1",
63
- "@orpc/client": "0.0.0-next.f17a1a0",
64
- "@orpc/contract": "0.0.0-next.f17a1a0",
65
- "@orpc/server": "0.0.0-next.f17a1a0",
66
- "@orpc/shared": "0.0.0-next.f17a1a0"
53
+ "rou3": "^0.7.3",
54
+ "@orpc/client": "0.0.0-next.f356b86",
55
+ "@orpc/server": "0.0.0-next.f356b86",
56
+ "@orpc/openapi-client": "0.0.0-next.f356b86",
57
+ "@orpc/shared": "0.0.0-next.f356b86",
58
+ "@orpc/contract": "0.0.0-next.f356b86",
59
+ "@orpc/standard-server": "0.0.0-next.f356b86"
67
60
  },
68
61
  "devDependencies": {
69
- "zod": "^3.24.1"
62
+ "zod": "^3.25.76"
70
63
  },
71
64
  "scripts": {
72
- "build": "tsup --onSuccess='tsc -b --noCheck'",
65
+ "build": "unbuild",
73
66
  "build:watch": "pnpm run build --watch",
74
67
  "type:check": "tsc -b"
75
68
  }
@@ -1,32 +0,0 @@
1
- import {
2
- OpenAPICodec,
3
- OpenAPIMatcher
4
- } from "./chunk-PGCWJMRO.js";
5
-
6
- // src/adapters/fetch/openapi-handler.ts
7
- import { toFetchResponse, toStandardRequest } from "@orpc/server-standard-fetch";
8
- import { StandardHandler } from "@orpc/server/standard";
9
- var OpenAPIHandler = class {
10
- standardHandler;
11
- constructor(router, options) {
12
- const matcher = options?.matcher ?? new OpenAPIMatcher();
13
- const codec = options?.codec ?? new OpenAPICodec();
14
- this.standardHandler = new StandardHandler(router, matcher, codec, options);
15
- }
16
- async handle(request, ...rest) {
17
- const standardRequest = toStandardRequest(request);
18
- const result = await this.standardHandler.handle(standardRequest, ...rest);
19
- if (!result.matched) {
20
- return result;
21
- }
22
- return {
23
- matched: true,
24
- response: toFetchResponse(result.response)
25
- };
26
- }
27
- };
28
-
29
- export {
30
- OpenAPIHandler
31
- };
32
- //# sourceMappingURL=chunk-ATDLVTJE.js.map
@@ -1,13 +0,0 @@
1
- // src/utils.ts
2
- function standardizeHTTPPath(path) {
3
- return `/${path.replace(/\/{2,}/g, "/").replace(/^\/|\/$/g, "")}`;
4
- }
5
- function toOpenAPI31RoutePattern(path) {
6
- return standardizeHTTPPath(path).replace(/\{\+([^}]+)\}/g, "{$1}");
7
- }
8
-
9
- export {
10
- standardizeHTTPPath,
11
- toOpenAPI31RoutePattern
12
- };
13
- //# sourceMappingURL=chunk-XGHV4TH3.js.map
package/dist/fetch.js DELETED
@@ -1,9 +0,0 @@
1
- import {
2
- OpenAPIHandler
3
- } from "./chunk-ATDLVTJE.js";
4
- import "./chunk-PGCWJMRO.js";
5
- import "./chunk-XGHV4TH3.js";
6
- export {
7
- OpenAPIHandler
8
- };
9
- //# sourceMappingURL=fetch.js.map
package/dist/hono.js DELETED
@@ -1,9 +0,0 @@
1
- import {
2
- OpenAPIHandler
3
- } from "./chunk-ATDLVTJE.js";
4
- import "./chunk-PGCWJMRO.js";
5
- import "./chunk-XGHV4TH3.js";
6
- export {
7
- OpenAPIHandler
8
- };
9
- //# sourceMappingURL=hono.js.map