Shared lexicon schemas for long-form publishing on AT Protocol. Uses typescript to json via prototypey.

site.standard.document: tags maxGraphemes and maxLength should be inside items #9

closed opened by snarfed.org edited

Hi all! First off, congrats on launching standard.site! I'm excited to see it come together, and to start working with it.

I noticed a possible bug in site.standard.document, at least in the current published version. tags has maxGraphemes and maxLength at its top level, but it looks like they're supposed to apply to the elements, so I think they should go inside items instead. See tags in app.bsky.feed.post as an example.

I tried to put a PR together to fix this, but I'm currently getting this error from bun x prototypey gen-emit ./out ./src/lexicons/**/*.ts, and I'm not familiar enough with this toolchain to debug it.

Found 5 source file(s)
  ✓ site.standard.document -> site.standard.document.json
  ✓ site.standard.graph.subscription -> site.standard.graph.subscription.json
  ✗ Error processing /Users/ryan/src/standard-site-lexicons/src/lexicons/site.standard.publication.ts: TypeError: Cannot use 'in' operator to search for 'required' in Platform-specific preferences for the publication, including discovery and visibility settings.
    at file:///Users/ryan/src/standard-site-lexicons/node_modules/prototypey/lib/core/lib.js:108:68
    at Array.filter (<anonymous>)
    at Object.object (file:///Users/ryan/src/standard-site-lexicons/node_modules/prototypey/lib/core/lib.js:108:41)
    at file:///Users/ryan/src/standard-site-lexicons/src/lexicons/site.standard.publication.ts:40:21
    at ModuleJob.run (node:internal/modules/esm/module_job:371:25)
    at async onImport.tracePromise.__proto__ (node:internal/modules/esm/loader:683:26)
    at async processSourceFile (file:///Users/ryan/src/standard-site-lexicons/node_modules/prototypey/lib/cli/gen-emit.js:29:18)
    at async genEmit (file:///Users/ryan/src/standard-site-lexicons/node_modules/prototypey/lib/cli/gen-emit.js:20:41)
Error emitting lexicon schemas: TypeError: Cannot use 'in' operator to search for 'required' in Platform-specific preferences for the publication, including discovery and visibility settings.
    at file:///Users/ryan/src/standard-site-lexicons/node_modules/prototypey/lib/core/lib.js:108:68
    at Array.filter (<anonymous>)
    at Object.object (file:///Users/ryan/src/standard-site-lexicons/node_modules/prototypey/lib/core/lib.js:108:41)
    at file:///Users/ryan/src/standard-site-lexicons/src/lexicons/site.standard.publication.ts:40:21
    at ModuleJob.run (node:internal/modules/esm/module_job:371:25)
    at async onImport.tracePromise.__proto__ (node:internal/modules/esm/loader:683:26)
    at async processSourceFile (file:///Users/ryan/src/standard-site-lexicons/node_modules/prototypey/lib/cli/gen-emit.js:29:18)
    at async genEmit (file:///Users/ryan/src/standard-site-lexicons/node_modules/prototypey/lib/cli/gen-emit.js:20:41)

cc @quillmatiq.com

Thanks for this !! You’re right, we had it like this but it got mixed up somewhere along the way. Issue has been resolved on the published lexicon, and will be updated in the repo shortly. (Tangled being weird right now)

This should be resolved now, i have republishing the lexicon schema on atproto and changes are now in the repo also: https://tangled.org/standard.site/lexicons/commit/0a449f9644f202ce62ea761bf08b62c18475f284

sign up or login to add to the discussion
Labels

None yet.

assignee

None yet.

Participants 3
AT URI
at://did:plc:fdme4gb7mu7zrie7peay7tst/sh.tangled.repo.issue/3mdz6xdoluo22