LogoRobo.js
Framework

DiscoveredRoute

Interface: DiscoveredRoute

Discovered route definition from a plugin or project.

Properties

PropertyTypeDescription
configRouteConfigRoute configuration from the route file's config export.
controller?(...args: unknown[]) => unknownController factory function for creating handler controllers. Used by Portal in Phase 5 for runtime control. Example createCommandController from @robojs/discord
directorystringThe directory to scan (inferred from route name). Example "/src/commands/"
namestringThe route name (derived from filename). Example "commands", "events", "api"
namespacestringPlugin namespace this route belongs to. Example "discord", "server"
processor?(entry: ScannedEntry) => | ProcessedEntry | Promise<ProcessedEntry>The route processor function (default export). Transforms ScannedEntry into ProcessedEntry.
sourcePathstringPath to the route definition file.
typeInfo?{ controllerType: string; handlerType: string; }Type information for portal codegen (Phase 5). Contains Handler and Controller type names from route file exports.
typeInfo.controllerType?stringController type name exported from the route file. Example "CommandController" from export type Controller = CommandController``
typeInfo.handlerType?stringHandler type name exported from the route file. Example "CommandHandler" from export type Handler = CommandHandler``

On this page