-
Notifications
You must be signed in to change notification settings - Fork 39
Description
We would like the ability to access resources from IGs in NPM packages without having to install the npm package.
Installing NPM packages adds the resources to the repositories (dbs) and this might not be what we want.
But we might still want access to those resources without installation.
The interface in question that we want an implementation for is:
/**
* A "repository" backed by fhir's NPM storage.
*/
public interface INpmRepository {
/**
* Resolve a resource by a class and url
* @param clazz - the class of the resource desired
* @param url - url of the resource desired (can be null)
* @return list of resources that match the condition
*/
<T extends IBaseResource> List<T> resolveByUrl(@Nonnull Class<T> clazz, String url);
}Questions:
Do we want this to actually be an extension of IRepository?
-- No. The use case of IRepository and INpmRepository is distinct enough that making them implement the same interface might be too much work for the requirements
Do we want to even use NpmProcessor?
Pros:
- we can inject EvalutaionSettings and thus possibly use existing Npm packages that were stored (but not installed) by other services
Cons: - We only really need the NpmPackage object. We're only using NpmManager for holding the cached packages (but not cached resources)
What is meant/intended by Version Management here? Hapi version? Version of the resources
The api (above) returns a list of resources and it's possible the consumer can filter the ones they don't want (or should we do that for them? should we have a broader api for this purpose?)
What is the intended use case?
Aside from loading resources without installing them, who will be the consumer and for what reason?