@orpc/openapi 0.38.0 → 0.39.0

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.
@@ -417,4 +417,4 @@ export {
417
417
  OpenAPICodec,
418
418
  OpenAPIMatcher
419
419
  };
420
- //# sourceMappingURL=chunk-DRV7KYES.js.map
420
+ //# sourceMappingURL=chunk-MEP42INL.js.map
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  OpenAPICodec,
3
3
  OpenAPIMatcher
4
- } from "./chunk-DRV7KYES.js";
4
+ } from "./chunk-MEP42INL.js";
5
5
 
6
6
  // src/adapters/fetch/openapi-handler.ts
7
- import { fetchRequestToStandardRequest, standardResponseToFetchResponse } from "@orpc/server/fetch";
7
+ import { toFetchResponse, toStandardRequest } from "@orpc/server-standard-fetch";
8
8
  import { StandardHandler } from "@orpc/server/standard";
9
9
  var OpenAPIHandler = class {
10
10
  standardHandler;
@@ -14,14 +14,14 @@ var OpenAPIHandler = class {
14
14
  this.standardHandler = new StandardHandler(router, matcher, codec, options);
15
15
  }
16
16
  async handle(request, ...rest) {
17
- const standardRequest = fetchRequestToStandardRequest(request);
17
+ const standardRequest = toStandardRequest(request);
18
18
  const result = await this.standardHandler.handle(standardRequest, ...rest);
19
19
  if (!result.matched) {
20
20
  return result;
21
21
  }
22
22
  return {
23
23
  matched: true,
24
- response: standardResponseToFetchResponse(result.response)
24
+ response: toFetchResponse(result.response)
25
25
  };
26
26
  }
27
27
  };
@@ -29,4 +29,4 @@ var OpenAPIHandler = class {
29
29
  export {
30
30
  OpenAPIHandler
31
31
  };
32
- //# sourceMappingURL=chunk-NHYWV7BW.js.map
32
+ //# sourceMappingURL=chunk-SE4JDETS.js.map
package/dist/fetch.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  OpenAPIHandler
3
- } from "./chunk-NHYWV7BW.js";
4
- import "./chunk-DRV7KYES.js";
3
+ } from "./chunk-SE4JDETS.js";
4
+ import "./chunk-MEP42INL.js";
5
5
  import "./chunk-HC5PVG4R.js";
6
6
  export {
7
7
  OpenAPIHandler
package/dist/hono.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  OpenAPIHandler
3
- } from "./chunk-NHYWV7BW.js";
4
- import "./chunk-DRV7KYES.js";
3
+ } from "./chunk-SE4JDETS.js";
4
+ import "./chunk-MEP42INL.js";
5
5
  import "./chunk-HC5PVG4R.js";
6
6
  export {
7
7
  OpenAPIHandler
package/dist/next.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  OpenAPIHandler
3
- } from "./chunk-NHYWV7BW.js";
4
- import "./chunk-DRV7KYES.js";
3
+ } from "./chunk-SE4JDETS.js";
4
+ import "./chunk-MEP42INL.js";
5
5
  import "./chunk-HC5PVG4R.js";
6
6
  export {
7
7
  OpenAPIHandler
package/dist/node.js CHANGED
@@ -1,11 +1,11 @@
1
1
  import {
2
2
  OpenAPICodec,
3
3
  OpenAPIMatcher
4
- } from "./chunk-DRV7KYES.js";
4
+ } from "./chunk-MEP42INL.js";
5
5
  import "./chunk-HC5PVG4R.js";
6
6
 
7
7
  // src/adapters/node/openapi-handler.ts
8
- import { nodeHttpResponseSendStandardResponse, nodeHttpToStandardRequest } from "@orpc/server/node";
8
+ import { sendStandardResponse, toStandardRequest } from "@orpc/server-standard-node";
9
9
  import { StandardHandler } from "@orpc/server/standard";
10
10
  var OpenAPIHandler = class {
11
11
  standardHandler;
@@ -15,12 +15,12 @@ var OpenAPIHandler = class {
15
15
  this.standardHandler = new StandardHandler(router, matcher, codec, { ...options });
16
16
  }
17
17
  async handle(req, res, ...rest) {
18
- const standardRequest = nodeHttpToStandardRequest(req, res);
18
+ const standardRequest = toStandardRequest(req, res);
19
19
  const result = await this.standardHandler.handle(standardRequest, ...rest);
20
20
  if (!result.matched) {
21
21
  return { matched: false };
22
22
  }
23
- await nodeHttpResponseSendStandardResponse(res, result.response);
23
+ await sendStandardResponse(res, result.response);
24
24
  return { matched: true };
25
25
  }
26
26
  };
@@ -1,5 +1,6 @@
1
1
  import type { AnyProcedure } from '@orpc/server';
2
- import type { StandardCodec, StandardParams, StandardRequest, StandardResponse } from '@orpc/server/standard';
2
+ import type { StandardRequest, StandardResponse } from '@orpc/server-standard';
3
+ import type { StandardCodec, StandardParams } from '@orpc/server/standard';
3
4
  import { type ORPCError } from '@orpc/contract';
4
5
  import { OpenAPISerializer } from './openapi-serializer';
5
6
  export interface OpenAPICodecOptions {
package/dist/standard.js CHANGED
@@ -3,7 +3,7 @@ import {
3
3
  OpenAPIMatcher,
4
4
  OpenAPISerializer,
5
5
  bracket_notation_exports
6
- } from "./chunk-DRV7KYES.js";
6
+ } from "./chunk-MEP42INL.js";
7
7
  import "./chunk-HC5PVG4R.js";
8
8
  export {
9
9
  bracket_notation_exports as BracketNotation,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@orpc/openapi",
3
3
  "type": "module",
4
- "version": "0.38.0",
4
+ "version": "0.39.0",
5
5
  "license": "MIT",
6
6
  "homepage": "https://orpc.unnoq.com",
7
7
  "repository": {
@@ -54,15 +54,18 @@
54
54
  "dist"
55
55
  ],
56
56
  "dependencies": {
57
+ "@orpc/server-standard": "^0.0.0",
58
+ "@orpc/server-standard-fetch": "^0.0.0",
59
+ "@orpc/server-standard-node": "^0.0.0",
57
60
  "escape-string-regexp": "^5.0.0",
58
61
  "fast-content-type-parse": "^2.0.0",
59
62
  "json-schema-typed": "^8.0.1",
60
63
  "openapi3-ts": "^4.4.0",
61
64
  "rou3": "^0.5.1",
62
65
  "wildcard-match": "^5.1.3",
63
- "@orpc/contract": "0.38.0",
64
- "@orpc/server": "0.38.0",
65
- "@orpc/shared": "0.38.0"
66
+ "@orpc/server": "0.39.0",
67
+ "@orpc/contract": "0.39.0",
68
+ "@orpc/shared": "0.39.0"
66
69
  },
67
70
  "devDependencies": {
68
71
  "@readme/openapi-parser": "^2.6.0",