@orpc/zod 0.0.0-next.9b9ade5 → 0.0.0-next.9d7bfaa

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.
package/README.md CHANGED
@@ -21,28 +21,24 @@
21
21
 
22
22
  <h3 align="center">Typesafe APIs Made Simple 🪄</h3>
23
23
 
24
- **oRPC is a powerful combination of RPC and OpenAPI**, makes it easy to build APIs that are end-to-end type-safe and adhere to OpenAPI standards, ensuring a smooth and enjoyable developer experience.
24
+ **oRPC is a powerful combination of RPC and OpenAPI**, makes it easy to build APIs that are end-to-end type-safe and adhere to OpenAPI standards
25
25
 
26
26
  ---
27
27
 
28
28
  ## Highlights
29
29
 
30
- - **End-to-End Type Safety 🔒**: Ensure complete type safety from inputs to outputs and errors, bridging server and client seamlessly.
31
- - **First-Class OpenAPI 📄**: Adheres to the OpenAPI standard out of the box, ensuring seamless integration and comprehensive API documentation.
32
- - **Contract-First Development 📜**: (Optional) Define your API contract upfront and implement it with confidence.
33
- - **Exceptional Developer Experience ✨**: Enjoy a streamlined workflow with robust typing and clear, in-code documentation.
34
- - **Multi-Runtime Support 🌍**: Run your code seamlessly on Cloudflare, Deno, Bun, Node.js, and more.
35
- - **Framework Integrations 🧩**: Supports Tanstack Query (React, Vue, Solid), Pinia Colada, and more.
36
- - **Server Actions ⚡️**: Fully compatible with React Server Actions on Next.js, TanStack Start, and more.
37
- - **Standard Schema Support 🗂️**: Effortlessly work with Zod, Valibot, ArkType, and others right out of the box.
38
- - **Fast & Lightweight 💨**: Built on native APIs across all runtimes – optimized for speed and efficiency.
39
- - **Native Types 📦**: Enjoy built-in support for Date, File, Blob, BigInt, URL and more with no extra setup.
40
- - **Lazy Router ⏱️**: Improve cold start times with our lazy routing feature.
41
- - **SSE & Streaming 📡**: Provides SSE and streaming features – perfect for real-time notifications and AI-powered streaming responses.
42
- - **Reusability 🔄**: Write once and reuse your code across multiple purposes effortlessly.
43
- - **Extendability 🔌**: Easily enhance oRPC with plugins, middleware, and interceptors.
44
- - **Reliability 🛡️**: Well-tested, fully TypeScript, production-ready, and MIT licensed for peace of mind.
45
- - **Simplicity 💡**: Enjoy straightforward, clean code with no hidden magic.
30
+ - **🔗 End-to-End Type Safety**: Ensure type-safe inputs, outputs, and errors from client to server.
31
+ - **📘 First-Class OpenAPI**: Built-in support that fully adheres to the OpenAPI standard.
32
+ - **📝 Contract-First Development**: Optionally define your API contract before implementation.
33
+ - **⚙️ Framework Integrations**: Seamlessly integrate with TanStack Query (React, Vue, Solid, Svelte), Pinia Colada, and more.
34
+ - **🚀 Server Actions**: Fully compatible with React Server Actions on Next.js, TanStack Start, and other platforms.
35
+ - **🔠 Standard Schema Support**: Works out of the box with Zod, Valibot, ArkType, and other schema validators.
36
+ - **🗃️ Native Types**: Supports native types like Date, File, Blob, BigInt, URL, and more.
37
+ - **⏱️ Lazy Router**: Enhance cold start times with our lazy routing feature.
38
+ - **📡 SSE & Streaming**: Enjoy full type-safe support for SSE and streaming.
39
+ - **🌍 Multi-Runtime Support**: Fast and lightweight on Cloudflare, Deno, Bun, Node.js, and beyond.
40
+ - **🔌 Extendability**: Easily extend functionality with plugins, middleware, and interceptors.
41
+ - **🛡️ Reliability**: Well-tested, TypeScript-based, production-ready, and MIT licensed.
46
42
 
47
43
  ## Documentation
48
44
 
@@ -53,12 +49,16 @@ You can find the full documentation [here](https://orpc.unnoq.com).
53
49
  - [@orpc/contract](https://www.npmjs.com/package/@orpc/contract): Build your API contract.
54
50
  - [@orpc/server](https://www.npmjs.com/package/@orpc/server): Build your API or implement API contract.
55
51
  - [@orpc/client](https://www.npmjs.com/package/@orpc/client): Consume your API on the client with type-safety.
52
+ - [@orpc/react](https://www.npmjs.com/package/@orpc/react): Utilities for integrating oRPC with React and React Server Actions.
56
53
  - [@orpc/react-query](https://www.npmjs.com/package/@orpc/react-query): Integration with [React Query](https://tanstack.com/query/latest/docs/framework/react/overview).
57
54
  - [@orpc/vue-query](https://www.npmjs.com/package/@orpc/vue-query): Integration with [Vue Query](https://tanstack.com/query/latest/docs/framework/vue/overview).
58
55
  - [@orpc/solid-query](https://www.npmjs.com/package/@orpc/solid-query): Integration with [Solid Query](https://tanstack.com/query/latest/docs/framework/solid/overview).
56
+ - [@orpc/svelte-query](https://www.npmjs.com/package/@orpc/svelte-query): Integration with [Svelte Query](https://tanstack.com/query/latest/docs/framework/svelte/overview).
59
57
  - [@orpc/vue-colada](https://www.npmjs.com/package/@orpc/vue-colada): Integration with [Pinia Colada](https://pinia-colada.esm.dev/).
60
58
  - [@orpc/openapi](https://www.npmjs.com/package/@orpc/openapi): Generate OpenAPI specs and handle OpenAPI requests.
61
59
  - [@orpc/zod](https://www.npmjs.com/package/@orpc/zod): More schemas that [Zod](https://zod.dev/) doesn't support yet.
60
+ - [@orpc/valibot](https://www.npmjs.com/package/@orpc/valibot): OpenAPI spec generation from [Valibot](https://valibot.dev/).
61
+ - [@orpc/arktype](https://www.npmjs.com/package/@orpc/arktype): OpenAPI spec generation from [ArkType](https://arktype.io/).
62
62
 
63
63
  ## `@orpc/zod`
64
64
 
@@ -128,6 +128,14 @@ const InputSchema = oz.openapi(
128
128
  )
129
129
  ```
130
130
 
131
+ ## Sponsors
132
+
133
+ <p align="center">
134
+ <a href="https://cdn.jsdelivr.net/gh/unnoq/unnoq/sponsors.svg">
135
+ <img src='https://cdn.jsdelivr.net/gh/unnoq/unnoq/sponsors.svg'/>
136
+ </a>
137
+ </p>
138
+
131
139
  ## License
132
140
 
133
141
  Distributed under the MIT License. See [LICENSE](https://github.com/unnoq/orpc/blob/main/LICENSE) for more information.
package/dist/index.d.mts CHANGED
@@ -1,8 +1,7 @@
1
1
  import { JSONSchema, ConditionalSchemaConverter, SchemaConvertOptions } from '@orpc/openapi';
2
2
  import { ZodTypeAny, input, output, ZodTypeDef, CustomErrorParams, ZodType, ZodEffects } from 'zod';
3
3
  import { Context } from '@orpc/server';
4
- import { HandlerPlugin } from '@orpc/server/plugins';
5
- import { StandardHandlerOptions } from '@orpc/server/standard';
4
+ import { StandardHandlerPlugin, StandardHandlerOptions } from '@orpc/server/standard';
6
5
  import { AnySchema } from '@orpc/contract';
7
6
 
8
7
  declare function getCustomJsonSchema(def: ZodTypeDef, options: {
@@ -35,7 +34,7 @@ declare function regexp(params?: string | CustomParams | ((input: unknown) => Cu
35
34
 
36
35
  declare function url(params?: string | CustomParams | ((input: unknown) => CustomParams)): ZodType<URL, ZodTypeDef, URL>;
37
36
 
38
- declare class ZodSmartCoercionPlugin<TContext extends Context> implements HandlerPlugin<TContext> {
37
+ declare class ZodSmartCoercionPlugin<TContext extends Context> implements StandardHandlerPlugin<TContext> {
39
38
  init(options: StandardHandlerOptions<TContext>): void;
40
39
  }
41
40
 
@@ -79,4 +78,5 @@ declare const oz: {
79
78
  openapi: typeof customJsonSchema;
80
79
  };
81
80
 
82
- export { type CustomParams, type CustomZodDef, ZodSmartCoercionPlugin, ZodToJsonSchemaConverter, type ZodToJsonSchemaOptions, blob, composeParams, customJsonSchema, file, getCustomJsonSchema, getCustomZodDef, oz, regexp, setCustomZodDef, url };
81
+ export { ZodSmartCoercionPlugin, ZodToJsonSchemaConverter, blob, composeParams, customJsonSchema, file, getCustomJsonSchema, getCustomZodDef, oz, regexp, setCustomZodDef, url };
82
+ export type { CustomParams, CustomZodDef, ZodToJsonSchemaOptions };
package/dist/index.d.ts CHANGED
@@ -1,8 +1,7 @@
1
1
  import { JSONSchema, ConditionalSchemaConverter, SchemaConvertOptions } from '@orpc/openapi';
2
2
  import { ZodTypeAny, input, output, ZodTypeDef, CustomErrorParams, ZodType, ZodEffects } from 'zod';
3
3
  import { Context } from '@orpc/server';
4
- import { HandlerPlugin } from '@orpc/server/plugins';
5
- import { StandardHandlerOptions } from '@orpc/server/standard';
4
+ import { StandardHandlerPlugin, StandardHandlerOptions } from '@orpc/server/standard';
6
5
  import { AnySchema } from '@orpc/contract';
7
6
 
8
7
  declare function getCustomJsonSchema(def: ZodTypeDef, options: {
@@ -35,7 +34,7 @@ declare function regexp(params?: string | CustomParams | ((input: unknown) => Cu
35
34
 
36
35
  declare function url(params?: string | CustomParams | ((input: unknown) => CustomParams)): ZodType<URL, ZodTypeDef, URL>;
37
36
 
38
- declare class ZodSmartCoercionPlugin<TContext extends Context> implements HandlerPlugin<TContext> {
37
+ declare class ZodSmartCoercionPlugin<TContext extends Context> implements StandardHandlerPlugin<TContext> {
39
38
  init(options: StandardHandlerOptions<TContext>): void;
40
39
  }
41
40
 
@@ -79,4 +78,5 @@ declare const oz: {
79
78
  openapi: typeof customJsonSchema;
80
79
  };
81
80
 
82
- export { type CustomParams, type CustomZodDef, ZodSmartCoercionPlugin, ZodToJsonSchemaConverter, type ZodToJsonSchemaOptions, blob, composeParams, customJsonSchema, file, getCustomJsonSchema, getCustomZodDef, oz, regexp, setCustomZodDef, url };
81
+ export { ZodSmartCoercionPlugin, ZodToJsonSchemaConverter, blob, composeParams, customJsonSchema, file, getCustomJsonSchema, getCustomZodDef, oz, regexp, setCustomZodDef, url };
82
+ export type { CustomParams, CustomZodDef, ZodToJsonSchemaOptions };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@orpc/zod",
3
3
  "type": "module",
4
- "version": "0.0.0-next.9b9ade5",
4
+ "version": "0.0.0-next.9d7bfaa",
5
5
  "license": "MIT",
6
6
  "homepage": "https://orpc.unnoq.com",
7
7
  "repository": {
@@ -24,18 +24,18 @@
24
24
  "dist"
25
25
  ],
26
26
  "peerDependencies": {
27
- "@orpc/contract": "0.0.0-next.9b9ade5",
28
- "@orpc/server": "0.0.0-next.9b9ade5"
27
+ "zod": "^3.24.2",
28
+ "@orpc/contract": "0.0.0-next.9d7bfaa",
29
+ "@orpc/server": "0.0.0-next.9d7bfaa"
29
30
  },
30
31
  "dependencies": {
31
32
  "escape-string-regexp": "^5.0.0",
32
33
  "wildcard-match": "^5.1.3",
33
- "zod": "^3.24.2",
34
- "@orpc/openapi": "0.0.0-next.9b9ade5",
35
- "@orpc/shared": "0.0.0-next.9b9ade5"
34
+ "@orpc/openapi": "0.0.0-next.9d7bfaa",
35
+ "@orpc/shared": "0.0.0-next.9d7bfaa"
36
36
  },
37
37
  "devDependencies": {
38
- "zod-to-json-schema": "^3.24.3"
38
+ "zod-to-json-schema": "^3.24.5"
39
39
  },
40
40
  "scripts": {
41
41
  "build": "unbuild",