mirror of
https://github.com/morluto/rea.git
synced 2026-11-16 11:43:20 +00:00
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:
1 parent
9ecfb109e8
commit
b51ed4c3ec
157 files changed
+397
-589
No files matched your search
@@ -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 }),
|
||||
|
||||
Reference in new issue
Block a user