Initial commit

This commit is contained in:
Devin Zuczek
2026-06-08 18:23:40 -04:00
commit 8e644a5c20
141 changed files with 21414 additions and 0 deletions
+19
View File
@@ -0,0 +1,19 @@
import type { ProcessOutput } from 'zx'
export function onProcSuccess(
name: string,
resolve: (value: unknown) => void,
reject: (reason?: unknown) => void
) {
return (proc: ProcessOutput) => {
if (proc.exitCode === 0) {
resolve(`${name} ran correctly`)
} else {
reject(`${name} exited with ${proc.exitCode}`)
}
}
}
export function catchError(reject: (reason?: unknown) => void) {
return () => reject('unknown error')
}