GitNexus/gitnexus/scripts/prepare.cjs
jreakin 4e398cb566 fix: address review — stale progress, cross-platform prepare, DEV log
- Clear progress after handleServerConnect in both auto-connect and
  DropZone paths (fixes frozen progress bar on StatusBar)
- Replace shell-based prepare script with Node scripts/prepare.cjs
  for Windows cmd.exe compatibility
- Gate LadybugDB load warning behind import.meta.env.DEV (consistent
  with finalizePipeline's silent catch)
- Remove misleading "parallel" comment (fetch is sequential after connect)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-23 03:26:32 -05:00

16 lines
547 B
JavaScript

/**
* Prepare script: build TypeScript and install husky hooks.
* Uses Node child_process so it works on Windows (cmd.exe) and POSIX.
*/
const { execSync } = require('child_process');
const path = require('path');
// 1. Build
execSync('npm run build', { stdio: 'inherit', cwd: __dirname + '/..' });
// 2. Install husky (from repo root — one level up from gitnexus/)
try {
execSync('npx husky', { stdio: 'inherit', cwd: path.resolve(__dirname, '../..') });
} catch {
// Husky install is optional — may fail in CI or tarball installs
}