@dcrays/mobook-security-plugin 2.0.15 → 2.0.16
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/index.js +6 -6
- package/openclaw.plugin.json +1 -1
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -778,12 +778,12 @@ export default function register(api) {
|
|
|
778
778
|
if (toolName === "exec") {
|
|
779
779
|
const cmd = params.command || "";
|
|
780
780
|
const openclawUpdatePatterns = [
|
|
781
|
-
/npm
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
781
|
+
// npm: 兼容 flags 在子命令前后的各种写法(npm -g install openclaw / npm install -g openclaw)
|
|
782
|
+
/\bnpm\s+(?:[^&|;]*\s+)?(i|install|update|up|upgrade)\s+(?:[^&|;]*\s+)?\bopenclaw\b/i,
|
|
783
|
+
/\byarn\s+(global\s+)?(add|upgrade)\s+.*\bopenclaw\b/i,
|
|
784
|
+
/\bpnpm\s+(?:[^&|;]*\s+)?(add|update|install|upgrade)\s+(?:[^&|;]*\s+)?\bopenclaw\b/i,
|
|
785
|
+
/\bnpx\s+.*\bopenclaw\b.*update/i,
|
|
786
|
+
/\bbrew\s+(upgrade|reinstall)\s+.*\bopenclaw\b/i,
|
|
787
787
|
/\bopenclaw\s+update\b/i,
|
|
788
788
|
/\bopenclaw\s+gateway\s+update\b/i,
|
|
789
789
|
];
|
package/openclaw.plugin.json
CHANGED