Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion build/esbuild.extension.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ async function buildExtension() {
if (!isWatch) {
console.log('🔍 Running TypeScript type-checking...');
try {
execSync('tsc --noEmit -p tsconfig.json', { stdio: 'inherit' });
execSync(`node "${require.resolve('typescript/bin/tsc')}" --noEmit -p tsconfig.json`, { stdio: 'inherit' });
} catch (err) {
console.error('❌ TypeScript type-checking failed.');
process.exit(1);
Expand Down
2 changes: 1 addition & 1 deletion build/esbuild.webviews.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ const isWatch = process.argv.includes('--watch');
// Verify the WebViews (skip in watch mode - VS Code editor handles this)
if (!isWatch) {
try {
execSync('tsc --noEmit -p ./src/webview/tsconfig.json', { stdio: 'inherit' });
execSync(`node "${require.resolve('typescript/bin/tsc')}" --noEmit -p ./src/webview/tsconfig.json`, { stdio: 'inherit' });
} catch (err) {
console.error('❌ TypeScript type-checking failed.');
process.exit(1);
Expand Down
24 changes: 17 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -1820,27 +1820,27 @@
},
{
"command": "openshift.component.dev",
"when": "view == openshiftComponentsView && viewItem =~ /openshift\\.component.*\\.dev-nrn.*/",
"when": "view == openshiftComponentsView && viewItem =~ /openshift\\.component.*\\.dev-nrn.*/ && !(viewItem =~ /.*\\.dep-(?:str|run|stp).*/)",
"group": "c1@1"
},
{
"command": "openshift.component.dev.manual",
"when": "view == openshiftComponentsView && viewItem =~ /openshift\\.component.*\\.dev-nrn.*/",
"when": "view == openshiftComponentsView && viewItem =~ /openshift\\.component.*\\.dev-nrn.*/ && !(viewItem =~ /.*\\.dep-(?:str|run|stp).*/)",
"group": "c1@2"
},
{
"command": "openshift.component.dev.onPodman",
"when": "view == openshiftComponentsView && viewItem =~ /openshift\\.component.*\\.dev-nrn.*/",
"when": "view == openshiftComponentsView && viewItem =~ /openshift\\.component.*\\.dev-nrn.*/ && !(viewItem =~ /.*\\.dep-(?:str|run|stp).*/)",
"group": "c1@3"
},
{
"command": "openshift.component.dev.onPodman.manual",
"when": "view == openshiftComponentsView && viewItem =~ /openshift\\.component.*\\.dev-nrn.*/",
"when": "view == openshiftComponentsView && viewItem =~ /openshift\\.component.*\\.dev-nrn.*/ && !(viewItem =~ /.*\\.dep-(?:str|run|stp).*/)",
"group": "c1@4"
},
{
"command": "openshift.component.exitDevMode",
"when": "view == openshiftComponentsView && viewItem =~ /openshift\\.component.*\\.dev-(?:str)|(?:run).*/",
"when": "view == openshiftComponentsView && viewItem =~ /openshift\\.component.*\\.dev-(?:str|run).*/",
"group": "c1@5"
},
{
Expand All @@ -1850,12 +1850,12 @@
},
{
"command": "openshift.component.deploy",
"when": "view == openshiftComponentsView && viewItem =~ /openshift\\.component.*\\.dep-nrn.*/ || viewItem =~ /openshift\\.component.*\\.dep-run.*/",
"when": "view == openshiftComponentsView && viewItem =~ /openshift\\.component.*\\.dep-nrn.*/ && viewItem =~ /.*\\.dev-nrn.*/",
"group": "c2@0"
},
{
"command": "openshift.component.undeploy",
"when": "view == openshiftComponentsView && viewItem =~ /openshift\\.component.*\\.dep-nrn.*/ || viewItem =~ /openshift\\.component.*\\.dep-run.*/",
"when": "view == openshiftComponentsView && viewItem =~ /openshift\\.component.*\\.dep-run.*/ && viewItem =~ /.*\\.dev-nrn.*/",
"group": "c2@1"
},
{
Expand Down Expand Up @@ -2243,6 +2243,16 @@
"default": false,
"description": "Force extension to search for `oc` and `odo` CLI tools in PATH locations before using bundled binaries."
},
"openshiftToolkit.containerRegistryUrl": {
"type": "string",
"default": "",
"description": "Default container image registry URL for deploying components (e.g. quay.io, docker.io, ghcr.io)."
},
"openshiftToolkit.containerRegistryUsername": {
"type": "string",
"default": "",
"description": "Default username for the container image registry."
},
"openshiftToolkit.stopDevModeTimeout": {
"type": "number",
"default": 90000,
Expand Down
18 changes: 10 additions & 8 deletions src/componentsView.ts
Original file line number Diff line number Diff line change
Expand Up @@ -129,18 +129,20 @@ export class ComponentsTreeDataProvider extends BaseTreeDataProvider<ComponentIn
this.odoWorkspace.onDidChangeComponents(() => {
this.refresh();
});
Component.onDidStateChanged(() => this.refresh());
Component.onDidStateChanged((ctx) => this.refresh(ctx));
}

private refresh(contextPath?: string): void {
if (contextPath) {
const folder = this.odoWorkspace.findComponent(vsc.workspace.getWorkspaceFolder(vsc.Uri.parse(contextPath)));
this.onDidChangeTreeDataEmitter.fire(new ComponentInfoRoot(folder));
} else {
this.children = undefined; // Invalidate children cache so they wll be re-created
this.odoWorkspace.reset();
this.onDidChangeTreeDataEmitter.fire(undefined);
if (contextPath && this.children) {
const node = this.children.find(c => c.contextPath === contextPath);
if (node) {
this.onDidChangeTreeDataEmitter.fire(node);
return;
}
}
this.children = undefined;
this.odoWorkspace.reset();
this.onDidChangeTreeDataEmitter.fire(undefined);
}

@vsCommand('openshift.componentsView.refresh')
Expand Down
Loading
Loading