@orpc/json-schema 0.0.0-next.a15ca72 → 0.0.0-next.a16ca72

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
@@ -1,22 +1,25 @@
1
1
  <div align="center">
2
- <image align="center" src="https://orpc.unnoq.com/logo.webp" width=280 alt="oRPC logo" />
2
+ <image align="center" src="https://orpc.dev/logo.webp" width=280 alt="oRPC logo" />
3
3
  </div>
4
4
 
5
5
  <h1></h1>
6
6
 
7
7
  <div align="center">
8
- <a href="https://codecov.io/gh/unnoq/orpc">
9
- <img alt="codecov" src="https://codecov.io/gh/unnoq/orpc/branch/main/graph/badge.svg">
8
+ <a href="https://codecov.io/gh/middleapi/orpc">
9
+ <img alt="codecov" src="https://codecov.io/gh/middleapi/orpc/branch/main/graph/badge.svg">
10
10
  </a>
11
11
  <a href="https://www.npmjs.com/package/@orpc/json-schema">
12
12
  <img alt="weekly downloads" src="https://img.shields.io/npm/dw/%40orpc%2Fjson-schema?logo=npm" />
13
13
  </a>
14
- <a href="https://github.com/unnoq/orpc/blob/main/LICENSE">
15
- <img alt="MIT License" src="https://img.shields.io/github/license/unnoq/orpc?logo=open-source-initiative" />
14
+ <a href="https://github.com/middleapi/orpc/blob/main/LICENSE">
15
+ <img alt="MIT License" src="https://img.shields.io/github/license/middleapi/orpc?logo=open-source-initiative" />
16
16
  </a>
17
17
  <a href="https://discord.gg/TXEbwRBvQn">
18
18
  <img alt="Discord" src="https://img.shields.io/discord/1308966753044398161?color=7389D8&label&logo=discord&logoColor=ffffff" />
19
19
  </a>
20
+ <a href="https://deepwiki.com/middleapi/orpc">
21
+ <img src="https://deepwiki.com/badge.svg" alt="Ask DeepWiki">
22
+ </a>
20
23
  </div>
21
24
 
22
25
  <h3 align="center">Typesafe APIs Made Simple 🪄</h3>
@@ -30,7 +33,8 @@
30
33
  - **🔗 End-to-End Type Safety**: Ensure type-safe inputs, outputs, and errors from client to server.
31
34
  - **📘 First-Class OpenAPI**: Built-in support that fully adheres to the OpenAPI standard.
32
35
  - **📝 Contract-First Development**: Optionally define your API contract before implementation.
33
- - **⚙️ Framework Integrations**: Seamlessly integrate with TanStack Query (React, Vue, Solid, Svelte, Angular), Pinia Colada, and more.
36
+ - **🔍 First-Class OpenTelemetry**: Seamlessly integrate with OpenTelemetry for observability.
37
+ - **⚙️ Framework Integrations**: Seamlessly integrate with TanStack Query (React, Vue, Solid, Svelte, Angular), SWR, Pinia Colada, and more.
34
38
  - **🚀 Server Actions**: Fully compatible with React Server Actions on Next.js, TanStack Start, and other platforms.
35
39
  - **🔠 Standard Schema Support**: Works out of the box with Zod, Valibot, ArkType, and other schema validators.
36
40
  - **🗃️ Native Types**: Supports native types like Date, File, Blob, BigInt, URL, and more.
@@ -38,11 +42,10 @@
38
42
  - **📡 SSE & Streaming**: Enjoy full type-safe support for SSE and streaming.
39
43
  - **🌍 Multi-Runtime Support**: Fast and lightweight on Cloudflare, Deno, Bun, Node.js, and beyond.
40
44
  - **🔌 Extendability**: Easily extend functionality with plugins, middleware, and interceptors.
41
- - **🛡️ Reliability**: Well-tested, TypeScript-based, production-ready, and MIT licensed.
42
45
 
43
46
  ## Documentation
44
47
 
45
- You can find the full documentation [here](https://orpc.unnoq.com).
48
+ You can find the full documentation [here](https://orpc.dev).
46
49
 
47
50
  ## Packages
48
51
 
@@ -50,9 +53,11 @@ You can find the full documentation [here](https://orpc.unnoq.com).
50
53
  - [@orpc/server](https://www.npmjs.com/package/@orpc/server): Build your API or implement API contract.
51
54
  - [@orpc/client](https://www.npmjs.com/package/@orpc/client): Consume your API on the client with type-safety.
52
55
  - [@orpc/openapi](https://www.npmjs.com/package/@orpc/openapi): Generate OpenAPI specs and handle OpenAPI requests.
56
+ - [@orpc/otel](https://www.npmjs.com/package/@orpc/otel): [OpenTelemetry](https://opentelemetry.io/) integration for observability.
53
57
  - [@orpc/nest](https://www.npmjs.com/package/@orpc/nest): Deeply integrate oRPC with [NestJS](https://nestjs.com/).
54
58
  - [@orpc/react](https://www.npmjs.com/package/@orpc/react): Utilities for integrating oRPC with React and React Server Actions.
55
59
  - [@orpc/tanstack-query](https://www.npmjs.com/package/@orpc/tanstack-query): [TanStack Query](https://tanstack.com/query/latest) integration.
60
+ - [@orpc/experimental-react-swr](https://www.npmjs.com/package/@orpc/experimental-react-swr): [SWR](https://swr.vercel.app/) integration.
56
61
  - [@orpc/vue-colada](https://www.npmjs.com/package/@orpc/vue-colada): Integration with [Pinia Colada](https://pinia-colada.esm.dev/).
57
62
  - [@orpc/hey-api](https://www.npmjs.com/package/@orpc/hey-api): [Hey API](https://heyapi.dev/) integration.
58
63
  - [@orpc/zod](https://www.npmjs.com/package/@orpc/zod): More schemas that [Zod](https://zod.dev/) doesn't support yet.
@@ -73,4 +78,4 @@ Json Schema related utilities for oRPC.
73
78
 
74
79
  ## License
75
80
 
76
- Distributed under the MIT License. See [LICENSE](https://github.com/unnoq/orpc/blob/main/LICENSE) for more information.
81
+ Distributed under the MIT License. See [LICENSE](https://github.com/middleapi/orpc/blob/main/LICENSE) for more information.
package/dist/index.d.mts CHANGED
@@ -15,25 +15,25 @@ declare enum JsonSchemaXNativeType {
15
15
  Map = "map"
16
16
  }
17
17
 
18
- interface experimental_JsonSchemaCoerceOptions {
18
+ interface JsonSchemaCoerceOptions {
19
19
  components?: Record<string, JsonSchema>;
20
20
  }
21
- declare class experimental_JsonSchemaCoercer {
21
+ declare class JsonSchemaCoercer {
22
22
  #private;
23
- coerce(schema: JsonSchema, value: unknown, options?: experimental_JsonSchemaCoerceOptions): unknown;
23
+ coerce(schema: JsonSchema, value: unknown, options?: JsonSchemaCoerceOptions): unknown;
24
24
  }
25
25
 
26
- interface experimental_SmartCoercionPluginOptions {
26
+ interface SmartCoercionPluginOptions {
27
27
  schemaConverters?: readonly ConditionalSchemaConverter[];
28
28
  }
29
- declare class experimental_SmartCoercionPlugin<T extends Context> implements StandardHandlerPlugin<T> {
29
+ declare class SmartCoercionPlugin<T extends Context> implements StandardHandlerPlugin<T> {
30
30
  #private;
31
31
  private readonly converter;
32
32
  private readonly coercer;
33
33
  private readonly cache;
34
- constructor(options?: experimental_SmartCoercionPluginOptions);
34
+ constructor(options?: SmartCoercionPluginOptions);
35
35
  init(options: StandardHandlerOptions<T>): void;
36
36
  }
37
37
 
38
- export { JsonSchemaXNativeType, experimental_JsonSchemaCoercer, experimental_SmartCoercionPlugin };
39
- export type { JsonSchema, experimental_JsonSchemaCoerceOptions, experimental_SmartCoercionPluginOptions };
38
+ export { JsonSchemaCoercer, JsonSchemaXNativeType, SmartCoercionPlugin };
39
+ export type { JsonSchema, JsonSchemaCoerceOptions, SmartCoercionPluginOptions };
package/dist/index.d.ts CHANGED
@@ -15,25 +15,25 @@ declare enum JsonSchemaXNativeType {
15
15
  Map = "map"
16
16
  }
17
17
 
18
- interface experimental_JsonSchemaCoerceOptions {
18
+ interface JsonSchemaCoerceOptions {
19
19
  components?: Record<string, JsonSchema>;
20
20
  }
21
- declare class experimental_JsonSchemaCoercer {
21
+ declare class JsonSchemaCoercer {
22
22
  #private;
23
- coerce(schema: JsonSchema, value: unknown, options?: experimental_JsonSchemaCoerceOptions): unknown;
23
+ coerce(schema: JsonSchema, value: unknown, options?: JsonSchemaCoerceOptions): unknown;
24
24
  }
25
25
 
26
- interface experimental_SmartCoercionPluginOptions {
26
+ interface SmartCoercionPluginOptions {
27
27
  schemaConverters?: readonly ConditionalSchemaConverter[];
28
28
  }
29
- declare class experimental_SmartCoercionPlugin<T extends Context> implements StandardHandlerPlugin<T> {
29
+ declare class SmartCoercionPlugin<T extends Context> implements StandardHandlerPlugin<T> {
30
30
  #private;
31
31
  private readonly converter;
32
32
  private readonly coercer;
33
33
  private readonly cache;
34
- constructor(options?: experimental_SmartCoercionPluginOptions);
34
+ constructor(options?: SmartCoercionPluginOptions);
35
35
  init(options: StandardHandlerOptions<T>): void;
36
36
  }
37
37
 
38
- export { JsonSchemaXNativeType, experimental_JsonSchemaCoercer, experimental_SmartCoercionPlugin };
39
- export type { JsonSchema, experimental_JsonSchemaCoerceOptions, experimental_SmartCoercionPluginOptions };
38
+ export { JsonSchemaCoercer, JsonSchemaXNativeType, SmartCoercionPlugin };
39
+ export type { JsonSchema, JsonSchemaCoerceOptions, SmartCoercionPluginOptions };
package/dist/index.mjs CHANGED
@@ -12,7 +12,7 @@ var JsonSchemaXNativeType = /* @__PURE__ */ ((JsonSchemaXNativeType2) => {
12
12
  })(JsonSchemaXNativeType || {});
13
13
 
14
14
  const FLEXIBLE_DATE_FORMAT_REGEX = /^[^-]+-[^-]+-[^-]+$/;
15
- class experimental_JsonSchemaCoercer {
15
+ class JsonSchemaCoercer {
16
16
  coerce(schema, value, options = {}) {
17
17
  const [, coerced] = this.#coerce(schema, value, options);
18
18
  return coerced;
@@ -331,13 +331,13 @@ class experimental_JsonSchemaCoercer {
331
331
  }
332
332
  }
333
333
 
334
- class experimental_SmartCoercionPlugin {
334
+ class SmartCoercionPlugin {
335
335
  converter;
336
336
  coercer;
337
337
  cache = /* @__PURE__ */ new WeakMap();
338
338
  constructor(options = {}) {
339
339
  this.converter = new CompositeSchemaConverter(toArray(options.schemaConverters));
340
- this.coercer = new experimental_JsonSchemaCoercer();
340
+ this.coercer = new JsonSchemaCoercer();
341
341
  }
342
342
  init(options) {
343
343
  options.clientInterceptors ??= [];
@@ -360,4 +360,4 @@ class experimental_SmartCoercionPlugin {
360
360
  }
361
361
  }
362
362
 
363
- export { JsonSchemaXNativeType, experimental_JsonSchemaCoercer, experimental_SmartCoercionPlugin };
363
+ export { JsonSchemaCoercer, JsonSchemaXNativeType, SmartCoercionPlugin };
package/package.json CHANGED
@@ -1,16 +1,15 @@
1
1
  {
2
2
  "name": "@orpc/json-schema",
3
3
  "type": "module",
4
- "version": "0.0.0-next.a15ca72",
4
+ "version": "0.0.0-next.a16ca72",
5
5
  "license": "MIT",
6
- "homepage": "https://orpc.unnoq.com",
6
+ "homepage": "https://orpc.dev",
7
7
  "repository": {
8
8
  "type": "git",
9
- "url": "git+https://github.com/unnoq/orpc.git",
9
+ "url": "git+https://github.com/middleapi/orpc.git",
10
10
  "directory": "packages/json-schema"
11
11
  },
12
12
  "keywords": [
13
- "unnoq",
14
13
  "orpc"
15
14
  ],
16
15
  "exports": {
@@ -24,14 +23,15 @@
24
23
  "dist"
25
24
  ],
26
25
  "dependencies": {
27
- "json-schema-typed": "^8.0.1",
28
- "@orpc/contract": "0.0.0-next.a15ca72",
29
- "@orpc/openapi": "0.0.0-next.a15ca72",
30
- "@orpc/shared": "0.0.0-next.a15ca72",
31
- "@orpc/server": "0.0.0-next.a15ca72"
26
+ "json-schema-typed": "^8.0.2",
27
+ "@orpc/contract": "0.0.0-next.a16ca72",
28
+ "@orpc/interop": "0.0.0-next.a16ca72",
29
+ "@orpc/openapi": "0.0.0-next.a16ca72",
30
+ "@orpc/shared": "0.0.0-next.a16ca72",
31
+ "@orpc/server": "0.0.0-next.a16ca72"
32
32
  },
33
33
  "devDependencies": {
34
- "zod": "^4.0.14"
34
+ "zod": "^4.3.6"
35
35
  },
36
36
  "scripts": {
37
37
  "build": "unbuild",