@standardserver/node 0.0.5 → 0.0.7
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/dist/index.d.mts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.mjs +1 -1
- package/package.json +4 -4
package/dist/index.d.mts
CHANGED
|
@@ -34,9 +34,9 @@ interface ToStandardBodyOptions {
|
|
|
34
34
|
declare function toStandardBody(req: NodeHttpRequest, options?: ToStandardBodyOptions): Promise<StandardBody>;
|
|
35
35
|
interface ToNodeHttpBodyOptions {
|
|
36
36
|
/**
|
|
37
|
-
* Options for the event
|
|
37
|
+
* Options for the event stream, like keep-alive settings, initial comment, etc.
|
|
38
38
|
*/
|
|
39
|
-
|
|
39
|
+
eventStream?: ToEventStreamOptions;
|
|
40
40
|
}
|
|
41
41
|
declare function toNodeHttpBody(body: StandardBody, headers: StandardHeaders, options?: ToNodeHttpBodyOptions): Promise<[
|
|
42
42
|
body: Readable | undefined | string,
|
package/dist/index.d.ts
CHANGED
|
@@ -34,9 +34,9 @@ interface ToStandardBodyOptions {
|
|
|
34
34
|
declare function toStandardBody(req: NodeHttpRequest, options?: ToStandardBodyOptions): Promise<StandardBody>;
|
|
35
35
|
interface ToNodeHttpBodyOptions {
|
|
36
36
|
/**
|
|
37
|
-
* Options for the event
|
|
37
|
+
* Options for the event stream, like keep-alive settings, initial comment, etc.
|
|
38
38
|
*/
|
|
39
|
-
|
|
39
|
+
eventStream?: ToEventStreamOptions;
|
|
40
40
|
}
|
|
41
41
|
declare function toNodeHttpBody(body: StandardBody, headers: StandardHeaders, options?: ToNodeHttpBodyOptions): Promise<[
|
|
42
42
|
body: Readable | undefined | string,
|
package/dist/index.mjs
CHANGED
|
@@ -89,7 +89,7 @@ async function toNodeHttpBody(body, headers, options = {}) {
|
|
|
89
89
|
if (isAsyncIteratorObject(body)) {
|
|
90
90
|
headers["standard-server"] = "event-stream";
|
|
91
91
|
headers["content-type"] ??= "text/event-stream";
|
|
92
|
-
return [toEventStream(body, options.
|
|
92
|
+
return [toEventStream(body, options.eventStream), headers];
|
|
93
93
|
}
|
|
94
94
|
headers["standard-server"] = "json";
|
|
95
95
|
headers["content-type"] ??= "application/json";
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@standardserver/node",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.7",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"homepage": "https://standardserver.dev",
|
|
7
7
|
"repository": {
|
|
@@ -20,9 +20,9 @@
|
|
|
20
20
|
"dist"
|
|
21
21
|
],
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@standardserver/core": "0.0.
|
|
24
|
-
"@standardserver/shared": "0.0.
|
|
25
|
-
"@standardserver/fetch": "0.0.
|
|
23
|
+
"@standardserver/core": "0.0.7",
|
|
24
|
+
"@standardserver/shared": "0.0.7",
|
|
25
|
+
"@standardserver/fetch": "0.0.7"
|
|
26
26
|
},
|
|
27
27
|
"devDependencies": {
|
|
28
28
|
"@types/node": "^25.0.3",
|