@orpc/standard-server-peer 0.0.0-next.d5f6b77 → 0.0.0-next.fcb9d5a
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 +7 -7
- package/package.json +3 -3
package/README.md
CHANGED
@@ -49,6 +49,7 @@ You can find the full documentation [here](https://orpc.unnoq.com).
|
|
49
49
|
- [@orpc/contract](https://www.npmjs.com/package/@orpc/contract): Build your API contract.
|
50
50
|
- [@orpc/server](https://www.npmjs.com/package/@orpc/server): Build your API or implement API contract.
|
51
51
|
- [@orpc/client](https://www.npmjs.com/package/@orpc/client): Consume your API on the client with type-safety.
|
52
|
+
- [@orpc/nest](https://www.npmjs.com/package/@orpc/nest): Deeply integrate oRPC with NestJS.
|
52
53
|
- [@orpc/react](https://www.npmjs.com/package/@orpc/react): Utilities for integrating oRPC with React and React Server Actions.
|
53
54
|
- [@orpc/react-query](https://www.npmjs.com/package/@orpc/react-query): Integration with [React Query](https://tanstack.com/query/latest/docs/framework/react/overview).
|
54
55
|
- [@orpc/vue-query](https://www.npmjs.com/package/@orpc/vue-query): Integration with [Vue Query](https://tanstack.com/query/latest/docs/framework/vue/overview).
|
package/dist/index.mjs
CHANGED
@@ -1,5 +1,5 @@
|
|
1
|
-
import {
|
2
|
-
import { getFilenameFromContentDisposition, generateContentDisposition, withEventMeta, ErrorEvent, getEventMeta } from '@orpc/standard-server';
|
1
|
+
import { isAsyncIteratorObject, stringifyJSON, createAsyncIteratorObject, isTypescriptObject, SequentialIdGenerator, AsyncIdQueue } from '@orpc/shared';
|
2
|
+
import { flattenHeader, getFilenameFromContentDisposition, generateContentDisposition, withEventMeta, ErrorEvent, getEventMeta } from '@orpc/standard-server';
|
3
3
|
|
4
4
|
var MessageType = /* @__PURE__ */ ((MessageType2) => {
|
5
5
|
MessageType2[MessageType2["REQUEST"] = 1] = "REQUEST";
|
@@ -55,9 +55,9 @@ async function decodeRequestMessage(raw) {
|
|
55
55
|
const payload = message.p;
|
56
56
|
const headers = payload.h ?? {};
|
57
57
|
let body = payload.b;
|
58
|
-
const contentType =
|
58
|
+
const contentType = flattenHeader(headers["content-type"]);
|
59
59
|
if (blobData) {
|
60
|
-
const contentDisposition =
|
60
|
+
const contentDisposition = flattenHeader(headers["content-disposition"]);
|
61
61
|
if (contentDisposition === void 0 && contentType?.startsWith("multipart/form-data")) {
|
62
62
|
const tempRes = new Response(blobData, { headers: { "content-type": contentType } });
|
63
63
|
body = await tempRes.formData();
|
@@ -116,9 +116,9 @@ async function decodeResponseMessage(raw) {
|
|
116
116
|
const payload = message.p;
|
117
117
|
const headers = payload.h ?? {};
|
118
118
|
let body = payload.b;
|
119
|
-
const contentType =
|
119
|
+
const contentType = flattenHeader(headers["content-type"]);
|
120
120
|
if (blobData) {
|
121
|
-
const contentDisposition =
|
121
|
+
const contentDisposition = flattenHeader(headers["content-disposition"]);
|
122
122
|
if (contentDisposition === void 0 && contentType?.startsWith("multipart/form-data")) {
|
123
123
|
const tempRes = new Response(blobData, { headers: { "content-type": contentType } });
|
124
124
|
body = await tempRes.formData();
|
@@ -160,7 +160,7 @@ async function prepareBodyAndHeadersForSerialization(body, originalHeaders) {
|
|
160
160
|
return { body, headers };
|
161
161
|
}
|
162
162
|
function isEventIteratorHeaders(headers) {
|
163
|
-
return Boolean(
|
163
|
+
return Boolean(flattenHeader(headers["content-type"])?.startsWith("text/event-stream") && headers["content-disposition"] === void 0);
|
164
164
|
}
|
165
165
|
const JSON_AND_BINARY_DELIMITER = 255;
|
166
166
|
async function encodeRawMessage(data, blobData) {
|
package/package.json
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"name": "@orpc/standard-server-peer",
|
3
3
|
"type": "module",
|
4
|
-
"version": "0.0.0-next.
|
4
|
+
"version": "0.0.0-next.fcb9d5a",
|
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/shared": "0.0.0-next.
|
27
|
-
"@orpc/standard-server": "0.0.0-next.
|
26
|
+
"@orpc/shared": "0.0.0-next.fcb9d5a",
|
27
|
+
"@orpc/standard-server": "0.0.0-next.fcb9d5a"
|
28
28
|
},
|
29
29
|
"scripts": {
|
30
30
|
"build": "unbuild",
|