import EventEmitter from 'node:events'; import { Dashboard } from './dashboard.ts'; import { AppDataManager } from './app-data.ts'; import { getProjectData } from './graph-data.ts'; import { ConfigManager, reloadConfig } from './config-data.ts'; import { readProjectFolders } from './read-project-folders.ts'; import type { SecurityArchive } from '@vltpkg/security-archive'; import type { ActualLoadOptions, InstallOptions, UninstallOptions } from '@vltpkg/graph'; import type { PackageJson } from '@vltpkg/package-json'; import type { Server } from 'node:http'; import type { LoadedConfig } from '@vltpkg/cli-sdk/config'; export { getProjectData, readProjectFolders, reloadConfig }; export declare const createServer: (options: VltServerOptions) => VltServer; export type VltServerOptions = InstallOptions & UninstallOptions & ActualLoadOptions & { assetsDir?: string; publicDir?: string; 'dashboard-root'?: string[]; packageJson: PackageJson; loadedConfig?: LoadedConfig; }; export type VltServerStartOptions = { port?: number; }; export type VltServerListening = VltServer & { publicDir: string; assetsDir: string; port: number; config: ConfigManager; }; export type VltServerNotListening = VltServer & { publicDir: undefined; port: undefined; }; /** * This class handles the starting and stopping of the server, but the actual * response handling is all done in the handleRequest function. */ export declare class VltServer extends EventEmitter<{ needConfigUpdate: [string]; }> { #private; dashboard?: Dashboard; appData?: AppDataManager; config?: ConfigManager; hasDashboard: boolean; options: VltServerOptions; port?: number; server: Server; publicDir?: string; dashboardRoot: string[]; assetsDir?: string; securityArchive: SecurityArchive | undefined; constructor(options: VltServerOptions); listening(): this is VltServerListening; address(path?: string): string; /** * If no port is specified, then it'll start counting up from 8000 until * it finds one that does not fail with EADDRINUSE. */ start({ port }?: VltServerStartOptions): Promise; updateGraph(this: VltServerListening): Promise; updateOptions(options: VltServerOptions): void; update(this: VltServerListening): Promise; close(): Promise; } //# sourceMappingURL=index.d.ts.map