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

@react-native-community/cli-tools

Package Overview
Dependencies
Maintainers
39
Versions
169
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@react-native-community/cli-tools - npm Package Compare versions

Comparing version 4.11.0 to 4.13.0

94

build/launchDebugger.js

@@ -8,36 +8,4 @@ "use strict";

function _open() {
const data = _interopRequireDefault(require("open"));
_open = function () {
return data;
};
return data;
}
function _child_process() {
const data = require("child_process");
_child_process = function () {
return data;
};
return data;
}
var _logger = _interopRequireDefault(require("./logger"));
var _launchDefaultBrowser = _interopRequireDefault(require("./launchDefaultBrowser"));
function _chalk() {
const data = _interopRequireDefault(require("chalk"));
_chalk = function () {
return data;
};
return data;
}
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

@@ -53,64 +21,4 @@

*/
function commandExistsUnixSync(commandName) {
try {
const stdout = (0, _child_process().execSync)(`command -v ${commandName} 2>/dev/null` + ` && { echo >&1 '${commandName} found'; exit 0; }`);
return !!stdout;
} catch (error) {
return false;
}
}
function getChromeAppName() {
switch (process.platform) {
case 'darwin':
return 'google chrome';
case 'win32':
{
const possibleDebuggingApps = ['chrome.exe', 'msedge.exe'];
const output = (0, _child_process().execSync)('tasklist /NH /FO CSV /FI "SESSIONNAME ne Services"').toString();
const runningProcesses = output.split('\n').map(line => line.replace(/^"|".*\r$/gm, ''));
for (const app of possibleDebuggingApps) {
if (runningProcesses.includes(app)) {
return app;
}
}
return 'chrome';
}
case 'linux':
if (commandExistsUnixSync('google-chrome')) {
return 'google-chrome';
}
if (commandExistsUnixSync('chromium-browser')) {
return 'chromium-browser';
}
return 'chromium';
default:
return 'google-chrome';
}
}
function launchChrome(url) {
return (0, _open().default)(url, {
app: [getChromeAppName()],
wait: true
});
}
async function launchDebugger(url) {
try {
await launchChrome(url);
} catch (error) {
_logger.default.debug(error);
_logger.default.info(`For a better debugging experience please install Google Chrome from: ${_chalk().default.underline.dim('https://www.google.com/chrome/')}`);
(0, _launchDefaultBrowser.default)(url);
}
return (0, _launchDefaultBrowser.default)(url);
}

@@ -117,0 +25,0 @@

4

package.json
{
"name": "@react-native-community/cli-tools",
"version": "4.11.0",
"version": "4.13.0",
"license": "MIT",

@@ -27,3 +27,3 @@ "main": "build/index.js",

],
"gitHead": "a94c0446ad2a1ab68c040dd51cd9eec6a0605993"
"gitHead": "6cf12b00c02aca6d4bc843446394331d71a9749e"
}
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