UNPKG

gitset

Version:

Enhanced git init with user configuration management

154 lines 6.52 kB
/** * Application configuration constants */ export declare const APP_CONFIG: { readonly name: "gitset"; readonly version: "1.0.0"; readonly description: "Enhanced git init with user configuration management"; }; /** * CLI behavior configuration */ export declare const CLI_CONFIG: { readonly maxValidationAttempts: 3; readonly defaultDirectory: string; readonly defaultDirectoryPlaceholder: "./my-project"; readonly exitCodes: { readonly success: 0; readonly error: 1; }; }; /** * Validation configuration */ export declare const VALIDATION_CONFIG: { readonly username: { readonly minLength: 2; readonly maxLength: 100; }; readonly email: { readonly required: true; }; readonly directory: { readonly requireWritable: true; readonly requireExists: false; }; }; /** * Git configuration */ export declare const GIT_CONFIG: { readonly commands: { readonly version: readonly ["--version"]; readonly init: readonly ["init"]; readonly configUserName: readonly ["config", "user.name"]; readonly configUserEmail: readonly ["config", "user.email"]; readonly revParse: readonly ["rev-parse", "--git-dir"]; }; readonly timeout: 30000; }; /** * UI Messages */ export declare const MESSAGES: { readonly success: { readonly gitInit: "✅ Successfully initialized git repository in"; readonly gitConfigUpdated: "✅ Successfully updated git configuration in"; readonly configured: "📝 Configured with:"; readonly gitInstalled: "✔ Git installed successfully!"; readonly gitVerified: "✔ Git installation verified!"; }; readonly error: { readonly gitInitFailed: "❌ Failed to initialize git repository"; readonly validationFailed: "❌ Directory validation failed:"; readonly gitRequired: "Git is required to proceed. Exiting..."; readonly maxAttemptsExceeded: "Maximum validation attempts exceeded"; readonly gitInstallFailed: "✖ Git installation failed:"; readonly gitVerificationFailed: "✖ Git installation verification failed"; readonly fatalError: "Fatal error:"; readonly unexpectedError: "❌ An error occurred:"; }; readonly info: { readonly gitNotImplemented: "Git installation not yet implemented"; readonly processing: "Processing..."; }; readonly validation: { readonly usernameRequired: "Username is required"; readonly usernameMinLength: "Username must be at least 2 characters long"; readonly usernameMaxLength: "Username cannot exceed 100 characters"; readonly usernameSpecialChars: "Username contains special characters that might cause issues"; readonly pathNotDirectory: "Path exists but is not a directory"; readonly directoryNotWritable: "Directory is not writable"; readonly directoryNotEmpty: "Directory is not empty - existing files may be affected"; readonly cannotReadDirectory: "Unable to read directory contents"; readonly directoryWillBeCreated: "Directory will be created"; readonly parentDirectoryNotExists: "Parent directory does not exist and cannot be created"; readonly directoryNotExists: "Directory does not exist"; readonly invalidPath: "Invalid path:"; }; readonly prompts: { readonly gitInstall: "🔧 Git is not installed. Would you like to install it automatically?"; readonly directory: "📁 Enter the directory path for git initialization:"; readonly userInfo: "👤 Configure Git user information:"; readonly name: "📝 Enter your name:"; readonly email: "📧 Enter your email:"; readonly confirm: "✅ Proceed with this configuration?"; readonly retry: "❌ {action} failed. Would you like to try again?"; readonly selectMethod: "🔧 Select Git installation method:"; readonly directoryRequired: "Directory path is required"; readonly configSummary: "📋 Configuration Summary:"; readonly gitRepoExists: "📁 Git repository already exists in this directory. Do you want to update the user configuration?"; readonly exitMessage: "👋 Goodbye! Git repository initialization cancelled."; }; readonly welcome: { readonly fallbackTitle: "🚀 GITSET CLI 🚀"; readonly description: "Enhanced git init with user configuration management"; readonly helpTitle: "📋 This tool will help you:"; readonly features: readonly ["✅ Initialize a new Git repository", "✅ Configure your user information correctly", "✅ Avoid commits with wrong account details", "✅ Install Git automatically if needed"]; readonly nextSteps: readonly ["• Add your files: git add .", "• Create initial commit: git commit -m \"Initial commit\"", "• Add remote origin: git remote add origin <url>", "• Push to remote: git push -u origin main"]; }; }; /** * Platform-specific configuration */ export declare const PLATFORM_CONFIG: { readonly supported: readonly ["darwin", "linux", "win32"]; readonly packageManagers: { readonly darwin: readonly ["brew", "xcode-select"]; readonly linux: readonly ["apt", "apt-get", "yum", "dnf", "pacman", "zypper", "apk"]; readonly win32: readonly ["winget", "choco", "scoop"]; }; readonly gitVersionPatterns: { readonly default: RegExp; }; readonly git: { readonly nonRetryableErrors: readonly ["command not found", "permission denied", "no such file or directory", "not a git repository"]; }; }; /** * ASCII Art and styling */ export declare const UI_CONFIG: { readonly figlet: { readonly font: "Standard"; readonly horizontalLayout: "default"; readonly verticalLayout: "default"; readonly width: 80; readonly whitespaceBreak: true; }; readonly colors: { readonly primary: "cyan"; readonly success: "green"; readonly error: "red"; readonly warning: "yellow"; readonly info: "blue"; readonly muted: "gray"; }; }; /** * Type definitions for configuration */ export type Platform = typeof PLATFORM_CONFIG.supported[number]; export type PackageManager = typeof PLATFORM_CONFIG.packageManagers[Platform][number]; export type GitCommand = keyof typeof GIT_CONFIG.commands; //# sourceMappingURL=constants.d.ts.map