-
Notifications
You must be signed in to change notification settings - Fork 149
Expand file tree
/
Copy pathDockefileProjectLanguageStep.ts
More file actions
26 lines (22 loc) · 1.38 KB
/
DockefileProjectLanguageStep.ts
File metadata and controls
26 lines (22 loc) · 1.38 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.md in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import { AzureWizardPromptStep, type IAzureQuickPickItem } from "@microsoft/vscode-azext-utils";
import { ProjectLanguage } from "../../../constants";
import { type IDockerfileProjectContext } from "./IDockerfileProjectContext";
export class DockerfileProjectLanguageStep extends AzureWizardPromptStep<IDockerfileProjectContext> {
public async prompt(context: IDockerfileProjectContext): Promise<void> {
const language: IAzureQuickPickItem<string>[] = [
{ label: ProjectLanguage.JavaScript, data: 'node' },
{ label: ProjectLanguage.TypeScript, data: 'typescript' },
{ label: ProjectLanguage.Python, data: 'python' },
{ label: ProjectLanguage.CSharp, data: 'csharp' },
{ label: ProjectLanguage.PowerShell, data: 'powershell' },
];
context.projectLanguage = (await context.ui.showQuickPick(language, { placeHolder: 'Select a language' })).data;
}
public shouldPrompt(context: IDockerfileProjectContext): boolean {
return !context.projectLanguage;
}
}