(progress: TypedBuilderProgress, context: BuilderContext)
| 59 | logChannel.next(entry); |
| 60 | } |
| 61 | function progress(progress: TypedBuilderProgress, context: BuilderContext) { |
| 62 | currentState = progress.state; |
| 63 | if (progress.state === BuilderProgressState.Running) { |
| 64 | current = progress.current; |
| 65 | total = progress.total !== undefined ? progress.total : total; |
| 66 | |
| 67 | if (progress.status === undefined) { |
| 68 | progress.status = status; |
| 69 | } else { |
| 70 | status = progress.status; |
| 71 | } |
| 72 | } |
| 73 | |
| 74 | progressChannel.next({ |
| 75 | ...(progress as json.JsonObject), |
| 76 | ...(context.target && { target: context.target }), |
| 77 | ...(context.builder && { builder: context.builder }), |
| 78 | id: context.id, |
| 79 | }); |
| 80 | } |
| 81 | |
| 82 | return new Observable<OutT>((observer) => { |
| 83 | const subscriptions: Subscription[] = []; |
no test coverage detected