@orpc/standard-server-fetch 1.0.0-beta.4 → 1.0.0-beta.5
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 +1 -0
- package/dist/index.mjs +4 -8
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -53,6 +53,7 @@ You can find the full documentation [here](https://orpc.unnoq.com).
|
|
|
53
53
|
- [@orpc/contract](https://www.npmjs.com/package/@orpc/contract): Build your API contract.
|
|
54
54
|
- [@orpc/server](https://www.npmjs.com/package/@orpc/server): Build your API or implement API contract.
|
|
55
55
|
- [@orpc/client](https://www.npmjs.com/package/@orpc/client): Consume your API on the client with type-safety.
|
|
56
|
+
- [@orpc/react](https://www.npmjs.com/package/@orpc/react): Utilities for integrating oRPC with React and React Server Actions.
|
|
56
57
|
- [@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
58
|
- [@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
59
|
- [@orpc/solid-query](https://www.npmjs.com/package/@orpc/solid-query): Integration with [Solid Query](https://tanstack.com/query/latest/docs/framework/solid/overview).
|
package/dist/index.mjs
CHANGED
|
@@ -182,15 +182,13 @@ function toFetchHeaders(headers, fetchHeaders = new Headers()) {
|
|
|
182
182
|
}
|
|
183
183
|
|
|
184
184
|
function toStandardLazyRequest(request) {
|
|
185
|
-
const raw = { adapter: "fetch", request };
|
|
186
185
|
return {
|
|
187
|
-
raw,
|
|
188
186
|
url: new URL(request.url),
|
|
189
187
|
signal: request.signal,
|
|
190
188
|
method: request.method,
|
|
191
|
-
body: once(() => toStandardBody(
|
|
189
|
+
body: once(() => toStandardBody(request)),
|
|
192
190
|
get headers() {
|
|
193
|
-
const headers = toStandardHeaders(
|
|
191
|
+
const headers = toStandardHeaders(request.headers);
|
|
194
192
|
Object.defineProperty(this, "headers", { value: headers, writable: true });
|
|
195
193
|
return headers;
|
|
196
194
|
},
|
|
@@ -216,13 +214,11 @@ function toFetchResponse(response, options = {}) {
|
|
|
216
214
|
return new Response(body, { headers, status: response.status });
|
|
217
215
|
}
|
|
218
216
|
function toStandardLazyResponse(response) {
|
|
219
|
-
const raw = { adapter: "fetch", response };
|
|
220
217
|
return {
|
|
221
|
-
|
|
222
|
-
body: once(() => toStandardBody(raw.response)),
|
|
218
|
+
body: once(() => toStandardBody(response)),
|
|
223
219
|
status: response.status,
|
|
224
220
|
get headers() {
|
|
225
|
-
const headers = toStandardHeaders(
|
|
221
|
+
const headers = toStandardHeaders(response.headers);
|
|
226
222
|
Object.defineProperty(this, "headers", { value: headers, writable: true });
|
|
227
223
|
return headers;
|
|
228
224
|
},
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@orpc/standard-server-fetch",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "1.0.0-beta.
|
|
4
|
+
"version": "1.0.0-beta.5",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"homepage": "https://unnoq.com",
|
|
7
7
|
"repository": {
|
|
@@ -23,8 +23,8 @@
|
|
|
23
23
|
"dist"
|
|
24
24
|
],
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"@orpc/
|
|
27
|
-
"@orpc/
|
|
26
|
+
"@orpc/shared": "1.0.0-beta.5",
|
|
27
|
+
"@orpc/standard-server": "1.0.0-beta.5"
|
|
28
28
|
},
|
|
29
29
|
"devDependencies": {
|
|
30
30
|
"@hono/node-server": "^1.13.8"
|