Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

chrome-remote-multiplex

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

chrome-remote-multiplex - npm Package Compare versions

Comparing version 0.1.6 to 0.1.8

67

dist/multiplex.js

@@ -632,2 +632,7 @@ 'use strict';

/**
* Starts the HTTP server
*/
_createClass(MultiplexServer, [{

@@ -701,3 +706,3 @@ key: 'listen',

// Gets JSON from the remote server and copies it to the client
// Gets data from the remote server and copies it to the client
function copyToClient(req, res) {

@@ -790,3 +795,3 @@ return httpGet({

var webServer = Http.createServer(app);
var webServer = this.webServer = Http.createServer(app);
var proxies = this._proxies = {};

@@ -861,4 +866,4 @@

value: function close() {
this.express.close();
this.express = null;
this.webServer.close();
this.webServer = null;
}

@@ -932,2 +937,55 @@

/**
* API for remote control of the MultiplexServer
*/
exports.default = MultiplexServer;
var ClientApi = exports.ClientApi = function () {
function ClientApi(options) {
_classCallCheck(this, ClientApi);
options = options || {};
var remoteClient = options.remoteClient;
if (remoteClient !== undefined) {
var m = remoteClient.match(/^([^:]+)(:([0-9]+))?$/);
if (m) {
options.remoteClientHostname = m[1];
options.remoteClientPort = m[3];
} else {
throw new Error("Cannot interpret remoteClient - found " + remoteClient + ", expected something like 'localhost:9222'");
}
}
this.options = {
remoteClientHostname: options.remoteClientHostname || "localhost",
remoteClientPort: options.remoteClientPort || 9222
};
this.options.remoteClient = this.options.remoteClientHostname + ":" + this.options.remoteClientPort;
}
/**
* Enables auto close for a specific target
*/
_createClass(ClientApi, [{
key: 'autoClose',
value: function autoClose(id) {
var t = this;
return httpGet({
hostname: t.options.remoteClientHostname,
port: t.options.remoteClientPort,
path: '/json/auto-close/' + id,
method: 'GET'
}).then(function (obj) {
res.send(obj.data);
return obj.data;
});
}
}]);
return ClientApi;
}();
/**
* Does a simple HTTP GET

@@ -938,3 +996,2 @@ * @return Promise - payload is the response context

exports.default = MultiplexServer;
function httpGet(options) {

@@ -941,0 +998,0 @@ return new Promise(function (resolve, reject) {

2

package.json
{
"name": "chrome-remote-multiplex",
"version": "0.1.6",
"version": "0.1.8",
"description": "Allows multiple Chrome DevTools Clients to connect to a single Remote Debugger (ie Chrome Headless) instance",

@@ -5,0 +5,0 @@ "main": "index.js",

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc