@crypticat/core
Advanced tools
Comparing version 0.1.5 to 0.1.6
/// <reference types="node" /> | ||
import WebSocket from 'ws'; | ||
import WebSocket from 'universal-websocket-client'; | ||
import { DiffieHellman, Cipher, Decipher } from 'crypto'; | ||
@@ -4,0 +4,0 @@ import { EventEmitter } from 'events'; |
@@ -15,3 +15,3 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
const ws_1 = __importDefault(require("ws")); | ||
const universal_websocket_client_1 = __importDefault(require("universal-websocket-client")); | ||
const crypto_1 = __importDefault(require("crypto")); | ||
@@ -34,3 +34,3 @@ const lib_1 = require("./lib"); | ||
return __awaiter(this, void 0, void 0, function* () { | ||
this.ws = new ws_1.default(address); | ||
this.ws = new universal_websocket_client_1.default(address); | ||
yield new Promise((resolve, reject) => { | ||
@@ -37,0 +37,0 @@ lib_1.assertDefined(this.ws); |
@@ -1,3 +0,2 @@ | ||
import WebSocket from 'ws'; | ||
export declare const waitFor: <T>(ws: WebSocket, wantedAction: string) => Promise<T>; | ||
export declare const waitFor: <T>(ws: any, wantedAction: string) => Promise<T>; | ||
export declare function assertDefined<T>(thing: T): asserts thing is NonNullable<T>; |
@@ -41,2 +41,3 @@ "use strict"; | ||
} | ||
lib_1.assertDefined(this.wss); | ||
this.wss.on('connection', (ws) => __awaiter(this, void 0, void 0, function* () { | ||
@@ -43,0 +44,0 @@ const uid = yield uid_promise_1.default(20); |
{ | ||
"name": "@crypticat/core", | ||
"version": "0.1.5", | ||
"version": "0.1.6", | ||
"description": "Crypticat's core client and server implementation", | ||
@@ -25,12 +25,9 @@ "author": "Kognise <felix.mattick@gmail.com>", | ||
"dependencies": { | ||
"typescript": "^3.8.3", | ||
"uid-promise": "^1.1.0", | ||
"ws": "^7.2.3" | ||
"isomorphic-ws": "^4.0.1", | ||
"uid-promise": "^1.1.0" | ||
}, | ||
"devDependencies": { | ||
"@types/node": "^13.9.5", | ||
"@types/ws": "^7.2.3", | ||
"typescript": "^3.8.3" | ||
}, | ||
"gitHead": "611a587b42e6320bcfa7afca71062b24d9d46994" | ||
} | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
30046
2
2
+ Addedisomorphic-ws@^4.0.1
+ Addedisomorphic-ws@4.0.1(transitive)
+ Addedws@8.18.0(transitive)
- Removedtypescript@^3.8.3
- Removedws@^7.2.3
- Removedtypescript@3.9.10(transitive)
- Removedws@7.5.10(transitive)