···11-name: Test
22-33-on:
44- push:
55- branches: [ main ]
66- pull_request:
77- branches: [ main ]
88-99-jobs:
1010- test:
1111- runs-on: ubuntu-latest
1212-1313- strategy:
1414- matrix:
1515- node-version: [18.x, 20.x]
1616-1717- steps:
1818- - uses: actions/checkout@v3
1919-2020- - name: Use Node.js ${{ matrix.node-version }}
2121- uses: actions/setup-node@v3
2222- with:
2323- node-version: ${{ matrix.node-version }}
2424-2525- - name: Install dependencies
2626- run: npm ci
2727-2828- - name: Build emitter
2929- run: npm run build -w @typelex/emitter
3030-3131- - name: Run tests
3232- run: npm test -w @typelex/emitter
3333-3434- - name: Test example project
3535- run: |
3636- cd typelex-example
3737- npm link @typelex/emitter
3838- npm run build
3939- # Verify output exists
4040- test -f lexicons/app/example/post.json
+1-1
.husky/pre-commit
···22. "$(dirname -- "$0")/_/husky.sh"
3344# Run tests before commit
55-npm run test -w @typelex/emitter55+npm run test -w @typlex/emitter
-60
CONTRIBUTING.md
···11-# Contributing to TypeLex
22-33-Thank you for your interest in contributing to TypeLex!
44-55-## Development Setup
66-77-1. Fork and clone the repository
88-2. Install dependencies:
99- ```bash
1010- npm install
1111- ```
1212-1313-3. Build the emitter:
1414- ```bash
1515- cd typelex-emitter
1616- npm run build
1717- npm link
1818- ```
1919-2020-4. Test your changes:
2121- ```bash
2222- cd ../typelex-example
2323- npm link @typelex/emitter
2424- npm run build
2525- ```
2626-2727-## Project Structure
2828-2929-- `typelex-emitter/` - The TypeSpec emitter implementation
3030- - `src/` - Source code
3131- - `test/` - Tests (needs work!)
3232-- `typelex-example/` - Example usage of TypeLex
3333-3434-## Making Changes
3535-3636-1. Create a feature branch
3737-2. Make your changes
3838-3. Test with the example project
3939-4. Submit a pull request
4040-4141-## Areas for Contribution
4242-4343-- [ ] Add support for XRPC queries and procedures
4444-- [ ] Add support for subscriptions
4545-- [ ] Implement union types
4646-- [ ] Add ATProto-specific decorators (@maxGraphemes, etc.)
4747-- [ ] Improve test coverage
4848-- [ ] Add more examples
4949-- [ ] Documentation improvements
5050-5151-## Code Style
5252-5353-- Use TypeScript
5454-- Follow existing patterns in the codebase
5555-- Add comments for complex logic
5656-- Update tests when adding features
5757-5858-## Questions?
5959-6060-Feel free to open an issue for discussion!
+1-1
LICENSE
···11MIT License
2233-Copyright (c) 2024 TypeLex Contributors
33+Copyright (c) 2024 typlex Contributors
4455Permission is hereby granted, free of charge, to any person obtaining a copy
66of this software and associated documentation files (the "Software"), to deal
+5-5
README.md
···11-# TypeLex
11+# typlex
2233> TypeSpec-based IDL for ATProto Lexicons
4455-TypeLex allows you to define [ATProto](https://atproto.com) lexicons using [TypeSpec](https://typespec.io), providing type safety, better tooling, and a more ergonomic syntax compared to writing raw JSON.
55+typlex allows you to define [ATProto](https://atproto.com) lexicons using [TypeSpec](https://typespec.io), providing type safety, better tooling, and a more ergonomic syntax compared to writing raw JSON.
6677## Features
88···1717# Install TypeSpec compiler
1818npm install -g @typespec/compiler
19192020-# Install TypeLex emitter
2020+# Install typlex emitter
2121npm install --save-dev @typelex/emitter
2222```
2323···57575858## Output
59596060-TypeLex generates standard ATProto lexicon files:
6060+typlex generates standard ATProto lexicon files:
61616262```json
6363{
···120120121121## Current Status
122122123123-⚠️ **Early Development** - TypeLex currently supports basic record types. Support for queries, procedures, and subscriptions is coming soon.
123123+⚠️ **Early Development** - typlex currently supports basic record types. Support for queries, procedures, and subscriptions is coming soon.
124124125125### Supported
126126