INNER CODE UNIT · TypeScript
sendBatchProgress
SimonAKing/scrcpy-gui · src/main/main.ts:294
function sendBatchProgress(progress: BatchProgressEvent): void {
if (mainWindow && !mainWindow.isDestroyed()) mainWindow.webContents.send('batch:progress', progress)
eventStore.publish({
level: progress.status === 'failed' ? 'error' : progress.status === 'running' ? 'debug' : 'info',
domain: 'artifact',
action: progress.kind,
deviceId: progress.deviceId,
stage: progress.status,
message: progress.message,
data: { batchId: progress.batchId, targetId: progress.targetId, size: progress.size }
})
}
async function captureIndexedScreenshot(
runtime: RuntimeConfig,
serial: string,
label?: string
): Promise<{ message: string; artifactId?: string }> {