Repository navigation
Releases
Releases · pret-a-porter/bufaker
v0.1.0
npm install --save-dev @pret-a-porter/bufakerInitial release.
Added
mock(schema, options?)andmockList(schema, count, options?), generating
a fully populated message from a protobuf-esDescMessage, with the return
type inferred asMessageShape<Desc>.- Generation for every proto field kind: all 15 scalar types, enums, nested
messages, repeated fields, maps, and oneof groups. - Well-known type handling for
Timestamp,Duration, the*Valuewrappers,
Struct,Value,ListValueandEmpty.AnyandFieldMaskare left
unset — see the README for why. - A depth guard (
maxDepth, default 3) that makes self-referential and
mutually recursive schemas terminate. - An overrides system matching by field name, by path from the root, or by
declaring message type, with the most specific key winning. - Built-in field-name heuristics (
email,id,createdAt, and ~60 more),
on by default and disabled withheuristics: false. seedfor reproducible output, including a pinned reference date so that
generated timestamps do not vary with the wall clock.refDate, setting the point that generated dates are drawn relative to.
Published with npm provenance from this tag.