Skip to main content

Module surface

Module surface 

Source
Expand description

Capture of the stripe projects command surface — the top-level help banner plus every subcommand’s --help — as a deterministic, committable text snapshot. Diffing this artifact across plugin versions is the changelog Stripe does not publish: added/removed/renamed commands and flags show up as line diffs. Paired with the catalog fixture and the pinned version file, it is regenerated by the STRIPE_PROJECTS_REFRESH=1 bless path (see stripe.rs).

Functions§

command_separators
The ===== … ===== separator lines this code expects, in order — the source of truth the offline coherence test compares the committed file against (so a hand-edit or a TRAVERSAL change without a re-bless fails CI).
command_surface
Capture the full command surface (body only — compose with surface_header / render_surface). Each block is the normalized --help of one command, introduced by a stable ===== … ===== separator. Output is byte-stable across machines: trailing whitespace stripped, leading/trailing blank lines dropped, line order preserved as the plugin emits it (never re-sorted).
parse_header_version
Read the plugin-version: value out of a committed surface file’s header.
plugin_version
Probe the installed plugin version via stripe projects --version (which prints a bare X.Y.Z line).
render_surface
The full committed file: header + captured body + a single trailing newline.
surface_header
The comment header that carries the pinned version (read back by the offline coherence test via parse_header_version).