FujoWebDev / FujoWebDev/fujocoded-plugins

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

Ouverte
#37 0 commentaires 0 réactions 0 personnes assignées Voir sur GitHub
astro-atproto-loader
Langage dominant
TypeScript
Étoiles
30
Forks
7
Métriques de merge des PR
Aucune PR mergée en 30 j

Description

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.

Guide de contribution

Aucun guide de contribution indexé pour ce dépôt

Piste de recherche

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.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Évaluation

Stack technique
typescript
Domaine
backend
Type d'issue
Fonctionnalité
Difficulté
3/5
Temps estimé
1-2 jours
Activité
Calme
Clarté
Plutôt claire
Accessibilité débutants
65/100

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.