Updates for changes to package.json type
This commit is contained in:
parent
84405b4d0b
commit
b49e791cd1
|
@ -111,7 +111,7 @@ public class NPMPackageGenerator {
|
|||
p.remove("name");
|
||||
p.addProperty("name", id);
|
||||
p.remove("type");
|
||||
p.addProperty("type", PackageType.SUBSET.getCode());
|
||||
p.addProperty("type", PackageType.CONFORMANCE.getCode());
|
||||
p.remove("title");
|
||||
p.addProperty("title", name);
|
||||
return new NPMPackageGenerator(destFile, p);
|
||||
|
|
|
@ -120,7 +120,7 @@ public class NPMPackageGenerator {
|
|||
p.remove("name");
|
||||
p.addProperty("name", id);
|
||||
p.remove("type");
|
||||
p.addProperty("type", PackageType.SUBSET.getCode());
|
||||
p.addProperty("type", PackageType.CONFORMANCE.getCode());
|
||||
p.remove("title");
|
||||
p.addProperty("title", name);
|
||||
if (notForPublication) {
|
||||
|
|
|
@ -769,7 +769,7 @@ public class NpmPackage {
|
|||
}
|
||||
|
||||
public boolean isType(PackageType template) {
|
||||
return template.getCode().equals(type());
|
||||
return template.getCode().equals(type()) || template.getOldCode().equals(type()) ;
|
||||
}
|
||||
|
||||
public String type() {
|
||||
|
|
|
@ -52,15 +52,31 @@ import com.google.gson.JsonSyntaxException;
|
|||
public class PackageGenerator {
|
||||
|
||||
public enum PackageType {
|
||||
CORE, IG, TOOL, TEMPLATE, SUBSET;
|
||||
CONFORMANCE, IG, CORE, EXAMPLES, GROUP, TOOL, IG_TEMPLATE;
|
||||
// CORE, IG, TOOL, TEMPLATE, SUBSET;
|
||||
|
||||
public String getCode() {
|
||||
switch (this) {
|
||||
case CORE: return "fhir.core";
|
||||
case CONFORMANCE: return "Conformance";
|
||||
case IG: return "IG";
|
||||
case CORE: return "Core";
|
||||
case EXAMPLES: return "Examples";
|
||||
case GROUP: return "Group";
|
||||
case TOOL: return "Tool";
|
||||
case IG_TEMPLATE: return "IG-Template";
|
||||
}
|
||||
throw new Error("Unknown Type");
|
||||
}
|
||||
|
||||
String getOldCode() {
|
||||
switch (this) {
|
||||
case CONFORMANCE: return "xxx";
|
||||
case IG: return "fhir.ig";
|
||||
case CORE: return "fhir.core";
|
||||
case EXAMPLES: return "fhir.examples";
|
||||
case GROUP: return "fhir.group";
|
||||
case TOOL: return "fhir.tool";
|
||||
case TEMPLATE: return "fhir.template";
|
||||
case SUBSET: return "fhir.subset";
|
||||
case IG_TEMPLATE: return "fhir.template";
|
||||
}
|
||||
throw new Error("Unknown Type");
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue