Skip to content

Conversation

@skiniks
Copy link
Contributor

@skiniks skiniks commented Dec 1, 2024

This PR adds a script to automatically:

  1. Download the latest lexicons from ATProto's repo
  2. Generate TypeScript types using @atproto/lex-cli

Not ready for merge yet, but sharing for early feedback. Current status:

  • ✅ Downloads latest lexicons from ATProto
  • ✅ Extracts only lexicon files
  • ✅ Generates types using official lex-cli
  • ⏳ Need to decide on additional type enhancements (see @atcute/lex-cli)

Next steps:

  • Evaluate if we want to add branded types (like @atcute/lex-cli)
  • Add CI integration

related to #30

@netlify
Copy link

netlify bot commented Dec 1, 2024

Deploy Preview for tsky canceled.

Name Link
🔨 Latest commit b77f77b
🔍 Latest deploy log https://app.netlify.com/sites/tsky/deploys/67505a7df1fdfc000889ed84

@anbraten anbraten changed the title feat(types): Add lexicon type generation feat(types): add lexicon type generation Dec 2, 2024
@anbraten
Copy link
Contributor

anbraten commented Dec 2, 2024

Just tried your PR and those types look really handy already. One thing I noticed is that it currently is based on @atproto/xrpc. Would it be possible to only export types in this package sth like an object mapping xrpc calls to params and repsonse types, without an underlying api client.

skiniks and others added 2 commits December 2, 2024 14:28
Co-authored-by: Anbraten <6918444+anbraten@users.noreply.github.com>
Copy link
Member

@bdbch bdbch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM - just two comments we could clarify. Cool idea!

@bdbch bdbch added this to the Initial Release milestone Dec 4, 2024
@anbraten anbraten marked this pull request as draft December 4, 2024 15:54
@skiniks
Copy link
Contributor Author

skiniks commented Dec 4, 2024

Closing this PR as its functionality has been superseded by #28 which was just merged.

@skiniks skiniks closed this Dec 4, 2024
@skiniks skiniks deleted the feat/lexicon-type-generation branch December 4, 2024 16:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants