docs(website): settle the module loader's trigger and its collision check #127
Reference in New Issue
Block a user
No description provided.
Delete Branch "docs/module-loader"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The docs half of RunicGateway/website#129 (phase 2, PR 2 — the module loader). Records what the implementation decided against the two things
MODULE_API.mdexplicitly left open for Phase 2.§7.6 → settled: an explicit
load().app.jscallsmodules.load(tierRouters)once, and the accessors throw until it has run. A require-time scan was the stated alternative and was rejected for two reasons worth keeping: the loader needs the tier routers handed to it for the §4.3 check, which a require-time side effect cannot receive; and it would enforce the ordering constraint by where arequiresits rather than by an argument that is missing when it is wrong.§4.1 and §4.3 gain the mechanics that fall out — where the call must sit in
app.jsand why in both directions (after/apiso core's prefixes are on the tier routers and first-match-wins protects them; before the/api404 so a module route reaches its handler), that mounting is a second pass after validation, and that core's prefix ownership is probed on the live tier routers with express'slayer.match()instead of a declared table that was already stale in the spike.§2.7 records PR 2 as done, with what it deliberately does not contain.
No contract member changed, so
MODULE_API_VERSIONstays1.0.0.