@mesh-tech/mesh-cli
Version:
CLI for Mesh platform development utilities
63 lines (62 loc) • 2.39 kB
TypeScript
export declare const COMPOSE_PROJECT = "mesh-local";
export declare function localLogsDir(): string;
export declare function localProbesDir(): string;
export declare function writeAppServiceProbes(args: {
tenant: string;
env: string;
app: string;
services: Record<string, number>;
healthPath?: string;
}): string | undefined;
export interface StackEndpoint {
service: string;
label: string;
url: string;
probe: {
kind: "http";
url: string;
} | {
kind: "tcp";
port: number;
} | {
kind: "none";
};
hint?: string;
}
export declare const STACK_ENDPOINTS: StackEndpoint[];
export declare const DEFAULT_HUB_PORT = "9000";
export declare function hubPort(): string;
export declare function hubEndpoints(): StackEndpoint[];
export declare function findPackageRoot(startDir?: string): string;
export declare function stackDir(): string;
export declare const HUB_OVERLAY_FILE = "docker-compose.hub.yml";
export declare function parseComposeServiceNames(yamlText: string): string[];
export declare function hubOverlayServices(): ReadonlySet<string>;
export declare function stackOwnedElsewhere(): string | undefined;
export declare function ensureDockerAvailable(): void;
export declare function compose(args: string[], opts?: {
inherit?: boolean;
hub?: boolean;
env?: Record<string, string>;
}): string;
export declare function summarizeComposeFailure(output: string): string;
export declare function composeLogPath(op: string): string;
export declare function composeStreamed(args: string[], opts?: {
hub?: boolean;
env?: Record<string, string>;
}): Promise<void>;
export interface ServiceStatus {
name: string;
state: string;
health?: string;
}
export declare function parseComposePs(output: string): ServiceStatus[];
export declare function stackServices(): ServiceStatus[];
export declare const ONE_SHOT_SERVICES: Set<string>;
export declare function crashedServices(services: ServiceStatus[], opts: {
overlayServices: ReadonlySet<string>;
overlayStarted: boolean;
}): ServiceStatus[];
export declare function hubOverlayRunning(services: ServiceStatus[], overlayServices: ReadonlySet<string>): boolean;
export declare function hubApiRunning(services: ServiceStatus[]): boolean;
export declare function probeEndpoint(endpoint: StackEndpoint): Promise<boolean>;