amis-rpc-design/node_modules/@react-native-community/cli-platform-ios/build/commands/runIOS/index.js.map

1 line
30 KiB
Plaintext
Raw Normal View History

2023-10-07 19:42:30 +08:00
{"version":3,"names":["runIOS","_","ctx","args","link","setPlatform","reactNativeVersion","setVersion","project","ios","CLIError","xcodeProject","sourceDir","process","chdir","binaryPath","path","isAbsolute","join","root","fs","existsSync","configuration","logger","warn","mode","projectInfo","getProjectInfo","checkIfConfigurationExists","inferredSchemeName","basename","name","extname","scheme","interactive","selection","selectFromInteractiveMode","modifiedArgs","getConfigurationScheme","info","isWorkspace","chalk","bold","availableDevices","listIOSDevices","listDevices","device","udid","selectedDevice","promptForDeviceSelection","type","runOnSimulator","runOnDevice","simulator","bootedDevices","filter","isAvailable","simulators","getSimulators","bootedSimulators","Object","keys","devices","map","key","reduce","acc","val","concat","state","booted","length","runOnBootedDevicesSimulators","error","find","d","printFoundDevices","physicalDevices","matchingDevice","selectedSimulator","fallbackSimulators","getDestinationSimulator","activeDeveloperDir","child_process","execFileSync","encoding","trim","bootSimulator","buildOutput","appPath","buildProject","getBuildPath","spawnSync","stdio","bundleID","result","status","success","stderr","toString","isIOSDeployInstalled","appProcess","spawn","detached","unref","iosDeployInstallArgs","iosDeployOutput","message","simulatorFullName","formattedDeviceName","getTargetPaths","buildSettings","settings","JSON","parse","i","wrapperExtension","WRAPPER_EXTENSION","targetBuildDir","TARGET_BUILD_DIR","executableFolderPath","EXECUTABLE_FOLDER_PATH","isCatalyst","getPlatformName","platformNameMatch","exec","deviceName","firstIOSDevice","undefined","deviceByName","String","version","description","func","examples","desc","cmd","options","iosBuildOptions"],"sources":["../../../src/commands/runIOS/index.ts"],"sourcesContent":["/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n\nimport child_process from 'child_process';\nimport path from 'path';\nimport fs from 'fs';\nimport chalk from 'chalk';\nimport {Config, IOSProjectInfo} from '@react-native-community/cli-types';\nimport {getDestinationSimulator} from '../../tools/getDestinationSimulator';\nimport {logger, CLIError, link} from '@react-native-community/cli-tools';\nimport {BuildFlags, buildProject} from '../buildIOS/buildProject';\nimport {iosBuildOptions} from '../buildIOS';\nimport {Device} from '../../types';\nimport listIOSDevices from '../../tools/listIOSDevices';\nimport {checkIfConfigurationExists} from '../../tools/checkIfConfigurationExists';\nimport {getProjectInfo} from '../../tools/getProjectInfo';\nimport {getConfigurationScheme} from '../../tools/getConfigurationScheme';\nimport {selectFromInteractiveMode} from '../../tools/selectFromInteractiveMode';\nimport {promptForDeviceSelection} from '../../tools/prompts';\nimport getSimulators from '../../tools/getSimulators';\n\nexport interface FlagsT extends BuildFlags {\n simulator?: string;\n configuration: string;\n scheme?: string;\n projectPath: string;\n device?: string | true;\n udid?: string;\n binaryPath?: string;\n listDevices?: boolean;\n}\n\nasync function runIOS(_: Array<string>, ctx: Config, args: FlagsT) {\n link.setPlatform('ios');\n\n if (ctx.reactNativeVersion !== 'unknown') {\n link.setVersion(ctx.reactNativeVersion);\n }\n\n if (!ctx.project.ios) {\n throw new CLIError(\n 'iOS project folder not found. Are you sure this is a React Native project?',\n );\n }\n\n const {xcodeProject, sourceDir} = ctx.project.ios;\n\n if (!xcodeProject) {\n throw new CLIError(\n `Could not find Xcode project files in \"${sourceDir}\" folder`,\n );\n }\n\n process.chdir(sourceDir);\n\n if (args.binaryPath) {\n args.binaryPath = path.isAbsolute(args.binaryPath)\n ? args.binaryPath\n : path.join(ctx.root, args.binaryPath);\n\n if (!fs.existsSync(args.binaryPath)) {\n throw new CLIE