@maccesar/titools 2.4.1 → 2.4.2
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.
|
@@ -51,6 +51,7 @@ export async function autoUpdateCommand(options) {
|
|
|
51
51
|
|
|
52
52
|
// Step 1: Check cache
|
|
53
53
|
if (!shouldCheck(cacheDir)) {
|
|
54
|
+
log(chalk.green('✔'), `Up to date (v${PACKAGE_VERSION})`);
|
|
54
55
|
return;
|
|
55
56
|
}
|
|
56
57
|
|
|
@@ -81,16 +82,18 @@ export async function autoUpdateCommand(options) {
|
|
|
81
82
|
}
|
|
82
83
|
|
|
83
84
|
// Step 5: Update CLI (skip in dev mode)
|
|
85
|
+
spinner.succeed(`Update available: v${PACKAGE_VERSION} → ${latestVersion}`);
|
|
86
|
+
|
|
84
87
|
if (isDevMode()) {
|
|
85
|
-
spinner.info(`Dev mode — skipping npm update
|
|
88
|
+
spinner.info(`Dev mode — skipping npm update`);
|
|
86
89
|
} else {
|
|
87
|
-
spinner.start(`
|
|
90
|
+
spinner.start(`Downloading and installing v${latestVersion}...`);
|
|
88
91
|
try {
|
|
89
92
|
execFileSync('npm', ['update', '-g', '@maccesar/titools'], {
|
|
90
93
|
stdio: 'pipe',
|
|
91
94
|
timeout: 60000,
|
|
92
95
|
});
|
|
93
|
-
spinner.succeed(`Updated to ${latestVersion}`);
|
|
96
|
+
spinner.succeed(`Updated to v${latestVersion}`);
|
|
94
97
|
} catch (error) {
|
|
95
98
|
spinner.fail(`npm update failed: ${error.message}`);
|
|
96
99
|
return;
|