refactor: reuse common ops primitives
This commit is contained in:
@@ -1,4 +1,3 @@
|
||||
import { createHash } from "node:crypto";
|
||||
import { chmodSync, copyFileSync, existsSync, readFileSync, statSync, writeFileSync } from "node:fs";
|
||||
import { join } from "node:path";
|
||||
import { spawnSync } from "node:child_process";
|
||||
@@ -25,6 +24,7 @@ import {
|
||||
renderAgentRunGitopsFiles,
|
||||
type AgentRunArtifactService,
|
||||
} from "./agentrun-manifests";
|
||||
import { sha256Fingerprint } from "./platform-infra-ops-library";
|
||||
|
||||
export function agentRunHelp(): unknown {
|
||||
return {
|
||||
@@ -3669,7 +3669,7 @@ function readSecretSourceValue(spec: AgentRunLaneSpec, source: LaneSecretSource)
|
||||
redactedPath: sourceRef.startsWith("/") ? redactAbsoluteSecretPath(sourceRef) : `.state/secrets/${sourceRef}`,
|
||||
value,
|
||||
valueBytes: Buffer.byteLength(value, "utf8"),
|
||||
fingerprint: `sha256:${createHash("sha256").update(value).digest("hex")}`,
|
||||
fingerprint: sha256Fingerprint(value),
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user