feat: cli publish (#40)

This commit is contained in:
Carlos Florêncio
2026-01-18 21:04:48 +00:00
committed by GitHub
parent bc6a5f28d9
commit 535dee7ce0
9 changed files with 119 additions and 56 deletions
+7
View File
@@ -94,6 +94,13 @@ function parseArgs(argv: string[]): CliOptions {
function findRepoRoot(startDir: string): string | null {
let current = path.resolve(startDir);
while (true) {
if (current.endsWith(`${path.sep}apps`)) {
const backendInApps = path.join(current, "backend");
const webInApps = path.join(current, "web");
if (fs.existsSync(backendInApps) && fs.existsSync(webInApps)) {
return path.dirname(current);
}
}
const backendDir = path.join(current, "apps", "backend");
const webDir = path.join(current, "apps", "web");
if (fs.existsSync(backendDir) && fs.existsSync(webDir)) {