Skip to main content

Module node_hub

Module node_hub 

Source
Expand description

Node Hub - browse + install catalog node types.

Mirrors crate::template_hub function-for-function. The catalog itself lives in crate::nodes (parse + on-disk scheme IO); this module wraps install / update / uninstall and the “install status” annotation the Hub UI surfaces.

Structs§

NodeCatalogEntryWithStatus
One hub entry + install status. update_available is pre-computed server-side so the frontend doesn’t need to parse versions.
NodeInstalledStatus
Where a hub node currently lives, plus the installed version. None when nothing matches the catalog slug.

Functions§

add_to_library
Install a catalog entry into the user’s local library. Refuses if a row already exists for the slug - re-installs go through update_installed.
catalog
Browse list. Sorted by sortKey then slug, same as nodes::catalog.
catalog_with_status
Annotate the catalog with per-entry install status by walking node_library once into a slug → row map.
uninstall
Remove an installed scheme from disk and drop the library row.
update_installed
Overwrite an installed scheme with the catalog’s current version. When force is false and the user has edited the file (mtime > installed_at), returns Refused so the frontend can confirm before clobbering local edits.