( resource: ResourceManifestEntry, ctx: PredicateContext, )
| 145 | * Checks both availability flag and all predicates. |
| 146 | */ |
| 147 | export function isResourceExposedForRuntime( |
| 148 | resource: ResourceManifestEntry, |
| 149 | ctx: PredicateContext, |
| 150 | ): boolean { |
| 151 | if (!isResourceAvailableForRuntime(resource, ctx.runtime)) { |
| 152 | return false; |
| 153 | } |
| 154 | return evalPredicates(resource.predicates, ctx); |
| 155 | } |
| 156 | |
| 157 | /** |
| 158 | * Filter resources based on exposure rules. |
no test coverage detected