fix(cli): improve flags handling (#552)

This commit is contained in:
Aman Varshney
2025-08-29 10:24:00 +05:30
committed by GitHub
parent d7a3904b1e
commit ea32eb649d
8 changed files with 880 additions and 2142 deletions

View File

@@ -17,7 +17,7 @@ import type {
ProjectConfig,
} from "../../types";
import { trackProjectCreation } from "../../utils/analytics";
import { coerceBackendPresets } from "../../utils/compatibility-rules";
import { displayConfig } from "../../utils/display-config";
import { exitWithError, handleError } from "../../utils/errors";
import { generateReproducibleCommand } from "../../utils/generate-reproducible-command";
@@ -148,20 +148,8 @@ export async function createProjectHandler(
relativePath: finalPathInput,
};
coerceBackendPresets(config);
validateConfigCompatibility(config, providedFlags, cliInput);
if (config.backend === "convex") {
log.info(
`Due to '--backend convex' flag, the following options have been automatically set: database=none, orm=none, api=none, runtime=none, dbSetup=none, examples=todo`,
);
} else if (config.backend === "none") {
log.info(
"Due to '--backend none', the following options have been automatically set: --auth none, --database=none, --orm=none, --api=none, --runtime=none, --db-setup=none, --examples=none",
);
}
log.info(pc.yellow("Using default/flag options (config prompts skipped):"));
log.message(displayConfig(config));
log.message("");