refactor: hide acp secret file limit

This commit is contained in:
Peter Steinberger
2026-05-02 09:43:02 +01:00
parent 607ec5f92b
commit de67311b96
2 changed files with 2 additions and 6 deletions

View File

@@ -1,11 +1,7 @@
import { describe, expect, it } from "vitest";
import { MAX_SECRET_FILE_BYTES, readSecretFromFile } from "./secret-file.js";
import { readSecretFromFile } from "./secret-file.js";
describe("readSecretFromFile", () => {
it("keeps the shared secret-file limit", () => {
expect(MAX_SECRET_FILE_BYTES).toBe(16 * 1024);
});
it("exposes the hardened secret reader", () => {
expect(typeof readSecretFromFile).toBe("function");
});

View File

@@ -1,6 +1,6 @@
import { DEFAULT_SECRET_FILE_MAX_BYTES, readSecretFileSync } from "../infra/secret-file.js";
export const MAX_SECRET_FILE_BYTES = DEFAULT_SECRET_FILE_MAX_BYTES;
const MAX_SECRET_FILE_BYTES = DEFAULT_SECRET_FILE_MAX_BYTES;
export function readSecretFromFile(filePath: string, label: string): string {
return readSecretFileSync(filePath, label, {