Skip to main content

Module report

Module report 

Source
Expand description

Console reports (RFC-108): one JSON document describing one project at one commit, which tuff console publish sends to a console server.

A report is the project’s lockfile plus what only the working tree can say: whether the installed files still match (tuff check) and, optionally, whether newer versions exist (tuff outdated). The schema is a published format like the lockfile, and a server refuses a schema it does not know.

Structs§

ProjectIdentity
Which project a report describes (RFC-108 D3). repository and path together identify it across reports; name is a label.
Report

Constants§

REPORT_SCHEMA
The report schema this Tuff writes and reads.

Functions§

build_report
Build the report for the project at project_root, whose tuff.lock must exist. project_name, when given, replaces the repository value, and is required outside git or without an origin remote. outdated is computed by the caller, which owns the network.
find_projects
Every folder under root with a tuff.lock, root included, in path order. .git, node_modules, target, and other hidden folders are not searched.
normalize_remote
A git remote URL as one stable repository name: no scheme, credentials, port, or trailing .git, and a lowercase host. git@github.com:acme/x.git and https://token@github.com/acme/x both become github.com/acme/x. A local path is kept, without a trailing .git.
project_identity
Work out where a project sits in its repository (RFC-108 D3).