From fcc83af585eca9fc8f47db48a827a645e7fed116 Mon Sep 17 00:00:00 2001 From: Cristian Dominguez Date: Fri, 13 Dec 2024 15:13:28 -0300 Subject: [PATCH] chore: remove success on CI output for deploy --- src/commands/project/delete/source.ts | 1 - src/commands/project/deploy/resume.ts | 1 - src/commands/project/deploy/start.ts | 1 - src/commands/project/deploy/validate.ts | 1 - src/utils/deployStages.ts | 24 +++--------------------- 5 files changed, 3 insertions(+), 25 deletions(-) diff --git a/src/commands/project/delete/source.ts b/src/commands/project/delete/source.ts index d53e5426..103cc03d 100644 --- a/src/commands/project/delete/source.ts +++ b/src/commands/project/delete/source.ts @@ -248,7 +248,6 @@ export class Source extends SfCommand { const stages = new DeployStages({ title: 'Deleting Metadata', jsonEnabled: this.jsonEnabled(), - verbose: this.flags['verbose'], }); const isRest = (await resolveApi()) === API['REST']; diff --git a/src/commands/project/deploy/resume.ts b/src/commands/project/deploy/resume.ts index 143c7cda..f24fcd26 100644 --- a/src/commands/project/deploy/resume.ts +++ b/src/commands/project/deploy/resume.ts @@ -134,7 +134,6 @@ export default class DeployMetadataResume extends SfCommand { new DeployStages({ title: 'Resuming Deploy', jsonEnabled: this.jsonEnabled(), - verbose: flags.verbose, }).start( { deploy, diff --git a/src/commands/project/deploy/start.ts b/src/commands/project/deploy/start.ts index 559bd94e..e0133378 100644 --- a/src/commands/project/deploy/start.ts +++ b/src/commands/project/deploy/start.ts @@ -250,7 +250,6 @@ export default class DeployMetadata extends SfCommand { this.stages = new DeployStages({ title, jsonEnabled: this.jsonEnabled(), - verbose: flags['verbose'], }); this.deployUrl = buildDeployUrl(flags['target-org'], deploy.id); diff --git a/src/commands/project/deploy/validate.ts b/src/commands/project/deploy/validate.ts index 3bb15b57..1f52f422 100644 --- a/src/commands/project/deploy/validate.ts +++ b/src/commands/project/deploy/validate.ts @@ -211,7 +211,6 @@ export default class DeployMetadataValidate extends SfCommand new DeployStages({ title: 'Validating Deployment', jsonEnabled: this.jsonEnabled(), - verbose: flags.verbose, }).start( { deploy, diff --git a/src/utils/deployStages.ts b/src/utils/deployStages.ts index 8a0c899c..d38acfc3 100644 --- a/src/utils/deployStages.ts +++ b/src/utils/deployStages.ts @@ -15,10 +15,9 @@ import { } from '@salesforce/source-deploy-retrieve'; import { SourceMemberPollingEvent } from '@salesforce/source-tracking'; import terminalLink from 'terminal-link'; -import { ensureArray } from '@salesforce/kit'; import ansis from 'ansis'; import { testResultSort } from '../formatters/testResultsFormatter.js'; -import { check, getZipFileSize } from './output.js'; +import { getZipFileSize } from './output.js'; import { isTruthy } from './types.js'; Messages.importMessagesDirectoryFromMetaUrl(import.meta.url); @@ -27,7 +26,6 @@ const mdTransferMessages = Messages.loadMessages('@salesforce/plugin-deploy-retr type Options = { title: string; jsonEnabled: boolean; - verbose?: boolean; }; type Data = { @@ -64,7 +62,7 @@ export class DeployStages { */ private printedApexTestFailures: Set; - public constructor({ title, jsonEnabled, verbose }: Options) { + public constructor({ title, jsonEnabled }: Options) { this.printedApexTestFailures = new Set(); this.mso = new MultiStageOutput({ title, @@ -149,8 +147,7 @@ export class DeployStages { label: 'Successful', get: (data): string | undefined => data?.mdapiDeploy?.numberTestsTotal && data?.mdapiDeploy?.numberTestsCompleted - ? formatProgress(data?.mdapiDeploy?.numberTestsCompleted, data?.mdapiDeploy?.numberTestsTotal) + - (verbose && isCI() ? os.EOL + formatTestSuccesses(data) : '') + ? formatProgress(data?.mdapiDeploy?.numberTestsCompleted, data?.mdapiDeploy?.numberTestsTotal) : undefined, stage: 'Running Tests', type: 'dynamic-key-value', @@ -287,21 +284,6 @@ export class DeployStages { } } -function formatTestSuccesses(data: Data): string { - const successes = ensureArray(data.mdapiDeploy.details.runTestResult?.successes).sort(testResultSort); - - let output = ''; - - if (successes.length > 0) { - for (const test of successes) { - const testName = ansis.underline(`${test.name}.${test.methodName}`); - output += ` ${check} ${testName}${os.EOL}`; - } - } - - return output; -} - function formatTestFailures(failuresData: Failures[]): string { const failures = failuresData.sort(testResultSort);