feat: close application architecture gaps
This commit is contained in:
1 parent
d87b197224
commit
2e12656060
20 files changed
+548
-23
No files matched your search
@@ -2,6 +2,7 @@ import { readFileSync } from "node:fs";
|
||||
import { resolve } from "node:path";
|
||||
import { runBuild } from "./build.ts";
|
||||
import { runTypecheck } from "./types.ts";
|
||||
import { assertReachability } from "./reachability.ts";
|
||||
|
||||
async function runScript(root: string, name: string): Promise<void> {
|
||||
const child = Bun.spawn(["bun", "run", name], {
|
||||
@@ -20,6 +21,7 @@ export async function runCheck(appRoot: string): Promise<void> {
|
||||
const manifest = JSON.parse(readFileSync(resolve(root, "package.json"), "utf8")) as {
|
||||
scripts?: Record<string, string>;
|
||||
};
|
||||
assertReachability(root);
|
||||
await runBuild(root);
|
||||
if (manifest.scripts?.typecheck) await runScript(root, "typecheck");
|
||||
else if (!(await runTypecheck(root))) throw new Error("WRN-CHECK: application typecheck failed");
|
||||
|
||||
Reference in new issue
Block a user