()
| 1453 | |
| 1454 | /** True once the maxItems cap has been reached during this sync run. */ |
| 1455 | const capReached = () => |
| 1456 | maxItems > 0 && ((syncContext?.totalDocsFetched as number) ?? 0) >= maxItems |
| 1457 | |
| 1458 | /** |
| 1459 | * Walks phases starting at `phase`, accumulating documents. Within a phase, |