diff --git a/app/analysis_options.yaml b/app/analysis_options.yaml index 0d290213..53960603 100644 --- a/app/analysis_options.yaml +++ b/app/analysis_options.yaml @@ -9,6 +9,11 @@ # packages, and plugins designed to encourage good coding practices. include: package:flutter_lints/flutter.yaml +analyzer: + exclude: + # Vendored upstream package (path dependency) with its own style. + - third_party/** + linter: # The lint rules applied to this project can be customized in the # section below to disable rules from the `package:flutter_lints/flutter.yaml` diff --git a/app/pubspec.lock b/app/pubspec.lock index 2778d579..12a704f8 100644 --- a/app/pubspec.lock +++ b/app/pubspec.lock @@ -983,10 +983,9 @@ packages: xterm: dependency: "direct main" description: - name: xterm - sha256: "168dfedca77cba33fdb6f52e2cd001e9fde216e398e89335c19b524bb22da3a2" - url: "https://pub.dev" - source: hosted + path: "third_party/xterm" + relative: true + source: path version: "4.0.0" yaml: dependency: transitive diff --git a/app/pubspec.yaml b/app/pubspec.yaml index 66c0294a..ee4340c9 100644 --- a/app/pubspec.yaml +++ b/app/pubspec.yaml @@ -47,7 +47,9 @@ dependencies: file_picker: ^13.3.0 url_launcher: ^6.3.3 bonsoir: ^7.1.5 - xterm: ^4.0.0 + # Vendored, patched xterm.dart 4.0.0; see third_party/xterm/README.md. + xterm: + path: third_party/xterm flutter_tts: ^4.2.3 dev_dependencies: diff --git a/app/third_party/xterm/README.md b/app/third_party/xterm/README.md new file mode 100644 index 00000000..fb792648 --- /dev/null +++ b/app/third_party/xterm/README.md @@ -0,0 +1,26 @@ +# xterm (vendored) + +This is our maintained copy of [xterm.dart](https://github.com/TerminalStudio/xterm.dart), +vendored from the pub.dev release **4.0.0** (MIT, see `LICENSE`; the upstream +README is kept as `UPSTREAM_README.md`). Upstream is unmaintained, so the app +depends on this directory through a path dependency and we patch it here. + +The commit that added this directory is the pristine upstream copy; every later +change is a local patch. Review them with `git log -p -- app/third_party/xterm`. + +Tests for the patches live in the app tree, `app/test/third_party_xterm/`, so they +run under the memory watchdog with the rest of the app tests. The app's +`analysis_options.yaml` excludes this directory from its strict lints; the code +still compiles as part of every app build. + +Local patches (keep this list current): + +- colon-form SGR subparameters (`4:3`, `38:2::r:g:b`, `58`/`59`) +- DCS/APC/PM/SOS strings consumed rather than printed +- full RIS (`ESC c`) reset +- DECSCUSR cursor shapes, SCOSC/SCORC, CHT, CBT, HPA, HPR, VPR +- OSC 10/11/12 colour queries, OSC 8/52/7 callbacks +- alternate screen 1049 cursor restore, separate DECCKM mode +- mouse wheel, drag/motion and middle-button reporting; Shift selection override +- cursor and attribute rendering (inverse block cursor, strikethrough, conceal) +- focus reporting (`?1004`)