atproto_codegen/module_header
Per-module import header. Not a plugin: the imports a generated module
needs (gleam/list for list.flatten, atproto/blob, the internal
helpers, …) depend on the shapes every plugin renders for a def, so
computing them once against the lowered defs is simpler than asking each
plugin to contribute its own imports and deduplicating across them.
Values
pub fn ext_import_line(
cfg: config.Config,
nsid: String,
) -> String
An import line for a generated module, aliased when its default name
(the subpath’s last segment) collides with another lexicon’s module.
Shared by header and any plugin (e.g. xrpc-client) that renders its
own import list for referenced modules.
pub fn header(
cfg: config.Config,
nsid: String,
defs: List(lower.FlatDef),
) -> String
pub fn referenced_nsids(ft: lower.FlatType) -> List(String)
The NSIDs a field type refs, so callers can compute cross-module imports.