@arrirpc/server 0.49.0 → 0.50.0

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.cjs CHANGED
@@ -569,32 +569,6 @@ class EventStreamConnection {
569
569
  data: JSON.stringify(errorResponse)
570
570
  });
571
571
  }
572
- // /**
573
- // * Push a custom event. These events will need to be parsed manually using the `onEvent` hooks of any generated clients.
574
- // * Note events with the name "error" or "message" cannot be used for custom events.
575
- // */
576
- // async pushCustomEvent(event: SseEvent): Promise<void> {
577
- // if (event.event === "message") {
578
- // throw new Error(
579
- // `Event type "message" is the default event type. Therefore it cannot be used when pushing custom events.`,
580
- // );
581
- // }
582
- // if (event.event === "error") {
583
- // throw new Error(
584
- // `Event type "error" is reserved for the pushError() method. Therefore it cannot be used when pushing custom events.`,
585
- // );
586
- // }
587
- // }
588
- /**
589
- * Publish an error event. This will trigger the `onError` hooks of any connected clients.
590
- */
591
- async pushError(error, eventId) {
592
- await this.eventStream.push({
593
- id: eventId,
594
- event: "error",
595
- data: JSON.stringify(error)
596
- });
597
- }
598
572
  cleanup() {
599
573
  if (this.pingInterval) {
600
574
  clearInterval(this.pingInterval);
package/dist/index.d.cts CHANGED
@@ -110,10 +110,6 @@ declare class EventStreamConnection<TData> {
110
110
  */
111
111
  push(data: TData[], eventId?: string): Promise<void>;
112
112
  push(data: TData, eventId?: string): Promise<void>;
113
- /**
114
- * Publish an error event. This will trigger the `onError` hooks of any connected clients.
115
- */
116
- pushError(error: ArriServerErrorResponse, eventId?: string): Promise<void>;
117
113
  private cleanup;
118
114
  /**
119
115
  * Tell clients that the stream has ended and close the connection.
package/dist/index.d.mts CHANGED
@@ -110,10 +110,6 @@ declare class EventStreamConnection<TData> {
110
110
  */
111
111
  push(data: TData[], eventId?: string): Promise<void>;
112
112
  push(data: TData, eventId?: string): Promise<void>;
113
- /**
114
- * Publish an error event. This will trigger the `onError` hooks of any connected clients.
115
- */
116
- pushError(error: ArriServerErrorResponse, eventId?: string): Promise<void>;
117
113
  private cleanup;
118
114
  /**
119
115
  * Tell clients that the stream has ended and close the connection.
package/dist/index.d.ts CHANGED
@@ -110,10 +110,6 @@ declare class EventStreamConnection<TData> {
110
110
  */
111
111
  push(data: TData[], eventId?: string): Promise<void>;
112
112
  push(data: TData, eventId?: string): Promise<void>;
113
- /**
114
- * Publish an error event. This will trigger the `onError` hooks of any connected clients.
115
- */
116
- pushError(error: ArriServerErrorResponse, eventId?: string): Promise<void>;
117
113
  private cleanup;
118
114
  /**
119
115
  * Tell clients that the stream has ended and close the connection.
package/dist/index.mjs CHANGED
@@ -568,32 +568,6 @@ class EventStreamConnection {
568
568
  data: JSON.stringify(errorResponse)
569
569
  });
570
570
  }
571
- // /**
572
- // * Push a custom event. These events will need to be parsed manually using the `onEvent` hooks of any generated clients.
573
- // * Note events with the name "error" or "message" cannot be used for custom events.
574
- // */
575
- // async pushCustomEvent(event: SseEvent): Promise<void> {
576
- // if (event.event === "message") {
577
- // throw new Error(
578
- // `Event type "message" is the default event type. Therefore it cannot be used when pushing custom events.`,
579
- // );
580
- // }
581
- // if (event.event === "error") {
582
- // throw new Error(
583
- // `Event type "error" is reserved for the pushError() method. Therefore it cannot be used when pushing custom events.`,
584
- // );
585
- // }
586
- // }
587
- /**
588
- * Publish an error event. This will trigger the `onError` hooks of any connected clients.
589
- */
590
- async pushError(error, eventId) {
591
- await this.eventStream.push({
592
- id: eventId,
593
- event: "error",
594
- data: JSON.stringify(error)
595
- });
596
- }
597
571
  cleanup() {
598
572
  if (this.pingInterval) {
599
573
  clearInterval(this.pingInterval);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arrirpc/server",
3
- "version": "0.49.0",
3
+ "version": "0.50.0",
4
4
  "type": "module",
5
5
  "license": "MIT",
6
6
  "author": {
@@ -29,14 +29,14 @@
29
29
  "scule": "^1.3.0",
30
30
  "source-map-support": "^0.5.21",
31
31
  "uncrypto": "^0.1.3",
32
- "@arrirpc/codegen-kotlin": "0.49.0",
33
- "@arrirpc/codegen-dart": "0.49.0",
34
- "@arrirpc/codegen-ts": "0.49.0",
35
- "@arrirpc/codegen-utils": "0.49.0",
36
- "@arrirpc/schema": "0.49.0",
37
- "arri": "0.49.0"
32
+ "@arrirpc/codegen-dart": "0.50.0",
33
+ "@arrirpc/codegen-kotlin": "0.50.0",
34
+ "@arrirpc/codegen-utils": "0.50.0",
35
+ "@arrirpc/codegen-ts": "0.50.0",
36
+ "arri": "0.50.0",
37
+ "@arrirpc/schema": "0.50.0"
38
38
  },
39
39
  "devDependencies": {
40
- "bun-types": "^1.1.12"
40
+ "bun-types": "^1.1.13"
41
41
  }
42
42
  }