in super-mode-calculator/src/lib/dynamo.ts [16:28]
export function writeRowsForSuperMode(
rows: QueryRow[],
stage: string,
docClient: DocumentClient,
): Promise<
Array<PromiseResult<DocumentClient.BatchWriteItemOutput, AWSError>>
> {
const batches = buildBatches(rows.map(buildWriteRequestForSuperMode));
return Promise.all(
batches.map((batch) => writeBatchForSuperMode(batch, stage, docClient)),
);
}