Socket
Socket
Sign inDemoInstall

metro-inspector-proxy

Package Overview
Dependencies
Maintainers
2
Versions
70
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

metro-inspector-proxy - npm Package Compare versions

Comparing version 0.53.0 to 0.53.1

2

package.json
{
"name": "metro-inspector-proxy",
"version": "0.53.0",
"version": "0.53.1",
"description": "metro-inspector-proxy",

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

@@ -11,14 +11,7 @@ /**

"use strict";
/**
* Runs new HTTP Server and attaches Inspector Proxy to it.
*/
const connect = require("connect");
const http = require("http");
const yargs = require("yargs");
const _require = require("./index"),
InspectorProxy = _require.InspectorProxy;
runInspectorProxy = _require.runInspectorProxy;

@@ -31,8 +24,2 @@ yargs.option("port", {

});
const inspectorProxy = new InspectorProxy();
const app = connect();
app.use(inspectorProxy.processRequest.bind(inspectorProxy));
const httpServer = http.createServer(app);
httpServer.listen(yargs.argv.port, "127.0.0.1", () => {
inspectorProxy.addWebSocketListener(httpServer);
});
runInspectorProxy(yargs.argv.port);

@@ -12,6 +12,24 @@ /**

const InspectorProxy = require("./InspectorProxy");
const InspectorProxy = require("./InspectorProxy"); // Runs new HTTP Server and attaches Inspector Proxy to it.
// Requires are inlined here because we don't want to import them
// when someone needs only InspectorProxy instance (without starting
// new HTTP server).
function runInspectorProxy(port) {
const inspectorProxy = new InspectorProxy();
const app = require("connect")();
app.use(inspectorProxy.processRequest.bind(inspectorProxy));
const httpServer = require("http").createServer(app);
httpServer.listen(port, "127.0.0.1", () => {
inspectorProxy.addWebSocketListener(httpServer);
});
}
module.exports = {
InspectorProxy
InspectorProxy,
runInspectorProxy
};

Sorry, the diff of this file is not supported yet

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