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.

chore: bump version

Mary 2b9f692c 074a818b

+128 -132
-20
.changeset/bumpy-maps-care.md
··· 1 - --- 2 - '@atcute/car': minor 3 - --- 4 - 5 - adds `RepoReader.repoEntryTransform` and `CarReader.carEntryTransform` functions for conveniently 6 - piping a readable stream into archive entries. 7 - 8 - ```ts 9 - import { RepoReader } from '@atcute/car/v4'; 10 - 11 - const response = await fetch('https://example.com/xrpc/com.atproto.sync.getRepo?did=...'); 12 - 13 - const entries = response.body!.pipeThrough(RepoReader.repoEntryTransform()); 14 - for await (const entry of entries) { 15 - entry; 16 - // ^? RepoEntry { ... } 17 - } 18 - ``` 19 - 20 - thanks [@nperez0111](https://github.com/nperez0111) for this contribution!
-39
.changeset/few-kings-lose.md
··· 1 - --- 2 - '@atcute/car': minor 3 - --- 4 - 5 - add streaming support for `CarReader` and `RepoReader`, which should allow for efficient reading of 6 - CAR archives. 7 - 8 - ```ts 9 - import { CarReader, RepoReader } from '@atcute/car/v4'; 10 - 11 - // read AT Protocol repository exports 12 - { 13 - await using repo = RepoReader.fromStream(stream); 14 - 15 - for await (const entry of repo) { 16 - entry; 17 - // ^? RepoEntry { collection: 'app.bsky.feed.post', rkey: '3lprcc55bb222', ... } 18 - } 19 - 20 - repo.missingBlocks; 21 - // ^? [] 22 - } 23 - 24 - // read generic CAR archives 25 - { 26 - await using car = CarReader.fromStream(stream); 27 - 28 - const roots = await car.roots(); 29 - 30 - for await (const entry of car) { 31 - entry; 32 - // ^? CarEntry { cid: CidLink {}, bytes: Uint8Array {}, ... } 33 - } 34 - } 35 - ``` 36 - 37 - please note that the reference PDS implementation does not yet support the Sync v1.1 proposal, which 38 - would enable more efficient streaming. additionally, some PDSes may send valid but heavily 39 - out-of-order archives that could impact streaming performance.
-9
.changeset/hip-zoos-smile.md
··· 1 - --- 2 - '@atcute/identity-resolver': minor 3 - --- 4 - 5 - XRPC-based DID document resolver (`XrpcDidDocumentResolver`) 6 - 7 - worth noting that the reference PDS implementation hasn't implemented 8 - `com.atproto.identity.resolveDid` yet so this is currently only useful when you have an XRPC server 9 - implementing this procedure.
-62
.changeset/silver-waves-grow.md
··· 1 - --- 2 - '@atcute/car': minor 3 - --- 4 - 5 - reorganized the exported functions, the new exports should be inline with other utility packages 6 - from atcute. 7 - 8 - normally this would be considered a breaking change, but because the change doesn't exactly change 9 - any of the API, I've decided to turn this into a minor change. 10 - 11 - to migrate, you'd need to change your imports from `@atcute/car` to `@atcute/car/v4` subpath. 12 - 13 - ```ts 14 - // before (v3) 15 - import { readCar, iterateAtpRepo } from '@atcute/car'; 16 - 17 - // read AT Protocol repository exports 18 - for (const entry of iterateAtpRepo(buffer)) { 19 - entry; 20 - // ^? RepoEntry { ... } 21 - } 22 - 23 - // read generic CAR archives 24 - { 25 - const car = readCar(buffer); 26 - const header = car.header; 27 - 28 - for (const entry of car.iterate()) { 29 - entry; 30 - // ^? CarEntry { ... } 31 - } 32 - } 33 - ``` 34 - 35 - ```ts 36 - // after (v4) 37 - import { CarReader, RepoReader } from '@atcute/car/v4'; 38 - 39 - // alternatively 40 - import * as CarReader from '@atcute/car/v4/car-reader'; 41 - import * as RepoReader from '@atcute/car/v4/repo-reader'; 42 - 43 - // read AT Protocol repository exports 44 - { 45 - for (const entry of RepoReader.fromUint8Array(buffer)) { 46 - entry; 47 - // ^? RepoEntry { ... } 48 - } 49 - } 50 - 51 - // read generic CAR archives 52 - { 53 - const car = CarReader.fromUint8Array(buffer); 54 - const header = car.header; 55 - 56 - // use for..of on `car` directly, `.iterate()` is deprecated 57 - for (const entry of car) { 58 - entry; 59 - // ^? CarEntry { ... } 60 - } 61 - } 62 - ```
+10
packages/identity/identity-resolver/CHANGELOG.md
··· 1 1 # @atcute/identity-resolver 2 2 3 + ## 1.1.0 4 + 5 + ### Minor Changes 6 + 7 + - 95e4cc1: XRPC-based DID document resolver (`XrpcDidDocumentResolver`) 8 + 9 + worth noting that the reference PDS implementation hasn't implemented 10 + `com.atproto.identity.resolveDid` yet so this is currently only useful when you have an XRPC 11 + server implementing this procedure. 12 + 3 13 ## 1.0.2 4 14 5 15 ### Patch Changes
+1 -1
packages/identity/identity-resolver/package.json
··· 1 1 { 2 2 "type": "module", 3 3 "name": "@atcute/identity-resolver", 4 - "version": "1.0.2", 4 + "version": "1.1.0", 5 5 "description": "atproto handle and DID document resolution", 6 6 "keywords": [ 7 7 "atproto",
+116
packages/utilities/car/CHANGELOG.md
··· 1 1 # @atcute/car 2 2 3 + ## 3.1.0 4 + 5 + ### Minor Changes 6 + 7 + - 7324d11: reorganized the exported functions, the new exports should be inline with other utility 8 + packages from atcute. 9 + 10 + normally this would be considered a breaking change, but because the change doesn't exactly change 11 + any of the API, I've decided to turn this into a minor change. 12 + 13 + to migrate, you'd need to change your imports from `@atcute/car` to `@atcute/car/v4` subpath. 14 + 15 + ```ts 16 + // before (v3) 17 + import { readCar, iterateAtpRepo } from '@atcute/car'; 18 + 19 + // read AT Protocol repository exports 20 + for (const entry of iterateAtpRepo(buffer)) { 21 + entry; 22 + // ^? RepoEntry { ... } 23 + } 24 + 25 + // read generic CAR archives 26 + { 27 + const car = readCar(buffer); 28 + const header = car.header; 29 + 30 + for (const entry of car.iterate()) { 31 + entry; 32 + // ^? CarEntry { ... } 33 + } 34 + } 35 + ``` 36 + 37 + ```ts 38 + // after (v4) 39 + import { CarReader, RepoReader } from '@atcute/car/v4'; 40 + 41 + // alternatively 42 + import * as CarReader from '@atcute/car/v4/car-reader'; 43 + import * as RepoReader from '@atcute/car/v4/repo-reader'; 44 + 45 + // read AT Protocol repository exports 46 + { 47 + for (const entry of RepoReader.fromUint8Array(buffer)) { 48 + entry; 49 + // ^? RepoEntry { ... } 50 + } 51 + } 52 + 53 + // read generic CAR archives 54 + { 55 + const car = CarReader.fromUint8Array(buffer); 56 + const header = car.header; 57 + 58 + // use for..of on `car` directly, `.iterate()` is deprecated 59 + for (const entry of car) { 60 + entry; 61 + // ^? CarEntry { ... } 62 + } 63 + } 64 + ``` 65 + 66 + - 150edc2: add streaming support for `CarReader` and `RepoReader`, which should allow for efficient 67 + reading of CAR archives. 68 + 69 + ```ts 70 + import { CarReader, RepoReader } from '@atcute/car/v4'; 71 + 72 + // read AT Protocol repository exports 73 + { 74 + await using repo = RepoReader.fromStream(stream); 75 + 76 + for await (const entry of repo) { 77 + entry; 78 + // ^? RepoEntry { collection: 'app.bsky.feed.post', rkey: '3lprcc55bb222', ... } 79 + } 80 + 81 + repo.missingBlocks; 82 + // ^? [] 83 + } 84 + 85 + // read generic CAR archives 86 + { 87 + await using car = CarReader.fromStream(stream); 88 + 89 + const roots = await car.roots(); 90 + 91 + for await (const entry of car) { 92 + entry; 93 + // ^? CarEntry { cid: CidLink {}, bytes: Uint8Array {}, ... } 94 + } 95 + } 96 + ``` 97 + 98 + please note that the reference PDS implementation does not yet support the Sync v1.1 proposal, 99 + which would enable more efficient streaming. additionally, some PDSes may send valid but heavily 100 + out-of-order archives that could impact streaming performance. 101 + 102 + - 074a818: adds `RepoReader.repoEntryTransform` and `CarReader.carEntryTransform` functions for 103 + conveniently piping a readable stream into archive entries. 104 + 105 + ```ts 106 + import { RepoReader } from '@atcute/car/v4'; 107 + 108 + const response = await fetch('https://example.com/xrpc/com.atproto.sync.getRepo?did=...'); 109 + 110 + const entries = response.body!.pipeThrough(RepoReader.repoEntryTransform()); 111 + for await (const entry of entries) { 112 + entry; 113 + // ^? RepoEntry { ... } 114 + } 115 + ``` 116 + 117 + thanks [@nperez0111](https://github.com/nperez0111) for this contribution! 118 + 3 119 ## 3.0.5 4 120 5 121 ### Patch Changes
+1 -1
packages/utilities/car/package.json
··· 1 1 { 2 2 "type": "module", 3 3 "name": "@atcute/car", 4 - "version": "3.0.5", 4 + "version": "3.1.0", 5 5 "description": "lightweight DASL CAR and atproto repository decoder for AT Protocol.", 6 6 "keywords": [ 7 7 "atproto",