@orpc/openapi 0.0.0-next.ee0aeaf → 0.0.0-next.ee5598c

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 (37) hide show
  1. package/README.md +99 -0
  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/shared/openapi.-sXpEIAO.mjs +179 -0
  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 +35 -23
  27. package/dist/chunk-7HD5IZWG.js +0 -53
  28. package/dist/fetch.js +0 -707
  29. package/dist/index.js +0 -4585
  30. package/dist/src/fetch/base-handler.d.ts +0 -13
  31. package/dist/src/fetch/index.d.ts +0 -4
  32. package/dist/src/fetch/server-handler.d.ts +0 -3
  33. package/dist/src/fetch/serverless-handler.d.ts +0 -3
  34. package/dist/src/generator.d.ts +0 -24
  35. package/dist/src/index.d.ts +0 -3
  36. package/dist/src/utils.d.ts +0 -17
  37. 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.ee0aeaf",
4
+ "version": "0.0.0-next.ee5598c",
5
5
  "license": "MIT",
6
6
  "homepage": "https://orpc.unnoq.com",
7
7
  "repository": {
@@ -15,42 +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"
26
+ },
27
+ "./standard": {
28
+ "types": "./dist/adapters/standard/index.d.mts",
29
+ "import": "./dist/adapters/standard/index.mjs",
30
+ "default": "./dist/adapters/standard/index.mjs"
21
31
  },
22
32
  "./fetch": {
23
- "types": "./dist/src/fetch/index.d.ts",
24
- "import": "./dist/fetch.js",
25
- "default": "./dist/fetch.js"
33
+ "types": "./dist/adapters/fetch/index.d.mts",
34
+ "import": "./dist/adapters/fetch/index.mjs",
35
+ "default": "./dist/adapters/fetch/index.mjs"
36
+ },
37
+ "./node": {
38
+ "types": "./dist/adapters/node/index.d.mts",
39
+ "import": "./dist/adapters/node/index.mjs",
40
+ "default": "./dist/adapters/node/index.mjs"
26
41
  },
27
- "./🔒/*": {
28
- "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"
29
46
  }
30
47
  },
31
48
  "files": [
32
- "!**/*.map",
33
- "!**/*.tsbuildinfo",
34
49
  "dist"
35
50
  ],
36
51
  "dependencies": {
37
- "@standard-schema/spec": "1.0.0-beta.4",
38
- "escape-string-regexp": "^5.0.0",
39
52
  "json-schema-typed": "^8.0.1",
40
- "openapi3-ts": "^4.4.0",
41
- "@orpc/contract": "0.0.0-next.ee0aeaf",
42
- "@orpc/server": "0.0.0-next.ee0aeaf",
43
- "@orpc/transformer": "0.0.0-next.ee0aeaf",
44
- "@orpc/zod": "0.0.0-next.ee0aeaf",
45
- "@orpc/shared": "0.0.0-next.ee0aeaf"
53
+ "rou3": "^0.7.3",
54
+ "@orpc/client": "0.0.0-next.ee5598c",
55
+ "@orpc/contract": "0.0.0-next.ee5598c",
56
+ "@orpc/openapi-client": "0.0.0-next.ee5598c",
57
+ "@orpc/server": "0.0.0-next.ee5598c",
58
+ "@orpc/shared": "0.0.0-next.ee5598c",
59
+ "@orpc/standard-server": "0.0.0-next.ee5598c"
46
60
  },
47
61
  "devDependencies": {
48
- "@readme/openapi-parser": "^2.6.0",
49
- "hono": "^4.6.12",
50
- "zod": "^3.24.1"
62
+ "zod": "^3.25.76"
51
63
  },
52
64
  "scripts": {
53
- "build": "tsup --clean --sourcemap --entry.index=src/index.ts --entry.fetch=src/fetch/index.ts --format=esm --onSuccess='tsc -b --noCheck'",
65
+ "build": "unbuild",
54
66
  "build:watch": "pnpm run build --watch",
55
67
  "type:check": "tsc -b"
56
68
  }
@@ -1,53 +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
- function standardizeHTTPPath(path) {
46
- return `/${path.replace(/\/{2,}/g, "/").replace(/^\/|\/$/g, "")}`;
47
- }
48
-
49
- export {
50
- eachContractProcedureLeaf,
51
- standardizeHTTPPath
52
- };
53
- //# sourceMappingURL=chunk-7HD5IZWG.js.map