mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-04-23 09:18:30 +02:00
Replace shell-quote with shlex for proper $'...' ANSI-C quoting support
shell-quote doesn't support $'...' (ANSI-C quoting), which is a bash extension used by browsers when copying requests as cURL. It misinterprets the $ as variable expansion, mangling JSON bodies and escape sequences like \n, \uXXXX, \r, etc. Switches to shlex which handles $'...' natively. Adds splitCommands() to handle command separation (;, newlines) that shell-quote used to do, and a tokenize() wrapper with fallback for malformed input. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -10,9 +10,6 @@
|
||||
"test": "vitest --run tests"
|
||||
},
|
||||
"dependencies": {
|
||||
"shell-quote": "^1.8.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/shell-quote": "^1.7.5"
|
||||
"shlex": "^3.0.0"
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user