@upx-us/shield 0.7.12 → 0.7.13
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/CHANGELOG.md +8 -0
- package/dist/src/updater.js +11 -4
- package/openclaw.plugin.json +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,14 @@ All notable changes to this project will be documented in this file.
|
|
|
4
4
|
|
|
5
5
|
---
|
|
6
6
|
|
|
7
|
+
## [0.7.13] — 2026-03-16
|
|
8
|
+
|
|
9
|
+
### Fixed
|
|
10
|
+
|
|
11
|
+
- **`openclaw shield` commands missing after auto-update** — the auto-updater was deleting the `integrity` field from `openclaw.json` without recomputing it. OpenClaw 2026.3.13+ requires this field to wire plugin CLI commands; without it the plugin loads but `openclaw shield status` and all shield commands fail with "unknown command". The updater now computes the correct SRI `sha512` integrity hash from the downloaded tarball and writes it to the install record.
|
|
12
|
+
|
|
13
|
+
---
|
|
14
|
+
|
|
7
15
|
## [0.7.12] — 2026-03-16
|
|
8
16
|
|
|
9
17
|
### Fixed
|
package/dist/src/updater.js
CHANGED
|
@@ -342,7 +342,7 @@ function restoreFromBackup(backupPath) {
|
|
|
342
342
|
return false;
|
|
343
343
|
}
|
|
344
344
|
}
|
|
345
|
-
function updateOpenClawPluginMetadata(newVersion, shasum) {
|
|
345
|
+
function updateOpenClawPluginMetadata(newVersion, shasum, tarballBuffer) {
|
|
346
346
|
const configPath = (0, path_1.join)((0, os_1.homedir)(), '.openclaw', 'openclaw.json');
|
|
347
347
|
try {
|
|
348
348
|
if (!(0, fs_1.existsSync)(configPath))
|
|
@@ -355,7 +355,13 @@ function updateOpenClawPluginMetadata(newVersion, shasum) {
|
|
|
355
355
|
install.version = newVersion;
|
|
356
356
|
install.resolvedVersion = newVersion;
|
|
357
357
|
install.resolvedSpec = `${PACKAGE_NAME}@${newVersion}`;
|
|
358
|
-
|
|
358
|
+
if (tarballBuffer) {
|
|
359
|
+
const integrityHash = (0, crypto_1.createHash)('sha512').update(tarballBuffer).digest('base64');
|
|
360
|
+
install.integrity = `sha512-${integrityHash}`;
|
|
361
|
+
}
|
|
362
|
+
else {
|
|
363
|
+
delete install.integrity;
|
|
364
|
+
}
|
|
359
365
|
if (shasum) {
|
|
360
366
|
install.shasum = shasum;
|
|
361
367
|
}
|
|
@@ -407,7 +413,8 @@ function downloadAndInstall(targetVersion) {
|
|
|
407
413
|
return false;
|
|
408
414
|
}
|
|
409
415
|
const tarball = (0, path_1.join)(tmpDir, tarballs[0]);
|
|
410
|
-
const
|
|
416
|
+
const tarballBuffer = (0, fs_1.readFileSync)(tarball);
|
|
417
|
+
const tarballShasum = (0, crypto_1.createHash)('sha1').update(tarballBuffer).digest('hex');
|
|
411
418
|
const stagingDir = (0, path_1.join)(tmpDir, 'staging');
|
|
412
419
|
(0, fs_1.mkdirSync)(stagingDir, { recursive: true });
|
|
413
420
|
(0, child_process_1.execSync)(`tar xzf "${tarball}" -C "${stagingDir}" --strip-components=1`, {
|
|
@@ -442,7 +449,7 @@ function downloadAndInstall(targetVersion) {
|
|
|
442
449
|
(0, fs_1.rmSync)((0, path_1.join)(PLUGIN_DIR, entry), { recursive: true, force: true });
|
|
443
450
|
}
|
|
444
451
|
copyRecursive(stagingDir, PLUGIN_DIR);
|
|
445
|
-
updateOpenClawPluginMetadata(targetVersion, tarballShasum);
|
|
452
|
+
updateOpenClawPluginMetadata(targetVersion, tarballShasum, tarballBuffer);
|
|
446
453
|
log.info('updater', `Installed ${PACKAGE_NAME}@${targetVersion} successfully`);
|
|
447
454
|
return true;
|
|
448
455
|
}
|
package/openclaw.plugin.json
CHANGED
package/package.json
CHANGED