Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
}
const { id: buildId, priority, canPurchasePriorityBuilds } = result;
log('Build started, it may take a few minutes to complete.');
log(
`You can check the queue length at ${chalk.underline(UrlUtils.constructTurtleStatusUrl())}\n`
);
if (priority === 'normal' && canPurchasePriorityBuilds) {
log(
'You can make this faster. 🐢\nGet priority builds at: https://expo.io/settings/billing\n'
);
}
const username = this.manifest.owner
? this.manifest.owner
: await UserManager.getCurrentUsernameAsync();
if (buildId) {
log(
`You can monitor the build at\n\n ${chalk.underline(
UrlUtils.constructBuildLogsUrl(buildId, username)
)}\n`
);
}
if (this.options.wait) {
const waitOpts = publicUrl ? { publicUrl } : {};
const completedJob = await this.wait(buildId, waitOpts);
const artifactUrl = completedJob.artifactId
? UrlUtils.constructArtifactUrl(completedJob.artifactId)
: completedJob.artifacts.url;
log(`${chalk.green('Successfully built standalone app:')} ${chalk.underline(artifactUrl)}`);
async logBuildStatuses(buildStatus: { jobs: Array, canPurchasePriorityBuilds: boolean }) {
log.raw();
log('=================');
log(' Builds Statuses ');
log('=================\n');
const username = this.manifest.owner
? this.manifest.owner
: await UserManager.getCurrentUsernameAsync();
buildStatus.jobs.forEach((job, i) => {
let platform, packageExtension;
if (job.platform === 'ios') {
platform = 'iOS';
packageExtension = 'IPA';
} else {
platform = 'Android';
packageExtension = 'APK';
}
log(`### ${i} | ${platform} | ${UrlUtils.constructBuildLogsUrl(job.id, username)} ###`);
const hasPriorityBuilds =
buildStatus.numberOfRemainingPriorityBuilds > 0 || buildStatus.hasUnlimitedPriorityBuilds;
const shouldShowUpgradeInfo =
const printUsage = async (projectDir, options = {}) => {
const { dev } = await ProjectSettings.readAsync(projectDir);
const { exp } = await readConfigJsonAsync(projectDir);
const openDevToolsAtStartup = await UserSettings.getAsync('openDevToolsAtStartup', true);
const username = await UserManager.getCurrentUsernameAsync();
const devMode = dev ? 'development' : 'production';
const androidInfo = `${b`a`} to run on ${u`A`}ndroid device/emulator`;
const iosInfo = process.platform === 'darwin' ? `${b`i`} to run on ${u`i`}OS simulator` : '';
const webInfo = exp.platforms.includes('web') ? `${b`w`} to run on ${u`w`}eb` : '';
const platformInfo = [androidInfo, iosInfo, webInfo].filter(Boolean).join(', or ');
log.nested(`
\u203A Press ${platformInfo}.
\u203A Press ${b`c`} to show info on ${u`c`}onnecting new devices.
\u203A Press ${b`d`} to open DevTools in the default web browser.
\u203A Press ${b`shift-d`} to ${
openDevToolsAtStartup ? 'disable' : 'enable'
} automatically opening ${u`D`}evTools at startup.${
options.webOnly ? '' : `\n \u203A Press ${b`e`} to send an app link with ${u`e`}mail.`
}
\u203A Press ${b`p`} to toggle ${u`p`}roduction mode. (current mode: ${i(devMode)})
\u203A Press ${b`r`} to ${u`r`}estart bundler, or ${b`shift-r`} to restart and clear cache.
const printUsage = async (projectDir, options = {}) => {
const { dev } = await ProjectSettings.readAsync(projectDir);
const { exp } = await readConfigJsonAsync(projectDir);
const openDevToolsAtStartup = await UserSettings.getAsync('openDevToolsAtStartup', true);
const username = await UserManager.getCurrentUsernameAsync();
const devMode = dev ? 'development' : 'production';
const androidInfo = `${b`a`} to run on ${u`A`}ndroid device/emulator`;
const iosInfo = process.platform === 'darwin' ? `${b`i`} to run on ${u`i`}OS simulator` : '';
const webInfo = exp.platforms.includes('web') ? `${b`w`} to run on ${u`w`}eb` : '';
const platformInfo = [androidInfo, iosInfo, webInfo].filter(Boolean).join(', or ');
log.nested(`
\u203A Press ${platformInfo}.
\u203A Press ${b`c`} to show info on ${u`c`}onnecting new devices.
\u203A Press ${b`d`} to open DevTools in the default web browser.
\u203A Press ${b`shift-d`} to ${
openDevToolsAtStartup ? 'disable' : 'enable'
} automatically opening ${u`D`}evTools at startup.${
options.webOnly ? '' : `\n \u203A Press ${b`e`} to send an app link with ${u`e`}mail.`
}
\u203A Press ${b`p`} to toggle ${u`p`}roduction mode. (current mode: ${i(devMode)})
\u203A Press ${b`r`} to ${u`r`}estart bundler, or ${b`shift-r`} to restart and clear cache.
async user() {
const username = await UserManager.getCurrentUsernameAsync();
return { username };
},
},