Merge pull request #45 from Kaelio/luca/klo-654-improve-indents

feat(cli): add box-drawing prefixes to setup messages
This commit is contained in:
Luca Martial 2026-05-12 19:58:55 -04:00 committed by GitHub
commit fcdf5234c6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
14 changed files with 81 additions and 47 deletions

View file

@ -143,7 +143,7 @@ async function loadExistingProject(projectDir: string, deps: KtxSetupProjectDeps
}
function printProjectSummary(io: KtxCliIo, projectDir: string): void {
io.stdout.write(`Project: ${projectDir}\n`);
io.stdout.write(`Project: ${projectDir}\n`);
}
async function promptForNewProjectDir(
@ -155,8 +155,8 @@ async function promptForNewProjectDir(
const defaultProjectDir = join(projectDir, DEFAULT_NEW_PROJECT_FOLDER_NAME);
while (true) {
io.stdout.write(`Relative paths are resolved from:\n ${projectDir}\n`);
io.stdout.write(`Home paths are resolved from:\n ${homeDir}\n`);
io.stdout.write(`Relative paths are resolved from:\n ${projectDir}\n`);
io.stdout.write(`Home paths are resolved from:\n ${homeDir}\n`);
const destinationChoice = await prompts.select({
message: 'Where should KTX create the project?',
options: [
@ -220,7 +220,7 @@ async function promptForNewProjectDir(
confirmedCreation = true;
}
io.stdout.write(`KTX will create:\n ${selectedDir}\n`);
io.stdout.write(`KTX will create:\n ${selectedDir}\n`);
if (state !== 'non-empty-directory') {
const createAction = await prompts.select({
message: `Create KTX project at ${selectedDir}?`,
@ -324,7 +324,7 @@ export async function runKtxSetupProjectStep(
const prompts = deps.prompts ?? createClackSetupProjectPromptAdapter();
io.stdout.write(
'Use Up/Down to move, Enter to confirm the current selection, choose Back to return to the previous step, Ctrl+C to exit.\n',
'Use Up/Down to move, Enter to confirm the current selection, choose Back to return to the previous step, Ctrl+C to exit.\n',
);
while (true) {
const choice = await prompts.select({