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.54.0 to 0.54.1

2

package.json
{
"name": "metro-inspector-proxy",
"version": "0.54.0",
"version": "0.54.1",
"description": "metro-inspector-proxy",

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

@@ -24,4 +24,7 @@ /**

const EMULATOR_LOCALHOST_ADDRESSES = ["10.0.2.2", "10.0.3.2"];
const EMULATOR_LOCALHOST_ADDRESSES = ["10.0.2.2", "10.0.3.2"]; // Prefix for script URLs that are alphanumeric IDs. See comment in _processMessageFromDevice method for
// more details.
const FILE_PREFIX = "file://";
/**

@@ -81,3 +84,4 @@ * Device class represents single device connection to Inspector Proxy. Each device

const debuggerInfo = {
socket
socket,
prependedFilePrefix: false
};

@@ -220,2 +224,10 @@

}
} // Chrome doesn't download source maps if URL param is not a valid
// URL. Some frameworks pass alphanumeric script ID instead of URL which causes
// Chrome to not download source maps. In this case we want to prepend script ID
// with 'file://' prefix.
if (payload.params.url.match(/^[0-9a-z]+$/)) {
payload.params.url = FILE_PREFIX + payload.params.url;
debuggerInfo.prependedFilePrefix = true;
}

@@ -240,2 +252,10 @@ }

);
if (
payload.params.url.startsWith(FILE_PREFIX) &&
debuggerInfo.prependedFilePrefix
) {
// Remove fake URL prefix if we modified URL in _processMessageFromDevice.
payload.params.url = payload.params.url.slice(FILE_PREFIX.length);
}
}

@@ -242,0 +262,0 @@

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