remove pws.

This commit is contained in:
fiatjaf
2021-01-16 19:55:37 -03:00
parent 0be9c408be
commit 63259eb7c3
3 changed files with 3 additions and 10 deletions

View File

@@ -1,6 +1,6 @@
{ {
"name": "nostr-tools", "name": "nostr-tools",
"version": "0.1.4", "version": "0.2.0",
"description": "Tools for making a Nostr client.", "description": "Tools for making a Nostr client.",
"main": "index.js", "main": "index.js",
"repository": { "repository": {
@@ -9,8 +9,7 @@
}, },
"dependencies": { "dependencies": {
"buffer": "^6.0.3", "buffer": "^6.0.3",
"noble-secp256k1": "^1.1.1", "noble-secp256k1": "^1.1.1"
"pws": "^5.0.2"
}, },
"keywords": [ "keywords": [
"decentralization", "decentralization",

View File

@@ -1,4 +1,3 @@
import PersistentWebSocket from 'pws'
import {verifySignature} from './event' import {verifySignature} from './event'
export function normalizeRelayURL(url) { export function normalizeRelayURL(url) {
@@ -12,7 +11,7 @@ export function normalizeRelayURL(url) {
export function relayConnect(url, onEvent, onNotice) { export function relayConnect(url, onEvent, onNotice) {
url = normalizeRelayURL(url) url = normalizeRelayURL(url)
const ws = new PersistentWebSocket( const ws = new WebSocket(
url + (url.indexOf('?') !== -1 ? '&' : '?') + `session=${Math.random()}`, url + (url.indexOf('?') !== -1 ? '&' : '?') + `session=${Math.random()}`,
{ {
pingTimeout: 180 * 1000 pingTimeout: 180 * 1000

View File

@@ -1165,11 +1165,6 @@ picomatch@^2.2.2:
resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.2.2.tgz#21f333e9b6b8eaff02468f5146ea406d345f4dad" resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.2.2.tgz#21f333e9b6b8eaff02468f5146ea406d345f4dad"
integrity sha512-q0M/9eZHzmr0AulXyPwNfZjtwZ/RBZlbN3K3CErVrk50T2ASYI7Bye0EvekFY3IP1Nt2DHu0re+V2ZHIpMkuWg== integrity sha512-q0M/9eZHzmr0AulXyPwNfZjtwZ/RBZlbN3K3CErVrk50T2ASYI7Bye0EvekFY3IP1Nt2DHu0re+V2ZHIpMkuWg==
pws@^5.0.2:
version "5.0.2"
resolved "https://registry.yarnpkg.com/pws/-/pws-5.0.2.tgz#86b581ad5e811417d514f06868ae4d9c71bdaa48"
integrity sha512-V4ZwsJIAiG9YoNv1IO/JSoapG9NrwRhmKKdQ0C7q0tBIxBTptGeTBhdnE53o5qrcoEHDqw5Mc3T1XF0NlvHTlQ==
randombytes@^2.1.0: randombytes@^2.1.0:
version "2.1.0" version "2.1.0"
resolved "https://registry.yarnpkg.com/randombytes/-/randombytes-2.1.0.tgz#df6f84372f0270dc65cdf6291349ab7a473d4f2a" resolved "https://registry.yarnpkg.com/randombytes/-/randombytes-2.1.0.tgz#df6f84372f0270dc65cdf6291349ab7a473d4f2a"