| 140 | } |
| 141 | |
| 142 | export async function removeProviderPortReverse( |
| 143 | options: ProviderPortReverseOptions, |
| 144 | ): Promise<Record<string, unknown> | undefined> { |
| 145 | for (const runtime of getActiveProviderDeviceRuntimes()) { |
| 146 | if (!runtimeMatchesProvider(runtime, options.provider)) continue; |
| 147 | const result = await runtime.removePortReverse?.(options); |
| 148 | if (result) return result; |
| 149 | } |
| 150 | return undefined; |
| 151 | } |
| 152 | |
| 153 | function getActiveProviderDeviceRuntimes(): ProviderDeviceRuntime[] { |
| 154 | return providerDeviceRuntimeScope.getStore() ?? activeProviderDeviceRuntimes; |