@ahoo-wang/fetcher-eventstream 0.9.0 → 0.9.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.
@@ -1,7 +1,19 @@
1
1
  import { ServerSentEvent } from './serverSentEventTransformStream';
2
2
  /**
3
- * ServerSentEventStream is a ReadableStream of ServerSentEvent objects
3
+ * A ReadableStream of ServerSentEvent objects.
4
4
  */
5
5
  export type ServerSentEventStream = ReadableStream<ServerSentEvent>;
6
+ /**
7
+ * Converts a Response object to a ServerSentEventStream.
8
+ *
9
+ * Processes the response body through a series of transform streams:
10
+ * 1. TextDecoderStream: Decode Uint8Array data to UTF-8 strings
11
+ * 2. TextLineStream: Split text by lines
12
+ * 3. ServerSentEventStream: Parse line data into server-sent events
13
+ *
14
+ * @param response - The Response object to convert
15
+ * @returns A ReadableStream of ServerSentEvent objects
16
+ * @throws Error if the response body is null
17
+ */
6
18
  export declare function toServerSentEventStream(response: Response): ServerSentEventStream;
7
19
  //# sourceMappingURL=eventStreamConverter.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"eventStreamConverter.d.ts","sourceRoot":"","sources":["../src/eventStreamConverter.ts"],"names":[],"mappings":"AAcA,OAAO,EACL,eAAe,EAEhB,MAAM,kCAAkC,CAAC;AAE1C;;GAEG;AACH,MAAM,MAAM,qBAAqB,GAAG,cAAc,CAAC,eAAe,CAAC,CAAC;AAEpE,wBAAgB,uBAAuB,CACrC,QAAQ,EAAE,QAAQ,GACjB,qBAAqB,CAavB"}
1
+ {"version":3,"file":"eventStreamConverter.d.ts","sourceRoot":"","sources":["../src/eventStreamConverter.ts"],"names":[],"mappings":"AAcA,OAAO,EACL,eAAe,EAEhB,MAAM,kCAAkC,CAAC;AAE1C;;GAEG;AACH,MAAM,MAAM,qBAAqB,GAAG,cAAc,CAAC,eAAe,CAAC,CAAC;AAEpE;;;;;;;;;;;GAWG;AACH,wBAAgB,uBAAuB,CACrC,QAAQ,EAAE,QAAQ,GACjB,qBAAqB,CASvB"}
@@ -1,9 +1,6 @@
1
1
  import { FetchExchange, Interceptor } from '@ahoo-wang/fetcher';
2
2
  /**
3
- * EventStreamInterceptor Class
4
- *
5
- * Interceptor responsible for enhancing Response objects with event stream capabilities
6
- * when the response content type indicates a server-sent event stream.
3
+ * Interceptor that enhances Response objects with event stream capabilities.
7
4
  *
8
5
  * This interceptor detects responses with `text/event-stream` content type and adds
9
6
  * an `eventStream()` method to the Response object, which returns a readable stream
@@ -1 +1 @@
1
- {"version":3,"file":"eventStreamInterceptor.d.ts","sourceRoot":"","sources":["../src/eventStreamInterceptor.ts"],"names":[],"mappings":"AAcA,OAAO,EAAwC,aAAa,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAEtG;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,qBAAa,sBAAuB,YAAW,WAAW;IACxD,IAAI,SAA4B;IAChC,KAAK,SAAiC;IAEtC,SAAS,CAAC,QAAQ,EAAE,aAAa;CAelC"}
1
+ {"version":3,"file":"eventStreamInterceptor.d.ts","sourceRoot":"","sources":["../src/eventStreamInterceptor.ts"],"names":[],"mappings":"AAcA,OAAO,EAGL,aAAa,EACb,WAAW,EACZ,MAAM,oBAAoB,CAAC;AAE5B;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,qBAAa,sBAAuB,YAAW,WAAW;IACxD,IAAI,SAA4B;IAChC,KAAK,SAAiC;IAEtC,SAAS,CAAC,QAAQ,EAAE,aAAa;CAWlC"}
package/dist/index.es.js CHANGED
@@ -3,18 +3,29 @@ class c {
3
3
  constructor() {
4
4
  this.buffer = "";
5
5
  }
6
+ /**
7
+ * Transform input string chunk by splitting it into lines.
8
+ *
9
+ * @param chunk Input string chunk
10
+ * @param controller Controller for controlling the transform stream
11
+ */
6
12
  transform(t, e) {
7
13
  try {
8
14
  this.buffer += t;
9
15
  const r = this.buffer.split(`
10
16
  `);
11
17
  this.buffer = r.pop() || "";
12
- for (const n of r)
13
- e.enqueue(n);
18
+ for (const s of r)
19
+ e.enqueue(s);
14
20
  } catch (r) {
15
21
  e.error(r);
16
22
  }
17
23
  }
24
+ /**
25
+ * Flush remaining buffer when the stream ends.
26
+ *
27
+ * @param controller Controller for controlling the transform stream
28
+ */
18
29
  flush(t) {
19
30
  try {
20
31
  this.buffer && t.enqueue(this.buffer);
@@ -28,9 +39,9 @@ class d extends TransformStream {
28
39
  super(new c());
29
40
  }
30
41
  }
31
- var u = /* @__PURE__ */ ((s) => (s.ID = "id", s.RETRY = "retry", s.EVENT = "event", s.DATA = "data", s))(u || {});
32
- function m(s, t, e) {
33
- switch (s) {
42
+ var u = /* @__PURE__ */ ((n) => (n.ID = "id", n.RETRY = "retry", n.EVENT = "event", n.DATA = "data", n))(u || {});
43
+ function m(n, t, e) {
44
+ switch (n) {
34
45
  case "event":
35
46
  e.event = t;
36
47
  break;
@@ -57,7 +68,8 @@ class h {
57
68
  };
58
69
  }
59
70
  /**
60
- * Transform input string chunk into ServerSentEvent object
71
+ * Transform input string chunk into ServerSentEvent object.
72
+ *
61
73
  * @param chunk Input string chunk
62
74
  * @param controller Controller for controlling the transform stream
63
75
  */
@@ -76,17 +88,18 @@ class h {
76
88
  }
77
89
  if (t.startsWith(":"))
78
90
  return;
79
- const n = t.indexOf(":");
91
+ const s = t.indexOf(":");
80
92
  let o, a;
81
- n === -1 ? (o = t.toLowerCase(), a = "") : (o = t.substring(0, n).toLowerCase(), a = t.substring(n + 1), a.startsWith(" ") && (a = a.substring(1))), o = o.trim(), a = a.trim(), m(o, a, r);
82
- } catch (n) {
93
+ s === -1 ? (o = t.toLowerCase(), a = "") : (o = t.substring(0, s).toLowerCase(), a = t.substring(s + 1), a.startsWith(" ") && (a = a.substring(1))), o = o.trim(), a = a.trim(), m(o, a, r);
94
+ } catch (s) {
83
95
  e.error(
84
- n instanceof Error ? n : new Error(String(n))
96
+ s instanceof Error ? s : new Error(String(s))
85
97
  ), r.event = "message", r.id = void 0, r.retry = void 0, r.data = [];
86
98
  }
87
99
  }
88
100
  /**
89
- * Called when the stream ends, used to process remaining data
101
+ * Called when the stream ends, used to process remaining data.
102
+ *
90
103
  * @param controller Controller for controlling the transform stream
91
104
  */
92
105
  flush(t) {
@@ -113,10 +126,10 @@ class p extends TransformStream {
113
126
  super(new h());
114
127
  }
115
128
  }
116
- function T(s) {
117
- if (!s.body)
129
+ function T(n) {
130
+ if (!n.body)
118
131
  throw new Error("Response body is null");
119
- return s.body.pipeThrough(new TextDecoderStream("utf-8")).pipeThrough(new d()).pipeThrough(new p());
132
+ return n.body.pipeThrough(new TextDecoderStream("utf-8")).pipeThrough(new d()).pipeThrough(new p());
120
133
  }
121
134
  class v {
122
135
  constructor() {
@@ -126,8 +139,7 @@ class v {
126
139
  const e = t.response;
127
140
  if (!e)
128
141
  return;
129
- const r = e.headers.get(i);
130
- r && r.includes(f.TEXT_EVENT_STREAM) && (e.eventStream = () => T(e));
142
+ e.headers.get(i)?.includes(f.TEXT_EVENT_STREAM) && (e.eventStream = () => T(e));
131
143
  }
132
144
  }
133
145
  export {
package/dist/index.umd.js CHANGED
@@ -1,4 +1,4 @@
1
- (function(s,o){typeof exports=="object"&&typeof module<"u"?o(exports,require("@ahoo-wang/fetcher")):typeof define=="function"&&define.amd?define(["exports","@ahoo-wang/fetcher"],o):(s=typeof globalThis<"u"?globalThis:s||self,o(s.FetcherEventStream={},s.Fetcher))})(this,(function(s,o){"use strict";class d{constructor(){this.buffer=""}transform(t,e){try{this.buffer+=t;const r=this.buffer.split(`
2
- `);this.buffer=r.pop()||"";for(const a of r)e.enqueue(a)}catch(r){e.error(r)}}flush(t){try{this.buffer&&t.enqueue(this.buffer)}catch(e){t.error(e)}}}class c extends TransformStream{constructor(){super(new d)}}var u=(n=>(n.ID="id",n.RETRY="retry",n.EVENT="event",n.DATA="data",n))(u||{});function T(n,t,e){switch(n){case"event":e.event=t;break;case"data":e.data.push(t);break;case"id":e.id=t;break;case"retry":{const r=parseInt(t,10);isNaN(r)||(e.retry=r);break}}}class m{constructor(){this.currentEvent={event:"message",id:void 0,retry:void 0,data:[]}}transform(t,e){const r=this.currentEvent;try{if(t.trim()===""){r.data.length>0&&(e.enqueue({event:r.event||"message",data:r.data.join(`
3
- `),id:r.id||"",retry:r.retry}),r.event="message",r.data=[]);return}if(t.startsWith(":"))return;const a=t.indexOf(":");let f,i;a===-1?(f=t.toLowerCase(),i=""):(f=t.substring(0,a).toLowerCase(),i=t.substring(a+1),i.startsWith(" ")&&(i=i.substring(1))),f=f.trim(),i=i.trim(),T(f,i,r)}catch(a){e.error(a instanceof Error?a:new Error(String(a))),r.event="message",r.id=void 0,r.retry=void 0,r.data=[]}}flush(t){const e=this.currentEvent;try{e.data.length>0&&t.enqueue({event:e.event||"message",data:e.data.join(`
4
- `),id:e.id||"",retry:e.retry})}catch(r){t.error(r instanceof Error?r:new Error(String(r)))}finally{e.event="message",e.id=void 0,e.retry=void 0,e.data=[]}}}class h extends TransformStream{constructor(){super(new m)}}function v(n){if(!n.body)throw new Error("Response body is null");return n.body.pipeThrough(new TextDecoderStream("utf-8")).pipeThrough(new c).pipeThrough(new h)}class S{constructor(){this.name="EventStreamInterceptor",this.order=Number.MAX_SAFE_INTEGER-100}intercept(t){const e=t.response;if(!e)return;const r=e.headers.get(o.ContentTypeHeader);r&&r.includes(o.ContentTypeValues.TEXT_EVENT_STREAM)&&(e.eventStream=()=>v(e))}}s.EventStreamInterceptor=S,s.ServerSentEventField=u,s.ServerSentEventTransformStream=h,s.ServerSentEventTransformer=m,s.TextLineTransformStream=c,s.TextLineTransformer=d,s.toServerSentEventStream=v,Object.defineProperty(s,Symbol.toStringTag,{value:"Module"})}));
1
+ (function(s,i){typeof exports=="object"&&typeof module<"u"?i(exports,require("@ahoo-wang/fetcher")):typeof define=="function"&&define.amd?define(["exports","@ahoo-wang/fetcher"],i):(s=typeof globalThis<"u"?globalThis:s||self,i(s.FetcherEventStream={},s.Fetcher))})(this,(function(s,i){"use strict";class d{constructor(){this.buffer=""}transform(t,e){try{this.buffer+=t;const r=this.buffer.split(`
2
+ `);this.buffer=r.pop()||"";for(const a of r)e.enqueue(a)}catch(r){e.error(r)}}flush(t){try{this.buffer&&t.enqueue(this.buffer)}catch(e){t.error(e)}}}class c extends TransformStream{constructor(){super(new d)}}var u=(n=>(n.ID="id",n.RETRY="retry",n.EVENT="event",n.DATA="data",n))(u||{});function v(n,t,e){switch(n){case"event":e.event=t;break;case"data":e.data.push(t);break;case"id":e.id=t;break;case"retry":{const r=parseInt(t,10);isNaN(r)||(e.retry=r);break}}}class m{constructor(){this.currentEvent={event:"message",id:void 0,retry:void 0,data:[]}}transform(t,e){const r=this.currentEvent;try{if(t.trim()===""){r.data.length>0&&(e.enqueue({event:r.event||"message",data:r.data.join(`
3
+ `),id:r.id||"",retry:r.retry}),r.event="message",r.data=[]);return}if(t.startsWith(":"))return;const a=t.indexOf(":");let f,o;a===-1?(f=t.toLowerCase(),o=""):(f=t.substring(0,a).toLowerCase(),o=t.substring(a+1),o.startsWith(" ")&&(o=o.substring(1))),f=f.trim(),o=o.trim(),v(f,o,r)}catch(a){e.error(a instanceof Error?a:new Error(String(a))),r.event="message",r.id=void 0,r.retry=void 0,r.data=[]}}flush(t){const e=this.currentEvent;try{e.data.length>0&&t.enqueue({event:e.event||"message",data:e.data.join(`
4
+ `),id:e.id||"",retry:e.retry})}catch(r){t.error(r instanceof Error?r:new Error(String(r)))}finally{e.event="message",e.id=void 0,e.retry=void 0,e.data=[]}}}class h extends TransformStream{constructor(){super(new m)}}function T(n){if(!n.body)throw new Error("Response body is null");return n.body.pipeThrough(new TextDecoderStream("utf-8")).pipeThrough(new c).pipeThrough(new h)}class S{constructor(){this.name="EventStreamInterceptor",this.order=Number.MAX_SAFE_INTEGER-100}intercept(t){const e=t.response;if(!e)return;e.headers.get(i.ContentTypeHeader)?.includes(i.ContentTypeValues.TEXT_EVENT_STREAM)&&(e.eventStream=()=>T(e))}}s.EventStreamInterceptor=S,s.ServerSentEventField=u,s.ServerSentEventTransformStream=h,s.ServerSentEventTransformer=m,s.TextLineTransformStream=c,s.TextLineTransformer=d,s.toServerSentEventStream=T,Object.defineProperty(s,Symbol.toStringTag,{value:"Module"})}));
@@ -1,6 +1,7 @@
1
1
  /**
2
- * Represents a message sent in an event stream
3
- * https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events#Event_stream_format
2
+ * Represents a message sent in an event stream.
3
+ *
4
+ * @see {@link https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events#Event_stream_format}
4
5
  */
5
6
  export interface ServerSentEvent {
6
7
  /** The event ID to set the EventSource object's last event ID value. */
@@ -19,26 +20,28 @@ export declare enum ServerSentEventField {
19
20
  DATA = "data"
20
21
  }
21
22
  /**
22
- * ServerSentEventTransformer is responsible for converting a string stream into a ServerSentEvent object stream
23
- * Implements the Transformer interface for processing data transformation in TransformStream
23
+ * Transformer responsible for converting a string stream into a ServerSentEvent object stream.
24
+ *
25
+ * Implements the Transformer interface for processing data transformation in TransformStream.
24
26
  */
25
27
  export declare class ServerSentEventTransformer implements Transformer<string, ServerSentEvent> {
26
28
  private currentEvent;
27
29
  /**
28
- * Transform input string chunk into ServerSentEvent object
30
+ * Transform input string chunk into ServerSentEvent object.
31
+ *
29
32
  * @param chunk Input string chunk
30
33
  * @param controller Controller for controlling the transform stream
31
34
  */
32
35
  transform(chunk: string, controller: TransformStreamDefaultController<ServerSentEvent>): void;
33
36
  /**
34
- * Called when the stream ends, used to process remaining data
37
+ * Called when the stream ends, used to process remaining data.
38
+ *
35
39
  * @param controller Controller for controlling the transform stream
36
40
  */
37
41
  flush(controller: TransformStreamDefaultController<ServerSentEvent>): void;
38
42
  }
39
43
  /**
40
- * ServerSentEventTransformStream is a TransformStream that converts a stream of strings
41
- * into a stream of ServerSentEvent objects.
44
+ * A TransformStream that converts a stream of strings into a stream of ServerSentEvent objects.
42
45
  */
43
46
  export declare class ServerSentEventTransformStream extends TransformStream<string, ServerSentEvent> {
44
47
  constructor();
@@ -1 +1 @@
1
- {"version":3,"file":"serverSentEventTransformStream.d.ts","sourceRoot":"","sources":["../src/serverSentEventTransformStream.ts"],"names":[],"mappings":"AAaA;;;GAGG;AACH,MAAM,WAAW,eAAe;IAC9B,wEAAwE;IACxE,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,wDAAwD;IACxD,KAAK,EAAE,MAAM,CAAC;IACd,qBAAqB;IACrB,IAAI,EAAE,MAAM,CAAC;IACb,yFAAyF;IACzF,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,oBAAY,oBAAoB;IAC9B,EAAE,OAAO;IACT,KAAK,UAAU;IACf,KAAK,UAAU;IACf,IAAI,SAAS;CACd;AA2CD;;;GAGG;AACH,qBAAa,0BACX,YAAW,WAAW,CAAC,MAAM,EAAE,eAAe,CAAC;IAG/C,OAAO,CAAC,YAAY,CAKlB;IAEF;;;;OAIG;IACH,SAAS,CACP,KAAK,EAAE,MAAM,EACb,UAAU,EAAE,gCAAgC,CAAC,eAAe,CAAC;IAiE/D;;;OAGG;IACH,KAAK,CAAC,UAAU,EAAE,gCAAgC,CAAC,eAAe,CAAC;CAwBpE;AAED;;;GAGG;AACH,qBAAa,8BAA+B,SAAQ,eAAe,CACjE,MAAM,EACN,eAAe,CAChB;;CAIA"}
1
+ {"version":3,"file":"serverSentEventTransformStream.d.ts","sourceRoot":"","sources":["../src/serverSentEventTransformStream.ts"],"names":[],"mappings":"AAaA;;;;GAIG;AACH,MAAM,WAAW,eAAe;IAC9B,wEAAwE;IACxE,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,wDAAwD;IACxD,KAAK,EAAE,MAAM,CAAC;IACd,qBAAqB;IACrB,IAAI,EAAE,MAAM,CAAC;IACb,yFAAyF;IACzF,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,oBAAY,oBAAoB;IAC9B,EAAE,OAAO;IACT,KAAK,UAAU;IACf,KAAK,UAAU;IACf,IAAI,SAAS;CACd;AA2CD;;;;GAIG;AACH,qBAAa,0BACX,YAAW,WAAW,CAAC,MAAM,EAAE,eAAe,CAAC;IAG/C,OAAO,CAAC,YAAY,CAKlB;IAEF;;;;;OAKG;IACH,SAAS,CACP,KAAK,EAAE,MAAM,EACb,UAAU,EAAE,gCAAgC,CAAC,eAAe,CAAC;IAiE/D;;;;OAIG;IACH,KAAK,CAAC,UAAU,EAAE,gCAAgC,CAAC,eAAe,CAAC;CAwBpE;AAED;;GAEG;AACH,qBAAa,8BAA+B,SAAQ,eAAe,CACjE,MAAM,EACN,eAAe,CAChB;;CAIA"}
@@ -1,8 +1,29 @@
1
+ /**
2
+ * Transformer that splits text into lines.
3
+ *
4
+ * This transformer accumulates chunks of text and splits them by newline characters,
5
+ * emitting each line as a separate chunk while preserving the remaining buffer
6
+ * for the next chunk.
7
+ */
1
8
  export declare class TextLineTransformer implements Transformer<string, string> {
2
9
  private buffer;
10
+ /**
11
+ * Transform input string chunk by splitting it into lines.
12
+ *
13
+ * @param chunk Input string chunk
14
+ * @param controller Controller for controlling the transform stream
15
+ */
3
16
  transform(chunk: string, controller: TransformStreamDefaultController<string>): void;
17
+ /**
18
+ * Flush remaining buffer when the stream ends.
19
+ *
20
+ * @param controller Controller for controlling the transform stream
21
+ */
4
22
  flush(controller: TransformStreamDefaultController<string>): void;
5
23
  }
24
+ /**
25
+ * A TransformStream that splits text into lines.
26
+ */
6
27
  export declare class TextLineTransformStream extends TransformStream<string, string> {
7
28
  constructor();
8
29
  }
@@ -1 +1 @@
1
- {"version":3,"file":"textLineTransformStream.d.ts","sourceRoot":"","sources":["../src/textLineTransformStream.ts"],"names":[],"mappings":"AAaA,qBAAa,mBAAoB,YAAW,WAAW,CAAC,MAAM,EAAE,MAAM,CAAC;IACrE,OAAO,CAAC,MAAM,CAAM;IAEpB,SAAS,CACP,KAAK,EAAE,MAAM,EACb,UAAU,EAAE,gCAAgC,CAAC,MAAM,CAAC;IAetD,KAAK,CAAC,UAAU,EAAE,gCAAgC,CAAC,MAAM,CAAC;CAU3D;AAED,qBAAa,uBAAwB,SAAQ,eAAe,CAAC,MAAM,EAAE,MAAM,CAAC;;CAI3E"}
1
+ {"version":3,"file":"textLineTransformStream.d.ts","sourceRoot":"","sources":["../src/textLineTransformStream.ts"],"names":[],"mappings":"AAaA;;;;;;GAMG;AACH,qBAAa,mBAAoB,YAAW,WAAW,CAAC,MAAM,EAAE,MAAM,CAAC;IACrE,OAAO,CAAC,MAAM,CAAM;IAEpB;;;;;OAKG;IACH,SAAS,CACP,KAAK,EAAE,MAAM,EACb,UAAU,EAAE,gCAAgC,CAAC,MAAM,CAAC;IAetD;;;;OAIG;IACH,KAAK,CAAC,UAAU,EAAE,gCAAgC,CAAC,MAAM,CAAC;CAU3D;AAED;;GAEG;AACH,qBAAa,uBAAwB,SAAQ,eAAe,CAAC,MAAM,EAAE,MAAM,CAAC;;CAI3E"}
package/dist/types.d.ts CHANGED
@@ -1,9 +1,20 @@
1
1
  import { ServerSentEventStream } from './eventStreamConverter';
2
2
  declare global {
3
3
  interface Response {
4
+ /**
5
+ * Returns a ServerSentEventStream for consuming server-sent events.
6
+ *
7
+ * This method is added to Response objects by the EventStreamInterceptor
8
+ * when the response content type indicates a server-sent event stream.
9
+ *
10
+ * @returns A ReadableStream of ServerSentEvent objects
11
+ */
4
12
  eventStream?(): ServerSentEventStream;
5
13
  }
6
14
  interface ReadableStream<R = any> {
15
+ /**
16
+ * Makes ReadableStream async iterable for use with for-await loops.
17
+ */
7
18
  [Symbol.asyncIterator](): AsyncIterator<R>;
8
19
  }
9
20
  }
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,qBAAqB,EAAE,MAAM,wBAAwB,CAAC;AAE/D,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,QAAQ;QAChB,WAAW,CAAC,IAAI,qBAAqB,CAAC;KACvC;IAED,UAAU,cAAc,CAAC,CAAC,GAAG,GAAG;QAC9B,CAAC,MAAM,CAAC,aAAa,CAAC,IAAI,aAAa,CAAC,CAAC,CAAC,CAAC;KAC5C;CACF"}
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,qBAAqB,EAAE,MAAM,wBAAwB,CAAC;AAE/D,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,QAAQ;QAChB;;;;;;;WAOG;QACH,WAAW,CAAC,IAAI,qBAAqB,CAAC;KACvC;IAED,UAAU,cAAc,CAAC,CAAC,GAAG,GAAG;QAC9B;;WAEG;QACH,CAAC,MAAM,CAAC,aAAa,CAAC,IAAI,aAAa,CAAC,CAAC,CAAC,CAAC;KAC5C;CACF"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ahoo-wang/fetcher-eventstream",
3
- "version": "0.9.0",
3
+ "version": "0.9.2",
4
4
  "description": "Server-Sent Events (SSE) support for Fetcher HTTP client",
5
5
  "keywords": [
6
6
  "fetch",
@@ -33,7 +33,7 @@
33
33
  "dist"
34
34
  ],
35
35
  "dependencies": {
36
- "@ahoo-wang/fetcher": "0.9.0"
36
+ "@ahoo-wang/fetcher": "0.9.2"
37
37
  },
38
38
  "devDependencies": {
39
39
  "@vitest/coverage-v8": "^3.2.4",