StaticgetStaticgetLike getCurrent but for an explicit export name. Useful for
mixin / hook files where filename ≠ canonical export.
StaticgetPrevious registered class for path, or null in states Empty
and V1. Same canonical-export convention as getCurrent.
StaticgetAll paths with a current blueprint registered (states V1 and
V2), in insertion order.
StaticisWhether path was explicitly unload'd and not yet repopulated
by a subsequent reload. StuffApi.clone uses this to choose
between throwing (frozen) and lazy-reloading (never-seen).
StaticreloadLoad the module at path, swap the registry's current blueprint
for the new one. Throws on compile error or top-level execution
error; registry stays unchanged on failure.
Concurrent reload(path) calls share one in-flight promise — the
second caller waits for the first instead of starting a parallel
import.
StaticreloadRefresh the persistence-hook chain from hooks.yaml. Required
after reloading a hook source file: hook instances live as
cloned Stuff objects pinned to their old class. This call drops
the chain and rebuilds it from the manifest, so the next save /
delete fires the freshly-cloned hooks. Idempotent.
Lazy import keeps PersistenceManager (and its mongo dependency
tree) out of HotReloadApi's static graph for callers that only
touch the registry surface.
StaticrollbackSwap current and previous for path. Throws when there is no
previous (states Empty and V1).
StaticunloadClear both registry slots for path and freeze it. Subsequent
clone(path) throws "no blueprint at path" until the next
reload() repopulates. Idempotent: unload-from-Empty emits
the event without changing state, so subscribers still see the
intent.
Class currently registered under the canonical export name for
path, ornullif the path is in state Empty (or the file doesn't export a class matching the last-path-segment convention).The canonical export is the export whose name equals the last path segment without extension — the same convention
StuffApi.cloneuses today.