A bit more rework
This commit is contained in:
parent
17411a3659
commit
0d8cab0b6e
|
@ -60,7 +60,7 @@ public abstract class BasePackageCacheManager implements IPackageCacheManager {
|
|||
}
|
||||
InputStream stream = packageClient.fetch(id, version);
|
||||
String url = packageClient.url(id, version);
|
||||
return new InputStreamWithSrc(stream, packageClient.url(id, version), version);
|
||||
return new InputStreamWithSrc(stream, url, version);
|
||||
} catch (IOException e) {
|
||||
ourLog.info("Failed to resolve package {}#{} from server: {}", id, version, nextPackageServer);
|
||||
}
|
||||
|
|
|
@ -195,6 +195,7 @@ public class NpmPackage {
|
|||
private JsonObject npm;
|
||||
private Map<String, NpmPackageFolder> folders = new HashMap<>();
|
||||
private boolean changedByLoader; // internal qa only!
|
||||
private Map<String, Object> userData = new HashMap<>();
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
|
@ -210,6 +211,10 @@ public class NpmPackage {
|
|||
return res;
|
||||
}
|
||||
|
||||
public Map<String, Object> getUserData() {
|
||||
return userData;
|
||||
}
|
||||
|
||||
public static void loadFiles(NpmPackage res, String path, File source, String... exemptions) throws FileNotFoundException, IOException {
|
||||
res.npm = (JsonObject) new com.google.gson.JsonParser().parse(TextFile.fileToString(Utilities.path(path, "package", "package.json")));
|
||||
res.path = path;
|
||||
|
|
Loading…
Reference in New Issue