feat(app-dev): add dry-run preview to dev sync (#21251)
Split out of #21240. Stacked on #21250 (review/merge that first). `yarn twenty dev --once --dry-run` computes the migration plan and prints the diff **without applying anything** (no migration, no app-record update, no SDK generation). Also renders the diff on a normal `dev --once` sync. <img width="646" height="179" alt="image" src="https://github.com/user-attachments/assets/59f3ddcd-2a5b-4b8a-b21a-c659abe16af0" />
This commit is contained in:
@@ -22,6 +22,7 @@ export const registerDevCommands = (program: Command): void => {
|
||||
verbose?: boolean;
|
||||
debug?: boolean;
|
||||
debounceMs?: string;
|
||||
dryRun?: boolean;
|
||||
},
|
||||
) => {
|
||||
const commonOptions = {
|
||||
@@ -33,7 +34,10 @@ export const registerDevCommands = (program: Command): void => {
|
||||
};
|
||||
|
||||
if (options.once) {
|
||||
await devOnceCommand.execute(commonOptions);
|
||||
await devOnceCommand.execute({
|
||||
...commonOptions,
|
||||
dryRun: options.dryRun,
|
||||
});
|
||||
|
||||
return;
|
||||
}
|
||||
@@ -48,6 +52,10 @@ export const registerDevCommands = (program: Command): void => {
|
||||
'-o, --once',
|
||||
'Build and sync once, then exit (useful for CI, scripts, and pre-commit hooks)',
|
||||
)
|
||||
.option(
|
||||
'--dry-run',
|
||||
'Preview the metadata changes without applying them (requires --once)',
|
||||
)
|
||||
.option('--debounceMs <ms>', 'Debounce in ms (default: 2 000)')
|
||||
.option('-v, --verbose', 'Show detailed logs')
|
||||
.option('-d, --debug', 'Show detailed logs (alias for --verbose)')
|
||||
|
||||
Reference in New Issue
Block a user