coder / code-marketplace

Open source extension marketplace for VS Code.
GNU Affero General Public License v3.0
226 stars 24 forks source link

Show overview of all added extensions and versions #37

Open mayrholu opened 7 months ago

mayrholu commented 7 months ago

Hi Guys,

thanks for providing a marketplace solution for closed environments!

It would be great if there was something like code-marketplace list/overview which returns an overview of extensions and their versions are on the marketplace. This would make it easier to clean up (i.e. remove old versions).

It could look something like this:

vadimcn.vscode-lldb
- 1.9.0
- 1.10.0
DavidAnson.vscode-markdownlint
- 0.54.0
- 0.55.0 
... and so on.
code-asher commented 7 months ago

As a workaround, you could do this with a query against the API and parse with jq, although you can only query a maximum of 50 extensions at a time.

λ curl -s 'http://localhost:3001/api/extensionquery' --data-raw '{"filters":[{"criteria":[{"filterType":8,"value":"Microsoft.VisualStudio.Code"}],"pageSize":50}],"flags":439}' | jq '.results[0].extensions[] | "\(.extensionId) \(.versions[].version)"'
"esbenp.prettier-vscode 10.1.0"
"esbenp.prettier-vscode 10.0.0"
"esbenp.prettier-vscode 9.20.0"
"esbenp.prettier-vscode 9.19.0"
"esbenp.prettier-vscode 9.18.0"
"ms-python.python 2023.19.12791027"
"ms-python.python 2023.19.12781014"
"ms-python.python 2023.19.12771010"
"ms-python.python 2023.19.12761007"
"ms-python.python 2023.18.0"
"vscodevim.vim 1.26.0"

Come to think of it, with jq you could skip the first version and get all the old versions:

λ curl -s 'http://localhost:3001/api/extensionquery' --data-raw '{"filters":[{"criteria":[{"filterType":8,"value":"Microsoft.VisualStudio.Code"}],"pageSize":50}],"flags":439}' | jq '.results[0].extensions[] | "\(.extensionId) \(.versions | del(.[0])[].version)"'
"esbenp.prettier-vscode 10.0.0"
"esbenp.prettier-vscode 9.20.0"
"esbenp.prettier-vscode 9.19.0"
"esbenp.prettier-vscode 9.18.0"
"ms-python.python 2023.19.12781014"
"ms-python.python 2023.19.12771010"
"ms-python.python 2023.19.12761007"
"ms-python.python 2023.18.0"
mayrholu commented 6 months ago

Thanks for the workaround! Nevertheless it would be great to have this convenience feature as part of code-marketplace.