cryptool-org / wasm-webterm

xterm.js addon to run WebAssembly binaries (supports WASI + Emscripten)
https://cryptool.org/webterm
53 stars 11 forks source link

Introduce prettier + update dependencies + improve command parsing #9

Closed tryone144 closed 6 months ago

tryone144 commented 7 months ago

This PR includes multiple changes:

  1. Update the dependencies where possible without breaking anything. Notably, @wasmer/wasi and memfs are not updated to the next major version. Compatibility with xterm.js is at version 4.19.0 for now.
  2. Introduce prettier for code formatting with the same configuration as other cryptool-org projects.
  3. Use shell-quote/parse for parsing the input line into arguments. This properly handles quoted and escaped parameters. In the future, we can easily add new handlers for advanced shell-features like file-redirection.
  4. Change the stdin-handler to manually manage terminal inputs and pass the raw-data to the process (minimal handling of CTRL+C to abort, CTRL+D for EOF, and CTRL+H or Backspace). This brings us up to par with locally running shells.