@tianhai/pi-workflow-kit 0.11.0 → 0.11.1
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.
|
@@ -45,7 +45,7 @@ const DESTRUCTIVE_PATTERNS = [
|
|
|
45
45
|
/\bshutdown\b/i,
|
|
46
46
|
/\bsystemctl\s+(start|stop|restart|enable|disable)/i,
|
|
47
47
|
/\bservice\s+\S+\s+(start|stop|restart)/i,
|
|
48
|
-
|
|
48
|
+
/^\s*(vim?|nano|emacs|code|subl)\b/i,
|
|
49
49
|
];
|
|
50
50
|
|
|
51
51
|
const SAFE_PATTERNS = [
|
|
@@ -117,7 +117,8 @@ const SAFE_PATTERNS = [
|
|
|
117
117
|
];
|
|
118
118
|
|
|
119
119
|
/** Split a compound command into individual sub-commands.
|
|
120
|
-
*
|
|
120
|
+
* Splits on &&, ||, and ; operators, ignoring leading whitespace.
|
|
121
|
+
* Does NOT split on | (pipe) to allow piping (e.g. `git log | head`).
|
|
121
122
|
*/
|
|
122
123
|
function splitCompoundCommand(command: string): string[] {
|
|
123
124
|
// Match sub-commands separated by &&, ||, ; (with optional whitespace)
|