feat: add dry-run option to sync-metadata command (#3758)

* feat: add dry-run option to sync-metadata command

* feat: save metadata logs in dry-run mode
This commit is contained in:
Jérémy M
2024-02-01 16:35:32 +01:00
committed by GitHub
parent cdc51add7d
commit 3c89a97a9f
7 changed files with 131 additions and 17 deletions

View File

@ -6,6 +6,7 @@ import { WorkspaceSyncMetadataService } from 'src/workspace/workspace-sync-metad
// TODO: implement dry-run
interface RunWorkspaceMigrationsOptions {
workspaceId: string;
dryRun?: boolean;
}
@Command({
@ -35,6 +36,7 @@ export class SyncWorkspaceMetadataCommand extends CommandRunner {
workspaceId: options.workspaceId,
dataSourceId: dataSourceMetadata.id,
},
{ dryRun: options.dryRun },
);
}
@ -46,4 +48,13 @@ export class SyncWorkspaceMetadataCommand extends CommandRunner {
parseWorkspaceId(value: string): string {
return value;
}
@Option({
flags: '-d, --dry-run',
description: 'Dry run without applying changes',
required: false,
})
dryRun(): boolean {
return true;
}
}