bluesky-social / feed-generator

ATProto Feed Generator Starter Kit

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

lexicon generated files

devsnek opened this issue · comments

commented

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.

yeah agreed

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

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.