/** * Pull command - Download project files from Veryfront API * * Downloads all files from the remote Veryfront project using the files API * and writes them to the local filesystem with their original paths. * * @module cli/commands/pull */ import type { InferSchema } from "../../../src/extensions/schema/index.js"; import { createApiClient } from "../../shared/config.js"; /** * Schema factory for pull command arguments */ export declare const getPullArgsSchema: () => import("../../../src/internal-agents/schema.js").Schema; projects: import("../../../src/internal-agents/schema.js").Schema; projectDir: import("../../../src/internal-agents/schema.js").Schema; branch: import("../../../src/internal-agents/schema.js").Schema; env: import("../../../src/internal-agents/schema.js").Schema; release: import("../../../src/internal-agents/schema.js").Schema; force: import("../../../src/internal-agents/schema.js").Schema; dryRun: import("../../../src/internal-agents/schema.js").Schema; prune: import("../../../src/internal-agents/schema.js").Schema; quiet: import("../../../src/internal-agents/schema.js").Schema; }>>; export declare const PullArgsSchema: import("../../../src/internal-agents/schema.js").Schema; projects: import("../../../src/internal-agents/schema.js").Schema; projectDir: import("../../../src/internal-agents/schema.js").Schema; branch: import("../../../src/internal-agents/schema.js").Schema; env: import("../../../src/internal-agents/schema.js").Schema; release: import("../../../src/internal-agents/schema.js").Schema; force: import("../../../src/internal-agents/schema.js").Schema; dryRun: import("../../../src/internal-agents/schema.js").Schema; prune: import("../../../src/internal-agents/schema.js").Schema; quiet: import("../../../src/internal-agents/schema.js").Schema; }>>; export type PullArgs = InferSchema>; /** * Parse pull command arguments from CLI args */ export declare const parsePullArgs: (args: import("../../shared/types.js").ParsedArgs) => import("../../shared/args.js").SafeParseResult; projects: import("../../../src/internal-agents/schema.js").Schema; projectDir: import("../../../src/internal-agents/schema.js").Schema; branch: import("../../../src/internal-agents/schema.js").Schema; env: import("../../../src/internal-agents/schema.js").Schema; release: import("../../../src/internal-agents/schema.js").Schema; force: import("../../../src/internal-agents/schema.js").Schema; dryRun: import("../../../src/internal-agents/schema.js").Schema; prune: import("../../../src/internal-agents/schema.js").Schema; quiet: import("../../../src/internal-agents/schema.js").Schema; }>>; /** * Pull source type - determines which API endpoint to use */ export type PullSource = { type: "main"; } | { type: "branch"; name: string; } | { type: "environment"; name: string; } | { type: "release"; version: string; }; /** * Pull command options */ export interface PullOptions { /** Project slug to pull from */ projectSlug?: string; /** List of project slugs to pull (each into its own directory) */ projects?: string[]; /** Project directory (defaults to cwd) */ projectDir?: string; /** Branch name to pull from (optional) */ branch?: string; /** Environment name to pull from (e.g., "production", "staging") */ env?: string; /** Release version to pull from (e.g., "v1.2.0") */ release?: string; /** Skip confirmation without changing overwrite semantics */ force?: boolean; /** Dry run - show what would be written without writing */ dryRun?: boolean; /** Delete managed local files that are absent from the selected source */ prune?: boolean; /** Quiet mode - suppress spinner/progress output */ quiet?: boolean; } /** * Resolve pull source from options * Priority: env > release > branch > main */ export declare function resolvePullSource(options: PullOptions): PullSource; interface ProjectFile { path: string; content: string; size: number; type: string; created_at: string; updated_at: string; version_id?: string; } /** Validate a remote file path as a canonical relative POSIX path. */ export declare function validateRemoteFilePath(filePath: string): string; /** * Build the files list URL based on pull source */ export declare function buildFilesListUrl(projectSlug: string, source: PullSource): string; /** * Fetch all files from API with pagination * Supports main, branch, environment, and release sources */ export declare function listAllFiles(client: ReturnType, projectSlug: string, source: PullSource): Promise; /** * Build the file content URL based on pull source */ export declare function buildFileContentUrl(projectSlug: string, path: string, source: PullSource): string; /** * Get file content from API * Supports main, branch, environment, and release sources */ export declare function getFileContent(client: ReturnType, projectSlug: string, path: string, source: PullSource): Promise; /** * Pull files from Veryfront API */ export declare function pullCommand(options?: PullOptions): Promise; export {}; //# sourceMappingURL=command.d.ts.map