@orpc/standard-server 1.8.1 → 1.8.2

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
@@ -31,7 +31,7 @@
31
31
  - **📘 First-Class OpenAPI**: Built-in support that fully adheres to the OpenAPI standard.
32
32
  - **📝 Contract-First Development**: Optionally define your API contract before implementation.
33
33
  - **🔍 First-Class OpenTelemetry**: Seamlessly integrate with OpenTelemetry for observability.
34
- - **⚙️ Framework Integrations**: Seamlessly integrate with TanStack Query (React, Vue, Solid, Svelte, Angular), Pinia Colada, and more.
34
+ - **⚙️ Framework Integrations**: Seamlessly integrate with TanStack Query (React, Vue, Solid, Svelte, Angular), SWR, Pinia Colada, and more.
35
35
  - **🚀 Server Actions**: Fully compatible with React Server Actions on Next.js, TanStack Start, and other platforms.
36
36
  - **🔠 Standard Schema Support**: Works out of the box with Zod, Valibot, ArkType, and other schema validators.
37
37
  - **🗃️ Native Types**: Supports native types like Date, File, Blob, BigInt, URL, and more.
@@ -54,6 +54,7 @@ You can find the full documentation [here](https://orpc.unnoq.com).
54
54
  - [@orpc/nest](https://www.npmjs.com/package/@orpc/nest): Deeply integrate oRPC with [NestJS](https://nestjs.com/).
55
55
  - [@orpc/react](https://www.npmjs.com/package/@orpc/react): Utilities for integrating oRPC with React and React Server Actions.
56
56
  - [@orpc/tanstack-query](https://www.npmjs.com/package/@orpc/tanstack-query): [TanStack Query](https://tanstack.com/query/latest) integration.
57
+ - [@orpc/experimental-react-swr](https://www.npmjs.com/package/@orpc/experimental-react-swr): [SWR](https://swr.vercel.app/) integration.
57
58
  - [@orpc/vue-colada](https://www.npmjs.com/package/@orpc/vue-colada): Integration with [Pinia Colada](https://pinia-colada.esm.dev/).
58
59
  - [@orpc/hey-api](https://www.npmjs.com/package/@orpc/hey-api): [Hey API](https://heyapi.dev/) integration.
59
60
  - [@orpc/zod](https://www.npmjs.com/package/@orpc/zod): More schemas that [Zod](https://zod.dev/) doesn't support yet.
@@ -91,7 +91,7 @@ function toBatchResponse(options) {
91
91
  return {
92
92
  headers: options.headers,
93
93
  status: options.status,
94
- body: async function* () {
94
+ body: (async function* () {
95
95
  try {
96
96
  for await (const item of options.body) {
97
97
  yield {
@@ -104,13 +104,13 @@ function toBatchResponse(options) {
104
104
  } finally {
105
105
  await options.body.return?.();
106
106
  }
107
- }()
107
+ })()
108
108
  };
109
109
  }
110
110
  function parseBatchResponse(response) {
111
111
  const body = response.body;
112
112
  if (isAsyncIteratorObject(body) || Array.isArray(body)) {
113
- return async function* () {
113
+ return (async function* () {
114
114
  try {
115
115
  for await (const item of body) {
116
116
  if (!isObject(item) || !("index" in item) || typeof item.index !== "number") {
@@ -130,7 +130,7 @@ function parseBatchResponse(response) {
130
130
  await body.return?.();
131
131
  }
132
132
  }
133
- }();
133
+ })();
134
134
  }
135
135
  throw new TypeError("Invalid batch response", {
136
136
  cause: response
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@orpc/standard-server",
3
3
  "type": "module",
4
- "version": "1.8.1",
4
+ "version": "1.8.2",
5
5
  "license": "MIT",
6
6
  "homepage": "https://unnoq.com",
7
7
  "repository": {
@@ -28,7 +28,7 @@
28
28
  "dist"
29
29
  ],
30
30
  "dependencies": {
31
- "@orpc/shared": "1.8.1"
31
+ "@orpc/shared": "1.8.2"
32
32
  },
33
33
  "scripts": {
34
34
  "build": "unbuild",