build: remove main.js from git tracking

main.js is now a build artifact produced by esbuild, not tracked in
git. The release workflow (next commit) will build and attach it to
GitHub Releases. Also removes the check-build-artifacts script that
enforced main.js stay in sync.

Change-Id: I35f7dede09c5ac3c2d788c11248e2ed4931a95bc
This commit is contained in:
wujunchen 2026-04-27 19:49:45 +08:00
parent 098fee763c
commit f6ce405249
4 changed files with 2 additions and 132 deletions

3
.gitignore vendored
View file

@ -14,7 +14,8 @@ node_modules/
dist/
*.log
# Build artifacts (source maps)
# Build artifacts
main.js
main.js.map
# Agent state

111
main.js

File diff suppressed because one or more lines are too long

View file

@ -5,7 +5,6 @@
"main": "main.js",
"scripts": {
"build": "node esbuild.config.mjs production",
"check:build-artifacts": "node scripts/check-build-artifacts.mjs",
"dev": "node esbuild.config.mjs watch",
"typecheck": "tsc --noEmit",
"lint": "biome check main.ts src/",

View file

@ -1,19 +0,0 @@
import { execFileSync } from 'node:child_process';
function diffMainJs() {
return execFileSync('git', ['diff', '--', 'main.js'], { encoding: 'utf8' });
}
const before = diffMainJs();
execFileSync('npm', ['run', 'build'], { stdio: 'inherit' });
const after = diffMainJs();
if (after !== before) {
console.error('\nmain.js is not in sync with the TypeScript source.');
console.error('Run `npm run build` and include the updated main.js in the same change.');
process.exit(1);
}
console.log('main.js is in sync with the TypeScript source.');