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:
+4
-2
@@ -358,6 +358,7 @@ export class WorkspaceMigrationValidateBuildAndRunService {
|
||||
public async validateBuildAndRunWorkspaceMigrationFromTo(
|
||||
args: WorkspaceMigrationOrchestratorBuildArgs & {
|
||||
idByUniversalIdentifierByMetadataName?: IdByUniversalIdentifierByMetadataName;
|
||||
dryRun?: boolean;
|
||||
},
|
||||
): Promise<
|
||||
| WorkspaceMigrationOrchestratorFailedResult
|
||||
@@ -365,7 +366,8 @@ export class WorkspaceMigrationValidateBuildAndRunService {
|
||||
hasSchemaMetadataChanged: boolean;
|
||||
})
|
||||
> {
|
||||
const { idByUniversalIdentifierByMetadataName, ...buildArgs } = args;
|
||||
const { idByUniversalIdentifierByMetadataName, dryRun, ...buildArgs } =
|
||||
args;
|
||||
|
||||
const validateAndBuildResult =
|
||||
await this.workspaceMigrationBuildOrchestratorService
|
||||
@@ -392,7 +394,7 @@ export class WorkspaceMigrationValidateBuildAndRunService {
|
||||
workspaceMigration: validateAndBuildResult.workspaceMigration,
|
||||
});
|
||||
|
||||
if (workspaceMigration.actions.length === 0) {
|
||||
if (dryRun === true || workspaceMigration.actions.length === 0) {
|
||||
return {
|
||||
status: 'success',
|
||||
workspaceMigration,
|
||||
|
||||
Reference in New Issue
Block a user