feat(xo-lib): allow passing opts to JsonRpcWebSocketClient
This commit is contained in:
@@ -13,8 +13,9 @@ export class XoError extends BaseError {}
|
|||||||
// -------------------------------------------------------------------
|
// -------------------------------------------------------------------
|
||||||
|
|
||||||
export default class Xo extends JsonRpcWebSocketClient {
|
export default class Xo extends JsonRpcWebSocketClient {
|
||||||
constructor({ credentials, url = '.' } = {}) {
|
constructor({ credentials, url = '.', ...opts } = {}) {
|
||||||
super(`${trimEnd(url, '/')}/api/`)
|
opts.url = `${trimEnd(url, '/')}/api/`
|
||||||
|
super(opts)
|
||||||
|
|
||||||
this._credentials = credentials
|
this._credentials = credentials
|
||||||
this._user = null
|
this._user = null
|
||||||
|
|||||||
Reference in New Issue
Block a user