mirror of
https://github.com/morluto/rea.git
synced 2026-10-30 19:35:56 +00:00
refactor(artifacts): remove obsolete contradiction identity input
This commit is contained in:
1 parent
9c0c2765c5
commit
f2db494bfc
1 file changed
+6
-15
@@ -86,25 +86,16 @@ export const artifactManifestId = (
|
||||
)}`;
|
||||
|
||||
/** Identify one integrity disagreement at its observed logical path. */
|
||||
export const artifactContradictionId = (
|
||||
input: {
|
||||
readonly rootArtifactId: string;
|
||||
readonly logicalPath: string;
|
||||
} & (
|
||||
| { readonly declaredSha256: string; readonly observedSha256: string }
|
||||
| { readonly integrity: ArtifactIntegrityPair }
|
||||
),
|
||||
): string =>
|
||||
export const artifactContradictionId = (input: {
|
||||
readonly rootArtifactId: string;
|
||||
readonly logicalPath: string;
|
||||
readonly integrity: ArtifactIntegrityPair;
|
||||
}): string =>
|
||||
`ic_${digestCanonicalValue(
|
||||
{
|
||||
root_artifact_id: input.rootArtifactId,
|
||||
logical_path: input.logicalPath,
|
||||
...("integrity" in input
|
||||
? artifactIntegrityPairOf(input.integrity)
|
||||
: {
|
||||
declared_sha256: input.declaredSha256,
|
||||
observed_sha256: input.observedSha256,
|
||||
}),
|
||||
...artifactIntegrityPairOf(input.integrity),
|
||||
},
|
||||
"Artifact",
|
||||
)}`;
|
||||
|
||||
Reference in new issue
Block a user