UNPKG

cfn-forge

Version:

CloudFormation deployment automation tool with git-based workflows

98 lines (86 loc) 2.07 kB
/** * File Watcher Interface * Defines the contract for file system watching to ensure portability */ class IFileWatcher { /** * Start watching for file changes * @param {string|string[]} paths - Paths to watch * @param {Object} options - Watch options * @returns {Promise<void>} */ async start(paths, options = {}) { throw new Error('Not implemented'); } /** * Stop watching for file changes * @returns {Promise<void>} */ async stop() { throw new Error('Not implemented'); } /** * Add a path to watch * @param {string} path - Path to add * @returns {Promise<void>} */ async addPath(path) { throw new Error('Not implemented'); } /** * Remove a path from watching * @param {string} path - Path to remove * @returns {Promise<void>} */ async removePath(path) { throw new Error('Not implemented'); } /** * Register an event handler * @param {string} event - Event name (change, add, unlink, etc.) * @param {Function} handler - Event handler function * @returns {void} */ on(event, handler) { throw new Error('Not implemented'); } /** * Remove an event handler * @param {string} event - Event name * @param {Function} handler - Event handler function * @returns {void} */ off(event, handler) { throw new Error('Not implemented'); } /** * Get list of watched paths * @returns {string[]} Array of watched paths */ getWatchedPaths() { throw new Error('Not implemented'); } /** * Check if watcher is active * @returns {boolean} True if watching */ isWatching() { throw new Error('Not implemented'); } /** * Set ignore patterns * @param {string[]} patterns - Glob patterns to ignore * @returns {void} */ setIgnorePatterns(patterns) { throw new Error('Not implemented'); } /** * Get current ignore patterns * @returns {string[]} Array of ignore patterns */ getIgnorePatterns() { throw new Error('Not implemented'); } } module.exports = IFileWatcher;