/** * CLI Utility Functions * Shared helpers for CLI commands */ import type { InscribedFile } from '../core/inscription/index.js'; export declare const CLI_CONSTANTS: { readonly DEFAULT_VERSION: "1.0.0"; readonly ENV_FILE: ".env"; readonly GITIGNORE_FILE: ".gitignore"; readonly COMMON_BUILD_DIRS: readonly ["dist", "build", "out", ".next/standalone", "public"]; readonly FILENAME_MAX_LENGTH: 35; readonly FILENAME_TRUNCATE_SUFFIX: 32; readonly DIVIDER_LENGTH: 70; readonly PROGRESS_BAR_WIDTH: 20; readonly DEFAULT_VERSION_LIMIT: 10; readonly VERSION_DESC_MAX_LENGTH: 37; readonly VERSION_DESC_TRUNCATE_LENGTH: 34; }; export interface ManifestData { versioningOriginInscription?: string; buildDir?: string; ordinalContentUrl?: string; deployments?: Array<{ version: string; }>; } /** * Format bytes to human-readable string */ export declare function formatBytes(bytes: number): string; /** * Parse size input - accepts plain numbers (interpreted as MB) or byte counts * Examples: "3" = 3MB, "5242880" = 5MB in bytes */ export declare function parseSizeInput(input: string): number; /** * Helper to read and parse manifest data * Returns empty object if manifest doesn't exist or can't be read */ export declare function readManifestData(manifestPath?: string): Promise; /** * Increment the patch version (e.g., "1.0.0" → "1.0.1") */ export declare function incrementPatchVersion(version: string): string; /** * Load content service URL from manifest (if exists) or fallback to config * Prioritizes manifest value since it represents what was used during deployment */ export declare function loadContentUrl(manifestPath: string | undefined, fallbackUrl: string): Promise; /** * Display file size summary table */ export declare function displaySummary(inscriptions: InscribedFile[], totalSize: number): void; /** * Detect available build directories and prompt user to select one */ export declare function promptForBuildDir(previousBuildDir?: string): Promise; /** * Validate version doesn't already exist in manifest */ export declare function checkVersionInManifest(version: string, manifestPath?: string): Promise<{ exists: boolean; availableVersions: string[]; suggestion: string; }>; /** * Get the last version from manifest and increment patch version */ export declare function getLastVersionAndSuggestNext(manifestPath: string): Promise; /** * Prompt for version tag with validation */ export declare function promptForVersion(isFirstDeployment: boolean, manifestPath?: string): Promise; /** * Save deployment configuration to .env file * Merges with existing .env content to preserve user variables */ export declare function saveDeploymentEnv(config: { paymentKey: string; buildDir: string; appName: string; versioningOriginInscription: string; htmlOriginInscription?: string; ordinalContentUrl: string; satsPerKb: number; }): Promise; export declare class ProgressLogger { private state; private dynamicLineCount; constructor(); /** * Initialize progress tracking */ start(totalSteps: number): void; /** * Update current operation and optionally increment progress */ update(operation: string, incrementStep?: boolean): void; /** * Set a status line that appears above the progress bar (replaces previous) */ setStatus(status: string): void; /** * Add a status line that appears above the progress bar */ addStatus(status: string): void; /** * Complete a step and update display */ completeStep(operation: string): void; /** * Finish progress tracking and clear dynamic display */ finish(): void; /** * Clear dynamic content (status lines + progress bar) */ private clearDynamic; /** * Render dynamic status + progress bar */ private render; /** * Get current progress percentage */ getProgress(): number; } export declare const progressLogger: ProgressLogger; //# sourceMappingURL=utils.d.ts.map