extension_host: Add npm:install
capability (#35144)
This PR adds a new `npm:install` capability for installing npm packges in extensions. Currently all npm packages are allowed. Release Notes: - N/A
This commit is contained in:
parent
2a0170dc3c
commit
89e88c245e
5 changed files with 69 additions and 2 deletions
|
@ -8,8 +8,8 @@ use dap::{DebugRequest, StartDebuggingRequestArgumentsRequest};
|
|||
use extension::{
|
||||
CodeLabel, Command, Completion, ContextServerConfiguration, DebugAdapterBinary,
|
||||
DebugTaskDefinition, DownloadFileCapability, ExtensionCapability, ExtensionHostProxy,
|
||||
KeyValueStoreDelegate, ProcessExecCapability, ProjectDelegate, SlashCommand,
|
||||
SlashCommandArgumentCompletion, SlashCommandOutput, Symbol, WorktreeDelegate,
|
||||
KeyValueStoreDelegate, NpmInstallPackageCapability, ProcessExecCapability, ProjectDelegate,
|
||||
SlashCommand, SlashCommandArgumentCompletion, SlashCommandOutput, Symbol, WorktreeDelegate,
|
||||
};
|
||||
use fs::{Fs, normalize_path};
|
||||
use futures::future::LocalBoxFuture;
|
||||
|
@ -585,6 +585,9 @@ impl WasmHost {
|
|||
host: "*".to_string(),
|
||||
path: vec!["**".to_string()],
|
||||
}),
|
||||
ExtensionCapability::NpmInstallPackage(NpmInstallPackageCapability {
|
||||
package: "*".to_string(),
|
||||
}),
|
||||
],
|
||||
_main_thread_message_task: task,
|
||||
main_thread_message_tx: tx,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue