diff --git a/src/shared/snapshot.ts b/src/shared/snapshot.ts index 6bb2d125..56788b42 100644 --- a/src/shared/snapshot.ts +++ b/src/shared/snapshot.ts @@ -24,8 +24,6 @@ export interface OrgSnapshotRequest { export type OrgSnapshot = OrgSnapshotRequest & { Id: string; Status: string; - LastClonedDate?: string; - LastClonedById?: string; CreatedDate: string; LastModifiedDate: string; ExpirationDate?: string; @@ -41,8 +39,6 @@ export const ORG_SNAPSHOT_FIELDS = [ 'CreatedDate', 'LastModifiedDate', 'ExpirationDate', - 'LastClonedDate', - 'LastClonedById', 'Error', ]; const dateTimeFormatter = (dateString?: string): string => @@ -75,11 +71,6 @@ const ORG_SNAPSHOT_COLUMNS = { header: 'Expiration Date', get: (row: OrgSnapshot): string => (row.ExpirationDate ? new Date(row.ExpirationDate).toLocaleDateString() : ''), }, - LastClonedDate: { - header: 'Last Cloned Date', - get: (row: OrgSnapshot): string => rowDateTimeFormatter(row, 'LastClonedDate'), - }, - LastClonedById: { header: 'Last Cloned By Id', get: (row: OrgSnapshot): string => row.LastClonedById ?? '' }, }; const invalidTypeErrorHandler = (e: unknown): never => { @@ -124,7 +115,7 @@ export const printSingleRecordTable = (snapshotRecord: OrgSnapshot): void => { .map(([key, value]: [string, string]) => ({ Name: capitalCase(key), // format the datetime values - Value: ['LastModifiedDate', 'LastClonedDate', 'CreatedDate'].includes(key) ? dateTimeFormatter(value) : value, + Value: ['LastModifiedDate', 'CreatedDate'].includes(key) ? dateTimeFormatter(value) : value, })) // null/undefined becomes empty string .map((row) => (row.Value ? row : { ...row, Value: '' })), diff --git a/test/nuts/snapshots.nut.ts b/test/nuts/snapshots.nut.ts index 5751051e..c794cc8a 100644 --- a/test/nuts/snapshots.nut.ts +++ b/test/nuts/snapshots.nut.ts @@ -104,9 +104,7 @@ describe('snapshot commands', () => { ensureExitCode: 0, }).shellOutput.stdout; expect(table).to.include('Snapshot Name'); - expect(table).to.include('Last Cloned Date'); expect(table).to.not.include('SnapshotName'); - expect(table).to.not.include('LastClonedDate'); // time fixes expect(table).not.to.include('.000+0000'); @@ -133,9 +131,7 @@ describe('snapshot commands', () => { ensureExitCode: 0, }).shellOutput.stdout; expect(table).to.include('Snapshot Name'); - expect(table).to.include('Last Cloned Date'); expect(table).to.not.include('SnapshotName'); - expect(table).to.not.include('LastClonedDate'); // time fixes expect(table).not.to.include('.000+0000');