mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 10:40:43 +00:00
refactor: hide acp secret file limit
This commit is contained in:
@@ -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");
|
||||
});
|
||||
|
||||
@@ -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, {
|
||||
|
||||
Reference in New Issue
Block a user