File tree Expand file tree Collapse file tree 2 files changed +2
-94
lines changed
Expand file tree Collapse file tree 2 files changed +2
-94
lines changed Original file line number Diff line number Diff line change @@ -19,34 +19,20 @@ export const supportedLspServerVersions = '0.1.32'
1919export const lspWorkspaceName = 'AmazonQ-Workspace'
2020
2121export class WorkspaceLSPResolver implements LspResolver {
22- private readonly versionRange : Range
23- private readonly shouldCleanUp : boolean
24- public constructor (
25- options ?: Partial < {
26- versionRange : Range
27- cleanUp : boolean
28- } >
29- ) {
30- this . versionRange = options ?. versionRange ?? new Range ( supportedLspServerVersions )
31- this . shouldCleanUp = options ?. cleanUp ?? true
32- }
33-
3422 async resolve ( ) : Promise < LspResolution > {
3523 const manifest = await new ManifestResolver ( lspManifestUrl , lspWorkspaceName ) . resolve ( )
3624 const installationResult = await new LanguageServerResolver (
3725 manifest ,
3826 lspWorkspaceName ,
39- this . versionRange
27+ new Range ( supportedLspServerVersions )
4028 ) . resolve ( )
4129
4230 const nodeName =
4331 process . platform === 'win32' ? getNodeExecutableName ( ) : `node-${ process . platform } -${ process . arch } `
4432 const nodePath = path . join ( installationResult . assetDirectory , nodeName )
4533 await fs . chmod ( nodePath , 0o755 )
4634
47- if ( this . shouldCleanUp ) {
48- await this . cleanUp ( manifest . versions , path . dirname ( installationResult . assetDirectory ) )
49- }
35+ await this . cleanUp ( manifest . versions , path . dirname ( installationResult . assetDirectory ) )
5036 return {
5137 ...installationResult ,
5238 resourcePaths : {
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments