LogoRobo.js
Framework

BuildCompleteContext

Interface: BuildCompleteContext

Context provided to build/complete.ts hooks. Runs AFTER manifest is written.

Hook signature: (context: BuildCompleteContext) => void | Promise<void>

Use this hook to perform post-build tasks like:

  • Registering commands with Discord
  • Generating additional files
  • Logging build summaries

Example

export default function (context: BuildCompleteContext) {
  const commands = context.entries.get('discordjs', 'commands')
  context.logger.info(`Built ${commands.length} commands`)
}

Extends

Properties

PropertyTypeDescriptionOverridesInherited from
configConfigLoaded configuration-BuildContext.config
entriesEntriesAccessorEntries accessor is always available in complete hooksBuildContext.entries-
envtypeof EnvEnvironment variable access-BuildContext.env
loggerLoggerLogger instance (forked for plugins)-BuildContext.logger
modestringCurrent build mode (supports custom modes like 'beta', 'staging', etc.)-BuildContext.mode
paths{ output: string; root: string; src: string; }Project paths-BuildContext.paths
paths.outputstring---
paths.rootstring---
paths.srcstring---
storeBuildStoreKey-value store for passing data between build hooks. Use to share computed values between build/start and build/complete.-BuildContext.store

Methods

registerMetadataAggregator()

registerMetadataAggregator<T>(namespace, aggregator): void

Register a metadata aggregator for a namespace. Aggregators combine metadata from all handlers into a summary.

Type Parameters

Type Parameter
T extends AggregatedMetadata

Parameters

ParameterTypeDescription
namespacestringPlugin namespace to aggregate (e.g., 'discordjs')
aggregatorMetadataAggregator<T>Function that processes entries into aggregated metadata

Returns

void


updateMetadata()

updateMetadata(namespace, updates): void

Update aggregated metadata for a namespace. Can be called multiple times; updates are merged.

Parameters

ParameterTypeDescription
namespacestringPlugin namespace
updatesRecord<string, unknown>Partial metadata to merge

Returns

void

On this page