lex
Val Town is a collaborative website to build and scale JavaScript apps.
Deploy APIs, crons, & store data – all from the browser, and deployed in milliseconds.
Viewing readonly version of main branch: v36View latest version
Fork of @atproto/lex-builder for web-based lexicon resolution.
The official package doesn't export LexDefBuilder (the class that does actual codegen), only the high-level build() function that writes to disk. We need in-memory codegen for serving TypeScript dynamically from a web endpoint.
All modifications are marked with [PATCH: inlay.at] comments.
- Added
export * from './lex-def-builder.ts'to exposeLexDefBuilder
- Added
flatImportsandimportSuffixoptions toRefResolverOptions - Modified
resolveExternal()to generate flat relative imports (./nsid.ts) whenflatImportsis true (original generates path-based imports like../foo/bar.defs.ts)
- Changed imports from
npm:specifiers with pinned versions for Deno/Val Town compatibility - Changed local imports from
.jsto.tsextensions
Source: https://github.com/bluesky-social/atproto/tree/main/packages/lex-builder Version: 0.0.3 (circa Feb 2025)