* Convenience method to track an async operation automatically (mainly for testing/debugging)
(
operationId: string,
fn: () => Promise<T>,
)
| 128 | * Convenience method to track an async operation automatically (mainly for testing/debugging) |
| 129 | */ |
| 130 | async trackOperation<T>( |
| 131 | operationId: string, |
| 132 | fn: () => Promise<T>, |
| 133 | ): Promise<T> { |
| 134 | this.startCLIActivity(operationId) |
| 135 | try { |
| 136 | return await fn() |
| 137 | } finally { |
| 138 | this.endCLIActivity(operationId) |
| 139 | } |
| 140 | } |
| 141 | |
| 142 | /** |
| 143 | * Gets current activity states (mainly for testing/debugging) |
nothing calls this directly
no test coverage detected