import BaseCommand from "../lib/base-command"; export default class Dev extends BaseCommand { static description: string; static examples: string[]; static flags: { docker: import("@oclif/core/lib/interfaces").BooleanFlag; detach: import("@oclif/core/lib/interfaces").BooleanFlag; build: import("@oclif/core/lib/interfaces").BooleanFlag; }; private children; private cleanup; run(): Promise; /** * TypeScript: run `npm run dev` which reads DATABASE_TYPE from .env. * PGlite is handled natively by the NestJS app -- no sidecar needed. * * Prefer the `dev` script, but fall back to `start:dev` for templates that * only define the latter (e.g. the v1 service template). See apsoai/cli#102. */ private runTypeScript; /** * Return the first script from `candidates` that exists in the local * package.json. If package.json is missing or unparseable, fall back to the * first candidate so behavior is unchanged when we cannot inspect it. */ private resolveNpmScript; /** * Python: if pglite, start the pglite-server sidecar first, then uvicorn. */ private runPython; /** * Go: if pglite, start the pglite-server sidecar first, then go run. */ private runGo; /** * Fallback: run docker compose up (the old behavior). */ private runDocker; /** * Detect the project language from .apsorc. * Falls back to typescript if not specified. */ private detectLanguage; /** * Read DATABASE_TYPE from .env. Defaults to pglite. */ private readDatabaseType; /** * Read a single value from .env. */ private readEnvValue; /** * Find .apsorc by walking up from cwd. */ private findApsorc; /** * Run `npm install` if node_modules doesn't exist. * Needed for the pglite-server sidecar in Python/Go projects. */ private ensureNodeModules; /** * Wait for a TCP port to become reachable. */ private waitForPort; /** * Spawn a process in the background and track it for cleanup. */ private spawnBackground; /** * Spawn a process and wait for it to exit. */ private spawnAndWait; /** * Detect whether to use `docker compose` (v2) or `docker-compose` (v1). */ private detectComposeVariant; }