From 07eb35dbb2ea1d0a07069ba57c5c9cf75a820b20 Mon Sep 17 00:00:00 2001 From: Shane McLaughlin Date: Wed, 12 Jun 2024 13:03:43 -0500 Subject: [PATCH] docs: message for custom fields wildcard (#1052) * docs: message for custom fields wildcard * docs: fix message per PR discussion * refactor: use common table header styler * Update retrieve.start.md --------- Co-authored-by: Juliet Shackell <63259011+jshackell-sfdc@users.noreply.github.com> --- messages/retrieve.start.md | 2 +- src/commands/project/delete/source.ts | 5 ++--- src/formatters/deleteResultFormatter.ts | 4 ++-- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/messages/retrieve.start.md b/messages/retrieve.start.md index 88d5990a..da04593f 100644 --- a/messages/retrieve.start.md +++ b/messages/retrieve.start.md @@ -191,7 +191,7 @@ The retrieve target directory [%s] overlaps one of your package directories. Spe # wantsToRetrieveCustomFields -Because you're retrieving one or more CustomFields, we're also retrieving the CustomObject to which it's associated. +Because you're retrieving one or more CustomFields that you didn't specify the name for, we're also retrieving the CustomObject to which they're associated. # noSourceTracking diff --git a/src/commands/project/delete/source.ts b/src/commands/project/delete/source.ts index be15ef1b..5cc3229c 100644 --- a/src/commands/project/delete/source.ts +++ b/src/commands/project/delete/source.ts @@ -33,10 +33,9 @@ import { requiredOrgFlagWithDeprecations, SfCommand, } from '@salesforce/sf-plugins-core'; -import ansis from 'ansis'; import { writeConflictTable } from '../../../utils/conflicts.js'; import { isNonDecomposedCustomLabel, isNonDecomposedCustomLabelsOrCustomLabel } from '../../../utils/metadataTypes.js'; -import { getFileResponseSuccessProps } from '../../../utils/output.js'; +import { getFileResponseSuccessProps, tableHeader } from '../../../utils/output.js'; import { API, DeleteSourceJson, isFileResponseDeleted, isSdrSuccess, isSourceComponent } from '../../../utils/types.js'; import { getPackageDirs, getSourceApiVersion } from '../../../utils/project.js'; import { resolveApi, validateTests } from '../../../utils/deploy.js'; @@ -187,7 +186,7 @@ export class Source extends SfCommand { if (!this.components.length) { // if we didn't find any components to delete, let the user know and exit - this.styledHeader(ansis.blue('Deleted Source')); + this.styledHeader(tableHeader('Deleted Source')); this.log('No results found'); return; } diff --git a/src/formatters/deleteResultFormatter.ts b/src/formatters/deleteResultFormatter.ts index 88fd741c..09f1ca1c 100644 --- a/src/formatters/deleteResultFormatter.ts +++ b/src/formatters/deleteResultFormatter.ts @@ -7,7 +7,6 @@ import { Ux } from '@salesforce/sf-plugins-core'; import { DeployResult, FileResponse, FileResponseSuccess, RequestStatus } from '@salesforce/source-deploy-retrieve'; import { ensureArray } from '@salesforce/kit'; -import ansis from 'ansis'; import { StandardColors } from '@salesforce/sf-plugins-core'; import { DeleteSourceJson, Formatter, TestLevel, isSdrSuccess } from '../utils/types.js'; import { @@ -15,6 +14,7 @@ import { fileResponseSortFn, getFileResponseSuccessProps, makePathRelative, + tableHeader, } from '../utils/output.js'; import { TestResultsFormatter } from '../formatters/testResultsFormatter.js'; @@ -80,7 +80,7 @@ export class DeleteResultFormatter extends TestResultsFormatter implements Forma } ux.log(''); - ux.styledHeader(ansis.blue('Deleted Source')); + ux.styledHeader(tableHeader('Deleted Source')); ux.table( successes.map(getFileResponseSuccessProps), {