@orpc/openapi 0.0.0-next.aa57fb6 → 0.0.0-next.aac73c2

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 (35) hide show
  1. package/README.md +104 -0
  2. package/dist/adapters/fetch/index.d.mts +11 -0
  3. package/dist/adapters/fetch/index.d.ts +11 -0
  4. package/dist/adapters/fetch/index.mjs +10 -0
  5. package/dist/adapters/hono/index.d.mts +6 -0
  6. package/dist/adapters/hono/index.d.ts +6 -0
  7. package/dist/adapters/hono/index.mjs +10 -0
  8. package/dist/adapters/next/index.d.mts +6 -0
  9. package/dist/adapters/next/index.d.ts +6 -0
  10. package/dist/adapters/next/index.mjs +10 -0
  11. package/dist/adapters/node/index.d.mts +11 -0
  12. package/dist/adapters/node/index.d.ts +11 -0
  13. package/dist/adapters/node/index.mjs +22 -0
  14. package/dist/adapters/standard/index.d.mts +34 -0
  15. package/dist/adapters/standard/index.d.ts +34 -0
  16. package/dist/adapters/standard/index.mjs +7 -0
  17. package/dist/index.d.mts +113 -0
  18. package/dist/index.d.ts +113 -0
  19. package/dist/index.mjs +523 -0
  20. package/dist/shared/openapi.CGZ7t-VN.mjs +17 -0
  21. package/dist/shared/openapi.IfmmOyba.d.mts +8 -0
  22. package/dist/shared/openapi.IfmmOyba.d.ts +8 -0
  23. package/dist/shared/openapi.sdeu0I7N.mjs +146 -0
  24. package/package.json +36 -22
  25. package/dist/chunk-KZIT2WCV.js +0 -49
  26. package/dist/fetch.js +0 -703
  27. package/dist/index.js +0 -4441
  28. package/dist/src/fetch/base-handler.d.ts +0 -15
  29. package/dist/src/fetch/index.d.ts +0 -4
  30. package/dist/src/fetch/server-handler.d.ts +0 -3
  31. package/dist/src/fetch/serverless-handler.d.ts +0 -3
  32. package/dist/src/generator.d.ts +0 -24
  33. package/dist/src/index.d.ts +0 -3
  34. package/dist/src/utils.d.ts +0 -16
  35. package/dist/src/zod-to-json-schema.d.ts +0 -43
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.aa57fb6",
4
+ "version": "0.0.0-next.aac73c2",
5
5
  "license": "MIT",
6
6
  "homepage": "https://orpc.unnoq.com",
7
7
  "repository": {
@@ -15,41 +15,55 @@
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
+ "./standard": {
23
+ "types": "./dist/adapters/standard/index.d.mts",
24
+ "import": "./dist/adapters/standard/index.mjs",
25
+ "default": "./dist/adapters/standard/index.mjs"
21
26
  },
22
27
  "./fetch": {
23
- "types": "./dist/src/fetch/index.d.ts",
24
- "import": "./dist/fetch.js",
25
- "default": "./dist/fetch.js"
28
+ "types": "./dist/adapters/fetch/index.d.mts",
29
+ "import": "./dist/adapters/fetch/index.mjs",
30
+ "default": "./dist/adapters/fetch/index.mjs"
31
+ },
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"
26
41
  },
27
- "./🔒/*": {
28
- "types": "./dist/src/*.d.ts"
42
+ "./node": {
43
+ "types": "./dist/adapters/node/index.d.mts",
44
+ "import": "./dist/adapters/node/index.mjs",
45
+ "default": "./dist/adapters/node/index.mjs"
29
46
  }
30
47
  },
31
48
  "files": [
32
- "!**/*.map",
33
- "!**/*.tsbuildinfo",
34
49
  "dist"
35
50
  ],
36
51
  "dependencies": {
37
- "escape-string-regexp": "^5.0.0",
38
52
  "json-schema-typed": "^8.0.1",
39
- "openapi3-ts": "^4.4.0",
40
- "@orpc/contract": "0.0.0-next.aa57fb6",
41
- "@orpc/transformer": "0.0.0-next.aa57fb6",
42
- "@orpc/shared": "0.0.0-next.aa57fb6",
43
- "@orpc/server": "0.0.0-next.aa57fb6",
44
- "@orpc/zod": "0.0.0-next.aa57fb6"
53
+ "openapi-types": "^12.1.3",
54
+ "rou3": "^0.5.1",
55
+ "@orpc/client": "0.0.0-next.aac73c2",
56
+ "@orpc/contract": "0.0.0-next.aac73c2",
57
+ "@orpc/openapi-client": "0.0.0-next.aac73c2",
58
+ "@orpc/server": "0.0.0-next.aac73c2",
59
+ "@orpc/shared": "0.0.0-next.aac73c2",
60
+ "@orpc/standard-server": "0.0.0-next.aac73c2"
45
61
  },
46
62
  "devDependencies": {
47
- "@readme/openapi-parser": "^2.6.0",
48
- "hono": "^4.6.12",
49
- "zod": "^3.23.8"
63
+ "zod": "^3.24.2"
50
64
  },
51
65
  "scripts": {
52
- "build": "tsup --clean --sourcemap --entry.index=src/index.ts --entry.fetch=src/fetch/index.ts --format=esm --onSuccess='tsc -b --noCheck'",
66
+ "build": "unbuild",
53
67
  "build:watch": "pnpm run build --watch",
54
68
  "type:check": "tsc -b"
55
69
  }
@@ -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