@eclipse-che/devfile-converter
Advanced tools
Comparing version 0.0.1-ca41630 to 0.0.1-e37ee54
@@ -116,3 +116,12 @@ "use strict"; | ||
if (endpointV1.name) { | ||
endpoint.name = endpointV1.name; | ||
// the name can't have spaces | ||
// replace space by dash and then remove all special characters | ||
var endpointName = endpointV1.name | ||
.replace(/\s+/g, '-') | ||
// names should not use _ | ||
.replace(/_/g, '-') | ||
// trim '-' character from start or end | ||
.replace(/^\-+|\-+$/g, '') | ||
.toLowerCase(); | ||
endpoint.name = endpointName; | ||
} | ||
@@ -376,2 +385,6 @@ if (endpointV1.port) { | ||
.replace(/\s+/g, '-') | ||
// names should not use _ | ||
.replace(/_/g, '-') | ||
// names should not use . | ||
.replace(/\./g, '-') | ||
// trim '-' character from start or end | ||
@@ -529,3 +542,5 @@ .replace(/^\-+|\-+$/g, '') | ||
} | ||
var cheTheiaPluginsContent = chePluginComponents.map(function (chePluginComponent) { | ||
var cheTheiaPluginsContent = chePluginComponents | ||
.filter(function (component) { return component.id; }) | ||
.map(function (chePluginComponent) { | ||
var cheTheiaPlugin = {}; | ||
@@ -535,5 +550,2 @@ if (chePluginComponent.id) { | ||
} | ||
if (chePluginComponent.reference) { | ||
cheTheiaPlugin.reference = chePluginComponent.reference; | ||
} | ||
cheTheiaPlugin.override = { | ||
@@ -587,5 +599,2 @@ sidecar: {} | ||
} | ||
if (cheEditorComponentV1.reference) { | ||
cheEditorYaml.reference = cheEditorComponentV1.reference; | ||
} | ||
if (cheEditorComponentV1.registryUrl) { | ||
@@ -642,2 +651,8 @@ cheEditorYaml.registryUrl = cheEditorComponentV1.registryUrl; | ||
devfileV2.attributes = {}; | ||
// handle the ephemeral attribute | ||
if (devfileV1.attributes && | ||
devfileV1.attributes.persistVolumes && | ||
devfileV1.attributes.persistVolumes === 'false') { | ||
devfileV2.attributes['controller.devfile.io/storage-type'] = 'ephemeral'; | ||
} | ||
inlineCheTheiaPluginsYaml = this.inlineCheTheiaPluginsYamlFromComponentsV1(devfileV1.components); | ||
@@ -876,5 +891,2 @@ if (inlineCheTheiaPluginsYaml) { | ||
} | ||
if (component.reference) { | ||
v1component.reference = component.reference; | ||
} | ||
if (component.registryUrl) { | ||
@@ -931,5 +943,2 @@ v1component.registryUrl = component.registryUrl; | ||
} | ||
if (cheEditorYaml.reference) { | ||
v1component.reference = cheEditorYaml.reference; | ||
} | ||
if (cheEditorYaml.registryUrl) { | ||
@@ -936,0 +945,0 @@ v1component.registryUrl = cheEditorYaml.registryUrl; |
{ | ||
"name": "@eclipse-che/devfile-converter", | ||
"version": "0.0.1-ca41630", | ||
"version": "0.0.1-e37ee54", | ||
"description": "Convert devfile v1 to v2 or v2 to v1", | ||
@@ -5,0 +5,0 @@ "publishConfig": { |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Unidentified License
License(Experimental) Something that seems like a license was found, but its contents could not be matched with a known license.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Unidentified License
License(Experimental) Something that seems like a license was found, but its contents could not be matched with a known license.
Found 1 instance in 1 package
127181
1453