mirror of
https://github.com/only-cli/oc.git
synced 2026-09-15 10:40:56 +02:00
Three faults in the JSON renderer, all of which the npm registry's package endpoint hits at once, where the render came out as a truncated blob titled after the package's two maintainers. mainArray took the longest array of objects at the top level, so `maintainers` became the subject and the package itself was pushed into the metadata line. A root carrying its own name is the resource, and an array hanging off it describes that resource rather than standing in for it. Conventional container keys are checked first, so a named collection is still read as a collection. The metadata line capped nothing. One long scalar there, a readme in npm's case, cost more than the rest of the page put together; a summary line has to stay a line, so a long one becomes its own block. An oversized markup field distilled into more blocks than the item it hangs off had fields. Under BODY_CAP a body is still rendered in place with its links followable, which is what the Stack Exchange withbody shape wants; over it, one numbered line, with `oc raw` still holding the whole thing.