| 32 | } |
| 33 | |
| 34 | static initGitRepo(dir: string): void { |
| 35 | execSync("git init", { cwd: dir, stdio: "pipe" }); |
| 36 | execSync('git config user.email "test@example.com"', { cwd: dir, stdio: "pipe" }); |
| 37 | execSync('git config user.name "Test User"', { cwd: dir, stdio: "pipe" }); |
| 38 | fs.writeFileSync(path.join(dir, "README.md"), "# Test Repo\n"); |
| 39 | execSync("git add .", { cwd: dir, stdio: "pipe" }); |
| 40 | execSync('git commit -m "Initial commit"', { cwd: dir, stdio: "pipe" }); |
| 41 | } |
| 42 | |
| 43 | static assert(condition: boolean, message: string): void { |
| 44 | if (!condition) throw new Error(`Assertion failed: ${message}`); |