@tb.p/dd 1.1.0 → 1.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/utils/candidateDetection.js +11 -2
package/package.json
CHANGED
|
@@ -403,8 +403,11 @@ class CandidateDetection {
|
|
|
403
403
|
}
|
|
404
404
|
|
|
405
405
|
// Calculate hash
|
|
406
|
+
if (this.options.verbose) {
|
|
407
|
+
console.log(`🔍 Hashing: ${candidate.file_path}`);
|
|
408
|
+
}
|
|
406
409
|
const hash = await calculateContentHash(candidate.file_path, this.options.hashAlgorithm);
|
|
407
|
-
|
|
410
|
+
|
|
408
411
|
// Update database
|
|
409
412
|
const updateResult = await this.db.updateFileHash(candidate.id, hash);
|
|
410
413
|
|
|
@@ -506,7 +509,13 @@ export async function runCandidateDetection(options) {
|
|
|
506
509
|
hashAlgorithm: options.hashAlgorithm || 'blake3',
|
|
507
510
|
batchSize: parseInt(options.batchSize) || 100,
|
|
508
511
|
maxConcurrency: parseInt(options.maxConcurrency) || 5,
|
|
509
|
-
verbose: options.verbose || false
|
|
512
|
+
verbose: options.verbose || false,
|
|
513
|
+
onProgress: options.verbose ? (progress) => {
|
|
514
|
+
if (progress.phase === 'hashing') {
|
|
515
|
+
const percentage = progress.percentage.toFixed(1);
|
|
516
|
+
console.log(`📊 Hashing progress: ${progress.processed}/${progress.total} files (${percentage}%) - ${progress.hashedFiles} hashed, ${progress.errors} errors`);
|
|
517
|
+
}
|
|
518
|
+
} : null
|
|
510
519
|
});
|
|
511
520
|
|
|
512
521
|
const result = await detector.detectAndProcessCandidates();
|