Skip to content

Commit

Permalink
Export internal policy conversion function
Browse files Browse the repository at this point in the history
Signed-off-by: Andrew Haines <haines@cerbos.dev>
  • Loading branch information
haines committed Jul 18, 2023
1 parent 52c4c8e commit 4b073e8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
5 changes: 3 additions & 2 deletions packages/core/src/convert/fromProtobuf.ts
Original file line number Diff line number Diff line change
Expand Up @@ -185,10 +185,11 @@ export const enablePoliciesResponseFromProtobuf = ({
export const getPoliciesResponseFromProtobuf = ({
policies,
}: GetPolicyResponse): GetPoliciesResponse => ({
policies: policies.map(policyFromProtobuf),
policies: policies.map(_policyFromProtobuf),
});

const policyFromProtobuf = ({
/** @internal */
export const _policyFromProtobuf = ({
apiVersion,
description,
disabled,
Expand Down
1 change: 1 addition & 0 deletions packages/core/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
*/

export * from "./client";
export { _policyFromProtobuf } from "./convert/fromProtobuf";
export * from "./errors";
export * from "./rpcs";
export * from "./types/external";

0 comments on commit 4b073e8

Please sign in to comment.