manan-data 0.0.0

inventyv tikv datalayer
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
export async function * asyncEventIteratorFromApi(api) {
	// TODO: support multiple runs (watch mode)
	const {value: plan} = await api.events('run').next();

	for await (const stateChange of plan.status.events('stateChange')) {
		yield stateChange;

		if (stateChange.type === 'end' || stateChange.type === 'interrupt') {
			break;
		}
	}
}