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

@react-native-community/cli-platform-android

Package Overview
Dependencies
Maintainers
34
Versions
219
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@react-native-community/cli-platform-android - npm Package Compare versions

Comparing version 3.1.0 to 3.1.1

2

build/commands/runAndroid/index.d.ts

@@ -7,4 +7,2 @@ import { Config } from '@react-native-community/cli-types';

appFolder: string;
appId: string;
appIdSuffix: string;
mainActivity: string;

@@ -11,0 +9,0 @@ deviceId?: string;

36

build/commands/runAndroid/index.js

@@ -58,2 +58,4 @@ "use strict";

var _getLaunchPackageName = _interopRequireDefault(require("./getLaunchPackageName"));
function _cliTools() {

@@ -136,14 +138,2 @@ const data = require("@react-native-community/cli-tools");

});
}
function getPackageNameWithSuffix(appId, appIdSuffix, packageName) {
if (appId) {
return appId;
}
if (appIdSuffix) {
return `${packageName}.${appIdSuffix}`;
}
return packageName;
} // Builds the app and runs it on a connected emulator / device.

@@ -175,13 +165,13 @@

const packageNameWithSuffix = getPackageNameWithSuffix(args.appId, args.appIdSuffix, packageName);
const launchPackageName = (0, _getLaunchPackageName.default)(args.variant);
const adbPath = (0, _getAdbPath.default)();
if (args.deviceId) {
return runOnSpecificDevice(args, cmd, packageNameWithSuffix, packageName, adbPath);
return runOnSpecificDevice(args, cmd, launchPackageName, packageName, adbPath);
} else {
return (0, _runOnAllDevices.default)(args, cmd, packageNameWithSuffix, packageName, adbPath);
return (0, _runOnAllDevices.default)(args, cmd, launchPackageName, packageName, adbPath);
}
}
function runOnSpecificDevice(args, gradlew, packageNameWithSuffix, packageName, adbPath) {
function runOnSpecificDevice(args, gradlew, launchPackageName, packageName, adbPath) {
const devices = _adb.default.getDevices(adbPath);

@@ -196,3 +186,3 @@

buildApk(gradlew);
installAndLaunchOnDevice(args, deviceId, packageNameWithSuffix, packageName, adbPath);
installAndLaunchOnDevice(args, deviceId, launchPackageName, packageName, adbPath);
} else {

@@ -269,6 +259,6 @@ _cliTools().logger.error(`Could not find device with the id: "${deviceId}". Please choose one of the following:`, ...devices);

function installAndLaunchOnDevice(args, selectedDevice, packageNameWithSuffix, packageName, adbPath) {
function installAndLaunchOnDevice(args, selectedDevice, launchPackageName, packageName, adbPath) {
(0, _tryRunAdbReverse.default)(args.port, selectedDevice);
tryInstallAppOnDevice(args, adbPath, selectedDevice);
(0, _tryLaunchAppOnDevice.default)(selectedDevice, packageNameWithSuffix, packageName, adbPath, args.mainActivity);
(0, _tryLaunchAppOnDevice.default)(selectedDevice, launchPackageName, packageName, adbPath, args.mainActivity);
} // @ts-ignore

@@ -383,10 +373,2 @@

}, {
name: '--appId [string]',
description: 'Specify an applicationId to launch after build.',
default: ''
}, {
name: '--appIdSuffix [string]',
description: 'Specify an applicationIdSuffix to launch after build.',
default: ''
}, {
name: '--main-activity [string]',

@@ -393,0 +375,0 @@ description: 'Name of the activity to start',

@@ -8,4 +8,4 @@ /**

*/
declare function tryLaunchAppOnDevice(device: string | void, packageNameWithSuffix: string, packageName: string, adbPath: string, mainActivity: string): void;
declare function tryLaunchAppOnDevice(device: string | void, launchPackageName: string, packageName: string, adbPath: string, mainActivity: string): void;
export default tryLaunchAppOnDevice;
//# sourceMappingURL=tryLaunchAppOnDevice.d.ts.map

@@ -35,5 +35,5 @@ "use strict";

*/
function tryLaunchAppOnDevice(device, packageNameWithSuffix, packageName, adbPath, mainActivity) {
function tryLaunchAppOnDevice(device, launchPackageName, packageName, adbPath, mainActivity) {
try {
const adbArgs = ['shell', 'am', 'start', '-n', `${packageNameWithSuffix}/${packageName}.${mainActivity}`];
const adbArgs = ['shell', 'am', 'start', '-n', `${launchPackageName}/${packageName}.${mainActivity}`];

@@ -40,0 +40,0 @@ if (device) {

{
"name": "@react-native-community/cli-platform-android",
"version": "3.1.0",
"version": "3.1.1",
"license": "MIT",

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

},
"gitHead": "09d3821d0ef3cafce5d31e9e69a459dfbab15494"
"gitHead": "99c9022b183affee14003667d05a9522fc908adb"
}

Sorry, the diff of this file is not supported yet

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