@standardserver/fetch 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 CHANGED
@@ -56,9 +56,9 @@ interface ToStandardBodyOptions {
56
56
  declare function toStandardBody(re: Request | Response, options?: ToStandardBodyOptions): Promise<StandardBody>;
57
57
  interface ToFetchBodyOptions {
58
58
  /**
59
- * Options for the event iterator, like keep-alive settings, initial comment, etc.
59
+ * Options for the event stream, like keep-alive settings, initial comment, etc.
60
60
  */
61
- eventIterator?: ToEventStreamOptions;
61
+ eventStream?: ToEventStreamOptions;
62
62
  }
63
63
  /**
64
64
  * Convert a standard body to a fetch body.
package/dist/index.d.ts CHANGED
@@ -56,9 +56,9 @@ interface ToStandardBodyOptions {
56
56
  declare function toStandardBody(re: Request | Response, options?: ToStandardBodyOptions): Promise<StandardBody>;
57
57
  interface ToFetchBodyOptions {
58
58
  /**
59
- * Options for the event iterator, like keep-alive settings, initial comment, etc.
59
+ * Options for the event stream, like keep-alive settings, initial comment, etc.
60
60
  */
61
- eventIterator?: ToEventStreamOptions;
61
+ eventStream?: ToEventStreamOptions;
62
62
  }
63
63
  /**
64
64
  * Convert a standard body to a fetch body.
package/dist/index.mjs CHANGED
@@ -189,7 +189,7 @@ function toFetchBody(body, headers, options = {}) {
189
189
  if (isAsyncIteratorObject(body)) {
190
190
  headers["standard-server"] = "event-stream";
191
191
  headers["content-type"] ??= "text/event-stream";
192
- return [toEventStream(body, options.eventIterator), headers];
192
+ return [toEventStream(body, options.eventStream), headers];
193
193
  }
194
194
  headers["standard-server"] = "json";
195
195
  headers["content-type"] ??= "application/json";
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@standardserver/fetch",
3
3
  "type": "module",
4
- "version": "0.0.5",
4
+ "version": "0.0.7",
5
5
  "license": "MIT",
6
6
  "homepage": "https://standardserver.dev",
7
7
  "repository": {
@@ -20,8 +20,8 @@
20
20
  "dist"
21
21
  ],
22
22
  "dependencies": {
23
- "@standardserver/core": "0.0.5",
24
- "@standardserver/shared": "0.0.5"
23
+ "@standardserver/core": "0.0.7",
24
+ "@standardserver/shared": "0.0.7"
25
25
  },
26
26
  "devDependencies": {
27
27
  "@hono/node-server": "^1.19.7"