Skip to main content

Module modules

Module modules 

Source

Structs§

FetchedRemoteModule
Result of fetching a remote module — module + lockfile metadata.
GitSource
Parsed git file source URL.
LoadedModule
A module loaded from disk.
RegistryModule
A discovered module within a registry repo.
RegistryRef
Parsed registry/module reference.
ResolvedFile
A file resolved to a concrete local path.
ResolvedModule
A fully resolved module — ready for the reconciler.
ResolvedPackage
A package resolved to a concrete manager and name.

Enums§

TagSignatureStatus
Signature status for a git tag.

Functions§

check_tag_signature
Check whether a git tag has a GPG/SSH signature.
default_module_cache_dir
Default cache directory for module git sources.
diff_module_specs
Diff two module specs, returning a human-readable summary of changes.
extract_registry_name
Extract the default registry name from a GitHub URL. https://github.com/cfgd-community/modules.gitcfgd-community
fetch_git_source
Clone or fetch a git source to the cache, returning the local path.
fetch_registry_modules
Fetch a module registry repo and discover available modules.
fetch_remote_module
Fetch a remote module from a git URL.
get_head_commit_sha
Get the HEAD commit SHA from a git repo.
git_cache_dir
Compute the cache directory for a git source URL. Uses SHA-256 hash of the repo URL for uniqueness.
hash_module_contents
Compute SHA-256 integrity hash of a module directory’s contents. Hashes file paths (relative to module dir) and their contents, sorted for determinism.
is_git_source
Check whether a file source string is a git URL (not a local path).
is_registry_ref
Check if a module name is a registry/module[@tag] reference. Returns true if it contains / but is not a git URL.
latest_module_version
Find the latest version for a module in a registry repo. Registry repo tags follow <module>/<version> convention; returns only the version part.
load_all_modules
Load all modules: local modules from disk + remote locked modules.
load_locked_modules
Load remote modules from the lockfile, fetching if needed, and merge them into the given modules map.
load_lockfile
Load the module lockfile from <config_dir>/modules.lock. Returns an empty lockfile if the file does not exist.
load_module
Load a single module from a given directory.
load_modules
Load all modules from the modules/ directory under the given config dir. Returns a map of module name → LoadedModule.
parse_git_source
Parse a git file source URL into its components.
parse_registry_ref
Parse registry/module[@tag] into components. Returns None if the input doesn’t match the expected pattern.
resolve_dependency_order
Resolve module dependencies using topological sort (Kahn’s algorithm). Returns module names in dependency order (leaves first).
resolve_module_files
Resolve module file entries to concrete local paths. Local sources are resolved relative to the module directory. Git sources are cloned/fetched to cache and resolved to the local cache path.
resolve_module_packages
Resolve all packages in a module spec. Packages filtered out by platform constraints are silently skipped.
resolve_modules
Resolve a set of modules: load, sort dependencies, resolve packages and files. Includes both local modules and remote modules from the lockfile.
resolve_package
Resolve a single module package entry to a concrete (manager, name, version).
resolve_profile_module_name
Resolve a profile module reference to its lookup name.
save_lockfile
Save the module lockfile to <config_dir>/modules.lock. Uses atomic_write_str (temp file + rename) to prevent corruption.
verify_lockfile_integrity
Verify the integrity of a locked remote module against its lockfile entry.