UNPKG

@angular/cli

Version:
71 lines (70 loc) 1.78 kB
/** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.dev/license */ import type { Host } from './host'; export type BuildStatus = 'success' | 'failure' | 'unknown'; /** * An Angular development server managed by the MCP server. */ export interface Devserver { /** * Launches the dev server and returns immediately. * * Throws if this server is already running. */ start(): void; /** * If the dev server is running, stops it. */ stop(): void; /** * Gets all the server logs so far (stdout + stderr). */ getServerLogs(): string[]; /** * Gets all the server logs from the latest build. */ getMostRecentBuild(): { status: BuildStatus; logs: string[]; }; /** * Whether the dev server is currently being built, or is awaiting further changes. */ isBuilding(): boolean; /** * `ng serve` port to use. */ port: number; } /** * A local Angular development server managed by the MCP server. */ export declare class LocalDevserver implements Devserver { readonly host: Host; readonly port: number; readonly project?: string; private devserverProcess; private serverLogs; private buildInProgress; private latestBuildLogStartIndex?; private latestBuildStatus; constructor({ host, port, project }: { host: Host; port: number; project?: string; }); start(): void; private addLog; stop(): void; getServerLogs(): string[]; getMostRecentBuild(): { status: BuildStatus; logs: string[]; }; isBuilding(): boolean; }