feat(cicd): generate PaC source artifacts from YAML

This commit is contained in:
Codex
2026-07-11 06:10:20 +02:00
parent 06ce779608
commit 0aab8d35ad
16 changed files with 1901 additions and 42 deletions
+12
View File
@@ -0,0 +1,12 @@
import { createHash } from "node:crypto";
export function stableJsonValue(value: unknown): unknown {
if (Array.isArray(value)) return value.map(stableJsonValue);
if (typeof value !== "object" || value === null) return value;
const input = value as Record<string, unknown>;
return Object.fromEntries(Object.keys(input).sort().map((key) => [key, stableJsonValue(input[key])]));
}
export function stableJsonSha256(value: unknown): string {
return `sha256:${createHash("sha256").update(JSON.stringify(stableJsonValue(value))).digest("hex")}`;
}