From a5dd1825424712a6c4dcae941d99439549857b5a Mon Sep 17 00:00:00 2001 From: Willie Ruemmele Date: Wed, 13 Nov 2024 15:50:45 -0700 Subject: [PATCH] fix: repurposes 'error' column, to show the metadata type --- src/formatters/deployResultFormatter.ts | 4 ++-- test/utils/output.test.ts | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/formatters/deployResultFormatter.ts b/src/formatters/deployResultFormatter.ts index a118c92c..f4d48d77 100644 --- a/src/formatters/deployResultFormatter.ts +++ b/src/formatters/deployResultFormatter.ts @@ -310,13 +310,13 @@ export class DeployResultFormatter extends TestResultsFormatter implements Forma ux.log(); ux.table({ data: sortBy(failures, ['problemType', 'fullName', 'lineNumber', 'columnNumber', 'error']).map((f) => ({ - problemType: f.problemType, + type: f.type, fullName: f.fullName, error: f.error, loc: f.lineNumber ? `${f.lineNumber}:${f.columnNumber ?? ''}` : '', })), columns: [ - { key: 'problemType', name: 'Type' }, + { key: 'type', name: 'Type' }, { key: 'fullName', name: 'Name' }, { key: 'error', name: 'Problem' }, { key: 'loc', name: 'Line:Column' }, diff --git a/test/utils/output.test.ts b/test/utils/output.test.ts index bb05c24c..fd613164 100644 --- a/test/utils/output.test.ts +++ b/test/utils/output.test.ts @@ -38,14 +38,14 @@ describe('deployResultFormatter', () => { expect(tableStub.firstCall.args[0]).to.deep.equal({ data: [ { - problemType: 'Error', + type: 'ApexClass', fullName: 'ProductController', error: 'This component has some problems', loc: '27:18', }, ], columns: [ - { key: 'problemType', name: 'Type' }, + { key: 'type', name: 'Type' }, { key: 'fullName', name: 'Name' }, { key: 'error', name: 'Problem' }, { key: 'loc', name: 'Line:Column' }, @@ -106,21 +106,21 @@ describe('deployResultFormatter', () => { expect(tableStub.firstCall.args[0]).to.deep.equal({ data: [ { - problemType: 'Error', + type: '', fullName: 'Create_property', error: "An object 'Create_property' of type Flow was named in package.xml, but was not found in zipped directory", loc: '', }, { - problemType: 'Error', + type: 'ApexClass', fullName: 'ProductController', error: 'This component has some problems', loc: '27:18', }, ], columns: [ - { key: 'problemType', name: 'Type' }, + { key: 'type', name: 'Type' }, { key: 'fullName', name: 'Name' }, { key: 'error', name: 'Problem' }, { key: 'loc', name: 'Line:Column' },