fix: npm audit fixes, dependency cleanup (#945)

This commit is contained in:
Matthew Little
2022-01-04 17:57:49 +01:00
committed by GitHub
parent d6587fda02
commit 7ea3ae368f
6 changed files with 9706 additions and 31308 deletions

16558
client/package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -57,7 +57,7 @@
"eslint": "^7.25.0",
"eslint-config-prettier": "^8.3.0",
"eslint-plugin-prettier": "^3.4.0",
"http-server": "^0.12.3",
"http-server": "^14.0.0",
"microbundle": "^0.13.0",
"prettier": "^2.2.1",
"rimraf": "^3.0.2",

24426
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -94,17 +94,16 @@
},
"dependencies": {
"@apidevtools/json-schema-ref-parser": "^9.0.7",
"@promster/express": "^4.1.12",
"@promster/server": "^4.2.13",
"@promster/types": "^1.0.6",
"@promster/express": "^6.0.0",
"@promster/server": "^6.0.6",
"@promster/types": "^3.2.2",
"@stacks/network": "^1.0.0-beta.12",
"@stacks/stacking": "^v2.0.1",
"@stacks/transactions": "^v2.0.1",
"@types/dockerode": "^2.5.34",
"@types/express-list-endpoints": "^4.0.1",
"@types/lru-cache": "^5.1.1",
"@types/ws": "^7.2.5",
"big-integer": "^1.6.48",
"ajv": "^6.12.6",
"bignumber.js": "^9.0.1",
"bitcoinjs-lib": "^5.2.0",
"bluebird": "^3.7.2",
@@ -112,10 +111,8 @@
"c32check": "^1.1.3",
"chokidar": "^3.5.1",
"coinselect": "^3.1.12",
"compression": "^1.7.4",
"cors": "^2.8.5",
"cross-env": "^7.0.2",
"dockerode": "^3.3.1",
"dotenv": "^8.2.0",
"dotenv-flow": "^3.2.0",
"escape-goat": "^3.0.0",
@@ -129,7 +126,6 @@
"jsonrpc-lite": "^2.1.0",
"lru-cache": "^6.0.0",
"micro-base58": "^0.5.0",
"nock": "^13.1.1",
"node-fetch": "^2.6.0",
"node-pg-migrate": "^5.9.0",
"p-queue": "^6.3.0",
@@ -138,9 +134,8 @@
"pg-copy-streams": "^5.1.1",
"pg-cursor": "^2.6.0",
"pg-listen": "^1.7.0",
"prom-client": "^12.0.0",
"prom-client": "^14.0.1",
"rpc-bitcoin": "^2.0.0",
"smart-buffer": "^4.1.0",
"socket.io": "^4.0.1",
"source-map-support": "^0.5.19",
"split2": "^3.2.2",
@@ -164,13 +159,12 @@
"@types/ajv": "^1.0.0",
"@types/bluebird": "^3.5.30",
"@types/bn.js": "^4.11.6",
"@types/compression": "^1.7.0",
"@types/cors": "^2.8.6",
"@types/dotenv-flow": "^3.1.0",
"@types/express": "^4.17.12",
"@types/is-ci": "^3.0.0",
"@types/jest": "^27.0.3",
"@types/node": "^14.14.21",
"@types/node": "^16.11.7",
"@types/node-fetch": "^2.5.6",
"@types/pg": "^7.14.3",
"@types/pg-copy-streams": "^1.2.1",
@@ -180,29 +174,25 @@
"@types/uuid": "^7.0.3",
"@typescript-eslint/eslint-plugin": "^4.22.0",
"@typescript-eslint/parser": "^4.31.0",
"compare-versions": "^3.6.0",
"concurrently": "^6.4.0",
"docker-compose": "^0.23.5",
"eslint": "^7.25.0",
"eslint-config-prettier": "^8.3.0",
"eslint-plugin-prettier": "^3.4.0",
"eslint-plugin-tsdoc": "^0.2.14",
"gulp": "^4.0.2",
"husky": "^4.2.5",
"is-ci": "^3.0.1",
"jest": "^27.4.5",
"nock": "^13.1.1",
"nodemon": "^2.0.3",
"npm-api": "^1.0.0",
"pg-connection-string": "^2.5.0",
"prettier": "2.2.1",
"redoc-cli": "^0.9.12",
"rimraf": "^3.0.2",
"rpc-websocket-client": "^1.1.4",
"socket.io-client": "^4.0.1",
"supertest": "^4.0.2",
"ts-jest": "^27.1.2",
"ts-node": "^9.1.1",
"typedoc": "^0.20.30",
"why-is-node-running": "^2.2.0"
},
"optionalDependencies": {

View File

@@ -218,7 +218,6 @@ export function createTxRouter(db: DataStore): express.Router {
}
if (useEventSource) {
res.write(`event: tx\ndata: ${JSON.stringify(txQuery.result)}\n\n`);
res.flush();
}
} catch (error) {
// TODO: real error handling

View File

@@ -9,6 +9,7 @@ import {
} from 'jsonrpc-lite';
import * as WebSocket from 'ws';
import * as http from 'http';
import * as net from 'net';
import PQueue from 'p-queue';
import {
RpcTxUpdateSubscriptionParams,
@@ -132,7 +133,7 @@ export function createWsRpcRouter(db: DataStore, server: http.Server): WebSocket
const wsServer = new WebSocket.Server({ noServer: true, path: wsPath });
server.on('upgrade', (request: http.IncomingMessage, socket, head) => {
if (request.url?.startsWith(wsPath)) {
wsServer.handleUpgrade(request, socket, head, ws => {
wsServer.handleUpgrade(request, socket as net.Socket, head, ws => {
wsServer.emit('connection', ws, request);
});
}