Socket
Socket
Sign inDemoInstall

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

Package Overview
Dependencies
Maintainers
31
Versions
213
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.0.0-alpha.2 to 3.0.0-alpha.3

build/commands/runAndroid/__mocks__/tryLaunchEmulator.d.ts

2

build/commands/index.d.ts

@@ -8,3 +8,3 @@ declare const _default: ({

description: string;
func: (_argv: string[], config: import("../types").Config, args: import("./runAndroid").Flags) => Promise<void>;
func: (_argv: string[], config: import("@react-native-community/cli-types").Config, args: import("./runAndroid").Flags) => Promise<void>;
options: ({

@@ -11,0 +11,0 @@ name: string;

@@ -1,9 +0,2 @@

/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
*/
import { Config } from '../../types';
import { Config } from '@react-native-community/cli-types';
export interface Flags {

@@ -10,0 +3,0 @@ tasks?: Array<string>;

@@ -9,4 +9,4 @@ /**

import { Flags } from '.';
declare function runOnAllDevices(args: Flags, cmd: string, packageNameWithSuffix: string, packageName: string, adbPath: string): void;
declare function runOnAllDevices(args: Flags, cmd: string, packageNameWithSuffix: string, packageName: string, adbPath: string): Promise<void>;
export default runOnAllDevices;
//# sourceMappingURL=runOnAllDevices.d.ts.map

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

var _tryLaunchEmulator = _interopRequireDefault(require("./tryLaunchEmulator"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

@@ -62,3 +64,21 @@

function runOnAllDevices(args, cmd, packageNameWithSuffix, packageName, adbPath) {
async function runOnAllDevices(args, cmd, packageNameWithSuffix, packageName, adbPath) {
let devices = _adb.default.getDevices(adbPath);
if (devices.length === 0) {
_cliTools().logger.info('Launching emulator...');
const result = await (0, _tryLaunchEmulator.default)(adbPath);
if (result.success) {
_cliTools().logger.info('Successfully launched emulator.');
devices = _adb.default.getDevices(adbPath);
} else {
_cliTools().logger.error(`Failed to launch emulator. Reason: ${_chalk().default.dim(result.error || '')}.`);
_cliTools().logger.warn('Please launch an emulator manually or connect a device. Otherwise app may fail to launch.');
}
}
try {

@@ -83,4 +103,2 @@ const tasks = args.tasks || ['install' + toPascalCase(args.variant)];

const devices = _adb.default.getDevices(adbPath);
(devices.length > 0 ? devices : [undefined]).forEach(device => {

@@ -87,0 +105,0 @@ (0, _tryRunAdbReverse.default)(args.port, device);

@@ -8,3 +8,3 @@ /**

*/
import { ProjectParamsAndroid, DependencyParamsAndroid } from '../types';
import { AndroidProjectParams, AndroidDependencyParams } from '@react-native-community/cli-types';
/**

@@ -14,3 +14,3 @@ * Gets android project config by analyzing given folder and taking some

*/
export declare function projectConfig(folder: string, userConfig?: ProjectParamsAndroid): {
export declare function projectConfig(folder: string, userConfig?: AndroidProjectParams): {
sourceDir: string;

@@ -31,3 +31,3 @@ isFlat: boolean;

*/
export declare function dependencyConfig(folder: string, userConfig?: DependencyParamsAndroid): {
export declare function dependencyConfig(folder: string, userConfig?: AndroidDependencyParams): {
sourceDir: string;

@@ -34,0 +34,0 @@ folder: string;

@@ -7,3 +7,2 @@ /**

*
* @flow
*/

@@ -10,0 +9,0 @@ import isInstalled from './isInstalled';

@@ -27,3 +27,2 @@ "use strict";

*
* @flow
*/

@@ -30,0 +29,0 @@ function getAndroidLinkConfig() {

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

*/
import { ProjectParamsAndroid } from '../../types';
export default function applyParams(str: string, params: ProjectParamsAndroid, prefix: string): string;
import { AndroidProjectParams } from '@react-native-community/cli-types';
export default function applyParams(str: string, params: AndroidProjectParams, prefix: string): string;
//# sourceMappingURL=applyParams.d.ts.map

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

*/
import { ProjectParamsAndroid } from '../../types';
export default function makePackagePatch(packageInstance: string, params: ProjectParamsAndroid, prefix: string): {
import { AndroidProjectParams } from '@react-native-community/cli-types';
export default function makePackagePatch(packageInstance: string, params: AndroidProjectParams, prefix: string): {
pattern: string;

@@ -12,0 +12,0 @@ patch: string;

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

*/
import { ProjectParamsAndroid } from '../../types';
export default function makeStringsPatch(params: ProjectParamsAndroid, prefix: string): {
import { AndroidProjectParams } from '@react-native-community/cli-types';
export default function makeStringsPatch(params: AndroidProjectParams, prefix: string): {
pattern: string;

@@ -12,0 +12,0 @@ patch: string;

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

*/
import { ProjectConfigAndroid, DependencyConfigAndroid, ProjectParamsAndroid } from '../types';
export default function registerNativeAndroidModule(name: string, androidConfig: DependencyConfigAndroid, params: ProjectParamsAndroid, projectConfig: ProjectConfigAndroid): void;
import { AndroidProjectConfig, AndroidDependencyConfig, AndroidProjectParams } from '@react-native-community/cli-types';
export default function registerNativeAndroidModule(name: string, androidConfig: AndroidDependencyConfig, params: AndroidProjectParams, projectConfig: AndroidProjectConfig): void;
//# sourceMappingURL=registerNativeModule.d.ts.map

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

*/
import { ProjectConfigAndroid, DependencyConfigAndroid } from '../types';
export default function unregisterNativeAndroidModule(name: string, androidConfig: DependencyConfigAndroid, projectConfig: ProjectConfigAndroid): void;
import { AndroidProjectConfig, AndroidDependencyConfig } from '@react-native-community/cli-types';
export default function unregisterNativeAndroidModule(name: string, androidConfig: AndroidDependencyConfig, projectConfig: AndroidProjectConfig): void;
//# sourceMappingURL=unregisterNativeModule.d.ts.map

@@ -1,3 +0,3 @@

import { Config } from '../types';
import { Config } from '@react-native-community/cli-types';
export default function warnAboutManuallyLinkedLibs(config: Config, platform?: string, linkConfig?: ReturnType<Config['platforms']['android']['linkConfig']>): void;
//# sourceMappingURL=warnAboutManuallyLinkedLibs.d.ts.map
{
"name": "@react-native-community/cli-platform-android",
"version": "3.0.0-alpha.2",
"version": "3.0.0-alpha.3",
"license": "MIT",

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

"devDependencies": {
"@react-native-community/cli-types": "^3.0.0-alpha.3",
"@types/execa": "^0.9.0",

@@ -26,3 +27,3 @@ "@types/fs-extra": "^8.0.0",

},
"gitHead": "4d38c4cdb5a1e05c6670a046ef5a44afd655111a"
"gitHead": "726266eb96e91bbe677b1b95757b896e8d6c5b29"
}

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

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

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

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