@eclipse-che/che-theia-devworkspace-handler
Advanced tools
Comparing version 0.0.1-1632923226 to 0.0.1-1633465187
@@ -24,5 +24,5 @@ /********************************************************************** | ||
devWorkspaceTemplates: V1alpha2DevWorkspaceTemplate[]; | ||
sidecarPolicy: SidecarPolicy; | ||
sidecarPolicy?: SidecarPolicy; | ||
suffix: string; | ||
} | ||
//# sourceMappingURL=devfile-context.d.ts.map |
@@ -22,2 +22,3 @@ "use strict"; | ||
exports.CheTheiaPluginsDevfileResolver = void 0; | ||
const devfile_context_1 = require("../api/devfile-context"); | ||
const inversify_1 = require("inversify"); | ||
@@ -37,3 +38,3 @@ const che_theia_plugin_devcontainer_merger_1 = require("./che-theia-plugin-devcontainer-merger"); | ||
async handle(devfileContext) { | ||
var _a, _b; | ||
var _a, _b, _c; | ||
let cheTheiaPluginsYamlContent = devfileContext.cheTheiaPluginsContent; | ||
@@ -83,2 +84,15 @@ let vscodeExtensionJsonContent = devfileContext.vscodeExtensionsJsonContent; | ||
let extensionsForDevContainer; | ||
if (!devfileContext.sidecarPolicy) { | ||
const sidecarAttribute = (_c = devfileContext.devfile.attributes) === null || _c === void 0 ? void 0 : _c['che-theia.eclipse.org/sidecar-policy']; | ||
if (sidecarAttribute === devfile_context_1.SidecarPolicy.USE_DEV_CONTAINER) { | ||
devfileContext.sidecarPolicy = devfile_context_1.SidecarPolicy.USE_DEV_CONTAINER; | ||
} | ||
else if (sidecarAttribute === devfile_context_1.SidecarPolicy.MERGE_IMAGE) { | ||
devfileContext.sidecarPolicy = devfile_context_1.SidecarPolicy.MERGE_IMAGE; | ||
} | ||
else { | ||
// default is to use dev container | ||
devfileContext.sidecarPolicy = devfile_context_1.SidecarPolicy.USE_DEV_CONTAINER; | ||
} | ||
} | ||
switch (devfileContext.sidecarPolicy) { | ||
@@ -85,0 +99,0 @@ case 'mergeImage': |
{ | ||
"name": "@eclipse-che/che-theia-devworkspace-handler", | ||
"version": "0.0.1-1632923226", | ||
"version": "0.0.1-1633465187", | ||
"private": false, | ||
@@ -5,0 +5,0 @@ "description": "Handle management of che-theia-plugins and devWorkspace templates", |
@@ -38,3 +38,3 @@ /********************************************************************** | ||
// merge into dev Container | ||
sidecarPolicy: SidecarPolicy; | ||
sidecarPolicy?: SidecarPolicy; | ||
@@ -41,0 +41,0 @@ // suffix to append on generated names |
@@ -11,2 +11,3 @@ /********************************************************************** | ||
import { DevfileContext, SidecarPolicy } from '../api/devfile-context'; | ||
import { VSCodeExtensionEntry, VSCodeExtensionEntryWithSidecar } from '../api/vscode-extension-entry'; | ||
@@ -19,3 +20,2 @@ import { inject, injectable } from 'inversify'; | ||
import { DevWorkspaceUpdater } from './devworkspace-updater'; | ||
import { DevfileContext } from '../api/devfile-context'; | ||
import { DevfileResolver } from '../api/devfile-che-theia-plugins-resolver'; | ||
@@ -108,3 +108,2 @@ import { PluginRegistryResolver } from '../plugin-registry/plugin-registry-resolver'; | ||
// if need to use user container, we'll need to update an existing component with the following data | ||
let extensionsWithSidecars: VSCodeExtensionEntryWithSidecar[] = []; | ||
@@ -115,2 +114,14 @@ | ||
if (!devfileContext.sidecarPolicy) { | ||
const sidecarAttribute = devfileContext.devfile.attributes?.['che-theia.eclipse.org/sidecar-policy']; | ||
if (sidecarAttribute === SidecarPolicy.USE_DEV_CONTAINER) { | ||
devfileContext.sidecarPolicy = SidecarPolicy.USE_DEV_CONTAINER; | ||
} else if (sidecarAttribute === SidecarPolicy.MERGE_IMAGE) { | ||
devfileContext.sidecarPolicy = SidecarPolicy.MERGE_IMAGE; | ||
} else { | ||
// default is to use dev container | ||
devfileContext.sidecarPolicy = SidecarPolicy.USE_DEV_CONTAINER; | ||
} | ||
} | ||
switch (devfileContext.sidecarPolicy) { | ||
@@ -117,0 +128,0 @@ case 'mergeImage': |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
200951
3246