* Close all cached project connections
()
| 2716 | * Close all cached project connections |
| 2717 | */ |
| 2718 | closeAll(): Promise<void> { |
| 2719 | this.closing = true; |
| 2720 | this.worktreeMismatchCache.clear(); |
| 2721 | if (this.idleReleaseTimer) clearTimeout(this.idleReleaseTimer); |
| 2722 | this.idleReleaseTimer = null; |
| 2723 | this.nestedRepoCache.clear(); |
| 2724 | this.trimProjects(); |
| 2725 | if (this.projectCache.size === 0 && this.activeCalls === 0 && this.pendingCloses === 0) return Promise.resolve(); |
| 2726 | return new Promise((resolve) => this.closeWaiters.push(resolve)); |
| 2727 | } |
| 2728 | |
| 2729 | /** |
| 2730 | * Validate that a value is a non-empty string within length bounds. |