Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update dependencies (fix security) #433

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 1 addition & 6 deletions lib/net.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,12 +66,7 @@ module.exports = {
Transport: sock.Transport,
Server,
createServer: (options, listener) => createServer(options, listener),
connect: (app, client, ...options) =>
connect(
app,
client,
...options
),
connect: (app, client, ...options) => connect(app, client, ...options),
connectAndInspect: (app, client, interfaces, ...options) =>
connectAndInspect(app, client, interfaces, ...options),
reconnect: (connection, ...options) => reconnect(connection, ...options),
Expand Down
7 changes: 1 addition & 6 deletions lib/tls.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,12 +66,7 @@ module.exports = {
Transport: sock.Transport,
Server,
createServer: (options, listener) => createServer(options, listener),
connect: (app, client, ...options) =>
connect(
app,
client,
...options
),
connect: (app, client, ...options) => connect(app, client, ...options),
connectAndInspect: (app, client, interfaces, ...options) =>
connectAndInspect(app, client, interfaces, ...options),
reconnect: (connection, ...options) => reconnect(connection, ...options),
Expand Down
57 changes: 26 additions & 31 deletions lib/transport-common.js
Original file line number Diff line number Diff line change
Expand Up @@ -134,39 +134,34 @@ const newConnectAndInspectFn = (connFactory, transportClass, transportName) => {
const connect = newConnectFn(connFactory, transportClass, transportName);
return (app, client, interfaces, ...options) => {
const callback = common.extractCallback(options);
connect(
app,
client,
...options,
(error, connection) => {
if (error) {
callback(error);
return;
}
const proxies = Object.create(null);
let errored = false;
const len = interfaces.length;
let count = 0;
if (len === 0) {
callback(null, connection, proxies);
return;
}
interfaces.forEach(name => {
connection.inspectInterface(name, (error, proxy) => {
if (!errored) {
count++;
if (error) {
errored = true;
callback(error, connection);
return;
}
proxies[name] = proxy;
if (count === len) callback(null, connection, proxies);
connect(app, client, ...options, (error, connection) => {
if (error) {
callback(error);
return;
}
const proxies = Object.create(null);
let errored = false;
const len = interfaces.length;
let count = 0;
if (len === 0) {
callback(null, connection, proxies);
return;
}
interfaces.forEach(name => {
connection.inspectInterface(name, (error, proxy) => {
if (!errored) {
count++;
if (error) {
errored = true;
callback(error, connection);
return;
}
});
proxies[name] = proxy;
if (count === len) callback(null, connection, proxies);
}
});
}
);
});
});
};
};

Expand Down
8 changes: 1 addition & 7 deletions lib/ws-browser.js
Original file line number Diff line number Diff line change
Expand Up @@ -112,13 +112,7 @@ const reconnect = transportCommon.newReconnectFn(socketFactory, Transport);

module.exports = {
Transport,
connect: (app, client, url, callback) =>
connect(
app,
client,
url,
callback
),
connect: (app, client, url, callback) => connect(app, client, url, callback),
connectAndInspect: (app, client, interfaces, url, callback) =>
connectAndInspect(app, client, interfaces, url, callback),
reconnect: (connection, url, callback) =>
Expand Down
7 changes: 1 addition & 6 deletions lib/ws-internal.js
Original file line number Diff line number Diff line change
Expand Up @@ -157,12 +157,7 @@ module.exports = {
// webSocketConfig - web socket client configuration
// (see connectionFactory)
connect: (app, client, webSocketConfig, ...options) =>
connect(
app,
client,
webSocketConfig,
...options
),
connect(app, client, webSocketConfig, ...options),
// see transportCommon.newConnectAndInspectFn
// webSocketConfig - web socket client configuration
// (see connectionFactory)
Expand Down
Loading