ManifestAPI
Interface: ManifestAPI
The Manifest API singleton interface. Provides lazy-loaded, type-safe access to manifest data.
Properties
| Property | Modifier | Type | Description |
|---|---|---|---|
isInitialized | readonly | boolean | Whether the manifest has been initialized |
mode | readonly | string | Current runtime mode (supports custom modes like 'beta', 'staging', etc.) |
Methods
clearCache()
clearCache(): voidClear all cached data (for testing).
Returns
void
config()
config(options?): ConfigGet merged config.
Parameters
| Parameter | Type |
|---|---|
options? | ManifestOptions |
Returns
env()
env(options?): EnvMetadataGet environment variable status.
Parameters
| Parameter | Type |
|---|---|
options? | ManifestOptions |
Returns
hooks()
hooks(hook, options?): HookEntry[]Get lifecycle hook entries.
Parameters
| Parameter | Type |
|---|---|
hook | string |
options? | ManifestOptions |
Returns
initialize()
initialize(mode): Promise<void>Initialize the manifest by preloading core files. Called during Robo.start().
Parameters
| Parameter | Type | Description |
|---|---|---|
mode | string | Runtime mode (supports custom modes like 'beta', 'staging', etc.) |
Returns
Promise<void>
isLoaded()
isLoaded(namespace, route): booleanCheck if a route is loaded into memory.
Parameters
| Parameter | Type |
|---|---|
namespace | string |
route | string |
Returns
boolean
load()
load(namespace, route): Promise<HandlerEntry[]>Load a route manifest into memory.
Parameters
| Parameter | Type |
|---|---|
namespace | string |
route | string |
Returns
Promise<HandlerEntry[]>
metadata()
Call Signature
metadata<T>(namespace, options?): TGet aggregated metadata for a namespace.
Type Parameters
| Type Parameter | Default type |
|---|---|
T extends AggregatedMetadata | AggregatedMetadata |
Parameters
| Parameter | Type |
|---|---|
namespace | string |
options? | ManifestOptions |
Returns
T
Call Signature
metadata<T>(
namespace,
source,
options?): Partial<T>Get metadata for a specific source within a namespace. Loads from metadata/raw/{namespace}.{source}.json
Type Parameters
| Type Parameter | Default type |
|---|---|
T extends AggregatedMetadata | AggregatedMetadata |
Parameters
| Parameter | Type |
|---|---|
namespace | string |
source | string |
options? | ManifestOptions |
Returns
Partial<T>
plugin()
plugin(name, options?): PluginInfoGet info for a specific plugin.
Parameters
| Parameter | Type |
|---|---|
name | string |
options? | ManifestOptions |
Returns
pluginConfig()
pluginConfig(plugin, options?): Record<string, unknown>Get config for a specific plugin.
Parameters
| Parameter | Type |
|---|---|
plugin | string |
options? | ManifestOptions |
Returns
Record<string, unknown>
plugins()
plugins(options?): PluginInfo[]Get all plugin info.
Parameters
| Parameter | Type |
|---|---|
options? | ManifestOptions |
Returns
project()
project(options?): ProjectMetadataGet project metadata.
Parameters
| Parameter | Type |
|---|---|
options? | ManifestOptions |
Returns
reload()
reload(namespace, route): Promise<HandlerEntry[]>Reload a route manifest (for HMR).
Parameters
| Parameter | Type |
|---|---|
namespace | string |
route | string |
Returns
Promise<HandlerEntry[]>
routeDefinitions()
routeDefinitions(options?): RouteDefinitionsGet all route definitions from @.json.
Parameters
| Parameter | Type |
|---|---|
options? | ManifestOptions |
Returns
routeDefinitionsForNamespace()
routeDefinitionsForNamespace(namespace, options?): NamespaceRouteDefinitionsGet route definitions for a specific namespace.
Parameters
| Parameter | Type |
|---|---|
namespace | string |
options? | ManifestOptions |
Returns
routes()
routes(
namespace,
route,
options?): Promise<HandlerEntry[]>Get route handler entries.
Parameters
| Parameter | Type | Description |
|---|---|---|
namespace | string | Plugin namespace (e.g., 'discord', 'server') |
route | string | Route name (e.g., 'commands', 'api') |
options? | ManifestOptions | Optional mode override |
Returns
Promise<HandlerEntry[]>
routesSync()
routesSync(
namespace,
route,
options?): HandlerEntry[]Get route handler entries synchronously (must be pre-loaded).
Parameters
| Parameter | Type |
|---|---|
namespace | string |
route | string |
options? | ManifestOptions |
Returns
seeds()
seeds(pluginName, options?): SeedConfigGet seed configuration for a specific plugin. Loads from seeds/{pluginName}.json
Parameters
| Parameter | Type |
|---|---|
pluginName | string |
options? | ManifestOptions |
Returns
seedsIndex()
seedsIndex(options?): SeedsIndexGet seeds index (list of plugins with seeds). Loads from seeds/@.json
Parameters
| Parameter | Type |
|---|---|
options? | ManifestOptions |
Returns
unload()
unload(namespace, route): voidUnload a route manifest (free memory).
Parameters
| Parameter | Type |
|---|---|
namespace | string |
route | string |
Returns
void
