Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@eclipse-che/devfile-converter

Package Overview
Dependencies
Maintainers
5
Versions
22
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@eclipse-che/devfile-converter - npm Package Compare versions

Comparing version 0.0.1-ca41630 to 0.0.1-e37ee54

37

lib/converter/devfile-converter.js

@@ -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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc