99 isBulkMode ,
1010 printBulkSummary ,
1111} from "../../utils/bulk.ts"
12+ import { shouldShowSpinner } from "../../utils/hyperlink.ts"
1213
1314interface InitiativeArchiveResult extends BulkOperationResult {
1415 name : string
@@ -19,7 +20,6 @@ export const archiveCommand = new Command()
1920 . description ( "Archive a Linear initiative" )
2021 . arguments ( "[initiativeId:string]" )
2122 . option ( "-y, --force" , "Skip confirmation prompt" )
22- . option ( "--no-color" , "Disable colored output" )
2323 . option (
2424 "--bulk <ids...:string>" ,
2525 "Archive multiple initiatives by ID, slug, or name" ,
@@ -31,7 +31,7 @@ export const archiveCommand = new Command()
3131 . option ( "--bulk-stdin" , "Read initiative IDs from stdin" )
3232 . action (
3333 async (
34- { force, color : colorEnabled , bulk, bulkFile, bulkStdin } ,
34+ { force, bulk, bulkFile, bulkStdin } ,
3535 initiativeId ,
3636 ) => {
3737 const client = getGraphQLClient ( )
@@ -43,7 +43,6 @@ export const archiveCommand = new Command()
4343 bulkFile,
4444 bulkStdin,
4545 force,
46- colorEnabled,
4746 } )
4847 return
4948 }
@@ -56,17 +55,17 @@ export const archiveCommand = new Command()
5655 Deno . exit ( 1 )
5756 }
5857
59- await handleSingleArchive ( client , initiativeId , { force, colorEnabled } )
58+ await handleSingleArchive ( client , initiativeId , { force } )
6059 } ,
6160 )
6261
6362async function handleSingleArchive (
6463 // deno-lint-ignore no-explicit-any
6564 client : any ,
6665 initiativeId : string ,
67- options : { force ?: boolean ; colorEnabled ?: boolean } ,
66+ options : { force ?: boolean } ,
6867) : Promise < void > {
69- const { force, colorEnabled } = options
68+ const { force } = options
7069
7170 // Resolve initiative ID
7271 const resolvedId = await resolveInitiativeId ( client , initiativeId )
@@ -126,7 +125,7 @@ async function handleSingleArchive(
126125 }
127126
128127 const { Spinner } = await import ( "@std/cli/unstable-spinner" )
129- const showSpinner = colorEnabled && Deno . stdout . isTerminal ( )
128+ const showSpinner = shouldShowSpinner ( )
130129 const spinner = showSpinner ? new Spinner ( ) : null
131130 spinner ?. start ( )
132131
@@ -165,10 +164,9 @@ async function handleBulkArchive(
165164 bulkFile ?: string
166165 bulkStdin ?: boolean
167166 force ?: boolean
168- colorEnabled ?: boolean
169167 } ,
170168) : Promise < void > {
171- const { force, colorEnabled = true } = options
169+ const { force } = options
172170
173171 // Collect all IDs
174172 const ids = await collectBulkIds ( {
@@ -280,14 +278,12 @@ async function handleBulkArchive(
280278 // Execute bulk operation
281279 const summary = await executeBulkOperations ( ids , archiveOperation , {
282280 showProgress : true ,
283- colorEnabled,
284281 } )
285282
286283 // Print summary
287284 printBulkSummary ( summary , {
288285 entityName : "initiative" ,
289286 operationName : "archived" ,
290- colorEnabled,
291287 showDetails : true ,
292288 } )
293289
0 commit comments