Add package use tracking to FHIR cache for validator.fhir.org
This commit is contained in:
parent
7d15f271d0
commit
6a78fdd1e0
|
@ -242,6 +242,11 @@ public class FilesystemPackageCacheManager extends BasePackageCacheManager imple
|
|||
}
|
||||
|
||||
private NpmPackage loadPackageInfo(String path) throws IOException {
|
||||
File f = new File(Utilities.path(path, "usage.ini"));
|
||||
JsonObject j = f.exists() ? JsonParser.parseObject(f) : new JsonObject();
|
||||
j.set("date", new SimpleDateFormat("yyyy-MM-dd").format(new Date()));
|
||||
JsonParser.compose(j, f, true);
|
||||
|
||||
NpmPackage pi = minimalMemory ? NpmPackage.fromFolderMinimal(path) : NpmPackage.fromFolder(path);
|
||||
return pi;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue