feat(cli): add prdy, quality-rails, and wizard subcommands
All checks were successful
ci/woodpecker/push/ci Pipeline was successful
ci/woodpecker/pr/ci Pipeline was successful

Wires @mosaic/prdy, @mosaic/quality-rails, and @mosaic/mosaic into the
unified CLI binary. The wizard subcommand uses dynamic import to avoid
loading heavy wizard deps for other commands. Adds @types/node to cli
devDependencies and guards @mosaic/mosaic index.ts program.parse() so
the module is safely importable without auto-executing.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-14 20:04:57 -05:00
parent c4e52085e3
commit 481b351ec8
4 changed files with 112 additions and 2 deletions

View File

@@ -1,4 +1,7 @@
#!/usr/bin/env node
import { resolve } from 'node:path';
import { fileURLToPath } from 'node:url';
import { Command } from 'commander';
import { ClackPrompter } from './prompter/clack-prompter.js';
import { HeadlessPrompter } from './prompter/headless-prompter.js';
@@ -8,7 +11,12 @@ import { WizardCancelledError } from './errors.js';
import { VERSION, DEFAULT_MOSAIC_HOME } from './constants.js';
import type { CommunicationStyle } from './types.js';
export { VERSION };
export { VERSION, DEFAULT_MOSAIC_HOME };
export { runWizard } from './wizard.js';
export { ClackPrompter } from './prompter/clack-prompter.js';
export { HeadlessPrompter } from './prompter/headless-prompter.js';
export { createConfigService } from './config/config-service.js';
export { WizardCancelledError } from './errors.js';
const program = new Command()
.name('mosaic-wizard')
@@ -70,4 +78,7 @@ program
}
});
program.parse();
const entryPath = process.argv[1] ? resolve(process.argv[1]) : '';
if (entryPath.length > 0 && entryPath === fileURLToPath(import.meta.url)) {
program.parse();
}