A configuration file format for JSON Schema projects
Public Types |
| enum class | FetchMode : std::uint8_t { Missing
, All
} |
| | The mode for fetching dependencies with a mutable lock. More...
|
| using | ReadCallback |
| | A callback to read file contents from a path.
|
| using | FetchCallback |
| | A callback to fetch a JSON Schema from a URI.
|
| using | WriteCallback |
| | A callback to write a JSON Schema to a path.
|
Public Member Functions |
|
auto | fetch (Lock &lock, const FetchCallback &fetcher, const sourcemeta::core::SchemaResolver &resolver, const ReadCallback &reader, const WriteCallback &writer, const FetchEvent::Callback &on_event, FetchMode mode, std::size_t concurrency=1) const -> void |
| | Fetch dependencies, modifying the lock in-place.
|
|
auto | fetch (const Lock &lock, const FetchCallback &fetcher, const sourcemeta::core::SchemaResolver &resolver, const ReadCallback &reader, const WriteCallback &writer, const FetchEvent::Callback &on_event, bool dry_run=false, std::size_t concurrency=1) const -> void |
| | Fetch dependencies without modifying the lock file (frozen mode).
|
|
auto | add_dependency (const sourcemeta::core::URI &uri, const std::filesystem::path &path) -> void |
| | Add a dependency to the configuration.
|
| auto | applies_to (const std::filesystem::path &path) const -> bool |
|
auto | to_json () const -> sourcemeta::core::JSON |
| | Serialize a configuration to JSON.
|
Static Public Member Functions |
|
static auto | from_json (const sourcemeta::core::JSON &value, const std::filesystem::path &base_path) -> Configuration |
| | Parse a configuration file from its contents.
|
|
static auto | read_json (const std::filesystem::path &path, const ReadCallback &reader) -> Configuration |
| | Read and parse a configuration file.
|
|
static auto | find (const std::filesystem::path &path) -> std::optional< std::filesystem::path > |
| | A nearest ancestor configuration lookup.
|
Public Attributes |
|
std::optional< sourcemeta::core::JSON::String > | title |
|
std::optional< sourcemeta::core::JSON::String > | description |
|
std::optional< sourcemeta::core::JSON::String > | email |
|
std::optional< sourcemeta::core::JSON::String > | github |
|
std::optional< sourcemeta::core::JSON::String > | website |
|
std::filesystem::path | absolute_path |
|
bool | absolute_path_explicit {false} |
|
std::filesystem::path | base_path |
|
sourcemeta::core::JSON::String | base |
|
sourcemeta::core::URI | base_uri |
|
std::optional< sourcemeta::core::JSON::String > | default_dialect |
| std::unordered_set< sourcemeta::core::JSON::String > | extension |
|
std::unordered_map< sourcemeta::core::JSON::String, sourcemeta::core::JSON::String > | resolve |
|
std::map< sourcemeta::core::JSON::String, std::filesystem::path > | dependencies |
|
std::vector< std::filesystem::path > | ignore |
|
Lint | lint |
|
sourcemeta::core::JSON | extra = sourcemeta::core::JSON::make_object() |