diff --git a/common/scripts/ofac/progressMonitor.ts b/common/scripts/ofac/progressMonitor.ts index 4255a95bb..4b5524f0c 100644 --- a/common/scripts/ofac/progressMonitor.ts +++ b/common/scripts/ofac/progressMonitor.ts @@ -20,6 +20,7 @@ export class ProgressMonitor { private startTime: number = Date.now(); private updateInterval?: NodeJS.Timeout; private lastOutput: string = ''; + private static readonly COL_TIME_WIDTH = 10; constructor(treeNames: string[]) { treeNames.forEach((name, index) => { @@ -160,15 +161,16 @@ export class ProgressMonitor { } private getTimeDisplay(tree: TreeProgress): string { + const COL_TIME_WIDTH = ProgressMonitor.COL_TIME_WIDTH; if (tree.status === 'completed' && tree.startTime && tree.endTime) { const duration = ((tree.endTime - tree.startTime) / 1000).toFixed(1); - return `${duration}s`; + return `${duration}s`.padEnd(COL_TIME_WIDTH); } if (tree.status === 'building' && tree.startTime) { const duration = ((Date.now() - tree.startTime) / 1000).toFixed(1); - return `${duration}s...`; + return `${duration}s...`.padEnd(COL_TIME_WIDTH); } - return '-'; + return '-'.padEnd(COL_TIME_WIDTH); } // Method to suppress console.log during tree building diff --git a/common/scripts/ofac/test-with-fork.sh b/common/scripts/ofac/test-with-fork.sh index 67fafccb7..3ca4db2c9 100755 --- a/common/scripts/ofac/test-with-fork.sh +++ b/common/scripts/ofac/test-with-fork.sh @@ -125,12 +125,12 @@ echo "" echo "📊 Results:" echo "" echo " 📦 Check GCS Bucket:" -echo " Web UI: https://console.cloud.google.com/storage/browser/$GCS_BUCKET/$GCS_BASE_PATH?project=ofac-upload-test" +echo " Web UI: https://console.cloud.google.com/storage/browser/${GCS_BUCKET}/${GCS_BASE_PATH}" echo "" if command -v gsutil &> /dev/null; then echo " Command line:" - echo " gsutil ls gs://$GCS_BUCKET/$GCS_BASE_PATH/" - echo " gsutil cat gs://$GCS_BUCKET/$GCS_BASE_PATH/current.json" + echo " gsutil ls gs://${GCS_BUCKET}/${GCS_BASE_PATH}/" + echo " gsutil cat gs://${GCS_BUCKET}/${GCS_BASE_PATH}/current.json" else echo " 💡 Install gsutil for command-line access:" echo " brew install google-cloud-sdk" @@ -138,4 +138,3 @@ else fi echo "" echo " 🔗 Fork transactions logged in your terminal above" -echo ""