New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.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-7dba6e5 to 0.0.1-990aacb

LICENSE

29

lib/converter/devfile-converter.js

@@ -220,2 +220,7 @@ "use strict";

}
else {
// if not specified, mountSources needs to be added back on the container
// as the default is not the same
devfileV1Component.mountSources = true;
}
if (componentV2.container.args) {

@@ -578,3 +583,3 @@ devfileV1Component.args = componentV2.container.args;

return __awaiter(this, void 0, void 0, function () {
var devfileV2, inlineCheTheiaPluginsYaml, inlineVsCodeExtensionJson, inlineCheEditorYaml, launchCommand;
var devfileV2, inlineCheTheiaPluginsYaml, inlineVsCodeExtensionJson, inlineCheEditorYaml, launchCommand, content;
var _this = this;

@@ -614,3 +619,7 @@ return __generator(this, function (_b) {

}
return [2 /*return*/, devfileV2];
content = JSON.stringify(devfileV2);
// update devfile v1 constants
content = content.replace(/\$\(CHE_PROJECTS_ROOT\)/g, '$(PROJECTS_ROOT)');
content = content.replace(/\$\{CHE_PROJECTS_ROOT\}/g, '${PROJECTS_ROOT}');
return [2 /*return*/, JSON.parse(content)];
});

@@ -780,3 +789,3 @@ });

return __awaiter(this, void 0, void 0, function () {
var devfileV1, attributeKeys, attributes_1, devfileV1Any;
var devfileV1, attributeKeys, attributes_1, devfileV1Any, content;
var _this = this;

@@ -822,3 +831,15 @@ return __generator(this, function (_a) {

}
return [2 /*return*/, devfileV1];
// cleanup attributes that are not string
if (devfileV1.attributes) {
Object.keys(devfileV1.attributes).forEach(function (key) {
if (typeof devfileV1.attributes[key] !== 'string') {
delete devfileV1.attributes[key];
}
});
}
content = JSON.stringify(devfileV1, undefined, 2);
// update devfile v2 constants
content = content.replace(/\$\(PROJECTS_ROOT\)/g, '$(CHE_PROJECTS_ROOT)');
content = content.replace(/\$\{PROJECTS_ROOT\}/g, '${CHE_PROJECTS_ROOT}');
return [2 /*return*/, JSON.parse(content)];
}

@@ -825,0 +846,0 @@ });

3

package.json
{
"name": "@eclipse-che/devfile-converter",
"version": "0.0.1-7dba6e5",
"version": "0.0.1-990aacb",
"description": "Convert devfile v1 to v2 or v2 to v1",

@@ -50,2 +50,3 @@ "publishConfig": {

"jest": "^27.3.1",
"jsonschema": "^1.4.0",
"prettier": "^2.4.1",

@@ -52,0 +53,0 @@ "rimraf": "^3.0.2",

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