Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lexicon generated files #13

Open
devsnek opened this issue May 13, 2023 · 3 comments
Open

lexicon generated files #13

devsnek opened this issue May 13, 2023 · 3 comments

Comments

@devsnek
Copy link

devsnek commented May 13, 2023

it would be nice if the generated lexicon files were a separate package. copying them from this repo or from the atproto repo is pretty hacky, and after that you still need to run tsc on them.

@dholms
Copy link
Contributor

dholms commented May 15, 2023

yeah agreed

@DrewMcArthur
Copy link

DrewMcArthur commented May 21, 2023

i had the same idea with https://github.com/DrewMcArthur/atproto-lexicon-ts, see if that's helpful @dholms @devsnek

@DrewMcArthur
Copy link

DrewMcArthur commented May 21, 2023

although, the generated files in this repo are not the same as what's generated by the current atproto repo's lexicon, not sure if this is a branch ahead or what the deal is there. could also yarn add --dev https://github.com/bluesky-social/feed-generator.git and import types from there if you wanna make your own repo based on the types here, without generating yourself.

edit: i take that back, it doesn't work bc this repo isn't setup to export types or anything, so i get this error when trying to run this repo

drewmca@drew-mbp embedding-firehose % yarn start                    
yarn run v1.22.19
$ ts-node src/index.ts
./embedding-firehose/node_modules/feed-generator/src/lexicon/types/com/atproto/sync/subscribeRepos.ts:4
import { ValidationResult, BlobRef } from '@atproto/lexicon'
^^^^^^

SyntaxError: Cannot use import statement outside a module
    at internalCompileFunction (node:internal/vm:73:18)
    at wrapSafe (node:internal/modules/cjs/loader:1176:20)
    at Module._compile (node:internal/modules/cjs/loader:1218:27)
    at Module._extensions..js (node:internal/modules/cjs/loader:1308:10)
    at Object.require.extensions.<computed> [as .ts] (./embedding-firehose/node_modules/ts-node/src/index.ts:1608:43)
    at Module.load (node:internal/modules/cjs/loader:1117:32)
    at Function.Module._load (node:internal/modules/cjs/loader:958:12)
    at Module.require (node:internal/modules/cjs/loader:1141:19)
    at require (node:internal/modules/cjs/helpers:110:18)
    at Object.<anonymous> (./embedding-firehose/src/embedded-firehose-server.ts:1:1)
error Command failed with exit code 1.

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

No branches or pull requests

3 participants