extensions: Add "Debug Adapters" category to the extension store (#32845)
Closes #ISSUE Release Notes: - N/A
This commit is contained in:
parent
b13144eb1f
commit
6ad9a66cf9
10 changed files with 46 additions and 9 deletions
|
@ -465,6 +465,7 @@ CREATE TABLE extension_versions (
|
|||
provides_slash_commands BOOLEAN NOT NULL DEFAULT FALSE,
|
||||
provides_indexed_docs_providers BOOLEAN NOT NULL DEFAULT FALSE,
|
||||
provides_snippets BOOLEAN NOT NULL DEFAULT FALSE,
|
||||
provides_debug_adapters BOOLEAN NOT NULL DEFAULT FALSE,
|
||||
PRIMARY KEY (extension_id, version)
|
||||
);
|
||||
|
||||
|
|
|
@ -0,0 +1,2 @@
|
|||
alter table extension_versions
|
||||
add column provides_debug_adapters bool not null default false
|
|
@ -321,6 +321,9 @@ impl Database {
|
|||
provides_snippets: ActiveValue::Set(
|
||||
version.provides.contains(&ExtensionProvides::Snippets),
|
||||
),
|
||||
provides_debug_adapters: ActiveValue::Set(
|
||||
version.provides.contains(&ExtensionProvides::DebugAdapters),
|
||||
),
|
||||
download_count: ActiveValue::NotSet,
|
||||
}
|
||||
}))
|
||||
|
@ -431,6 +434,10 @@ fn apply_provides_filter(
|
|||
condition = condition.add(extension_version::Column::ProvidesSnippets.eq(true));
|
||||
}
|
||||
|
||||
if provides_filter.contains(&ExtensionProvides::DebugAdapters) {
|
||||
condition = condition.add(extension_version::Column::ProvidesDebugAdapters.eq(true));
|
||||
}
|
||||
|
||||
condition
|
||||
}
|
||||
|
||||
|
|
|
@ -27,6 +27,7 @@ pub struct Model {
|
|||
pub provides_slash_commands: bool,
|
||||
pub provides_indexed_docs_providers: bool,
|
||||
pub provides_snippets: bool,
|
||||
pub provides_debug_adapters: bool,
|
||||
}
|
||||
|
||||
impl Model {
|
||||
|
@ -68,6 +69,10 @@ impl Model {
|
|||
provides.insert(ExtensionProvides::Snippets);
|
||||
}
|
||||
|
||||
if self.provides_debug_adapters {
|
||||
provides.insert(ExtensionProvides::DebugAdapters);
|
||||
}
|
||||
|
||||
provides
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue