UNPKG

@mesh-tech/mesh-cli

Version:

CLI for Mesh platform development utilities

40 lines (39 loc) 1.71 kB
import { Command } from "commander"; import { type SessionState } from "../dev.js"; export declare const HUB_SESSION = "mesh-hub-dev"; export declare const DEFAULT_HUB_UI_PORT: number; export declare const DEFAULT_HUB_API_PORT = 3002; export interface DiscoveredSession { name: string; state: SessionState; } export declare function devSessionsDir(): string; export declare function listDevSessions(dir?: string): DiscoveredSession[]; export declare function pickDevSession(sessions: DiscoveredSession[], opts: { session?: string; cwdAppRoot?: string | null; }): DiscoveredSession; export declare function parseTmuxEnv(output: string): Record<string, string>; export declare function forwardedSessionVars(sessionEnv: Record<string, string>): Record<string, string>; export interface HubDevEnvOptions { tenants?: string; uiPort: number; apiPort: number; } export interface AssembledHubEnv { apiEnv: Record<string, string>; uiEnv: Record<string, string>; scope: { hubTenant: string; scopeEnv: string; scopeTenants: string[]; }; temporalAddress: string; warnings: string[]; notes: string[]; } export declare function assembleHubEnv(session: DiscoveredSession, sessionEnv: Record<string, string>, opts: HubDevEnvOptions): AssembledHubEnv; export declare function resolvePlatformDir(explicit: string | undefined, cwd: string, env?: Record<string, string | undefined>): string; export declare function parsePort(raw: string | undefined, fallback: number, source: string): number; export declare function redactEnv(env: Record<string, string>): Record<string, string>; export declare function registerHubCommands(program: Command): void;