22import { Command } from "jsr:@cliffy/command@^1.0.0-rc.7" ;
33import { Confirm } from "jsr:@cliffy/prompt@1.0.0-rc.7/confirm" ;
44import { exists } from "jsr:@std/fs" ;
5- import chalk from "npm:chalk" ;
5+ // import colors from "npm:colors";
6+ import { colors } from "jsr:@cliffy/ansi@^1.0.0-rc.7/colors" ;
67import { HOME_DIR } from "./utils/constants.ts" ;
78import {
89 cloneRepo ,
@@ -19,26 +20,26 @@ interface CloneOptions {
1920}
2021
2122const cloneAction = async ( options : CloneOptions , repo : string ) => {
22- console . log ( chalk . bgYellow ( 'Dry run mode ... none of the commands will actually be run.' ) ) ;
23+ console . log ( colors . bgYellow ( 'Dry run mode ... none of the commands will actually be run.' ) ) ;
2324
2425 const localRepo = getLocalPath (
2526 repo ,
2627 options . rootDir ?? `${ HOME_DIR } /Projects` ,
2728 ) ;
2829 console . log (
29- `Cloning repository: ${ chalk . green ( repo ) } to ${ chalk . green ( localRepo ) } ` ,
30+ `Cloning repository: ${ colors . green ( repo ) } to ${ colors . green ( localRepo ) } ` ,
3031 ) ;
3132
3233 const dirAlreadyExists = await exists ( localRepo ) ;
3334 if ( dirAlreadyExists ) {
3435 if ( options . dryRun ) {
35- console . log ( chalk . yellow ( `> Dry run: Fetching repository: ${ localRepo } ` ) ) ;
36+ console . log ( colors . yellow ( `> Dry run: Fetching repository: ${ localRepo } ` ) ) ;
3637 } else {
3738 await fetchRepo ( localRepo ) ;
3839 }
3940 } else {
4041 if ( options . dryRun ) {
41- console . log ( chalk . yellow ( `> Dry run: Cloning repository: ${ repo } ` ) ) ;
42+ console . log ( colors . yellow ( `> Dry run: Cloning repository: ${ repo } ` ) ) ;
4243 } else {
4344 await cloneRepo ( repo , localRepo ) ;
4445 }
@@ -53,7 +54,7 @@ const cloneAction = async (options: CloneOptions, repo: string) => {
5354 if ( openVsCode ) {
5455 if ( options . dryRun ) {
5556 console . log (
56- chalk . yellow ( `> Dry run: Opening repository in VS Code: ${ localRepo } ` ) ,
57+ colors . yellow ( `> Dry run: Opening repository in VS Code: ${ localRepo } ` ) ,
5758 ) ;
5859 } else {
5960 const vscode = await findExecutable ( "code" ) ;
@@ -63,7 +64,7 @@ const cloneAction = async (options: CloneOptions, repo: string) => {
6364
6465 console . log (
6566 `To move to the project's directory, please run: "cd ${
66- chalk . green (
67+ colors . green (
6768 localRepo ,
6869 )
6970 } "`,
@@ -72,7 +73,7 @@ const cloneAction = async (options: CloneOptions, repo: string) => {
7273
7374await new Command ( )
7475 . name ( "clone" )
75- . version ( "0.1.4 " )
76+ . version ( "0.1.5 " )
7677 . description ( "Clone/Fetch a Git repository into a 'Projects' directory" )
7778 . arguments ( "<repo:string>" )
7879 . option ( "-r, --root <rootDir>" , "The root directory." , {
0 commit comments