convertToEndoPackagePolicyPackages = (item) => {
  if (!item) {
    return undefined
  }
  /**
   * @type {NonNullable<LavaMoatEndoPackagePolicy['packages']>}
   */
  const policyItem = {}
  for (const [key, value] of entries(item)) {
    if (key === LAVAMOAT_PKG_POLICY_ROOT) {
      throw new ConversionError(
        `Unexpected root package (${LAVAMOAT_PKG_POLICY_ROOT}) referenced in package policy`
      )
    } else {
      policyItem[key] = !!value
    }
  }
  return policyItem
}
Converts LavaMoat `ResourcePolicy.packages` to Endo's
`PackagePolicy.packages`

@param {PackagePolicy} [item] - A value in `ResourcePolicy`
@returns {LavaMoatEndoPackagePolicy['packages']}