@expo/cli 0.1.3 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/bin/cli +89 -4
- package/build/bin/cli.map +1 -1
- package/build/src/api/rest/wrapFetchWithOffline.js +2 -23
- package/build/src/api/rest/wrapFetchWithOffline.js.map +1 -1
- package/build/src/customize/customizeAsync.js +40 -0
- package/build/src/customize/customizeAsync.js.map +1 -0
- package/build/src/customize/generate.js +77 -0
- package/build/src/customize/generate.js.map +1 -0
- package/build/src/customize/index.js +41 -0
- package/build/src/customize/index.js.map +1 -0
- package/build/src/customize/resolveOptions.js +18 -0
- package/build/src/customize/resolveOptions.js.map +1 -0
- package/build/src/customize/templates.js +118 -0
- package/build/src/customize/templates.js.map +1 -0
- package/build/src/export/createMetadataJson.js +10 -7
- package/build/src/export/createMetadataJson.js.map +1 -1
- package/build/src/export/exportApp.js +32 -0
- package/build/src/export/exportApp.js.map +1 -1
- package/build/src/export/exportAssets.js +2 -3
- package/build/src/export/exportAssets.js.map +1 -1
- package/build/src/export/fork-bundleAsync.js +51 -34
- package/build/src/export/fork-bundleAsync.js.map +1 -1
- package/build/src/export/index.js +15 -10
- package/build/src/export/index.js.map +1 -1
- package/build/src/export/printBundleSizes.js +27 -48
- package/build/src/export/printBundleSizes.js.map +1 -1
- package/build/src/export/resolveOptions.js +44 -5
- package/build/src/export/resolveOptions.js.map +1 -1
- package/build/src/export/saveAssets.js +2 -1
- package/build/src/export/saveAssets.js.map +1 -1
- package/build/src/export/web/exportWebAsync.js +37 -0
- package/build/src/export/web/exportWebAsync.js.map +1 -0
- package/build/src/export/web/index.js +66 -0
- package/build/src/export/web/index.js.map +1 -0
- package/build/src/export/web/resolveOptions.js +13 -0
- package/build/src/export/web/resolveOptions.js.map +1 -0
- package/build/src/export/writeContents.js.map +1 -1
- package/build/src/install/checkPackages.js +2 -1
- package/build/src/install/checkPackages.js.map +1 -1
- package/build/src/install/index.js +1 -0
- package/build/src/install/index.js.map +1 -1
- package/build/src/install/installAsync.js +13 -5
- package/build/src/install/installAsync.js.map +1 -1
- package/build/src/install/resolveOptions.js +12 -65
- package/build/src/install/resolveOptions.js.map +1 -1
- package/build/src/install/utils/autoAddConfigPlugins.js +5 -26
- package/build/src/install/utils/autoAddConfigPlugins.js.map +1 -1
- package/build/src/log.js.map +1 -1
- package/build/src/prebuild/copyTemplateFiles.js +5 -23
- package/build/src/prebuild/copyTemplateFiles.js.map +1 -1
- package/build/src/prebuild/index.js +18 -12
- package/build/src/prebuild/index.js.map +1 -1
- package/build/src/prebuild/prebuildAsync.js +11 -12
- package/build/src/prebuild/prebuildAsync.js.map +1 -1
- package/build/src/prebuild/resolveOptions.js +17 -0
- package/build/src/prebuild/resolveOptions.js.map +1 -1
- package/build/src/prebuild/resolveTemplate.js +2 -1
- package/build/src/prebuild/resolveTemplate.js.map +1 -1
- package/build/src/prebuild/updatePackageJson.js +5 -5
- package/build/src/prebuild/updatePackageJson.js.map +1 -1
- package/build/src/run/android/resolveInstallApkName.js +5 -26
- package/build/src/run/android/resolveInstallApkName.js.map +1 -1
- package/build/src/run/android/runAndroidAsync.js +3 -3
- package/build/src/run/android/runAndroidAsync.js.map +1 -1
- package/build/src/run/ensureNativeProject.js +3 -0
- package/build/src/run/ensureNativeProject.js.map +1 -1
- package/build/src/run/hints.js +1 -1
- package/build/src/run/hints.js.map +1 -1
- package/build/src/run/ios/XcodeBuild.js +275 -0
- package/build/src/run/ios/XcodeBuild.js.map +1 -0
- package/build/src/run/ios/XcodeBuild.types.js +6 -0
- package/build/src/run/ios/XcodeBuild.types.js.map +1 -0
- package/build/src/run/ios/appleDevice/AppleDevice.js +161 -0
- package/build/src/run/ios/appleDevice/AppleDevice.js.map +1 -0
- package/build/src/run/ios/appleDevice/ClientManager.js +161 -0
- package/build/src/run/ios/appleDevice/ClientManager.js.map +1 -0
- package/build/src/run/ios/appleDevice/client/AFCClient.js +195 -0
- package/build/src/run/ios/appleDevice/client/AFCClient.js.map +1 -0
- package/build/src/run/ios/appleDevice/client/DebugserverClient.js +107 -0
- package/build/src/run/ios/appleDevice/client/DebugserverClient.js.map +1 -0
- package/build/src/run/ios/appleDevice/client/InstallationProxyClient.js +97 -0
- package/build/src/run/ios/appleDevice/client/InstallationProxyClient.js.map +1 -0
- package/build/src/run/ios/appleDevice/client/LockdowndClient.js +140 -0
- package/build/src/run/ios/appleDevice/client/LockdowndClient.js.map +1 -0
- package/build/src/run/ios/appleDevice/client/MobileImageMounterClient.js +91 -0
- package/build/src/run/ios/appleDevice/client/MobileImageMounterClient.js.map +1 -0
- package/build/src/run/ios/appleDevice/client/ServiceClient.js +21 -0
- package/build/src/run/ios/appleDevice/client/ServiceClient.js.map +1 -0
- package/build/src/run/ios/appleDevice/client/UsbmuxdClient.js +117 -0
- package/build/src/run/ios/appleDevice/client/UsbmuxdClient.js.map +1 -0
- package/build/src/run/ios/appleDevice/installOnDeviceAsync.js +90 -0
- package/build/src/run/ios/appleDevice/installOnDeviceAsync.js.map +1 -0
- package/build/src/run/ios/appleDevice/protocol/AFCProtocol.js +332 -0
- package/build/src/run/ios/appleDevice/protocol/AFCProtocol.js.map +1 -0
- package/build/src/run/ios/appleDevice/protocol/AbstractProtocol.js +115 -0
- package/build/src/run/ios/appleDevice/protocol/AbstractProtocol.js.map +1 -0
- package/build/src/run/ios/appleDevice/protocol/GDBProtocol.js +126 -0
- package/build/src/run/ios/appleDevice/protocol/GDBProtocol.js.map +1 -0
- package/build/src/run/ios/appleDevice/protocol/LockdownProtocol.js +74 -0
- package/build/src/run/ios/appleDevice/protocol/LockdownProtocol.js.map +1 -0
- package/build/src/run/ios/appleDevice/protocol/UsbmuxProtocol.js +65 -0
- package/build/src/run/ios/appleDevice/protocol/UsbmuxProtocol.js.map +1 -0
- package/build/src/run/ios/codeSigning/Security.js +85 -0
- package/build/src/run/ios/codeSigning/Security.js.map +1 -0
- package/build/src/run/ios/codeSigning/configureCodeSigning.js +77 -0
- package/build/src/run/ios/codeSigning/configureCodeSigning.js.map +1 -0
- package/build/src/run/ios/codeSigning/resolveCertificateSigningIdentity.js +102 -0
- package/build/src/run/ios/codeSigning/resolveCertificateSigningIdentity.js.map +1 -0
- package/build/src/run/ios/codeSigning/settings.js +21 -0
- package/build/src/run/ios/codeSigning/settings.js.map +1 -0
- package/build/src/run/ios/codeSigning/xcodeCodeSigning.js +76 -0
- package/build/src/run/ios/codeSigning/xcodeCodeSigning.js.map +1 -0
- package/build/src/run/ios/index.js +98 -0
- package/build/src/run/ios/index.js.map +1 -0
- package/build/src/run/ios/launchApp.js +75 -0
- package/build/src/run/ios/launchApp.js.map +1 -0
- package/build/src/run/ios/options/promptDevice.js +50 -0
- package/build/src/run/ios/options/promptDevice.js.map +1 -0
- package/build/src/run/ios/options/resolveDevice.js +92 -0
- package/build/src/run/ios/options/resolveDevice.js.map +1 -0
- package/build/src/run/ios/options/resolveNativeScheme.js +92 -0
- package/build/src/run/ios/options/resolveNativeScheme.js.map +1 -0
- package/build/src/run/ios/options/resolveOptions.js +44 -0
- package/build/src/run/ios/options/resolveOptions.js.map +1 -0
- package/build/src/run/ios/options/resolveXcodeProject.js +39 -0
- package/build/src/run/ios/options/resolveXcodeProject.js.map +1 -0
- package/build/src/run/ios/runIosAsync.js +85 -0
- package/build/src/run/ios/runIosAsync.js.map +1 -0
- package/build/src/run/resolveBundlerProps.js +9 -6
- package/build/src/run/resolveBundlerProps.js.map +1 -1
- package/build/src/run/startBundler.js +4 -2
- package/build/src/run/startBundler.js.map +1 -1
- package/build/src/start/doctor/Prerequisite.js +4 -4
- package/build/src/start/doctor/Prerequisite.js.map +1 -1
- package/build/src/start/doctor/SecurityBinPrerequisite.js +27 -0
- package/build/src/start/doctor/SecurityBinPrerequisite.js.map +1 -0
- package/build/src/start/doctor/apple/SimulatorAppPrerequisite.js +2 -0
- package/build/src/start/doctor/apple/SimulatorAppPrerequisite.js.map +1 -1
- package/build/src/start/doctor/apple/XcodeDeveloperDiskImagePrerequisite.js +69 -0
- package/build/src/start/doctor/apple/XcodeDeveloperDiskImagePrerequisite.js.map +1 -0
- package/build/src/start/doctor/apple/XcodePrerequisite.js +2 -0
- package/build/src/start/doctor/apple/XcodePrerequisite.js.map +1 -1
- package/build/src/start/doctor/dependencies/bundledNativeModules.js +3 -2
- package/build/src/start/doctor/dependencies/bundledNativeModules.js.map +1 -1
- package/build/src/start/doctor/dependencies/ensureDependenciesAsync.js +7 -13
- package/build/src/start/doctor/dependencies/ensureDependenciesAsync.js.map +1 -1
- package/build/src/start/doctor/dependencies/getMissingPackages.js +3 -24
- package/build/src/start/doctor/dependencies/getMissingPackages.js.map +1 -1
- package/build/src/start/doctor/dependencies/getVersionedPackages.js +2 -23
- package/build/src/start/doctor/dependencies/getVersionedPackages.js.map +1 -1
- package/build/src/start/doctor/dependencies/validateDependenciesVersions.js +17 -9
- package/build/src/start/doctor/dependencies/validateDependenciesVersions.js.map +1 -1
- package/build/src/start/doctor/ngrok/ExternalModule.js +2 -1
- package/build/src/start/doctor/ngrok/ExternalModule.js.map +1 -1
- package/build/src/start/doctor/typescript/TypeScriptProjectPrerequisite.js +4 -3
- package/build/src/start/doctor/typescript/TypeScriptProjectPrerequisite.js.map +1 -1
- package/build/src/start/doctor/web/WebSupportProjectPrerequisite.js +32 -31
- package/build/src/start/doctor/web/WebSupportProjectPrerequisite.js.map +1 -1
- package/build/src/start/interface/KeyPressHandler.js +2 -0
- package/build/src/start/interface/KeyPressHandler.js.map +1 -1
- package/build/src/start/interface/interactiveActions.js +5 -5
- package/build/src/start/interface/interactiveActions.js.map +1 -1
- package/build/src/start/interface/startInterface.js +3 -2
- package/build/src/start/interface/startInterface.js.map +1 -1
- package/build/src/start/platforms/ExpoGoInstaller.js +2 -1
- package/build/src/start/platforms/ExpoGoInstaller.js.map +1 -1
- package/build/src/start/platforms/PlatformManager.js +4 -24
- package/build/src/start/platforms/PlatformManager.js.map +1 -1
- package/build/src/start/platforms/android/ADBServer.js +17 -32
- package/build/src/start/platforms/android/ADBServer.js.map +1 -1
- package/build/src/start/platforms/android/AndroidSdk.js +41 -0
- package/build/src/start/platforms/android/AndroidSdk.js.map +1 -0
- package/build/src/start/platforms/android/activateWindow.js +4 -4
- package/build/src/start/platforms/android/activateWindow.js.map +1 -1
- package/build/src/start/platforms/android/adb.js +8 -3
- package/build/src/start/platforms/android/adb.js.map +1 -1
- package/build/src/start/platforms/android/adbReverse.js +3 -2
- package/build/src/start/platforms/android/adbReverse.js.map +1 -1
- package/build/src/start/platforms/android/emulator.js +8 -0
- package/build/src/start/platforms/android/emulator.js.map +1 -1
- package/build/src/start/platforms/android/gradle.js +2 -2
- package/build/src/start/platforms/android/gradle.js.map +1 -1
- package/build/src/start/platforms/android/promptAndroidDevice.js +1 -5
- package/build/src/start/platforms/android/promptAndroidDevice.js.map +1 -1
- package/build/src/start/platforms/ios/AppleDeviceManager.js +5 -1
- package/build/src/start/platforms/ios/AppleDeviceManager.js.map +1 -1
- package/build/src/start/platforms/ios/getBestSimulator.js +4 -4
- package/build/src/start/platforms/ios/getBestSimulator.js.map +1 -1
- package/build/src/start/platforms/ios/promptAppleDevice.js +1 -5
- package/build/src/start/platforms/ios/promptAppleDevice.js.map +1 -1
- package/build/src/start/platforms/ios/simctl.js +14 -0
- package/build/src/start/platforms/ios/simctl.js.map +1 -1
- package/build/src/start/platforms/ios/simctlLogging.js +220 -0
- package/build/src/start/platforms/ios/simctlLogging.js.map +1 -0
- package/build/src/start/platforms/ios/xcrun.js +2 -23
- package/build/src/start/platforms/ios/xcrun.js.map +1 -1
- package/build/src/start/project/devices.js +2 -0
- package/build/src/start/project/devices.js.map +1 -1
- package/build/src/start/server/AsyncNgrok.js +6 -5
- package/build/src/start/server/AsyncNgrok.js.map +1 -1
- package/build/src/start/server/BundlerDevServer.js +15 -8
- package/build/src/start/server/BundlerDevServer.js.map +1 -1
- package/build/src/start/server/DevServerManager.js +15 -5
- package/build/src/start/server/DevServerManager.js.map +1 -1
- package/build/src/start/server/DevelopmentSession.js +4 -0
- package/build/src/start/server/DevelopmentSession.js.map +1 -1
- package/build/src/start/server/UrlCreator.js +10 -3
- package/build/src/start/server/UrlCreator.js.map +1 -1
- package/build/src/start/server/metro/MetroBundlerDevServer.js +9 -0
- package/build/src/start/server/metro/MetroBundlerDevServer.js.map +1 -1
- package/build/src/start/server/metro/TerminalReporter.js +5 -0
- package/build/src/start/server/metro/TerminalReporter.js.map +1 -1
- package/build/src/start/server/metro/instantiateMetro.js +11 -1
- package/build/src/start/server/metro/instantiateMetro.js.map +1 -1
- package/build/src/start/server/metro/resolveFromProject.js +8 -0
- package/build/src/start/server/metro/resolveFromProject.js.map +1 -1
- package/build/src/start/server/metro/withMetroMultiPlatform.js +115 -0
- package/build/src/start/server/metro/withMetroMultiPlatform.js.map +1 -0
- package/build/src/start/server/middleware/ClassicManifestMiddleware.js +1 -1
- package/build/src/start/server/middleware/ExpoMiddleware.js +9 -4
- package/build/src/start/server/middleware/ExpoMiddleware.js.map +1 -1
- package/build/src/start/server/middleware/HistoryFallbackMiddleware.js +24 -0
- package/build/src/start/server/middleware/HistoryFallbackMiddleware.js.map +1 -0
- package/build/src/start/server/middleware/InterstitialPageMiddleware.js +2 -0
- package/build/src/start/server/middleware/InterstitialPageMiddleware.js.map +1 -1
- package/build/src/start/server/middleware/ManifestMiddleware.js +57 -6
- package/build/src/start/server/middleware/ManifestMiddleware.js.map +1 -1
- package/build/src/start/server/middleware/RuntimeRedirectMiddleware.js +6 -1
- package/build/src/start/server/middleware/RuntimeRedirectMiddleware.js.map +1 -1
- package/build/src/start/server/middleware/ServeStaticMiddleware.js +62 -0
- package/build/src/start/server/middleware/ServeStaticMiddleware.js.map +1 -0
- package/build/src/start/server/platformBundlers.js +18 -0
- package/build/src/start/server/platformBundlers.js.map +1 -0
- package/build/src/start/server/webTemplate.js +68 -0
- package/build/src/start/server/webTemplate.js.map +1 -0
- package/build/src/start/server/webpack/WebpackBundlerDevServer.js +59 -19
- package/build/src/start/server/webpack/WebpackBundlerDevServer.js.map +1 -1
- package/build/src/start/server/webpack/compile.js +64 -0
- package/build/src/start/server/webpack/compile.js.map +1 -0
- package/build/src/start/startAsync.js +21 -17
- package/build/src/start/startAsync.js.map +1 -1
- package/build/src/utils/FileNotifier.js +5 -2
- package/build/src/utils/FileNotifier.js.map +1 -1
- package/build/src/utils/analytics/rudderstackClient.js +30 -3
- package/build/src/utils/analytics/rudderstackClient.js.map +1 -1
- package/build/src/utils/cocoapods.js +47 -0
- package/build/src/utils/cocoapods.js.map +1 -1
- package/build/src/utils/dir.js +6 -1
- package/build/src/utils/dir.js.map +1 -1
- package/build/src/utils/downloadAppAsync.js +3 -2
- package/build/src/utils/downloadAppAsync.js.map +1 -1
- package/build/src/utils/downloadExpoGoAsync.js +7 -32
- package/build/src/utils/downloadExpoGoAsync.js.map +1 -1
- package/build/src/utils/editor.js +3 -2
- package/build/src/utils/editor.js.map +1 -1
- package/build/src/utils/env.js +3 -0
- package/build/src/utils/env.js.map +1 -1
- package/build/src/utils/exit.js +4 -25
- package/build/src/utils/exit.js.map +1 -1
- package/build/src/utils/getRunningProcess.js +6 -2
- package/build/src/utils/getRunningProcess.js.map +1 -1
- package/build/src/utils/nodeModules.js +13 -102
- package/build/src/utils/nodeModules.js.map +1 -1
- package/build/src/utils/npm.js +3 -24
- package/build/src/utils/npm.js.map +1 -1
- package/build/src/utils/ora.js +1 -13
- package/build/src/utils/ora.js.map +1 -1
- package/build/src/utils/plist.js +59 -0
- package/build/src/utils/plist.js.map +1 -0
- package/build/src/utils/progress.js +46 -0
- package/build/src/utils/progress.js.map +1 -1
- package/build/src/utils/prompts.js +19 -3
- package/build/src/utils/prompts.js.map +1 -1
- package/build/src/utils/resolveArgs.js +4 -1
- package/build/src/utils/resolveArgs.js.map +1 -1
- package/build/src/utils/tar.js +3 -0
- package/build/src/utils/tar.js.map +1 -1
- package/build/src/utils/terminal.js +10 -0
- package/build/src/utils/terminal.js.map +1 -0
- package/build/src/utils/validateApplicationId.js +9 -2
- package/build/src/utils/validateApplicationId.js.map +1 -1
- package/build/src/utils/variadic.js +47 -0
- package/build/src/utils/variadic.js.map +1 -0
- package/package.json +14 -10
- package/static/template/babel.config.js +6 -0
- package/static/template/index.html +117 -0
- package/static/template/metro.config.js +4 -0
- package/static/template/serve.json +13 -0
- package/static/template/webpack.config.js +7 -0
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
"use strict";
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.expoRunIos = void 0;
|
|
7
|
+
var _chalk = _interopRequireDefault(require("chalk"));
|
|
8
|
+
var _path = _interopRequireDefault(require("path"));
|
|
9
|
+
var _args = require("../../utils/args");
|
|
10
|
+
var _errors = require("../../utils/errors");
|
|
11
|
+
function _interopRequireDefault(obj) {
|
|
12
|
+
return obj && obj.__esModule ? obj : {
|
|
13
|
+
default: obj
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
function _interopRequireWildcard(obj) {
|
|
17
|
+
if (obj && obj.__esModule) {
|
|
18
|
+
return obj;
|
|
19
|
+
} else {
|
|
20
|
+
var newObj = {};
|
|
21
|
+
if (obj != null) {
|
|
22
|
+
for(var key in obj){
|
|
23
|
+
if (Object.prototype.hasOwnProperty.call(obj, key)) {
|
|
24
|
+
var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {};
|
|
25
|
+
if (desc.get || desc.set) {
|
|
26
|
+
Object.defineProperty(newObj, key, desc);
|
|
27
|
+
} else {
|
|
28
|
+
newObj[key] = obj[key];
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
newObj.default = obj;
|
|
34
|
+
return newObj;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
const expoRunIos = async (argv)=>{
|
|
38
|
+
const rawArgsMap = {
|
|
39
|
+
// Types
|
|
40
|
+
"--help": Boolean,
|
|
41
|
+
"--no-build-cache": Boolean,
|
|
42
|
+
"--no-install": Boolean,
|
|
43
|
+
"--no-bundler": Boolean,
|
|
44
|
+
"--configuration": String,
|
|
45
|
+
"--port": Number,
|
|
46
|
+
// Aliases
|
|
47
|
+
"-p": "--port",
|
|
48
|
+
"-h": "--help"
|
|
49
|
+
};
|
|
50
|
+
const args = (0, _args).assertWithOptionsArgs(rawArgsMap, {
|
|
51
|
+
argv,
|
|
52
|
+
permissive: true
|
|
53
|
+
});
|
|
54
|
+
// '-d' -> '--device': Boolean,
|
|
55
|
+
// '--scheme': String,
|
|
56
|
+
if (args["--help"]) {
|
|
57
|
+
(0, _args).printHelp(`Run the iOS app binary locally`, `npx expo run:ios`, [
|
|
58
|
+
`--no-build-cache Clear the native derived data before building`,
|
|
59
|
+
`--no-install Skip installing dependencies`,
|
|
60
|
+
`--no-bundler Skip starting the Metro bundler`,
|
|
61
|
+
`--scheme [scheme] Scheme to build`,
|
|
62
|
+
_chalk.default`--configuration <configuration> Xcode configuration to use. Debug or Release. {dim Default: Debug}`,
|
|
63
|
+
`-d, --device [device] Device name or UDID to build the app on`,
|
|
64
|
+
_chalk.default`-p, --port <port> Port to start the Metro bundler on. {dim Default: 8081}`,
|
|
65
|
+
`-h, --help Usage info`,
|
|
66
|
+
].join("\n"), [
|
|
67
|
+
"",
|
|
68
|
+
_chalk.default` Build for production (unsigned) with the {bold Release} configuration:`,
|
|
69
|
+
_chalk.default` {dim $} npx expo run:ios --configuration Release`,
|
|
70
|
+
"",
|
|
71
|
+
].join("\n"));
|
|
72
|
+
}
|
|
73
|
+
const { resolveStringOrBooleanArgsAsync } = await Promise.resolve().then(function() {
|
|
74
|
+
return _interopRequireWildcard(require("../../utils/resolveArgs"));
|
|
75
|
+
});
|
|
76
|
+
const parsed = await resolveStringOrBooleanArgsAsync(argv != null ? argv : [], rawArgsMap, {
|
|
77
|
+
"--scheme": Boolean,
|
|
78
|
+
"--device": Boolean,
|
|
79
|
+
"-d": "--device"
|
|
80
|
+
}).catch(_errors.logCmdError);
|
|
81
|
+
const { runIosAsync } = await Promise.resolve().then(function() {
|
|
82
|
+
return _interopRequireWildcard(require("./runIosAsync"));
|
|
83
|
+
});
|
|
84
|
+
return runIosAsync(_path.default.resolve(parsed.projectRoot), {
|
|
85
|
+
// Parsed options
|
|
86
|
+
buildCache: !args["--no-build-cache"],
|
|
87
|
+
install: !args["--no-install"],
|
|
88
|
+
bundler: !args["--no-bundler"],
|
|
89
|
+
port: args["--port"],
|
|
90
|
+
// Custom parsed args
|
|
91
|
+
device: parsed.args["--device"],
|
|
92
|
+
scheme: parsed.args["--scheme"],
|
|
93
|
+
configuration: parsed.args["--configuration"]
|
|
94
|
+
}).catch(_errors.logCmdError);
|
|
95
|
+
};
|
|
96
|
+
exports.expoRunIos = expoRunIos;
|
|
97
|
+
|
|
98
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/run/ios/index.ts"],"sourcesContent":["#!/usr/bin/env node\nimport arg from 'arg';\nimport chalk from 'chalk';\nimport path from 'path';\n\nimport { Command } from '../../../bin/cli';\nimport { assertWithOptionsArgs, printHelp } from '../../utils/args';\nimport { logCmdError } from '../../utils/errors';\nimport { XcodeConfiguration } from './XcodeBuild.types';\n\nexport const expoRunIos: Command = async (argv) => {\n const rawArgsMap: arg.Spec = {\n // Types\n '--help': Boolean,\n '--no-build-cache': Boolean,\n '--no-install': Boolean,\n '--no-bundler': Boolean,\n '--configuration': String,\n\n '--port': Number,\n // Aliases\n '-p': '--port',\n\n '-h': '--help',\n };\n const args = assertWithOptionsArgs(rawArgsMap, {\n argv,\n\n permissive: true,\n });\n\n // '-d' -> '--device': Boolean,\n // '--scheme': String,\n\n if (args['--help']) {\n printHelp(\n `Run the iOS app binary locally`,\n `npx expo run:ios`,\n [\n `--no-build-cache Clear the native derived data before building`,\n `--no-install Skip installing dependencies`,\n `--no-bundler Skip starting the Metro bundler`,\n `--scheme [scheme] Scheme to build`,\n chalk`--configuration <configuration> Xcode configuration to use. Debug or Release. {dim Default: Debug}`,\n `-d, --device [device] Device name or UDID to build the app on`,\n chalk`-p, --port <port> Port to start the Metro bundler on. {dim Default: 8081}`,\n `-h, --help Usage info`,\n ].join('\\n'),\n [\n '',\n chalk` Build for production (unsigned) with the {bold Release} configuration:`,\n chalk` {dim $} npx expo run:ios --configuration Release`,\n '',\n ].join('\\n')\n );\n }\n\n const { resolveStringOrBooleanArgsAsync } = await import('../../utils/resolveArgs');\n const parsed = await resolveStringOrBooleanArgsAsync(argv ?? [], rawArgsMap, {\n '--scheme': Boolean,\n '--device': Boolean,\n '-d': '--device',\n }).catch(logCmdError);\n\n const { runIosAsync } = await import('./runIosAsync');\n return runIosAsync(path.resolve(parsed.projectRoot), {\n // Parsed options\n buildCache: !args['--no-build-cache'],\n install: !args['--no-install'],\n bundler: !args['--no-bundler'],\n port: args['--port'],\n\n // Custom parsed args\n device: parsed.args['--device'],\n scheme: parsed.args['--scheme'],\n configuration: parsed.args['--configuration'] as XcodeConfiguration,\n }).catch(logCmdError);\n};\n"],"names":["expoRunIos","argv","rawArgsMap","Boolean","String","Number","args","assertWithOptionsArgs","permissive","printHelp","chalk","join","resolveStringOrBooleanArgsAsync","parsed","catch","logCmdError","runIosAsync","path","resolve","projectRoot","buildCache","install","bundler","port","device","scheme","configuration"],"mappings":"AAAA;;;;;;AAEkB,IAAA,MAAO,kCAAP,OAAO,EAAA;AACR,IAAA,KAAM,kCAAN,MAAM,EAAA;AAG0B,IAAA,KAAkB,WAAlB,kBAAkB,CAAA;AACvC,IAAA,OAAoB,WAApB,oBAAoB,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGzC,MAAMA,UAAU,GAAY,OAAOC,IAAI,GAAK;IACjD,MAAMC,UAAU,GAAa;QAC3B,QAAQ;QACR,QAAQ,EAAEC,OAAO;QACjB,kBAAkB,EAAEA,OAAO;QAC3B,cAAc,EAAEA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IAEtB,MAAM,EAAEC,WAAW,CAAA,EAAE,GAAG,MAAM;+CAAO,eAAe;MAAC,AAAC;IACtD,OAAOA,WAAW,CAACC,KAAI,QAAA,CAACC,OAAO,CAACL,MAAM,CAACM,WAAW,CAAC,EAAE;QACnD,iBAAiB;QACjBC,UAAU,EAAE,CAACd,IAAI,CAAC,kBAAkB,CAAC;QACrCe,OAAO,EAAE,CAACf,IAAI,CAAC,cAAc,CAAC;QAC9BgB,OAAO,EAAE,CAAChB,IAAI,CAAC,cAAc,CAAC;QAC9BiB,IAAI,EAAEjB,IAAI,CAAC,QAAQ,CAAC;QAEpB,qBAAqB;QACrBkB,MAAM,EAAEX,MAAM,CAACP,IAAI,CAAC,UAAU,CAAC;QAC/BmB,MAAM,EAAEZ,MAAM,CAACP,IAAI,CAAC,UAAU,CAAC;QAC/BoB,aAAa,EAAEb,MAAM,CAACP,IAAI,CAAC,iBAAiB,CAAC;KAC9C,CAAC,CAACQ,KAAK,CAACC,OAAW,YAAA,CAAC,CAAC;CACvB,AAAC;QAnEWf,UAAU,GAAVA,UAAU"}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
exports.launchAppAsync = launchAppAsync;
|
|
6
|
+
var _chalk = _interopRequireDefault(require("chalk"));
|
|
7
|
+
var _path = _interopRequireDefault(require("path"));
|
|
8
|
+
var _appleDeviceManager = require("../../start/platforms/ios/AppleDeviceManager");
|
|
9
|
+
var _simctlLogging = require("../../start/platforms/ios/simctlLogging");
|
|
10
|
+
var _plist = require("../../utils/plist");
|
|
11
|
+
var _profile = require("../../utils/profile");
|
|
12
|
+
var XcodeBuild = _interopRequireWildcard(require("./XcodeBuild"));
|
|
13
|
+
var _installOnDeviceAsync = require("./appleDevice/installOnDeviceAsync");
|
|
14
|
+
function _interopRequireDefault(obj) {
|
|
15
|
+
return obj && obj.__esModule ? obj : {
|
|
16
|
+
default: obj
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
function _interopRequireWildcard(obj) {
|
|
20
|
+
if (obj && obj.__esModule) {
|
|
21
|
+
return obj;
|
|
22
|
+
} else {
|
|
23
|
+
var newObj = {};
|
|
24
|
+
if (obj != null) {
|
|
25
|
+
for(var key in obj){
|
|
26
|
+
if (Object.prototype.hasOwnProperty.call(obj, key)) {
|
|
27
|
+
var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {};
|
|
28
|
+
if (desc.get || desc.set) {
|
|
29
|
+
Object.defineProperty(newObj, key, desc);
|
|
30
|
+
} else {
|
|
31
|
+
newObj[key] = obj[key];
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
newObj.default = obj;
|
|
37
|
+
return newObj;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
async function launchAppAsync(binaryPath, manager, props) {
|
|
41
|
+
const appId = await (0, _profile).profile(getBundleIdentifierForBinaryAsync)(binaryPath);
|
|
42
|
+
if (!props.isSimulator) {
|
|
43
|
+
await (0, _profile).profile(_installOnDeviceAsync.installOnDeviceAsync)({
|
|
44
|
+
bundleIdentifier: appId,
|
|
45
|
+
bundle: binaryPath,
|
|
46
|
+
appDeltaDirectory: (0, _installOnDeviceAsync).getAppDeltaDirectory(appId),
|
|
47
|
+
udid: props.device.udid,
|
|
48
|
+
deviceName: props.device.name
|
|
49
|
+
});
|
|
50
|
+
return;
|
|
51
|
+
}
|
|
52
|
+
XcodeBuild.logPrettyItem(_chalk.default`{bold Installing} on ${props.device.name}`);
|
|
53
|
+
const device = await _appleDeviceManager.AppleDeviceManager.resolveAsync({
|
|
54
|
+
device: props.device
|
|
55
|
+
});
|
|
56
|
+
await device.installAppAsync(binaryPath);
|
|
57
|
+
XcodeBuild.logPrettyItem(_chalk.default`{bold Opening} on ${device.name} {dim (${appId})}`);
|
|
58
|
+
if (props.shouldStartBundler) {
|
|
59
|
+
await _simctlLogging.SimulatorLogStreamer.getStreamer(device.device, {
|
|
60
|
+
appId
|
|
61
|
+
}).attachAsync();
|
|
62
|
+
}
|
|
63
|
+
await manager.getDefaultDevServer().openCustomRuntimeAsync("simulator", {
|
|
64
|
+
applicationId: appId
|
|
65
|
+
}, {
|
|
66
|
+
device
|
|
67
|
+
});
|
|
68
|
+
}
|
|
69
|
+
async function getBundleIdentifierForBinaryAsync(binaryPath) {
|
|
70
|
+
const builtInfoPlistPath = _path.default.join(binaryPath, "Info.plist");
|
|
71
|
+
const { CFBundleIdentifier } = await (0, _plist).parsePlistAsync(builtInfoPlistPath);
|
|
72
|
+
return CFBundleIdentifier;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
//# sourceMappingURL=launchApp.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/run/ios/launchApp.ts"],"sourcesContent":["import chalk from 'chalk';\nimport path from 'path';\n\nimport { AppleDeviceManager } from '../../start/platforms/ios/AppleDeviceManager';\nimport { SimulatorLogStreamer } from '../../start/platforms/ios/simctlLogging';\nimport { DevServerManager } from '../../start/server/DevServerManager';\nimport { parsePlistAsync } from '../../utils/plist';\nimport { profile } from '../../utils/profile';\nimport * as XcodeBuild from './XcodeBuild';\nimport { BuildProps } from './XcodeBuild.types';\nimport { getAppDeltaDirectory, installOnDeviceAsync } from './appleDevice/installOnDeviceAsync';\n\n/** Install and launch the app binary on a device. */\nexport async function launchAppAsync(\n binaryPath: string,\n manager: DevServerManager,\n props: Pick<BuildProps, 'isSimulator' | 'device' | 'shouldStartBundler'>\n) {\n const appId = await profile(getBundleIdentifierForBinaryAsync)(binaryPath);\n\n if (!props.isSimulator) {\n await profile(installOnDeviceAsync)({\n bundleIdentifier: appId,\n bundle: binaryPath,\n appDeltaDirectory: getAppDeltaDirectory(appId),\n udid: props.device.udid,\n deviceName: props.device.name,\n });\n return;\n }\n\n XcodeBuild.logPrettyItem(chalk`{bold Installing} on ${props.device.name}`);\n\n const device = await AppleDeviceManager.resolveAsync({ device: props.device });\n await device.installAppAsync(binaryPath);\n\n XcodeBuild.logPrettyItem(chalk`{bold Opening} on ${device.name} {dim (${appId})}`);\n\n if (props.shouldStartBundler) {\n await SimulatorLogStreamer.getStreamer(device.device, {\n appId,\n }).attachAsync();\n }\n\n await manager.getDefaultDevServer().openCustomRuntimeAsync(\n 'simulator',\n {\n applicationId: appId,\n },\n { device }\n );\n}\n\nasync function getBundleIdentifierForBinaryAsync(binaryPath: string): Promise<string> {\n const builtInfoPlistPath = path.join(binaryPath, 'Info.plist');\n const { CFBundleIdentifier } = await parsePlistAsync(builtInfoPlistPath);\n return CFBundleIdentifier;\n}\n"],"names":["launchAppAsync","XcodeBuild","binaryPath","manager","props","appId","profile","getBundleIdentifierForBinaryAsync","isSimulator","installOnDeviceAsync","bundleIdentifier","bundle","appDeltaDirectory","getAppDeltaDirectory","udid","device","deviceName","name","logPrettyItem","chalk","AppleDeviceManager","resolveAsync","installAppAsync","shouldStartBundler","SimulatorLogStreamer","getStreamer","attachAsync","getDefaultDevServer","openCustomRuntimeAsync","applicationId","builtInfoPlistPath","path","join","CFBundleIdentifier","parsePlistAsync"],"mappings":"AAAA;;;;QAasBA,cAAc,GAAdA,cAAc;AAblB,IAAA,MAAO,kCAAP,OAAO,EAAA;AACR,IAAA,KAAM,kCAAN,MAAM,EAAA;AAEY,IAAA,mBAA8C,WAA9C,8CAA8C,CAAA;AAC5C,IAAA,cAAyC,WAAzC,yCAAyC,CAAA;AAE9C,IAAA,MAAmB,WAAnB,mBAAmB,CAAA;AAC3B,IAAA,QAAqB,WAArB,qBAAqB,CAAA;AACjCC,IAAAA,UAAU,mCAAM,cAAc,EAApB;AAEqC,IAAA,qBAAoC,WAApC,oCAAoC,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGxF,eAAeD,cAAc,CAClCE,UAAkB,EAClBC,OAAyB,EACzBC,KAAwE,EACxE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AK;KACrB,EACD;QAAEU,MAAM;KAAE,CACX,CAAC;CACH;AAED,eAAeR,iCAAiC,CAACL,UAAkB,EAAmB;IACpF,MAAM4B,kBAAkB,GAAGC,KAAI,QAAA,CAACC,IAAI,CAAC9B,UAAU,EAAE,YAAY,CAAC,AAAC;IAC/D,MAAM,EAAE+B,kBAAkB,CAAA,EAAE,GAAG,MAAMC,CAAAA,GAAAA,MAAe,AAAoB,CAAA,gBAApB,CAACJ,kBAAkB,CAAC,AAAC;IACzE,OAAOG,kBAAkB,CAAC;CAC3B"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
exports.formatDeviceChoice = formatDeviceChoice;
|
|
6
|
+
exports.promptDeviceAsync = promptDeviceAsync;
|
|
7
|
+
var _chalk = _interopRequireDefault(require("chalk"));
|
|
8
|
+
var _prompts = _interopRequireDefault(require("../../../utils/prompts"));
|
|
9
|
+
function _interopRequireDefault(obj) {
|
|
10
|
+
return obj && obj.__esModule ? obj : {
|
|
11
|
+
default: obj
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
function isConnectedDevice(item) {
|
|
15
|
+
return "deviceType" in item;
|
|
16
|
+
}
|
|
17
|
+
function isSimControlDevice(item) {
|
|
18
|
+
return "state" in item;
|
|
19
|
+
}
|
|
20
|
+
function formatDeviceChoice(item) {
|
|
21
|
+
const isConnected = isConnectedDevice(item) && item.deviceType === "device";
|
|
22
|
+
const isActive = isSimControlDevice(item) && item.state === "Booted";
|
|
23
|
+
const symbol = isConnected ? "\uD83D\uDD0C " : "";
|
|
24
|
+
const format = isActive ? _chalk.default.bold : (text)=>text
|
|
25
|
+
;
|
|
26
|
+
return {
|
|
27
|
+
title: `${symbol}${format(item.name)}${item.osVersion ? _chalk.default.dim(` (${item.osVersion})`) : ""}`,
|
|
28
|
+
value: item.udid
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
async function promptDeviceAsync(devices) {
|
|
32
|
+
// --device with no props after
|
|
33
|
+
const { value } = await (0, _prompts).default({
|
|
34
|
+
type: "autocomplete",
|
|
35
|
+
name: "value",
|
|
36
|
+
limit: 11,
|
|
37
|
+
message: "Select a device",
|
|
38
|
+
choices: devices.map((item)=>formatDeviceChoice(item)
|
|
39
|
+
),
|
|
40
|
+
suggest: (input, choices)=>{
|
|
41
|
+
const regex = new RegExp(input, "i");
|
|
42
|
+
return choices.filter((choice)=>regex.test(choice.title)
|
|
43
|
+
);
|
|
44
|
+
}
|
|
45
|
+
});
|
|
46
|
+
return devices.find((device)=>device.udid === value
|
|
47
|
+
);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
//# sourceMappingURL=promptDevice.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../src/run/ios/options/promptDevice.ts"],"sourcesContent":["import chalk from 'chalk';\n\nimport * as SimControl from '../../../start/platforms/ios/simctl';\nimport prompt from '../../../utils/prompts';\nimport { ConnectedDevice } from '../appleDevice/AppleDevice';\n\ntype AnyDevice = SimControl.Device | ConnectedDevice;\n\nfunction isConnectedDevice(item: AnyDevice): item is ConnectedDevice {\n return 'deviceType' in item;\n}\n\nfunction isSimControlDevice(item: AnyDevice): item is SimControl.Device {\n return 'state' in item;\n}\n\n/** Format a device for the prompt list. Exposed for testing. */\nexport function formatDeviceChoice(item: AnyDevice): { title: string; value: string } {\n const isConnected = isConnectedDevice(item) && item.deviceType === 'device';\n const isActive = isSimControlDevice(item) && item.state === 'Booted';\n const symbol = isConnected ? '🔌 ' : '';\n const format = isActive ? chalk.bold : (text: string) => text;\n return {\n title: `${symbol}${format(item.name)}${\n item.osVersion ? chalk.dim(` (${item.osVersion})`) : ''\n }`,\n value: item.udid,\n };\n}\n\n/** Prompt to select a device from a searchable list of devices. */\nexport async function promptDeviceAsync(devices: AnyDevice[]): Promise<AnyDevice> {\n // --device with no props after\n const { value } = await prompt({\n type: 'autocomplete',\n name: 'value',\n limit: 11,\n message: 'Select a device',\n choices: devices.map((item) => formatDeviceChoice(item)),\n suggest: (input: any, choices: any) => {\n const regex = new RegExp(input, 'i');\n return choices.filter((choice: any) => regex.test(choice.title));\n },\n });\n return devices.find((device) => device.udid === value)!;\n}\n"],"names":["formatDeviceChoice","promptDeviceAsync","isConnectedDevice","item","isSimControlDevice","isConnected","deviceType","isActive","state","symbol","format","chalk","bold","text","title","name","osVersion","dim","value","udid","devices","prompt","type","limit","message","choices","map","suggest","input","regex","RegExp","filter","choice","test","find","device"],"mappings":"AAAA;;;;QAiBgBA,kBAAkB,GAAlBA,kBAAkB;QAcZC,iBAAiB,GAAjBA,iBAAiB;AA/BrB,IAAA,MAAO,kCAAP,OAAO,EAAA;AAGN,IAAA,QAAwB,kCAAxB,wBAAwB,EAAA;;;;;;AAK3C,SAASC,iBAAiB,CAACC,IAAe,EAA2B;IACnE,OAAO,YAAY,IAAIA,IAAI,CAAC;CAC7B;AAED,SAASC,kBAAkB,CAACD,IAAe,EAA6B;IACtE,OAAO,OAAO,IAAIA,IAAI,CAAC;CACxB;AAGM,SAASH,kBAAkB,CAACG,IAAe,EAAoC;IACpF,MAAME,WAAW,GAAGH,iBAAiB,CAACC,IAAI,CAAC,IAAIA,IAAI,CAACG,UAAU,KAAK,QAAQ,AAAC;IAC5E,MAAMC,QAAQ,GAAGH,kBAAkB,CAACD,IAAI,CAAC,IAAIA,IAAI,CAACK,KAAK,KAAK,QAAQ,AAAC;IACrE,MAAMC,MAAM,GAAGJ,WAAW,GAAG,eAAI,GAAG,EAAE,AAAC;IACvC,MAAMK,MAAM,GAAGH,QAAQ,GAAGI,MAAK,QAAA,CAACC,IAAI,GAAG,CAACC,IAAY,GAAKA,IAAI;IAAC;IAC9D,OAAO;QACLC,KAAK,EAAE,CAAC,EAAEL,MAAM,CAAC,EAAEC,MAAM,CAACP,IAAI,CAACY,IAAI,CAAC,CAAC,EACnCZ,IAAI,CAACa,SAAS,GAAGL,MAAK,QAAA,CAACM,GAAG,CAAC,CAAC,EAAE,EAAEd,IAAI,CAACa,SAAS,CAAC,CAAC,CAAC,CAAC,GAAG,EAAE,CACxD,CAAC;QACFE,KAAK,EAAEf,IAAI,CAACgB,IAAI;KACjB,CAAC;CACH;AAGM,eAAelB,iBAAiB,CAACmB,OAAoB,EAAsB;IAChF,+BAA+B;IAC/B,MAAM,EAAEF,KAAK,CAAA,EAAE,GAAG,MAAMG,CAAAA,GAAAA,QAAM,AAU5B,CAAA,QAV4B,CAAC;QAC7BC,IAAI,EAAE,cAAc;QACpBP,IAAI,EAAE,OAAO;QACbQ,KAAK,EAAE,EAAE;QACTC,OAAO,EAAE,iBAAiB;QAC1BC,OAAO,EAAEL,OAAO,CAACM,GAAG,CAAC,CAACvB,IAAI,GAAKH,kBAAkB,CAACG,IAAI,CAAC;QAAA,CAAC;QACxDwB,OAAO,EAAE,CAACC,KAAU,EAAEH,OAAY,GAAK;YACrC,MAAMI,KAAK,GAAG,IAAIC,MAAM,CAACF,KAAK,EAAE,GAAG,CAAC,AAAC;YACrC,OAAOH,OAAO,CAACM,MAAM,CAAC,CAACC,MAAW,GAAKH,KAAK,CAACI,IAAI,CAACD,MAAM,CAAClB,KAAK,CAAC;YAAA,CAAC,CAAC;SAClE;KACF,CAAC,AAAC;IACH,OAAOM,OAAO,CAACc,IAAI,CAAC,CAACC,MAAM,GAAKA,MAAM,CAAChB,IAAI,KAAKD,KAAK;IAAA,CAAC,CAAE;CACzD"}
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
exports.resolveDeviceAsync = resolveDeviceAsync;
|
|
6
|
+
exports.isSimulatorDevice = isSimulatorDevice;
|
|
7
|
+
var Log = _interopRequireWildcard(require("../../../log"));
|
|
8
|
+
var _appleDeviceManager = require("../../../start/platforms/ios/AppleDeviceManager");
|
|
9
|
+
var _assertSystemRequirements = require("../../../start/platforms/ios/assertSystemRequirements");
|
|
10
|
+
var _promptAppleDevice = require("../../../start/platforms/ios/promptAppleDevice");
|
|
11
|
+
var SimControl = _interopRequireWildcard(require("../../../start/platforms/ios/simctl"));
|
|
12
|
+
var _errors = require("../../../utils/errors");
|
|
13
|
+
var _profile = require("../../../utils/profile");
|
|
14
|
+
var _hints = require("../../hints");
|
|
15
|
+
var AppleDevice = _interopRequireWildcard(require("../appleDevice/AppleDevice"));
|
|
16
|
+
var _promptDevice = require("./promptDevice");
|
|
17
|
+
function _interopRequireWildcard(obj) {
|
|
18
|
+
if (obj && obj.__esModule) {
|
|
19
|
+
return obj;
|
|
20
|
+
} else {
|
|
21
|
+
var newObj = {};
|
|
22
|
+
if (obj != null) {
|
|
23
|
+
for(var key in obj){
|
|
24
|
+
if (Object.prototype.hasOwnProperty.call(obj, key)) {
|
|
25
|
+
var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {};
|
|
26
|
+
if (desc.get || desc.set) {
|
|
27
|
+
Object.defineProperty(newObj, key, desc);
|
|
28
|
+
} else {
|
|
29
|
+
newObj[key] = obj[key];
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
newObj.default = obj;
|
|
35
|
+
return newObj;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
/** Get a list of devices (called destinations) that are connected to the host machine. Filter by `osType` if defined. */ async function getDevicesAsync({ osType } = {}) {
|
|
39
|
+
const connectedDevices = await AppleDevice.getConnectedDevicesAsync();
|
|
40
|
+
const simulators = await (0, _promptAppleDevice).sortDefaultDeviceToBeginningAsync(await (0, _profile).profile(SimControl.getDevicesAsync)(), osType);
|
|
41
|
+
const devices = [
|
|
42
|
+
...connectedDevices,
|
|
43
|
+
...simulators
|
|
44
|
+
];
|
|
45
|
+
// If osType is defined, then filter out ineligible simulators.
|
|
46
|
+
// Only do this inside of the device selection so users who pass the entire device udid can attempt to select any simulator (even if it's invalid).
|
|
47
|
+
return osType ? filterDevicesForOsType(devices, osType) : devices;
|
|
48
|
+
}
|
|
49
|
+
/** @returns a list of devices, filtered by the provided `osType`. */ function filterDevicesForOsType(devices, osType) {
|
|
50
|
+
return devices.filter((device)=>!("osType" in device) || device.osType === osType
|
|
51
|
+
);
|
|
52
|
+
}
|
|
53
|
+
async function resolveDeviceAsync(device, { osType } = {}) {
|
|
54
|
+
await (0, _assertSystemRequirements).assertSystemRequirementsAsync();
|
|
55
|
+
if (!device) {
|
|
56
|
+
/** Finds the first possible device and returns in a booted state. */ const manager = await _appleDeviceManager.AppleDeviceManager.resolveAsync({
|
|
57
|
+
device: {
|
|
58
|
+
osType
|
|
59
|
+
}
|
|
60
|
+
});
|
|
61
|
+
Log.debug(`Resolved default device (name: ${manager.device.name}, udid: ${manager.device.udid}, osType: ${osType})`);
|
|
62
|
+
return manager.device;
|
|
63
|
+
}
|
|
64
|
+
const devices = await getDevicesAsync({
|
|
65
|
+
osType
|
|
66
|
+
});
|
|
67
|
+
const resolved = device === true ? await (0, _promptDevice).promptDeviceAsync(devices) : findDeviceFromSearchValue(devices, device.toLowerCase());
|
|
68
|
+
return ensureBootedAsync(resolved);
|
|
69
|
+
}
|
|
70
|
+
function isSimulatorDevice(device) {
|
|
71
|
+
return !("deviceType" in device) || device.deviceType.startsWith("com.apple.CoreSimulator.SimDeviceType.");
|
|
72
|
+
}
|
|
73
|
+
/** @returns device matching the `searchValue` against name or UDID. */ function findDeviceFromSearchValue(devices, searchValue) {
|
|
74
|
+
const device1 = devices.find((device)=>device.udid.toLowerCase() === searchValue || device.name.toLowerCase() === searchValue
|
|
75
|
+
);
|
|
76
|
+
if (!device1) {
|
|
77
|
+
throw new _errors.CommandError("BAD_ARGS", `No device UDID or name matching "${searchValue}"`);
|
|
78
|
+
}
|
|
79
|
+
return device1;
|
|
80
|
+
}
|
|
81
|
+
/** Ensures the device is booted if it's a simulator. */ async function ensureBootedAsync(device) {
|
|
82
|
+
// --device with no props after
|
|
83
|
+
(0, _hints).logDeviceArgument(device.udid);
|
|
84
|
+
if (isSimulatorDevice(device)) {
|
|
85
|
+
return (0, _appleDeviceManager).ensureSimulatorOpenAsync({
|
|
86
|
+
udid: device.udid
|
|
87
|
+
});
|
|
88
|
+
}
|
|
89
|
+
return device;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
//# sourceMappingURL=resolveDevice.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../src/run/ios/options/resolveDevice.ts"],"sourcesContent":["import * as Log from '../../../log';\nimport {\n AppleDeviceManager,\n ensureSimulatorOpenAsync,\n} from '../../../start/platforms/ios/AppleDeviceManager';\nimport { assertSystemRequirementsAsync } from '../../../start/platforms/ios/assertSystemRequirements';\nimport { sortDefaultDeviceToBeginningAsync } from '../../../start/platforms/ios/promptAppleDevice';\nimport { OSType } from '../../../start/platforms/ios/simctl';\nimport * as SimControl from '../../../start/platforms/ios/simctl';\nimport { CommandError } from '../../../utils/errors';\nimport { profile } from '../../../utils/profile';\nimport { logDeviceArgument } from '../../hints';\nimport * as AppleDevice from '../appleDevice/AppleDevice';\nimport { promptDeviceAsync } from './promptDevice';\n\ntype AnyDevice = SimControl.Device | AppleDevice.ConnectedDevice;\n\n/** Get a list of devices (called destinations) that are connected to the host machine. Filter by `osType` if defined. */\nasync function getDevicesAsync({ osType }: { osType?: OSType } = {}): Promise<AnyDevice[]> {\n const connectedDevices = await AppleDevice.getConnectedDevicesAsync();\n\n const simulators = await sortDefaultDeviceToBeginningAsync(\n await profile(SimControl.getDevicesAsync)(),\n osType\n );\n\n const devices = [...connectedDevices, ...simulators];\n\n // If osType is defined, then filter out ineligible simulators.\n // Only do this inside of the device selection so users who pass the entire device udid can attempt to select any simulator (even if it's invalid).\n return osType ? filterDevicesForOsType(devices, osType) : devices;\n}\n\n/** @returns a list of devices, filtered by the provided `osType`. */\nfunction filterDevicesForOsType(devices: AnyDevice[], osType: OSType): AnyDevice[] {\n return devices.filter((device) => !('osType' in device) || device.osType === osType);\n}\n\n/** Given a `device` argument from the CLI, parse and prompt our way to a usable device for building. */\nexport async function resolveDeviceAsync(\n device?: string | boolean,\n { osType }: { osType?: OSType } = {}\n): Promise<AnyDevice> {\n await assertSystemRequirementsAsync();\n\n if (!device) {\n /** Finds the first possible device and returns in a booted state. */\n const manager = await AppleDeviceManager.resolveAsync({\n device: {\n osType,\n },\n });\n Log.debug(\n `Resolved default device (name: ${manager.device.name}, udid: ${manager.device.udid}, osType: ${osType})`\n );\n return manager.device;\n }\n\n const devices: AnyDevice[] = await getDevicesAsync({\n osType,\n });\n\n const resolved =\n device === true\n ? // `--device` (no props after)\n await promptDeviceAsync(devices)\n : // `--device <name|udid>`\n findDeviceFromSearchValue(devices, device.toLowerCase());\n\n return ensureBootedAsync(resolved);\n}\n\n/** @returns `true` if the given device is a simulator. */\nexport function isSimulatorDevice(device: AnyDevice): boolean {\n return (\n !('deviceType' in device) ||\n device.deviceType.startsWith('com.apple.CoreSimulator.SimDeviceType.')\n );\n}\n\n/** @returns device matching the `searchValue` against name or UDID. */\nfunction findDeviceFromSearchValue(devices: AnyDevice[], searchValue: string): AnyDevice {\n const device = devices.find(\n (device) =>\n device.udid.toLowerCase() === searchValue || device.name.toLowerCase() === searchValue\n );\n if (!device) {\n throw new CommandError('BAD_ARGS', `No device UDID or name matching \"${searchValue}\"`);\n }\n return device;\n}\n\n/** Ensures the device is booted if it's a simulator. */\nasync function ensureBootedAsync(device: AnyDevice): Promise<AnyDevice> {\n // --device with no props after\n logDeviceArgument(device.udid);\n if (isSimulatorDevice(device)) {\n return ensureSimulatorOpenAsync({ udid: device.udid });\n }\n return device;\n}\n"],"names":["resolveDeviceAsync","isSimulatorDevice","Log","SimControl","AppleDevice","getDevicesAsync","osType","connectedDevices","getConnectedDevicesAsync","simulators","sortDefaultDeviceToBeginningAsync","profile","devices","filterDevicesForOsType","filter","device","assertSystemRequirementsAsync","manager","AppleDeviceManager","resolveAsync","debug","name","udid","resolved","promptDeviceAsync","findDeviceFromSearchValue","toLowerCase","ensureBootedAsync","deviceType","startsWith","searchValue","find","CommandError","logDeviceArgument","ensureSimulatorOpenAsync"],"mappings":"AAAA;;;;QAuCsBA,kBAAkB,GAAlBA,kBAAkB;QAkCxBC,iBAAiB,GAAjBA,iBAAiB;AAzErBC,IAAAA,GAAG,mCAAM,cAAc,EAApB;AAIR,IAAA,mBAAiD,WAAjD,iDAAiD,CAAA;AACV,IAAA,yBAAuD,WAAvD,uDAAuD,CAAA;AACnD,IAAA,kBAAgD,WAAhD,gDAAgD,CAAA;AAEtFC,IAAAA,UAAU,mCAAM,qCAAqC,EAA3C;AACO,IAAA,OAAuB,WAAvB,uBAAuB,CAAA;AAC5B,IAAA,QAAwB,WAAxB,wBAAwB,CAAA;AACd,IAAA,MAAa,WAAb,aAAa,CAAA;AACnCC,IAAAA,WAAW,mCAAM,4BAA4B,EAAlC;AACW,IAAA,aAAgB,WAAhB,gBAAgB,CAAA;;;;;;;;;;;;;;;;;;;;;;AAIlD,yHAAyH,CACzH,eAAeC,eAAe,CAAC,EAAEC,MAAM,CAAA,EAAuB,GAAG,EAAE,EAAwB;IACzF,MAAMC,gBAAgB,GAAG,MAAMH,WAAW,CAACI,wBAAwB,EAAE,AAAC;IAEtE,MAAMC,UAAU,GAAG,MAAMC,CAAAA,GAAAA,kBAAiC,AAGzD,CAAA,kCAHyD,CACxD,MAAMC,CAAAA,GAAAA,QAAO,AAA4B,CAAA,QAA5B,CAACR,UAAU,CAACE,eAAe,CAAC,EAAE,EAC3CC,MAAM,CACP,AAAC;IAEF,MAAMM,OAAO,GAAG;WAAIL,gBAAgB;WAAKE,UAAU;KAAC,AAAC;IAErD,+DAA+D;IAC/D,mJAAmJ;IACnJ,OAAOH,MAAM,GAAGO,sBAAsB,CAACD,OAAO,EAAEN,MAAM,CAAC,GAAGM,OAAO,CAAC;CACnE;AAED,qEAAqE,CAC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E;CACH;AAED,uEAAuE,CACvE,SAASJ,yBAAyB,CAACb,OAAoB,EAAEkB,WAAmB,EAAa;IACvF,MAAMf,OAAM,GAAGH,OAAO,CAACmB,IAAI,CACzB,CAAChB,MAAM,GACLA,MAAM,CAACO,IAAI,CAACI,WAAW,EAAE,KAAKI,WAAW,IAAIf,MAAM,CAACM,IAAI,CAACK,WAAW,EAAE,KAAKI,WAAW;IAAA,CACzF,AAAC;IACF,IAAI,CAACf,OAAM,EAAE;QACX,MAAM,IAAIiB,OAAY,aAAA,CAAC,UAAU,EAAE,CAAC,iCAAiC,EAAEF,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC;KACxF;IACD,OAAOf,OAAM,CAAC;CACf;AAED,wDAAwD,CACxD,eAAeY,iBAAiB,CAACZ,MAAiB,EAAsB;IACtE,+BAA+B;IAC/BkB,CAAAA,GAAAA,MAAiB,AAAa,CAAA,kBAAb,CAAClB,MAAM,CAACO,IAAI,CAAC,CAAC;IAC/B,IAAIrB,iBAAiB,CAACc,MAAM,CAAC,EAAE;QAC7B,OAAOmB,CAAAA,GAAAA,mBAAwB,AAAuB,CAAA,yBAAvB,CAAC;YAAEZ,IAAI,EAAEP,MAAM,CAACO,IAAI;SAAE,CAAC,CAAC;KACxD;IACD,OAAOP,MAAM,CAAC;CACf"}
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
exports.resolveNativeSchemePropsAsync = resolveNativeSchemePropsAsync;
|
|
6
|
+
exports.promptOrQueryNativeSchemeAsync = promptOrQueryNativeSchemeAsync;
|
|
7
|
+
exports.getDefaultNativeScheme = getDefaultNativeScheme;
|
|
8
|
+
var _configPlugins = require("@expo/config-plugins");
|
|
9
|
+
var _chalk = _interopRequireDefault(require("chalk"));
|
|
10
|
+
var _path = _interopRequireDefault(require("path"));
|
|
11
|
+
var Log = _interopRequireWildcard(require("../../../log"));
|
|
12
|
+
var _errors = require("../../../utils/errors");
|
|
13
|
+
var _profile = require("../../../utils/profile");
|
|
14
|
+
var _prompts = require("../../../utils/prompts");
|
|
15
|
+
function _interopRequireDefault(obj) {
|
|
16
|
+
return obj && obj.__esModule ? obj : {
|
|
17
|
+
default: obj
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
function _interopRequireWildcard(obj) {
|
|
21
|
+
if (obj && obj.__esModule) {
|
|
22
|
+
return obj;
|
|
23
|
+
} else {
|
|
24
|
+
var newObj = {};
|
|
25
|
+
if (obj != null) {
|
|
26
|
+
for(var key in obj){
|
|
27
|
+
if (Object.prototype.hasOwnProperty.call(obj, key)) {
|
|
28
|
+
var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {};
|
|
29
|
+
if (desc.get || desc.set) {
|
|
30
|
+
Object.defineProperty(newObj, key, desc);
|
|
31
|
+
} else {
|
|
32
|
+
newObj[key] = obj[key];
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
newObj.default = obj;
|
|
38
|
+
return newObj;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
async function resolveNativeSchemePropsAsync(projectRoot, options, xcodeProject) {
|
|
42
|
+
var ref;
|
|
43
|
+
return (ref = await promptOrQueryNativeSchemeAsync(projectRoot, options)) != null ? ref : getDefaultNativeScheme(projectRoot, options, xcodeProject);
|
|
44
|
+
}
|
|
45
|
+
async function promptOrQueryNativeSchemeAsync(projectRoot, { scheme , configuration }) {
|
|
46
|
+
const schemes = _configPlugins.IOSConfig.BuildScheme.getRunnableSchemesFromXcodeproj(projectRoot, {
|
|
47
|
+
configuration
|
|
48
|
+
});
|
|
49
|
+
if (!schemes.length) {
|
|
50
|
+
throw new _errors.CommandError("IOS_MALFORMED", "No native iOS build schemes found");
|
|
51
|
+
}
|
|
52
|
+
if (scheme === true) {
|
|
53
|
+
if (schemes.length === 1) {
|
|
54
|
+
Log.log(`Auto selecting only available scheme: ${schemes[0].name}`);
|
|
55
|
+
return schemes[0];
|
|
56
|
+
}
|
|
57
|
+
const resolvedSchemeName = await (0, _prompts).selectAsync("Select a scheme", schemes.map((value)=>{
|
|
58
|
+
const isApp = value.type === _configPlugins.IOSConfig.Target.TargetType.APPLICATION && value.osType === "iOS";
|
|
59
|
+
return {
|
|
60
|
+
value: value.name,
|
|
61
|
+
title: isApp ? _chalk.default.bold(value.name) + _chalk.default.gray(" (app)") : value.name
|
|
62
|
+
};
|
|
63
|
+
}), {
|
|
64
|
+
nonInteractiveHelp: `--scheme: argument must be provided with a string in non-interactive mode. Valid choices are: ${schemes.join(", ")}`
|
|
65
|
+
});
|
|
66
|
+
var ref;
|
|
67
|
+
return (ref = schemes.find(({ name })=>resolvedSchemeName === name
|
|
68
|
+
)) != null ? ref : null;
|
|
69
|
+
}
|
|
70
|
+
// Attempt to match the schemes up so we can open the correct simulator
|
|
71
|
+
return scheme ? schemes.find(({ name })=>name === scheme
|
|
72
|
+
) || {
|
|
73
|
+
name: scheme
|
|
74
|
+
} : null;
|
|
75
|
+
}
|
|
76
|
+
function getDefaultNativeScheme(projectRoot, options, xcodeProject) {
|
|
77
|
+
// If the resolution failed then we should just use the first runnable scheme that
|
|
78
|
+
// matches the provided configuration.
|
|
79
|
+
const resolvedScheme = (0, _profile).profile(_configPlugins.IOSConfig.BuildScheme.getRunnableSchemesFromXcodeproj)(projectRoot, {
|
|
80
|
+
configuration: options.configuration
|
|
81
|
+
})[0];
|
|
82
|
+
// If we couldn't find the scheme, then we'll guess at it,
|
|
83
|
+
// this is needed for cases where the native code hasn't been generated yet.
|
|
84
|
+
if (resolvedScheme) {
|
|
85
|
+
return resolvedScheme;
|
|
86
|
+
}
|
|
87
|
+
return {
|
|
88
|
+
name: _path.default.basename(xcodeProject.name, _path.default.extname(xcodeProject.name))
|
|
89
|
+
};
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
//# sourceMappingURL=resolveNativeScheme.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../src/run/ios/options/resolveNativeScheme.ts"],"sourcesContent":["import { IOSConfig } from '@expo/config-plugins';\nimport chalk from 'chalk';\nimport path from 'path';\n\nimport * as Log from '../../../log';\nimport { CommandError } from '../../../utils/errors';\nimport { profile } from '../../../utils/profile';\nimport { selectAsync } from '../../../utils/prompts';\nimport { Options, ProjectInfo, XcodeConfiguration } from '../XcodeBuild.types';\n\ntype NativeSchemeProps = {\n name: string;\n osType?: string;\n};\n\nexport async function resolveNativeSchemePropsAsync(\n projectRoot: string,\n options: Pick<Options, 'scheme' | 'configuration'>,\n xcodeProject: ProjectInfo\n): Promise<NativeSchemeProps> {\n return (\n (await promptOrQueryNativeSchemeAsync(projectRoot, options)) ??\n getDefaultNativeScheme(projectRoot, options, xcodeProject)\n );\n}\n\n/** Resolve the native iOS build `scheme` for a given `configuration`. If the `scheme` isn't provided then the user will be prompted to select one. */\nexport async function promptOrQueryNativeSchemeAsync(\n projectRoot: string,\n { scheme, configuration }: { scheme?: string | boolean; configuration?: XcodeConfiguration }\n): Promise<NativeSchemeProps | null> {\n const schemes = IOSConfig.BuildScheme.getRunnableSchemesFromXcodeproj(projectRoot, {\n configuration,\n });\n if (!schemes.length) {\n throw new CommandError('IOS_MALFORMED', 'No native iOS build schemes found');\n }\n\n if (scheme === true) {\n if (schemes.length === 1) {\n Log.log(`Auto selecting only available scheme: ${schemes[0].name}`);\n return schemes[0];\n }\n const resolvedSchemeName = await selectAsync(\n 'Select a scheme',\n schemes.map((value) => {\n const isApp =\n value.type === IOSConfig.Target.TargetType.APPLICATION && value.osType === 'iOS';\n return {\n value: value.name,\n title: isApp ? chalk.bold(value.name) + chalk.gray(' (app)') : value.name,\n };\n }),\n {\n nonInteractiveHelp: `--scheme: argument must be provided with a string in non-interactive mode. Valid choices are: ${schemes.join(\n ', '\n )}`,\n }\n );\n return schemes.find(({ name }) => resolvedSchemeName === name) ?? null;\n }\n // Attempt to match the schemes up so we can open the correct simulator\n return scheme ? schemes.find(({ name }) => name === scheme) || { name: scheme } : null;\n}\n\nexport function getDefaultNativeScheme(\n projectRoot: string,\n options: Pick<Options, 'configuration'>,\n xcodeProject: ProjectInfo\n): NativeSchemeProps {\n // If the resolution failed then we should just use the first runnable scheme that\n // matches the provided configuration.\n const resolvedScheme = profile(IOSConfig.BuildScheme.getRunnableSchemesFromXcodeproj)(\n projectRoot,\n {\n configuration: options.configuration,\n }\n )[0];\n\n // If we couldn't find the scheme, then we'll guess at it,\n // this is needed for cases where the native code hasn't been generated yet.\n if (resolvedScheme) {\n return resolvedScheme;\n }\n return {\n name: path.basename(xcodeProject.name, path.extname(xcodeProject.name)),\n };\n}\n"],"names":["resolveNativeSchemePropsAsync","promptOrQueryNativeSchemeAsync","getDefaultNativeScheme","Log","projectRoot","options","xcodeProject","scheme","configuration","schemes","IOSConfig","BuildScheme","getRunnableSchemesFromXcodeproj","length","CommandError","log","name","resolvedSchemeName","selectAsync","map","value","isApp","type","Target","TargetType","APPLICATION","osType","title","chalk","bold","gray","nonInteractiveHelp","join","find","resolvedScheme","profile","path","basename","extname"],"mappings":"AAAA;;;;QAesBA,6BAA6B,GAA7BA,6BAA6B;QAY7BC,8BAA8B,GAA9BA,8BAA8B;QAsCpCC,sBAAsB,GAAtBA,sBAAsB;AAjEZ,IAAA,cAAsB,WAAtB,sBAAsB,CAAA;AAC9B,IAAA,MAAO,kCAAP,OAAO,EAAA;AACR,IAAA,KAAM,kCAAN,MAAM,EAAA;AAEXC,IAAAA,GAAG,mCAAM,cAAc,EAApB;AACc,IAAA,OAAuB,WAAvB,uBAAuB,CAAA;AAC5B,IAAA,QAAwB,WAAxB,wBAAwB,CAAA;AACpB,IAAA,QAAwB,WAAxB,wBAAwB,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;AAQ7C,eAAeH,6BAA6B,CACjDI,WAAmB,EACnBC,OAAkD,EAClDC,YAAyB,EAC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});
|
|
5
|
+
exports.resolveOptionsAsync = resolveOptionsAsync;
|
|
6
|
+
var _simctl = require("../../../start/platforms/ios/simctl");
|
|
7
|
+
var _resolveBundlerProps = require("../../resolveBundlerProps");
|
|
8
|
+
var _resolveDevice = require("./resolveDevice");
|
|
9
|
+
var _resolveNativeScheme = require("./resolveNativeScheme");
|
|
10
|
+
var _resolveXcodeProject = require("./resolveXcodeProject");
|
|
11
|
+
async function resolveOptionsAsync(projectRoot, options) {
|
|
12
|
+
const xcodeProject = (0, _resolveXcodeProject).resolveXcodeProject(projectRoot);
|
|
13
|
+
const bundlerProps = await (0, _resolveBundlerProps).resolveBundlerPropsAsync(projectRoot, options);
|
|
14
|
+
// Resolve the scheme before the device so we can filter devices based on
|
|
15
|
+
// whichever scheme is selected (i.e. don't present TV devices if the scheme cannot be run on a TV).
|
|
16
|
+
const { osType , name: scheme } = await (0, _resolveNativeScheme).resolveNativeSchemePropsAsync(projectRoot, options, xcodeProject);
|
|
17
|
+
// Resolve the device based on the provided device id or prompt
|
|
18
|
+
// from a list of devices (connected or simulated) that are filtered by the scheme.
|
|
19
|
+
const device = await (0, _resolveDevice).resolveDeviceAsync(options.device, {
|
|
20
|
+
// It's unclear if there's any value to asserting that we haven't hardcoded the os type in the CLI.
|
|
21
|
+
osType: (0, _simctl).isOSType(osType) ? osType : undefined
|
|
22
|
+
});
|
|
23
|
+
const isSimulator = (0, _resolveDevice).isSimulatorDevice(device);
|
|
24
|
+
// Use the configuration or `Debug` if none is provided.
|
|
25
|
+
const configuration = options.configuration || "Debug";
|
|
26
|
+
// This optimization skips resetting the Metro cache needlessly.
|
|
27
|
+
// The cache is reset in `../node_modules/react-native/scripts/react-native-xcode.sh` when the
|
|
28
|
+
// project is running in Debug and built onto a physical device. It seems that this is done because
|
|
29
|
+
// the script is run from Xcode and unaware of the CLI instance.
|
|
30
|
+
const shouldSkipInitialBundling = configuration === "Debug" && !isSimulator;
|
|
31
|
+
return {
|
|
32
|
+
...bundlerProps,
|
|
33
|
+
projectRoot,
|
|
34
|
+
isSimulator,
|
|
35
|
+
xcodeProject,
|
|
36
|
+
device,
|
|
37
|
+
configuration,
|
|
38
|
+
shouldSkipInitialBundling,
|
|
39
|
+
buildCache: options.buildCache !== false,
|
|
40
|
+
scheme
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
//# sourceMappingURL=resolveOptions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../src/run/ios/options/resolveOptions.ts"],"sourcesContent":["import { isOSType } from '../../../start/platforms/ios/simctl';\nimport { resolveBundlerPropsAsync } from '../../resolveBundlerProps';\nimport { BuildProps, Options } from '../XcodeBuild.types';\nimport { isSimulatorDevice, resolveDeviceAsync } from './resolveDevice';\nimport { resolveNativeSchemePropsAsync } from './resolveNativeScheme';\nimport { resolveXcodeProject } from './resolveXcodeProject';\n\n/** Resolve arguments for the `run:ios` command. */\nexport async function resolveOptionsAsync(\n projectRoot: string,\n options: Options\n): Promise<BuildProps> {\n const xcodeProject = resolveXcodeProject(projectRoot);\n\n const bundlerProps = await resolveBundlerPropsAsync(projectRoot, options);\n\n // Resolve the scheme before the device so we can filter devices based on\n // whichever scheme is selected (i.e. don't present TV devices if the scheme cannot be run on a TV).\n const { osType, name: scheme } = await resolveNativeSchemePropsAsync(\n projectRoot,\n options,\n xcodeProject\n );\n\n // Resolve the device based on the provided device id or prompt\n // from a list of devices (connected or simulated) that are filtered by the scheme.\n const device = await resolveDeviceAsync(options.device, {\n // It's unclear if there's any value to asserting that we haven't hardcoded the os type in the CLI.\n osType: isOSType(osType) ? osType : undefined,\n });\n\n const isSimulator = isSimulatorDevice(device);\n\n // Use the configuration or `Debug` if none is provided.\n const configuration = options.configuration || 'Debug';\n\n // This optimization skips resetting the Metro cache needlessly.\n // The cache is reset in `../node_modules/react-native/scripts/react-native-xcode.sh` when the\n // project is running in Debug and built onto a physical device. It seems that this is done because\n // the script is run from Xcode and unaware of the CLI instance.\n const shouldSkipInitialBundling = configuration === 'Debug' && !isSimulator;\n\n return {\n ...bundlerProps,\n projectRoot,\n isSimulator,\n xcodeProject,\n device,\n configuration,\n shouldSkipInitialBundling,\n buildCache: options.buildCache !== false,\n scheme,\n };\n}\n"],"names":["resolveOptionsAsync","projectRoot","options","xcodeProject","resolveXcodeProject","bundlerProps","resolveBundlerPropsAsync","osType","name","scheme","resolveNativeSchemePropsAsync","device","resolveDeviceAsync","isOSType","undefined","isSimulator","isSimulatorDevice","configuration","shouldSkipInitialBundling","buildCache"],"mappings":"AAAA;;;;QAQsBA,mBAAmB,GAAnBA,mBAAmB;AARhB,IAAA,OAAqC,WAArC,qCAAqC,CAAA;AACrB,IAAA,oBAA2B,WAA3B,2BAA2B,CAAA;AAEd,IAAA,cAAiB,WAAjB,iBAAiB,CAAA;AACzB,IAAA,oBAAuB,WAAvB,uBAAuB,CAAA;AACjC,IAAA,oBAAuB,WAAvB,uBAAuB,CAAA;AAGpD,eAAeA,mBAAmB,CACvCC,WAAmB,EACnBC,OAAgB,EACK;IACrB,MAAMC,YAAY,GAAGC,CAAAA,GAAAA,oBAAmB,AAAa,CAAA,oBAAb,CAACH,WAAW,CAAC,AAAC;IAEtD,MAAMI,YAAY,GAAG,MAAMC,CAAAA,GAAAA,oBAAwB,AAAsB,CAAA,yBAAtB,CAACL,WAAW,EAAEC,OAAO,CAAC,AAAC;IAE1E,yEAAyE;IACzE,oGAAoG;IACpG,MAAM,EAAEK,MAAM,CAAA,EAAEC,IAAI,EAAEC,MAAM,CAAA,EAAE,GAAG,MAAMC,CAAAA,GAAAA,oBAA6B,AAInE,CAAA,8BAJmE,CAClET,WAAW,EACXC,OAAO,EACPC,YAAY,CACb,AAAC;IAEF,+DAA+D;IAC/D,mFAAmF;IACnF,MAAMQ,MAAM,GAAG,MAAMC,CAAAA,GAAAA,cAAkB,AAGrC,CAAA,mBAHqC,CAACV,OAAO,CAACS,MAAM,EAAE;QACtD,mGAAmG;QACnGJ,MAAM,EAAEM,CAAAA,GAAAA,OAAQ,AAAQ,CAAA,SAAR,CAACN,MAAM,CAAC,GAAGA,MAAM,GAAGO,SAAS;KAC9C,CAAC,AAAC;IAEH,MAAMC,WAAW,GAAGC,CAAAA,GAAAA,cAAiB,AAAQ,CAAA,kBAAR,CAACL,MAAM,CAAC,AAAC;IAE9C,wDAAwD;IACxD,MAAMM,aAAa,GAAGf,OAAO,CAACe,aAAa,IAAI,OAAO,AAAC;IAEvD,gEAAgE;IAChE,8FAA8F;IAC9F,mGAAmG;IACnG,gEAAgE;IAChE,MAAMC,yBAAyB,GAAGD,aAAa,KAAK,OAAO,IAAI,CAACF,WAAW,AAAC;IAE5E,OAAO;QACL,GAAGV,YAAY;QACfJ,WAAW;QACXc,WAAW;QACXZ,YAAY;QACZQ,MAAM;QACNM,aAAa;QACbC,yBAAyB;QACzBC,UAAU,EAAEjB,OAAO,CAACiB,UAAU,KAAK,KAAK;QACxCV,MAAM;KACP,CAAC;CACH"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
exports.resolveXcodeProject = resolveXcodeProject;
|
|
6
|
+
var _glob = require("glob");
|
|
7
|
+
var _errors = require("../../../utils/errors");
|
|
8
|
+
const ignoredPaths = [
|
|
9
|
+
"**/@(Carthage|Pods|vendor|node_modules)/**"
|
|
10
|
+
];
|
|
11
|
+
function findXcodeProjectPaths(projectRoot, extension) {
|
|
12
|
+
return (0, _glob).sync(`ios/*.${extension}`, {
|
|
13
|
+
absolute: true,
|
|
14
|
+
cwd: projectRoot,
|
|
15
|
+
ignore: ignoredPaths
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
function resolveXcodeProject(projectRoot) {
|
|
19
|
+
let paths = findXcodeProjectPaths(projectRoot, "xcworkspace");
|
|
20
|
+
if (paths.length) {
|
|
21
|
+
return {
|
|
22
|
+
// Use full path instead of relative project root so that warnings and errors contain full paths as well, this helps with filtering.
|
|
23
|
+
// Also helps keep things consistent in monorepos.
|
|
24
|
+
name: paths[0],
|
|
25
|
+
// name: path.relative(projectRoot, paths[0]),
|
|
26
|
+
isWorkspace: true
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
paths = findXcodeProjectPaths(projectRoot, "xcodeproj");
|
|
30
|
+
if (paths.length) {
|
|
31
|
+
return {
|
|
32
|
+
name: paths[0],
|
|
33
|
+
isWorkspace: false
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
throw new _errors.CommandError("IOS_MALFORMED", `Xcode project not found in project: ${projectRoot}. You can generate a project with \`npx expo prebuild\``);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
//# sourceMappingURL=resolveXcodeProject.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../src/run/ios/options/resolveXcodeProject.ts"],"sourcesContent":["import { sync as globSync } from 'glob';\n\nimport { CommandError } from '../../../utils/errors';\nimport { ProjectInfo } from '../XcodeBuild.types';\n\nconst ignoredPaths = ['**/@(Carthage|Pods|vendor|node_modules)/**'];\n\nfunction findXcodeProjectPaths(\n projectRoot: string,\n extension: 'xcworkspace' | 'xcodeproj'\n): string[] {\n return globSync(`ios/*.${extension}`, {\n absolute: true,\n cwd: projectRoot,\n ignore: ignoredPaths,\n });\n}\n\n/** Return the path and type of Xcode project in the given folder. */\nexport function resolveXcodeProject(projectRoot: string): ProjectInfo {\n let paths = findXcodeProjectPaths(projectRoot, 'xcworkspace');\n if (paths.length) {\n return {\n // Use full path instead of relative project root so that warnings and errors contain full paths as well, this helps with filtering.\n // Also helps keep things consistent in monorepos.\n name: paths[0],\n // name: path.relative(projectRoot, paths[0]),\n isWorkspace: true,\n };\n }\n paths = findXcodeProjectPaths(projectRoot, 'xcodeproj');\n if (paths.length) {\n return { name: paths[0], isWorkspace: false };\n }\n throw new CommandError(\n 'IOS_MALFORMED',\n `Xcode project not found in project: ${projectRoot}. You can generate a project with \\`npx expo prebuild\\``\n );\n}\n"],"names":["resolveXcodeProject","ignoredPaths","findXcodeProjectPaths","projectRoot","extension","globSync","absolute","cwd","ignore","paths","length","name","isWorkspace","CommandError"],"mappings":"AAAA;;;;QAmBgBA,mBAAmB,GAAnBA,mBAAmB;AAnBF,IAAA,KAAM,WAAN,MAAM,CAAA;AAEV,IAAA,OAAuB,WAAvB,uBAAuB,CAAA;AAGpD,MAAMC,YAAY,GAAG;IAAC,4CAA4C;CAAC,AAAC;AAEpE,SAASC,qBAAqB,CAC5BC,WAAmB,EACnBC,SAAsC,EAC5B;IACV,OAAOC,CAAAA,GAAAA,KAAQ,AAIb,CAAA,KAJa,CAAC,CAAC,MAAM,EAAED,SAAS,CAAC,CAAC,EAAE;QACpCE,QAAQ,EAAE,IAAI;QACdC,GAAG,EAAEJ,WAAW;QAChBK,MAAM,EAAEP,YAAY;KACrB,CAAC,CAAC;CACJ;AAGM,SAASD,mBAAmB,CAACG,WAAmB,EAAe;IACpE,IAAIM,KAAK,GAAGP,qBAAqB,CAACC,WAAW,EAAE,aAAa,CAAC,AAAC;IAC9D,IAAIM,KAAK,CAACC,MAAM,EAAE;QAChB,OAAO;YACL,oIAAoI;YACpI,kDAAkD;YAClDC,IAAI,EAAEF,KAAK,CAAC,CAAC,CAAC;YACd,8CAA8C;YAC9CG,WAAW,EAAE,IAAI;SAClB,CAAC;KACH;IACDH,KAAK,GAAGP,qBAAqB,CAACC,WAAW,EAAE,WAAW,CAAC,CAAC;IACxD,IAAIM,KAAK,CAACC,MAAM,EAAE;QAChB,OAAO;YAAEC,IAAI,EAAEF,KAAK,CAAC,CAAC,CAAC;YAAEG,WAAW,EAAE,KAAK;SAAE,CAAC;KAC/C;IACD,MAAM,IAAIC,OAAY,aAAA,CACpB,eAAe,EACf,CAAC,oCAAoC,EAAEV,WAAW,CAAC,uDAAuD,CAAC,CAC5G,CAAC;CACH"}
|