nemoris 0.1.16 → 0.1.17
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/cli-main.js +13 -8
package/package.json
CHANGED
package/src/cli-main.js
CHANGED
|
@@ -2775,15 +2775,20 @@ export async function main(argv = process.argv) {
|
|
|
2775
2775
|
console.log(` Current version: ${currentVersion}`);
|
|
2776
2776
|
console.log(" Checking for updates...\n");
|
|
2777
2777
|
try {
|
|
2778
|
-
|
|
2779
|
-
// Re-read
|
|
2780
|
-
|
|
2781
|
-
|
|
2782
|
-
|
|
2783
|
-
|
|
2784
|
-
}
|
|
2785
|
-
|
|
2778
|
+
execSync("npm i -g nemoris@latest 2>&1", { encoding: "utf8", timeout: 60_000 });
|
|
2779
|
+
// Re-read the installed package.json to get the actual new version
|
|
2780
|
+
let newVersion;
|
|
2781
|
+
try {
|
|
2782
|
+
const globalPkg = execSync("node -e \"process.stdout.write(require('nemoris/package.json').version)\"", { encoding: "utf8", timeout: 5_000 }).trim();
|
|
2783
|
+
newVersion = globalPkg || null;
|
|
2784
|
+
} catch {
|
|
2785
|
+
newVersion = null;
|
|
2786
|
+
}
|
|
2787
|
+
if (newVersion && newVersion !== currentVersion) {
|
|
2788
|
+
console.log(` ✓ Updated: ${currentVersion} → ${newVersion}`);
|
|
2786
2789
|
console.log(" Restart your daemon: nemoris restart");
|
|
2790
|
+
} else {
|
|
2791
|
+
console.log(` ✓ Already on the latest version (${currentVersion})`);
|
|
2787
2792
|
}
|
|
2788
2793
|
} catch (err) {
|
|
2789
2794
|
console.error(" ✗ Update failed:", err.message?.split("\n")[0] || "unknown error");
|