Skip to content

Commit 9a54299

Browse files
[PR feedback] add newlines before and after output of bulk status
1 parent 4e9e34a commit 9a54299

File tree

1 file changed

+16
-13
lines changed

1 file changed

+16
-13
lines changed

packages/app/src/cli/services/bulk-operations/bulk-operation-status.ts

Lines changed: 16 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import {
1111
ListBulkOperationsQueryVariables,
1212
} from '../../api/graphql/bulk-operations/generated/list-bulk-operations.js'
1313
import {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'
1515
import {ensureAuthenticatedAdminAsApp} from '@shopify/cli-kit/node/session'
1616
import {adminRequestDoc} from '@shopify/cli-kit/node/api/admin'
1717
import {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

108111
function renderBulkOperationStatus(operation: BulkOperation): void {

0 commit comments

Comments
 (0)