From e6cd15adee58ad1170e9d41509f0c92f02d2c556 Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Fri, 6 Aug 2021 15:52:11 +0000
Subject: [PATCH] chore(deps-dev): Bump @types/ws from 7.4.1 to 7.4.7 (#177)
Bumps [@types/ws](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/ws) from 7.4.1 to 7.4.7.
Commits
[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=@types/ws&package-manager=npm_and_yarn&previous-version=7.4.1&new-version=7.4.7)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)
Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`.
[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)
---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
---
package-lock.json | 6 +++---
package.json | 2 +-
src/lib/PoWebClient.ts | 2 +-
3 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/package-lock.json b/package-lock.json
index ddf7f538..02517050 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -2915,9 +2915,9 @@
"integrity": "sha512-9UjMCHK5GPgQRoNbqdLIAvAy0EInuiqbW0PBMtVP6B5B2HQJlvoJHM+KodPZMEjOa5VkSc+5LH7xy+cUzQdmHw=="
},
"@types/ws": {
- "version": "7.4.1",
- "resolved": "https://registry.npmjs.org/@types/ws/-/ws-7.4.1.tgz",
- "integrity": "sha512-ISCK1iFnR+jYv7+jLNX0wDqesZ/5RAeY3wUx6QaphmocphU61h+b+PHjS18TF4WIPTu/MMzxIq2PHr32o2TS5Q==",
+ "version": "7.4.7",
+ "resolved": "https://registry.npmjs.org/@types/ws/-/ws-7.4.7.tgz",
+ "integrity": "sha512-JQbbmxZTZehdc2iszGKs5oC3NFnjeay7mtAWrdt7qNtAVK0g19muApzAy4bm9byz79xa2ZnO/BOBC2R8RC5Lww==",
"dev": true,
"requires": {
"@types/node": "*"
diff --git a/package.json b/package.json
index cb7a7a94..16679928 100644
--- a/package.json
+++ b/package.json
@@ -54,7 +54,7 @@
"@relaycorp/ws-mock": "^2.4.1",
"@types/jest": "^26.0.24",
"@types/verror": "^1.10.5",
- "@types/ws": "^7.4.1",
+ "@types/ws": "^7.4.7",
"axios-mock-adapter": "^1.19.0",
"del-cli": "^4.0.1",
"jest": "^27.0.6",
diff --git a/src/lib/PoWebClient.ts b/src/lib/PoWebClient.ts
index e06424fe..ec528b42 100644
--- a/src/lib/PoWebClient.ts
+++ b/src/lib/PoWebClient.ts
@@ -296,7 +296,7 @@ export class PoWebClient implements GSCClient {
ws.once('message', async (message) => {
let challenge: HandshakeChallenge;
try {
- challenge = HandshakeChallenge.deserialize(bufferToArray(message));
+ challenge = HandshakeChallenge.deserialize(bufferToArray(message as Buffer));
} catch (error) {
ws.close(WebSocketCode.CANNOT_ACCEPT, 'Malformed handshake challenge');
reject(