Skip to main content

dispatch_fixup

Function dispatch_fixup 

Source
pub async fn dispatch_fixup(
    package_key: &str,
    pkg_path: &Path,
    patched: &[String],
    _files: &HashMap<String, PatchFileInfo>,
) -> Result<Option<SidecarRecord>, SidecarError>
Expand description

Run the post-apply integrity fixup for the package’s ecosystem.

Returns a fully-formed SidecarRecord (PURL + ecosystem + payload) when the ecosystem produced any output, None when the ecosystem has no sidecar contract at all (e.g. npm), or Err(SidecarError) when the fixup tried to do something and failed mid-flight. The caller is responsible for converting the error case into an Error-severity record.

package_key is the PURL. pkg_path is the package directory on disk. patched lists the patch-file keys that were actually written (same convention as apply_package_patch.files_patched). files is reserved for future use (currently unread).