feat: add peerDependencies

This commit is contained in:
2025-07-07 13:11:16 +02:00
parent 2093dd7097
commit dd1570d52e
36 changed files with 481 additions and 274 deletions

View File

@@ -70,7 +70,10 @@ export class MongoEventsProvider implements EventsProvider {
* @param options - Read options for modifying the result.
*/
async getByStreams(streams: string[], options: EventReadOptions = {}): Promise<EventRecord[]> {
return (await this.#withReadOptions(this.collection.find({ stream: { $in: streams }, ...this.#withFilters(options) }), options)
return (await this.#withReadOptions(
this.collection.find({ stream: { $in: streams }, ...this.#withFilters(options) }),
options,
)
.sort({ created: 1 })
.toArray()
.then(toParsedRecords(schema))) as EventRecord[];