refactor(kernel): migrate the remaining SHA-256 hex digests to sha256Hex and move isRecord into src/kernel (#11571)

* refactor(kernel): migrate the remaining one-shot SHA-256 hex digests to sha256Hex

* refactor(kernel): move isRecord into src/kernel and replace its inline copies (#11574)

* fix(scripts): import isRecord from src/kernel in the managed manifest parser
This commit is contained in:
morluto authored and GitHub committed 2026-11-15 20:53:36 -05:00
1 parent 9ecfb109e8
commit b51ed4c3ec
157 files changed
+397 -589

No files matched your search

+2 -2
View File
@@ -1,5 +1,4 @@
import { decodeStrictUtf8 } from "../domain/strictUtf8.js";
import { createHash } from "node:crypto";
import { z } from "zod";
@@ -50,6 +49,7 @@ import {
regularFileCancellation,
} from "../filesystem/OwnedRegularFile.js";
import { errorMessage } from "../kernel/errorMessage.js";
import { sha256Hex } from "../kernel/sha256Hex.js";
const OPERATION = "export_web_scripts";
@@ -100,7 +100,7 @@ export const exportWebScriptsValidated = async (
const { bytes, loaded } = prepared.value;
if (options.signal?.aborted)
return err(cancelledBy(OPERATION, options.signal));
const sha256 = createHash("sha256").update(bytes).digest("hex");
const sha256 = sha256Hex(bytes);
const result = await publishWebScripts(input, loaded, sha256, {
resources,
...(options.signal === undefined ? {} : { signal: options.signal }),