Skip to content

Commit

Permalink
feat: noop bootc
Browse files Browse the repository at this point in the history
Updates extension name and adds no-op bootc command

Signed-off-by: Tim deBoer <[email protected]>
  • Loading branch information
deboer-tim committed Jan 8, 2024
1 parent f345f0a commit 8b1d927
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 3 deletions.
19 changes: 16 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "bootc-extension",
"displayName": "boot-c extension",
"description": "Integration with boot-c",
"displayName": "bootc",
"description": "Integration with bootc",
"version": "0.1.0-next",
"icon": "icon.png",
"publisher": "redhat",
Expand All @@ -12,7 +12,20 @@
"main": "./dist/extension.js",
"contributes": {
"configuration": {},
"menus": {}
"menus": {
"dashboard/image": [
{
"command": "bootc.image.build",
"title": "Build Disk Image"
}
]
},
"commands": [
{
"command": "bootc.image.build",
"title": "Build bootable disk image"
}
]
},
"scripts": {
"build": "vite build",
Expand Down
13 changes: 13 additions & 0 deletions src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,26 @@
***********************************************************************/

import type { ExtensionContext } from '@podman-desktop/api';
import * as extensionApi from '@podman-desktop/api';
import { BootC } from './bootc';

let bootc: BootC | undefined;

export async function activate(extensionContext: ExtensionContext): Promise<void> {
bootc = new BootC(extensionContext);
await bootc?.activate();

extensionContext.subscriptions.push(
extensionApi.commands.registerCommand('bootc.image.build', async image => {
const selectedType = await extensionApi.window.showQuickPick(['.oci', '.qcow2', '.ami','.iso'], {
placeHolder: 'Select image type',
});

console.log("Build " + image.name + " to " + selectedType);

return Promise.resolve();
}),
);
}

export async function deactivate(): Promise<void> {
Expand Down

0 comments on commit 8b1d927

Please sign in to comment.