Commit a050eae
chore(pds): extract invalidRecordError helper in repo.ts (#17)
* feat(pds): load official Bluesky lexicon schemas for validation
Replaces empty validator with actual schema validation using official
Bluesky lexicon JSON files vendored from the atproto repository.
Changes:
- Added update-lexicons.sh script to fetch official schemas from GitHub
- Vendored 16 lexicon schemas (core, feed, actor, graph, richtext, embed)
- Updated validation.ts to load all schemas with proper dependencies
- Added 11 Bluesky-specific validation tests (all passing)
- Tree-shakeable: only JSON files imported, no large dependencies
Schemas loaded:
- Core: com.atproto.repo.strongRef, com.atproto.label.defs
- Feed: app.bsky.feed.{post, like, repost, threadgate}
- Actor: app.bsky.actor.profile
- Graph: app.bsky.graph.{follow, block, list, listitem}
- Richtext: app.bsky.richtext.facet
- Embed: app.bsky.embed.{images, external, record, recordWithMedia}
All 19 tests passing (8 validation tests + 11 Bluesky tests).
* chore(pds): typing improvements and dependency cleanup
- Use LexiconDoc type instead of any in validation.ts
- Add vite/client types to tsconfig for import.meta.glob
- Format firehose test and add proper sequencer typing
- Remove unused echo from update-lexicons script
- Remove unused dependencies from lockfile
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* refactor(pds): extract invalidRecordError helper in repo.ts
Reduces duplication for InvalidRecord error responses across
createRecord, putRecord, and applyWrites endpoints.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude <noreply@anthropic.com>1 parent 1e271f0 commit a050eae
1 file changed
Lines changed: 18 additions & 22 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
6 | 21 | | |
7 | 22 | | |
8 | 23 | | |
| |||
211 | 226 | | |
212 | 227 | | |
213 | 228 | | |
214 | | - | |
215 | | - | |
216 | | - | |
217 | | - | |
218 | | - | |
219 | | - | |
220 | | - | |
| 229 | + | |
221 | 230 | | |
222 | 231 | | |
223 | 232 | | |
| |||
298 | 307 | | |
299 | 308 | | |
300 | 309 | | |
301 | | - | |
302 | | - | |
303 | | - | |
304 | | - | |
305 | | - | |
306 | | - | |
307 | | - | |
| 310 | + | |
308 | 311 | | |
309 | 312 | | |
310 | 313 | | |
| |||
368 | 371 | | |
369 | 372 | | |
370 | 373 | | |
371 | | - | |
372 | | - | |
373 | | - | |
374 | | - | |
375 | | - | |
376 | | - | |
377 | | - | |
| 374 | + | |
378 | 375 | | |
379 | 376 | | |
380 | | - | |
381 | 377 | | |
382 | 378 | | |
383 | 379 | | |
| |||
0 commit comments