Extract vocab from @fedify/fedify into @fedify/vocab
Summary
Currently all the vocabulary lives in the following:
import * as vocab from "@fedify/fedify/vocab";
// or
import { Object as ASObject } from "@fedify/fedify";
To support reusing and perhaps more easily extending the vocabs (#207), we should probably extract the vocab code to two packages:
@fedify/vocabwhich includes all of@fedify/fedify/vocab@fedify/vocab-toolswhich has the codegen for vocabs and supports compiling the yaml files to a vocab package.
i.e., GENPATH=vocab-$(deno eval \"console.log(crypto.randomUUID());\").ts && deno run --allow-read --allow-write --check src/codegen/main.ts src/vocab/ ../runtime/ src/vocab/$GENPATH && deno fmt src/vocab/$GENPATH && mv src/vocab/$GENPATH src/vocab/vocab.ts && deno cache src/vocab/vocab.ts && deno check src/vocab/vocab.ts
Would be a thing that you could run from like npx @fedify/vocab-tools compile or something
Along with this, we should, if we haven't already, deprecate pulling in vocab types directly from the @fedify/fedify exports.
Target Area
vocab & codegen
Motivation
Improve the ability to use vocabs outside of the Fedify code (e.g., in ActivityPub API client code)
Risk Assessment
No response
Benefits
No response