Repository navigation
feat(plugins): install plugins from the nokta-plugins catalog - #140
Merged
Merged
Conversation
…ecked Plugins1 gains Catalog and InstallFromCatalog. The catalog's index lists every file of a plugin with its size and SHA-256; each download must match before it is written, and the plugin then installs like one from a folder: a new one starts off, an update keeps its switch and options. NOKTA_PLUGIN_CATALOG_URL points it elsewhere.
catalog lists the catalog's plugins and says which are installed or have an update; install takes a catalog id when there is no folder of that name; update gets the newest of one.
The bridge answers Plugins1.Catalog and InstallFromCatalog, and nokta plugin catalog, install and update go over the pipe.
The Plugins page gains a Catalog group under Added. Nokta asks the catalog only when Browse is pressed; each plugin then shows Install, Update when the catalog has a newer version of an installed one, Installed, or Not for this system. An install starts off, like one added from a folder.
The Windows settings get the same Catalog group. The mock bridge can answer a method, so the mock settings show a catalog after ?browse.
The devshell points noktad at a catalog on its stand-in server. Smoke checks a file that does not match index.json installs nothing, and a matching plugin installs executable and off.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Plugins shared in a catalog, MasRama/nokta-plugins, installed from Nokta's settings or the
noktacommand.What changes
plugins/catalog.rs): readsindex.jsonfrom the catalog'scatalogbranch, downloads a plugin's files one by one into~/.cache/nokta/plugins/<id>, checks each against its listed size and SHA-256 (plain relative paths only), and installs the folder through the existing install path: off, and an update keeps the switch and options.Plugins1gainsCatalog()andInstallFromCatalog(id).NOKTA_PLUGIN_CATALOG_URLpoints it elsewhere for tests.nokta plugin cataloglists the catalog with each one's state;nokta plugin install <id>installs from the catalog when no such folder exists;nokta plugin update <id>.Checked
cargo clippy/cargo test, extension check/test/lint, desktop tsc/vitest/lint,precheck.sh --quickwith smoke.noktadagainst the real catalog:nokta plugin catalog,install days-until(off,days.shexecutable, staging folder gone),enable→on ok.Needs a real session