fix: DON'T serialize version field in HeliumPackage

This commit is contained in:
1ambda 2017-02-21 16:29:01 +09:00
parent e599ab92da
commit 696f7f8ae4
3 changed files with 2 additions and 11 deletions

View file

@ -27,7 +27,6 @@ import java.util.Map;
public class HeliumPackage {
private HeliumType type;
private String name; // user friendly name of this application
private String version;
private String description; // description
private String artifact; // artifact name e.g) groupId:artifactId:versionId
private String className; // entry point
@ -85,10 +84,6 @@ public class HeliumPackage {
return name;
}
public String getVersion() {
return version;
}
public String getDescription() {
return description;
}

View file

@ -50,9 +50,6 @@ export function createAllPackageConfigs(defaultPackages, persistedConfs) {
const spec = pkgSearchResult.pkg.config;
if (!spec) { continue; }
const version = pkgSearchResult.pkg.version;
if (!version) { continue; }
const artifact = pkgSearchResult.pkg.artifact;
if (!artifact) { continue; }

View file

@ -148,7 +148,7 @@ export default function heliumService($http, $sce, baseUrlSrv) {
};
/**
* @returns {Promise<Object>} which including {name, Array<package info for version>}
* @returns {Promise<Object>} which including {name, Array<package info for artifact>}
*/
this.getAllPackageInfo = function() {
return $http.get(`${baseUrlSrv.getRestApiBase()}/helium/package`)
@ -207,11 +207,10 @@ export default function heliumService($http, $sce, baseUrlSrv) {
*/
this.getSinglePackageConfigs = function(pkg) {
const pkgName = pkg.name;
const pkgVersion = pkg.version;
// in case of local package, it will include `/`
const pkgArtifact = encodeURIComponent(pkg.artifact);
if (!pkgName || !pkgVersion || !pkgArtifact) {
if (!pkgName || !pkgArtifact) {
console.error('Failed to fetch config for\n', pkg);
return Promise.resolve([]);
}