a collection of lightweight TypeScript packages for AT Protocol, the protocol powering Bluesky
atproto bluesky typescript npm
101
fork

Configure Feed

Select the types of activity you want to include in your feed.

refactor(car): don't read unless necessary

Mary c5950aa3 9a4ac027

+7 -2
+7 -2
packages/utilities/car/lib/atproto-repo.ts
··· 25 25 const commit = readObject(blockmap, roots[0]) as Commit; 26 26 for (const { key, cid } of walkEntries(blockmap, commit.data)) { 27 27 const [collection, rkey] = key.split('/'); 28 - const record = readObject(blockmap, cid); 29 28 30 - yield { collection, rkey, record }; 29 + yield { 30 + collection, 31 + rkey, 32 + get record() { 33 + return readObject(blockmap, cid); 34 + }, 35 + }; 31 36 } 32 37 } 33 38