Framework
DiscoveredRoute
Interface: DiscoveredRoute
Discovered route definition from a plugin or project.
Properties
| Property | Type | Description |
|---|---|---|
config | RouteConfig | Route configuration from the route file's config export. |
controller? | (...args: unknown[]) => unknown | Controller factory function for creating handler controllers. Used by Portal in Phase 5 for runtime control. Example createCommandController from @robojs/discord |
directory | string | The directory to scan (inferred from route name). Example "/src/commands/" |
name | string | The route name (derived from filename). Example "commands", "events", "api" |
namespace | string | Plugin namespace this route belongs to. Example "discord", "server" |
processor? | (entry: ScannedEntry) => | ProcessedEntry | Promise<ProcessedEntry> | The route processor function (default export). Transforms ScannedEntry into ProcessedEntry. |
sourcePath | string | Path 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? | string | Controller type name exported from the route file. Example "CommandController" from export type Controller = CommandController`` |
typeInfo.handlerType? | string | Handler type name exported from the route file. Example "CommandHandler" from export type Handler = CommandHandler`` |
