refactor: remove compose from the status bar

### What does this PR do?

Removes compose from the status bar since we are not implementing
onboarding.

This does NOT remove the excess code from `compose-extension.ts` yet.
This will be need to be cleaned up in the future.

### Screenshot/screencast of this PR

<!-- Please include a screenshot or a screencast
explaining what is doing this PR -->

N/A, should not appear anymore

### What issues does this PR fix or reference?

<!-- Include any related issues from Podman Desktop
repository (or from another issue tracker). -->

Closes https://github.com/containers/podman-desktop/issues/3809

### How to test this PR?

<!-- Please explain steps to reproduce -->

Signed-off-by: Charlie Drage <charlie@charliedrage.com>
This commit is contained in:
Charlie Drage 2023-10-24 08:35:52 -04:00 committed by Florent BENOIT
parent ee08486435
commit a2557b9ae1

View file

@ -19,26 +19,15 @@
import { Octokit } from '@octokit/rest';
import * as extensionApi from '@podman-desktop/api';
import { Detect } from './detect';
import { ComposeExtension } from './compose-extension';
import type { ComposeGithubReleaseArtifactMetadata } from './compose-github-releases';
import { ComposeGitHubReleases } from './compose-github-releases';
import { OS } from './os';
import { ComposeWrapperGenerator } from './compose-wrapper-generator';
import * as path from 'path';
import * as handler from './handler';
import { ComposeDownload } from './download';
let composeExtension: ComposeExtension | undefined;
let composeVersionMetadata: ComposeGithubReleaseArtifactMetadata | undefined;
export async function activate(extensionContext: extensionApi.ExtensionContext): Promise<void> {
// Post activation
setTimeout(() => {
postActivate(extensionContext).catch((error: unknown) => {
console.error('Error activating extension', error);
});
}, 0);
// Check docker-compose binary has been downloaded and update both
// the configuration setting and the context accordingly
await handler.updateConfigAndContextComposeBinary(extensionContext);
@ -162,23 +151,3 @@ export async function activate(extensionContext: extensionApi.ExtensionContext):
const provider = extensionApi.provider.createProvider(providerOptions);
extensionContext.subscriptions.push(provider);
}
async function postActivate(extensionContext: extensionApi.ExtensionContext): Promise<void> {
const octokit = new Octokit();
const os = new OS();
const podmanComposeGenerator = new ComposeWrapperGenerator(os, path.resolve(extensionContext.storagePath, 'bin'));
composeExtension = new ComposeExtension(
extensionContext,
new Detect(os, extensionContext.storagePath),
new ComposeGitHubReleases(octokit),
os,
podmanComposeGenerator,
);
await composeExtension.activate();
}
export async function deactivate(): Promise<void> {
if (composeExtension) {
await composeExtension.deactivate();
}
}