import { type DeployTarget, type CloudClient } from "./context"; export declare function listProjects(rawArgs: string[]): Promise; /** * Where this project says it runs. * * `provider`/`region` are a *request*: no code downstream reads them to pick a * deploy target — that comes from the project's cluster record or the ambient * in-cluster context (saas/backend/src/k8s/resolve.ts). So a wrong value here is * never contradicted by a failure; it just sits in the record. The CLI used to * default to `hetzner`/`nbg1` unconditionally, which is how projects running on * our GKE cluster came to describe themselves as Hetzner in the console — and * `provider` is half the Stripe compute lookup key (`compute__`), * so that is a mispricing, not a cosmetic slip. * * The control plane already publishes the infrastructure that actually exists, * and the console's create wizard reads it. Ask the same question here. * * Exported for tests: the decision is pure, so it can be pinned without a * control plane. The fetching and the exit live in `resolveRequestedTarget`. * * @param requested `--provider`, if the caller named one. An explicit flag wins: * it is the caller stating intent, and `deploy` corrects the record anyway. * @param targets What the control plane says exists, or `undefined` when it * cannot say — an older deployment with no `platform-config`, or a failed * request. That is different from an empty list, which is a control plane * stating it has no infrastructure at all. * @returns the target to record, or `null` when the control plane answered that * there is none. */ export declare function chooseRequestedTarget(requested: string | undefined, targets: DeployTarget[] | undefined): { provider: string; region?: string; } | null; /** The flags `rebase cloud projects create` takes. */ export declare const CREATE_PROJECT_FLAGS: { readonly "--name": StringConstructor; readonly "--subdomain": StringConstructor; readonly "--repo": StringConstructor; readonly "--branch": StringConstructor; readonly "--provider": StringConstructor; readonly "--region": StringConstructor; readonly "--vm-size": StringConstructor; readonly "--org": StringConstructor; readonly "--link": BooleanConstructor; readonly "-n": "--name"; }; export declare function createProject(rawArgs: string[]): Promise; /** * Which project `projects info` / `projects delete` acts on. * * The id is optional — omitted, it falls back to `--project` or the link file — * and the dispatcher used to read it off `positionals()`, which skips only * LEADING `-` tokens and declares only the global cloud flags. So an undeclared * flag written after the action became the id: `rebase cloud projects delete * --force` looked up a project named "--force" and reported it missing, rather * than saying there is no such flag. Benign next to the deletes and writes the * rest of this family aimed at the wrong resource, but the same mistake, and * `positionals()` has no spec with which to do better — the handler's own * module does. * * Exported so its tests drive the real parser rather than a copy of it. */ export declare function resolveProjectArg(rawArgs: string[], action: "info" | "delete"): string; export declare function projectInfo(rawArgs: string[], projectRef: string): Promise; export declare function deleteProject(rawArgs: string[], projectRef: string): Promise; export declare function firstRow(client: CloudClient, collection: string, projectId: string): Promise | undefined>; export declare function latestDeployment(client: CloudClient, projectId: string): Promise<{ id: string | number; status?: string; createdAt?: string; logs?: string; } | undefined>; export declare function fmtDate(value: string | undefined): string;