ui-tui: add tsc build pipeline

- Switch tsconfig to nodenext module resolution for Node 22 (used by
installer script)
- Add shebang to entry.tsx, preserved into index.js
- Add HERMES_ROOT env var fallback for repo root resolution
This commit is contained in:
Ari Lotter 2026-04-09 15:30:18 -04:00
parent 17f13013eb
commit 670dcea8f4
4 changed files with 14 additions and 10 deletions

View file

@ -6,7 +6,7 @@
"scripts": {
"dev": "tsx --watch src/entry.tsx",
"start": "tsx src/entry.tsx",
"build": "tsc",
"build": "tsc && chmod +x dist/entry.js",
"lint": "eslint src/",
"lint:fix": "eslint src/ --fix",
"fmt": "prettier --write 'src/**/*.{ts,tsx}'",

View file

@ -1,3 +1,4 @@
#!/usr/bin/env node
import { render } from 'ink'
import React from 'react'

View file

@ -24,7 +24,7 @@ export class GatewayClient extends EventEmitter {
private pending = new Map<string, Pending>()
start() {
const root = resolve(import.meta.dirname, '../../')
const root = process.env.HERMES_ROOT ?? resolve(import.meta.dirname, '../../')
this.proc = spawn(process.env.HERMES_PYTHON ?? resolve(root, 'venv/bin/python'), ['-m', 'tui_gateway.entry'], {
cwd: root,

View file

@ -1,16 +1,19 @@
{
"compilerOptions": {
"target": "ES2022",
"module": "ESNext",
"moduleResolution": "bundler",
"module": "nodenext",
"moduleResolution": "nodenext",
"jsx": "react-jsx",
"lib": ["ES2022"],
"types": ["node"],
"strict": true,
"esModuleInterop": true,
"outDir": "dist",
"rootDir": "src",
"skipLibCheck": true
"strict": true,
"esModuleInterop": true,
"skipLibCheck": true,
"forceConsistentCasingInFileNames": true,
"declaration": false,
"sourceMap": false,
"resolveJsonModule": true
},
"include": ["src"]
"include": ["src/**/*.ts", "src/**/*.tsx"],
"exclude": ["src/__tests__", "node_modules", "dist"]
}