🎩 You're Invited:Meet the Socket team at Black Hat in Las Vegas, August 3-6.RSVP
Sign In

@standardserver/peer

Package Overview
Dependencies
Maintainers
1
Versions
38
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@standardserver/peer - npm Package Compare versions

Comparing version
0.4.1
to
0.4.2
+6
-2
dist/index.d.mts

@@ -1,2 +0,2 @@

import { StandardRequest, EventStreamMessage, StandardResponse, StandardLazyResponse, StandardLazyRequest } from '@standardserver/core';
import { StandardRequest, EventMeta, StandardResponse, StandardLazyResponse, StandardLazyRequest } from '@standardserver/core';
import { Queue, AsyncCleanupFn, AsyncIteratorClass } from '@standardserver/shared';

@@ -91,4 +91,8 @@

*/
json: Omit<EventStreamMessage, 'data'> & {
json: EventMeta & {
/**
* Kind of event
*/
event: 'message' | 'error' | 'close';
/**
* Event data.

@@ -95,0 +99,0 @@ */

@@ -1,2 +0,2 @@

import { StandardRequest, EventStreamMessage, StandardResponse, StandardLazyResponse, StandardLazyRequest } from '@standardserver/core';
import { StandardRequest, EventMeta, StandardResponse, StandardLazyResponse, StandardLazyRequest } from '@standardserver/core';
import { Queue, AsyncCleanupFn, AsyncIteratorClass } from '@standardserver/shared';

@@ -91,4 +91,8 @@

*/
json: Omit<EventStreamMessage, 'data'> & {
json: EventMeta & {
/**
* Kind of event
*/
event: 'message' | 'error' | 'close';
/**
* Event data.

@@ -95,0 +99,0 @@ */

@@ -463,3 +463,3 @@ import { AsyncIteratorClass, isTypescriptObject, isAsyncIteratorObject, Queue, SequentialIdGenerator, AbortError, stringifyJSON } from '@standardserver/shared';

}
if (maybe.json.event !== void 0 && typeof maybe.json.event !== "string") {
if (maybe.json.event !== "message" && maybe.json.event !== "error" && maybe.json.event !== "close") {
return false;

@@ -476,3 +476,3 @@ }

function isPeerOctetStreamMessage(maybe) {
return maybe.kind === "octet-stream" && isTypescriptObject(maybe.json) && typeof maybe.json.close === "boolean";
return maybe.kind === "octet-stream" && isTypescriptObject(maybe.json) && (typeof maybe.json.close === "undefined" || typeof maybe.json.close === "boolean");
}

@@ -479,0 +479,0 @@ function isPeerStreamCancelMessage(maybe) {

{
"name": "@standardserver/peer",
"type": "module",
"version": "0.4.1",
"version": "0.4.2",
"license": "MIT",

@@ -25,4 +25,4 @@ "homepage": "https://standardserver.dev",

"dependencies": {
"@standardserver/shared": "0.4.1",
"@standardserver/core": "0.4.1"
"@standardserver/shared": "0.4.2",
"@standardserver/core": "0.4.2"
},

@@ -29,0 +29,0 @@ "scripts": {