* Close all cached project connections
()
| 2901 | * Close all cached project connections |
| 2902 | */ |
| 2903 | closeAll(): Promise<void> { |
| 2904 | this.closing = true; |
| 2905 | this.worktreeMismatchCache.clear(); |
| 2906 | if (this.idleReleaseTimer) clearTimeout(this.idleReleaseTimer); |
| 2907 | this.idleReleaseTimer = null; |
| 2908 | this.nestedRepoCache.clear(); |
| 2909 | this.trimProjects(); |
| 2910 | if (this.projectCache.size === 0 && this.activeCalls === 0 && this.pendingCloses === 0) return Promise.resolve(); |
| 2911 | return new Promise((resolve) => this.closeWaiters.push(resolve)); |
| 2912 | } |
| 2913 | |
| 2914 | /** |
| 2915 | * Validate that a value is a non-empty string within length bounds. |