(sourceDir: string, zipPath: string)
| 502 | } |
| 503 | |
| 504 | function zipDirectory(sourceDir: string, zipPath: string): void { |
| 505 | const result = spawnSync("zip", ["-rq", zipPath, "."], { cwd: sourceDir, stdio: "inherit" }); |
| 506 | if (result.status !== 0) { |
| 507 | throw new Error(`[build-zip] zip exited with status ${result.status}`); |
| 508 | } |
| 509 | } |
| 510 | |
| 511 | function directorySizeBytes(dir: string): number { |
| 512 | // Use spawnSync (no shell) instead of execSync so `dir` is passed as |