UNPKG

@entro314labs/ai-changelog-generator

Version:

AI-powered changelog generator with MCP server support - works with most providers, online and local models

102 lines (101 loc) 2.98 kB
/** * Environment Variable Storage Backend * * Handles credentials from: * 1. Workspace .env files (highest priority) * 2. Global .env files (medium priority) * 3. System environment variables (lowest priority) */ import { BaseStorage } from './base-storage.js'; export declare class EnvStorage extends BaseStorage { [key: string]: any; constructor(options?: Record<string, any>); /** * Get all .env file paths in priority order * @private * @returns {string[]} */ _getEnvFilePaths(): any[]; /** * Parse .env file content * @private * @param {string} content - File content * @returns {Object<string, string>} */ _parseEnvFile(content: any): Record<string, any>; /** * Load all environment variables from all sources * @private * @returns {Object<string, {value: string, source: string}>} */ _loadAllEnvVars(): any; /** * Invalidate cache (call after writing .env files) * @private */ _invalidateCache(): void; /** * Get credential for a provider * @param {string} provider - Provider name * @returns {Promise<string|null>} */ get(provider: any): Promise<any>; /** * Set credential for a provider (writes to workspace .env.local) * @param {string} provider - Provider name * @param {string} credential - Credential value * @param {Object} metadata - Additional metadata * @returns {Promise<void>} */ set(provider: any, credential: any, _metadata?: Record<string, any>): Promise<void>; _writeEnvValues(values: Record<string, string | undefined>): Promise<void>; /** * Delete credential for a provider (removes from workspace .env.local) * @param {string} provider - Provider name * @returns {Promise<boolean>} */ delete(provider: any): Promise<boolean>; /** * List all providers with credentials * @returns {Promise<string[]>} */ list(): Promise<any[]>; /** * Get metadata for a credential * @param {string} provider - Provider name * @returns {Promise<Object|null>} */ getMetadata(provider: any): Promise<{ source: any; filePath: any; envKeys: string[]; envKey?: undefined; } | { envKeys?: undefined; source: any; filePath: any; envKey: any; } | null>; /** * Get all configuration for a provider (including additional config keys) * @param {string} provider - Provider name * @returns {Promise<Object>} */ getConfig(provider: any): Promise<Record<string, any>>; /** * Get storage type identifier * @returns {string} */ getType(): string; /** * Get human-readable storage name * @returns {string} */ getName(): string; /** * Get priority for this storage type * @returns {number} */ getPriority(): number; } export default EnvStorage;