(event: string, data: unknown)
| 4216 | this.migrationState = createInitialMigrationState(); |
| 4217 | |
| 4218 | const send = (event: string, data: unknown) => { |
| 4219 | if (event === "item") { |
| 4220 | const d = data as any; |
| 4221 | applyMigrationItemToState(this.migrationState, d); |
| 4222 | } else if (event === "phase") { |
| 4223 | this.migrationState.phase = (data as any).phase; |
| 4224 | } else if (event === "progress") { |
| 4225 | this.migrationState.total = (data as any).total ?? this.migrationState.total; |
| 4226 | } |
| 4227 | this.broadcastSSE(event, data); |
| 4228 | }; |
| 4229 | |
| 4230 | this.migrationRunning = true; |
| 4231 | this.runMigration(send, opts.sources, concurrency).finally(() => { |
nothing calls this directly
no test coverage detected