diff options
author | Nayeem Rahman <nayeemrmn99@gmail.com> | 2023-11-14 22:10:51 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-11-14 22:10:51 +0000 |
commit | 4913274a6508a5e5ad6c8babf2e90a4a84bf98ec (patch) | |
tree | 687e2b6846a8288b4bc9c2896a947b68007731f3 /cli/lsp/lsp_custom.rs | |
parent | ab0c637425c3219c2a5f59c25ae8ea593018568b (diff) |
feat(lsp): upgrade check on init and notification (#21105)
Diffstat (limited to 'cli/lsp/lsp_custom.rs')
-rw-r--r-- | cli/lsp/lsp_custom.rs | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/cli/lsp/lsp_custom.rs b/cli/lsp/lsp_custom.rs index 685da6b14..96f7be790 100644 --- a/cli/lsp/lsp_custom.rs +++ b/cli/lsp/lsp_custom.rs @@ -91,6 +91,27 @@ impl lsp::notification::Notification const METHOD: &'static str = "deno/didChangeDenoConfiguration"; } +pub enum DidUpgradeCheckNotification {} + +impl lsp::notification::Notification for DidUpgradeCheckNotification { + type Params = DidUpgradeCheckNotificationParams; + + const METHOD: &'static str = "deno/didUpgradeCheck"; +} + +#[derive(Debug, Deserialize, Serialize)] +#[serde(rename_all = "camelCase")] +pub struct UpgradeAvailable { + pub latest_version: String, + pub is_canary: bool, +} + +#[derive(Debug, Deserialize, Serialize)] +#[serde(rename_all = "camelCase")] +pub struct DidUpgradeCheckNotificationParams { + pub upgrade_available: Option<UpgradeAvailable>, +} + /// This notification is only sent for testing purposes /// in order to know what the latest diagnostics are. pub enum DiagnosticBatchNotification {} |