reduce browser bundle size

reduces browser bundle size by ~612k or ~92%.
This commit is contained in:
Stefan Aebischer
2021-05-15 19:34:32 +02:00
parent c5fb3f2b02
commit 082633a5ca
8 changed files with 38 additions and 464 deletions

View File

@@ -2,7 +2,8 @@ import { EventEmitter } from 'events';
import { InverseClient } from './inverse-client';
import { LinearClient } from './linear-client';
import { DefaultLogger } from './logger';
import { signMessage, serializeParams, isWsPong } from './util/requestUtils';
import { signMessage } from './util/node-support';
import { serializeParams, isWsPong } from './util/requestUtils';
import WebSocket from 'isomorphic-ws';
import WsStore from './util/WsStore';
@@ -250,7 +251,7 @@ export class WebsocketClient extends EventEmitter {
expires: (Date.now() + timeOffset + 5000)
};
params.signature = signMessage('GET/realtime' + params.expires, secret);
params.signature = await signMessage('GET/realtime' + params.expires, secret);
return '?' + serializeParams(params);
} else if (!key || !secret) {