squad-openclaw 2026.2.2013 → 2026.2.2015
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 +19 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1234,6 +1234,16 @@ var updateInProgress = false;
|
|
|
1234
1234
|
var VERIFY_TIMEOUT_MS = 2e4;
|
|
1235
1235
|
var VERIFY_INTERVAL_MS = 500;
|
|
1236
1236
|
var RESTART_BUFFER_MS = 5e3;
|
|
1237
|
+
function readInstalledVersionFromConfig() {
|
|
1238
|
+
try {
|
|
1239
|
+
const raw = fs5.readFileSync(CONFIG_PATH, "utf-8");
|
|
1240
|
+
const cfg = JSON.parse(raw);
|
|
1241
|
+
const v = cfg?.plugins?.installs?.[PACKAGE_NAME]?.version;
|
|
1242
|
+
return typeof v === "string" ? v : null;
|
|
1243
|
+
} catch {
|
|
1244
|
+
return null;
|
|
1245
|
+
}
|
|
1246
|
+
}
|
|
1237
1247
|
function getCurrentVersion() {
|
|
1238
1248
|
const thisFile = fileURLToPath(import.meta.url);
|
|
1239
1249
|
const pkgPath = path6.resolve(path6.dirname(thisFile), "..", "package.json");
|
|
@@ -1436,6 +1446,7 @@ function registerVersionMethods(api) {
|
|
|
1436
1446
|
updateInProgress = true;
|
|
1437
1447
|
try {
|
|
1438
1448
|
const before = getCurrentVersion();
|
|
1449
|
+
const beforeInstalledVersion = readInstalledVersionFromConfig();
|
|
1439
1450
|
let updateOutput = "";
|
|
1440
1451
|
let configBackup = null;
|
|
1441
1452
|
try {
|
|
@@ -1487,6 +1498,14 @@ function registerVersionMethods(api) {
|
|
|
1487
1498
|
});
|
|
1488
1499
|
return;
|
|
1489
1500
|
}
|
|
1501
|
+
if (beforeInstalledVersion && verification.packageVersion && beforeInstalledVersion === verification.packageVersion) {
|
|
1502
|
+
respond(false, {
|
|
1503
|
+
error: `Update command completed but installed version did not change (${verification.packageVersion}).`,
|
|
1504
|
+
output: updateOutput.slice(0, 500),
|
|
1505
|
+
verification
|
|
1506
|
+
});
|
|
1507
|
+
return;
|
|
1508
|
+
}
|
|
1490
1509
|
const after = getCurrentVersion();
|
|
1491
1510
|
respond(true, {
|
|
1492
1511
|
previousVersion: before,
|
package/package.json
CHANGED