mirror of
https://github.com/soconnor0919/hristudio.git
synced 2026-03-24 11:47:51 -04:00
Pre-conf work 2025
This commit is contained in:
@@ -70,8 +70,8 @@ function canonicalize(value: unknown): CanonicalValue {
|
||||
function bufferToHex(buffer: ArrayBuffer): string {
|
||||
const bytes = new Uint8Array(buffer);
|
||||
let hex = "";
|
||||
for (let i = 0; i < bytes.length; i++) {
|
||||
const b = bytes[i]?.toString(16).padStart(2, "0");
|
||||
for (const byte of bytes) {
|
||||
const b = byte.toString(16).padStart(2, "0");
|
||||
hex += b;
|
||||
}
|
||||
return hex;
|
||||
@@ -90,8 +90,9 @@ async function hashString(input: string): Promise<string> {
|
||||
|
||||
// Fallback to Node (should not execute in Edge runtime)
|
||||
try {
|
||||
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
||||
const nodeCrypto: typeof import("crypto") = require("crypto");
|
||||
// eslint-disable-next-line @typescript-eslint/no-require-imports, @typescript-eslint/no-unsafe-assignment
|
||||
const nodeCrypto = require("crypto");
|
||||
// eslint-disable-next-line @typescript-eslint/no-unsafe-return, @typescript-eslint/no-unsafe-call, @typescript-eslint/no-unsafe-member-access
|
||||
return nodeCrypto.createHash("sha256").update(input).digest("hex");
|
||||
} catch {
|
||||
throw new Error("No suitable crypto implementation available for hashing.");
|
||||
|
||||
@@ -434,7 +434,7 @@ export function validateParameters(
|
||||
// Unknown parameter type
|
||||
issues.push({
|
||||
severity: "warning",
|
||||
message: `Unknown parameter type '${paramDef.type}' for '${paramDef.name}'`,
|
||||
message: `Unknown parameter type '${String(paramDef.type)}' for '${paramDef.name}'`,
|
||||
category: "parameter",
|
||||
field,
|
||||
stepId,
|
||||
@@ -723,9 +723,7 @@ export function groupIssuesByEntity(
|
||||
|
||||
issues.forEach((issue) => {
|
||||
const entityId = issue.actionId ?? issue.stepId ?? "experiment";
|
||||
if (!grouped[entityId]) {
|
||||
grouped[entityId] = [];
|
||||
}
|
||||
grouped[entityId] ??= [];
|
||||
grouped[entityId].push(issue);
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user