@gjsify/eventsource 0.4.21 → 0.4.22

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 +1 @@
1
- import{EventSource as e}from"./index.js";import{Event as t,EventTarget as n,MessageEvent as r}from"@gjsify/dom-events";globalThis.Event===void 0&&(globalThis.Event=t),globalThis.EventTarget===void 0&&(globalThis.EventTarget=n),globalThis.MessageEvent===void 0&&(globalThis.MessageEvent=r),globalThis.EventSource===void 0&&(globalThis.EventSource=e);
1
+ import{EventSource as e}from"./index.js";import{Event as t,EventTarget as n,MessageEvent as r}from"@gjsify/dom-events";const i=globalThis;globalThis.Event===void 0&&(i.Event=t),globalThis.EventTarget===void 0&&(i.EventTarget=n),globalThis.MessageEvent===void 0&&(i.MessageEvent=r),globalThis.EventSource===void 0&&(i.EventSource=e);
@@ -1,4 +1,7 @@
1
1
  import '@gjsify/web-streams/register';
2
+ declare const _EventTarget: {
3
+ new (): EventTarget;
4
+ };
2
5
  /**
3
6
  * TextLineStream splits a string stream into individual lines.
4
7
  * Handles \n, \r\n, and standalone \r line endings.
@@ -10,14 +13,13 @@ declare class TextLineStream extends TransformStream<string, string> {
10
13
  export interface EventSourceInit {
11
14
  withCredentials?: boolean;
12
15
  }
13
- declare const EventSource_base: any;
14
16
  /**
15
17
  * EventSource — W3C Server-Sent Events API.
16
18
  *
17
19
  * Connects to an SSE endpoint via fetch, pipes the response through
18
20
  * TextDecoderStream and TextLineStream, then parses SSE fields.
19
21
  */
20
- export declare class EventSource extends EventSource_base {
22
+ export declare class EventSource extends _EventTarget {
21
23
  #private;
22
24
  static readonly CONNECTING = 0;
23
25
  static readonly OPEN = 1;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gjsify/eventsource",
3
- "version": "0.4.21",
3
+ "version": "0.4.22",
4
4
  "description": "W3C EventSource (Server-Sent Events) for GJS",
5
5
  "type": "module",
6
6
  "module": "lib/esm/index.js",
@@ -43,13 +43,13 @@
43
43
  "server-sent-events"
44
44
  ],
45
45
  "dependencies": {
46
- "@gjsify/dom-events": "^0.4.21",
47
- "@gjsify/web-streams": "^0.4.21"
46
+ "@gjsify/dom-events": "^0.4.22",
47
+ "@gjsify/web-streams": "^0.4.22"
48
48
  },
49
49
  "devDependencies": {
50
- "@gjsify/cli": "^0.4.21",
51
- "@gjsify/unit": "^0.4.21",
52
- "@types/node": "^25.6.2",
50
+ "@gjsify/cli": "^0.4.22",
51
+ "@gjsify/unit": "^0.4.22",
52
+ "@types/node": "^25.9.1",
53
53
  "typescript": "^6.0.3"
54
54
  }
55
55
  }