Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Code]: add option to disable node depdendency downloading #33340

Merged
merged 1 commit into from
Mar 15, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion x-pack/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@
"dependencies": {
"@elastic/datemath": "5.0.2",
"@elastic/eui": "9.4.0",
"@elastic/javascript-typescript-langserver": "^0.1.17",
"@elastic/javascript-typescript-langserver": "^0.1.18",
"@elastic/lsp-extension": "^0.1.1",
"@elastic/node-crypto": "0.1.2",
"@elastic/numeral": "2.3.2",
Expand Down
1 change: 1 addition & 0 deletions x-pack/plugins/code/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ export const code = (kibana: any) =>
codeSecurity: Joi.object({
enableMavenImport: Joi.boolean().default(true),
enableGradleImport: Joi.boolean().default(true),
installNodeDependency: Joi.boolean().default(true),
}).default(),
maxWorkspace: Joi.number().default(5), // max workspace folder for each language server
disableScheduler: Joi.boolean().default(true), // Temp option to disable all schedulers.
Expand Down
4 changes: 3 additions & 1 deletion x-pack/plugins/code/server/lsp/ts_launcher.ts
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,8 @@ export class TypescriptServerLauncher implements ILanguageServerLauncher {
}
proxy.listen();
await proxy.connect();
return new RequestExpander(proxy, builtinWorkspace, maxWorkspace, this.options);
return new RequestExpander(proxy, builtinWorkspace, maxWorkspace, this.options, {
installNodeDependnecy: this.options.codeSecurity.installNodeDependency,
});
}
}
1 change: 1 addition & 0 deletions x-pack/plugins/code/server/server_options.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ export interface LspOptions {
export interface CodeSecurityOptions {
enableMavenImport: boolean;
enableGradleImport: boolean;
installNodeDependency: boolean;
}

export class ServerOptions {
Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -837,10 +837,10 @@
oppsy "2.x.x"
pumpify "1.3.x"

"@elastic/javascript-typescript-langserver@^0.1.17":
version "0.1.17"
resolved "https://registry.yarnpkg.com/@elastic/javascript-typescript-langserver/-/javascript-typescript-langserver-0.1.17.tgz#e06f5bae83b48c272d0f8b3fab1ff207ab50963c"
integrity sha512-Ka6/hD7g0gNfv1G5ffsUzyQo5B8MxU0tWIe7emINWXVj+66j2yA2O5CQGfxZRowA7F5fcLFii3GlxNl1X7KYZw==
"@elastic/javascript-typescript-langserver@^0.1.18":
version "0.1.18"
resolved "https://registry.yarnpkg.com/@elastic/javascript-typescript-langserver/-/javascript-typescript-langserver-0.1.18.tgz#a8a85a10eaf5a268a4b0bf7c82fe24c8ff49b7cd"
integrity sha512-9rYyrlYP+jZ+Qlrc800ia3IFt+gKmcKd5GUuQH7Og21eocCxAx8I9+6h6tCk0WdjesLdxM5nuE4I09mQ24xFoQ==
dependencies:
"@elastic/lsp-extension" "^0.1.1"
javascript-typescript-langserver "^2.11.3"
Expand Down