Skip to content

Commit

Permalink
[eas-cli] diagnostics: add loader and progress information (#2378)
Browse files Browse the repository at this point in the history
* [eas-cli] diagnostics: add loader and progress information

* add changelog entry
  • Loading branch information
Simek authored May 13, 2024
1 parent 57928d1 commit b2961a2
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ This is the log of notable changes to EAS CLI and related packages.

### 🧹 Chores

- Add loader and progress information to the `diagnostics` command. ([#2378](https://github.com/expo/eas-cli/pull/2378) by [@simek](https://github.com/simek))

## [9.0.3](https://github.com/expo/eas-cli/releases/tag/v9.0.3) - 2024-05-10

### 🧹 Chores
Expand Down
8 changes: 6 additions & 2 deletions packages/eas-cli/src/commands/diagnostics.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
import { Platform } from '@expo/eas-build-job';
import chalk from 'chalk';
import envinfo from 'envinfo';

import EasCommand from '../commandUtils/EasCommand';
import Log from '../log';
import { ora } from '../ora';
import { resolveWorkflowAsync } from '../project/workflow';
import { easCliVersion } from '../utils/easCli';
import { Client } from '../vcs/vcs';
Expand All @@ -20,6 +22,7 @@ export default class Diagnostics extends EasCommand {
nonInteractive: true,
});

const spinner = ora().start(`Gathering diagnostic information...`);
const info = await envinfo.run(
{
System: ['OS', 'Shell'],
Expand All @@ -40,9 +43,10 @@ export default class Diagnostics extends EasCommand {
npmGlobalPackages: ['eas-cli', 'expo-cli'],
},
{
title: `EAS CLI ${easCliVersion} environment info`,
title: chalk.bold(`EAS CLI ${easCliVersion} environment info`),
}
);
spinner.succeed('All needed information gathered!');

Log.log(info.trimEnd());
await this.printWorkflowAsync(projectDir, vcsClient);
Expand All @@ -56,7 +60,7 @@ export default class Diagnostics extends EasCommand {
if (androidWorkflow === iosWorkflow) {
Log.log(` Project workflow: ${androidWorkflow}`);
} else {
Log.log(` Project Workflow:`);
Log.log(` Project workflow:`);
Log.log(` Android: ${androidWorkflow}`);
Log.log(` iOS: ${iosWorkflow}`);
}
Expand Down

0 comments on commit b2961a2

Please sign in to comment.