Socket
Socket
Sign inDemoInstall

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

Package Overview
Dependencies
Maintainers
30
Versions
203
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

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

Comparing version 12.0.0-alpha.8 to 12.0.0-alpha.9

3

build/commands/buildIOS/buildProject.d.ts

@@ -5,8 +5,5 @@ import { IOSProjectInfo } from '@react-native-community/cli-types';

target: string;
packager: boolean;
verbose: boolean;
xcconfig?: string;
buildFolder?: string;
port: number;
terminal: string | undefined;
interactive?: boolean;

@@ -13,0 +10,0 @@ destination?: string;

18

build/commands/buildIOS/buildProject.js

@@ -110,8 +110,6 @@ "use strict";

}
function getProcessOptions({
packager,
terminal,
port
}) {
if (packager) {
function getProcessOptions(args) {
if ('packager' in args && typeof args.packager === 'boolean' && args.packager) {
const terminal = 'terminal' in args && typeof args.terminal === 'string' ? args.terminal : '';
const port = 'port' in args && typeof args.port === 'string' ? args.port : '';
return {

@@ -121,3 +119,3 @@ env: {

RCT_TERMINAL: terminal,
RCT_METRO_PORT: port.toString()
RCT_METRO_PORT: port
}

@@ -127,7 +125,3 @@ };

return {
env: {
...process.env,
RCT_TERMINAL: terminal,
RCT_NO_LAUNCH_PACKAGER: 'true'
}
env: process.env
};

@@ -134,0 +128,0 @@ }

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

export interface FlagsT extends BuildFlags {
configuration?: string;
simulator?: string;

@@ -22,19 +21,7 @@ device?: string | true;

description: string;
default?: undefined;
parse?: undefined;
} | {
name: string;
default: string | number;
parse: NumberConstructor;
description?: undefined;
} | {
name: string;
description: string;
default: string | undefined;
parse?: undefined;
} | {
name: string;
description: string;
parse: (val: string) => string[];
default?: undefined;
})[];

@@ -52,19 +39,7 @@ declare const _default: {

description: string;
default?: undefined;
parse?: undefined;
} | {
name: string;
default: string | number;
parse: NumberConstructor;
description?: undefined;
} | {
name: string;
description: string;
default: string | undefined;
parse?: undefined;
} | {
name: string;
description: string;
parse: (val: string) => string[];
default?: undefined;
})[];

@@ -71,0 +46,0 @@ };

@@ -56,7 +56,2 @@ "use strict";

process.chdir(sourceDir);
if (args.configuration) {
_cliTools().logger.warn('--configuration has been deprecated. Use --mode instead.');
_cliTools().logger.warn('Parameters were automatically reassigned to --mode on this run.');
args.mode = args.configuration;
}
const projectInfo = (0, _getProjectInfo.getProjectInfo)();

@@ -91,6 +86,2 @@ if (args.mode) {

_cliTools().logger.info(`Found Xcode ${xcodeProject.isWorkspace ? 'workspace' : 'project'} "${_chalk().default.bold(xcodeProject.name)}"`);
const extendedArgs = {
...modifiedArgs,
packager: false
};

@@ -100,3 +91,3 @@ // // No need to load all available devices

if (!args.simulator) {
return (0, _buildProject.buildProject)(xcodeProject, undefined, scheme, extendedArgs);
return (0, _buildProject.buildProject)(xcodeProject, undefined, scheme, modifiedArgs);
}

@@ -113,3 +104,3 @@

const selectedSimulator = (0, _getDestinationSimulator.getDestinationSimulator)(args, fallbackSimulators);
return (0, _buildProject.buildProject)(xcodeProject, selectedSimulator.udid, scheme, extendedArgs);
return (0, _buildProject.buildProject)(xcodeProject, selectedSimulator.udid, scheme, modifiedArgs);
}

@@ -125,3 +116,3 @@ if (args.device && args.udid) {

}
return (0, _buildProject.buildProject)(xcodeProject, device.udid, scheme, extendedArgs);
return (0, _buildProject.buildProject)(xcodeProject, device.udid, scheme, modifiedArgs);
} else {

@@ -131,3 +122,3 @@ const physicalDevices = devices.filter(d => d.type !== 'simulator');

if (device) {
return (0, _buildProject.buildProject)(xcodeProject, device.udid, scheme, extendedArgs);
return (0, _buildProject.buildProject)(xcodeProject, device.udid, scheme, modifiedArgs);
}

@@ -166,5 +157,2 @@ }

}, {
name: '--configuration <string>',
description: '[Deprecated] Explicitly set the scheme configuration to use'
}, {
name: '--scheme <string>',

@@ -185,10 +173,2 @@ description: 'Explicitly set Xcode scheme to use'

}, {
name: '--port <number>',
default: process.env.RCT_METRO_PORT || 8081,
parse: Number
}, {
name: '--terminal <string>',
description: 'Launches the Metro Bundler in a new window using the specified terminal path.',
default: (0, _cliTools().getDefaultUserTerminal)()
}, {
name: '--xcconfig [string]',

@@ -195,0 +175,0 @@ description: 'Explicitly set xcconfig to use'

@@ -22,6 +22,9 @@ declare const _default: ({

description: string;
default?: undefined;
parse?: undefined;
} | {
name: string;
description: string;
parse: (val: string) => string[];
} | {
name: string;
default: string | number;

@@ -35,7 +38,2 @@ parse: NumberConstructor;

parse?: undefined;
} | {
name: string;
description: string;
parse: (val: string) => string[];
default?: undefined;
})[];

@@ -53,19 +51,7 @@ } | {

description: string;
default?: undefined;
parse?: undefined;
} | {
name: string;
default: string | number;
parse: NumberConstructor;
description?: undefined;
} | {
name: string;
description: string;
default: string | undefined;
parse?: undefined;
} | {
name: string;
description: string;
parse: (val: string) => string[];
default?: undefined;
})[];

@@ -72,0 +58,0 @@ })[];

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

simulator?: string;
configuration: string;
scheme?: string;

@@ -20,2 +19,5 @@ projectPath: string;

listDevices?: boolean;
packager?: boolean;
port: number;
terminal?: string;
}

@@ -34,6 +36,9 @@ declare function runIOS(_: Array<string>, ctx: Config, args: FlagsT): Promise<void>;

description: string;
default?: undefined;
parse?: undefined;
} | {
name: string;
description: string;
parse: (val: string) => string[];
} | {
name: string;
default: string | number;

@@ -47,7 +52,2 @@ parse: NumberConstructor;

parse?: undefined;
} | {
name: string;
description: string;
parse: (val: string) => string[];
default?: undefined;
})[];

@@ -54,0 +54,0 @@ };

@@ -63,2 +63,22 @@ "use strict";

_cliTools().link.setPlatform('ios');
let {
packager,
port
} = args;
const packagerStatus = await (0, _cliTools().isPackagerRunning)(port);
if (typeof packagerStatus === 'object' && packagerStatus.status === 'running') {
if (packagerStatus.root === ctx.root) {
packager = false;
(0, _cliTools().logAlreadyRunningBundler)(port);
} else {
const result = await (0, _cliTools().handlePortUnavailable)(port, ctx.root, packager);
[port, packager] = [result.port, result.packager];
}
} else if (packagerStatus === 'unrecognized') {
const result = await (0, _cliTools().handlePortUnavailable)(port, ctx.root, packager);
[port, packager] = [result.port, result.packager];
}
if (packager) {
await (0, _cliTools().startServerInNewWindow)(port, ctx.root, ctx.reactNativePath, args.terminal);
}
if (ctx.reactNativeVersion !== 'unknown') {

@@ -84,7 +104,2 @@ _cliTools().link.setVersion(ctx.reactNativeVersion);

}
if (args.configuration) {
_cliTools().logger.warn('--configuration has been deprecated. Use --mode instead.');
_cliTools().logger.warn('Parameters were automatically reassigned to --mode on this run.');
args.mode = args.configuration;
}
const projectInfo = (0, _getProjectInfo.getProjectInfo)();

@@ -187,3 +202,2 @@ if (args.mode) {

async function runOnSimulator(xcodeProject, scheme, args, simulator) {
// let selectedSimulator;
/**

@@ -223,3 +237,3 @@ * If provided simulator does not exist, try simulators in following order

_child_process().default.execFileSync('open', [`${activeDeveloperDir}/Applications/Simulator.app`, '--args', '-CurrentDeviceUDID', selectedSimulator.udid]);
if (!selectedSimulator.booted) {
if (selectedSimulator.state !== 'Booted') {
bootSimulator(selectedSimulator);

@@ -230,3 +244,3 @@ }

buildOutput = await (0, _buildProject.buildProject)(xcodeProject, selectedSimulator.udid, scheme, args);
appPath = await getBuildPath(xcodeProject, args.mode || args.configuration, buildOutput, scheme, args.target);
appPath = await getBuildPath(xcodeProject, args.mode, buildOutput, scheme, args.target);
} else {

@@ -262,3 +276,3 @@ appPath = args.binaryPath;

const buildOutput = await (0, _buildProject.buildProject)(xcodeProject, selectedDevice.udid, scheme, args);
const appPath = await getBuildPath(xcodeProject, args.mode || args.configuration, buildOutput, scheme, args.target, true);
const appPath = await getBuildPath(xcodeProject, args.mode, buildOutput, scheme, args.target, true);
const appProcess = _child_process().default.spawn(`${appPath}/${scheme}`, [], {

@@ -273,3 +287,3 @@ detached: true,

buildOutput = await (0, _buildProject.buildProject)(xcodeProject, selectedDevice.udid, scheme, args);
appPath = await getBuildPath(xcodeProject, args.mode || args.configuration, buildOutput, scheme, args.target);
appPath = await getBuildPath(xcodeProject, args.mode, buildOutput, scheme, args.target);
} else {

@@ -383,4 +397,12 @@ appPath = args.binaryPath;

name: '--no-packager',
description: 'Do not launch packager while building'
description: 'Do not launch packager while running the app'
}, {
name: '--port <number>',
default: process.env.RCT_METRO_PORT || 8081,
parse: Number
}, {
name: '--terminal <string>',
description: 'Launches the Metro Bundler in a new window using the specified terminal path.',
default: (0, _cliTools().getDefaultUserTerminal)()
}, {
name: '--binary-path <string>',

@@ -387,0 +409,0 @@ description: 'Path relative to project root where pre-built .app binary lives.'

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

udid?: string;
}): {
udid: string;
name: string;
booted: boolean;
version: string;
} | null;
}): Device | null;
export default findMatchingSimulator;
//# sourceMappingURL=findMatchingSimulator.d.ts.map

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

}
const booted = simulator.state === 'Booted';
const lastBootedAt = simulator.lastBootedAt;

@@ -81,3 +80,3 @@ const simulatorDescriptor = {

name: simulator.name,
booted,
state: simulator.state,
version

@@ -90,3 +89,3 @@ };

} else {
if (booted && simulatorName === null) {
if (simulator.state === 'Booted' && simulatorName === null) {
return simulatorDescriptor;

@@ -93,0 +92,0 @@ }

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

import { Device } from '../types';
type FlagsT = {

@@ -5,9 +6,4 @@ simulator?: string;

};
export declare function getDestinationSimulator(args: FlagsT, fallbackSimulators?: string[]): {
udid: string;
name: string;
booted: boolean;
version: string;
};
export declare function getDestinationSimulator(args: FlagsT, fallbackSimulators?: string[]): Device;
export {};
//# sourceMappingURL=getDestinationSimulator.d.ts.map
export interface Device {
name: string;
udid: string;
state?: string;
availability?: string;
state?: string;
isAvailable?: boolean;
name: string;
udid: string;
version?: string;
availabilityError?: string;
type?: 'simulator' | 'device' | 'catalyst';
booted?: boolean;
lastBootedAt?: string;

@@ -12,0 +11,0 @@ }

{
"name": "@react-native-community/cli-platform-ios",
"version": "12.0.0-alpha.8",
"version": "12.0.0-alpha.9",
"license": "MIT",

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

"dependencies": {
"@react-native-community/cli-tools": "12.0.0-alpha.8",
"@react-native-community/cli-tools": "12.0.0-alpha.9",
"chalk": "^4.1.2",

@@ -19,3 +19,3 @@ "execa": "^5.0.0",

"devDependencies": {
"@react-native-community/cli-types": "12.0.0-alpha.8",
"@react-native-community/cli-types": "12.0.0-alpha.9",
"@types/glob": "^7.1.1",

@@ -37,3 +37,3 @@ "@types/lodash": "^4.14.149",

},
"gitHead": "3d3616ed5149318984e33a2a5fb2d80744b6bd3a"
"gitHead": "f621ae435259b66f1c02fe0ff480fd6bbdaad4b4"
}

@@ -46,6 +46,2 @@ # @react-native-community/cli-platform-ios

#### `--configuration <string>`
[Deprecated] Explicitly set the scheme configuration to use default: 'Debug'.
#### `--mode <string>`

@@ -145,6 +141,2 @@

#### `--configuration <string>`
[Deprecated] Explicitly set the scheme configuration to use default: 'Debug'.
#### `--mode <string>`

@@ -151,0 +143,0 @@

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

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