mirror of
https://github.com/morluto/rea.git
synced 2026-11-22 14:35:45 +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 { boundedList } from "../../domain/boundedList.js";
|
||||
import { createHash } from "node:crypto";
|
||||
import { posix } from "node:path";
|
||||
|
||||
import { setImmediate } from "node:timers/promises";
|
||||
@@ -57,6 +56,7 @@ import {
|
||||
cancelledBy,
|
||||
carriedReason,
|
||||
} from "../../domain/analysisErrorCore.js";
|
||||
import { sha256Hex } from "../../kernel/sha256Hex.js";
|
||||
|
||||
interface MutableArtifactAnalysis {
|
||||
readonly jsonDocuments: JavaScriptJsonDocuments;
|
||||
@@ -700,7 +700,7 @@ const collectSourceMapOriginals = (
|
||||
declaration_index: declarationIndex++,
|
||||
reference,
|
||||
content,
|
||||
content_sha256: content === null ? null : sha256(content),
|
||||
content_sha256: content === null ? null : sha256Hex(content),
|
||||
section_path,
|
||||
});
|
||||
}
|
||||
@@ -786,6 +786,3 @@ const findingCount = (analysis: JavaScriptStaticAnalysis): number =>
|
||||
|
||||
const optionalString = (value: unknown): string | null =>
|
||||
typeof value === "string" && value.length > 0 ? value : null;
|
||||
|
||||
const sha256 = (value: string): string =>
|
||||
createHash("sha256").update(value).digest("hex");
|
||||
Reference in new issue
Block a user