@annals/agent-mesh 0.16.10 → 0.16.11
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/dist/index.js +3 -3
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -5304,8 +5304,8 @@ function fetchLatestVersion(pkg) {
|
|
|
5304
5304
|
if (result.error || result.status !== 0) return null;
|
|
5305
5305
|
return parseLatestVersion(result.stdout ?? "");
|
|
5306
5306
|
}
|
|
5307
|
-
function
|
|
5308
|
-
const result = spawnSync("npm", ["install", "-g", `${pkg}
|
|
5307
|
+
function installResolvedVersion(pkg, version2) {
|
|
5308
|
+
const result = spawnSync("npm", ["install", "-g", `${pkg}@${version2}`], {
|
|
5309
5309
|
stdio: "inherit",
|
|
5310
5310
|
timeout: INSTALL_TIMEOUT_MS
|
|
5311
5311
|
});
|
|
@@ -5334,7 +5334,7 @@ function maybeAutoUpgradeOnStartup(opts) {
|
|
|
5334
5334
|
if (!latest) return { relaunched: false };
|
|
5335
5335
|
if (compareSemver(latest, current) <= 0) return { relaunched: false };
|
|
5336
5336
|
log.info(`New ${packageName} version found: v${current} -> v${latest}. Upgrading...`);
|
|
5337
|
-
if (!
|
|
5337
|
+
if (!installResolvedVersion(packageName, latest)) {
|
|
5338
5338
|
log.warn("Auto-upgrade failed. Continuing with current version.");
|
|
5339
5339
|
return { relaunched: false };
|
|
5340
5340
|
}
|