()
| 29 | let _rtkAvailable = null; // null = unchecked, true/false = cached result |
| 30 | |
| 31 | function _checkRtk() { |
| 32 | if (_rtkAvailable !== null) return _rtkAvailable; |
| 33 | try { |
| 34 | const { execSync } = require('child_process'); |
| 35 | execSync('rtk --version', { stdio: 'ignore', timeout: 2000 }); |
| 36 | _rtkAvailable = true; |
| 37 | } catch { |
| 38 | _rtkAvailable = false; |
| 39 | } |
| 40 | return _rtkAvailable; |
| 41 | } |
| 42 | |
| 43 | // Commands RTK supports — maps regex to rtk subcommand. |
| 44 | // These produce significantly smaller output than raw commands. |