UNPKG

@phroun/paged-buffer

Version:

High-performance buffer system for editing massive files with intelligent memory management and undo/redo capabilities

68 lines 3.12 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.BufferNotification = exports.NotificationType = void 0; /** * Notification types for buffer events */ var NotificationType; (function (NotificationType) { // File system events NotificationType["FILE_MODIFIED_ON_DISK"] = "file_modified_on_disk"; NotificationType["FILE_SIZE_CHANGED"] = "file_size_changed"; NotificationType["FILE_DELETED"] = "file_deleted"; // Save operations NotificationType["SAVE_SKIPPED"] = "save_skipped"; NotificationType["ATOMIC_SAVE_STARTED"] = "atomic_save_started"; NotificationType["SAVE_COMPLETED"] = "save_completed"; NotificationType["SAVE_METADATA_UPDATE_FAILED"] = "save_metadata_update_failed"; NotificationType["TEMP_CLEANUP"] = "temp_cleanup"; NotificationType["TEMP_CLEANUP_FAILED"] = "temp_cleanup_failed"; // Data integrity NotificationType["PARTIAL_DATA_DETECTED"] = "partial_data_detected"; NotificationType["EMERGENCY_MISSING_DATA"] = "emergency_missing_data"; // Page operations NotificationType["PAGE_SPLIT"] = "page_split"; NotificationType["PAGE_EVICTED"] = "page_evicted"; // Page conflicts NotificationType["PAGE_CONFLICT_DETECTED"] = "page_conflict_detected"; NotificationType["PAGE_REBASE_SUCCESS"] = "page_rebase_success"; NotificationType["PAGE_REBASE_FAILED"] = "page_rebase_failed"; // Buffer state changes NotificationType["BUFFER_DETACHED"] = "buffer_detached"; NotificationType["MEMORY_PRESSURE"] = "memory_pressure"; NotificationType["STORAGE_ERROR"] = "storage_error"; // Performance warnings NotificationType["LARGE_OPERATION"] = "large_operation"; NotificationType["SLOW_STORAGE"] = "slow_storage"; // Undo system events NotificationType["UNDO_TRANSACTION_STARTED"] = "undo_transaction_started"; NotificationType["UNDO_TRANSACTION_COMMITTED"] = "undo_transaction_committed"; NotificationType["UNDO_TRANSACTION_ROLLED_BACK"] = "undo_transaction_rolled_back"; NotificationType["UNDO_OPERATION_MERGED"] = "undo_operation_merged"; NotificationType["UNDO_OPERATION_RECORDED"] = "undo_operation_recorded"; NotificationType["UNDO_APPLIED"] = "undo_applied"; NotificationType["UNDO_FAILED"] = "undo_failed"; NotificationType["REDO_APPLIED"] = "redo_applied"; NotificationType["REDO_FAILED"] = "redo_failed"; })(NotificationType || (exports.NotificationType = NotificationType = {})); /** * Notification for buffer events */ class BufferNotification { /** * Create a buffer notification * @param type - Notification type from NotificationType enum * @param severity - Severity level * @param message - Human-readable message * @param metadata - Additional notification data */ constructor(type, severity, message, metadata = {}) { this.type = type; this.severity = severity; this.message = message; this.metadata = metadata; this.timestamp = new Date(); } } exports.BufferNotification = BufferNotification; //# sourceMappingURL=notifications.js.map