mirror of
https://github.com/morluto/rea.git
synced 2026-10-30 19:35:56 +00:00
Share exact live target variants across open and session responses, preserving historical Evidence and snapshot admission. Consolidate equivalent ELF metadata aliases at their owner.
17 lines
627 B
TypeScript
17 lines
627 B
TypeScript
import type { BinaryTarget } from "../../domain/binaryTargetTypes.js";
|
|
|
|
import { liveBinaryTargetSummarySchema } from "../../domain/liveBinaryTargetSummary.js";
|
|
|
|
/** Preserve the admitted target interpretation in public lifecycle results. */
|
|
export const binaryTargetSummary = (target: BinaryTarget) =>
|
|
liveBinaryTargetSummarySchema.parse({
|
|
path: target.path,
|
|
format: target.format,
|
|
kind: target.kind,
|
|
sha256: target.sha256,
|
|
architecture: target.architecture ?? null,
|
|
...(target.format === "raw-binary" || target.format === "gamecube-dol"
|
|
? { entry_point: target.entryPoint }
|
|
: {}),
|
|
});
|