( server: LspServerDefinition, context?: LspRuntimeContext, )
| 31 | } |
| 32 | |
| 33 | export async function checkRuntimeServerInstallation( |
| 34 | server: LspServerDefinition, |
| 35 | context?: LspRuntimeContext, |
| 36 | ): Promise<InstallCheckResult> { |
| 37 | const settingsContext = getSettingsContext(server, context, "checkInstallation"); |
| 38 | const provider = await getProvider(server, context, "checkInstallation"); |
| 39 | if (!provider?.checkInstallation) { |
| 40 | return { |
| 41 | status: "unknown", |
| 42 | version: null, |
| 43 | canInstall: false, |
| 44 | canUpdate: false, |
| 45 | message: "The selected runtime does not provide installation checks.", |
| 46 | }; |
| 47 | } |
| 48 | return provider.checkInstallation(server, settingsContext); |
| 49 | } |
| 50 | |
| 51 | export async function installRuntimeServer( |
| 52 | server: LspServerDefinition, |
no test coverage detected