UNPKG

@cerbos/core

Version:
27 lines 1.13 kB
export { auditTrailFromProtobuf, checkInputFromProtobuf, checkOutputFromProtobuf, planResourcesInputFromProtobuf, planResourcesOutputFromProtobuf, policyFromProtobuf, requestContextFromProtobuf, requireField, translateEnum, unexpected, valuesFromProtobuf, } from "./convert/fromProtobuf.js"; export { policyToProtobuf, valuesToProtobuf } from "./convert/toProtobuf.js"; export * from "./errors/internal.js"; export { AbstractErrorResponse } from "./errors/response.js"; export * from "./transport.js"; /** @internal */ export function cancelBody(response) { response.body?.cancel().catch(() => { // ignore failure to cancel }); } /** @internal */ export function isObject(value) { return typeof value === "object" && value !== null && !Array.isArray(value); } /** @internal */ export function methodName(method) { return `${method.parent.typeName}/${method.name}`; } /** @internal */ export function userAgent(customUserAgent, defaultUserAgent) { if (!customUserAgent) { return defaultUserAgent; } return `${customUserAgent} ${defaultUserAgent}`; } //# sourceMappingURL=internal.js.map