Skip to content

Commit

Permalink
feat(cli): add deprecation notice to report cmd (#2666)
Browse files Browse the repository at this point in the history
  • Loading branch information
InesNi committed Apr 26, 2024
1 parent 69471c7 commit 4206f30
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions packages/artillery/lib/cmds/report.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,11 @@ const fs = require('fs');
const path = require('path');
const _ = require('lodash');
const telemetry = require('../telemetry').init();
const chalk = require('chalk');

class ReportCommand extends Command {
async run() {
console.error(deprecationNotice);
telemetry.capture('report generate');
const { flags, args } = await this.parse(ReportCommand);
const output = flags.output || args.file + '.html'; // TODO: path.resolve
Expand Down Expand Up @@ -35,6 +37,35 @@ ReportCommand.flags = {
})
};

const deprecationNotice = `
${chalk.blue(`┌───────────────────────────────────────────────────────────────────────┐
│`)} ${chalk.yellow(
'DEPRECATION NOTICE'
)} ${chalk.blue(`│
├───────────────────────────────────────────────────────────────────────┤
│`)} ${chalk.yellow(
'The "report" command is deprecated and will be removed in a future'
)} ${chalk.blue(`│
│`)} ${chalk.yellow(
'release of Artillery.'
)} ${chalk.blue(`│
│ │
│`)} ${chalk.blueBright('Artillery Cloud')} ${chalk.white(
'is now the recommended way to visualize test results.'
)} ${chalk.blue(`│
│`)} ${chalk.white(
'It provides more comprehensive reporting, advanced visualizations,'
)} ${chalk.blue(`│
│`)} ${chalk.white(
'and includes a free tier.'
)} ${chalk.blue(`│
│ │
│`)} ${chalk.white('Sign up on')} ${chalk.cyan(
chalk.underline('https://app.artillery.io')
)} ${chalk.blue(`│
└───────────────────────────────────────────────────────────────────────┘
`)}`;

ReportCommand.args = { file: Args.string() };

module.exports = ReportCommand;

0 comments on commit 4206f30

Please sign in to comment.