Shows how to get repo export and walk it in TypeScript walktherepo.wisp.place

hmmm

Changed files
+10 -4
src
+10 -4
src/lib/RepoStats.svelte
··· 3 3 import { onMount } from 'svelte'; 4 4 import { Client, simpleFetchHandler } from '@atcute/client'; 5 5 import type {} from '@atcute/atproto'; 6 + import { repoEntryTransform } from '@atcute/repo'; 6 7 7 8 const { did, pdsUrl, slowPokeMode } = $props(); 8 9 ··· 66 67 throw new Error(`HTTP error! status: ${result.status}`); 67 68 } 68 69 69 - let stream = result.data; 70 - const car = fromStream(stream); 70 + const { readable, writable } = repoEntryTransform(); 71 + result.data.pipeTo(writable); 72 + // let stream = result.data; 73 + // const car = fromStream(stream); 71 74 72 75 try { 73 76 //This reads the repo as it is downloaded. which was very cool and I didn't know it would do that 74 - for await (const entry of car) { 77 + for await (const entry of readable) { 75 78 let checkForCollection = collections.find(c => c.collection === entry.collection); 76 79 if (!checkForCollection) { 77 80 collections.push({ collection: entry.collection, count: 1 }); ··· 83 86 } 84 87 } finally { 85 88 stopTimer(); 86 - await car.dispose(); 89 + // await car.dispose(); 87 90 } 88 91 89 92 loading = false; ··· 186 189 {#if slowPokeMode} 187 190 <img alt="A Shellder biting a Slowpoke's tail, as seen in the Pokémon anime " 188 191 src="https://upload.wikimedia.org/wikipedia/en/a/a2/Slowpoke_and_Shellder.jpg"> 192 + <br> 193 + {:else} 194 + <img alt="text in a speech bubble that says 'Dude, wheres my car'" src="https://canvas-lb.tubitv.com/opts/vONU3oa-F26tCQ==/461d4328-59c2-4dcd-9601-fa749fea4b92/CJcDELQBOgUxLjEuOEAB"> 189 195 <br> 190 196 {/if} 191 197