export const CH = { snapshot: "vault:snapshot", add: "vault:add-secret", reveal: "vault:reveal-secret", rotate: "vault:rotate", tamper: "vault:tamper", reload: "vault:reload", roundtrip: "vault:roundtrip", refresh: "vault:refresh", }; export function assertAddSecretReq(value) { if (typeof value !== "object" || value === null) { throw new Error("BAD_SECRET_REQ"); } const req = value; if (typeof req.name !== "string" || req.name.trim().length === 0 || req.name.length > 60) { throw new Error("BAD_SECRET_NAME"); } if (typeof req.secret !== "string" || req.secret.length === 0 || req.secret.length > 4096) { throw new Error("BAD_SECRET_VALUE"); } } export function assertSecretIdReq(value) { if (typeof value !== "object" || value === null) { throw new Error("BAD_SECRET_ID_REQ"); } const id = value.id; if (typeof id !== "string" || !/^[A-Za-z0-9_-]{1,64}$/.test(id)) { throw new Error("BAD_SECRET_ID"); } } //# sourceMappingURL=ipc.js.map