simple-helix-api
Advanced tools
Comparing version 4.1.2 to 4.1.4
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
"TERMINATED"; |
@@ -32,6 +32,5 @@ "use strict"; | ||
if (query) { | ||
endpoint += "?" | ||
+ (typeof query === "object" | ||
? new URLSearchParams(query).toString() | ||
: query); | ||
endpoint += "?" + (typeof query === "object" | ||
? new URLSearchParams(query).toString() | ||
: query); | ||
} | ||
@@ -38,0 +37,0 @@ return await this.request(endpoint, data, { method }); |
@@ -46,3 +46,3 @@ "use strict"; | ||
this.connection = new reconnecting_websocket_1.default(endpoint, "irc", { | ||
WebSocket: ws_1.default, | ||
WebSocket: global?.WebSocket || ws_1.default, | ||
maxRetries: Infinity, | ||
@@ -58,2 +58,9 @@ startClosed: true | ||
} | ||
disconnect() { | ||
if (this.connection.readyState !== this.connection.OPEN) { | ||
return false; | ||
} | ||
this.connection.close(4003, "Manual disconnecting"); | ||
return true; | ||
} | ||
prepareMessage(data) { | ||
@@ -60,0 +67,0 @@ const ircMessage = data.trim(); |
{ | ||
"name": "simple-helix-api", | ||
"version": "4.1.2", | ||
"version": "4.1.4", | ||
"description": "The Simple Helix API allows developers to easily develop applications for Twitch", | ||
@@ -10,18 +10,18 @@ "main": "./dist/index.js", | ||
"dependencies": { | ||
"axios": "1.5.0", | ||
"axios": "1.6.7", | ||
"irc-message": "^3.0.2", | ||
"irc-message-ts": "^3.0.6", | ||
"reconnecting-websocket": "^4.4.0", | ||
"ws": "^8.14.1" | ||
"ws": "^8.16.0" | ||
}, | ||
"devDependencies": { | ||
"@types/jest": "^29.5.4", | ||
"@types/ws": "^8.5.5", | ||
"@typescript-eslint/eslint-plugin": "^6.6.0", | ||
"@typescript-eslint/parser": "^6.6.0", | ||
"dotenv": "^16.3.1", | ||
"eslint": "^8.49.0", | ||
"jest": "^29.6.4", | ||
"ts-jest": "^29.1.1", | ||
"typescript": "^5.2.2" | ||
"@types/jest": "^29.5.12", | ||
"@types/ws": "^8.5.10", | ||
"@typescript-eslint/eslint-plugin": "^7.0.2", | ||
"@typescript-eslint/parser": "^7.0.2", | ||
"dotenv": "^16.4.5", | ||
"eslint": "^8.57.0", | ||
"jest": "^29.7.0", | ||
"ts-jest": "^29.1.2", | ||
"typescript": "^5.3.3" | ||
}, | ||
@@ -28,0 +28,0 @@ "resolutions": { |
import { TFirst, TList } from "./common"; | ||
export type TPollStatus = "ACTIVE" | "COMPLETED" | "TERMINATED" | "ARCHIVED" | "MODERATED" | "INVALID"; | ||
export type TEndPollStatus = "ARCHIVED"; | ||
export type TEndPollStatus = "ARCHIVED" | "TERMINATED"; | ||
type TPollChoiceNative = { | ||
@@ -5,0 +5,0 @@ id: string; |
@@ -22,2 +22,3 @@ /// <reference types="node" /> | ||
connect(username: string, password: string, channels?: string[], options?: TChatOptions): Promise<TMIClient>; | ||
disconnect(): boolean; | ||
private prepareMessage; | ||
@@ -24,0 +25,0 @@ private auth; |
AI-detected potential code anomaly
Supply chain riskAI has identified unusual behaviors that may pose a security risk.
Found 1 instance in 1 package
106102
99
2811
1
+ Addedaxios@1.6.7(transitive)
- Removedaxios@1.5.0(transitive)
Updatedaxios@1.6.7
Updatedws@^8.16.0