cskit-cli 1.0.36 → 1.0.37
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 +1 -1
- package/src/commands/update.js +10 -5
package/package.json
CHANGED
package/src/commands/update.js
CHANGED
|
@@ -45,11 +45,6 @@ async function updateCommand() {
|
|
|
45
45
|
const currentVersion = pkg.version;
|
|
46
46
|
const boxWidth = 37; // Inner width between │ and │
|
|
47
47
|
|
|
48
|
-
// Show version info box
|
|
49
|
-
console.log(chalk.dim(' ┌' + '─'.repeat(boxWidth) + '┐'));
|
|
50
|
-
const currentLine = ` Current: ${chalk.yellow('v' + currentVersion)}`;
|
|
51
|
-
console.log(chalk.dim(' │') + padText(currentLine, boxWidth) + chalk.dim('│'));
|
|
52
|
-
|
|
53
48
|
const spinner = ora({ text: 'Checking npm registry...', indent: 2 }).start();
|
|
54
49
|
|
|
55
50
|
try {
|
|
@@ -60,6 +55,11 @@ async function updateCommand() {
|
|
|
60
55
|
}).trim();
|
|
61
56
|
|
|
62
57
|
spinner.stop();
|
|
58
|
+
|
|
59
|
+
// Show version info box (after spinner completes)
|
|
60
|
+
console.log(chalk.dim(' ┌' + '─'.repeat(boxWidth) + '┐'));
|
|
61
|
+
const currentLine = ` Current: ${chalk.yellow('v' + currentVersion)}`;
|
|
62
|
+
console.log(chalk.dim(' │') + padText(currentLine, boxWidth) + chalk.dim('│'));
|
|
63
63
|
const latestLine = ` Latest: ${chalk.green('v' + latestVersion)}`;
|
|
64
64
|
console.log(chalk.dim(' │') + padText(latestLine, boxWidth) + chalk.dim('│'));
|
|
65
65
|
console.log(chalk.dim(' └' + '─'.repeat(boxWidth) + '┘\n'));
|
|
@@ -98,6 +98,11 @@ async function updateCommand() {
|
|
|
98
98
|
|
|
99
99
|
} catch (error) {
|
|
100
100
|
spinner.stop();
|
|
101
|
+
|
|
102
|
+
// Show error box
|
|
103
|
+
console.log(chalk.dim(' ┌' + '─'.repeat(boxWidth) + '┐'));
|
|
104
|
+
const currentLine = ` Current: ${chalk.yellow('v' + currentVersion)}`;
|
|
105
|
+
console.log(chalk.dim(' │') + padText(currentLine, boxWidth) + chalk.dim('│'));
|
|
101
106
|
const errorLine = ` Latest: ${chalk.red('(unavailable)')}`;
|
|
102
107
|
console.log(chalk.dim(' │') + padText(errorLine, boxWidth) + chalk.dim('│'));
|
|
103
108
|
console.log(chalk.dim(' └' + '─'.repeat(boxWidth) + '┘\n'));
|