Add debugging

This commit is contained in:
Grahame Grieve 2019-11-13 07:14:11 +11:00
parent 4b173cbfb3
commit 5b042f76a1
1 changed files with 10 additions and 2 deletions

View File

@ -184,8 +184,16 @@ public class NpmPackage {
} }
res.content.put("package/.index.json", indexer.build().getBytes(Charsets.UTF_8)); res.content.put("package/.index.json", indexer.build().getBytes(Charsets.UTF_8));
} }
res.npm = JsonTrackingParser.parseJson(res.content.get("package/package.json")); try {
res.readIndexFile((JsonObject) new com.google.gson.JsonParser().parse(new String(res.content.get("package/.index.json")))); res.npm = JsonTrackingParser.parseJson(res.content.get("package/package.json"));
} catch (Exception e) {
throw new IOException("Error parsing package/package.json: "+e.getMessage(), e);
}
try {
res.readIndexFile((JsonObject) JsonTrackingParser.parseJson(new String(res.content.get("package/.index.json"))));
} catch (Exception e) {
throw new IOException("Error parsing package/.index.json: "+e.getMessage(), e);
}
return res; return res;
} }