@@ -11,7 +11,7 @@ import {
1111 ListBulkOperationsQueryVariables ,
1212} from '../../api/graphql/bulk-operations/generated/list-bulk-operations.js'
1313import { renderInfo , renderSuccess , renderError , renderTable } from '@shopify/cli-kit/node/ui'
14- import { outputContent , outputToken } from '@shopify/cli-kit/node/output'
14+ import { outputContent , outputToken , outputNewline } from '@shopify/cli-kit/node/output'
1515import { ensureAuthenticatedAdminAsApp } from '@shopify/cli-kit/node/session'
1616import { adminRequestDoc } from '@shopify/cli-kit/node/api/admin'
1717import { timeAgo , formatDate } from '@shopify/cli-kit/common/string'
@@ -87,22 +87,25 @@ export async function listBulkOperations(options: ListBulkOperationsOptions): Pr
8787 results : downloadLink ( operation . url ?? operation . partialDataUrl ) ,
8888 } ) )
8989
90+ outputNewline ( )
91+
9092 if ( operations . length === 0 ) {
9193 renderInfo ( { body : 'no bulk operations found in the last 7 days' } )
92- return
94+ } else {
95+ renderTable ( {
96+ rows : operations ,
97+ columns : {
98+ id : { header : 'ID' , color : 'yellow' } ,
99+ status : { header : 'STATUS' } ,
100+ count : { header : 'COUNT' } ,
101+ dateCreated : { header : 'DATE CREATED' , color : 'cyan' } ,
102+ dateFinished : { header : 'DATE FINISHED' , color : 'cyan' } ,
103+ results : { header : 'RESULTS' } ,
104+ } ,
105+ } )
93106 }
94107
95- renderTable ( {
96- rows : operations ,
97- columns : {
98- id : { header : 'ID' , color : 'yellow' } ,
99- status : { header : 'STATUS' } ,
100- count : { header : 'COUNT' } ,
101- dateCreated : { header : 'DATE CREATED' , color : 'cyan' } ,
102- dateFinished : { header : 'DATE FINISHED' , color : 'cyan' } ,
103- results : { header : 'RESULTS' } ,
104- } ,
105- } )
108+ outputNewline ( )
106109}
107110
108111function renderBulkOperationStatus ( operation : BulkOperation ) : void {
0 commit comments