cskit-cli 1.0.33 → 1.0.34

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cskit-cli",
3
- "version": "1.0.33",
3
+ "version": "1.0.34",
4
4
  "description": "Content Suite Kit CLI - Download and manage CSK skills from private repository",
5
5
  "main": "src/index.js",
6
6
  "bin": {
@@ -551,27 +551,46 @@ async function initCommand(options) {
551
551
  // Step 5: Confirm changes
552
552
  timeline.start(4);
553
553
 
554
+ // Tree connector symbols
555
+ const pipe = chalk.dim('│');
556
+ const branch = chalk.dim('├──');
557
+ const corner = chalk.dim('└──');
558
+
554
559
  // Show files that will be changed
555
560
  if (changes.update.length > 0) {
556
- console.log(chalk.yellow('\n Files to be updated (will overwrite):\n'));
557
- for (const file of changes.update.slice(0, 15)) {
558
- console.log(chalk.yellow(` ! ${file.target}`));
561
+ console.log(`\n ${pipe}`);
562
+ console.log(` ${branch} ${chalk.yellow('Files to be updated (will overwrite):')}`);
563
+
564
+ const showFiles = changes.update.slice(0, 15);
565
+ const hasMore = changes.update.length > 15;
566
+
567
+ for (let i = 0; i < showFiles.length; i++) {
568
+ const isLast = i === showFiles.length - 1 && !hasMore;
569
+ const prefix = isLast ? corner : branch;
570
+ console.log(` ${pipe} ${prefix} ${chalk.yellow('!')} ${showFiles[i].target}`);
559
571
  }
560
- if (changes.update.length > 15) {
561
- console.log(chalk.dim(` ... and ${changes.update.length - 15} more\n`));
572
+ if (hasMore) {
573
+ console.log(` ${pipe} ${corner} ${chalk.dim(`... and ${changes.update.length - 15} more`)}`);
562
574
  }
563
- console.log('');
575
+ console.log(` ${pipe}`);
564
576
  }
565
577
 
566
578
  if (changes.new.length > 0) {
567
- console.log(chalk.green(' New files to be created:\n'));
568
- for (const file of changes.new.slice(0, 10)) {
569
- console.log(chalk.green(` + ${file.target}`));
579
+ console.log(`\n ${pipe}`);
580
+ console.log(` ${branch} ${chalk.green('New files to be created:')}`);
581
+
582
+ const showFiles = changes.new.slice(0, 10);
583
+ const hasMore = changes.new.length > 10;
584
+
585
+ for (let i = 0; i < showFiles.length; i++) {
586
+ const isLast = i === showFiles.length - 1 && !hasMore;
587
+ const prefix = isLast ? corner : branch;
588
+ console.log(` ${pipe} ${prefix} ${chalk.green('+')} ${showFiles[i].target}`);
570
589
  }
571
- if (changes.new.length > 10) {
572
- console.log(chalk.dim(` ... and ${changes.new.length - 10} more\n`));
590
+ if (hasMore) {
591
+ console.log(` ${pipe} ${corner} ${chalk.dim(`... and ${changes.new.length - 10} more`)}`);
573
592
  }
574
- console.log('');
593
+ console.log(` ${pipe}`);
575
594
  }
576
595
 
577
596
  // Confirm
@@ -694,19 +713,27 @@ async function initCommand(options) {
694
713
  return;
695
714
  }
696
715
 
697
- // Show what needs to be installed/updated
698
- console.log(chalk.cyan('\n Packages to install/update:\n'));
699
- for (const pkg of allToInstall.slice(0, 10)) {
716
+ // Show what needs to be installed/updated with tree connector
717
+ console.log(`\n ${pipe}`);
718
+ console.log(` ${branch} ${chalk.cyan('Packages to install/update:')}`);
719
+
720
+ const showPkgs = allToInstall.slice(0, 10);
721
+ const hasMore = allToInstall.length > 10;
722
+
723
+ for (let i = 0; i < showPkgs.length; i++) {
724
+ const pkg = showPkgs[i];
725
+ const isLast = i === showPkgs.length - 1 && !hasMore;
726
+ const prefix = isLast ? corner : branch;
700
727
  if (pkg.current) {
701
- console.log(` ~ ${pkg.name}: ${pkg.current} → ${pkg.required}`);
728
+ console.log(` ${pipe} ${prefix} ${chalk.blue('~')} ${pkg.name}: ${pkg.current} → ${pkg.required}`);
702
729
  } else {
703
- console.log(` + ${pkg.name}: ${pkg.required || 'latest'}`);
730
+ console.log(` ${pipe} ${prefix} ${chalk.green('+')} ${pkg.name}: ${pkg.required || 'latest'}`);
704
731
  }
705
732
  }
706
- if (allToInstall.length > 10) {
707
- console.log(chalk.dim(` ... and ${allToInstall.length - 10} more`));
733
+ if (hasMore) {
734
+ console.log(` ${pipe} ${corner} ${chalk.dim(`... and ${allToInstall.length - 10} more`)}`);
708
735
  }
709
- console.log('');
736
+ console.log(` ${pipe}`);
710
737
 
711
738
  timeline.pause();
712
739
  const { confirmPkgs } = await inquirer.prompt([{