UNPKG

@boundless-oss/atlas

Version:

Atlas - MCP Server for comprehensive startup project management

54 lines 1.65 kB
let io = null; export function setSocketIOInstance(socketIO) { io = socketIO; } export function emitDatabaseChange(event, data) { if (!io) { console.warn('Socket.IO instance not set, skipping event emission'); return; } io.emit(event, { ...data, timestamp: new Date().toISOString() }); console.error(`📡 Emitted database change event: ${event}`); } // Agile events export function emitSprintCreated(sprint) { emitDatabaseChange('sprint_created', { sprint }); } export function emitSprintUpdated(sprintId, updates) { emitDatabaseChange('sprint_updated', { sprintId, updates }); } export function emitStoryCreated(story) { emitDatabaseChange('story_created', { story }); } export function emitStoryUpdated(storyId, updates) { emitDatabaseChange('story_updated', { storyId, updates }); } export function emitStoryMoved(storyId, fromStatus, toStatus) { emitDatabaseChange('story_moved', { storyId, fromColumn: fromStatus, toColumn: toStatus }); } export function emitEpicCreated(epic) { emitDatabaseChange('epic_created', { epic }); } export function emitEpicUpdated(epicId, updates) { emitDatabaseChange('epic_updated', { epicId, updates }); } // Performance events export function emitPerformanceUpdate(metrics) { emitDatabaseChange('performance_update', { metrics }); } // Security events export function emitSecurityUpdate(data) { emitDatabaseChange('security_update', data); } // Error events export function emitErrorUpdate(data) { emitDatabaseChange('errors_update', data); } //# sourceMappingURL=database-events.js.map