Skip to content

Commit ec96026

Browse files
committed
feat: add debug flag to sync command and integrate listr2 for task management
1 parent 50ed2bd commit ec96026

4 files changed

Lines changed: 285 additions & 137 deletions

File tree

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
"csv-writer": "^1.6.0",
3434
"fs-extra": "^11.3.1",
3535
"inquirer": "^12.9.4",
36+
"listr2": "^9.0.2",
3637
"ora": "^8.2.0"
3738
},
3839
"oclif": {

pnpm-lock.yaml

Lines changed: 114 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/commands/sync.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ export default class Sync extends Command {
1212
'<%= config.bin %> <%= command.id %> --csv input/my-migration.csv',
1313
'<%= config.bin %> <%= command.id %> --dry-run --jobs 4',
1414
'<%= config.bin %> <%= command.id %> --docker --log-dir ./results/sync-log',
15+
'<%= config.bin %> <%= command.id %> --debug --jobs 2',
1516
]
1617

1718
static flags = {
@@ -34,6 +35,9 @@ export default class Sync extends Command {
3435
'dry-run': Flags.boolean({
3536
description: 'Show what would be synced without actually syncing',
3637
}),
38+
debug: Flags.boolean({
39+
description: 'Show detailed imapsync output and commands',
40+
}),
3741
}
3842

3943
async promptForCsvFile() {
@@ -157,6 +161,7 @@ export default class Sync extends Command {
157161
docker: flags.docker,
158162
logDir: flags['log-dir'],
159163
dryRun: flags['dry-run'],
164+
debug: flags.debug,
160165
}
161166

162167
const summary = await imapService.sync(options)

0 commit comments

Comments
 (0)