FujoWebDev / FujoWebDev/fujocoded-plugins

Add `afterAll` hook to ATProto loader for post-pipeline collection transforms

Offen
#37 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
astro-atproto-loader
Vorherrschende Sprache
TypeScript
Sterne
30
Forks
7
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

The ATProto loader pipeline currently runs `parseRecord → filter → groupBy → transform` per record (or group of records). This means any operation that needs to see the *whole* collection (e.g. sorting it) has to be written again every time the collection is used, which offends me personally.

Instead, we should add an optional `afterAll` hook to both `defineAtProtoLiveCollection` and `defineAtProtoCollection`.

This would run after all transforms have completed, get an array with all the entries, and return the final shape of the data. Obviously, callers can then do any type of re-ordering of re-filtering they’d like, but at least one could have e.g. a guarantee that their posts are always returned in chronological order.

Beitragsleitfaden

Für dieses Repository ist kein Beitragsleitfaden indexiert

Rechercherichtung

Start at the defineAtProtoLiveCollection and defineAtProtoCollection entry points and trace the parseRecord → filter → groupBy → transform pipeline. Add the optional afterAll behavior so it receives the complete transformed collection and returns the final data shape; done means both loaders support collection-wide ordering or filtering after per-record transforms.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
typescript
Bereich
backend
Issue-Typ
Feature
Schwierigkeit
3/5
Geschätzter Aufwand
1-2 Tage
Aktivitätsstatus
Ruhig
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
65/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.