Skip to content

Commit

Permalink
fix: don't truncate at PDR level
Browse files Browse the repository at this point in the history
  • Loading branch information
WillieRuemmele committed Jun 6, 2023
1 parent d1f3636 commit 120a691
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 11 deletions.
8 changes: 6 additions & 2 deletions src/formatters/deleteResultFormatter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,8 @@ export class DeleteResultFormatter implements Formatter<DeleteSourceJson> {
fullName: { header: 'FULL NAME' },
type: { header: 'TYPE' },
filePath: { header: 'PROJECT PATH' },
}
},
{ 'no-truncate': true }
);
} else {
this.displayFailures();
Expand All @@ -92,7 +93,10 @@ export class DeleteResultFormatter implements Formatter<DeleteSourceJson> {
fullName: { header: 'Name' },
error: { header: 'Problem' },
};
const options = { title: StandardColors.error(bold(`Component Failures [${failures.length}]`)) };
const options: ux.Table.table.Options = {
title: StandardColors.error(bold(`Component Failures [${failures.length}]`)),
'no-truncate': true,
};
ux.log();
ux.table(
failures.map((f) => ({ problemType: f.problemType, fullName: f.fullName, error: f.problem })),
Expand Down
4 changes: 2 additions & 2 deletions src/formatters/deployReportResultFormatter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export class DeployReportResultFormatter extends DeployResultFormatter {
);

ux.log();
ux.table(response, { key: {}, value: {} }, { title: tableHeader('Deploy Info') });
ux.table(response, { key: {}, value: {} }, { title: tableHeader('Deploy Info'), 'no-truncate': true });

const opts = Object.entries(this.flags).reduce<Array<{ key: string; value: unknown }>>((result, [key, value]) => {
if (key === 'timestamp') return result;
Expand All @@ -38,7 +38,7 @@ export class DeployReportResultFormatter extends DeployResultFormatter {
return result.concat({ key, value });
}, []);
ux.log();
ux.table(opts, { key: {}, value: {} }, { title: tableHeader('Deploy Options') });
ux.table(opts, { key: {}, value: {} }, { title: tableHeader('Deploy Options'), 'no-truncate': true });
super.display();
}
}
Expand Down
7 changes: 4 additions & 3 deletions src/formatters/deployResultFormatter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,7 @@ export class DeployResultFormatter implements Formatter<DeployResultJson> {
},
{
title: tableHeader('Metadata Replacements'),
'no-truncate': true,
}
);
}
Expand All @@ -236,7 +237,7 @@ export class DeployResultFormatter implements Formatter<DeployResultJson> {
filePath: { header: 'Path' },
};
const title = this.result.response.checkOnly ? 'Validated Source' : 'Deployed Source';
const options = { title: tableHeader(title) };
const options = { title: tableHeader(title), 'no-truncate': true };
ux.log();

ux.table(
Expand Down Expand Up @@ -268,7 +269,7 @@ export class DeployResultFormatter implements Formatter<DeployResultJson> {
fullName: { header: 'Name' },
error: { header: 'Problem' },
};
const options = { title: error(`Component Failures [${failures.length}]`) };
const options = { title: error(`Component Failures [${failures.length}]`), 'no-truncate': true };
ux.log();
ux.table(
failures.map((f) => ({ problemType: f.problemType, fullName: f.fullName, error: f.error })),
Expand All @@ -288,7 +289,7 @@ export class DeployResultFormatter implements Formatter<DeployResultJson> {
filePath: { header: 'Path' },
};

const options = { title: tableHeader('Deleted Source') };
const options = { title: tableHeader('Deleted Source'), 'no-truncate': true };
ux.log();

ux.table(getFileResponseSuccessProps(deletions), columns, options);
Expand Down
3 changes: 2 additions & 1 deletion src/formatters/metadataConvertResultFormatter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,8 @@ export class MetadataConvertResultFormatter implements Formatter<ConvertMdapiJso
fullName: { header: 'FULL NAME' },
type: { header: 'TYPE' },
filePath: { header: 'PROJECT PATH' },
}
},
{ 'no-truncate': true }
);
} else {
ux.log('No metadata found to convert');
Expand Down
4 changes: 2 additions & 2 deletions src/formatters/retrieveResultFormatter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ export class RetrieveResultFormatter implements Formatter<RetrieveResultJson> {
filePath: { header: 'Path' },
};
const title = 'Retrieved Source';
const options = { title: tableHeader(title) };
const options = { title: tableHeader(title), 'no-truncate': true };
ux.log();

ux.table(getFileResponseSuccessProps(successes), columns, options);
Expand All @@ -57,7 +57,7 @@ export class RetrieveResultFormatter implements Formatter<RetrieveResultJson> {
fullPath: { header: 'Converted Location' },
};
const title = 'Retrieved Packages';
const options = { title: tableHeader(title) };
const options = { title: tableHeader(title), 'no-truncate': true };
ux.log();
ux.table(packages, columns, options);
}
Expand Down
3 changes: 2 additions & 1 deletion src/utils/conflicts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ export const writeConflictTable = (conflicts: ConflictResponse[]): void => {
fullName: { header: 'FULL NAME' },
type: { header: 'TYPE' },
filePath: { header: 'FILE PATH' },
}
},
{ 'no-truncate': true }
);
};

0 comments on commit 120a691

Please sign in to comment.