File tree Expand file tree Collapse file tree
packages/init/src/Init/Confirm Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -6,6 +6,7 @@ import * as Placeholders from '../../Placeholders.js';
66import { withDiff } from './withDiff.js' ;
77import { copyFile } from './copyFile.js' ;
88import { FileHandlers } from '../index.js' ;
9+ import { Log } from '@qui-cli/log' ;
910
1011type Options = {
1112 srcPath : PathString ;
@@ -71,6 +72,9 @@ export async function mergeDirectory({
7172 }
7273 if ( ! fs . existsSync ( destFilePath ) ) {
7374 fs . mkdirSync ( destFilePath , { recursive : true } ) ;
75+ Log . info (
76+ `Directory ${ Colors . path ( destFilePath , Colors . keyword ) } created`
77+ ) ;
7478 }
7579 await mergeDirectory ( {
7680 srcPath : srcFilePath ,
Original file line number Diff line number Diff line change 1- import ora from 'ora' ;
21import * as JSON from '../JSON/index.js' ;
32import confirm from '@inquirer/confirm' ;
43import { Log } from '@qui-cli/log' ;
@@ -19,16 +18,14 @@ export async function withDiff({
1918 action,
2019 force = false
2120} : Options ) {
22- const spinner = ora ( identifier ) . start ( ) ;
2321 if ( src !== undefined ) {
2422 if ( dest !== undefined ) {
2523 if ( JSON . isEqual ( src , dest ) ) {
26- spinner . succeed ( `${ identifier } up-to-date` ) ;
24+ Log . info ( `${ identifier } up-to-date` ) ;
2725 return ;
2826 }
2927 let update = force ;
3028 if ( ! update ) {
31- spinner . stop ( ) ;
3229 update = await confirm ( {
3330 message : `In ${ identifier } , replace:\n\n${
3431 typeof dest === 'string'
@@ -50,17 +47,17 @@ export async function withDiff({
5047 if ( update ) {
5148 await action ( ) ;
5249 if ( force ) {
53- spinner . succeed ( `${ identifier } updated` ) ;
50+ Log . info ( `${ identifier } updated` ) ;
5451 }
5552 return ;
5653 }
5754 } else {
5855 await action ( ) ;
59- spinner . succeed ( `${ identifier } created` ) ;
56+ Log . info ( `${ identifier } created` ) ;
6057 return ;
6158 }
6259 } else {
63- spinner . fail ( Colors . error ( `${ identifier } source missing` ) ) ;
60+ Log . error ( Colors . error ( `${ identifier } source missing` ) ) ;
6461 return ;
6562 }
6663}
You can’t perform that action at this time.
0 commit comments