Make log payloads opaque pass-through
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import type { JobResponse, JobState } from "../api/types";
|
||||
|
||||
const jobStates = new Set<JobState>(["queued", "accepted", "running", "retrying", "succeeded", "failed", "cancelled"]);
|
||||
const forbiddenProjectionKeys = new Set(["leaseToken", "leaseTokenHash", "leaseSessionGeneration", "sessionToken", "secretRef", "hostPath", "socket", "credential", "content"]);
|
||||
const forbiddenProjectionKeys = new Set(["leaseToken", "leaseTokenHash", "leaseSessionGeneration", "sessionToken", "secretRef", "hostPath", "socket", "credential"]);
|
||||
|
||||
export function parseSafeJobResponse(value: unknown): JobResponse {
|
||||
if (!isRecord(value)) throw new Error("job projection must be an object");
|
||||
@@ -57,7 +57,8 @@ function optionalExecutionResult(value: Record<string, unknown>, key: string): J
|
||||
version: optionalNumber(field, "version"),
|
||||
checksum: optionalString(field, "checksum"),
|
||||
sizeBytes: optionalNumber(field, "sizeBytes"),
|
||||
summary: optionalString(field, "summary")
|
||||
summary: optionalString(field, "summary"),
|
||||
content: optionalString(field, "content")
|
||||
};
|
||||
return result;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user