Skip to content

Commit 54edfb5

Browse files
Refactor Astro AtProto Loader to ex;lrt defineAtProtoCollection and defineAtProtoLiveCollection
1 parent c9761fd commit 54edfb5

18 files changed

Lines changed: 655 additions & 421 deletions

File tree

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
---
2+
"@fujocoded/astro-atproto-loader": minor
3+
---
4+
5+
Rework the loaders for better ergonomics and typing. Featuring breaking changes!
6+
7+
- `atProtoLiveLoader``defineAtProtoLiveCollection`
8+
- `atProtoStaticLoader``defineAtProtoCollection`
9+
10+
New capabilities:
11+
12+
- Multi-source pipeline: load from several `repo` + `collection` pairs in one collection, with `value` discriminated on `collection` inside `filter`/`transform`.
13+
- Per-source `parseRecord` for `$parse`-style lexicon validation; failures drop the single record without failing the source.
14+
- `groupBy` + grouped `transform` for merging records across sources under a shared key (e.g. post + reposts).
15+
- Shared `fetchRecord` hydrator passed to every callback, with per-cycle request deduping.
16+
- `onSourceError` policy (`'throw' | 'skip' | fn`)
17+
- `limit: number | 'all'` and `maxPages` for explicit pagination control.

0 commit comments

Comments
 (0)