@viza-cli/app 1.5.27 → 1.5.29
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/README.md +1 -1
- package/dist/src/core/dispatch.js +1 -1
- package/dist/src/core/version.js +3 -3
- package/dist/src/ui/banner.js +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -110,7 +110,7 @@ export async function dispatchIntentAndWait(input, opts = {}) {
|
|
|
110
110
|
if (updateInfo?.hasUpdate) {
|
|
111
111
|
const title = chalk.gray.bold("\n⬆️ Update available");
|
|
112
112
|
const ver = chalk.yellow(`${updateInfo.current} → ${updateInfo.latest}`);
|
|
113
|
-
const cmd = chalk.cyan("npm i -g
|
|
113
|
+
const cmd = chalk.cyan("npm i -g @viza-cli/app");
|
|
114
114
|
console.log(`\n${title} ${ver}`);
|
|
115
115
|
console.log(chalk.dim(" Run:") + " " + cmd + "\n");
|
|
116
116
|
}
|
package/dist/src/core/version.js
CHANGED
|
@@ -27,7 +27,7 @@ export function getCliVersion() {
|
|
|
27
27
|
try {
|
|
28
28
|
const raw = readFileSync(pkgPath, "utf8");
|
|
29
29
|
const json = JSON.parse(raw);
|
|
30
|
-
if (json?.name === "
|
|
30
|
+
if (json?.name === "@viza-cli/app" && typeof json.version === "string" && json.version.trim()) {
|
|
31
31
|
_cached = json.version.trim();
|
|
32
32
|
return _cached;
|
|
33
33
|
}
|
|
@@ -91,7 +91,7 @@ function semverCompare(a, b) {
|
|
|
91
91
|
return 0;
|
|
92
92
|
}
|
|
93
93
|
/**
|
|
94
|
-
* Checks npm for the latest published version of
|
|
94
|
+
* Checks npm for the latest published version of @viza-cli/app without throwing and without blocking the main flow.
|
|
95
95
|
*
|
|
96
96
|
* Returns null on failure.
|
|
97
97
|
*/
|
|
@@ -114,7 +114,7 @@ export async function checkForCliUpdateSoft() {
|
|
|
114
114
|
catch { /* ignore */ }
|
|
115
115
|
// --- Bắt đầu Fetch mới khi cache hết hạn hoặc sai version ---
|
|
116
116
|
try {
|
|
117
|
-
const registryUrl = `https://registry.npmjs.org
|
|
117
|
+
const registryUrl = `https://registry.npmjs.org/@viza-cli/app/latest?t=${now}`;
|
|
118
118
|
const res = await fetch(registryUrl, {
|
|
119
119
|
cache: "no-store",
|
|
120
120
|
headers: { 'Cache-Control': 'no-cache' }
|
package/dist/src/ui/banner.js
CHANGED
|
@@ -66,7 +66,7 @@ export function showBanner(opts) {
|
|
|
66
66
|
if (meta?.version) {
|
|
67
67
|
parts.push(`Version: ${chalk.cyan(meta.version)}`);
|
|
68
68
|
}
|
|
69
|
-
parts.push(`Install: ${chalk.gray(`npm i -g
|
|
69
|
+
parts.push(`Install: ${chalk.gray(`npm i -g @viza-cli/app`)}`);
|
|
70
70
|
if (parts.length) {
|
|
71
71
|
console.log(chalk.gray(parts.join(chalk.gray(" | "))));
|
|
72
72
|
}
|