@expo/cli 0.1.1 → 0.1.4
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 +8 -2
- package/build/bin/cli.map +1 -1
- package/build/src/export/index.js +1 -0
- package/build/src/export/index.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/XcodeDeveloperDiskImagePrerequisite.js +69 -0
- package/build/src/start/doctor/apple/XcodeDeveloperDiskImagePrerequisite.js.map +1 -0
- 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/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/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/server/middleware/ClassicManifestMiddleware.js +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/plist.js +59 -0
- package/build/src/utils/plist.js.map +1 -0
- package/build/src/utils/prompts.js +16 -0
- 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/terminal.js +10 -0
- package/build/src/utils/terminal.js.map +1 -0
- package/package.json +9 -8
package/build/bin/cli
CHANGED
|
@@ -31,6 +31,11 @@ function _interopRequireWildcard(obj) {
|
|
|
31
31
|
const defaultCmd = "start";
|
|
32
32
|
const commands = {
|
|
33
33
|
// Add a new command here
|
|
34
|
+
"run:ios": ()=>Promise.resolve().then(function() {
|
|
35
|
+
return _interopRequireWildcard(require("../src/run/ios"));
|
|
36
|
+
}).then((i)=>i.expoRunIos
|
|
37
|
+
)
|
|
38
|
+
,
|
|
34
39
|
"run:android": ()=>Promise.resolve().then(function() {
|
|
35
40
|
return _interopRequireWildcard(require("../src/run/android"));
|
|
36
41
|
}).then((i)=>i.expoRunAndroid
|
|
@@ -95,14 +100,14 @@ const args = (0, _arg).default({
|
|
|
95
100
|
});
|
|
96
101
|
if (args["--version"]) {
|
|
97
102
|
// Version is added in the build script.
|
|
98
|
-
console.log("0.1.
|
|
103
|
+
console.log("0.1.4");
|
|
99
104
|
process.exit(0);
|
|
100
105
|
}
|
|
101
106
|
// Check if we are running `npx expo <subcommand>` or `npx expo`
|
|
102
107
|
const isSubcommand = Boolean(commands[args._[0]]);
|
|
103
108
|
// Handle `--help` flag
|
|
104
109
|
if (!isSubcommand && args["--help"]) {
|
|
105
|
-
const { login , logout , whoami , register , start , install , export: _export , config , prebuild , "run:android": runAndroid , ...others } = commands;
|
|
110
|
+
const { login , logout , whoami , register , start , install , export: _export , config , prebuild , "run:ios": runIos , "run:android": runAndroid , ...others } = commands;
|
|
106
111
|
console.log(_chalk.default`
|
|
107
112
|
{bold Usage}
|
|
108
113
|
{dim $} npx expo <command>
|
|
@@ -116,6 +121,7 @@ if (!isSubcommand && args["--help"]) {
|
|
|
116
121
|
...others
|
|
117
122
|
}).join(", ")}
|
|
118
123
|
${Object.keys({
|
|
124
|
+
"run:ios": runIos,
|
|
119
125
|
"run:android": runAndroid,
|
|
120
126
|
prebuild
|
|
121
127
|
}).join(", ")}
|
package/build/bin/cli.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../bin/cli.ts"],"sourcesContent":["#!/usr/bin/env node\nimport arg from 'arg';\nimport chalk from 'chalk';\n\nconst defaultCmd = 'start';\n\nexport type Command = (argv?: string[]) => void;\n\nconst commands: { [command: string]: () => Promise<Command> } = {\n // Add a new command here\n 'run:android': () => import('../src/run/android').then((i) => i.expoRunAndroid),\n start: () => import('../src/start').then((i) => i.expoStart),\n prebuild: () => import('../src/prebuild').then((i) => i.expoPrebuild),\n config: () => import('../src/config').then((i) => i.expoConfig),\n export: () => import('../src/export').then((i) => i.expoExport),\n\n // Auxiliary commands\n install: () => import('../src/install').then((i) => i.expoInstall),\n\n // Auth\n login: () => import('../src/login').then((i) => i.expoLogin),\n logout: () => import('../src/logout').then((i) => i.expoLogout),\n register: () => import('../src/register').then((i) => i.expoRegister),\n whoami: () => import('../src/whoami').then((i) => i.expoWhoami),\n};\n\nconst args = arg(\n {\n // Types\n '--version': Boolean,\n '--help': Boolean,\n\n // Aliases\n '-v': '--version',\n '-h': '--help',\n },\n {\n permissive: true,\n }\n);\n\nif (args['--version']) {\n // Version is added in the build script.\n console.log(process.env.__EXPO_VERSION);\n process.exit(0);\n}\n\n// Check if we are running `npx expo <subcommand>` or `npx expo`\nconst isSubcommand = Boolean(commands[args._[0]]);\n\n// Handle `--help` flag\nif (!isSubcommand && args['--help']) {\n const {\n login,\n logout,\n whoami,\n register,\n start,\n install,\n export: _export,\n config,\n prebuild,\n 'run:android': runAndroid,\n ...others\n } = commands;\n\n console.log(chalk`\n {bold Usage}\n {dim $} npx expo <command>\n\n {bold Commands}\n ${Object.keys({ start, install, export: _export, config, ...others }).join(', ')}\n ${Object.keys({ 'run:android': runAndroid, prebuild }).join(', ')}\n {dim ${Object.keys({ login, logout, whoami, register }).join(', ')}}\n\n {bold Options}\n --version, -v Version number\n --help, -h Usage info\n\n For more info run a command with the {bold --help} flag\n {dim $} npx expo start --help\n`);\n process.exit(0);\n}\n\nconst command = isSubcommand ? args._[0] : defaultCmd;\nconst commandArgs = isSubcommand ? args._.slice(1) : args._;\n\n// Push the help flag to the subcommand args.\nif (args['--help']) {\n commandArgs.push('--help');\n}\n\n// Install exit hooks\nprocess.on('SIGINT', () => process.exit(0));\nprocess.on('SIGTERM', () => process.exit(0));\n\ncommands[command]().then((exec) => exec(commandArgs));\n"],"names":["defaultCmd","commands","then","i","expoRunAndroid","start","expoStart","prebuild","expoPrebuild","config","expoConfig","export","expoExport","install","expoInstall","login","expoLogin","logout","expoLogout","register","expoRegister","whoami","expoWhoami","args","arg","Boolean","permissive","console","log","process","env","__EXPO_VERSION","exit","isSubcommand","_","_export","runAndroid","others","chalk","Object","keys","join","command","commandArgs","slice","push","on","exec"],"mappings":"AAAA;;AACgB,IAAA,IAAK,kCAAL,KAAK,EAAA;AACH,IAAA,MAAO,kCAAP,OAAO,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEzB,MAAMA,UAAU,GAAG,OAAO,AAAC;AAI3B,MAAMC,QAAQ,GAAkD;IAC9D,yBAAyB;IACzB,
|
|
1
|
+
{"version":3,"sources":["../../bin/cli.ts"],"sourcesContent":["#!/usr/bin/env node\nimport arg from 'arg';\nimport chalk from 'chalk';\n\nconst defaultCmd = 'start';\n\nexport type Command = (argv?: string[]) => void;\n\nconst commands: { [command: string]: () => Promise<Command> } = {\n // Add a new command here\n 'run:ios': () => import('../src/run/ios').then((i) => i.expoRunIos),\n 'run:android': () => import('../src/run/android').then((i) => i.expoRunAndroid),\n start: () => import('../src/start').then((i) => i.expoStart),\n prebuild: () => import('../src/prebuild').then((i) => i.expoPrebuild),\n config: () => import('../src/config').then((i) => i.expoConfig),\n export: () => import('../src/export').then((i) => i.expoExport),\n\n // Auxiliary commands\n install: () => import('../src/install').then((i) => i.expoInstall),\n\n // Auth\n login: () => import('../src/login').then((i) => i.expoLogin),\n logout: () => import('../src/logout').then((i) => i.expoLogout),\n register: () => import('../src/register').then((i) => i.expoRegister),\n whoami: () => import('../src/whoami').then((i) => i.expoWhoami),\n};\n\nconst args = arg(\n {\n // Types\n '--version': Boolean,\n '--help': Boolean,\n\n // Aliases\n '-v': '--version',\n '-h': '--help',\n },\n {\n permissive: true,\n }\n);\n\nif (args['--version']) {\n // Version is added in the build script.\n console.log(process.env.__EXPO_VERSION);\n process.exit(0);\n}\n\n// Check if we are running `npx expo <subcommand>` or `npx expo`\nconst isSubcommand = Boolean(commands[args._[0]]);\n\n// Handle `--help` flag\nif (!isSubcommand && args['--help']) {\n const {\n login,\n logout,\n whoami,\n register,\n start,\n install,\n export: _export,\n config,\n prebuild,\n 'run:ios': runIos,\n 'run:android': runAndroid,\n ...others\n } = commands;\n\n console.log(chalk`\n {bold Usage}\n {dim $} npx expo <command>\n\n {bold Commands}\n ${Object.keys({ start, install, export: _export, config, ...others }).join(', ')}\n ${Object.keys({ 'run:ios': runIos, 'run:android': runAndroid, prebuild }).join(', ')}\n {dim ${Object.keys({ login, logout, whoami, register }).join(', ')}}\n\n {bold Options}\n --version, -v Version number\n --help, -h Usage info\n\n For more info run a command with the {bold --help} flag\n {dim $} npx expo start --help\n`);\n process.exit(0);\n}\n\nconst command = isSubcommand ? args._[0] : defaultCmd;\nconst commandArgs = isSubcommand ? args._.slice(1) : args._;\n\n// Push the help flag to the subcommand args.\nif (args['--help']) {\n commandArgs.push('--help');\n}\n\n// Install exit hooks\nprocess.on('SIGINT', () => process.exit(0));\nprocess.on('SIGTERM', () => process.exit(0));\n\ncommands[command]().then((exec) => exec(commandArgs));\n"],"names":["defaultCmd","commands","then","i","expoRunIos","expoRunAndroid","start","expoStart","prebuild","expoPrebuild","config","expoConfig","export","expoExport","install","expoInstall","login","expoLogin","logout","expoLogout","register","expoRegister","whoami","expoWhoami","args","arg","Boolean","permissive","console","log","process","env","__EXPO_VERSION","exit","isSubcommand","_","_export","runIos","runAndroid","others","chalk","Object","keys","join","command","commandArgs","slice","push","on","exec"],"mappings":"AAAA;;AACgB,IAAA,IAAK,kCAAL,KAAK,EAAA;AACH,IAAA,MAAO,kCAAP,OAAO,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEzB,MAAMA,UAAU,GAAG,OAAO,AAAC;AAI3B,MAAMC,QAAQ,GAAkD;IAC9D,yBAAyB;IACzB,SAAS,EAAE,IAAM;mDAAO,gBAAgB;UAAC,CAACC,IAAI,CAAC,CAACC,CAAC,GAAKA,CAAC,CAACC,UAAU;QAAA,CAAC;IAAA;IACnE,aAAa,EAAE,IAAM;mDAAO,oBAAoB;UAAC,CAACF,IAAI,CAAC,CAACC,CAAC,GAAKA,CAAC,CAACE,cAAc;QAAA,CAAC;IAAA;IAC/EC,KAAK,EAAE,IAAM;mDAAO,cAAc;UAAC,CAACJ,IAAI,CAAC,CAACC,CAAC,GAAKA,CAAC,CAACI,SAAS;QAAA,CAAC;IAAA;IAC5DC,QAAQ,EAAE,IAAM;mDAAO,iBAAiB;UAAC,CAACN,IAAI,CAAC,CAACC,CAAC,GAAKA,CAAC,CAACM,YAAY;QAAA,CAAC;IAAA;IACrEC,MAAM,EAAE,IAAM;mDAAO,eAAe;UAAC,CAACR,IAAI,CAAC,CAACC,CAAC,GAAKA,CAAC,CAACQ,UAAU;QAAA,CAAC;IAAA;IAC/DC,MAAM,EAAE,IAAM;mDAAO,eAAe;UAAC,CAACV,IAAI,CAAC,CAACC,CAAC,GAAKA,CAAC,CAACU,UAAU;QAAA,CAAC;IAAA;IAE/D,qBAAqB;IACrBC,OAAO,E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C,QAAQ,CAAC,CAAC;CAC5B;AAED,qBAAqB;AACrBjB,OAAO,CAACkB,EAAE,CAAC,QAAQ,EAAE,IAAMlB,OAAO,CAACG,IAAI,CAAC,CAAC,CAAC;AAAA,CAAC,CAAC;AAC5CH,OAAO,CAACkB,EAAE,CAAC,SAAS,EAAE,IAAMlB,OAAO,CAACG,IAAI,CAAC,CAAC,CAAC;AAAA,CAAC,CAAC;AAE7ChC,QAAQ,CAAC2C,OAAO,CAAC,EAAE,CAAC1C,IAAI,CAAC,CAAC+C,IAAI,GAAKA,IAAI,CAACJ,WAAW,CAAC;AAAA,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/export/index.ts"],"sourcesContent":["#!/usr/bin/env node\nimport chalk from 'chalk';\n\nimport { Command } from '../../bin/cli';\nimport { assertArgs, getProjectRoot, printHelp } from '../utils/args';\nimport { logCmdError } from '../utils/errors';\n\nexport const expoExport: Command = async (argv) => {\n const args = assertArgs(\n {\n // Types\n '--help': Boolean,\n '--clear': Boolean,\n '--dump-assetmap': Boolean,\n '--dev': Boolean,\n '--dump-sourcemap': Boolean,\n '--max-workers': Number,\n '--output-dir': String,\n // Aliases\n '-h': '--help',\n // '-s': '--dump-sourcemap',\n // '-d': '--dump-assetmap',\n '-c': '--clear',\n },\n argv\n );\n\n if (args['--help']) {\n printHelp(\n `Export the static files of the app for hosting it on a web server`,\n chalk`npx expo export {dim <dir>}`,\n [\n chalk`<dir> Directory of the Expo project. {dim Default: Current working directory}`,\n chalk`--platform <all|android|ios> Platforms: android, ios, all. {dim Default: all}`,\n `--dev Configure static files for developing locally using a non-https server`,\n chalk`--output-dir <dir> The directory to export the static files to. {dim Default: dist}`,\n `--max-workers <number> Maximum number of tasks to allow the bundler to spawn`,\n `--dump-assetmap Dump the asset map for further processing`,\n `--dump-sourcemap Dump the source map for debugging the JS bundle`,\n `-c, --clear Clear the bundler cache`,\n `-h, --help Usage info`,\n ].join('\\n')\n );\n }\n\n const projectRoot = getProjectRoot(args);\n const { resolveOptionsAsync } = await import('./resolveOptions');\n const options = await resolveOptionsAsync(args).catch(logCmdError);\n\n const { exportAsync } = await import('./exportAsync');\n return exportAsync(projectRoot, options).catch(logCmdError);\n};\n"],"names":["expoExport","argv","args","assertArgs","Boolean","Number","String","printHelp","chalk","join","projectRoot","getProjectRoot","resolveOptionsAsync","options","catch","logCmdError","exportAsync"],"mappings":"AAAA;;;;;;AACkB,IAAA,MAAO,kCAAP,OAAO,EAAA;AAG6B,IAAA,KAAe,WAAf,eAAe,CAAA;AACzC,IAAA,OAAiB,WAAjB,iBAAiB,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEtC,MAAMA,UAAU,GAAY,OAAOC,IAAI,GAAK;IACjD,MAAMC,IAAI,GAAGC,CAAAA,GAAAA,KAAU,
|
|
1
|
+
{"version":3,"sources":["../../../src/export/index.ts"],"sourcesContent":["#!/usr/bin/env node\nimport chalk from 'chalk';\n\nimport { Command } from '../../bin/cli';\nimport { assertArgs, getProjectRoot, printHelp } from '../utils/args';\nimport { logCmdError } from '../utils/errors';\n\nexport const expoExport: Command = async (argv) => {\n const args = assertArgs(\n {\n // Types\n '--help': Boolean,\n '--clear': Boolean,\n '--dump-assetmap': Boolean,\n '--dev': Boolean,\n '--dump-sourcemap': Boolean,\n '--max-workers': Number,\n '--output-dir': String,\n '--platform': String,\n // Aliases\n '-h': '--help',\n // '-s': '--dump-sourcemap',\n // '-d': '--dump-assetmap',\n '-c': '--clear',\n },\n argv\n );\n\n if (args['--help']) {\n printHelp(\n `Export the static files of the app for hosting it on a web server`,\n chalk`npx expo export {dim <dir>}`,\n [\n chalk`<dir> Directory of the Expo project. {dim Default: Current working directory}`,\n chalk`--platform <all|android|ios> Platforms: android, ios, all. {dim Default: all}`,\n `--dev Configure static files for developing locally using a non-https server`,\n chalk`--output-dir <dir> The directory to export the static files to. {dim Default: dist}`,\n `--max-workers <number> Maximum number of tasks to allow the bundler to spawn`,\n `--dump-assetmap Dump the asset map for further processing`,\n `--dump-sourcemap Dump the source map for debugging the JS bundle`,\n `-c, --clear Clear the bundler cache`,\n `-h, --help Usage info`,\n ].join('\\n')\n );\n }\n\n const projectRoot = getProjectRoot(args);\n const { resolveOptionsAsync } = await import('./resolveOptions');\n const options = await resolveOptionsAsync(args).catch(logCmdError);\n\n const { exportAsync } = await import('./exportAsync');\n return exportAsync(projectRoot, options).catch(logCmdError);\n};\n"],"names":["expoExport","argv","args","assertArgs","Boolean","Number","String","printHelp","chalk","join","projectRoot","getProjectRoot","resolveOptionsAsync","options","catch","logCmdError","exportAsync"],"mappings":"AAAA;;;;;;AACkB,IAAA,MAAO,kCAAP,OAAO,EAAA;AAG6B,IAAA,KAAe,WAAf,eAAe,CAAA;AACzC,IAAA,OAAiB,WAAjB,iBAAiB,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEtC,MAAMA,UAAU,GAAY,OAAOC,IAAI,GAAK;IACjD,MAAMC,IAAI,GAAGC,CAAAA,GAAAA,KAAU,AAkBtB,CAAA,WAlBsB,CACrB;QACE,QAAQ;QACR,QAAQ,EAAEC,OAAO;QACjB,SAAS,EAAEA,OAAO;QAClB,iBAAiB,EAAEA,OAAO;QAC1B,OAAO,EAAEA,OAAO;QAChB,kBAAkB,EAAEA,OAAO;QAC3B,eAAe,EAAEC,MAAM;QACvB,cAAc,EAAEC,MAAM;QACtB,YAAY,EAAEA,MAAM;QACpB,UAAU;QACV,IAAI,EAAE,QAAQ;QACd,4BAA4B;QAC5B,2BAA2B;QAC3B,IAAI,EAAE,SAAS;KAChB,EACDL,IAAI,CACL,AAAC;IAEF,IAAIC,IAAI,CAAC,QAAQ,CAAC,EAAE;QAClBK,CAAAA,GAAAA,KAAS,AAcR,CAAA,UAdQ,CACP,CAAC,iEAAiE,CAAC,EACnEC,MAAK,QAAA,CAAC,2BAA2B,CAAC,EAClC;YACEA,MAAK,QAAA,CAAC,qGAAqG,CAAC;YAC5GA,MAAK,QAAA,CAAC,8EAA8E,CAAC;YACrF,CAAC,oGAAoG,CAAC;YACtGA,MAAK,QAAA,CAAC,8FAA8F,CAAC;YACrG,CAAC,mFAAmF,CAAC;YACrF,CAAC,uEAAuE,CAAC;YACzE,CAAC,6EAA6E,CAAC;YAC/E,CAAC,qDAAqD,CAAC;YACvD,CAAC,wCAAwC,CAAC;SAC3C,CAACC,IAAI,CAAC,IAAI,CAAC,CACb,CAAC;KACH;IAED,MAAMC,WAAW,GAAGC,CAAAA,GAAAA,KAAc,AAAM,CAAA,eAAN,CAACT,IAAI,CAAC,AAAC;IACzC,MAAM,EAAEU,mBAAmB,CAAA,EAAE,GAAG,MAAM;+CAAO,kBAAkB;MAAC,AAAC;IACjE,MAAMC,OAAO,GAAG,MAAMD,mBAAmB,CAACV,IAAI,CAAC,CAACY,KAAK,CAACC,OAAW,YAAA,CAAC,AAAC;IAEnE,MAAM,EAAEC,WAAW,CAAA,EAAE,GAAG,MAAM;+CAAO,eAAe;MAAC,AAAC;IACtD,OAAOA,WAAW,CAACN,WAAW,EAAEG,OAAO,CAAC,CAACC,KAAK,CAACC,OAAW,YAAA,CAAC,CAAC;CAC7D,AAAC;QA7CWf,UAAU,GAAVA,UAAU"}
|
|
@@ -36,13 +36,13 @@ async function runAndroidAsync(projectRoot, { install , ...options }) {
|
|
|
36
36
|
});
|
|
37
37
|
const manager = await (0, _startBundler).startBundlerAsync(projectRoot, {
|
|
38
38
|
port: props.port,
|
|
39
|
+
// If a scheme is specified then use that instead of the package name.
|
|
40
|
+
scheme: (ref = await (0, _scheme).getSchemesForAndroidAsync(projectRoot)) == null ? void 0 : ref[0],
|
|
39
41
|
headless: !props.shouldStartBundler
|
|
40
42
|
});
|
|
41
43
|
await installAppAsync(androidProjectRoot, props);
|
|
42
44
|
await manager.getDefaultDevServer().openCustomRuntimeAsync("emulator", {
|
|
43
|
-
applicationId: props.packageName
|
|
44
|
-
// If a scheme is specified then use that instead of the package name.
|
|
45
|
-
scheme: (ref = await (0, _scheme).getSchemesForAndroidAsync(projectRoot)) == null ? void 0 : ref[0]
|
|
45
|
+
applicationId: props.packageName
|
|
46
46
|
}, {
|
|
47
47
|
device: props.device.device
|
|
48
48
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/run/android/runAndroidAsync.ts"],"sourcesContent":["import path from 'path';\n\nimport { Log } from '../../log';\nimport { assembleAsync, installAsync } from '../../start/platforms/android/gradle';\nimport { getSchemesForAndroidAsync } from '../../utils/scheme';\nimport { ensureNativeProjectAsync } from '../ensureNativeProject';\nimport { logProjectLogsLocation } from '../hints';\nimport { startBundlerAsync } from '../startBundler';\nimport { resolveInstallApkNameAsync } from './resolveInstallApkName';\nimport { Options, ResolvedOptions, resolveOptionsAsync } from './resolveOptions';\n\nconst debug = require('debug')('expo:run:android');\n\nexport async function runAndroidAsync(projectRoot: string, { install, ...options }: Options) {\n await ensureNativeProjectAsync(projectRoot, { platform: 'android', install });\n\n const props = await resolveOptionsAsync(projectRoot, options);\n\n debug('Package name: ' + props.packageName);\n Log.log('› Building app...');\n\n const androidProjectRoot = path.join(projectRoot, 'android');\n\n await assembleAsync(androidProjectRoot, {\n variant: props.variant,\n port: props.port,\n appName: props.appName,\n buildCache: props.buildCache,\n });\n\n const manager = await startBundlerAsync(projectRoot, {\n port: props.port,\n headless: !props.shouldStartBundler,\n });\n\n await installAppAsync(androidProjectRoot, props);\n\n await manager.getDefaultDevServer().openCustomRuntimeAsync(\n 'emulator',\n {\n applicationId: props.packageName,\n
|
|
1
|
+
{"version":3,"sources":["../../../../src/run/android/runAndroidAsync.ts"],"sourcesContent":["import path from 'path';\n\nimport { Log } from '../../log';\nimport { assembleAsync, installAsync } from '../../start/platforms/android/gradle';\nimport { getSchemesForAndroidAsync } from '../../utils/scheme';\nimport { ensureNativeProjectAsync } from '../ensureNativeProject';\nimport { logProjectLogsLocation } from '../hints';\nimport { startBundlerAsync } from '../startBundler';\nimport { resolveInstallApkNameAsync } from './resolveInstallApkName';\nimport { Options, ResolvedOptions, resolveOptionsAsync } from './resolveOptions';\n\nconst debug = require('debug')('expo:run:android');\n\nexport async function runAndroidAsync(projectRoot: string, { install, ...options }: Options) {\n await ensureNativeProjectAsync(projectRoot, { platform: 'android', install });\n\n const props = await resolveOptionsAsync(projectRoot, options);\n\n debug('Package name: ' + props.packageName);\n Log.log('› Building app...');\n\n const androidProjectRoot = path.join(projectRoot, 'android');\n\n await assembleAsync(androidProjectRoot, {\n variant: props.variant,\n port: props.port,\n appName: props.appName,\n buildCache: props.buildCache,\n });\n\n const manager = await startBundlerAsync(projectRoot, {\n port: props.port,\n // If a scheme is specified then use that instead of the package name.\n scheme: (await getSchemesForAndroidAsync(projectRoot))?.[0],\n headless: !props.shouldStartBundler,\n });\n\n await installAppAsync(androidProjectRoot, props);\n\n await manager.getDefaultDevServer().openCustomRuntimeAsync(\n 'emulator',\n {\n applicationId: props.packageName,\n },\n { device: props.device.device }\n );\n\n if (props.shouldStartBundler) {\n logProjectLogsLocation();\n }\n}\n\nasync function installAppAsync(androidProjectRoot: string, props: ResolvedOptions) {\n // Find the APK file path\n const apkFile = await resolveInstallApkNameAsync(props.device.device, props);\n\n if (apkFile) {\n // Attempt to install the APK from the file path\n const binaryPath = path.join(props.apkVariantDirectory, apkFile);\n debug('Installing:', binaryPath);\n await props.device.installAppAsync(binaryPath);\n } else {\n // If we cannot resolve the APK file path then we can attempt to install using Gradle.\n // This offers more advanced resolution that we may not have first class support for.\n Log.log('› Failed to locate binary file, installing with Gradle...');\n await installAsync(androidProjectRoot, {\n variant: props.variant ?? 'debug',\n appName: props.appName ?? 'app',\n port: props.port,\n });\n }\n}\n"],"names":["runAndroidAsync","debug","require","projectRoot","install","options","ensureNativeProjectAsync","platform","props","resolveOptionsAsync","packageName","Log","log","androidProjectRoot","path","join","assembleAsync","variant","port","appName","buildCache","manager","startBundlerAsync","scheme","getSchemesForAndroidAsync","headless","shouldStartBundler","installAppAsync","getDefaultDevServer","openCustomRuntimeAsync","applicationId","device","logProjectLogsLocation","apkFile","resolveInstallApkNameAsync","binaryPath","apkVariantDirectory","installAsync"],"mappings":"AAAA;;;;QAasBA,eAAe,GAAfA,eAAe;AAbpB,IAAA,KAAM,kCAAN,MAAM,EAAA;AAEH,IAAA,IAAW,WAAX,WAAW,CAAA;AACa,IAAA,OAAsC,WAAtC,sCAAsC,CAAA;AACxC,IAAA,OAAoB,WAApB,oBAAoB,CAAA;AACrB,IAAA,oBAAwB,WAAxB,wBAAwB,CAAA;AAC1B,IAAA,MAAU,WAAV,UAAU,CAAA;AACf,IAAA,aAAiB,WAAjB,iBAAiB,CAAA;AACR,IAAA,sBAAyB,WAAzB,yBAAyB,CAAA;AACN,IAAA,eAAkB,WAAlB,kBAAkB,CAAA;;;;;;AAEhF,MAAMC,KAAK,GAAGC,OAAO,CAAC,OAAO,CAAC,CAAC,kBAAkB,CAAC,AAAC;AAE5C,eAAeF,eAAe,CAACG,WAAmB,EAAE,EAAEC,OAAO,CAAA,EAAE,GAAGC,OAAO,EAAW,EAAE;QAoBjF,GAA8C;IAnBxD,MAAMC,CAAAA,GAAAA,oBAAwB,AAA+C,CAAA,yBAA/C,CAACH,WAAW,EAAE;QAAEI,QAAQ,EAAE,SAAS;QAAEH,OAAO;KAAE,CAAC,CAAC;IAE9E,MAAMI,KAAK,GAAG,MAAMC,CAAAA,GAAAA,eAAmB,AAAsB,CAAA,oBAAtB,CAACN,WAAW,EAAEE,OAAO,CAAC,AAAC;IAE9DJ,KAAK,CAAC,gBAAgB,GAAGO,KAAK,CAACE,WAAW,CAAC,CAAC;IAC5CC,IAAG,IAAA,CAACC,GAAG,CAAC,wBAAqB,CAAC,CAAC;IAE/B,MAAMC,kBAAkB,GAAGC,KAAI,QAAA,CAACC,IAAI,CAACZ,WAAW,EAAE,SAAS,CAAC,AAAC;IAE7D,MAAMa,CAAAA,GAAAA,OAAa,AAKjB,CAAA,cALiB,CAACH,kBAAkB,EAAE;QACtCI,OAAO,EAAET,KAAK,CAACS,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AAEH,OAAO,CAAC,AAAC;QACjEhC,KAAK,CAAC,aAAa,EAAEkC,UAAU,CAAC,CAAC;QACjC,MAAM3B,KAAK,CAACuB,MAAM,CAACJ,eAAe,CAACQ,UAAU,CAAC,CAAC;KAChD,MAAM;QACL,sFAAsF;QACtF,qFAAqF;QACrFxB,IAAG,IAAA,CAACC,GAAG,CAAC,gEAA2D,CAAC,CAAC;YAE1DJ,QAAa,EACbA,QAAa;QAFxB,MAAM6B,CAAAA,GAAAA,OAAY,AAIhB,CAAA,aAJgB,CAACxB,kBAAkB,EAAE;YACrCI,OAAO,EAAET,CAAAA,QAAa,GAAbA,KAAK,CAACS,OAAO,YAAbT,QAAa,GAAI,OAAO;YACjCW,OAAO,EAAEX,CAAAA,QAAa,GAAbA,KAAK,CAACW,OAAO,YAAbX,QAAa,GAAI,KAAK;YAC/BU,IAAI,EAAEV,KAAK,CAACU,IAAI;SACjB,CAAC,CAAC;KACJ;CACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/run/ensureNativeProject.ts"],"sourcesContent":["import { ModPlatform } from '@expo/config-plugins';\nimport fs from 'fs';\nimport path from 'path';\n\nimport { promptToClearMalformedNativeProjectsAsync } from '../prebuild/clearNativeFolder';\nimport { prebuildAsync } from '../prebuild/prebuildAsync';\nimport { profile } from '../utils/profile';\n\nexport async function ensureNativeProjectAsync(\n projectRoot: string,\n { platform, install }: { platform: ModPlatform; install?: boolean }\n) {\n // If the user has an empty android folder then the project won't build, this can happen when they delete the prebuild files in git.\n // Check to ensure most of the core files are in place, and prompt to remove the folder if they aren't.\n await profile(promptToClearMalformedNativeProjectsAsync)(projectRoot, [platform]);\n\n // If the project doesn't have native code, prebuild it...\n if (!fs.existsSync(path.join(projectRoot, platform))) {\n await prebuildAsync(projectRoot, {\n install: !!install,\n platforms: [platform],\n });\n }\n}\n"],"names":["ensureNativeProjectAsync","projectRoot","platform","install","profile","promptToClearMalformedNativeProjectsAsync","fs","existsSync","path","join","prebuildAsync","platforms"],"mappings":"AAAA;;;;QAQsBA,wBAAwB,GAAxBA,wBAAwB;AAP/B,IAAA,GAAI,kCAAJ,IAAI,EAAA;AACF,IAAA,KAAM,kCAAN,MAAM,EAAA;AAEmC,IAAA,kBAA+B,WAA/B,+BAA+B,CAAA;AAC3D,IAAA,cAA2B,WAA3B,2BAA2B,CAAA;AACjC,IAAA,QAAkB,WAAlB,kBAAkB,CAAA;;;;;;AAEnC,eAAeA,wBAAwB,CAC5CC,WAAmB,EACnB,EAAEC,QAAQ,CAAA,EAAEC,OAAO,CAAA,EAAgD,EACnE;IACA,oIAAoI;IACpI,uGAAuG;IACvG,MAAMC,CAAAA,GAAAA,QAAO,AAA2C,CAAA,QAA3C,CAACC,kBAAyC,0CAAA,CAAC,CAACJ,WAAW,EAAE;QAACC,QAAQ;KAAC,CAAC,CAAC;IAElF,0DAA0D;IAC1D,IAAI,CAACI,GAAE,QAAA,CAACC,UAAU,CAACC,KAAI,QAAA,CAACC,IAAI,CAACR,WAAW,EAAEC,QAAQ,CAAC,CAAC,EAAE;QACpD,MAAMQ,CAAAA,GAAAA,cAAa,AAGjB,CAAA,cAHiB,CAACT,WAAW,EAAE;YAC/BE,OAAO,EAAE,CAAC,CAACA,OAAO;YAClBQ,SAAS,EAAE;gBAACT,QAAQ;aAAC;SACtB,CAAC,CAAC;KACJ;
|
|
1
|
+
{"version":3,"sources":["../../../src/run/ensureNativeProject.ts"],"sourcesContent":["import { ModPlatform } from '@expo/config-plugins';\nimport fs from 'fs';\nimport path from 'path';\n\nimport { promptToClearMalformedNativeProjectsAsync } from '../prebuild/clearNativeFolder';\nimport { prebuildAsync } from '../prebuild/prebuildAsync';\nimport { profile } from '../utils/profile';\n\nexport async function ensureNativeProjectAsync(\n projectRoot: string,\n { platform, install }: { platform: ModPlatform; install?: boolean }\n) {\n // If the user has an empty android folder then the project won't build, this can happen when they delete the prebuild files in git.\n // Check to ensure most of the core files are in place, and prompt to remove the folder if they aren't.\n await profile(promptToClearMalformedNativeProjectsAsync)(projectRoot, [platform]);\n\n // If the project doesn't have native code, prebuild it...\n if (!fs.existsSync(path.join(projectRoot, platform))) {\n await prebuildAsync(projectRoot, {\n install: !!install,\n platforms: [platform],\n });\n } else {\n return true;\n }\n return false;\n}\n"],"names":["ensureNativeProjectAsync","projectRoot","platform","install","profile","promptToClearMalformedNativeProjectsAsync","fs","existsSync","path","join","prebuildAsync","platforms"],"mappings":"AAAA;;;;QAQsBA,wBAAwB,GAAxBA,wBAAwB;AAP/B,IAAA,GAAI,kCAAJ,IAAI,EAAA;AACF,IAAA,KAAM,kCAAN,MAAM,EAAA;AAEmC,IAAA,kBAA+B,WAA/B,+BAA+B,CAAA;AAC3D,IAAA,cAA2B,WAA3B,2BAA2B,CAAA;AACjC,IAAA,QAAkB,WAAlB,kBAAkB,CAAA;;;;;;AAEnC,eAAeA,wBAAwB,CAC5CC,WAAmB,EACnB,EAAEC,QAAQ,CAAA,EAAEC,OAAO,CAAA,EAAgD,EACnE;IACA,oIAAoI;IACpI,uGAAuG;IACvG,MAAMC,CAAAA,GAAAA,QAAO,AAA2C,CAAA,QAA3C,CAACC,kBAAyC,0CAAA,CAAC,CAACJ,WAAW,EAAE;QAACC,QAAQ;KAAC,CAAC,CAAC;IAElF,0DAA0D;IAC1D,IAAI,CAACI,GAAE,QAAA,CAACC,UAAU,CAACC,KAAI,QAAA,CAACC,IAAI,CAACR,WAAW,EAAEC,QAAQ,CAAC,CAAC,EAAE;QACpD,MAAMQ,CAAAA,GAAAA,cAAa,AAGjB,CAAA,cAHiB,CAACT,WAAW,EAAE;YAC/BE,OAAO,EAAE,CAAC,CAACA,OAAO;YAClBQ,SAAS,EAAE;gBAACT,QAAQ;aAAC;SACtB,CAAC,CAAC;KACJ,MAAM;QACL,OAAO,IAAI,CAAC;KACb;IACD,OAAO,KAAK,CAAC;CACd"}
|
package/build/src/run/hints.js
CHANGED
|
@@ -16,7 +16,7 @@ function logDeviceArgument(id) {
|
|
|
16
16
|
_log.Log.log(_chalk.default.dim`› Using --device ${id}`);
|
|
17
17
|
}
|
|
18
18
|
function logProjectLogsLocation() {
|
|
19
|
-
_log.Log.log(_chalk.default
|
|
19
|
+
_log.Log.log(_chalk.default`\n› Logs for your project will appear below.${_env.env.CI ? "" : _chalk.default.dim(` Press Ctrl+C to exit.`)}`);
|
|
20
20
|
}
|
|
21
21
|
|
|
22
22
|
//# sourceMappingURL=hints.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/run/hints.ts"],"sourcesContent":["import chalk from 'chalk';\n\nimport { Log } from '../log';\nimport { env } from '../utils/env';\n\n/** Log the device argument to use for the next run: `Using --device foobar` */\nexport function logDeviceArgument(id: string) {\n Log.log(chalk.dim`› Using --device ${id}`);\n}\n\nexport function logProjectLogsLocation() {\n Log.log(\n chalk
|
|
1
|
+
{"version":3,"sources":["../../../src/run/hints.ts"],"sourcesContent":["import chalk from 'chalk';\n\nimport { Log } from '../log';\nimport { env } from '../utils/env';\n\n/** Log the device argument to use for the next run: `Using --device foobar` */\nexport function logDeviceArgument(id: string) {\n Log.log(chalk.dim`› Using --device ${id}`);\n}\n\nexport function logProjectLogsLocation() {\n Log.log(\n chalk`\\n› Logs for your project will appear below.${\n env.CI ? '' : chalk.dim(` Press Ctrl+C to exit.`)\n }`\n );\n}\n"],"names":["logDeviceArgument","logProjectLogsLocation","id","Log","log","chalk","dim","env","CI"],"mappings":"AAAA;;;;QAMgBA,iBAAiB,GAAjBA,iBAAiB;QAIjBC,sBAAsB,GAAtBA,sBAAsB;AAVpB,IAAA,MAAO,kCAAP,OAAO,EAAA;AAEL,IAAA,IAAQ,WAAR,QAAQ,CAAA;AACR,IAAA,IAAc,WAAd,cAAc,CAAA;;;;;;AAG3B,SAASD,iBAAiB,CAACE,EAAU,EAAE;IAC5CC,IAAG,IAAA,CAACC,GAAG,CAACC,MAAK,QAAA,CAACC,GAAG,CAAC,mBAAmB,EAAEJ,EAAE,CAAC,CAAC,CAAC,CAAC;CAC9C;AAEM,SAASD,sBAAsB,GAAG;IACvCE,IAAG,IAAA,CAACC,GAAG,CACLC,MAAK,QAAA,CAAC,8CAA4C,EAChDE,IAAG,IAAA,CAACC,EAAE,GAAG,EAAE,GAAGH,MAAK,QAAA,CAACC,GAAG,CAAC,CAAC,sBAAsB,CAAC,CAAC,CAClD,CAAC,CACH,CAAC;CACH"}
|
|
@@ -0,0 +1,275 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
exports.logPrettyItem = logPrettyItem;
|
|
6
|
+
exports.getAppBinaryPath = getAppBinaryPath;
|
|
7
|
+
exports.getEscapedPath = getEscapedPath;
|
|
8
|
+
exports.extractEnvVariableFromBuild = extractEnvVariableFromBuild;
|
|
9
|
+
exports.getProcessOptions = getProcessOptions;
|
|
10
|
+
exports.getXcodeBuildArgsAsync = getXcodeBuildArgsAsync;
|
|
11
|
+
exports.buildAsync = buildAsync;
|
|
12
|
+
exports._assertXcodeBuildResults = _assertXcodeBuildResults;
|
|
13
|
+
var _xcpretty = require("@expo/xcpretty");
|
|
14
|
+
var _chalk = _interopRequireDefault(require("chalk"));
|
|
15
|
+
var _childProcess = require("child_process");
|
|
16
|
+
var _fs = _interopRequireDefault(require("fs"));
|
|
17
|
+
var _os = _interopRequireDefault(require("os"));
|
|
18
|
+
var _path = _interopRequireDefault(require("path"));
|
|
19
|
+
var Log = _interopRequireWildcard(require("../../log"));
|
|
20
|
+
var _dir = require("../../utils/dir");
|
|
21
|
+
var _env = require("../../utils/env");
|
|
22
|
+
var _errors = require("../../utils/errors");
|
|
23
|
+
var _terminal = require("../../utils/terminal");
|
|
24
|
+
var _configureCodeSigning = require("./codeSigning/configureCodeSigning");
|
|
25
|
+
function _interopRequireDefault(obj) {
|
|
26
|
+
return obj && obj.__esModule ? obj : {
|
|
27
|
+
default: obj
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
function _interopRequireWildcard(obj) {
|
|
31
|
+
if (obj && obj.__esModule) {
|
|
32
|
+
return obj;
|
|
33
|
+
} else {
|
|
34
|
+
var newObj = {};
|
|
35
|
+
if (obj != null) {
|
|
36
|
+
for(var key in obj){
|
|
37
|
+
if (Object.prototype.hasOwnProperty.call(obj, key)) {
|
|
38
|
+
var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {};
|
|
39
|
+
if (desc.get || desc.set) {
|
|
40
|
+
Object.defineProperty(newObj, key, desc);
|
|
41
|
+
} else {
|
|
42
|
+
newObj[key] = obj[key];
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
newObj.default = obj;
|
|
48
|
+
return newObj;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
function logPrettyItem(message) {
|
|
52
|
+
Log.log(_chalk.default`{whiteBright \u203A} ${message}`);
|
|
53
|
+
}
|
|
54
|
+
function getAppBinaryPath(buildOutput) {
|
|
55
|
+
// Matches what's used in "Bundle React Native code and images" script.
|
|
56
|
+
// Requires that `-hideShellScriptEnvironment` is not included in the build command (extra logs).
|
|
57
|
+
// Like `\=/Users/evanbacon/Library/Developer/Xcode/DerivedData/Exponent-anpuosnglkxokahjhfszejloqfvo/Build/Products/Debug-iphonesimulator`
|
|
58
|
+
const CONFIGURATION_BUILD_DIR = extractEnvVariableFromBuild(buildOutput, "CONFIGURATION_BUILD_DIR").sort(// Longer name means more suffixes, we want the shortest possible one to be first.
|
|
59
|
+
// Massive projects (like Expo Go) can sometimes print multiple different sets of environment variables.
|
|
60
|
+
// This can become an issue with some
|
|
61
|
+
(a, b)=>a.length - b.length
|
|
62
|
+
);
|
|
63
|
+
// Like `Exponent.app`
|
|
64
|
+
const UNLOCALIZED_RESOURCES_FOLDER_PATH = extractEnvVariableFromBuild(buildOutput, "UNLOCALIZED_RESOURCES_FOLDER_PATH");
|
|
65
|
+
const binaryPath = _path.default.join(// Use the shortest defined env variable (usually there's just one).
|
|
66
|
+
CONFIGURATION_BUILD_DIR[0], // Use the last defined env variable.
|
|
67
|
+
UNLOCALIZED_RESOURCES_FOLDER_PATH[UNLOCALIZED_RESOURCES_FOLDER_PATH.length - 1]);
|
|
68
|
+
// If the app has a space in the name it'll fail because it isn't escaped properly by Xcode.
|
|
69
|
+
return getEscapedPath(binaryPath);
|
|
70
|
+
}
|
|
71
|
+
function getEscapedPath(filePath) {
|
|
72
|
+
if (_fs.default.existsSync(filePath)) {
|
|
73
|
+
return filePath;
|
|
74
|
+
}
|
|
75
|
+
const unescapedPath = filePath.split(/\\ /).join(" ");
|
|
76
|
+
if (_fs.default.existsSync(unescapedPath)) {
|
|
77
|
+
return unescapedPath;
|
|
78
|
+
}
|
|
79
|
+
throw new _errors.CommandError("XCODE_BUILD", `Unexpected: Generated app at path "${filePath}" cannot be read, the app cannot be installed. Please report this and build onto a simulator.`);
|
|
80
|
+
}
|
|
81
|
+
function extractEnvVariableFromBuild(buildOutput, variableName) {
|
|
82
|
+
// Xcode can sometimes escape `=` with a backslash or put the value in quotes
|
|
83
|
+
const reg = new RegExp(`export ${variableName}\\\\?=(.*)$`, "mg");
|
|
84
|
+
const matched = [
|
|
85
|
+
...buildOutput.matchAll(reg)
|
|
86
|
+
];
|
|
87
|
+
if (!matched || !matched.length) {
|
|
88
|
+
throw new _errors.CommandError("XCODE_BUILD", `Malformed xcodebuild results: "${variableName}" variable was not generated in build output. Please report this issue and run your project with Xcode instead.`);
|
|
89
|
+
}
|
|
90
|
+
return matched.map((value)=>value[1]
|
|
91
|
+
).filter(Boolean);
|
|
92
|
+
}
|
|
93
|
+
function getProcessOptions({ packager , shouldSkipInitialBundling , terminal , port }) {
|
|
94
|
+
const SKIP_BUNDLING = shouldSkipInitialBundling ? "1" : undefined;
|
|
95
|
+
if (packager) {
|
|
96
|
+
return {
|
|
97
|
+
env: {
|
|
98
|
+
...process.env,
|
|
99
|
+
RCT_TERMINAL: terminal,
|
|
100
|
+
SKIP_BUNDLING,
|
|
101
|
+
RCT_METRO_PORT: port.toString()
|
|
102
|
+
}
|
|
103
|
+
};
|
|
104
|
+
}
|
|
105
|
+
return {
|
|
106
|
+
env: {
|
|
107
|
+
...process.env,
|
|
108
|
+
RCT_TERMINAL: terminal,
|
|
109
|
+
SKIP_BUNDLING,
|
|
110
|
+
// Always skip launching the packager from a build script.
|
|
111
|
+
// The script is used for people building their project directly from Xcode.
|
|
112
|
+
// This essentially means "› Running script 'Start Packager'" does nothing.
|
|
113
|
+
RCT_NO_LAUNCH_PACKAGER: "true"
|
|
114
|
+
}
|
|
115
|
+
};
|
|
116
|
+
}
|
|
117
|
+
async function getXcodeBuildArgsAsync(props) {
|
|
118
|
+
const args = [
|
|
119
|
+
props.xcodeProject.isWorkspace ? "-workspace" : "-project",
|
|
120
|
+
props.xcodeProject.name,
|
|
121
|
+
"-configuration",
|
|
122
|
+
props.configuration,
|
|
123
|
+
"-scheme",
|
|
124
|
+
props.scheme,
|
|
125
|
+
"-destination",
|
|
126
|
+
`id=${props.device.udid}`,
|
|
127
|
+
];
|
|
128
|
+
if (!props.isSimulator) {
|
|
129
|
+
const developmentTeamId = await (0, _configureCodeSigning).ensureDeviceIsCodeSignedForDeploymentAsync(props.projectRoot);
|
|
130
|
+
if (developmentTeamId) {
|
|
131
|
+
args.push(`DEVELOPMENT_TEAM=${developmentTeamId}`, "-allowProvisioningUpdates", "-allowProvisioningDeviceRegistration");
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
// Add last
|
|
135
|
+
if (props.buildCache === false) {
|
|
136
|
+
args.push(// Will first clean the derived data folder.
|
|
137
|
+
"clean", // Then build step must be added otherwise the process will simply clean and exit.
|
|
138
|
+
"build");
|
|
139
|
+
}
|
|
140
|
+
return args;
|
|
141
|
+
}
|
|
142
|
+
function spawnXcodeBuild(args, options, { onData }) {
|
|
143
|
+
const buildProcess = (0, _childProcess).spawn("xcodebuild", args, options);
|
|
144
|
+
let results = "";
|
|
145
|
+
let error = "";
|
|
146
|
+
buildProcess.stdout.on("data", (data)=>{
|
|
147
|
+
const stringData = data.toString();
|
|
148
|
+
results += stringData;
|
|
149
|
+
onData(stringData);
|
|
150
|
+
});
|
|
151
|
+
buildProcess.stderr.on("data", (data)=>{
|
|
152
|
+
const stringData = data instanceof Buffer ? data.toString() : data;
|
|
153
|
+
error += stringData;
|
|
154
|
+
});
|
|
155
|
+
return new Promise(async (resolve, reject)=>{
|
|
156
|
+
buildProcess.on("close", (code)=>{
|
|
157
|
+
resolve({
|
|
158
|
+
code,
|
|
159
|
+
results,
|
|
160
|
+
error
|
|
161
|
+
});
|
|
162
|
+
});
|
|
163
|
+
});
|
|
164
|
+
}
|
|
165
|
+
async function spawnXcodeBuildWithFlush(args, options, { onFlush }) {
|
|
166
|
+
let currentBuffer = "";
|
|
167
|
+
// Data can be sent in chunks that would have no relevance to our regex
|
|
168
|
+
// this can cause massive slowdowns, so we need to ensure the data is complete before attempting to parse it.
|
|
169
|
+
function flushBuffer() {
|
|
170
|
+
if (!currentBuffer) {
|
|
171
|
+
return;
|
|
172
|
+
}
|
|
173
|
+
const data = currentBuffer;
|
|
174
|
+
// Reset buffer.
|
|
175
|
+
currentBuffer = "";
|
|
176
|
+
// Process data.
|
|
177
|
+
onFlush(data);
|
|
178
|
+
}
|
|
179
|
+
const data1 = await spawnXcodeBuild(args, options, {
|
|
180
|
+
onData (stringData) {
|
|
181
|
+
currentBuffer += stringData;
|
|
182
|
+
// Only flush the data if we have a full line.
|
|
183
|
+
if (currentBuffer.endsWith(_os.default.EOL)) {
|
|
184
|
+
flushBuffer();
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
});
|
|
188
|
+
// Flush log data at the end just in case we missed something.
|
|
189
|
+
flushBuffer();
|
|
190
|
+
return data1;
|
|
191
|
+
}
|
|
192
|
+
async function spawnXcodeBuildWithFormat(args, options, { projectRoot , xcodeProject }) {
|
|
193
|
+
Log.debug(` xcodebuild ${args.join(" ")}`);
|
|
194
|
+
logPrettyItem(_chalk.default.bold`Planning build`);
|
|
195
|
+
const formatter = _xcpretty.ExpoRunFormatter.create(projectRoot, {
|
|
196
|
+
xcodeProject,
|
|
197
|
+
isDebug: _env.env.EXPO_DEBUG
|
|
198
|
+
});
|
|
199
|
+
const results = await spawnXcodeBuildWithFlush(args, options, {
|
|
200
|
+
onFlush (data) {
|
|
201
|
+
// Process data.
|
|
202
|
+
for (const line of formatter.pipe(data)){
|
|
203
|
+
// Log parsed results.
|
|
204
|
+
Log.log(line);
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
});
|
|
208
|
+
Log.debug(`Exited with code: ${results.code}`);
|
|
209
|
+
if (// User cancelled with ctrl-c
|
|
210
|
+
results.code === null || // Build interrupted
|
|
211
|
+
results.code === 75) {
|
|
212
|
+
throw new _errors.AbortCommandError();
|
|
213
|
+
}
|
|
214
|
+
Log.log(formatter.getBuildSummary());
|
|
215
|
+
return {
|
|
216
|
+
...results,
|
|
217
|
+
formatter
|
|
218
|
+
};
|
|
219
|
+
}
|
|
220
|
+
async function buildAsync(props) {
|
|
221
|
+
const args = await getXcodeBuildArgsAsync(props);
|
|
222
|
+
const { projectRoot , xcodeProject , shouldSkipInitialBundling , port } = props;
|
|
223
|
+
const { code , results , formatter , error } = await spawnXcodeBuildWithFormat(args, getProcessOptions({
|
|
224
|
+
packager: false,
|
|
225
|
+
terminal: (0, _terminal).getUserTerminal(),
|
|
226
|
+
shouldSkipInitialBundling,
|
|
227
|
+
port
|
|
228
|
+
}), {
|
|
229
|
+
projectRoot,
|
|
230
|
+
xcodeProject
|
|
231
|
+
});
|
|
232
|
+
const logFilePath = writeBuildLogs(projectRoot, results, error);
|
|
233
|
+
if (code !== 0) {
|
|
234
|
+
// Determine if the logger found any errors;
|
|
235
|
+
const wasErrorPresented = !!formatter.errors.length;
|
|
236
|
+
if (wasErrorPresented) {
|
|
237
|
+
// This has a flaw, if the user is missing a file, and there is a script error, only the missing file error will be shown.
|
|
238
|
+
// They will only see the script error if they fix the missing file and rerun.
|
|
239
|
+
// The flaw can be fixed by catching script errors in the custom logger.
|
|
240
|
+
throw new _errors.CommandError(`Failed to build iOS project. "xcodebuild" exited with error code ${code}.`);
|
|
241
|
+
}
|
|
242
|
+
_assertXcodeBuildResults(code, results, error, xcodeProject, logFilePath);
|
|
243
|
+
}
|
|
244
|
+
return results;
|
|
245
|
+
}
|
|
246
|
+
function _assertXcodeBuildResults(code, results, error, xcodeProject, logFilePath) {
|
|
247
|
+
var ref;
|
|
248
|
+
const errorTitle = `Failed to build iOS project. "xcodebuild" exited with error code ${code}.`;
|
|
249
|
+
const throwWithMessage = (message)=>{
|
|
250
|
+
throw new _errors.CommandError(`${errorTitle}\nTo view more error logs, try building the app with Xcode directly, by opening ${xcodeProject.name}.\n\n` + message + `Build logs written to ${_chalk.default.underline(logFilePath)}`);
|
|
251
|
+
};
|
|
252
|
+
const localizedError = (ref = error.match(/NSLocalizedFailure = "(.*)"/)) == null ? void 0 : ref[1];
|
|
253
|
+
if (localizedError) {
|
|
254
|
+
throwWithMessage(_chalk.default.bold(localizedError) + "\n\n");
|
|
255
|
+
}
|
|
256
|
+
// Show all the log info because often times the error is coming from a shell script,
|
|
257
|
+
// that invoked a node script, that started metro, which threw an error.
|
|
258
|
+
throwWithMessage(results + "\n\n" + error);
|
|
259
|
+
}
|
|
260
|
+
function writeBuildLogs(projectRoot, buildOutput, errorOutput) {
|
|
261
|
+
const [logFilePath, errorFilePath] = getErrorLogFilePath(projectRoot);
|
|
262
|
+
_fs.default.writeFileSync(logFilePath, buildOutput);
|
|
263
|
+
_fs.default.writeFileSync(errorFilePath, errorOutput);
|
|
264
|
+
return logFilePath;
|
|
265
|
+
}
|
|
266
|
+
function getErrorLogFilePath(projectRoot) {
|
|
267
|
+
const folder = _path.default.join(projectRoot, ".expo");
|
|
268
|
+
(0, _dir).ensureDirectory(folder);
|
|
269
|
+
return [
|
|
270
|
+
_path.default.join(folder, "xcodebuild.log"),
|
|
271
|
+
_path.default.join(folder, "xcodebuild-error.log")
|
|
272
|
+
];
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
//# sourceMappingURL=XcodeBuild.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/run/ios/XcodeBuild.ts"],"sourcesContent":["import { ExpoRunFormatter } from '@expo/xcpretty';\nimport chalk from 'chalk';\nimport { spawn, SpawnOptionsWithoutStdio } from 'child_process';\nimport fs from 'fs';\nimport os from 'os';\nimport path from 'path';\n\nimport * as Log from '../../log';\nimport { ensureDirectory } from '../../utils/dir';\nimport { env } from '../../utils/env';\nimport { AbortCommandError, CommandError } from '../../utils/errors';\nimport { getUserTerminal } from '../../utils/terminal';\nimport { BuildProps, ProjectInfo } from './XcodeBuild.types';\nimport { ensureDeviceIsCodeSignedForDeploymentAsync } from './codeSigning/configureCodeSigning';\n\nexport function logPrettyItem(message: string) {\n Log.log(chalk`{whiteBright \\u203A} ${message}`);\n}\n\n/**\n *\n * @returns '/Users/evanbacon/Library/Developer/Xcode/DerivedData/myapp-gpgjqjodrxtervaufttwnsgimhrx/Build/Products/Debug-iphonesimulator/myapp.app'\n */\nexport function getAppBinaryPath(buildOutput: string) {\n // Matches what's used in \"Bundle React Native code and images\" script.\n // Requires that `-hideShellScriptEnvironment` is not included in the build command (extra logs).\n\n // Like `\\=/Users/evanbacon/Library/Developer/Xcode/DerivedData/Exponent-anpuosnglkxokahjhfszejloqfvo/Build/Products/Debug-iphonesimulator`\n const CONFIGURATION_BUILD_DIR = extractEnvVariableFromBuild(\n buildOutput,\n 'CONFIGURATION_BUILD_DIR'\n ).sort(\n // Longer name means more suffixes, we want the shortest possible one to be first.\n // Massive projects (like Expo Go) can sometimes print multiple different sets of environment variables.\n // This can become an issue with some\n (a, b) => a.length - b.length\n );\n // Like `Exponent.app`\n const UNLOCALIZED_RESOURCES_FOLDER_PATH = extractEnvVariableFromBuild(\n buildOutput,\n 'UNLOCALIZED_RESOURCES_FOLDER_PATH'\n );\n\n const binaryPath = path.join(\n // Use the shortest defined env variable (usually there's just one).\n CONFIGURATION_BUILD_DIR[0],\n // Use the last defined env variable.\n UNLOCALIZED_RESOURCES_FOLDER_PATH[UNLOCALIZED_RESOURCES_FOLDER_PATH.length - 1]\n );\n\n // If the app has a space in the name it'll fail because it isn't escaped properly by Xcode.\n return getEscapedPath(binaryPath);\n}\n\nexport function getEscapedPath(filePath: string): string {\n if (fs.existsSync(filePath)) {\n return filePath;\n }\n const unescapedPath = filePath.split(/\\\\ /).join(' ');\n if (fs.existsSync(unescapedPath)) {\n return unescapedPath;\n }\n throw new CommandError(\n 'XCODE_BUILD',\n `Unexpected: Generated app at path \"${filePath}\" cannot be read, the app cannot be installed. Please report this and build onto a simulator.`\n );\n}\n\nexport function extractEnvVariableFromBuild(buildOutput: string, variableName: string) {\n // Xcode can sometimes escape `=` with a backslash or put the value in quotes\n const reg = new RegExp(`export ${variableName}\\\\\\\\?=(.*)$`, 'mg');\n const matched = [...buildOutput.matchAll(reg)];\n\n if (!matched || !matched.length) {\n throw new CommandError(\n 'XCODE_BUILD',\n `Malformed xcodebuild results: \"${variableName}\" variable was not generated in build output. Please report this issue and run your project with Xcode instead.`\n );\n }\n return matched.map((value) => value[1]).filter(Boolean) as string[];\n}\n\nexport function getProcessOptions({\n packager,\n shouldSkipInitialBundling,\n terminal,\n port,\n}: {\n packager: boolean;\n shouldSkipInitialBundling?: boolean;\n terminal: string | undefined;\n port: number;\n}): SpawnOptionsWithoutStdio {\n const SKIP_BUNDLING = shouldSkipInitialBundling ? '1' : undefined;\n if (packager) {\n return {\n env: {\n ...process.env,\n RCT_TERMINAL: terminal,\n SKIP_BUNDLING,\n RCT_METRO_PORT: port.toString(),\n },\n };\n }\n\n return {\n env: {\n ...process.env,\n RCT_TERMINAL: terminal,\n SKIP_BUNDLING,\n // Always skip launching the packager from a build script.\n // The script is used for people building their project directly from Xcode.\n // This essentially means \"› Running script 'Start Packager'\" does nothing.\n RCT_NO_LAUNCH_PACKAGER: 'true',\n // FORCE_BUNDLING: '0'\n },\n };\n}\n\nexport async function getXcodeBuildArgsAsync(\n props: Pick<\n BuildProps,\n | 'buildCache'\n | 'projectRoot'\n | 'xcodeProject'\n | 'configuration'\n | 'scheme'\n | 'device'\n | 'isSimulator'\n >\n): Promise<string[]> {\n const args = [\n props.xcodeProject.isWorkspace ? '-workspace' : '-project',\n props.xcodeProject.name,\n '-configuration',\n props.configuration,\n '-scheme',\n props.scheme,\n '-destination',\n `id=${props.device.udid}`,\n ];\n\n if (!props.isSimulator) {\n const developmentTeamId = await ensureDeviceIsCodeSignedForDeploymentAsync(props.projectRoot);\n if (developmentTeamId) {\n args.push(\n `DEVELOPMENT_TEAM=${developmentTeamId}`,\n '-allowProvisioningUpdates',\n '-allowProvisioningDeviceRegistration'\n );\n }\n }\n\n // Add last\n if (props.buildCache === false) {\n args.push(\n // Will first clean the derived data folder.\n 'clean',\n // Then build step must be added otherwise the process will simply clean and exit.\n 'build'\n );\n }\n return args;\n}\n\nfunction spawnXcodeBuild(\n args: string[],\n options: SpawnOptionsWithoutStdio,\n { onData }: { onData: (data: string) => void }\n): Promise<{ code: number | null; results: string; error: string }> {\n const buildProcess = spawn('xcodebuild', args, options);\n\n let results = '';\n let error = '';\n\n buildProcess.stdout.on('data', (data: Buffer) => {\n const stringData = data.toString();\n results += stringData;\n onData(stringData);\n });\n\n buildProcess.stderr.on('data', (data: Buffer) => {\n const stringData = data instanceof Buffer ? data.toString() : data;\n error += stringData;\n });\n\n return new Promise(async (resolve, reject) => {\n buildProcess.on('close', (code: number) => {\n resolve({ code, results, error });\n });\n });\n}\n\nasync function spawnXcodeBuildWithFlush(\n args: string[],\n options: SpawnOptionsWithoutStdio,\n { onFlush }: { onFlush: (data: string) => void }\n): Promise<{ code: number | null; results: string; error: string }> {\n let currentBuffer = '';\n\n // Data can be sent in chunks that would have no relevance to our regex\n // this can cause massive slowdowns, so we need to ensure the data is complete before attempting to parse it.\n function flushBuffer() {\n if (!currentBuffer) {\n return;\n }\n\n const data = currentBuffer;\n // Reset buffer.\n currentBuffer = '';\n // Process data.\n onFlush(data);\n }\n\n const data = await spawnXcodeBuild(args, options, {\n onData(stringData) {\n currentBuffer += stringData;\n // Only flush the data if we have a full line.\n if (currentBuffer.endsWith(os.EOL)) {\n flushBuffer();\n }\n },\n });\n\n // Flush log data at the end just in case we missed something.\n flushBuffer();\n return data;\n}\n\nasync function spawnXcodeBuildWithFormat(\n args: string[],\n options: SpawnOptionsWithoutStdio,\n { projectRoot, xcodeProject }: { projectRoot: string; xcodeProject: ProjectInfo }\n): Promise<{ code: number | null; results: string; error: string; formatter: ExpoRunFormatter }> {\n Log.debug(` xcodebuild ${args.join(' ')}`);\n\n logPrettyItem(chalk.bold`Planning build`);\n\n const formatter = ExpoRunFormatter.create(projectRoot, {\n xcodeProject,\n isDebug: env.EXPO_DEBUG,\n });\n\n const results = await spawnXcodeBuildWithFlush(args, options, {\n onFlush(data) {\n // Process data.\n for (const line of formatter.pipe(data)) {\n // Log parsed results.\n Log.log(line);\n }\n },\n });\n\n Log.debug(`Exited with code: ${results.code}`);\n\n if (\n // User cancelled with ctrl-c\n results.code === null ||\n // Build interrupted\n results.code === 75\n ) {\n throw new AbortCommandError();\n }\n\n Log.log(formatter.getBuildSummary());\n\n return { ...results, formatter };\n}\n\nexport async function buildAsync(props: BuildProps): Promise<string> {\n const args = await getXcodeBuildArgsAsync(props);\n\n const { projectRoot, xcodeProject, shouldSkipInitialBundling, port } = props;\n\n const { code, results, formatter, error } = await spawnXcodeBuildWithFormat(\n args,\n getProcessOptions({\n packager: false,\n terminal: getUserTerminal(),\n shouldSkipInitialBundling,\n port,\n }),\n {\n projectRoot,\n xcodeProject,\n }\n );\n\n const logFilePath = writeBuildLogs(projectRoot, results, error);\n\n if (code !== 0) {\n // Determine if the logger found any errors;\n const wasErrorPresented = !!formatter.errors.length;\n\n if (wasErrorPresented) {\n // This has a flaw, if the user is missing a file, and there is a script error, only the missing file error will be shown.\n // They will only see the script error if they fix the missing file and rerun.\n // The flaw can be fixed by catching script errors in the custom logger.\n throw new CommandError(\n `Failed to build iOS project. \"xcodebuild\" exited with error code ${code}.`\n );\n }\n\n _assertXcodeBuildResults(code, results, error, xcodeProject, logFilePath);\n }\n return results;\n}\n\n// Exposed for testing.\nexport function _assertXcodeBuildResults(\n code: number | null,\n results: string,\n error: string,\n xcodeProject: { name: string },\n logFilePath: string\n): void {\n const errorTitle = `Failed to build iOS project. \"xcodebuild\" exited with error code ${code}.`;\n\n const throwWithMessage = (message: string): never => {\n throw new CommandError(\n `${errorTitle}\\nTo view more error logs, try building the app with Xcode directly, by opening ${xcodeProject.name}.\\n\\n` +\n message +\n `Build logs written to ${chalk.underline(logFilePath)}`\n );\n };\n\n const localizedError = error.match(/NSLocalizedFailure = \"(.*)\"/)?.[1];\n\n if (localizedError) {\n throwWithMessage(chalk.bold(localizedError) + '\\n\\n');\n }\n // Show all the log info because often times the error is coming from a shell script,\n // that invoked a node script, that started metro, which threw an error.\n\n throwWithMessage(results + '\\n\\n' + error);\n}\n\nfunction writeBuildLogs(projectRoot: string, buildOutput: string, errorOutput: string) {\n const [logFilePath, errorFilePath] = getErrorLogFilePath(projectRoot);\n\n fs.writeFileSync(logFilePath, buildOutput);\n fs.writeFileSync(errorFilePath, errorOutput);\n return logFilePath;\n}\n\nfunction getErrorLogFilePath(projectRoot: string): [string, string] {\n const folder = path.join(projectRoot, '.expo');\n ensureDirectory(folder);\n return [path.join(folder, 'xcodebuild.log'), path.join(folder, 'xcodebuild-error.log')];\n}\n"],"names":["logPrettyItem","getAppBinaryPath","getEscapedPath","extractEnvVariableFromBuild","getProcessOptions","getXcodeBuildArgsAsync","buildAsync","_assertXcodeBuildResults","Log","message","log","chalk","buildOutput","CONFIGURATION_BUILD_DIR","sort","a","b","length","UNLOCALIZED_RESOURCES_FOLDER_PATH","binaryPath","path","join","filePath","fs","existsSync","unescapedPath","split","CommandError","variableName","reg","RegExp","matched","matchAll","map","value","filter","Boolean","packager","shouldSkipInitialBundling","terminal","port","SKIP_BUNDLING","undefined","env","process","RCT_TERMINAL","RCT_METRO_PORT","toString","RCT_NO_LAUNCH_PACKAGER","props","args","xcodeProject","isWorkspace","name","configuration","scheme","device","udid","isSimulator","developmentTeamId","ensureDeviceIsCodeSignedForDeploymentAsync","projectRoot","push","buildCache","spawnXcodeBuild","options","onData","buildProcess","spawn","results","error","stdout","on","data","stringData","stderr","Buffer","Promise","resolve","reject","code","spawnXcodeBuildWithFlush","onFlush","currentBuffer","flushBuffer","endsWith","os","EOL","spawnXcodeBuildWithFormat","debug","bold","formatter","ExpoRunFormatter","create","isDebug","EXPO_DEBUG","line","pipe","AbortCommandError","getBuildSummary","getUserTerminal","logFilePath","writeBuildLogs","wasErrorPresented","errors","errorTitle","throwWithMessage","underline","localizedError","match","errorOutput","errorFilePath","getErrorLogFilePath","writeFileSync","folder","ensureDirectory"],"mappings":"AAAA;;;;QAegBA,aAAa,GAAbA,aAAa;QAQbC,gBAAgB,GAAhBA,gBAAgB;QA+BhBC,cAAc,GAAdA,cAAc;QAcdC,2BAA2B,GAA3BA,2BAA2B;QAc3BC,iBAAiB,GAAjBA,iBAAiB;QAqCXC,sBAAsB,GAAtBA,sBAAsB;QAsJtBC,UAAU,GAAVA,UAAU;QAwChBC,wBAAwB,GAAxBA,wBAAwB;AArTP,IAAA,SAAgB,WAAhB,gBAAgB,CAAA;AAC/B,IAAA,MAAO,kCAAP,OAAO,EAAA;AACuB,IAAA,aAAe,WAAf,eAAe,CAAA;AAChD,IAAA,GAAI,kCAAJ,IAAI,EAAA;AACJ,IAAA,GAAI,kCAAJ,IAAI,EAAA;AACF,IAAA,KAAM,kCAAN,MAAM,EAAA;AAEXC,IAAAA,GAAG,mCAAM,WAAW,EAAjB;AACiB,IAAA,IAAiB,WAAjB,iBAAiB,CAAA;AAC7B,IAAA,IAAiB,WAAjB,iBAAiB,CAAA;AACW,IAAA,OAAoB,WAApB,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AAAA,GAAAA,IAAe,AAAQ,CAAA,gBAAR,CAACD,MAAM,CAAC,CAAC;IACxB,OAAO;QAAC9F,KAAI,QAAA,CAACC,IAAI,CAAC6F,MAAM,EAAE,gBAAgB,CAAC;QAAE9F,KAAI,QAAA,CAACC,IAAI,CAAC6F,MAAM,EAAE,sBAAsB,CAAC;KAAC,CAAC;CACzF"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/run/ios/XcodeBuild.types.ts"],"sourcesContent":["import { BundlerProps } from '../resolveBundlerProps';\n\nexport type XcodeConfiguration = 'Debug' | 'Release';\n\nexport type Options = {\n /** iOS device to target. */\n device?: string | boolean;\n /** Dev server port to use, ignored if `bundler` is `false`. */\n port?: number;\n /** Xcode scheme to build. */\n scheme?: string | boolean;\n /** Xcode configuration to build. Default `Debug` */\n configuration?: XcodeConfiguration;\n /** Should start the bundler dev server. */\n bundler?: boolean;\n /** Should install missing dependencies before building. */\n install?: boolean;\n /** Should use derived data for builds. */\n buildCache?: boolean;\n};\n\nexport type ProjectInfo = {\n isWorkspace: boolean;\n name: string;\n};\n\nexport type BuildProps = {\n /** Root to the iOS native project. */\n projectRoot: string;\n /** Is the target a simulator. */\n isSimulator: boolean;\n xcodeProject: ProjectInfo;\n device: { name: string; udid: string };\n configuration: XcodeConfiguration;\n /** Disable the initial bundling from the native script. */\n shouldSkipInitialBundling: boolean;\n /** Should use derived data for builds. */\n buildCache: boolean;\n scheme: string;\n} & BundlerProps;\n"],"names":[],"mappings":"AAAA"}
|