Track HiveGrid Cloud planning reference
This commit is contained in:
1 parent
b3d5ea6764
commit
e341c5938a
5784 files changed
+1104929
-3
No files matched your search
@@ -0,0 +1,37 @@
|
||||
#!/usr/bin/env node
|
||||
|
||||
import { spawn } from "node:child_process";
|
||||
|
||||
const rootArgs = ["--dir", "../..", "exec", "tsc", "-p"];
|
||||
const projects = [
|
||||
"apps/web/tsconfig.core.json",
|
||||
"apps/web/tsconfig.routes-admin.json",
|
||||
"apps/web/tsconfig.routes-tenant.json",
|
||||
"apps/web/tsconfig.routes-other.json",
|
||||
];
|
||||
|
||||
function runProject(project) {
|
||||
return new Promise((resolve) => {
|
||||
const child = spawn("pnpm", [...rootArgs, project], {
|
||||
stdio: "inherit",
|
||||
env: process.env,
|
||||
// shell: true lets Windows resolve pnpm.cmd; POSIX is unaffected.
|
||||
// All args here are space-free paths, so shell quoting is safe.
|
||||
shell: true,
|
||||
});
|
||||
child.on("error", (error) => resolve({ project, code: 1, error }));
|
||||
child.on("exit", (code, signal) => resolve({ project, code: code ?? 1, signal }));
|
||||
});
|
||||
}
|
||||
|
||||
const results = await Promise.all(projects.map((project) => runProject(project)));
|
||||
const failed = results.filter((result) => result.code !== 0);
|
||||
|
||||
if (failed.length > 0) {
|
||||
for (const result of failed) {
|
||||
const signal = result.signal ? ` signal=${result.signal}` : "";
|
||||
const error = result.error instanceof Error ? ` ${result.error.message}` : "";
|
||||
console.error(`[typecheck-web] ${result.project} failed with code=${result.code}${signal}${error}`);
|
||||
}
|
||||
process.exit(1);
|
||||
}
|
||||
Reference in new issue
Block a user