import type { Api, Build, Cache, Compiler, Context, Dashboard, Env, Extensions, Hooks, Project, Server, Service } from '@roots/bud-framework'; import type { FS } from '@roots/bud-framework/fs'; import type { Module } from '@roots/bud-framework/module'; import type { Notifier } from '@roots/bud-framework/notifier'; import methods from '@roots/bud-framework/methods'; import { BudError } from '@roots/bud-support/errors'; import type { EventsStore } from '../registry/index.js'; /** * Bud core class */ export declare class Bud { addConfig: typeof methods.addConfig; after: typeof methods.after; api: Api & Service; bindFacade: typeof methods.bindFacade; build: Build & Service; cache: Cache & Service; children: Record; close: typeof methods.close; compiler: Compiler & Service; container: typeof methods.container; context: Context; dashboard: Dashboard & Service; env: Env & Service; extensions: Extensions & Service; fs: FS; get: typeof methods.get; glob: typeof methods.glob; globSync: typeof methods.globSync; hooks: Hooks & Service; implementation: new () => Bud; /** * @deprecated Use {@link bud.fs} * @readonly */ json: FS['json']; maybeCall: typeof methods.maybeCall; module: Module; notifier: Notifier; path: typeof methods.path; pipe: typeof methods.pipe; processConfigs: typeof methods.processConfigs; project: Project; publicPath: typeof methods.publicPath; relPath: typeof methods.relPath; run: typeof methods.run; sequence: typeof methods.sequence; sequenceSync: typeof methods.sequenceSync; server?: Server & Service; setPath: typeof methods.setPath; setPublicPath: typeof methods.setPublicPath; sh: typeof methods.sh; tap: typeof methods.tap; tapAsync: typeof methods.tapAsync; when: typeof methods.when; /** * @deprecated Use {@link Bud.fs} * @readonly */ yml: FS['yml']; /** * True when child compilers * @readonly */ get hasChildren(): boolean; /** * True when current instance is a child instance * @readonly */ get isChild(): boolean; /** * True when {@link Bud.mode} is `development` * @readonly */ get isDevelopment(): boolean; /** * True when {@link Bud.mode} is `production` * @readonly */ get isProduction(): boolean; /** * True when current instance is the parent instance * @readonly */ get isRoot(): boolean; /** * Label * @readonly */ get label(): string; /** * Compilation mode * * @remarks * Either `production` or `development`. * * @readonly * @defaultValue `production` */ get mode(): `development` | `production`; /** * Promised tasks */ promised: Array<(bud: Bud) => Promise>; /** * Constructor */ constructor(); /** * Boot application services */ boot(): Promise; /** * Bootstrap the application */ bootstrap(): Promise; /** * Error handler */ catch(error: BudError | Error | null | string | undefined): void; /** * Execute service callbacks for a given stage * @internal */ executeServiceCallbacks(stage: `${keyof EventsStore & string}`): Promise; /** * Bud initialize */ initialize(context?: Context): Promise; /** * Creates a child and returns the parent instance */ make(request: Partial | string, setupFn?: (app: Bud) => Promise): Promise; /** * Await all promised tasks */ promise(promise: (bud: Bud) => Promise): Bud; resolvePromises(): Promise; /** * Parent {@link Bud} instance * @readonly */ get root(): Bud; /** * Set a value on the current instance * @param key - key * @param value - value * @param bind - bind value to current instance (default: true, if bindable) */ set(key: K, input: Bud[K], bind?: boolean): Bud; /** * Log message * @deprecated */ log(...messages: Array): this; /** * Log success * @deprecated */ success(...messages: Array): this; /** * Log warning * @deprecated */ warn(...messages: Array): this; /** * Log info * @deprecated */ info(...messages: Array): this; /** * Log error * @deprecated */ error(error: Error | string): this; }