Socket
Socket
Sign inDemoInstall

xoh-xapi

Package Overview
Dependencies
0
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 2.0.4 to 2.0.5

8

dist/helpers.d.ts

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

import { WebSocket } from 'ws';
import WebSocketNoBrowser from 'ws';
export declare function createCustomTag(): string;

@@ -15,11 +15,11 @@ export interface ACCOUNT {

export declare class SocketManager {
static send: (webSocket: WebSocket, body: string, customTag: string) => Promise<unknown>;
static send: (webSocket: WebSocket | WebSocketNoBrowser, body: string, customTag: string) => Promise<unknown>;
}
export declare class Request {
protected webSocket: WebSocket;
protected webSocket: WebSocket | WebSocketNoBrowser;
protected body: REQUEST_BODY;
protected customTag: string;
constructor(webSocket: WebSocket, body: REQUEST_BODY);
constructor(webSocket: WebSocket | WebSocketNoBrowser, body: REQUEST_BODY);
isValid(): boolean;
send: () => Promise<unknown>;
}

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

import { WebSocket } from 'ws';
import WebSocketNoBrowser from 'ws';
export interface STREAM_REQUEST {

@@ -10,3 +10,3 @@ symbol?: string;

host: string;
socket: WebSocket;
socket: WebSocket | WebSocketNoBrowser;
requests: Array<STREAM_REQUEST>;

@@ -13,0 +13,0 @@ socketOpen?: boolean;

@@ -11,4 +11,7 @@ "use strict";

};
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
const ws_1 = require("ws");
const ws_1 = __importDefault(require("ws"));
const periods_1 = require("./constants/periods");

@@ -33,3 +36,3 @@ class Streamer {

this.socketOpen = false;
rejected(error);
rejected("WebSocket error");
};

@@ -275,3 +278,10 @@ this.socket.onclose = (e) => {

this.socketOpen = false;
this.socket = new ws_1.WebSocket(this.host);
if (typeof process === 'object' &&
typeof process.versions === 'object' &&
typeof process.versions.node !== 'undefined') {
this.socket = new ws_1.default(this.host);
}
else {
this.socket = new WebSocket(this.host);
}
this.requests = [];

@@ -278,0 +288,0 @@ (() => __awaiter(this, void 0, void 0, function* () {

@@ -51,3 +51,3 @@ "use strict";

this.loginStatus = false;
onError(e.message);
onError("Websocket error");
};

@@ -86,3 +86,3 @@ this.webSocket.onclose = (e) => {

this.loginStatus = false;
rejected(e.message);
rejected("Websocket Error");
};

@@ -654,5 +654,12 @@ this.webSocket.onclose = (e) => {

//set websocket
this.webSocket = new ws_1.default(this.host);
if (typeof process === 'object' &&
typeof process.versions === 'object' &&
typeof process.versions.node !== 'undefined') {
this.webSocket = new ws_1.default(this.host);
}
else {
this.webSocket = new WebSocket(this.host);
}
}
}
exports.default = Xapi;
{
"name": "xoh-xapi",
"version": "2.0.4",
"version": "2.0.5",
"description": "X Open Hub API",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc