diff --git a/package-lock.json b/package-lock.json index 61d3605af..57d1f22a3 100644 --- a/package-lock.json +++ b/package-lock.json @@ -42,7 +42,7 @@ }, "devDependencies": { "@azure/arm-resources": "^5.2.0", - "@microsoft/eslint-config-azuretools": "^0.2.1", + "@microsoft/eslint-config-azuretools": "^0.2.2", "@microsoft/vscode-azext-dev": "^2.0.2", "@types/fs-extra": "^8.1.0", "@types/gulp": "^4.0.10", @@ -801,9 +801,9 @@ "integrity": "sha512-n1VPsljTSkthsAFYdiWfC+DKzK2WwcRp83Y1YAqdX552BstvsDjft9YXppjUzp11BPsapDoO1LDgrDB0XVsfNQ==" }, "node_modules/@microsoft/eslint-config-azuretools": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/@microsoft/eslint-config-azuretools/-/eslint-config-azuretools-0.2.1.tgz", - "integrity": "sha512-fQ7tVQWjBrXDgv297Czj72XI8AfpxpypluuhFWoSK0pY57tyHE4AZuj8IbmlfB7/QmmtGfgI9uNnBDcgTxVYvA==", + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/@microsoft/eslint-config-azuretools/-/eslint-config-azuretools-0.2.2.tgz", + "integrity": "sha512-oCyqgiK4iCb/pEVeD2OI2EK7I0HSWIoilBoQ0VwTznbB7Ws6Tu3E4q7YqvIr/8fa1kEwo2g91Yt5the8goZveA==", "dev": true, "dependencies": { "@typescript-eslint/parser": "^5.51.0" @@ -13881,9 +13881,9 @@ "integrity": "sha512-n1VPsljTSkthsAFYdiWfC+DKzK2WwcRp83Y1YAqdX552BstvsDjft9YXppjUzp11BPsapDoO1LDgrDB0XVsfNQ==" }, "@microsoft/eslint-config-azuretools": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/@microsoft/eslint-config-azuretools/-/eslint-config-azuretools-0.2.1.tgz", - "integrity": "sha512-fQ7tVQWjBrXDgv297Czj72XI8AfpxpypluuhFWoSK0pY57tyHE4AZuj8IbmlfB7/QmmtGfgI9uNnBDcgTxVYvA==", + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/@microsoft/eslint-config-azuretools/-/eslint-config-azuretools-0.2.2.tgz", + "integrity": "sha512-oCyqgiK4iCb/pEVeD2OI2EK7I0HSWIoilBoQ0VwTznbB7Ws6Tu3E4q7YqvIr/8fa1kEwo2g91Yt5the8goZveA==", "dev": true, "requires": { "@typescript-eslint/parser": "^5.51.0" diff --git a/package.json b/package.json index e9844b0d1..a034855a3 100644 --- a/package.json +++ b/package.json @@ -1141,7 +1141,7 @@ }, "devDependencies": { "@azure/arm-resources": "^5.2.0", - "@microsoft/eslint-config-azuretools": "^0.2.1", + "@microsoft/eslint-config-azuretools": "^0.2.2", "@microsoft/vscode-azext-dev": "^2.0.2", "@types/fs-extra": "^8.1.0", "@types/gulp": "^4.0.10", diff --git a/src/FuncVersion.ts b/src/FuncVersion.ts index 71639b725..2a441ae9d 100644 --- a/src/FuncVersion.ts +++ b/src/FuncVersion.ts @@ -3,7 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { IActionContext, IAzureQuickPickItem, IAzureQuickPickOptions } from '@microsoft/vscode-azext-utils'; +import { type IActionContext, type IAzureQuickPickItem, type IAzureQuickPickOptions } from '@microsoft/vscode-azext-utils'; import { localize } from './localize'; import { openUrl } from './utils/openUrl'; diff --git a/src/FunctionAppResolver.ts b/src/FunctionAppResolver.ts index 7f5031c51..20dfe15d6 100644 --- a/src/FunctionAppResolver.ts +++ b/src/FunctionAppResolver.ts @@ -1,7 +1,7 @@ -import { Site } from "@azure/arm-appservice"; +import { type Site } from "@azure/arm-appservice"; import { uiUtils } from "@microsoft/vscode-azext-azureutils"; -import { IActionContext, ISubscriptionContext, callWithTelemetryAndErrorHandling, nonNullProp, nonNullValue } from "@microsoft/vscode-azext-utils"; -import { AppResource, AppResourceResolver } from "@microsoft/vscode-azext-utils/hostapi"; +import { callWithTelemetryAndErrorHandling, nonNullProp, nonNullValue, type IActionContext, type ISubscriptionContext } from "@microsoft/vscode-azext-utils"; +import { type AppResource, type AppResourceResolver } from "@microsoft/vscode-azext-utils/hostapi"; import { ResolvedFunctionAppResource } from "./tree/ResolvedFunctionAppResource"; import { createWebSiteClient } from "./utils/azureClients"; diff --git a/src/LocalResourceProvider.ts b/src/LocalResourceProvider.ts index a95b6ec96..a1f6ddcd7 100644 --- a/src/LocalResourceProvider.ts +++ b/src/LocalResourceProvider.ts @@ -2,13 +2,13 @@ * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { AzExtParentTreeItem, AzExtTreeItem } from "@microsoft/vscode-azext-utils"; -import { WorkspaceResourceProvider } from "@microsoft/vscode-azext-utils/hostapi"; +import { type AzExtParentTreeItem, type AzExtTreeItem } from "@microsoft/vscode-azext-utils"; +import { type WorkspaceResourceProvider } from "@microsoft/vscode-azext-utils/hostapi"; import { Disposable } from "vscode"; import { InitLocalProjectTreeItem } from "./tree/localProject/InitLocalProjectTreeItem"; import { InvalidLocalProjectTreeItem } from "./tree/localProject/InvalidLocalProjectTreeItem"; import { LocalProjectTreeItem } from "./tree/localProject/LocalProjectTreeItem"; -import { LocalProjectInternal, listLocalProjects } from "./workspace/listLocalProjects"; +import { listLocalProjects, type LocalProjectInternal } from "./workspace/listLocalProjects"; export class FunctionsLocalResourceProvider implements WorkspaceResourceProvider { diff --git a/src/commands/addBinding/BindingCreateStep.ts b/src/commands/addBinding/BindingCreateStep.ts index 8a8db0e78..3c75a6ddb 100644 --- a/src/commands/addBinding/BindingCreateStep.ts +++ b/src/commands/addBinding/BindingCreateStep.ts @@ -4,14 +4,14 @@ *--------------------------------------------------------------------------------------------*/ import { AzureWizardExecuteStep } from "@microsoft/vscode-azext-utils"; -import { Progress, Uri, window, workspace } from "vscode"; -import { IFunctionBinding, IFunctionJson } from "../../funcConfig/function"; -import { IBindingTemplate } from "../../templates/IBindingTemplate"; +import { Uri, window, workspace, type Progress } from "vscode"; +import { type IFunctionBinding, type IFunctionJson } from "../../funcConfig/function"; +import { type IBindingTemplate } from "../../templates/IBindingTemplate"; import { confirmEditJsonFile } from '../../utils/fs'; import { nonNullProp } from "../../utils/nonNull"; import { verifyExtensionBundle } from "../../utils/verifyExtensionBundle"; import { getBindingSetting } from "../createFunction/IFunctionWizardContext"; -import { IBindingWizardContext } from "./IBindingWizardContext"; +import { type IBindingWizardContext } from "./IBindingWizardContext"; export class BindingCreateStep extends AzureWizardExecuteStep { public priority: number = 220; diff --git a/src/commands/addBinding/BindingDirectionStep.ts b/src/commands/addBinding/BindingDirectionStep.ts index 7df9150c4..15916d586 100644 --- a/src/commands/addBinding/BindingDirectionStep.ts +++ b/src/commands/addBinding/BindingDirectionStep.ts @@ -3,9 +3,9 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { AzureWizardPromptStep, IAzureQuickPickItem } from '@microsoft/vscode-azext-utils'; +import { AzureWizardPromptStep, type IAzureQuickPickItem } from '@microsoft/vscode-azext-utils'; import { localize } from '../../localize'; -import { IBindingWizardContext } from './IBindingWizardContext'; +import { type IBindingWizardContext } from './IBindingWizardContext'; export class BindingDirectionStep extends AzureWizardPromptStep { public hideStepCount: boolean = true; diff --git a/src/commands/addBinding/BindingListStep.ts b/src/commands/addBinding/BindingListStep.ts index 1b9246662..bdb0c42d4 100644 --- a/src/commands/addBinding/BindingListStep.ts +++ b/src/commands/addBinding/BindingListStep.ts @@ -3,14 +3,14 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { AzureWizardPromptStep, IAzureQuickPickItem, IWizardOptions } from '@microsoft/vscode-azext-utils'; -import { ProjectLanguage } from '../../constants'; +import { AzureWizardPromptStep, type IAzureQuickPickItem, type IWizardOptions } from '@microsoft/vscode-azext-utils'; +import { type FuncVersion } from '../../FuncVersion'; +import { type ProjectLanguage } from '../../constants'; import { ext } from '../../extensionVariables'; -import { FuncVersion } from '../../FuncVersion'; import { localize } from '../../localize'; -import { IBindingTemplate } from '../../templates/IBindingTemplate'; +import { type IBindingTemplate } from '../../templates/IBindingTemplate'; import { nonNullProp } from '../../utils/nonNull'; -import { IBindingWizardContext } from './IBindingWizardContext'; +import { type IBindingWizardContext } from './IBindingWizardContext'; import { addBindingSettingSteps } from './settingSteps/addBindingSettingSteps'; export class BindingListStep extends AzureWizardPromptStep { diff --git a/src/commands/addBinding/IBindingWizardContext.ts b/src/commands/addBinding/IBindingWizardContext.ts index 16a06f2ff..d45139dc4 100644 --- a/src/commands/addBinding/IBindingWizardContext.ts +++ b/src/commands/addBinding/IBindingWizardContext.ts @@ -3,11 +3,11 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { ProjectLanguage } from "../../constants"; -import { IFunctionBinding } from "../../funcConfig/function"; -import { FuncVersion } from "../../FuncVersion"; -import { IBindingTemplate } from "../../templates/IBindingTemplate"; -import { IFunctionWizardContext } from "../createFunction/IFunctionWizardContext"; +import { type ProjectLanguage } from "../../constants"; +import { type IFunctionBinding } from "../../funcConfig/function"; +import { type FuncVersion } from "../../FuncVersion"; +import { type IBindingTemplate } from "../../templates/IBindingTemplate"; +import { type IFunctionWizardContext } from "../createFunction/IFunctionWizardContext"; export interface IBindingWizardContext extends IFunctionWizardContext { functionJsonPath: string; diff --git a/src/commands/addBinding/addBinding.ts b/src/commands/addBinding/addBinding.ts index cb813ff7f..064371e46 100644 --- a/src/commands/addBinding/addBinding.ts +++ b/src/commands/addBinding/addBinding.ts @@ -3,21 +3,21 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { AzureWizard, IActionContext } from "@microsoft/vscode-azext-utils"; -import { Uri, WorkspaceFolder } from "vscode"; -import { ProjectLanguage, projectTemplateKeySetting } from "../../constants"; +import { type AzureWizard, type IActionContext } from "@microsoft/vscode-azext-utils"; +import { Uri, type WorkspaceFolder } from "vscode"; +import { type FuncVersion } from "../../FuncVersion"; +import { projectTemplateKeySetting, type ProjectLanguage } from "../../constants"; import { ext } from "../../extensionVariables"; -import { FuncVersion } from "../../FuncVersion"; import { localize } from "../../localize"; -import { LocalFunctionTreeItem } from "../../tree/localProject/LocalFunctionTreeItem"; -import { LocalProjectTreeItem } from "../../tree/localProject/LocalProjectTreeItem"; +import { type LocalFunctionTreeItem } from "../../tree/localProject/LocalFunctionTreeItem"; +import { type LocalProjectTreeItem } from "../../tree/localProject/LocalProjectTreeItem"; import { nonNullValue } from "../../utils/nonNull"; import { getContainingWorkspace } from "../../utils/workspace"; import { getWorkspaceSetting } from "../../vsCodeConfig/settings"; import { verifyInitForVSCode } from "../../vsCodeConfig/verifyInitForVSCode"; import { tryGetFunctionProjectRoot } from "../createNewProject/verifyIsProject"; +import { type IBindingWizardContext } from "./IBindingWizardContext"; import { createBindingWizard } from "./createBindingWizard"; -import { IBindingWizardContext } from "./IBindingWizardContext"; export async function addBinding(context: IActionContext, data: Uri | LocalFunctionTreeItem | undefined): Promise { let functionJsonPath: string; diff --git a/src/commands/addBinding/createBindingWizard.ts b/src/commands/addBinding/createBindingWizard.ts index 41ef5a831..a044f28a6 100644 --- a/src/commands/addBinding/createBindingWizard.ts +++ b/src/commands/addBinding/createBindingWizard.ts @@ -8,7 +8,7 @@ import { localize } from "../../localize"; import { BindingCreateStep } from "./BindingCreateStep"; import { BindingDirectionStep } from "./BindingDirectionStep"; import { BindingListStep } from "./BindingListStep"; -import { IBindingWizardContext } from "./IBindingWizardContext"; +import { type IBindingWizardContext } from "./IBindingWizardContext"; export function createBindingWizard(wizardContext: IBindingWizardContext): AzureWizard { return new AzureWizard(wizardContext, { diff --git a/src/commands/addBinding/settingSteps/AzureConnectionCreateStepBase.ts b/src/commands/addBinding/settingSteps/AzureConnectionCreateStepBase.ts index 39adaf717..0254eddba 100644 --- a/src/commands/addBinding/settingSteps/AzureConnectionCreateStepBase.ts +++ b/src/commands/addBinding/settingSteps/AzureConnectionCreateStepBase.ts @@ -4,13 +4,13 @@ *--------------------------------------------------------------------------------------------*/ import { AzureWizardExecuteStep } from '@microsoft/vscode-azext-utils'; -import { Progress } from 'vscode'; +import { type Progress } from 'vscode'; import { setLocalAppSetting } from '../../../funcConfig/local.settings'; import { localize } from '../../../localize'; -import { IBindingSetting } from '../../../templates/IBindingTemplate'; +import { type IBindingSetting } from '../../../templates/IBindingTemplate'; import { nonNullProp } from '../../../utils/nonNull'; import { setBindingSetting } from '../../createFunction/IFunctionWizardContext'; -import { IBindingWizardContext } from '../IBindingWizardContext'; +import { type IBindingWizardContext } from '../IBindingWizardContext'; export interface IConnection { name: string; diff --git a/src/commands/addBinding/settingSteps/BindingNameStep.ts b/src/commands/addBinding/settingSteps/BindingNameStep.ts index de6d699b4..ab3f75f85 100644 --- a/src/commands/addBinding/settingSteps/BindingNameStep.ts +++ b/src/commands/addBinding/settingSteps/BindingNameStep.ts @@ -6,7 +6,7 @@ import { AzExtFsExtra } from '@microsoft/vscode-azext-utils'; import { ParsedFunctionJson } from '../../../funcConfig/function'; import { localize } from '../../../localize'; -import { IBindingWizardContext } from '../IBindingWizardContext'; +import { type IBindingWizardContext } from '../IBindingWizardContext'; import { StringPromptStep } from './StringPromptStep'; export class BindingNameStep extends StringPromptStep { diff --git a/src/commands/addBinding/settingSteps/BindingSettingStepBase.ts b/src/commands/addBinding/settingSteps/BindingSettingStepBase.ts index 5dc9f66f7..46566fc04 100644 --- a/src/commands/addBinding/settingSteps/BindingSettingStepBase.ts +++ b/src/commands/addBinding/settingSteps/BindingSettingStepBase.ts @@ -4,10 +4,10 @@ *--------------------------------------------------------------------------------------------*/ import { AzureWizardPromptStep } from "@microsoft/vscode-azext-utils"; -import { BindingSettingValue } from "../../../funcConfig/function"; -import { IBindingSetting } from "../../../templates/IBindingTemplate"; +import { type BindingSettingValue } from "../../../funcConfig/function"; +import { type IBindingSetting } from "../../../templates/IBindingTemplate"; import { getBindingSetting, setBindingSetting } from "../../createFunction/IFunctionWizardContext"; -import { IBindingWizardContext } from "../IBindingWizardContext"; +import { type IBindingWizardContext } from "../IBindingWizardContext"; export abstract class BindingSettingStepBase extends AzureWizardPromptStep { protected readonly _setting: IBindingSetting; diff --git a/src/commands/addBinding/settingSteps/BooleanPromptStep.ts b/src/commands/addBinding/settingSteps/BooleanPromptStep.ts index 9754c3a16..4113b77ed 100644 --- a/src/commands/addBinding/settingSteps/BooleanPromptStep.ts +++ b/src/commands/addBinding/settingSteps/BooleanPromptStep.ts @@ -3,10 +3,10 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { IAzureQuickPickItem } from "@microsoft/vscode-azext-utils"; -import { BindingSettingValue } from "../../../funcConfig/function"; +import { type IAzureQuickPickItem } from "@microsoft/vscode-azext-utils"; +import { type BindingSettingValue } from "../../../funcConfig/function"; import { envUtils } from "../../../utils/envUtils"; -import { IBindingWizardContext } from "../IBindingWizardContext"; +import { type IBindingWizardContext } from "../IBindingWizardContext"; import { BindingSettingStepBase } from "./BindingSettingStepBase"; export class BooleanPromptStep extends BindingSettingStepBase { diff --git a/src/commands/addBinding/settingSteps/EnumPromptStep.ts b/src/commands/addBinding/settingSteps/EnumPromptStep.ts index 44d0d3b87..06478e374 100644 --- a/src/commands/addBinding/settingSteps/EnumPromptStep.ts +++ b/src/commands/addBinding/settingSteps/EnumPromptStep.ts @@ -3,9 +3,9 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { IAzureQuickPickItem } from "@microsoft/vscode-azext-utils"; -import { BindingSettingValue } from "../../../funcConfig/function"; -import { IBindingWizardContext } from "../IBindingWizardContext"; +import { type IAzureQuickPickItem } from "@microsoft/vscode-azext-utils"; +import { type BindingSettingValue } from "../../../funcConfig/function"; +import { type IBindingWizardContext } from "../IBindingWizardContext"; import { BindingSettingStepBase } from "./BindingSettingStepBase"; export class EnumPromptStep extends BindingSettingStepBase { diff --git a/src/commands/addBinding/settingSteps/LocalAppSettingCreateStep.ts b/src/commands/addBinding/settingSteps/LocalAppSettingCreateStep.ts index 7c73ff450..706484f2f 100644 --- a/src/commands/addBinding/settingSteps/LocalAppSettingCreateStep.ts +++ b/src/commands/addBinding/settingSteps/LocalAppSettingCreateStep.ts @@ -4,14 +4,14 @@ *--------------------------------------------------------------------------------------------*/ import { AzureWizardExecuteStep } from '@microsoft/vscode-azext-utils'; -import { Progress } from 'vscode'; +import { type Progress } from 'vscode'; import { localSettingsFileName } from '../../../constants'; import { setLocalAppSetting } from '../../../funcConfig/local.settings'; import { localize } from '../../../localize'; -import { IBindingSetting } from '../../../templates/IBindingTemplate'; +import { type IBindingSetting } from '../../../templates/IBindingTemplate'; import { nonNullProp, nonNullValue } from '../../../utils/nonNull'; import { getBindingSetting } from '../../createFunction/IFunctionWizardContext'; -import { IBindingWizardContext } from '../IBindingWizardContext'; +import { type IBindingWizardContext } from '../IBindingWizardContext'; export class LocalAppSettingCreateStep extends AzureWizardExecuteStep { public priority: number = 210; diff --git a/src/commands/addBinding/settingSteps/LocalAppSettingListStep.ts b/src/commands/addBinding/settingSteps/LocalAppSettingListStep.ts index 25228a347..ca71538a1 100644 --- a/src/commands/addBinding/settingSteps/LocalAppSettingListStep.ts +++ b/src/commands/addBinding/settingSteps/LocalAppSettingListStep.ts @@ -4,18 +4,18 @@ *--------------------------------------------------------------------------------------------*/ import { StorageAccountKind, StorageAccountListStep, StorageAccountPerformance, StorageAccountReplication } from '@microsoft/vscode-azext-azureutils'; -import { AzureWizardExecuteStep, AzureWizardPromptStep, IAzureQuickPickItem, ISubscriptionActionContext, IWizardOptions } from '@microsoft/vscode-azext-utils'; +import { type AzureWizardExecuteStep, type AzureWizardPromptStep, type IAzureQuickPickItem, type ISubscriptionActionContext, type IWizardOptions } from '@microsoft/vscode-azext-utils'; import * as path from 'path'; import { localSettingsFileName } from '../../../constants'; import { ext } from '../../../extensionVariables'; -import { BindingSettingValue } from '../../../funcConfig/function'; -import { ILocalSettingsJson, getLocalSettingsJson } from '../../../funcConfig/local.settings'; +import { type BindingSettingValue } from '../../../funcConfig/function'; +import { getLocalSettingsJson, type ILocalSettingsJson } from '../../../funcConfig/local.settings'; import { localize } from '../../../localize'; import { ResourceType } from '../../../templates/IBindingTemplate'; -import { EventHubsNamespaceListStep } from '../../createFunction/durableSteps/netherite/EventHubsNamespaceListStep'; +import { type IEventHubsConnectionWizardContext } from '../../appSettings/connectionSettings/eventHubs/IEventHubsConnectionWizardContext'; import { getBindingSetting } from '../../createFunction/IFunctionWizardContext'; -import { IBindingWizardContext } from '../IBindingWizardContext'; -import { IEventHubsConnectionWizardContext } from '../../appSettings/connectionSettings/eventHubs/IEventHubsConnectionWizardContext'; +import { EventHubsNamespaceListStep } from '../../createFunction/durableSteps/netherite/EventHubsNamespaceListStep'; +import { type IBindingWizardContext } from '../IBindingWizardContext'; import { BindingSettingStepBase } from './BindingSettingStepBase'; import { LocalAppSettingCreateStep } from './LocalAppSettingCreateStep'; import { LocalAppSettingNameStep } from './LocalAppSettingNameStep'; diff --git a/src/commands/addBinding/settingSteps/LocalAppSettingNameStep.ts b/src/commands/addBinding/settingSteps/LocalAppSettingNameStep.ts index 53b79e609..ebc176ee1 100644 --- a/src/commands/addBinding/settingSteps/LocalAppSettingNameStep.ts +++ b/src/commands/addBinding/settingSteps/LocalAppSettingNameStep.ts @@ -3,10 +3,10 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { BindingSettingValue } from '../../../funcConfig/function'; +import { type BindingSettingValue } from '../../../funcConfig/function'; import { localize } from '../../../localize'; import { nonNullProp } from '../../../utils/nonNull'; -import { IBindingWizardContext } from '../IBindingWizardContext'; +import { type IBindingWizardContext } from '../IBindingWizardContext'; import { BindingSettingStepBase } from './BindingSettingStepBase'; export class LocalAppSettingNameStep extends BindingSettingStepBase { diff --git a/src/commands/addBinding/settingSteps/LocalAppSettingValueStep.ts b/src/commands/addBinding/settingSteps/LocalAppSettingValueStep.ts index c1056cb95..c52fc2542 100644 --- a/src/commands/addBinding/settingSteps/LocalAppSettingValueStep.ts +++ b/src/commands/addBinding/settingSteps/LocalAppSettingValueStep.ts @@ -5,7 +5,7 @@ import { AzureWizardPromptStep } from '@microsoft/vscode-azext-utils'; import { localize } from '../../../localize'; -import { IBindingWizardContext } from '../IBindingWizardContext'; +import { type IBindingWizardContext } from '../IBindingWizardContext'; export class LocalAppSettingValueStep extends AzureWizardPromptStep { private readonly _key: string; diff --git a/src/commands/addBinding/settingSteps/StorageConnectionCreateStep.ts b/src/commands/addBinding/settingSteps/StorageConnectionCreateStep.ts index 069ca79a5..abc1a00de 100644 --- a/src/commands/addBinding/settingSteps/StorageConnectionCreateStep.ts +++ b/src/commands/addBinding/settingSteps/StorageConnectionCreateStep.ts @@ -3,10 +3,10 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { IStorageAccountWizardContext } from '@microsoft/vscode-azext-azureutils'; +import { type IStorageAccountWizardContext } from '@microsoft/vscode-azext-azureutils'; import { getStorageConnectionString } from '../../appSettings/connectionSettings/getLocalConnectionSetting'; -import { IBindingWizardContext } from '../IBindingWizardContext'; -import { AzureConnectionCreateStepBase, IConnection } from './AzureConnectionCreateStepBase'; +import { type IBindingWizardContext } from '../IBindingWizardContext'; +import { AzureConnectionCreateStepBase, type IConnection } from './AzureConnectionCreateStepBase'; export class StorageConnectionCreateStep extends AzureConnectionCreateStepBase { public async getConnection(context: IStorageAccountWizardContext): Promise { diff --git a/src/commands/addBinding/settingSteps/StringPromptStep.ts b/src/commands/addBinding/settingSteps/StringPromptStep.ts index bcf7e2b7b..6d1699d3f 100644 --- a/src/commands/addBinding/settingSteps/StringPromptStep.ts +++ b/src/commands/addBinding/settingSteps/StringPromptStep.ts @@ -3,9 +3,9 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { BindingSettingValue } from "../../../funcConfig/function"; +import { type BindingSettingValue } from "../../../funcConfig/function"; import { localize } from "../../../localize"; -import { IBindingWizardContext } from "../IBindingWizardContext"; +import { type IBindingWizardContext } from "../IBindingWizardContext"; import { BindingSettingStepBase } from "./BindingSettingStepBase"; export class StringPromptStep extends BindingSettingStepBase { diff --git a/src/commands/addBinding/settingSteps/addBindingSettingSteps.ts b/src/commands/addBinding/settingSteps/addBindingSettingSteps.ts index 529fd71f4..a28df0b99 100644 --- a/src/commands/addBinding/settingSteps/addBindingSettingSteps.ts +++ b/src/commands/addBinding/settingSteps/addBindingSettingSteps.ts @@ -3,9 +3,9 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { AzureWizardPromptStep } from "@microsoft/vscode-azext-utils"; -import { IBindingSetting, ResourceType, ValueType } from "../../../templates/IBindingTemplate"; -import { IBindingWizardContext } from "../IBindingWizardContext"; +import { type AzureWizardPromptStep } from "@microsoft/vscode-azext-utils"; +import { ResourceType, ValueType, type IBindingSetting } from "../../../templates/IBindingTemplate"; +import { type IBindingWizardContext } from "../IBindingWizardContext"; import { BindingNameStep } from "./BindingNameStep"; import { BooleanPromptStep } from "./BooleanPromptStep"; import { EnumPromptStep } from "./EnumPromptStep"; diff --git a/src/commands/addBinding/settingSteps/cosmosDB/CosmosDBConnectionCreateStep.ts b/src/commands/addBinding/settingSteps/cosmosDB/CosmosDBConnectionCreateStep.ts index da99337ab..8cda4801d 100644 --- a/src/commands/addBinding/settingSteps/cosmosDB/CosmosDBConnectionCreateStep.ts +++ b/src/commands/addBinding/settingSteps/cosmosDB/CosmosDBConnectionCreateStep.ts @@ -3,13 +3,13 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { CosmosDBManagementClient, DatabaseAccountGetResults, DatabaseAccountListKeysResult } from '@azure/arm-cosmosdb'; +import { type CosmosDBManagementClient, type DatabaseAccountGetResults, type DatabaseAccountListKeysResult } from '@azure/arm-cosmosdb'; import { getResourceGroupFromId } from '@microsoft/vscode-azext-azureutils'; import { createCosmosDBClient } from '../../../../utils/azureClients'; import { nonNullProp } from '../../../../utils/nonNull'; -import { IBindingWizardContext } from '../../IBindingWizardContext'; -import { AzureConnectionCreateStepBase, IConnection } from '../AzureConnectionCreateStepBase'; -import { ICosmosDBWizardContext } from './ICosmosDBWizardContext'; +import { type IBindingWizardContext } from '../../IBindingWizardContext'; +import { AzureConnectionCreateStepBase, type IConnection } from '../AzureConnectionCreateStepBase'; +import { type ICosmosDBWizardContext } from './ICosmosDBWizardContext'; export class CosmosDBConnectionCreateStep extends AzureConnectionCreateStepBase { public async getConnection(context: ICosmosDBWizardContext): Promise { diff --git a/src/commands/addBinding/settingSteps/cosmosDB/CosmosDBListStep.ts b/src/commands/addBinding/settingSteps/cosmosDB/CosmosDBListStep.ts index 3c2c66817..39a8a819a 100644 --- a/src/commands/addBinding/settingSteps/cosmosDB/CosmosDBListStep.ts +++ b/src/commands/addBinding/settingSteps/cosmosDB/CosmosDBListStep.ts @@ -3,13 +3,13 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { CosmosDBManagementClient } from '@azure/arm-cosmosdb'; +import { type CosmosDBManagementClient } from '@azure/arm-cosmosdb'; import { uiUtils } from '@microsoft/vscode-azext-azureutils'; import { AzureWizardPromptStep } from '@microsoft/vscode-azext-utils'; import { localize } from '../../../../localize'; import { promptForResource } from '../../../../utils/azure'; import { createCosmosDBClient } from '../../../../utils/azureClients'; -import { ICosmosDBWizardContext } from './ICosmosDBWizardContext'; +import { type ICosmosDBWizardContext } from './ICosmosDBWizardContext'; export class CosmosDBListStep extends AzureWizardPromptStep { public async prompt(context: ICosmosDBWizardContext): Promise { diff --git a/src/commands/addBinding/settingSteps/cosmosDB/ICosmosDBWizardContext.ts b/src/commands/addBinding/settingSteps/cosmosDB/ICosmosDBWizardContext.ts index c0af0389e..c5307749f 100644 --- a/src/commands/addBinding/settingSteps/cosmosDB/ICosmosDBWizardContext.ts +++ b/src/commands/addBinding/settingSteps/cosmosDB/ICosmosDBWizardContext.ts @@ -3,8 +3,8 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { DatabaseAccountGetResults } from '@azure/arm-cosmosdb'; -import { ISubscriptionActionContext } from '@microsoft/vscode-azext-utils'; +import { type DatabaseAccountGetResults } from '@azure/arm-cosmosdb'; +import { type ISubscriptionActionContext } from '@microsoft/vscode-azext-utils'; export interface ICosmosDBWizardContext extends ISubscriptionActionContext { databaseAccount?: DatabaseAccountGetResults; diff --git a/src/commands/addBinding/settingSteps/eventHub/EventHubAuthRuleListStep.ts b/src/commands/addBinding/settingSteps/eventHub/EventHubAuthRuleListStep.ts index 8b85958d0..27e5902d7 100644 --- a/src/commands/addBinding/settingSteps/eventHub/EventHubAuthRuleListStep.ts +++ b/src/commands/addBinding/settingSteps/eventHub/EventHubAuthRuleListStep.ts @@ -3,14 +3,14 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { AuthorizationRule, EventHubManagementClient } from '@azure/arm-eventhub'; +import { type AuthorizationRule, type EventHubManagementClient } from '@azure/arm-eventhub'; import { uiUtils } from '@microsoft/vscode-azext-azureutils'; import { AzureWizardPromptStep, nonNullValueAndProp } from '@microsoft/vscode-azext-utils'; import { localize } from '../../../../localize'; -import { IBaseResourceWithName, promptForResource } from '../../../../utils/azure'; +import { promptForResource, type IBaseResourceWithName } from '../../../../utils/azure'; import { createEventHubClient } from '../../../../utils/azureClients'; import { nonNullProp } from '../../../../utils/nonNull'; -import { IEventHubWizardContext } from './IEventHubWizardContext'; +import { type IEventHubWizardContext } from './IEventHubWizardContext'; export class EventHubAuthRuleListStep extends AzureWizardPromptStep { public async prompt(context: IEventHubWizardContext): Promise { diff --git a/src/commands/addBinding/settingSteps/eventHub/EventHubConnectionCreateStep.ts b/src/commands/addBinding/settingSteps/eventHub/EventHubConnectionCreateStep.ts index 08a0a9aec..4e725a62b 100644 --- a/src/commands/addBinding/settingSteps/eventHub/EventHubConnectionCreateStep.ts +++ b/src/commands/addBinding/settingSteps/eventHub/EventHubConnectionCreateStep.ts @@ -3,13 +3,13 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { AccessKeys, EventHubManagementClient } from '@azure/arm-eventhub'; +import { type AccessKeys, type EventHubManagementClient } from '@azure/arm-eventhub'; import { nonNullValueAndProp } from '@microsoft/vscode-azext-utils'; import { createEventHubClient } from '../../../../utils/azureClients'; import { nonNullProp } from '../../../../utils/nonNull'; -import { IBindingWizardContext } from '../../IBindingWizardContext'; -import { AzureConnectionCreateStepBase, IConnection } from '../AzureConnectionCreateStepBase'; -import { IEventHubWizardContext } from './IEventHubWizardContext'; +import { type IBindingWizardContext } from '../../IBindingWizardContext'; +import { AzureConnectionCreateStepBase, type IConnection } from '../AzureConnectionCreateStepBase'; +import { type IEventHubWizardContext } from './IEventHubWizardContext'; export class EventHubConnectionCreateStep extends AzureConnectionCreateStepBase { public async getConnection(context: IEventHubWizardContext): Promise { diff --git a/src/commands/addBinding/settingSteps/eventHub/EventHubCreateStep.ts b/src/commands/addBinding/settingSteps/eventHub/EventHubCreateStep.ts index ae4847360..cc941c325 100644 --- a/src/commands/addBinding/settingSteps/eventHub/EventHubCreateStep.ts +++ b/src/commands/addBinding/settingSteps/eventHub/EventHubCreateStep.ts @@ -3,12 +3,12 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { AuthorizationRule, EventHubManagementClient } from '@azure/arm-eventhub'; +import { type AuthorizationRule, type EventHubManagementClient } from '@azure/arm-eventhub'; import { uiUtils } from '@microsoft/vscode-azext-azureutils'; import { AzureWizardExecuteStep, nonNullValueAndProp } from '@microsoft/vscode-azext-utils'; import { createEventHubClient } from '../../../../utils/azureClients'; import { getRandomHexString } from '../../../../utils/fs'; -import { IEventHubWizardContext } from './IEventHubWizardContext'; +import { type IEventHubWizardContext } from './IEventHubWizardContext'; export class EventHubCreateStep extends AzureWizardExecuteStep { // EventHubsNamespaceCreateStep has a priority number of 190, so has to be after that diff --git a/src/commands/addBinding/settingSteps/eventHub/EventHubListStep.ts b/src/commands/addBinding/settingSteps/eventHub/EventHubListStep.ts index 0bd2ddd69..e3a6f0be7 100644 --- a/src/commands/addBinding/settingSteps/eventHub/EventHubListStep.ts +++ b/src/commands/addBinding/settingSteps/eventHub/EventHubListStep.ts @@ -3,14 +3,14 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { EventHubManagementClient, Eventhub } from '@azure/arm-eventhub'; +import { type EventHubManagementClient, type Eventhub } from '@azure/arm-eventhub'; import { uiUtils } from '@microsoft/vscode-azext-azureutils'; -import { AzureWizardPromptStep, IAzureQuickPickItem, IWizardOptions, nonNullValueAndProp } from '@microsoft/vscode-azext-utils'; +import { AzureWizardPromptStep, nonNullValueAndProp, type IAzureQuickPickItem, type IWizardOptions } from '@microsoft/vscode-azext-utils'; import { localize } from '../../../../localize'; import { createEventHubClient } from '../../../../utils/azureClients'; import { nonNullProp } from '../../../../utils/nonNull'; import { EventHubCreateStep } from './EventHubCreateStep'; -import { IEventHubWizardContext } from './IEventHubWizardContext'; +import { type IEventHubWizardContext } from './IEventHubWizardContext'; export class EventHubListStep extends AzureWizardPromptStep { public async prompt(context: IEventHubWizardContext): Promise { diff --git a/src/commands/addBinding/settingSteps/eventHub/EventHubNameStep.ts b/src/commands/addBinding/settingSteps/eventHub/EventHubNameStep.ts index 42a27959e..2e20f262b 100644 --- a/src/commands/addBinding/settingSteps/eventHub/EventHubNameStep.ts +++ b/src/commands/addBinding/settingSteps/eventHub/EventHubNameStep.ts @@ -3,9 +3,9 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { IBindingWizardContext } from '../../IBindingWizardContext'; +import { type IBindingWizardContext } from '../../IBindingWizardContext'; import { StringPromptStep } from '../StringPromptStep'; -import { IEventHubWizardContext } from './IEventHubWizardContext'; +import { type IEventHubWizardContext } from './IEventHubWizardContext'; export class EventHubNameStep extends StringPromptStep { public shouldPrompt(context: IEventHubWizardContext & IBindingWizardContext): boolean { diff --git a/src/commands/addBinding/settingSteps/eventHub/IEventHubWizardContext.ts b/src/commands/addBinding/settingSteps/eventHub/IEventHubWizardContext.ts index c01f06072..6d137fb56 100644 --- a/src/commands/addBinding/settingSteps/eventHub/IEventHubWizardContext.ts +++ b/src/commands/addBinding/settingSteps/eventHub/IEventHubWizardContext.ts @@ -3,9 +3,9 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { AuthorizationRule, EHNamespace } from '@azure/arm-eventhub'; -import { IResourceGroupWizardContext } from '@microsoft/vscode-azext-azureutils'; -import { ISubscriptionActionContext } from '@microsoft/vscode-azext-utils'; +import { type AuthorizationRule, type EHNamespace } from '@azure/arm-eventhub'; +import { type IResourceGroupWizardContext } from '@microsoft/vscode-azext-azureutils'; +import { type ISubscriptionActionContext } from '@microsoft/vscode-azext-utils'; export interface IEventHubWizardContext extends ISubscriptionActionContext, IResourceGroupWizardContext { /** diff --git a/src/commands/addBinding/settingSteps/serviceBus/IServiceBusWizardContext.ts b/src/commands/addBinding/settingSteps/serviceBus/IServiceBusWizardContext.ts index 00bd76793..3285e269f 100644 --- a/src/commands/addBinding/settingSteps/serviceBus/IServiceBusWizardContext.ts +++ b/src/commands/addBinding/settingSteps/serviceBus/IServiceBusWizardContext.ts @@ -3,8 +3,8 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { SBNamespace } from '@azure/arm-servicebus'; -import { ISubscriptionActionContext } from '@microsoft/vscode-azext-utils'; +import { type SBNamespace } from '@azure/arm-servicebus'; +import { type ISubscriptionActionContext } from '@microsoft/vscode-azext-utils'; export interface IServiceBusWizardContext extends ISubscriptionActionContext { sbNamespace?: SBNamespace; diff --git a/src/commands/addBinding/settingSteps/serviceBus/ServiceBusConnectionCreateStep.ts b/src/commands/addBinding/settingSteps/serviceBus/ServiceBusConnectionCreateStep.ts index 309bfc5e0..08b214bb9 100644 --- a/src/commands/addBinding/settingSteps/serviceBus/ServiceBusConnectionCreateStep.ts +++ b/src/commands/addBinding/settingSteps/serviceBus/ServiceBusConnectionCreateStep.ts @@ -3,14 +3,14 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { AccessKeys, SBAuthorizationRule, SBNamespace, ServiceBusManagementClient } from '@azure/arm-servicebus'; +import { type AccessKeys, type SBAuthorizationRule, type SBNamespace, type ServiceBusManagementClient } from '@azure/arm-servicebus'; import { getResourceGroupFromId, uiUtils } from '@microsoft/vscode-azext-azureutils'; import { localize } from '../../../../localize'; import { createServiceBusClient } from '../../../../utils/azureClients'; import { nonNullProp } from '../../../../utils/nonNull'; -import { IBindingWizardContext } from '../../IBindingWizardContext'; -import { AzureConnectionCreateStepBase, IConnection } from '../AzureConnectionCreateStepBase'; -import { IServiceBusWizardContext } from './IServiceBusWizardContext'; +import { type IBindingWizardContext } from '../../IBindingWizardContext'; +import { AzureConnectionCreateStepBase, type IConnection } from '../AzureConnectionCreateStepBase'; +import { type IServiceBusWizardContext } from './IServiceBusWizardContext'; export class ServiceBusConnectionCreateStep extends AzureConnectionCreateStepBase { public async getConnection(context: IServiceBusWizardContext): Promise { diff --git a/src/commands/addBinding/settingSteps/serviceBus/ServiceBusListStep.ts b/src/commands/addBinding/settingSteps/serviceBus/ServiceBusListStep.ts index 927c4b1e8..b5661c4cb 100644 --- a/src/commands/addBinding/settingSteps/serviceBus/ServiceBusListStep.ts +++ b/src/commands/addBinding/settingSteps/serviceBus/ServiceBusListStep.ts @@ -3,13 +3,13 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { ServiceBusManagementClient } from '@azure/arm-servicebus'; +import { type ServiceBusManagementClient } from '@azure/arm-servicebus'; import { uiUtils } from '@microsoft/vscode-azext-azureutils'; import { AzureWizardPromptStep } from '@microsoft/vscode-azext-utils'; import { localize } from '../../../../localize'; import { promptForResource } from '../../../../utils/azure'; import { createServiceBusClient } from '../../../../utils/azureClients'; -import { IServiceBusWizardContext } from './IServiceBusWizardContext'; +import { type IServiceBusWizardContext } from './IServiceBusWizardContext'; export class ServiceBusListStep extends AzureWizardPromptStep { public async prompt(context: IServiceBusWizardContext): Promise { diff --git a/src/commands/api/createFunctionFromApi.ts b/src/commands/api/createFunctionFromApi.ts index 8071781b8..1a1f66009 100644 --- a/src/commands/api/createFunctionFromApi.ts +++ b/src/commands/api/createFunctionFromApi.ts @@ -3,8 +3,8 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { callWithTelemetryAndErrorHandling, IActionContext } from "@microsoft/vscode-azext-utils"; -import * as api from '../../vscode-azurefunctions.api'; +import { callWithTelemetryAndErrorHandling, type IActionContext } from "@microsoft/vscode-azext-utils"; +import type * as api from '../../vscode-azurefunctions.api'; import { createFunctionInternal } from "../createFunction/createFunction"; export async function createFunctionFromApi(options: api.ICreateFunctionOptions): Promise { diff --git a/src/commands/api/downloadAppSettingsFromApi.ts b/src/commands/api/downloadAppSettingsFromApi.ts index eeb0f9bfa..ec91d7092 100644 --- a/src/commands/api/downloadAppSettingsFromApi.ts +++ b/src/commands/api/downloadAppSettingsFromApi.ts @@ -2,8 +2,8 @@ * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { callWithTelemetryAndErrorHandling, IActionContext } from "@microsoft/vscode-azext-utils"; -import { IAppSettingsClient } from "../../vscode-azurefunctions.api"; +import { callWithTelemetryAndErrorHandling, type IActionContext } from "@microsoft/vscode-azext-utils"; +import { type IAppSettingsClient } from "../../vscode-azurefunctions.api"; import { downloadAppSettingsInternal } from "../appSettings/downloadAppSettings"; export async function downloadAppSettingsFromApi(client: IAppSettingsClient): Promise { diff --git a/src/commands/api/revealTreeItem.ts b/src/commands/api/revealTreeItem.ts index b58b43051..521d0fdb3 100644 --- a/src/commands/api/revealTreeItem.ts +++ b/src/commands/api/revealTreeItem.ts @@ -3,7 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { AzExtTreeItem, callWithTelemetryAndErrorHandling, IActionContext } from "@microsoft/vscode-azext-utils"; +import { callWithTelemetryAndErrorHandling, type AzExtTreeItem, type IActionContext } from "@microsoft/vscode-azext-utils"; import { ext } from "../../extensionVariables"; export async function revealTreeItem(resourceId: string): Promise { diff --git a/src/commands/api/uploadAppSettingsFromApi.ts b/src/commands/api/uploadAppSettingsFromApi.ts index a4b4aa46d..bfdc33753 100644 --- a/src/commands/api/uploadAppSettingsFromApi.ts +++ b/src/commands/api/uploadAppSettingsFromApi.ts @@ -2,8 +2,8 @@ * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { callWithTelemetryAndErrorHandling, IActionContext } from "@microsoft/vscode-azext-utils"; -import { IAppSettingsClient } from "../../vscode-azurefunctions.api"; +import { callWithTelemetryAndErrorHandling, type IActionContext } from "@microsoft/vscode-azext-utils"; +import { type IAppSettingsClient } from "../../vscode-azurefunctions.api"; import { uploadAppSettingsInternal } from "../appSettings/uploadAppSettings"; export async function uploadAppSettingsFromApi(client: IAppSettingsClient, exclude?: (RegExp | string)[]): Promise { diff --git a/src/commands/appSettings/connectionSettings/IConnectionPromptOptions.ts b/src/commands/appSettings/connectionSettings/IConnectionPromptOptions.ts index e4fe96d20..0db3f971f 100644 --- a/src/commands/appSettings/connectionSettings/IConnectionPromptOptions.ts +++ b/src/commands/appSettings/connectionSettings/IConnectionPromptOptions.ts @@ -3,7 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { EventHubsConnectionTypeValues, SqlDbConnectionTypeValues, StorageConnectionTypeValues } from "../../../constants"; +import { type EventHubsConnectionTypeValues, type SqlDbConnectionTypeValues, type StorageConnectionTypeValues } from "../../../constants"; export interface IConnectionPromptOptions { preselectedConnectionType?: StorageConnectionTypeValues | EventHubsConnectionTypeValues | SqlDbConnectionTypeValues; diff --git a/src/commands/appSettings/connectionSettings/ISetConnectionSettingContext.ts b/src/commands/appSettings/connectionSettings/ISetConnectionSettingContext.ts index 581f76795..a318a622b 100644 --- a/src/commands/appSettings/connectionSettings/ISetConnectionSettingContext.ts +++ b/src/commands/appSettings/connectionSettings/ISetConnectionSettingContext.ts @@ -3,8 +3,8 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { IActionContext } from "@microsoft/vscode-azext-utils"; -import { CodeActionValues, ConnectionKey } from "../../../constants"; +import { type IActionContext } from "@microsoft/vscode-azext-utils"; +import { type CodeActionValues, type ConnectionKey } from "../../../constants"; export interface ISetConnectionSettingContext extends IActionContext { action: CodeActionValues; diff --git a/src/commands/appSettings/connectionSettings/SetConnectionSettingStepBase.ts b/src/commands/appSettings/connectionSettings/SetConnectionSettingStepBase.ts index 912b0bc19..8306c7f78 100644 --- a/src/commands/appSettings/connectionSettings/SetConnectionSettingStepBase.ts +++ b/src/commands/appSettings/connectionSettings/SetConnectionSettingStepBase.ts @@ -4,9 +4,9 @@ *--------------------------------------------------------------------------------------------*/ import { AzureWizardExecuteStep } from "@microsoft/vscode-azext-utils"; -import { CodeAction, ConnectionKeyValues } from "../../../constants"; +import { CodeAction, type ConnectionKeyValues } from "../../../constants"; import { MismatchBehavior, setLocalAppSetting } from "../../../funcConfig/local.settings"; -import { ISetConnectionSettingContext } from "./ISetConnectionSettingContext"; +import { type ISetConnectionSettingContext } from "./ISetConnectionSettingContext"; export abstract class SetConnectionSettingStepBase extends AzureWizardExecuteStep { public abstract readonly debugDeploySetting: ConnectionKeyValues; diff --git a/src/commands/appSettings/connectionSettings/azureWebJobsStorage/AzureWebJobsStorageExecuteStep.ts b/src/commands/appSettings/connectionSettings/azureWebJobsStorage/AzureWebJobsStorageExecuteStep.ts index 3a20bf3e7..bf34e5fe8 100644 --- a/src/commands/appSettings/connectionSettings/azureWebJobsStorage/AzureWebJobsStorageExecuteStep.ts +++ b/src/commands/appSettings/connectionSettings/azureWebJobsStorage/AzureWebJobsStorageExecuteStep.ts @@ -3,11 +3,11 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { IStorageAccountWizardContext } from '@microsoft/vscode-azext-azureutils'; -import { ConnectionKey, ConnectionKeyValues, ConnectionType, localStorageEmulatorConnectionString } from '../../../../constants'; +import { type IStorageAccountWizardContext } from '@microsoft/vscode-azext-azureutils'; +import { ConnectionKey, ConnectionType, localStorageEmulatorConnectionString, type ConnectionKeyValues } from '../../../../constants'; import { SetConnectionSettingStepBase } from '../SetConnectionSettingStepBase'; import { getStorageConnectionString } from '../getLocalConnectionSetting'; -import { IAzureWebJobsStorageWizardContext } from './IAzureWebJobsStorageWizardContext'; +import { type IAzureWebJobsStorageWizardContext } from './IAzureWebJobsStorageWizardContext'; export class AzureWebJobsStorageExecuteStep extends SetConnectionSettingStepBase { public priority: number = 230; diff --git a/src/commands/appSettings/connectionSettings/azureWebJobsStorage/AzureWebJobsStoragePromptStep.ts b/src/commands/appSettings/connectionSettings/azureWebJobsStorage/AzureWebJobsStoragePromptStep.ts index fd82d4cb6..0752f3d3a 100644 --- a/src/commands/appSettings/connectionSettings/azureWebJobsStorage/AzureWebJobsStoragePromptStep.ts +++ b/src/commands/appSettings/connectionSettings/azureWebJobsStorage/AzureWebJobsStoragePromptStep.ts @@ -4,14 +4,14 @@ *--------------------------------------------------------------------------------------------*/ import { StorageAccountKind, StorageAccountListStep, StorageAccountPerformance, StorageAccountReplication } from '@microsoft/vscode-azext-azureutils'; -import { AzureWizardPromptStep, ISubscriptionActionContext, IWizardOptions } from '@microsoft/vscode-azext-utils'; -import { MessageItem } from 'vscode'; -import { ConnectionType, EventHubsConnectionTypeValues, SqlDbConnectionTypeValues } from '../../../../constants'; +import { AzureWizardPromptStep, type ISubscriptionActionContext, type IWizardOptions } from '@microsoft/vscode-azext-utils'; +import { type MessageItem } from 'vscode'; +import { ConnectionType, type EventHubsConnectionTypeValues, type SqlDbConnectionTypeValues } from '../../../../constants'; import { useEmulator } from '../../../../constants-nls'; import { ext } from '../../../../extensionVariables'; import { localize } from '../../../../localize'; -import { IConnectionPromptOptions } from '../IConnectionPromptOptions'; -import { IAzureWebJobsStorageWizardContext } from './IAzureWebJobsStorageWizardContext'; +import { type IConnectionPromptOptions } from '../IConnectionPromptOptions'; +import { type IAzureWebJobsStorageWizardContext } from './IAzureWebJobsStorageWizardContext'; export class AzureWebJobsStoragePromptStep extends AzureWizardPromptStep { public constructor(private readonly options?: IConnectionPromptOptions) { diff --git a/src/commands/appSettings/connectionSettings/azureWebJobsStorage/IAzureWebJobsStorageWizardContext.ts b/src/commands/appSettings/connectionSettings/azureWebJobsStorage/IAzureWebJobsStorageWizardContext.ts index 840619703..3b05dab38 100644 --- a/src/commands/appSettings/connectionSettings/azureWebJobsStorage/IAzureWebJobsStorageWizardContext.ts +++ b/src/commands/appSettings/connectionSettings/azureWebJobsStorage/IAzureWebJobsStorageWizardContext.ts @@ -3,10 +3,10 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import type { StorageAccount } from "@azure/arm-storage"; -import { ISubscriptionContext } from "@microsoft/vscode-azext-utils"; -import { StorageConnectionTypeValues } from "../../../../constants"; -import { ISetConnectionSettingContext } from "../ISetConnectionSettingContext"; +import { type StorageAccount } from "@azure/arm-storage"; +import { type ISubscriptionContext } from "@microsoft/vscode-azext-utils"; +import { type StorageConnectionTypeValues } from "../../../../constants"; +import { type ISetConnectionSettingContext } from "../ISetConnectionSettingContext"; export interface IAzureWebJobsStorageWizardContext extends ISetConnectionSettingContext, Partial { storageAccount?: StorageAccount; diff --git a/src/commands/appSettings/connectionSettings/azureWebJobsStorage/setAzureWebJobsStorage.ts b/src/commands/appSettings/connectionSettings/azureWebJobsStorage/setAzureWebJobsStorage.ts index b265bbaa2..ea241aa0e 100644 --- a/src/commands/appSettings/connectionSettings/azureWebJobsStorage/setAzureWebJobsStorage.ts +++ b/src/commands/appSettings/connectionSettings/azureWebJobsStorage/setAzureWebJobsStorage.ts @@ -7,10 +7,10 @@ import { AzureWizard } from '@microsoft/vscode-azext-utils'; import * as path from 'path'; import { localize } from '../../../../localize'; import { getLocalSettingsFile } from '../../localSettings/getLocalSettingsFile'; -import { ISetConnectionSettingContext } from '../ISetConnectionSettingContext'; +import { type ISetConnectionSettingContext } from '../ISetConnectionSettingContext'; import { AzureWebJobsStorageExecuteStep } from './AzureWebJobsStorageExecuteStep'; import { AzureWebJobsStoragePromptStep } from './AzureWebJobsStoragePromptStep'; -import { IAzureWebJobsStorageWizardContext } from './IAzureWebJobsStorageWizardContext'; +import { type IAzureWebJobsStorageWizardContext } from './IAzureWebJobsStorageWizardContext'; export async function setAzureWebJobsStorage(context: Omit): Promise { const message: string = localize('selectLocalSettings', 'Select your local settings file.'); diff --git a/src/commands/appSettings/connectionSettings/azureWebJobsStorage/validateStorageConnection.ts b/src/commands/appSettings/connectionSettings/azureWebJobsStorage/validateStorageConnection.ts index 5c959cf3f..40b86a3a5 100644 --- a/src/commands/appSettings/connectionSettings/azureWebJobsStorage/validateStorageConnection.ts +++ b/src/commands/appSettings/connectionSettings/azureWebJobsStorage/validateStorageConnection.ts @@ -6,11 +6,11 @@ import { AzureWizard } from "@microsoft/vscode-azext-utils"; import { CodeAction, ConnectionKey } from "../../../../constants"; import { getLocalSettingsConnectionString } from "../../../../funcConfig/local.settings"; -import { IConnectionPromptOptions } from "../IConnectionPromptOptions"; -import { ISetConnectionSettingContext } from "../ISetConnectionSettingContext"; +import { type IConnectionPromptOptions } from "../IConnectionPromptOptions"; +import { type ISetConnectionSettingContext } from "../ISetConnectionSettingContext"; import { AzureWebJobsStorageExecuteStep } from "./AzureWebJobsStorageExecuteStep"; import { AzureWebJobsStoragePromptStep } from "./AzureWebJobsStoragePromptStep"; -import { IAzureWebJobsStorageWizardContext } from "./IAzureWebJobsStorageWizardContext"; +import { type IAzureWebJobsStorageWizardContext } from "./IAzureWebJobsStorageWizardContext"; export async function validateStorageConnection(context: Omit, projectPath: string, options?: IConnectionPromptOptions): Promise { if (context.action === CodeAction.Deploy) { diff --git a/src/commands/appSettings/connectionSettings/eventHubs/EventHubsConnectionExecuteStep.ts b/src/commands/appSettings/connectionSettings/eventHubs/EventHubsConnectionExecuteStep.ts index 17951a759..5ff09bafd 100644 --- a/src/commands/appSettings/connectionSettings/eventHubs/EventHubsConnectionExecuteStep.ts +++ b/src/commands/appSettings/connectionSettings/eventHubs/EventHubsConnectionExecuteStep.ts @@ -3,12 +3,12 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { ISubscriptionContext } from '@microsoft/vscode-azext-utils'; -import { ConnectionKey, ConnectionKeyValues, ConnectionType, localEventHubsEmulatorConnectionRegExp, localEventHubsEmulatorConnectionStringDefault } from '../../../../constants'; +import { type ISubscriptionContext } from '@microsoft/vscode-azext-utils'; +import { ConnectionKey, ConnectionType, localEventHubsEmulatorConnectionRegExp, localEventHubsEmulatorConnectionStringDefault, type ConnectionKeyValues } from '../../../../constants'; import { getLocalSettingsConnectionString } from '../../../../funcConfig/local.settings'; import { SetConnectionSettingStepBase } from '../SetConnectionSettingStepBase'; import { getEventHubsConnectionString } from '../getLocalConnectionSetting'; -import { IEventHubsConnectionWizardContext } from './IEventHubsConnectionWizardContext'; +import { type IEventHubsConnectionWizardContext } from './IEventHubsConnectionWizardContext'; export class EventHubsConnectionExecuteStep extends SetConnectionSettingStepBase { public priority: number = 240; diff --git a/src/commands/appSettings/connectionSettings/eventHubs/EventHubsConnectionPromptStep.ts b/src/commands/appSettings/connectionSettings/eventHubs/EventHubsConnectionPromptStep.ts index ecea1bba6..6ef8e9518 100644 --- a/src/commands/appSettings/connectionSettings/eventHubs/EventHubsConnectionPromptStep.ts +++ b/src/commands/appSettings/connectionSettings/eventHubs/EventHubsConnectionPromptStep.ts @@ -3,16 +3,16 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { AzureWizardPromptStep, ISubscriptionActionContext, IWizardOptions } from '@microsoft/vscode-azext-utils'; -import { MessageItem } from 'vscode'; +import { AzureWizardPromptStep, type ISubscriptionActionContext, type IWizardOptions } from '@microsoft/vscode-azext-utils'; +import { type MessageItem } from 'vscode'; import { ConnectionKey, ConnectionType, localEventHubsEmulatorConnectionRegExp } from '../../../../constants'; import { useEmulator } from '../../../../constants-nls'; import { ext } from '../../../../extensionVariables'; import { getLocalSettingsConnectionString } from '../../../../funcConfig/local.settings'; import { localize } from '../../../../localize'; import { EventHubsNamespaceListStep } from '../../../createFunction/durableSteps/netherite/EventHubsNamespaceListStep'; -import { IConnectionPromptOptions } from '../IConnectionPromptOptions'; -import { IEventHubsConnectionWizardContext } from './IEventHubsConnectionWizardContext'; +import { type IConnectionPromptOptions } from '../IConnectionPromptOptions'; +import { type IEventHubsConnectionWizardContext } from './IEventHubsConnectionWizardContext'; export class EventHubsConnectionPromptStep extends AzureWizardPromptStep { public constructor(private readonly options?: IConnectionPromptOptions) { diff --git a/src/commands/appSettings/connectionSettings/eventHubs/IEventHubsConnectionWizardContext.ts b/src/commands/appSettings/connectionSettings/eventHubs/IEventHubsConnectionWizardContext.ts index e288f7b75..582332df2 100644 --- a/src/commands/appSettings/connectionSettings/eventHubs/IEventHubsConnectionWizardContext.ts +++ b/src/commands/appSettings/connectionSettings/eventHubs/IEventHubsConnectionWizardContext.ts @@ -3,10 +3,10 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import type { ResourceGroup } from "@azure/arm-resources"; -import { EventHubsConnectionTypeValues, StorageConnectionTypeValues } from "../../../../constants"; -import { IEventHubWizardContext } from "../../../addBinding/settingSteps/eventHub/IEventHubWizardContext"; -import { ISetConnectionSettingContext } from "../ISetConnectionSettingContext"; +import { type ResourceGroup } from "@azure/arm-resources"; +import { type EventHubsConnectionTypeValues, type StorageConnectionTypeValues } from "../../../../constants"; +import { type IEventHubWizardContext } from "../../../addBinding/settingSteps/eventHub/IEventHubWizardContext"; +import { type ISetConnectionSettingContext } from "../ISetConnectionSettingContext"; export interface IEventHubsConnectionWizardContext extends IEventHubWizardContext, ISetConnectionSettingContext { resourceGroup?: ResourceGroup; diff --git a/src/commands/appSettings/connectionSettings/eventHubs/validateEventHubsConnection.ts b/src/commands/appSettings/connectionSettings/eventHubs/validateEventHubsConnection.ts index c8339ca3c..36a1ead7b 100644 --- a/src/commands/appSettings/connectionSettings/eventHubs/validateEventHubsConnection.ts +++ b/src/commands/appSettings/connectionSettings/eventHubs/validateEventHubsConnection.ts @@ -3,18 +3,18 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { AzExtFsExtra, AzureWizard, AzureWizardExecuteStep, AzureWizardPromptStep, IActionContext } from "@microsoft/vscode-azext-utils"; +import { AzExtFsExtra, AzureWizard, type AzureWizardExecuteStep, type AzureWizardPromptStep, type IActionContext } from "@microsoft/vscode-azext-utils"; import * as path from "path"; import { CodeAction, ConnectionKey, hostFileName, localEventHubsEmulatorConnectionRegExp } from "../../../../constants"; -import { IHostJsonV2, INetheriteTaskJson } from "../../../../funcConfig/host"; +import { type IHostJsonV2, type INetheriteTaskJson } from "../../../../funcConfig/host"; import { getLocalSettingsConnectionString } from "../../../../funcConfig/local.settings"; import { NetheriteConfigureHostStep } from "../../../createFunction/durableSteps/netherite/NetheriteConfigureHostStep"; import { NetheriteEventHubNameStep } from "../../../createFunction/durableSteps/netherite/NetheriteEventHubNameStep"; -import { IConnectionPromptOptions } from "../IConnectionPromptOptions"; -import { ISetConnectionSettingContext } from "../ISetConnectionSettingContext"; +import { type IConnectionPromptOptions } from "../IConnectionPromptOptions"; +import { type ISetConnectionSettingContext } from "../ISetConnectionSettingContext"; import { EventHubsConnectionExecuteStep } from "./EventHubsConnectionExecuteStep"; import { EventHubsConnectionPromptStep } from "./EventHubsConnectionPromptStep"; -import { IEventHubsConnectionWizardContext } from "./IEventHubsConnectionWizardContext"; +import { type IEventHubsConnectionWizardContext } from "./IEventHubsConnectionWizardContext"; // Supports validation on both 'debug' and 'deploy' export async function validateEventHubsConnection(context: Omit, projectPath: string, options?: IConnectionPromptOptions): Promise { diff --git a/src/commands/appSettings/connectionSettings/getLocalConnectionSetting.ts b/src/commands/appSettings/connectionSettings/getLocalConnectionSetting.ts index 279ee605f..a7e63020d 100644 --- a/src/commands/appSettings/connectionSettings/getLocalConnectionSetting.ts +++ b/src/commands/appSettings/connectionSettings/getLocalConnectionSetting.ts @@ -3,18 +3,18 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { AccessKeys, AuthorizationRule, EventHubManagementClient, KnownAccessRights } from "@azure/arm-eventhub"; -import type { StorageAccount, StorageAccountListKeysResult, StorageManagementClient } from "@azure/arm-storage"; -import { IStorageAccountWizardContext, getResourceGroupFromId, uiUtils } from "@microsoft/vscode-azext-azureutils"; -import { ISubscriptionContext, nonNullProp, nonNullValue } from "@microsoft/vscode-azext-utils"; +import { KnownAccessRights, type AccessKeys, type AuthorizationRule, type EventHubManagementClient } from "@azure/arm-eventhub"; +import { type StorageAccount, type StorageAccountListKeysResult, type StorageManagementClient } from "@azure/arm-storage"; +import { getResourceGroupFromId, uiUtils, type IStorageAccountWizardContext } from "@microsoft/vscode-azext-azureutils"; +import { nonNullProp, nonNullValue, type ISubscriptionContext } from "@microsoft/vscode-azext-utils"; import { localSettingsFileName } from "../../../constants"; import { defaultDescription } from "../../../constants-nls"; import { ext } from "../../../extensionVariables"; import { localize } from "../../../localize"; import { createEventHubClient, createStorageClient } from "../../../utils/azureClients"; import { createAndGetAuthRuleName } from "../../createFunction/durableSteps/netherite/createAndGetAuthRuleName"; -import { IEventHubsConnectionWizardContext } from "./eventHubs/IEventHubsConnectionWizardContext"; -import { ISqlDatabaseConnectionWizardContext } from "./sqlDatabase/ISqlDatabaseConnectionWizardContext"; +import { type IEventHubsConnectionWizardContext } from "./eventHubs/IEventHubsConnectionWizardContext"; +import { type ISqlDatabaseConnectionWizardContext } from "./sqlDatabase/ISqlDatabaseConnectionWizardContext"; export interface IResourceResult { name: string; diff --git a/src/commands/appSettings/connectionSettings/sqlDatabase/ISqlDatabaseConnectionWizardContext.ts b/src/commands/appSettings/connectionSettings/sqlDatabase/ISqlDatabaseConnectionWizardContext.ts index ba6c841f7..fdbb2787e 100644 --- a/src/commands/appSettings/connectionSettings/sqlDatabase/ISqlDatabaseConnectionWizardContext.ts +++ b/src/commands/appSettings/connectionSettings/sqlDatabase/ISqlDatabaseConnectionWizardContext.ts @@ -3,11 +3,11 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import type { ResourceGroup } from '@azure/arm-resources'; -import type { Database, Server } from '@azure/arm-sql'; -import { ISubscriptionContext } from "@microsoft/vscode-azext-utils"; -import { SqlDbConnectionTypeValues, StorageConnectionTypeValues } from "../../../../constants"; -import { ISetConnectionSettingContext } from '../ISetConnectionSettingContext'; +import { type ResourceGroup } from '@azure/arm-resources'; +import { type Database, type Server } from '@azure/arm-sql'; +import { type ISubscriptionContext } from "@microsoft/vscode-azext-utils"; +import { type SqlDbConnectionTypeValues, type StorageConnectionTypeValues } from "../../../../constants"; +import { type ISetConnectionSettingContext } from '../ISetConnectionSettingContext'; export interface ISqlDatabaseConnectionWizardContext extends ISetConnectionSettingContext, Partial { resourceGroup?: ResourceGroup; diff --git a/src/commands/appSettings/connectionSettings/sqlDatabase/SqlDatabaseConnectionCustomPromptStep.ts b/src/commands/appSettings/connectionSettings/sqlDatabase/SqlDatabaseConnectionCustomPromptStep.ts index b2b693eb3..84a1f85f3 100644 --- a/src/commands/appSettings/connectionSettings/sqlDatabase/SqlDatabaseConnectionCustomPromptStep.ts +++ b/src/commands/appSettings/connectionSettings/sqlDatabase/SqlDatabaseConnectionCustomPromptStep.ts @@ -8,7 +8,7 @@ import { ConnectionType } from '../../../../constants'; import { getInvalidLengthMessage } from '../../../../constants-nls'; import { localize } from '../../../../localize'; import { validateUtils } from '../../../../utils/validateUtils'; -import { ISqlDatabaseConnectionWizardContext } from './ISqlDatabaseConnectionWizardContext'; +import { type ISqlDatabaseConnectionWizardContext } from './ISqlDatabaseConnectionWizardContext'; export class SqlDatabaseConnectionCustomPromptStep extends AzureWizardPromptStep { public async prompt(context: T): Promise { diff --git a/src/commands/appSettings/connectionSettings/sqlDatabase/SqlDatabaseConnectionExecuteStep.ts b/src/commands/appSettings/connectionSettings/sqlDatabase/SqlDatabaseConnectionExecuteStep.ts index 480d76e82..f6f3a3c96 100644 --- a/src/commands/appSettings/connectionSettings/sqlDatabase/SqlDatabaseConnectionExecuteStep.ts +++ b/src/commands/appSettings/connectionSettings/sqlDatabase/SqlDatabaseConnectionExecuteStep.ts @@ -4,10 +4,10 @@ *--------------------------------------------------------------------------------------------*/ import { nonNullProp } from '@microsoft/vscode-azext-utils'; -import { ConnectionKey, ConnectionKeyValues, ConnectionType } from '../../../../constants'; +import { ConnectionKey, ConnectionType, type ConnectionKeyValues } from '../../../../constants'; import { SetConnectionSettingStepBase } from '../SetConnectionSettingStepBase'; import { getSqlDatabaseConnectionString } from '../getLocalConnectionSetting'; -import { ISqlDatabaseConnectionWizardContext } from './ISqlDatabaseConnectionWizardContext'; +import { type ISqlDatabaseConnectionWizardContext } from './ISqlDatabaseConnectionWizardContext'; export class SqlDatabaseConnectionExecuteStep extends SetConnectionSettingStepBase { public priority: number = 250; diff --git a/src/commands/appSettings/connectionSettings/sqlDatabase/SqlDatabaseConnectionPromptStep.ts b/src/commands/appSettings/connectionSettings/sqlDatabase/SqlDatabaseConnectionPromptStep.ts index a30f6b3d1..103753e3a 100644 --- a/src/commands/appSettings/connectionSettings/sqlDatabase/SqlDatabaseConnectionPromptStep.ts +++ b/src/commands/appSettings/connectionSettings/sqlDatabase/SqlDatabaseConnectionPromptStep.ts @@ -3,14 +3,14 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { AzureWizardPromptStep, ISubscriptionActionContext, IWizardOptions } from '@microsoft/vscode-azext-utils'; -import { MessageItem } from 'vscode'; +import { AzureWizardPromptStep, type ISubscriptionActionContext, type IWizardOptions } from '@microsoft/vscode-azext-utils'; +import { type MessageItem } from 'vscode'; import { ConnectionType } from '../../../../constants'; import { ext } from '../../../../extensionVariables'; import { localize } from '../../../../localize'; import { SqlServerListStep } from '../../../createFunction/durableSteps/sql/SqlServerListStep'; -import { IConnectionPromptOptions } from '../IConnectionPromptOptions'; -import { ISqlDatabaseConnectionWizardContext } from './ISqlDatabaseConnectionWizardContext'; +import { type IConnectionPromptOptions } from '../IConnectionPromptOptions'; +import { type ISqlDatabaseConnectionWizardContext } from './ISqlDatabaseConnectionWizardContext'; import { SqlDatabaseConnectionCustomPromptStep } from './SqlDatabaseConnectionCustomPromptStep'; export class SqlDatabaseConnectionPromptStep extends AzureWizardPromptStep { diff --git a/src/commands/appSettings/connectionSettings/sqlDatabase/validateSqlDbConnection.ts b/src/commands/appSettings/connectionSettings/sqlDatabase/validateSqlDbConnection.ts index 107949ccc..009701bbe 100644 --- a/src/commands/appSettings/connectionSettings/sqlDatabase/validateSqlDbConnection.ts +++ b/src/commands/appSettings/connectionSettings/sqlDatabase/validateSqlDbConnection.ts @@ -7,10 +7,10 @@ import { AzureWizard } from "@microsoft/vscode-azext-utils"; import { CodeAction, ConnectionKey } from "../../../../constants"; import { getLocalSettingsConnectionString } from "../../../../funcConfig/local.settings"; import { SqlDatabaseListStep } from "../../../createFunction/durableSteps/sql/SqlDatabaseListStep"; -import { IEventHubsConnectionWizardContext } from "../eventHubs/IEventHubsConnectionWizardContext"; -import { IConnectionPromptOptions } from "../IConnectionPromptOptions"; -import { ISetConnectionSettingContext } from "../ISetConnectionSettingContext"; -import { ISqlDatabaseConnectionWizardContext } from "./ISqlDatabaseConnectionWizardContext"; +import { type IConnectionPromptOptions } from "../IConnectionPromptOptions"; +import { type ISetConnectionSettingContext } from "../ISetConnectionSettingContext"; +import { type IEventHubsConnectionWizardContext } from "../eventHubs/IEventHubsConnectionWizardContext"; +import { type ISqlDatabaseConnectionWizardContext } from "./ISqlDatabaseConnectionWizardContext"; import { SqlDatabaseConnectionExecuteStep } from "./SqlDatabaseConnectionExecuteStep"; import { SqlDatabaseConnectionPromptStep } from "./SqlDatabaseConnectionPromptStep"; diff --git a/src/commands/appSettings/downloadAppSettings.ts b/src/commands/appSettings/downloadAppSettings.ts index c1d214786..816d19467 100644 --- a/src/commands/appSettings/downloadAppSettings.ts +++ b/src/commands/appSettings/downloadAppSettings.ts @@ -3,17 +3,17 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import type { StringDictionary } from "@azure/arm-appservice"; +import { type StringDictionary } from "@azure/arm-appservice"; import { confirmOverwriteSettings } from "@microsoft/vscode-azext-azureappservice"; -import { AppSettingsTreeItem, IAppSettingsClient } from "@microsoft/vscode-azext-azureappsettings"; -import { AzExtFsExtra, IActionContext } from "@microsoft/vscode-azext-utils"; +import { AppSettingsTreeItem, type IAppSettingsClient } from "@microsoft/vscode-azext-azureappsettings"; +import { AzExtFsExtra, type IActionContext } from "@microsoft/vscode-azext-utils"; import * as vscode from 'vscode'; import { functionFilter, localSettingsFileName } from "../../constants"; import { viewOutput } from "../../constants-nls"; import { ext } from "../../extensionVariables"; -import { ILocalSettingsJson, getLocalSettingsJson } from "../../funcConfig/local.settings"; +import { getLocalSettingsJson, type ILocalSettingsJson } from "../../funcConfig/local.settings"; import { localize } from "../../localize"; -import * as api from '../../vscode-azurefunctions.api'; +import type * as api from '../../vscode-azurefunctions.api'; import { decryptLocalSettings } from "./localSettings/decryptLocalSettings"; import { encryptLocalSettings } from "./localSettings/encryptLocalSettings"; import { getLocalSettingsFile } from "./localSettings/getLocalSettingsFile"; diff --git a/src/commands/appSettings/localSettings/decryptLocalSettings.ts b/src/commands/appSettings/localSettings/decryptLocalSettings.ts index 7e6215949..ed11d78b7 100644 --- a/src/commands/appSettings/localSettings/decryptLocalSettings.ts +++ b/src/commands/appSettings/localSettings/decryptLocalSettings.ts @@ -3,9 +3,9 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { IActionContext } from '@microsoft/vscode-azext-utils'; +import { type IActionContext } from '@microsoft/vscode-azext-utils'; import * as path from 'path'; -import { Uri } from "vscode"; +import { type Uri } from "vscode"; import { ext } from '../../../extensionVariables'; import { localize } from '../../../localize'; import { cpUtils } from '../../../utils/cpUtils'; diff --git a/src/commands/appSettings/localSettings/encryptLocalSettings.ts b/src/commands/appSettings/localSettings/encryptLocalSettings.ts index 83f309dc0..f50f2f961 100644 --- a/src/commands/appSettings/localSettings/encryptLocalSettings.ts +++ b/src/commands/appSettings/localSettings/encryptLocalSettings.ts @@ -3,9 +3,9 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { IActionContext } from '@microsoft/vscode-azext-utils'; +import { type IActionContext } from '@microsoft/vscode-azext-utils'; import * as path from 'path'; -import { Uri } from "vscode"; +import { type Uri } from "vscode"; import { ext } from "../../../extensionVariables"; import { localize } from '../../../localize'; import { cpUtils } from "../../../utils/cpUtils"; diff --git a/src/commands/appSettings/localSettings/getLocalSettingsFile.ts b/src/commands/appSettings/localSettings/getLocalSettingsFile.ts index bd151a924..99839c937 100644 --- a/src/commands/appSettings/localSettings/getLocalSettingsFile.ts +++ b/src/commands/appSettings/localSettings/getLocalSettingsFile.ts @@ -3,9 +3,9 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { AzExtFsExtra, IActionContext } from '@microsoft/vscode-azext-utils'; +import { AzExtFsExtra, type IActionContext } from '@microsoft/vscode-azext-utils'; import * as path from 'path'; -import { WorkspaceFolder } from "vscode"; +import { type WorkspaceFolder } from "vscode"; import { localSettingsFileName } from '../../../constants'; import { getRootWorkspaceFolder, selectWorkspaceFile } from '../../../utils/workspace'; import { tryGetFunctionProjectRoot } from '../../createNewProject/verifyIsProject'; diff --git a/src/commands/appSettings/toggleSlotSetting.ts b/src/commands/appSettings/toggleSlotSetting.ts index 51eba6b0b..f0b841f7f 100644 --- a/src/commands/appSettings/toggleSlotSetting.ts +++ b/src/commands/appSettings/toggleSlotSetting.ts @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ import { AppSettingTreeItem } from "@microsoft/vscode-azext-azureappsettings"; -import { IActionContext } from "@microsoft/vscode-azext-utils"; +import { type IActionContext } from "@microsoft/vscode-azext-utils"; import { functionFilter } from "../../constants"; import { ext } from "../../extensionVariables"; diff --git a/src/commands/appSettings/uploadAppSettings.ts b/src/commands/appSettings/uploadAppSettings.ts index 185f47051..7ac68321d 100644 --- a/src/commands/appSettings/uploadAppSettings.ts +++ b/src/commands/appSettings/uploadAppSettings.ts @@ -3,17 +3,17 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import type { StringDictionary } from "@azure/arm-appservice"; +import { type StringDictionary } from "@azure/arm-appservice"; import { confirmOverwriteSettings } from "@microsoft/vscode-azext-azureappservice"; -import { AppSettingsTreeItem, IAppSettingsClient } from "@microsoft/vscode-azext-azureappsettings"; -import { AzExtFsExtra, IActionContext } from "@microsoft/vscode-azext-utils"; +import { AppSettingsTreeItem, type IAppSettingsClient } from "@microsoft/vscode-azext-azureappsettings"; +import { AzExtFsExtra, type IActionContext } from "@microsoft/vscode-azext-utils"; import * as vscode from 'vscode'; import { ConnectionKey, functionFilter, localEventHubsEmulatorConnectionRegExp, localSettingsFileName, localStorageEmulatorConnectionString } from "../../constants"; import { viewOutput } from "../../constants-nls"; import { ext } from "../../extensionVariables"; -import { ILocalSettingsJson } from "../../funcConfig/local.settings"; +import { type ILocalSettingsJson } from "../../funcConfig/local.settings"; import { localize } from "../../localize"; -import * as api from '../../vscode-azurefunctions.api'; +import type * as api from '../../vscode-azurefunctions.api'; import { decryptLocalSettings } from "./localSettings/decryptLocalSettings"; import { encryptLocalSettings } from "./localSettings/encryptLocalSettings"; import { getLocalSettingsFile } from "./localSettings/getLocalSettingsFile"; diff --git a/src/commands/browseWebsite.ts b/src/commands/browseWebsite.ts index 1ade84bbc..b09be9d90 100644 --- a/src/commands/browseWebsite.ts +++ b/src/commands/browseWebsite.ts @@ -3,10 +3,10 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { IActionContext } from '@microsoft/vscode-azext-utils'; +import { type IActionContext } from '@microsoft/vscode-azext-utils'; import { functionFilter } from '../constants'; import { ext } from '../extensionVariables'; -import { SlotTreeItem } from '../tree/SlotTreeItem'; +import { type SlotTreeItem } from '../tree/SlotTreeItem'; import { openUrl } from '../utils/openUrl'; export async function browseWebsite(context: IActionContext, node?: SlotTreeItem): Promise { diff --git a/src/commands/configureDeploymentSource.ts b/src/commands/configureDeploymentSource.ts index 6bb9a8c46..fdb2cc4cf 100644 --- a/src/commands/configureDeploymentSource.ts +++ b/src/commands/configureDeploymentSource.ts @@ -4,10 +4,10 @@ *--------------------------------------------------------------------------------------------*/ import { editScmType } from '@microsoft/vscode-azext-azureappservice'; -import { IActionContext } from '@microsoft/vscode-azext-utils'; +import { type IActionContext } from '@microsoft/vscode-azext-utils'; import { functionFilter } from '../constants'; import { ext } from '../extensionVariables'; -import { SlotTreeItem } from '../tree/SlotTreeItem'; +import { type SlotTreeItem } from '../tree/SlotTreeItem'; export async function configureDeploymentSource(context: IActionContext, node?: SlotTreeItem): Promise { if (!node) { diff --git a/src/commands/copyFunctionUrl.ts b/src/commands/copyFunctionUrl.ts index 46572e39f..c2b4402d0 100644 --- a/src/commands/copyFunctionUrl.ts +++ b/src/commands/copyFunctionUrl.ts @@ -3,12 +3,12 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { IActionContext } from '@microsoft/vscode-azext-utils'; +import { type IActionContext } from '@microsoft/vscode-azext-utils'; import * as vscode from 'vscode'; import { functionFilter } from '../constants'; import { ext } from '../extensionVariables'; import { localize } from '../localize'; -import { FunctionTreeItemBase } from '../tree/FunctionTreeItemBase'; +import { type FunctionTreeItemBase } from '../tree/FunctionTreeItemBase'; export async function copyFunctionUrl(context: IActionContext, node?: FunctionTreeItemBase): Promise { if (!node) { diff --git a/src/commands/createChildNode.ts b/src/commands/createChildNode.ts index 426e86fba..fae021f3c 100644 --- a/src/commands/createChildNode.ts +++ b/src/commands/createChildNode.ts @@ -3,7 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { AzExtParentTreeItem, IActionContext } from '@microsoft/vscode-azext-utils'; +import { type AzExtParentTreeItem, type IActionContext } from '@microsoft/vscode-azext-utils'; import { functionFilter } from '../constants'; import { ext } from '../extensionVariables'; diff --git a/src/commands/createFunction/FunctionCreateStepBase.ts b/src/commands/createFunction/FunctionCreateStepBase.ts index d899d50eb..88bcfaa42 100644 --- a/src/commands/createFunction/FunctionCreateStepBase.ts +++ b/src/commands/createFunction/FunctionCreateStepBase.ts @@ -3,18 +3,18 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { AzExtFsExtra, AzureWizardExecuteStep, callWithTelemetryAndErrorHandling, IActionContext, nonNullValue } from '@microsoft/vscode-azext-utils'; +import { AzExtFsExtra, AzureWizardExecuteStep, callWithTelemetryAndErrorHandling, nonNullValue, type IActionContext } from '@microsoft/vscode-azext-utils'; import * as path from 'path'; -import { Progress, Uri, window, workspace } from 'vscode'; +import { Uri, window, workspace, type Progress } from 'vscode'; import { hostFileName } from '../../constants'; import { ext } from '../../extensionVariables'; -import { IHostJsonV2 } from '../../funcConfig/host'; +import { type IHostJsonV2 } from '../../funcConfig/host'; import { localize } from '../../localize'; -import { FunctionTemplateBase } from '../../templates/IFunctionTemplate'; +import { type FunctionTemplateBase } from '../../templates/IFunctionTemplate'; import { verifyTemplateIsV1 } from '../../utils/templateVersionUtils'; import { verifyExtensionBundle } from '../../utils/verifyExtensionBundle'; import { getContainingWorkspace } from '../../utils/workspace'; -import { IFunctionWizardContext } from './IFunctionWizardContext'; +import { type IFunctionWizardContext } from './IFunctionWizardContext'; interface ICachedFunction { projectPath: string; diff --git a/src/commands/createFunction/FunctionListStep.ts b/src/commands/createFunction/FunctionListStep.ts index fa6235729..4881b69fa 100644 --- a/src/commands/createFunction/FunctionListStep.ts +++ b/src/commands/createFunction/FunctionListStep.ts @@ -3,20 +3,20 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { AzureWizardPromptStep, IActionContext, IAzureQuickPickItem, IAzureQuickPickOptions, IWizardOptions } from '@microsoft/vscode-azext-utils'; +import { AzureWizardPromptStep, type IActionContext, type IAzureQuickPickItem, type IAzureQuickPickOptions, type IWizardOptions } from '@microsoft/vscode-azext-utils'; import * as escape from 'escape-string-regexp'; -import { FuncVersion } from '../../FuncVersion'; +import { type FuncVersion } from '../../FuncVersion'; import { JavaBuildTool, ProjectLanguage, TemplateFilter, templateFilterSetting } from '../../constants'; import { ext } from '../../extensionVariables'; import { localize } from '../../localize'; -import { FunctionTemplateBase, IFunctionTemplate } from '../../templates/IFunctionTemplate'; +import { type FunctionTemplateBase, type IFunctionTemplate } from '../../templates/IFunctionTemplate'; import { TemplateSchemaVersion } from '../../templates/TemplateProviderBase'; import { durableUtils } from '../../utils/durableUtils'; import { nonNullProp } from '../../utils/nonNull'; import { isNodeV4Plus, isPythonV2Plus, nodeV4Suffix } from '../../utils/programmingModelUtils'; import { getWorkspaceSetting, updateWorkspaceSetting } from '../../vsCodeConfig/settings'; import { FunctionSubWizard } from './FunctionSubWizard'; -import { IFunctionWizardContext } from './IFunctionWizardContext'; +import { type IFunctionWizardContext } from './IFunctionWizardContext'; import { JobsListStep } from './JobsListStep'; import { DurableStorageTypePromptStep } from './durableSteps/DurableStorageTypePromptStep'; diff --git a/src/commands/createFunction/FunctionNameStepBase.ts b/src/commands/createFunction/FunctionNameStepBase.ts index 05d53b0c6..4a148d6c8 100644 --- a/src/commands/createFunction/FunctionNameStepBase.ts +++ b/src/commands/createFunction/FunctionNameStepBase.ts @@ -6,9 +6,9 @@ import { AzExtFsExtra, AzureWizardPromptStep, nonNullProp } from '@microsoft/vscode-azext-utils'; import * as path from 'path'; import { localize } from '../../localize'; -import { FunctionTemplateBase } from '../../templates/IFunctionTemplate'; +import { type FunctionTemplateBase } from '../../templates/IFunctionTemplate'; import { assertTemplateIsV1 } from '../../utils/templateVersionUtils'; -import { IFunctionWizardContext } from './IFunctionWizardContext'; +import { type IFunctionWizardContext } from './IFunctionWizardContext'; export abstract class FunctionNameStepBase extends AzureWizardPromptStep { public async prompt(context: T): Promise { diff --git a/src/commands/createFunction/FunctionSubWizard.ts b/src/commands/createFunction/FunctionSubWizard.ts index 386a26366..288646c3a 100644 --- a/src/commands/createFunction/FunctionSubWizard.ts +++ b/src/commands/createFunction/FunctionSubWizard.ts @@ -3,16 +3,16 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { AzureWizardExecuteStep, AzureWizardPromptStep, IWizardOptions } from '@microsoft/vscode-azext-utils'; +import { type AzureWizardExecuteStep, type AzureWizardPromptStep, type IWizardOptions } from '@microsoft/vscode-azext-utils'; import { ProjectLanguage } from '../../constants'; import { localize } from '../../localize'; -import { FunctionTemplateBase } from '../../templates/IFunctionTemplate'; +import { type FunctionTemplateBase } from '../../templates/IFunctionTemplate'; import { TemplateSchemaVersion } from '../../templates/TemplateProviderBase'; import { isNodeV4Plus } from '../../utils/programmingModelUtils'; import { assertTemplateIsV1 } from '../../utils/templateVersionUtils'; import { addBindingSettingSteps } from '../addBinding/settingSteps/addBindingSettingSteps'; import { JavaPackageNameStep } from '../createNewProject/javaSteps/JavaPackageNameStep'; -import { IFunctionWizardContext } from './IFunctionWizardContext'; +import { type IFunctionWizardContext } from './IFunctionWizardContext'; import { JobsListStep } from './JobsListStep'; import { BallerinaFunctionCreateStep } from './ballerinaSteps/BallerinaFunctionCreateStep'; import { BallerinaFunctionNameStep } from './ballerinaSteps/BallerinaFunctionNameStep'; diff --git a/src/commands/createFunction/IFunctionWizardContext.ts b/src/commands/createFunction/IFunctionWizardContext.ts index 931e51342..973693321 100644 --- a/src/commands/createFunction/IFunctionWizardContext.ts +++ b/src/commands/createFunction/IFunctionWizardContext.ts @@ -3,13 +3,13 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { ISubscriptionContext } from "@microsoft/vscode-azext-utils"; -import { DurableBackendValues } from "../../constants"; -import { BindingSettingValue } from "../../funcConfig/function"; -import { IBindingSetting } from "../../templates/IBindingTemplate"; -import { FunctionTemplateBase } from "../../templates/IFunctionTemplate"; -import { ParsedJob } from "../../templates/script/parseScriptTemplatesV2"; -import { IProjectWizardContext } from "../createNewProject/IProjectWizardContext"; +import { type ISubscriptionContext } from "@microsoft/vscode-azext-utils"; +import { type DurableBackendValues } from "../../constants"; +import { type BindingSettingValue } from "../../funcConfig/function"; +import { type IBindingSetting } from "../../templates/IBindingTemplate"; +import { type FunctionTemplateBase } from "../../templates/IFunctionTemplate"; +import { type ParsedJob } from "../../templates/script/parseScriptTemplatesV2"; +import { type IProjectWizardContext } from "../createNewProject/IProjectWizardContext"; export interface IFunctionWizardContext extends Partial, IProjectWizardContext { functionTemplate?: FunctionTemplateBase; diff --git a/src/commands/createFunction/JobsListStep.ts b/src/commands/createFunction/JobsListStep.ts index ab44882ff..4dbf9d369 100644 --- a/src/commands/createFunction/JobsListStep.ts +++ b/src/commands/createFunction/JobsListStep.ts @@ -3,12 +3,12 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { AzureWizardExecuteStep, AzureWizardPromptStep, IAzureQuickPickItem, IWizardOptions } from '@microsoft/vscode-azext-utils'; +import { AzureWizardPromptStep, type AzureWizardExecuteStep, type IAzureQuickPickItem, type IWizardOptions } from '@microsoft/vscode-azext-utils'; import { localize } from '../../localize'; -import { JobType, ParsedJob } from '../../templates/script/parseScriptTemplatesV2'; +import { JobType, type ParsedJob } from '../../templates/script/parseScriptTemplatesV2'; import { assertTemplateIsV2 } from '../../utils/templateVersionUtils'; import { isFunctionProject } from '../createNewProject/verifyIsProject'; -import { FunctionV2WizardContext, IFunctionWizardContext } from './IFunctionWizardContext'; +import { type FunctionV2WizardContext, type IFunctionWizardContext } from './IFunctionWizardContext'; import { actionStepFactory } from './actionStepsV2/actionStepFactory'; import { promptStepFactory } from './promptStepsV2/promptStepFactory'; diff --git a/src/commands/createFunction/actionStepsV2/ActionSchemaStepBase.ts b/src/commands/createFunction/actionStepsV2/ActionSchemaStepBase.ts index eaaea116d..8c3f50323 100644 --- a/src/commands/createFunction/actionStepsV2/ActionSchemaStepBase.ts +++ b/src/commands/createFunction/actionStepsV2/ActionSchemaStepBase.ts @@ -4,8 +4,8 @@ *--------------------------------------------------------------------------------------------*/ import { AzureWizardExecuteStep } from "@microsoft/vscode-azext-utils"; -import { ParsedAction } from "../../../templates/script/parseScriptTemplatesV2"; -import { FunctionV2WizardContext } from "../IFunctionWizardContext"; +import { type ParsedAction } from "../../../templates/script/parseScriptTemplatesV2"; +import { type FunctionV2WizardContext } from "../IFunctionWizardContext"; export abstract class ActionSchemaStepBase extends AzureWizardExecuteStep { public constructor(readonly action: ParsedAction, readonly priority: number) { diff --git a/src/commands/createFunction/actionStepsV2/AppendToFileExecuteStep.ts b/src/commands/createFunction/actionStepsV2/AppendToFileExecuteStep.ts index 6213a02c9..3b0ba7523 100644 --- a/src/commands/createFunction/actionStepsV2/AppendToFileExecuteStep.ts +++ b/src/commands/createFunction/actionStepsV2/AppendToFileExecuteStep.ts @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ import { AzExtFsExtra, nonNullProp } from "@microsoft/vscode-azext-utils"; -import { FunctionV2WizardContext } from "../IFunctionWizardContext"; +import { type FunctionV2WizardContext } from "../IFunctionWizardContext"; import { WriteToFileExecuteStep } from "./WriteToFileExecuteStep"; export class AppendToFileExecuteStep extends WriteToFileExecuteStep { diff --git a/src/commands/createFunction/actionStepsV2/GetTemplateFileContentExecuteStep.ts b/src/commands/createFunction/actionStepsV2/GetTemplateFileContentExecuteStep.ts index a37474876..ccb2cdc63 100644 --- a/src/commands/createFunction/actionStepsV2/GetTemplateFileContentExecuteStep.ts +++ b/src/commands/createFunction/actionStepsV2/GetTemplateFileContentExecuteStep.ts @@ -6,7 +6,7 @@ import { nonNullProp } from "@microsoft/vscode-azext-utils"; import { localize } from "../../../localize"; import { assertTemplateIsV2 } from "../../../utils/templateVersionUtils"; -import { FunctionV2WizardContext } from "../IFunctionWizardContext"; +import { type FunctionV2WizardContext } from "../IFunctionWizardContext"; import { ActionSchemaStepBase } from "./ActionSchemaStepBase"; export class GetTemplateFileContentExecuteStep extends ActionSchemaStepBase { diff --git a/src/commands/createFunction/actionStepsV2/ShowMarkdownPreviewExecuteStep.ts b/src/commands/createFunction/actionStepsV2/ShowMarkdownPreviewExecuteStep.ts index 115b212d3..05f547ab3 100644 --- a/src/commands/createFunction/actionStepsV2/ShowMarkdownPreviewExecuteStep.ts +++ b/src/commands/createFunction/actionStepsV2/ShowMarkdownPreviewExecuteStep.ts @@ -6,7 +6,7 @@ import { nonNullProp } from "@microsoft/vscode-azext-utils"; import { assertTemplateIsV2 } from "../../../utils/templateVersionUtils"; import { showMarkdownPreviewContent } from "../../../utils/textUtils"; -import { FunctionV2WizardContext } from "../IFunctionWizardContext"; +import { type FunctionV2WizardContext } from "../IFunctionWizardContext"; import { ActionSchemaStepBase } from "./ActionSchemaStepBase"; export class ShowMarkdownPreviewExecuteStep extends ActionSchemaStepBase { diff --git a/src/commands/createFunction/actionStepsV2/WriteToFileExecuteStep.ts b/src/commands/createFunction/actionStepsV2/WriteToFileExecuteStep.ts index 1fb98e598..4d2de88c1 100644 --- a/src/commands/createFunction/actionStepsV2/WriteToFileExecuteStep.ts +++ b/src/commands/createFunction/actionStepsV2/WriteToFileExecuteStep.ts @@ -7,7 +7,7 @@ import { AzExtFsExtra, nonNullProp } from "@microsoft/vscode-azext-utils"; import * as path from 'path'; import { Uri, window, workspace } from "vscode"; import { isDocumentOpened } from "../../../utils/textUtils"; -import { FunctionV2WizardContext } from "../IFunctionWizardContext"; +import { type FunctionV2WizardContext } from "../IFunctionWizardContext"; import { getFileExtensionFromLanguage } from "../scriptSteps/ScriptFunctionCreateStep"; import { ActionSchemaStepBase } from "./ActionSchemaStepBase"; diff --git a/src/commands/createFunction/actionStepsV2/actionStepFactory.ts b/src/commands/createFunction/actionStepsV2/actionStepFactory.ts index 83f354951..0741922d9 100644 --- a/src/commands/createFunction/actionStepsV2/actionStepFactory.ts +++ b/src/commands/createFunction/actionStepsV2/actionStepFactory.ts @@ -3,10 +3,10 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { AzureWizardExecuteStep } from "@microsoft/vscode-azext-utils"; +import { type AzureWizardExecuteStep } from "@microsoft/vscode-azext-utils"; import { ActionType } from "../../../constants"; -import { ParsedAction } from "../../../templates/script/parseScriptTemplatesV2"; -import { FunctionV2WizardContext } from "../IFunctionWizardContext"; +import { type ParsedAction } from "../../../templates/script/parseScriptTemplatesV2"; +import { type FunctionV2WizardContext } from "../IFunctionWizardContext"; import { AppendToFileExecuteStep } from "./AppendToFileExecuteStep"; import { GetTemplateFileContentExecuteStep } from "./GetTemplateFileContentExecuteStep"; import { ShowMarkdownPreviewExecuteStep } from "./ShowMarkdownPreviewExecuteStep"; diff --git a/src/commands/createFunction/ballerinaSteps/BallerinaFunctionCreateStep.ts b/src/commands/createFunction/ballerinaSteps/BallerinaFunctionCreateStep.ts index ce0487899..a8699d740 100644 --- a/src/commands/createFunction/ballerinaSteps/BallerinaFunctionCreateStep.ts +++ b/src/commands/createFunction/ballerinaSteps/BallerinaFunctionCreateStep.ts @@ -6,7 +6,7 @@ import { AzExtFsExtra, nonNullProp } from '@microsoft/vscode-azext-utils'; import * as path from 'path'; import { FunctionCreateStepBase } from '../FunctionCreateStepBase'; -import { IBallerinaFunctionTemplate, IBallerinaFunctionWizardContext } from './IBallerinaFunctionWizardContext'; +import { type IBallerinaFunctionTemplate, type IBallerinaFunctionWizardContext } from './IBallerinaFunctionWizardContext'; export class BallerinaFunctionCreateStep extends FunctionCreateStepBase { public async executeCore(context: IBallerinaFunctionWizardContext): Promise { diff --git a/src/commands/createFunction/ballerinaSteps/BallerinaFunctionNameStep.ts b/src/commands/createFunction/ballerinaSteps/BallerinaFunctionNameStep.ts index c4bd40fff..801803d15 100644 --- a/src/commands/createFunction/ballerinaSteps/BallerinaFunctionNameStep.ts +++ b/src/commands/createFunction/ballerinaSteps/BallerinaFunctionNameStep.ts @@ -5,11 +5,11 @@ import { AzExtFsExtra, nonNullProp } from '@microsoft/vscode-azext-utils'; import { localize } from "../../../localize"; -import { FunctionTemplateBase } from '../../../templates/IFunctionTemplate'; +import { type FunctionTemplateBase } from '../../../templates/IFunctionTemplate'; import { assertTemplateIsV1 } from '../../../utils/templateVersionUtils'; -import { IBallerinaProjectWizardContext, getBallerinaFunctionFilePath, getBallerinaPackagePath } from '../../createNewProject/ballerinaSteps/IBallerinaProjectWizardContext'; +import { getBallerinaFunctionFilePath, getBallerinaPackagePath, type IBallerinaProjectWizardContext } from '../../createNewProject/ballerinaSteps/IBallerinaProjectWizardContext'; import { FunctionNameStepBase } from '../FunctionNameStepBase'; -import { IFunctionWizardContext } from '../IFunctionWizardContext'; +import { type IFunctionWizardContext } from '../IFunctionWizardContext'; export class BallerinaFunctionNameStep extends FunctionNameStepBase { protected async getUniqueFunctionName(context: IFunctionWizardContext & IBallerinaProjectWizardContext): Promise { diff --git a/src/commands/createFunction/ballerinaSteps/IBallerinaFunctionWizardContext.ts b/src/commands/createFunction/ballerinaSteps/IBallerinaFunctionWizardContext.ts index 047df16c5..50aa44ab6 100644 --- a/src/commands/createFunction/ballerinaSteps/IBallerinaFunctionWizardContext.ts +++ b/src/commands/createFunction/ballerinaSteps/IBallerinaFunctionWizardContext.ts @@ -3,8 +3,8 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { IFunctionTemplate } from '../../../templates/IFunctionTemplate'; -import { IFunctionWizardContext } from '../IFunctionWizardContext'; +import { type IFunctionTemplate } from '../../../templates/IFunctionTemplate'; +import { type IFunctionWizardContext } from '../IFunctionWizardContext'; export interface IBallerinaFunctionWizardContext extends IFunctionWizardContext { functionTemplate?: IBallerinaFunctionTemplate; diff --git a/src/commands/createFunction/createFunction.ts b/src/commands/createFunction/createFunction.ts index 96c388cd9..168ff9e08 100644 --- a/src/commands/createFunction/createFunction.ts +++ b/src/commands/createFunction/createFunction.ts @@ -3,21 +3,21 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { AzureWizard, IActionContext } from '@microsoft/vscode-azext-utils'; -import { WorkspaceFolder } from 'vscode'; -import { FuncVersion } from '../../FuncVersion'; -import { ProjectLanguage, projectTemplateKeySetting } from '../../constants'; +import { AzureWizard, type IActionContext } from '@microsoft/vscode-azext-utils'; +import { type WorkspaceFolder } from 'vscode'; +import { type FuncVersion } from '../../FuncVersion'; +import { projectTemplateKeySetting, type ProjectLanguage } from '../../constants'; import { addLocalFuncTelemetry } from '../../funcCoreTools/getLocalFuncCoreToolsVersion'; -import { LocalProjectTreeItem } from '../../tree/localProject/LocalProjectTreeItem'; +import { type LocalProjectTreeItem } from '../../tree/localProject/LocalProjectTreeItem'; import { durableUtils } from '../../utils/durableUtils'; import { getContainingWorkspace, getRootWorkspaceFolder } from '../../utils/workspace'; import { getWorkspaceSetting } from '../../vsCodeConfig/settings'; import { verifyInitForVSCode } from '../../vsCodeConfig/verifyInitForVSCode'; -import * as api from '../../vscode-azurefunctions.api'; +import type * as api from '../../vscode-azurefunctions.api'; import { createNewProjectInternal } from '../createNewProject/createNewProject'; import { verifyProjectPath } from '../createNewProject/verifyIsProject'; import { FunctionListStep } from './FunctionListStep'; -import { IFunctionWizardContext } from './IFunctionWizardContext'; +import { type IFunctionWizardContext } from './IFunctionWizardContext'; /** * @deprecated Use AzureFunctionsExtensionApi.createFunction instead diff --git a/src/commands/createFunction/dotnetSteps/DotnetFunctionCreateStep.ts b/src/commands/createFunction/dotnetSteps/DotnetFunctionCreateStep.ts index bced616da..efd3ac88c 100644 --- a/src/commands/createFunction/dotnetSteps/DotnetFunctionCreateStep.ts +++ b/src/commands/createFunction/dotnetSteps/DotnetFunctionCreateStep.ts @@ -3,18 +3,18 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { IActionContext } from '@microsoft/vscode-azext-utils'; +import { type IActionContext } from '@microsoft/vscode-azext-utils'; import * as path from 'path'; -import { FuncVersion } from '../../../FuncVersion'; +import { type FuncVersion } from '../../../FuncVersion'; import { ext } from '../../../extensionVariables'; -import { FunctionTemplateBase } from '../../../templates/IFunctionTemplate'; +import { type FunctionTemplateBase } from '../../../templates/IFunctionTemplate'; import { executeDotnetTemplateCommand, validateDotnetInstalled } from '../../../templates/dotnet/executeDotnetTemplateCommand'; import { cpUtils } from '../../../utils/cpUtils'; import { nonNullProp } from '../../../utils/nonNull'; import { assertTemplateIsV1 } from '../../../utils/templateVersionUtils'; import { FunctionCreateStepBase } from '../FunctionCreateStepBase'; import { getBindingSetting } from '../IFunctionWizardContext'; -import { IDotnetFunctionWizardContext, getFileExtension } from './IDotnetFunctionWizardContext'; +import { getFileExtension, type IDotnetFunctionWizardContext } from './IDotnetFunctionWizardContext'; export class DotnetFunctionCreateStep extends FunctionCreateStepBase { private constructor() { diff --git a/src/commands/createFunction/dotnetSteps/DotnetFunctionNameStep.ts b/src/commands/createFunction/dotnetSteps/DotnetFunctionNameStep.ts index 6d16f432a..ff3dfdf48 100644 --- a/src/commands/createFunction/dotnetSteps/DotnetFunctionNameStep.ts +++ b/src/commands/createFunction/dotnetSteps/DotnetFunctionNameStep.ts @@ -6,11 +6,11 @@ import { AzExtFsExtra } from '@microsoft/vscode-azext-utils'; import * as path from 'path'; import { localize } from "../../../localize"; -import { FunctionTemplateBase } from '../../../templates/IFunctionTemplate'; +import { type FunctionTemplateBase } from '../../../templates/IFunctionTemplate'; import { nonNullProp } from '../../../utils/nonNull'; import { assertTemplateIsV1 } from '../../../utils/templateVersionUtils'; import { FunctionNameStepBase } from '../FunctionNameStepBase'; -import { IDotnetFunctionWizardContext, getFileExtension } from './IDotnetFunctionWizardContext'; +import { getFileExtension, type IDotnetFunctionWizardContext } from './IDotnetFunctionWizardContext'; export class DotnetFunctionNameStep extends FunctionNameStepBase { protected async getUniqueFunctionName(context: IDotnetFunctionWizardContext): Promise { diff --git a/src/commands/createFunction/dotnetSteps/DotnetNamespaceStep.ts b/src/commands/createFunction/dotnetSteps/DotnetNamespaceStep.ts index 3ade4937a..088d0f1be 100644 --- a/src/commands/createFunction/dotnetSteps/DotnetNamespaceStep.ts +++ b/src/commands/createFunction/dotnetSteps/DotnetNamespaceStep.ts @@ -6,7 +6,7 @@ import { AzureWizardPromptStep } from '@microsoft/vscode-azext-utils'; import * as XRegExp from 'xregexp'; import { localize } from "../../../localize"; -import { IDotnetFunctionWizardContext } from './IDotnetFunctionWizardContext'; +import { type IDotnetFunctionWizardContext } from './IDotnetFunctionWizardContext'; export class DotnetNamespaceStep extends AzureWizardPromptStep { public async prompt(context: IDotnetFunctionWizardContext): Promise { diff --git a/src/commands/createFunction/dotnetSteps/IDotnetFunctionWizardContext.ts b/src/commands/createFunction/dotnetSteps/IDotnetFunctionWizardContext.ts index 118166af8..23461972d 100644 --- a/src/commands/createFunction/dotnetSteps/IDotnetFunctionWizardContext.ts +++ b/src/commands/createFunction/dotnetSteps/IDotnetFunctionWizardContext.ts @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ import { ProjectLanguage } from '../../../constants'; -import { IFunctionWizardContext } from '../IFunctionWizardContext'; +import { type IFunctionWizardContext } from '../IFunctionWizardContext'; export interface IDotnetFunctionWizardContext extends IFunctionWizardContext { namespace?: string; diff --git a/src/commands/createFunction/durableSteps/DurableProjectConfigureStep.ts b/src/commands/createFunction/durableSteps/DurableProjectConfigureStep.ts index ac1a50931..20f9c4a50 100644 --- a/src/commands/createFunction/durableSteps/DurableProjectConfigureStep.ts +++ b/src/commands/createFunction/durableSteps/DurableProjectConfigureStep.ts @@ -5,15 +5,15 @@ import { AzExtFsExtra, AzureWizardExecuteStep } from '@microsoft/vscode-azext-utils'; import * as path from "path"; -import { Progress } from 'vscode'; +import { type Progress } from 'vscode'; import { ConnectionKey, DurableBackend, hostFileName } from '../../../constants'; import { viewOutput } from '../../../constants-nls'; import { ext } from '../../../extensionVariables'; -import { IHostJsonV2 } from '../../../funcConfig/host'; +import { type IHostJsonV2 } from '../../../funcConfig/host'; import { MismatchBehavior, setLocalAppSetting } from '../../../funcConfig/local.settings'; import { localize } from '../../../localize'; import { durableUtils } from '../../../utils/durableUtils'; -import { IFunctionWizardContext } from '../IFunctionWizardContext'; +import { type IFunctionWizardContext } from '../IFunctionWizardContext'; export class DurableProjectConfigureStep extends AzureWizardExecuteStep { public priority: number = 225; diff --git a/src/commands/createFunction/durableSteps/DurableStorageTypePromptStep.ts b/src/commands/createFunction/durableSteps/DurableStorageTypePromptStep.ts index 07c1dc52f..2402abb3b 100644 --- a/src/commands/createFunction/durableSteps/DurableStorageTypePromptStep.ts +++ b/src/commands/createFunction/durableSteps/DurableStorageTypePromptStep.ts @@ -3,12 +3,12 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { AzureWizardPromptStep, IAzureQuickPickItem, IWizardOptions, openUrl } from "@microsoft/vscode-azext-utils"; -import { DurableBackend, DurableBackendValues } from "../../../constants"; +import { AzureWizardPromptStep, openUrl, type IAzureQuickPickItem, type IWizardOptions } from "@microsoft/vscode-azext-utils"; +import { DurableBackend, type DurableBackendValues } from "../../../constants"; import { defaultDescription } from "../../../constants-nls"; import { localize } from "../../../localize"; import { FunctionSubWizard } from "../FunctionSubWizard"; -import { IFunctionWizardContext } from "../IFunctionWizardContext"; +import { type IFunctionWizardContext } from "../IFunctionWizardContext"; export class DurableStorageTypePromptStep extends AzureWizardPromptStep { private readonly _functionSettings: { [key: string]: string | undefined }; diff --git a/src/commands/createFunction/durableSteps/netherite/EventHubsNamespaceAuthRuleCreateStep.ts b/src/commands/createFunction/durableSteps/netherite/EventHubsNamespaceAuthRuleCreateStep.ts index 06e425fb3..aea3a4205 100644 --- a/src/commands/createFunction/durableSteps/netherite/EventHubsNamespaceAuthRuleCreateStep.ts +++ b/src/commands/createFunction/durableSteps/netherite/EventHubsNamespaceAuthRuleCreateStep.ts @@ -3,14 +3,14 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { AuthorizationRule, EventHubManagementClient, KnownAccessRights } from '@azure/arm-eventhub'; +import { KnownAccessRights, type AuthorizationRule, type EventHubManagementClient } from '@azure/arm-eventhub'; import { getResourceGroupFromId } from '@microsoft/vscode-azext-azureutils'; -import { AzureWizardExecuteStep, ISubscriptionContext, nonNullProp, nonNullValue } from '@microsoft/vscode-azext-utils'; -import { Progress } from 'vscode'; +import { AzureWizardExecuteStep, nonNullProp, nonNullValue, type ISubscriptionContext } from '@microsoft/vscode-azext-utils'; +import { type Progress } from 'vscode'; import { ext } from '../../../../extensionVariables'; import { localize } from '../../../../localize'; import { createEventHubClient } from '../../../../utils/azureClients'; -import { IEventHubsConnectionWizardContext } from '../../../appSettings/connectionSettings/eventHubs/IEventHubsConnectionWizardContext'; +import { type IEventHubsConnectionWizardContext } from '../../../appSettings/connectionSettings/eventHubs/IEventHubsConnectionWizardContext'; export class EventHubsNamespaceAuthRuleCreateStep extends AzureWizardExecuteStep { public priority: number = 250; diff --git a/src/commands/createFunction/durableSteps/netherite/EventHubsNamespaceAuthRuleNameStep.ts b/src/commands/createFunction/durableSteps/netherite/EventHubsNamespaceAuthRuleNameStep.ts index de290afc2..3d78deba2 100644 --- a/src/commands/createFunction/durableSteps/netherite/EventHubsNamespaceAuthRuleNameStep.ts +++ b/src/commands/createFunction/durableSteps/netherite/EventHubsNamespaceAuthRuleNameStep.ts @@ -3,14 +3,14 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { AuthorizationRule, EventHubManagementClient } from "@azure/arm-eventhub"; +import { type AuthorizationRule, type EventHubManagementClient } from "@azure/arm-eventhub"; import { getResourceGroupFromId, uiUtils } from "@microsoft/vscode-azext-azureutils"; -import { AzureWizardPromptStep, ISubscriptionContext, nonNullValue } from "@microsoft/vscode-azext-utils"; +import { AzureWizardPromptStep, nonNullValue, type ISubscriptionContext } from "@microsoft/vscode-azext-utils"; import { getInvalidLengthMessage } from "../../../../constants-nls"; import { localize } from "../../../../localize"; import { createEventHubClient } from "../../../../utils/azureClients"; import { validateUtils } from "../../../../utils/validateUtils"; -import { IEventHubsConnectionWizardContext } from "../../../appSettings/connectionSettings/eventHubs/IEventHubsConnectionWizardContext"; +import { type IEventHubsConnectionWizardContext } from "../../../appSettings/connectionSettings/eventHubs/IEventHubsConnectionWizardContext"; export class EventHubsNamespaceAuthRuleNameStep extends AzureWizardPromptStep { private authRules: AuthorizationRule[]; diff --git a/src/commands/createFunction/durableSteps/netherite/EventHubsNamespaceCreateStep.ts b/src/commands/createFunction/durableSteps/netherite/EventHubsNamespaceCreateStep.ts index c1fe65eb9..cf888f62e 100644 --- a/src/commands/createFunction/durableSteps/netherite/EventHubsNamespaceCreateStep.ts +++ b/src/commands/createFunction/durableSteps/netherite/EventHubsNamespaceCreateStep.ts @@ -3,14 +3,14 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import type { EHNamespace, EventHubManagementClient } from '@azure/arm-eventhub'; -import { AzExtLocation, LocationListStep } from '@microsoft/vscode-azext-azureutils'; -import { AzureWizardExecuteStep, ISubscriptionContext, nonNullProp, nonNullValue, nonNullValueAndProp } from '@microsoft/vscode-azext-utils'; -import { Progress } from 'vscode'; +import { type EHNamespace, type EventHubManagementClient } from '@azure/arm-eventhub'; +import { LocationListStep, type AzExtLocation } from '@microsoft/vscode-azext-azureutils'; +import { AzureWizardExecuteStep, nonNullProp, nonNullValue, nonNullValueAndProp, type ISubscriptionContext } from '@microsoft/vscode-azext-utils'; +import { type Progress } from 'vscode'; import { ext } from '../../../../extensionVariables'; import { localize } from '../../../../localize'; import { createEventHubClient } from '../../../../utils/azureClients'; -import { IEventHubsConnectionWizardContext } from '../../../appSettings/connectionSettings/eventHubs/IEventHubsConnectionWizardContext'; +import { type IEventHubsConnectionWizardContext } from '../../../appSettings/connectionSettings/eventHubs/IEventHubsConnectionWizardContext'; export class EventHubsNamespaceCreateStep extends AzureWizardExecuteStep { public priority: number = 190; diff --git a/src/commands/createFunction/durableSteps/netherite/EventHubsNamespaceListStep.ts b/src/commands/createFunction/durableSteps/netherite/EventHubsNamespaceListStep.ts index 0fef906fe..add1296a2 100644 --- a/src/commands/createFunction/durableSteps/netherite/EventHubsNamespaceListStep.ts +++ b/src/commands/createFunction/durableSteps/netherite/EventHubsNamespaceListStep.ts @@ -3,13 +3,13 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import type { EHNamespace, EventHubManagementClient } from '@azure/arm-eventhub'; +import { type EHNamespace, type EventHubManagementClient } from '@azure/arm-eventhub'; import { createResourceClient } from '@microsoft/vscode-azext-azureappservice'; import { ResourceGroupListStep, getResourceGroupFromId, uiUtils } from '@microsoft/vscode-azext-azureutils'; -import { AzureWizardExecuteStep, AzureWizardPromptStep, IAzureQuickPickItem, IAzureQuickPickOptions, ISubscriptionContext, IWizardOptions, nonNullProp } from '@microsoft/vscode-azext-utils'; +import { AzureWizardPromptStep, nonNullProp, type AzureWizardExecuteStep, type IAzureQuickPickItem, type IAzureQuickPickOptions, type ISubscriptionContext, type IWizardOptions } from '@microsoft/vscode-azext-utils'; import { localize } from '../../../../localize'; import { createEventHubClient } from '../../../../utils/azureClients'; -import { IEventHubsConnectionWizardContext } from '../../../appSettings/connectionSettings/eventHubs/IEventHubsConnectionWizardContext'; +import { type IEventHubsConnectionWizardContext } from '../../../appSettings/connectionSettings/eventHubs/IEventHubsConnectionWizardContext'; import { EventHubsNamespaceCreateStep } from './EventHubsNamespaceCreateStep'; import { EventHubsNamespaceNameStep } from './EventHubsNamespaceNameStep'; diff --git a/src/commands/createFunction/durableSteps/netherite/EventHubsNamespaceNameStep.ts b/src/commands/createFunction/durableSteps/netherite/EventHubsNamespaceNameStep.ts index 6f6100b3d..63657ae33 100644 --- a/src/commands/createFunction/durableSteps/netherite/EventHubsNamespaceNameStep.ts +++ b/src/commands/createFunction/durableSteps/netherite/EventHubsNamespaceNameStep.ts @@ -3,13 +3,13 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import type { EventHubManagementClient } from '@azure/arm-eventhub'; -import { AzureWizardPromptStep, ISubscriptionContext } from '@microsoft/vscode-azext-utils'; +import { type EventHubManagementClient } from '@azure/arm-eventhub'; +import { AzureWizardPromptStep, type ISubscriptionContext } from '@microsoft/vscode-azext-utils'; import { getInvalidLengthMessage, invalidAlphanumericWithHyphens } from '../../../../constants-nls'; import { localize } from '../../../../localize'; import { createEventHubClient } from '../../../../utils/azureClients'; import { validateUtils } from '../../../../utils/validateUtils'; -import { IEventHubsConnectionWizardContext } from '../../../appSettings/connectionSettings/eventHubs/IEventHubsConnectionWizardContext'; +import { type IEventHubsConnectionWizardContext } from '../../../appSettings/connectionSettings/eventHubs/IEventHubsConnectionWizardContext'; export class EventHubsNamespaceNameStep extends AzureWizardPromptStep { private client: EventHubManagementClient; diff --git a/src/commands/createFunction/durableSteps/netherite/NetheriteConfigureHostStep.ts b/src/commands/createFunction/durableSteps/netherite/NetheriteConfigureHostStep.ts index 8511479db..d98e0e378 100644 --- a/src/commands/createFunction/durableSteps/netherite/NetheriteConfigureHostStep.ts +++ b/src/commands/createFunction/durableSteps/netherite/NetheriteConfigureHostStep.ts @@ -8,10 +8,10 @@ import * as path from 'path'; import { hostFileName } from '../../../../constants'; import { viewOutput } from '../../../../constants-nls'; import { ext } from '../../../../extensionVariables'; -import { IHostJsonV2, INetheriteTaskJson } from '../../../../funcConfig/host'; +import { type IHostJsonV2, type INetheriteTaskJson } from '../../../../funcConfig/host'; import { localize } from '../../../../localize'; import { durableUtils } from '../../../../utils/durableUtils'; -import { IEventHubsConnectionWizardContext } from '../../../appSettings/connectionSettings/eventHubs/IEventHubsConnectionWizardContext'; +import { type IEventHubsConnectionWizardContext } from '../../../appSettings/connectionSettings/eventHubs/IEventHubsConnectionWizardContext'; export class NetheriteConfigureHostStep extends AzureWizardExecuteStep { public priority: number = 245; diff --git a/src/commands/createFunction/durableSteps/netherite/NetheriteEventHubNameStep.ts b/src/commands/createFunction/durableSteps/netherite/NetheriteEventHubNameStep.ts index 9da2c1409..7099e9b0d 100644 --- a/src/commands/createFunction/durableSteps/netherite/NetheriteEventHubNameStep.ts +++ b/src/commands/createFunction/durableSteps/netherite/NetheriteEventHubNameStep.ts @@ -3,14 +3,14 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import type { Eventhub, EventHubManagementClient } from '@azure/arm-eventhub'; +import { type Eventhub, type EventHubManagementClient } from '@azure/arm-eventhub'; import { getResourceGroupFromId, uiUtils } from '@microsoft/vscode-azext-azureutils'; -import { AzureWizardPromptStep, ISubscriptionContext, nonNullValue } from '@microsoft/vscode-azext-utils'; +import { AzureWizardPromptStep, nonNullValue, type ISubscriptionContext } from '@microsoft/vscode-azext-utils'; import { getInvalidLengthMessage, invalidLowerCaseAlphanumericWithHyphens } from '../../../../constants-nls'; import { localize } from '../../../../localize'; import { createEventHubClient } from '../../../../utils/azureClients'; import { validateUtils } from '../../../../utils/validateUtils'; -import { IEventHubsConnectionWizardContext } from '../../../appSettings/connectionSettings/eventHubs/IEventHubsConnectionWizardContext'; +import { type IEventHubsConnectionWizardContext } from '../../../appSettings/connectionSettings/eventHubs/IEventHubsConnectionWizardContext'; export class NetheriteEventHubNameStep extends AzureWizardPromptStep { private eventHubs: Eventhub[] = []; diff --git a/src/commands/createFunction/durableSteps/netherite/createAndGetAuthRuleName.ts b/src/commands/createFunction/durableSteps/netherite/createAndGetAuthRuleName.ts index 2ab540e9a..058cdd467 100644 --- a/src/commands/createFunction/durableSteps/netherite/createAndGetAuthRuleName.ts +++ b/src/commands/createFunction/durableSteps/netherite/createAndGetAuthRuleName.ts @@ -3,8 +3,8 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { AzureWizard, ISubscriptionContext, nonNullValue } from "@microsoft/vscode-azext-utils"; -import { IEventHubsConnectionWizardContext } from "../../../appSettings/connectionSettings/eventHubs/IEventHubsConnectionWizardContext"; +import { AzureWizard, nonNullValue, type ISubscriptionContext } from "@microsoft/vscode-azext-utils"; +import { type IEventHubsConnectionWizardContext } from "../../../appSettings/connectionSettings/eventHubs/IEventHubsConnectionWizardContext"; import { EventHubsNamespaceAuthRuleCreateStep } from "./EventHubsNamespaceAuthRuleCreateStep"; import { EventHubsNamespaceAuthRuleNameStep } from "./EventHubsNamespaceAuthRuleNameStep"; diff --git a/src/commands/createFunction/durableSteps/sql/SqlDatabaseCreateStep.ts b/src/commands/createFunction/durableSteps/sql/SqlDatabaseCreateStep.ts index 4a408db3f..28ef6b8bf 100644 --- a/src/commands/createFunction/durableSteps/sql/SqlDatabaseCreateStep.ts +++ b/src/commands/createFunction/durableSteps/sql/SqlDatabaseCreateStep.ts @@ -3,14 +3,14 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import type { Database, SqlManagementClient } from '@azure/arm-sql'; -import { AzExtLocation, getResourceGroupFromId, LocationListStep } from '@microsoft/vscode-azext-azureutils'; -import { AzureWizardExecuteStep, ISubscriptionContext, nonNullProp, nonNullValue } from '@microsoft/vscode-azext-utils'; -import { Progress } from 'vscode'; +import { type Database, type SqlManagementClient } from '@azure/arm-sql'; +import { LocationListStep, getResourceGroupFromId, type AzExtLocation } from '@microsoft/vscode-azext-azureutils'; +import { AzureWizardExecuteStep, nonNullProp, nonNullValue, type ISubscriptionContext } from '@microsoft/vscode-azext-utils'; +import { type Progress } from 'vscode'; import { ext } from '../../../../extensionVariables'; import { localize } from '../../../../localize'; import { createSqlClient } from '../../../../utils/azureClients'; -import { ISqlDatabaseConnectionWizardContext } from '../../../appSettings/connectionSettings/sqlDatabase/ISqlDatabaseConnectionWizardContext'; +import { type ISqlDatabaseConnectionWizardContext } from '../../../appSettings/connectionSettings/sqlDatabase/ISqlDatabaseConnectionWizardContext'; export class SqlDatabaseCreateStep extends AzureWizardExecuteStep { public priority: number = 210; diff --git a/src/commands/createFunction/durableSteps/sql/SqlDatabaseListStep.ts b/src/commands/createFunction/durableSteps/sql/SqlDatabaseListStep.ts index 3fb576e7b..4df5c2ca5 100644 --- a/src/commands/createFunction/durableSteps/sql/SqlDatabaseListStep.ts +++ b/src/commands/createFunction/durableSteps/sql/SqlDatabaseListStep.ts @@ -3,13 +3,13 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import type { Database, Server, SqlManagementClient } from '@azure/arm-sql'; -import { getResourceGroupFromId, ResourceGroupListStep, uiUtils } from '@microsoft/vscode-azext-azureutils'; -import { AzureWizardExecuteStep, AzureWizardPromptStep, IAzureQuickPickItem, IAzureQuickPickOptions, ISubscriptionContext, IWizardOptions, nonNullProp, nonNullValue } from '@microsoft/vscode-azext-utils'; +import { type Database, type Server, type SqlManagementClient } from '@azure/arm-sql'; +import { ResourceGroupListStep, getResourceGroupFromId, uiUtils } from '@microsoft/vscode-azext-azureutils'; +import { AzureWizardPromptStep, nonNullProp, nonNullValue, type AzureWizardExecuteStep, type IAzureQuickPickItem, type IAzureQuickPickOptions, type ISubscriptionContext, type IWizardOptions } from '@microsoft/vscode-azext-utils'; import { ConnectionType } from '../../../../constants'; import { localize } from '../../../../localize'; import { createSqlClient } from '../../../../utils/azureClients'; -import { ISqlDatabaseConnectionWizardContext } from '../../../appSettings/connectionSettings/sqlDatabase/ISqlDatabaseConnectionWizardContext'; +import { type ISqlDatabaseConnectionWizardContext } from '../../../appSettings/connectionSettings/sqlDatabase/ISqlDatabaseConnectionWizardContext'; import { SqlDatabaseCreateStep } from './SqlDatabaseCreateStep'; import { SqlDatabaseNameStep } from './SqlDatabaseNameStep'; diff --git a/src/commands/createFunction/durableSteps/sql/SqlDatabaseNameStep.ts b/src/commands/createFunction/durableSteps/sql/SqlDatabaseNameStep.ts index e69d0fa2d..754467e6b 100644 --- a/src/commands/createFunction/durableSteps/sql/SqlDatabaseNameStep.ts +++ b/src/commands/createFunction/durableSteps/sql/SqlDatabaseNameStep.ts @@ -3,14 +3,14 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import type { Database, SqlManagementClient } from '@azure/arm-sql'; +import { type Database, type SqlManagementClient } from '@azure/arm-sql'; import { getResourceGroupFromId, uiUtils } from '@microsoft/vscode-azext-azureutils'; -import { AzureWizardPromptStep, ISubscriptionContext, nonNullProp, nonNullValue } from '@microsoft/vscode-azext-utils'; +import { AzureWizardPromptStep, nonNullProp, nonNullValue, type ISubscriptionContext } from '@microsoft/vscode-azext-utils'; import { getInvalidLengthMessage, invalidAlphanumericWithHyphens } from '../../../../constants-nls'; import { localize } from '../../../../localize'; import { createSqlClient } from '../../../../utils/azureClients'; import { validateUtils } from '../../../../utils/validateUtils'; -import { ISqlDatabaseConnectionWizardContext } from '../../../appSettings/connectionSettings/sqlDatabase/ISqlDatabaseConnectionWizardContext'; +import { type ISqlDatabaseConnectionWizardContext } from '../../../appSettings/connectionSettings/sqlDatabase/ISqlDatabaseConnectionWizardContext'; export class SqlDatabaseNameStep extends AzureWizardPromptStep { private databases: Database[] = []; diff --git a/src/commands/createFunction/durableSteps/sql/SqlServerCreateStep.ts b/src/commands/createFunction/durableSteps/sql/SqlServerCreateStep.ts index 4cb841d0e..9a9289fd5 100644 --- a/src/commands/createFunction/durableSteps/sql/SqlServerCreateStep.ts +++ b/src/commands/createFunction/durableSteps/sql/SqlServerCreateStep.ts @@ -3,14 +3,14 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import type { Server, SqlManagementClient } from '@azure/arm-sql'; -import { AzExtLocation, LocationListStep } from '@microsoft/vscode-azext-azureutils'; -import { AzureWizardExecuteStep, ISubscriptionContext, nonNullProp, nonNullValue } from '@microsoft/vscode-azext-utils'; -import { Progress } from 'vscode'; +import { type Server, type SqlManagementClient } from '@azure/arm-sql'; +import { LocationListStep, type AzExtLocation } from '@microsoft/vscode-azext-azureutils'; +import { AzureWizardExecuteStep, nonNullProp, nonNullValue, type ISubscriptionContext } from '@microsoft/vscode-azext-utils'; +import { type Progress } from 'vscode'; import { ext } from '../../../../extensionVariables'; import { localize } from '../../../../localize'; import { createSqlClient } from '../../../../utils/azureClients'; -import { ISqlDatabaseConnectionWizardContext } from '../../../appSettings/connectionSettings/sqlDatabase/ISqlDatabaseConnectionWizardContext'; +import { type ISqlDatabaseConnectionWizardContext } from '../../../appSettings/connectionSettings/sqlDatabase/ISqlDatabaseConnectionWizardContext'; export class SqlServerCreateStep extends AzureWizardExecuteStep { public priority: number = 205; diff --git a/src/commands/createFunction/durableSteps/sql/SqlServerListStep.ts b/src/commands/createFunction/durableSteps/sql/SqlServerListStep.ts index 36e997a11..39121cf96 100644 --- a/src/commands/createFunction/durableSteps/sql/SqlServerListStep.ts +++ b/src/commands/createFunction/durableSteps/sql/SqlServerListStep.ts @@ -3,12 +3,12 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import type { Server, SqlManagementClient } from '@azure/arm-sql'; +import { type Server, type SqlManagementClient } from '@azure/arm-sql'; import { ResourceGroupListStep, uiUtils } from '@microsoft/vscode-azext-azureutils'; -import { AzureWizardExecuteStep, AzureWizardPromptStep, ConfirmPreviousInputStep, IAzureQuickPickItem, IAzureQuickPickOptions, ISubscriptionContext, IWizardOptions, nonNullProp } from '@microsoft/vscode-azext-utils'; +import { AzureWizardPromptStep, ConfirmPreviousInputStep, nonNullProp, type AzureWizardExecuteStep, type IAzureQuickPickItem, type IAzureQuickPickOptions, type ISubscriptionContext, type IWizardOptions } from '@microsoft/vscode-azext-utils'; import { localize } from '../../../../localize'; import { createSqlClient } from '../../../../utils/azureClients'; -import { ISqlDatabaseConnectionWizardContext } from '../../../appSettings/connectionSettings/sqlDatabase/ISqlDatabaseConnectionWizardContext'; +import { type ISqlDatabaseConnectionWizardContext } from '../../../appSettings/connectionSettings/sqlDatabase/ISqlDatabaseConnectionWizardContext'; import { SqlServerCreateStep } from './SqlServerCreateStep'; import { SqlServerNameStep } from './SqlServerNameStep'; import { SqlServerPasswordAuthStep } from './SqlServerPasswordAuthStep'; diff --git a/src/commands/createFunction/durableSteps/sql/SqlServerNameStep.ts b/src/commands/createFunction/durableSteps/sql/SqlServerNameStep.ts index 8591e21d8..6c9377e14 100644 --- a/src/commands/createFunction/durableSteps/sql/SqlServerNameStep.ts +++ b/src/commands/createFunction/durableSteps/sql/SqlServerNameStep.ts @@ -3,13 +3,13 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import type { SqlManagementClient } from '@azure/arm-sql'; -import { AzureWizardPromptStep, ISubscriptionContext } from '@microsoft/vscode-azext-utils'; +import { type SqlManagementClient } from '@azure/arm-sql'; +import { AzureWizardPromptStep, type ISubscriptionContext } from '@microsoft/vscode-azext-utils'; import { getInvalidLengthMessage, invalidLowerCaseAlphanumericWithHyphens } from '../../../../constants-nls'; import { localize } from '../../../../localize'; import { createSqlClient } from '../../../../utils/azureClients'; import { validateUtils } from '../../../../utils/validateUtils'; -import { ISqlDatabaseConnectionWizardContext } from '../../../appSettings/connectionSettings/sqlDatabase/ISqlDatabaseConnectionWizardContext'; +import { type ISqlDatabaseConnectionWizardContext } from '../../../appSettings/connectionSettings/sqlDatabase/ISqlDatabaseConnectionWizardContext'; export class SqlServerNameStep extends AzureWizardPromptStep { private client: SqlManagementClient; diff --git a/src/commands/createFunction/durableSteps/sql/SqlServerPasswordAuthStep.ts b/src/commands/createFunction/durableSteps/sql/SqlServerPasswordAuthStep.ts index a8b403dec..ffb823a84 100644 --- a/src/commands/createFunction/durableSteps/sql/SqlServerPasswordAuthStep.ts +++ b/src/commands/createFunction/durableSteps/sql/SqlServerPasswordAuthStep.ts @@ -7,7 +7,7 @@ import { AzureWizardPromptStep, nonNullProp } from '@microsoft/vscode-azext-util import { getInvalidLengthMessage } from '../../../../constants-nls'; import { localize } from '../../../../localize'; import { validateUtils } from '../../../../utils/validateUtils'; -import { ISqlDatabaseConnectionWizardContext } from '../../../appSettings/connectionSettings/sqlDatabase/ISqlDatabaseConnectionWizardContext'; +import { type ISqlDatabaseConnectionWizardContext } from '../../../appSettings/connectionSettings/sqlDatabase/ISqlDatabaseConnectionWizardContext'; export class SqlServerPasswordAuthStep extends AzureWizardPromptStep { public constructor() { diff --git a/src/commands/createFunction/durableSteps/sql/SqlServerUsernameAuthStep.ts b/src/commands/createFunction/durableSteps/sql/SqlServerUsernameAuthStep.ts index 0fdedc8d9..7517f80b6 100644 --- a/src/commands/createFunction/durableSteps/sql/SqlServerUsernameAuthStep.ts +++ b/src/commands/createFunction/durableSteps/sql/SqlServerUsernameAuthStep.ts @@ -7,7 +7,7 @@ import { AzureWizardPromptStep, nonNullProp } from '@microsoft/vscode-azext-util import { getInvalidLengthMessage, invalidAlphanumericWithHyphens } from '../../../../constants-nls'; import { localize } from '../../../../localize'; import { validateUtils } from '../../../../utils/validateUtils'; -import { ISqlDatabaseConnectionWizardContext } from '../../../appSettings/connectionSettings/sqlDatabase/ISqlDatabaseConnectionWizardContext'; +import { type ISqlDatabaseConnectionWizardContext } from '../../../appSettings/connectionSettings/sqlDatabase/ISqlDatabaseConnectionWizardContext'; export class SqlServerUsernameAuthStep extends AzureWizardPromptStep { public async prompt(context: T): Promise { diff --git a/src/commands/createFunction/javaSteps/IJavaFunctionWizardContext.ts b/src/commands/createFunction/javaSteps/IJavaFunctionWizardContext.ts index c683c3643..4e7dc50a4 100644 --- a/src/commands/createFunction/javaSteps/IJavaFunctionWizardContext.ts +++ b/src/commands/createFunction/javaSteps/IJavaFunctionWizardContext.ts @@ -3,8 +3,8 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { IFunctionTemplate } from '../../../templates/IFunctionTemplate'; -import { IFunctionWizardContext } from '../IFunctionWizardContext'; +import { type IFunctionTemplate } from '../../../templates/IFunctionTemplate'; +import { type IFunctionWizardContext } from '../IFunctionWizardContext'; export interface IJavaFunctionWizardContext extends IFunctionWizardContext { functionTemplate?: IJavaFunctionTemplate; diff --git a/src/commands/createFunction/javaSteps/JavaFunctionCreateStep.ts b/src/commands/createFunction/javaSteps/JavaFunctionCreateStep.ts index 2c7c3734f..34438ce43 100644 --- a/src/commands/createFunction/javaSteps/JavaFunctionCreateStep.ts +++ b/src/commands/createFunction/javaSteps/JavaFunctionCreateStep.ts @@ -4,10 +4,10 @@ *--------------------------------------------------------------------------------------------*/ import { AzExtFsExtra } from '@microsoft/vscode-azext-utils'; import { nonNullProp } from '../../../utils/nonNull'; -import { getJavaFunctionFilePath, IJavaProjectWizardContext } from '../../createNewProject/javaSteps/IJavaProjectWizardContext'; +import { getJavaFunctionFilePath, type IJavaProjectWizardContext } from '../../createNewProject/javaSteps/IJavaProjectWizardContext'; import { FunctionCreateStepBase } from '../FunctionCreateStepBase'; -import { getBindingSetting, IFunctionWizardContext } from '../IFunctionWizardContext'; -import { IJavaFunctionTemplate, IJavaFunctionWizardContext } from './IJavaFunctionWizardContext'; +import { getBindingSetting, type IFunctionWizardContext } from '../IFunctionWizardContext'; +import { type IJavaFunctionTemplate, type IJavaFunctionWizardContext } from './IJavaFunctionWizardContext'; export class JavaFunctionCreateStep extends FunctionCreateStepBase { diff --git a/src/commands/createFunction/javaSteps/JavaFunctionNameStep.ts b/src/commands/createFunction/javaSteps/JavaFunctionNameStep.ts index 028ff2b62..5afd147b8 100644 --- a/src/commands/createFunction/javaSteps/JavaFunctionNameStep.ts +++ b/src/commands/createFunction/javaSteps/JavaFunctionNameStep.ts @@ -5,12 +5,12 @@ import { AzExtFsExtra } from '@microsoft/vscode-azext-utils'; import { localize } from "../../../localize"; -import { FunctionTemplateBase } from '../../../templates/IFunctionTemplate'; +import { type FunctionTemplateBase } from '../../../templates/IFunctionTemplate'; import { nonNullProp } from '../../../utils/nonNull'; import { assertTemplateIsV1 } from '../../../utils/templateVersionUtils'; -import { IJavaProjectWizardContext, getJavaClassName, getJavaFunctionFilePath, getJavaPackagePath } from '../../createNewProject/javaSteps/IJavaProjectWizardContext'; +import { getJavaClassName, getJavaFunctionFilePath, getJavaPackagePath, type IJavaProjectWizardContext } from '../../createNewProject/javaSteps/IJavaProjectWizardContext'; import { FunctionNameStepBase } from '../FunctionNameStepBase'; -import { IFunctionWizardContext } from '../IFunctionWizardContext'; +import { type IFunctionWizardContext } from '../IFunctionWizardContext'; export class JavaFunctionNameStep extends FunctionNameStepBase { protected async getUniqueFunctionName(context: IFunctionWizardContext & IJavaProjectWizardContext): Promise { diff --git a/src/commands/createFunction/openAPISteps/OpenAPICreateStep.ts b/src/commands/createFunction/openAPISteps/OpenAPICreateStep.ts index 04005b35d..7f088cf26 100644 --- a/src/commands/createFunction/openAPISteps/OpenAPICreateStep.ts +++ b/src/commands/createFunction/openAPISteps/OpenAPICreateStep.ts @@ -3,19 +3,19 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { AzureWizardExecuteStep, DialogResponses, IActionContext } from '@microsoft/vscode-azext-utils'; +import { AzureWizardExecuteStep, DialogResponses, type IActionContext } from '@microsoft/vscode-azext-utils'; import * as path from 'path'; -import { ProgressLocation, Uri, window } from "vscode"; -import { packageJsonFileName, ProjectLanguage } from "../../../constants"; +import { ProgressLocation, window, type Uri } from "vscode"; +import { ProjectLanguage, packageJsonFileName } from "../../../constants"; import { ext } from "../../../extensionVariables"; import { localize } from "../../../localize"; import { cpUtils } from "../../../utils/cpUtils"; import { confirmEditJsonFile } from '../../../utils/fs'; import { nonNullProp } from '../../../utils/nonNull'; import { openUrl } from '../../../utils/openUrl'; -import { IJavaProjectWizardContext } from '../../createNewProject/javaSteps/IJavaProjectWizardContext'; -import { IDotnetFunctionWizardContext } from '../dotnetSteps/IDotnetFunctionWizardContext'; -import { IFunctionWizardContext } from "../IFunctionWizardContext"; +import { type IJavaProjectWizardContext } from '../../createNewProject/javaSteps/IJavaProjectWizardContext'; +import { type IFunctionWizardContext } from "../IFunctionWizardContext"; +import { type IDotnetFunctionWizardContext } from '../dotnetSteps/IDotnetFunctionWizardContext'; export class OpenAPICreateStep extends AzureWizardExecuteStep { public priority: number = 220; diff --git a/src/commands/createFunction/openAPISteps/OpenAPIGetSpecificationFileStep.ts b/src/commands/createFunction/openAPISteps/OpenAPIGetSpecificationFileStep.ts index 6d873615c..c9f0cd858 100644 --- a/src/commands/createFunction/openAPISteps/OpenAPIGetSpecificationFileStep.ts +++ b/src/commands/createFunction/openAPISteps/OpenAPIGetSpecificationFileStep.ts @@ -4,8 +4,8 @@ *--------------------------------------------------------------------------------------------*/ import { AzureWizardPromptStep } from "@microsoft/vscode-azext-utils"; -import { OpenDialogOptions, Uri, workspace } from "vscode"; -import { IFunctionWizardContext } from "../IFunctionWizardContext"; +import { Uri, workspace, type OpenDialogOptions } from "vscode"; +import { type IFunctionWizardContext } from "../IFunctionWizardContext"; export class OpenAPIGetSpecificationFileStep extends AzureWizardPromptStep { public async prompt(context: IFunctionWizardContext): Promise { diff --git a/src/commands/createFunction/promptStepsV2/BooleanInputStep.ts b/src/commands/createFunction/promptStepsV2/BooleanInputStep.ts index 8e77ae89e..b514b0456 100644 --- a/src/commands/createFunction/promptStepsV2/BooleanInputStep.ts +++ b/src/commands/createFunction/promptStepsV2/BooleanInputStep.ts @@ -3,9 +3,9 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { IAzureQuickPickItem } from "@microsoft/vscode-azext-utils"; +import { type IAzureQuickPickItem } from "@microsoft/vscode-azext-utils"; import { envUtils } from "../../../utils/envUtils"; -import { FunctionV2WizardContext } from "../IFunctionWizardContext"; +import { type FunctionV2WizardContext } from "../IFunctionWizardContext"; import { QuickPickInputStep } from "./QuickPickInputStep"; export class BooleanInputStep extends QuickPickInputStep { diff --git a/src/commands/createFunction/promptStepsV2/EnumInputStep.ts b/src/commands/createFunction/promptStepsV2/EnumInputStep.ts index 2e6387ca6..f1246c33d 100644 --- a/src/commands/createFunction/promptStepsV2/EnumInputStep.ts +++ b/src/commands/createFunction/promptStepsV2/EnumInputStep.ts @@ -3,8 +3,8 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { IAzureQuickPickItem, nonNullProp } from "@microsoft/vscode-azext-utils"; -import { FunctionV2WizardContext } from "../IFunctionWizardContext"; +import { nonNullProp, type IAzureQuickPickItem } from "@microsoft/vscode-azext-utils"; +import { type FunctionV2WizardContext } from "../IFunctionWizardContext"; import { QuickPickInputStep } from "./QuickPickInputStep"; export class EnumInputStep extends QuickPickInputStep { diff --git a/src/commands/createFunction/promptStepsV2/ExistingFileStep.ts b/src/commands/createFunction/promptStepsV2/ExistingFileStep.ts index 83b1a2d50..32ccd4443 100644 --- a/src/commands/createFunction/promptStepsV2/ExistingFileStep.ts +++ b/src/commands/createFunction/promptStepsV2/ExistingFileStep.ts @@ -3,11 +3,11 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { AzExtFsExtra, AzExtOpenDialogOptions } from "@microsoft/vscode-azext-utils"; +import { AzExtFsExtra, type AzExtOpenDialogOptions } from "@microsoft/vscode-azext-utils"; import { Uri } from "vscode"; import { Utils } from 'vscode-uri'; -import { JobType, ParsedInput } from "../../../templates/script/parseScriptTemplatesV2"; -import { FunctionV2WizardContext } from "../IFunctionWizardContext"; +import { JobType, type ParsedInput } from "../../../templates/script/parseScriptTemplatesV2"; +import { type FunctionV2WizardContext } from "../IFunctionWizardContext"; import { getFileExtensionFromLanguage } from "../scriptSteps/ScriptFunctionCreateStep"; import { PromptSchemaStepBase } from "./PromptSchemaStepBase"; diff --git a/src/commands/createFunction/promptStepsV2/NewFileStep.ts b/src/commands/createFunction/promptStepsV2/NewFileStep.ts index 255dc2344..3d89ce689 100644 --- a/src/commands/createFunction/promptStepsV2/NewFileStep.ts +++ b/src/commands/createFunction/promptStepsV2/NewFileStep.ts @@ -3,12 +3,12 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { AzExtFsExtra, AzExtInputBoxOptions } from "@microsoft/vscode-azext-utils"; +import { AzExtFsExtra, type AzExtInputBoxOptions } from "@microsoft/vscode-azext-utils"; import { Uri } from "vscode"; import { Utils } from 'vscode-uri'; import { localize } from "../../../localize"; import { JobType } from "../../../templates/script/parseScriptTemplatesV2"; -import { FunctionV2WizardContext } from "../IFunctionWizardContext"; +import { type FunctionV2WizardContext } from "../IFunctionWizardContext"; import { StringInputStep } from "./StringInputStep"; export class NewFileStep extends StringInputStep { diff --git a/src/commands/createFunction/promptStepsV2/PromptSchemaStepBase.ts b/src/commands/createFunction/promptStepsV2/PromptSchemaStepBase.ts index 17da6e346..aefc66af8 100644 --- a/src/commands/createFunction/promptStepsV2/PromptSchemaStepBase.ts +++ b/src/commands/createFunction/promptStepsV2/PromptSchemaStepBase.ts @@ -5,8 +5,8 @@ import { AzureWizardPromptStep } from "@microsoft/vscode-azext-utils"; import { localize } from "../../../localize"; -import { ParsedInput } from "../../../templates/script/parseScriptTemplatesV2"; -import { FunctionV2WizardContext } from "../IFunctionWizardContext"; +import { type ParsedInput } from "../../../templates/script/parseScriptTemplatesV2"; +import { type FunctionV2WizardContext } from "../IFunctionWizardContext"; export abstract class PromptSchemaStepBase extends AzureWizardPromptStep { diff --git a/src/commands/createFunction/promptStepsV2/QuickPickInputStep.ts b/src/commands/createFunction/promptStepsV2/QuickPickInputStep.ts index 58d97f5f3..91dce0e6a 100644 --- a/src/commands/createFunction/promptStepsV2/QuickPickInputStep.ts +++ b/src/commands/createFunction/promptStepsV2/QuickPickInputStep.ts @@ -3,9 +3,9 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { IAzureQuickPickItem } from "@microsoft/vscode-azext-utils"; +import { type IAzureQuickPickItem } from "@microsoft/vscode-azext-utils"; import { localize } from "../../../localize"; -import { FunctionV2WizardContext } from "../IFunctionWizardContext"; +import { type FunctionV2WizardContext } from "../IFunctionWizardContext"; import { PromptSchemaStepBase } from "./PromptSchemaStepBase"; export abstract class QuickPickInputStep extends PromptSchemaStepBase { diff --git a/src/commands/createFunction/promptStepsV2/StringInputStep.ts b/src/commands/createFunction/promptStepsV2/StringInputStep.ts index 85538100f..30f85a83e 100644 --- a/src/commands/createFunction/promptStepsV2/StringInputStep.ts +++ b/src/commands/createFunction/promptStepsV2/StringInputStep.ts @@ -3,10 +3,10 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { AzExtInputBoxOptions } from "@microsoft/vscode-azext-utils"; +import { type AzExtInputBoxOptions } from "@microsoft/vscode-azext-utils"; import { localize } from "../../../localize"; -import { ParsedInput } from "../../../templates/script/parseScriptTemplatesV2"; -import { FunctionV2WizardContext } from "../IFunctionWizardContext"; +import { type ParsedInput } from "../../../templates/script/parseScriptTemplatesV2"; +import { type FunctionV2WizardContext } from "../IFunctionWizardContext"; import { PromptSchemaStepBase } from "./PromptSchemaStepBase"; export class StringInputStep extends PromptSchemaStepBase { diff --git a/src/commands/createFunction/promptStepsV2/promptStepFactory.ts b/src/commands/createFunction/promptStepsV2/promptStepFactory.ts index 027142e5f..d07cbe85a 100644 --- a/src/commands/createFunction/promptStepsV2/promptStepFactory.ts +++ b/src/commands/createFunction/promptStepsV2/promptStepFactory.ts @@ -3,10 +3,10 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { AzureWizardPromptStep } from "@microsoft/vscode-azext-utils"; +import { type AzureWizardPromptStep } from "@microsoft/vscode-azext-utils"; import { ResourceType } from "../../../templates/IBindingTemplate"; -import { ParsedInput } from "../../../templates/script/parseScriptTemplatesV2"; -import { FunctionV2WizardContext } from "../IFunctionWizardContext"; +import { type ParsedInput } from "../../../templates/script/parseScriptTemplatesV2"; +import { type FunctionV2WizardContext } from "../IFunctionWizardContext"; import { BooleanInputStep } from "./BooleanInputStep"; import { EnumInputStep } from "./EnumInputStep"; import { ExistingFileStep } from "./ExistingFileStep"; diff --git a/src/commands/createFunction/scriptSteps/IPythonFunctionWizardContext.ts b/src/commands/createFunction/scriptSteps/IPythonFunctionWizardContext.ts index c212d31fb..4348a50ac 100644 --- a/src/commands/createFunction/scriptSteps/IPythonFunctionWizardContext.ts +++ b/src/commands/createFunction/scriptSteps/IPythonFunctionWizardContext.ts @@ -3,7 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { IScriptFunctionWizardContext } from './IScriptFunctionWizardContext'; +import { type IScriptFunctionWizardContext } from './IScriptFunctionWizardContext'; export enum FunctionLocation { MainScript, diff --git a/src/commands/createFunction/scriptSteps/IScriptFunctionWizardContext.ts b/src/commands/createFunction/scriptSteps/IScriptFunctionWizardContext.ts index 146d7ae50..d96bf461c 100644 --- a/src/commands/createFunction/scriptSteps/IScriptFunctionWizardContext.ts +++ b/src/commands/createFunction/scriptSteps/IScriptFunctionWizardContext.ts @@ -3,8 +3,8 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { IScriptFunctionTemplate } from '../../../templates/script/parseScriptTemplates'; -import { IFunctionWizardContext } from '../IFunctionWizardContext'; +import { type IScriptFunctionTemplate } from '../../../templates/script/parseScriptTemplates'; +import { type IFunctionWizardContext } from '../IFunctionWizardContext'; export interface IScriptFunctionWizardContext extends IFunctionWizardContext { functionTemplate?: IScriptFunctionTemplate; diff --git a/src/commands/createFunction/scriptSteps/NodeV4FunctionCreateStep.ts b/src/commands/createFunction/scriptSteps/NodeV4FunctionCreateStep.ts index 0d46251b8..103202b0e 100644 --- a/src/commands/createFunction/scriptSteps/NodeV4FunctionCreateStep.ts +++ b/src/commands/createFunction/scriptSteps/NodeV4FunctionCreateStep.ts @@ -6,10 +6,10 @@ import { AzExtFsExtra, nonNullProp } from '@microsoft/vscode-azext-utils'; import * as path from 'path'; import { functionSubpathSetting } from '../../../constants'; -import { IScriptFunctionTemplate } from '../../../templates/script/parseScriptTemplates'; +import { type IScriptFunctionTemplate } from '../../../templates/script/parseScriptTemplates'; import { getWorkspaceSetting } from '../../../vsCodeConfig/settings'; import { FunctionCreateStepBase } from '../FunctionCreateStepBase'; -import { IScriptFunctionWizardContext } from './IScriptFunctionWizardContext'; +import { type IScriptFunctionWizardContext } from './IScriptFunctionWizardContext'; import { getFileExtensionFromLanguage } from './ScriptFunctionCreateStep'; export class NodeV4FunctionCreateStep extends FunctionCreateStepBase { diff --git a/src/commands/createFunction/scriptSteps/NodeV4FunctionNameStep.ts b/src/commands/createFunction/scriptSteps/NodeV4FunctionNameStep.ts index aa94ff0e9..d7685ebf5 100644 --- a/src/commands/createFunction/scriptSteps/NodeV4FunctionNameStep.ts +++ b/src/commands/createFunction/scriptSteps/NodeV4FunctionNameStep.ts @@ -7,11 +7,11 @@ import { AzExtFsExtra } from '@microsoft/vscode-azext-utils'; import * as path from 'path'; import { functionSubpathSetting } from '../../../constants'; import { localize } from "../../../localize"; -import { IScriptFunctionTemplate } from '../../../templates/script/parseScriptTemplates'; +import { type IScriptFunctionTemplate } from '../../../templates/script/parseScriptTemplates'; import { nonNullProp } from '../../../utils/nonNull'; import { getWorkspaceSetting } from '../../../vsCodeConfig/settings'; import { FunctionNameStepBase } from '../FunctionNameStepBase'; -import { IScriptFunctionWizardContext } from './IScriptFunctionWizardContext'; +import { type IScriptFunctionWizardContext } from './IScriptFunctionWizardContext'; import { getFileExtensionFromLanguage } from './ScriptFunctionCreateStep'; export class NodeV4FunctionNameStep extends FunctionNameStepBase { diff --git a/src/commands/createFunction/scriptSteps/ScriptFunctionCreateStep.ts b/src/commands/createFunction/scriptSteps/ScriptFunctionCreateStep.ts index 606c48d40..9c1cdb3dc 100644 --- a/src/commands/createFunction/scriptSteps/ScriptFunctionCreateStep.ts +++ b/src/commands/createFunction/scriptSteps/ScriptFunctionCreateStep.ts @@ -6,12 +6,12 @@ import { AzExtFsExtra } from '@microsoft/vscode-azext-utils'; import * as path from 'path'; import { functionJsonFileName, ProjectLanguage } from '../../../constants'; -import { IFunctionBinding, IFunctionJson } from '../../../funcConfig/function'; -import { IScriptFunctionTemplate } from '../../../templates/script/parseScriptTemplates'; +import { type IFunctionBinding, type IFunctionJson } from '../../../funcConfig/function'; +import { type IScriptFunctionTemplate } from '../../../templates/script/parseScriptTemplates'; import { nonNullProp } from '../../../utils/nonNull'; import { FunctionCreateStepBase } from '../FunctionCreateStepBase'; import { getBindingSetting } from '../IFunctionWizardContext'; -import { IScriptFunctionWizardContext } from './IScriptFunctionWizardContext'; +import { type IScriptFunctionWizardContext } from './IScriptFunctionWizardContext'; export function getScriptFileNameFromLanguage(language: string): string | undefined { switch (language) { diff --git a/src/commands/createFunction/scriptSteps/ScriptFunctionNameStep.ts b/src/commands/createFunction/scriptSteps/ScriptFunctionNameStep.ts index f13c4553e..70130da78 100644 --- a/src/commands/createFunction/scriptSteps/ScriptFunctionNameStep.ts +++ b/src/commands/createFunction/scriptSteps/ScriptFunctionNameStep.ts @@ -6,10 +6,10 @@ import { AzExtFsExtra } from '@microsoft/vscode-azext-utils'; import * as path from 'path'; import { localize } from "../../../localize"; -import { IScriptFunctionTemplate } from '../../../templates/script/parseScriptTemplates'; +import { type IScriptFunctionTemplate } from '../../../templates/script/parseScriptTemplates'; import { nonNullProp } from '../../../utils/nonNull'; import { FunctionNameStepBase } from '../FunctionNameStepBase'; -import { IScriptFunctionWizardContext } from './IScriptFunctionWizardContext'; +import { type IScriptFunctionWizardContext } from './IScriptFunctionWizardContext'; export class ScriptFunctionNameStep extends FunctionNameStepBase { protected async getUniqueFunctionName(context: IScriptFunctionWizardContext): Promise { diff --git a/src/commands/createFunction/scriptSteps/TypeScriptFunctionCreateStep.ts b/src/commands/createFunction/scriptSteps/TypeScriptFunctionCreateStep.ts index 6f21cdab5..c691c2770 100644 --- a/src/commands/createFunction/scriptSteps/TypeScriptFunctionCreateStep.ts +++ b/src/commands/createFunction/scriptSteps/TypeScriptFunctionCreateStep.ts @@ -6,9 +6,9 @@ import { AzExtFsExtra } from '@microsoft/vscode-azext-utils'; import * as path from 'path'; import { tsConfigFileName, tsDefaultOutDir } from '../../../constants'; -import { IFunctionJson } from '../../../funcConfig/function'; +import { type IFunctionJson } from '../../../funcConfig/function'; import { nonNullProp } from '../../../utils/nonNull'; -import { IScriptFunctionWizardContext } from './IScriptFunctionWizardContext'; +import { type IScriptFunctionWizardContext } from './IScriptFunctionWizardContext'; import { ScriptFunctionCreateStep } from './ScriptFunctionCreateStep'; export class TypeScriptFunctionCreateStep extends ScriptFunctionCreateStep { diff --git a/src/commands/createFunctionApp/FunctionAppCreateStep.ts b/src/commands/createFunctionApp/FunctionAppCreateStep.ts index 0543d257f..b61bc20cf 100644 --- a/src/commands/createFunctionApp/FunctionAppCreateStep.ts +++ b/src/commands/createFunctionApp/FunctionAppCreateStep.ts @@ -3,12 +3,12 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { NameValuePair, Site, SiteConfig, WebSiteManagementClient } from '@azure/arm-appservice'; -import { CustomLocation, IAppServiceWizardContext, ParsedSite, WebsiteOS } from '@microsoft/vscode-azext-azureappservice'; +import { type NameValuePair, type Site, type SiteConfig, type WebSiteManagementClient } from '@azure/arm-appservice'; +import { ParsedSite, WebsiteOS, type CustomLocation, type IAppServiceWizardContext } from '@microsoft/vscode-azext-azureappservice'; import { LocationListStep } from '@microsoft/vscode-azext-azureutils'; import { AzureWizardExecuteStep, parseError } from '@microsoft/vscode-azext-utils'; -import { AppResource } from '@microsoft/vscode-azext-utils/hostapi'; -import { Progress } from 'vscode'; +import { type AppResource } from '@microsoft/vscode-azext-utils/hostapi'; +import { type Progress } from 'vscode'; import { FuncVersion, getMajorVersion } from '../../FuncVersion'; import { ConnectionKey, ProjectLanguage, contentConnectionStringKey, contentShareKey, extensionVersionKey, runFromPackageKey, webProvider } from '../../constants'; import { ext } from '../../extensionVariables'; @@ -18,9 +18,9 @@ import { getRandomHexString } from '../../utils/fs'; import { nonNullProp } from '../../utils/nonNull'; import { getStorageConnectionString } from '../appSettings/connectionSettings/getLocalConnectionSetting'; import { enableFileLogging } from '../logstream/enableFileLogging'; -import { FullFunctionAppStack, IFunctionAppWizardContext } from './IFunctionAppWizardContext'; +import { type FullFunctionAppStack, type IFunctionAppWizardContext } from './IFunctionAppWizardContext'; import { showSiteCreated } from './showSiteCreated'; -import { FunctionAppRuntimeSettings } from './stacks/models/FunctionAppStackModel'; +import { type FunctionAppRuntimeSettings } from './stacks/models/FunctionAppStackModel'; export class FunctionAppCreateStep extends AzureWizardExecuteStep { public priority: number = 140; diff --git a/src/commands/createFunctionApp/FunctionAppHostingPlanStep.ts b/src/commands/createFunctionApp/FunctionAppHostingPlanStep.ts index ff154e5ed..32dd3e42b 100644 --- a/src/commands/createFunctionApp/FunctionAppHostingPlanStep.ts +++ b/src/commands/createFunctionApp/FunctionAppHostingPlanStep.ts @@ -3,8 +3,8 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { AppServicePlanListStep, IAppServiceWizardContext, setLocationsTask } from '@microsoft/vscode-azext-azureappservice'; -import { AzureWizardPromptStep, IAzureQuickPickItem, IWizardOptions } from '@microsoft/vscode-azext-utils'; +import { AppServicePlanListStep, setLocationsTask, type IAppServiceWizardContext } from '@microsoft/vscode-azext-azureappservice'; +import { AzureWizardPromptStep, type IAzureQuickPickItem, type IWizardOptions } from '@microsoft/vscode-azext-utils'; import { localize } from '../../localize'; import { getRandomHexString } from '../../utils/fs'; import { nonNullProp } from '../../utils/nonNull'; diff --git a/src/commands/createFunctionApp/IFunctionAppWizardContext.ts b/src/commands/createFunctionApp/IFunctionAppWizardContext.ts index 16c46c031..683e0ff2b 100644 --- a/src/commands/createFunctionApp/IFunctionAppWizardContext.ts +++ b/src/commands/createFunctionApp/IFunctionAppWizardContext.ts @@ -3,12 +3,12 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { IAppServiceWizardContext } from '@microsoft/vscode-azext-azureappservice'; -import { ExecuteActivityContext, ICreateChildImplContext } from '@microsoft/vscode-azext-utils'; -import { DurableBackendValues } from '../../constants'; -import { FuncVersion } from '../../FuncVersion'; -import { AppStackMajorVersion, AppStackMinorVersion } from './stacks/models/AppStackModel'; -import { FunctionAppRuntimes, FunctionAppStack } from './stacks/models/FunctionAppStackModel'; +import { type IAppServiceWizardContext } from '@microsoft/vscode-azext-azureappservice'; +import { type ExecuteActivityContext, type ICreateChildImplContext } from '@microsoft/vscode-azext-utils'; +import { type FuncVersion } from '../../FuncVersion'; +import { type DurableBackendValues } from '../../constants'; +import { type AppStackMajorVersion, type AppStackMinorVersion } from './stacks/models/AppStackModel'; +import { type FunctionAppRuntimes, type FunctionAppStack } from './stacks/models/FunctionAppStackModel'; export type FullFunctionAppStack = { stack: FunctionAppStack; diff --git a/src/commands/createFunctionApp/createFunctionApp.ts b/src/commands/createFunctionApp/createFunctionApp.ts index 4df53aa58..8e7495e4c 100644 --- a/src/commands/createFunctionApp/createFunctionApp.ts +++ b/src/commands/createFunctionApp/createFunctionApp.ts @@ -3,12 +3,12 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { AzExtParentTreeItem, IActionContext } from '@microsoft/vscode-azext-utils'; +import { type AzExtParentTreeItem, type IActionContext } from '@microsoft/vscode-azext-utils'; import { ext } from '../../extensionVariables'; import { localize } from '../../localize'; -import { SlotTreeItem } from '../../tree/SlotTreeItem'; -import { ICreateFunctionAppContext, SubscriptionTreeItem } from '../../tree/SubscriptionTreeItem'; -import { ISiteCreatedOptions } from './showSiteCreated'; +import { type SlotTreeItem } from '../../tree/SlotTreeItem'; +import { SubscriptionTreeItem, type ICreateFunctionAppContext } from '../../tree/SubscriptionTreeItem'; +import { type ISiteCreatedOptions } from './showSiteCreated'; function isSubscription(item?: AzExtParentTreeItem): boolean { try { diff --git a/src/commands/createFunctionApp/showSiteCreated.ts b/src/commands/createFunctionApp/showSiteCreated.ts index cc5eebcfd..090107e34 100644 --- a/src/commands/createFunctionApp/showSiteCreated.ts +++ b/src/commands/createFunctionApp/showSiteCreated.ts @@ -3,8 +3,8 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { ParsedSite } from '@microsoft/vscode-azext-azureappservice'; -import { IActionContext } from '@microsoft/vscode-azext-utils'; +import { type ParsedSite } from '@microsoft/vscode-azext-azureappservice'; +import { type IActionContext } from '@microsoft/vscode-azext-utils'; import { window } from 'vscode'; import { viewOutput } from '../../constants-nls'; import { ext } from '../../extensionVariables'; diff --git a/src/commands/createFunctionApp/stacks/FunctionAppEOLWarningStep.ts b/src/commands/createFunctionApp/stacks/FunctionAppEOLWarningStep.ts index b6700fe9f..c8eafcc90 100644 --- a/src/commands/createFunctionApp/stacks/FunctionAppEOLWarningStep.ts +++ b/src/commands/createFunctionApp/stacks/FunctionAppEOLWarningStep.ts @@ -2,12 +2,12 @@ * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See License.md in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { AzureWizardPromptStep, DialogResponses, IActionContext, openUrl } from "@microsoft/vscode-azext-utils"; -import { MessageItem } from "vscode"; +import { AzureWizardPromptStep, DialogResponses, openUrl, type IActionContext } from "@microsoft/vscode-azext-utils"; +import { type MessageItem } from "vscode"; import { funcVersionLink } from "../../../FuncVersion"; import { localize } from "../../../localize"; import { getWorkspaceSetting, updateGlobalSetting } from "../../../vsCodeConfig/settings"; -import { IFunctionAppWizardContext } from "../IFunctionAppWizardContext"; +import { type IFunctionAppWizardContext } from "../IFunctionAppWizardContext"; export class FunctionAppEOLWarningStep extends AzureWizardPromptStep { public async prompt(context: IFunctionAppWizardContext): Promise { diff --git a/src/commands/createFunctionApp/stacks/FunctionAppStackStep.ts b/src/commands/createFunctionApp/stacks/FunctionAppStackStep.ts index 8082df51c..fc8e44aa6 100644 --- a/src/commands/createFunctionApp/stacks/FunctionAppStackStep.ts +++ b/src/commands/createFunctionApp/stacks/FunctionAppStackStep.ts @@ -4,11 +4,11 @@ *--------------------------------------------------------------------------------------------*/ import { setLocationsTask, SiteOSStep, WebsiteOS } from '@microsoft/vscode-azext-azureappservice'; -import { AzureWizardPromptStep, IAzureQuickPickItem, IWizardOptions, openUrl } from '@microsoft/vscode-azext-utils'; +import { AzureWizardPromptStep, openUrl, type IAzureQuickPickItem, type IWizardOptions } from '@microsoft/vscode-azext-utils'; import { noRuntimeStacksAvailableLabel } from '../../../constants'; import { getMajorVersion, promptForFuncVersion } from '../../../FuncVersion'; import { localize } from '../../../localize'; -import { FullFunctionAppStack, IFunctionAppWizardContext } from '../IFunctionAppWizardContext'; +import { type FullFunctionAppStack, type IFunctionAppWizardContext } from '../IFunctionAppWizardContext'; import { FunctionAppEOLWarningStep } from './FunctionAppEOLWarningStep'; import { getStackPicks, shouldShowEolWarning } from './getStackPicks'; diff --git a/src/commands/createFunctionApp/stacks/getStackPicks.ts b/src/commands/createFunctionApp/stacks/getStackPicks.ts index a2656b4b9..00e368651 100644 --- a/src/commands/createFunctionApp/stacks/getStackPicks.ts +++ b/src/commands/createFunctionApp/stacks/getStackPicks.ts @@ -3,20 +3,20 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { ServiceClient } from '@azure/core-client'; +import { type ServiceClient } from '@azure/core-client'; import { createPipelineRequest } from '@azure/core-rest-pipeline'; -import { AzExtPipelineResponse, createGenericClient } from '@microsoft/vscode-azext-azureutils'; -import { IAzureQuickPickItem, openUrl, parseError } from '@microsoft/vscode-azext-utils'; +import { createGenericClient, type AzExtPipelineResponse } from '@microsoft/vscode-azext-azureutils'; +import { openUrl, parseError, type IAzureQuickPickItem } from '@microsoft/vscode-azext-utils'; import { funcVersionLink } from '../../../FuncVersion'; import { hiddenStacksSetting, noRuntimeStacksAvailableLabel } from '../../../constants'; import { previewDescription } from '../../../constants-nls'; import { localize } from '../../../localize'; import { requestUtils } from '../../../utils/requestUtils'; import { getWorkspaceSetting } from '../../../vsCodeConfig/settings'; -import { FullFunctionAppStack, IFunctionAppWizardContext } from '../IFunctionAppWizardContext'; +import { type FullFunctionAppStack, type IFunctionAppWizardContext } from '../IFunctionAppWizardContext'; import { backupStacks } from './backupStacks'; -import { AppStackMinorVersion } from './models/AppStackModel'; -import { FunctionAppRuntimes, FunctionAppStack } from './models/FunctionAppStackModel'; +import { type AppStackMinorVersion } from './models/AppStackModel'; +import { type FunctionAppRuntimes, type FunctionAppStack } from './models/FunctionAppStackModel'; export async function getStackPicks(context: IFunctionAppWizardContext): Promise[]> { const stacks: FunctionAppStack[] = (await getStacks(context)).filter(s => !context.stackFilter || context.stackFilter === s.value); diff --git a/src/commands/createFunctionApp/stacks/models/FunctionAppStackModel.ts b/src/commands/createFunctionApp/stacks/models/FunctionAppStackModel.ts index 99b84cf19..633909b4e 100644 --- a/src/commands/createFunctionApp/stacks/models/FunctionAppStackModel.ts +++ b/src/commands/createFunctionApp/stacks/models/FunctionAppStackModel.ts @@ -3,7 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { AppInsightsSettings, AppStack, CommonSettings, GitHubActionSettings } from './AppStackModel'; +import { type AppInsightsSettings, type AppStack, type CommonSettings, type GitHubActionSettings } from './AppStackModel'; // Types copied from here: // https://github.com/Azure/azure-functions-ux/blob/3322f0b5151bbfcf7a08f281efe678ebac643dc0/server/src/stacks/2020-10-01/models/FunctionAppStackModel.ts diff --git a/src/commands/createNewProject/FolderListStep.ts b/src/commands/createNewProject/FolderListStep.ts index d0664468a..6b3af3230 100644 --- a/src/commands/createNewProject/FolderListStep.ts +++ b/src/commands/createNewProject/FolderListStep.ts @@ -6,7 +6,7 @@ import { AzureWizardPromptStep } from '@microsoft/vscode-azext-utils'; import { localize } from '../../localize'; import { getContainingWorkspace, selectWorkspaceFolder } from '../../utils/workspace'; -import { IProjectWizardContext } from './IProjectWizardContext'; +import { type IProjectWizardContext } from './IProjectWizardContext'; export class FolderListStep extends AzureWizardPromptStep { public hideStepCount: boolean = true; diff --git a/src/commands/createNewProject/IProjectWizardContext.ts b/src/commands/createNewProject/IProjectWizardContext.ts index a7377135e..93b253b1c 100644 --- a/src/commands/createNewProject/IProjectWizardContext.ts +++ b/src/commands/createNewProject/IProjectWizardContext.ts @@ -3,12 +3,12 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { IActionContext } from "@microsoft/vscode-azext-utils"; -import { Uri, WorkspaceFolder } from "vscode"; -import { FuncVersion } from "../../FuncVersion"; -import { ProjectLanguage } from "../../constants"; -import { TemplateSchemaVersion } from "../../templates/TemplateProviderBase"; -import { cliFeedUtils } from "../../utils/cliFeedUtils"; +import { type IActionContext } from "@microsoft/vscode-azext-utils"; +import { type Uri, type WorkspaceFolder } from "vscode"; +import { type FuncVersion } from "../../FuncVersion"; +import { type ProjectLanguage } from "../../constants"; +import { type TemplateSchemaVersion } from "../../templates/TemplateProviderBase"; +import { type cliFeedUtils } from "../../utils/cliFeedUtils"; export interface IProjectWizardContext extends IActionContext { projectPath: string; diff --git a/src/commands/createNewProject/NewProjectLanguageStep.ts b/src/commands/createNewProject/NewProjectLanguageStep.ts index 99e25c3e0..f068b01e9 100644 --- a/src/commands/createNewProject/NewProjectLanguageStep.ts +++ b/src/commands/createNewProject/NewProjectLanguageStep.ts @@ -3,8 +3,8 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { AzureWizardExecuteStep, AzureWizardPromptStep, IAzureQuickPickItem, IWizardOptions, UserCancelledError } from '@microsoft/vscode-azext-utils'; -import { QuickPickOptions } from 'vscode'; +import { AzureWizardPromptStep, UserCancelledError, type AzureWizardExecuteStep, type IAzureQuickPickItem, type IWizardOptions } from '@microsoft/vscode-azext-utils'; +import { type QuickPickOptions } from 'vscode'; import { ProjectLanguage, nodeDefaultModelVersion, nodeLearnMoreLink, nodeModels, pythonDefaultModelVersion, pythonLearnMoreLink, pythonModels } from '../../constants'; import { localize } from '../../localize'; import { TemplateSchemaVersion } from '../../templates/TemplateProviderBase'; @@ -12,7 +12,7 @@ import { nonNullProp } from '../../utils/nonNull'; import { openUrl } from '../../utils/openUrl'; import { FunctionListStep } from '../createFunction/FunctionListStep'; import { addInitVSCodeSteps } from '../initProjectForVSCode/InitVSCodeLanguageStep'; -import { IProjectWizardContext } from './IProjectWizardContext'; +import { type IProjectWizardContext } from './IProjectWizardContext'; import { ProgrammingModelStep } from './ProgrammingModelStep'; import { CustomProjectCreateStep } from './ProjectCreateStep/CustomProjectCreateStep'; import { DotnetProjectCreateStep } from './ProjectCreateStep/DotnetProjectCreateStep'; diff --git a/src/commands/createNewProject/OpenBehaviorStep.ts b/src/commands/createNewProject/OpenBehaviorStep.ts index 26f944ad3..54dd9d822 100644 --- a/src/commands/createNewProject/OpenBehaviorStep.ts +++ b/src/commands/createNewProject/OpenBehaviorStep.ts @@ -3,9 +3,9 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { AzureWizardPromptStep, IAzureQuickPickItem } from '@microsoft/vscode-azext-utils'; +import { AzureWizardPromptStep, type IAzureQuickPickItem } from '@microsoft/vscode-azext-utils'; import { localize } from '../../localize'; -import { IProjectWizardContext, OpenBehavior } from './IProjectWizardContext'; +import { type IProjectWizardContext, type OpenBehavior } from './IProjectWizardContext'; export class OpenBehaviorStep extends AzureWizardPromptStep { public async prompt(context: IProjectWizardContext): Promise { diff --git a/src/commands/createNewProject/OpenFolderStep.ts b/src/commands/createNewProject/OpenFolderStep.ts index 6163612bf..cd3b57151 100644 --- a/src/commands/createNewProject/OpenFolderStep.ts +++ b/src/commands/createNewProject/OpenFolderStep.ts @@ -4,8 +4,8 @@ *--------------------------------------------------------------------------------------------*/ import { AzureWizardExecuteStep } from '@microsoft/vscode-azext-utils'; -import { commands, Uri, workspace, WorkspaceFolder } from 'vscode'; -import { IProjectWizardContext } from './IProjectWizardContext'; +import { commands, Uri, workspace, type WorkspaceFolder } from 'vscode'; +import { type IProjectWizardContext } from './IProjectWizardContext'; export class OpenFolderStep extends AzureWizardExecuteStep { public priority: number = 250; diff --git a/src/commands/createNewProject/ProgrammingModelStep.ts b/src/commands/createNewProject/ProgrammingModelStep.ts index 970cead12..077609066 100644 --- a/src/commands/createNewProject/ProgrammingModelStep.ts +++ b/src/commands/createNewProject/ProgrammingModelStep.ts @@ -3,12 +3,12 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { AzureWizardPromptStep, IAzureQuickPickItem, IAzureQuickPickOptions, nonNullValue, openUrl } from '@microsoft/vscode-azext-utils'; +import { AzureWizardPromptStep, nonNullValue, openUrl, type IAzureQuickPickItem, type IAzureQuickPickOptions } from '@microsoft/vscode-azext-utils'; import { FuncVersion } from '../../FuncVersion'; import { recommendedDescription } from '../../constants-nls'; import { localize } from '../../localize'; import { getTemplateVersionFromLanguageAndModel } from '../../utils/templateVersionUtils'; -import { IProjectWizardContext } from './IProjectWizardContext'; +import { type IProjectWizardContext } from './IProjectWizardContext'; export class ProgrammingModelStep extends AzureWizardPromptStep { public hideStepCount: boolean = true; diff --git a/src/commands/createNewProject/ProjectCreateStep/BallerinaProjectCreateStep.ts b/src/commands/createNewProject/ProjectCreateStep/BallerinaProjectCreateStep.ts index 7cdd47d18..77b11137e 100644 --- a/src/commands/createNewProject/ProjectCreateStep/BallerinaProjectCreateStep.ts +++ b/src/commands/createNewProject/ProjectCreateStep/BallerinaProjectCreateStep.ts @@ -4,10 +4,10 @@ *--------------------------------------------------------------------------------------------*/ import { AzExtFsExtra } from '@microsoft/vscode-azext-utils'; -import { Progress } from 'vscode'; +import { type Progress } from 'vscode'; import { BallerinaBackend, ballerinaTomlFileName } from '../../../constants'; import { ballerinaUtils } from '../../../utils/ballerinaUtils'; -import { IBallerinaProjectWizardContext } from '../ballerinaSteps/IBallerinaProjectWizardContext'; +import { type IBallerinaProjectWizardContext } from '../ballerinaSteps/IBallerinaProjectWizardContext'; import { ScriptProjectCreateStep } from './ScriptProjectCreateStep'; import path = require('path'); diff --git a/src/commands/createNewProject/ProjectCreateStep/CustomProjectCreateStep.ts b/src/commands/createNewProject/ProjectCreateStep/CustomProjectCreateStep.ts index 62bd61309..32cc0099d 100644 --- a/src/commands/createNewProject/ProjectCreateStep/CustomProjectCreateStep.ts +++ b/src/commands/createNewProject/ProjectCreateStep/CustomProjectCreateStep.ts @@ -3,8 +3,8 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { IHostJsonV2 } from '../../../funcConfig/host'; -import { IProjectWizardContext } from '../IProjectWizardContext'; +import { type IHostJsonV2 } from '../../../funcConfig/host'; +import { type IProjectWizardContext } from '../IProjectWizardContext'; import { ScriptProjectCreateStep } from './ScriptProjectCreateStep'; export class CustomProjectCreateStep extends ScriptProjectCreateStep { diff --git a/src/commands/createNewProject/ProjectCreateStep/DotnetProjectCreateStep.ts b/src/commands/createNewProject/ProjectCreateStep/DotnetProjectCreateStep.ts index 0007aeed9..0e4402401 100644 --- a/src/commands/createNewProject/ProjectCreateStep/DotnetProjectCreateStep.ts +++ b/src/commands/createNewProject/ProjectCreateStep/DotnetProjectCreateStep.ts @@ -3,16 +3,16 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { AzExtFsExtra, DialogResponses, IActionContext } from '@microsoft/vscode-azext-utils'; +import { AzExtFsExtra, DialogResponses, type IActionContext } from '@microsoft/vscode-azext-utils'; import * as path from 'path'; -import { ConnectionKey, gitignoreFileName, hostFileName, localSettingsFileName, ProjectLanguage } from '../../../constants'; +import { getMajorVersion, type FuncVersion } from '../../../FuncVersion'; +import { ConnectionKey, ProjectLanguage, gitignoreFileName, hostFileName, localSettingsFileName } from '../../../constants'; import { MismatchBehavior, setLocalAppSetting } from '../../../funcConfig/local.settings'; -import { FuncVersion, getMajorVersion } from '../../../FuncVersion'; import { localize } from "../../../localize"; import { executeDotnetTemplateCommand, validateDotnetInstalled } from '../../../templates/dotnet/executeDotnetTemplateCommand'; import { cpUtils } from '../../../utils/cpUtils'; import { nonNullProp } from '../../../utils/nonNull'; -import { IProjectWizardContext } from '../IProjectWizardContext'; +import { type IProjectWizardContext } from '../IProjectWizardContext'; import { ProjectCreateStepBase } from './ProjectCreateStepBase'; export class DotnetProjectCreateStep extends ProjectCreateStepBase { diff --git a/src/commands/createNewProject/ProjectCreateStep/GradleProjectCreateSteps.ts b/src/commands/createNewProject/ProjectCreateStep/GradleProjectCreateSteps.ts index 792089ccd..6b498c07b 100644 --- a/src/commands/createNewProject/ProjectCreateStep/GradleProjectCreateSteps.ts +++ b/src/commands/createNewProject/ProjectCreateStep/GradleProjectCreateSteps.ts @@ -5,13 +5,13 @@ import { AzExtFsExtra } from '@microsoft/vscode-azext-utils'; import * as path from 'path'; -import { Progress } from 'vscode'; +import { type Progress } from 'vscode'; import { buildGradleFileName, JavaBuildTool, settingsGradleFileName } from '../../../constants'; import { confirmOverwriteFile } from '../../../utils/fs'; import { gradleUtils } from '../../../utils/gradleUtils'; import { javaUtils } from '../../../utils/javaUtils'; import { nonNullProp } from '../../../utils/nonNull'; -import { IJavaProjectWizardContext } from '../javaSteps/IJavaProjectWizardContext'; +import { type IJavaProjectWizardContext } from '../javaSteps/IJavaProjectWizardContext'; import { java8 } from '../javaSteps/JavaVersionStep'; import { ScriptProjectCreateStep } from './ScriptProjectCreateStep'; diff --git a/src/commands/createNewProject/ProjectCreateStep/JavaScriptProjectCreateStep.ts b/src/commands/createNewProject/ProjectCreateStep/JavaScriptProjectCreateStep.ts index 8f252ca6c..17ea2dc20 100644 --- a/src/commands/createNewProject/ProjectCreateStep/JavaScriptProjectCreateStep.ts +++ b/src/commands/createNewProject/ProjectCreateStep/JavaScriptProjectCreateStep.ts @@ -5,7 +5,7 @@ import { AzExtFsExtra } from '@microsoft/vscode-azext-utils'; import * as path from 'path'; -import { Progress } from 'vscode'; +import { type Progress } from 'vscode'; import { functionSubpathSetting, packageJsonFileName } from '../../../constants'; import { ext } from '../../../extensionVariables'; import { localize } from '../../../localize'; @@ -13,7 +13,7 @@ import { cpUtils } from '../../../utils/cpUtils'; import { confirmOverwriteFile } from '../../../utils/fs'; import { isNodeV4Plus } from '../../../utils/programmingModelUtils'; import { getWorkspaceSetting } from '../../../vsCodeConfig/settings'; -import { IProjectWizardContext } from '../IProjectWizardContext'; +import { type IProjectWizardContext } from '../IProjectWizardContext'; import { ScriptProjectCreateStep } from './ScriptProjectCreateStep'; export const azureFunctionsDependency: string = '@azure/functions'; diff --git a/src/commands/createNewProject/ProjectCreateStep/MavenProjectCreateSteps.ts b/src/commands/createNewProject/ProjectCreateStep/MavenProjectCreateSteps.ts index 3368072c3..c02c66e58 100644 --- a/src/commands/createNewProject/ProjectCreateStep/MavenProjectCreateSteps.ts +++ b/src/commands/createNewProject/ProjectCreateStep/MavenProjectCreateSteps.ts @@ -11,7 +11,7 @@ import { ext } from '../../../extensionVariables'; import * as fsUtil from '../../../utils/fs'; import { mavenUtils } from '../../../utils/mavenUtils'; import { nonNullProp } from '../../../utils/nonNull'; -import { IJavaProjectWizardContext } from '../javaSteps/IJavaProjectWizardContext'; +import { type IJavaProjectWizardContext } from '../javaSteps/IJavaProjectWizardContext'; import { ProjectCreateStepBase } from './ProjectCreateStepBase'; export class MavenProjectCreateStep extends ProjectCreateStepBase { diff --git a/src/commands/createNewProject/ProjectCreateStep/PowerShellProjectCreateStep.ts b/src/commands/createNewProject/ProjectCreateStep/PowerShellProjectCreateStep.ts index 7b6b79c09..cac78ec08 100644 --- a/src/commands/createNewProject/ProjectCreateStep/PowerShellProjectCreateStep.ts +++ b/src/commands/createNewProject/ProjectCreateStep/PowerShellProjectCreateStep.ts @@ -3,17 +3,17 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { AzExtPipelineResponse } from '@microsoft/vscode-azext-azureutils'; -import { AzExtFsExtra, IActionContext } from '@microsoft/vscode-azext-utils'; +import { type AzExtPipelineResponse } from '@microsoft/vscode-azext-azureutils'; +import { AzExtFsExtra, type IActionContext } from '@microsoft/vscode-azext-utils'; import * as path from 'path'; -import { Progress } from 'vscode'; +import { type Progress } from 'vscode'; import { workerRuntimeVersionKey } from '../../../constants'; -import { IHostJsonV2 } from '../../../funcConfig/host'; +import { type IHostJsonV2 } from '../../../funcConfig/host'; import { hasMinFuncCliVersion } from '../../../funcCoreTools/hasMinFuncCliVersion'; import { localize } from '../../../localize'; import { confirmOverwriteFile } from "../../../utils/fs"; import { requestUtils } from '../../../utils/requestUtils'; -import { IProjectWizardContext } from '../IProjectWizardContext'; +import { type IProjectWizardContext } from '../IProjectWizardContext'; import { ScriptProjectCreateStep } from './ScriptProjectCreateStep'; const profileps1FileName: string = 'profile.ps1'; diff --git a/src/commands/createNewProject/ProjectCreateStep/ProjectCreateStepBase.ts b/src/commands/createNewProject/ProjectCreateStep/ProjectCreateStepBase.ts index b0b1360e9..f308532cf 100644 --- a/src/commands/createNewProject/ProjectCreateStep/ProjectCreateStepBase.ts +++ b/src/commands/createNewProject/ProjectCreateStep/ProjectCreateStepBase.ts @@ -3,11 +3,11 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { AzExtFsExtra, AzureWizardExecuteStep, callWithTelemetryAndErrorHandling, IActionContext } from '@microsoft/vscode-azext-utils'; -import { Progress } from 'vscode'; +import { AzExtFsExtra, AzureWizardExecuteStep, callWithTelemetryAndErrorHandling, type IActionContext } from '@microsoft/vscode-azext-utils'; +import { type Progress } from 'vscode'; import { localize } from '../../../localize'; import { gitUtils } from '../../../utils/gitUtils'; -import { IProjectWizardContext } from '../IProjectWizardContext'; +import { type IProjectWizardContext } from '../IProjectWizardContext'; export abstract class ProjectCreateStepBase extends AzureWizardExecuteStep { public priority: number = 10; diff --git a/src/commands/createNewProject/ProjectCreateStep/PythonProjectCreateStep.ts b/src/commands/createNewProject/ProjectCreateStep/PythonProjectCreateStep.ts index ec105fa70..168d9645b 100644 --- a/src/commands/createNewProject/ProjectCreateStep/PythonProjectCreateStep.ts +++ b/src/commands/createNewProject/ProjectCreateStep/PythonProjectCreateStep.ts @@ -6,11 +6,11 @@ import { AzExtFsExtra } from '@microsoft/vscode-azext-utils'; import * as path from 'path'; import * as semver from 'semver'; -import { Progress } from 'vscode'; +import { type Progress } from 'vscode'; import { requirementsFileName } from '../../../constants'; import { getLocalFuncCoreToolsVersion } from '../../../funcCoreTools/getLocalFuncCoreToolsVersion'; import { confirmOverwriteFile } from '../../../utils/fs'; -import { IProjectWizardContext } from '../IProjectWizardContext'; +import { type IProjectWizardContext } from '../IProjectWizardContext'; import { ScriptProjectCreateStep } from './ScriptProjectCreateStep'; // Starting after this version, the func cli does not require a virtual environment and comes pre-packaged with the below dependencies diff --git a/src/commands/createNewProject/ProjectCreateStep/ScriptProjectCreateStep.ts b/src/commands/createNewProject/ProjectCreateStep/ScriptProjectCreateStep.ts index 1d069c6b1..b9c019dd0 100644 --- a/src/commands/createNewProject/ProjectCreateStep/ScriptProjectCreateStep.ts +++ b/src/commands/createNewProject/ProjectCreateStep/ScriptProjectCreateStep.ts @@ -6,18 +6,18 @@ import { AzExtFsExtra } from '@microsoft/vscode-azext-utils'; import * as os from 'os'; import * as path from 'path'; -import { Progress } from 'vscode'; +import { type Progress } from 'vscode'; import { FuncVersion } from '../../../FuncVersion'; import { gitignoreFileName, hostFileName, localSettingsFileName, workerRuntimeKey } from '../../../constants'; -import { IHostJsonV1, IHostJsonV2 } from '../../../funcConfig/host'; -import { ILocalSettingsJson } from '../../../funcConfig/local.settings'; +import { type IHostJsonV1, type IHostJsonV2 } from '../../../funcConfig/host'; +import { type ILocalSettingsJson } from '../../../funcConfig/local.settings'; import { TemplateSchemaVersion } from '../../../templates/TemplateProviderBase'; import { bundleFeedUtils } from '../../../utils/bundleFeedUtils'; import { confirmOverwriteFile } from "../../../utils/fs"; import { nonNullProp } from '../../../utils/nonNull'; import { isNodeV4Plus, isPythonV2Plus } from '../../../utils/programmingModelUtils'; import { getRootFunctionsWorkerRuntime } from '../../../vsCodeConfig/settings'; -import { IProjectWizardContext } from '../IProjectWizardContext'; +import { type IProjectWizardContext } from '../IProjectWizardContext'; import { ProjectCreateStepBase } from './ProjectCreateStepBase'; export class ScriptProjectCreateStep extends ProjectCreateStepBase { diff --git a/src/commands/createNewProject/ProjectCreateStep/TypeScriptProjectCreateStep.ts b/src/commands/createNewProject/ProjectCreateStep/TypeScriptProjectCreateStep.ts index d2599cf9f..cf68308fe 100644 --- a/src/commands/createNewProject/ProjectCreateStep/TypeScriptProjectCreateStep.ts +++ b/src/commands/createNewProject/ProjectCreateStep/TypeScriptProjectCreateStep.ts @@ -5,14 +5,14 @@ import { AzExtFsExtra } from '@microsoft/vscode-azext-utils'; import * as path from 'path'; -import { Progress } from 'vscode'; +import { type Progress } from 'vscode'; import { FuncVersion } from '../../../FuncVersion'; import { functionSubpathSetting, tsConfigFileName, tsDefaultOutDir } from '../../../constants'; import { localize } from '../../../localize'; import { confirmOverwriteFile } from '../../../utils/fs'; import { isNodeV4Plus } from '../../../utils/programmingModelUtils'; import { getWorkspaceSetting } from '../../../vsCodeConfig/settings'; -import { IProjectWizardContext } from '../IProjectWizardContext'; +import { type IProjectWizardContext } from '../IProjectWizardContext'; import { JavaScriptProjectCreateStep } from './JavaScriptProjectCreateStep'; diff --git a/src/commands/createNewProject/ballerinaSteps/BallerinaBackendStep.ts b/src/commands/createNewProject/ballerinaSteps/BallerinaBackendStep.ts index d35020c00..342ca466e 100644 --- a/src/commands/createNewProject/ballerinaSteps/BallerinaBackendStep.ts +++ b/src/commands/createNewProject/ballerinaSteps/BallerinaBackendStep.ts @@ -3,10 +3,10 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { AzureWizardPromptStep, IAzureQuickPickItem } from "@microsoft/vscode-azext-utils"; +import { AzureWizardPromptStep, type IAzureQuickPickItem } from "@microsoft/vscode-azext-utils"; import { BallerinaBackend } from "../../../constants"; import { localize } from "../../../localize"; -import { IBallerinaProjectWizardContext } from "./IBallerinaProjectWizardContext"; +import { type IBallerinaProjectWizardContext } from "./IBallerinaProjectWizardContext"; export class BallerinaBackendStep extends AzureWizardPromptStep { diff --git a/src/commands/createNewProject/ballerinaSteps/IBallerinaProjectWizardContext.ts b/src/commands/createNewProject/ballerinaSteps/IBallerinaProjectWizardContext.ts index 3ed71bd1c..3e48ccf76 100644 --- a/src/commands/createNewProject/ballerinaSteps/IBallerinaProjectWizardContext.ts +++ b/src/commands/createNewProject/ballerinaSteps/IBallerinaProjectWizardContext.ts @@ -4,8 +4,8 @@ *--------------------------------------------------------------------------------------------*/ import * as path from 'path'; -import { BallerinaBackend } from '../../../constants'; -import { IProjectWizardContext } from "../IProjectWizardContext"; +import { type BallerinaBackend } from '../../../constants'; +import { type IProjectWizardContext } from "../IProjectWizardContext"; export interface IBallerinaProjectWizardContext extends IProjectWizardContext { balBackend?: BallerinaBackend; diff --git a/src/commands/createNewProject/ballerinaSteps/addBallerinaCreateProjectSteps.ts b/src/commands/createNewProject/ballerinaSteps/addBallerinaCreateProjectSteps.ts index 65b9428f4..3e373b519 100644 --- a/src/commands/createNewProject/ballerinaSteps/addBallerinaCreateProjectSteps.ts +++ b/src/commands/createNewProject/ballerinaSteps/addBallerinaCreateProjectSteps.ts @@ -3,12 +3,12 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { AzureWizardExecuteStep, AzureWizardPromptStep } from "@microsoft/vscode-azext-utils"; +import { type AzureWizardExecuteStep, type AzureWizardPromptStep } from "@microsoft/vscode-azext-utils"; import { ballerinaUtils } from "../../../utils/ballerinaUtils"; -import { IProjectWizardContext } from "../IProjectWizardContext"; +import { type IProjectWizardContext } from "../IProjectWizardContext"; import { BallerinaProjectCreateStep } from "../ProjectCreateStep/BallerinaProjectCreateStep"; import { BallerinaBackendStep } from "./BallerinaBackendStep"; -import { IBallerinaProjectWizardContext } from "./IBallerinaProjectWizardContext"; +import { type IBallerinaProjectWizardContext } from "./IBallerinaProjectWizardContext"; export async function addBallerinaCreateProjectSteps( context: IBallerinaProjectWizardContext, diff --git a/src/commands/createNewProject/createNewProject.ts b/src/commands/createNewProject/createNewProject.ts index df22c5299..257e41461 100644 --- a/src/commands/createNewProject/createNewProject.ts +++ b/src/commands/createNewProject/createNewProject.ts @@ -3,17 +3,17 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { AzureWizard, IActionContext } from '@microsoft/vscode-azext-utils'; +import { AzureWizard, type IActionContext } from '@microsoft/vscode-azext-utils'; import { window } from 'vscode'; import { latestGAVersion, tryParseFuncVersion } from '../../FuncVersion'; -import { ProjectLanguage, funcVersionSetting, projectLanguageSetting, projectOpenBehaviorSetting, projectTemplateKeySetting } from '../../constants'; +import { funcVersionSetting, projectLanguageSetting, projectOpenBehaviorSetting, projectTemplateKeySetting, type ProjectLanguage } from '../../constants'; import { ext } from '../../extensionVariables'; import { addLocalFuncTelemetry } from '../../funcCoreTools/getLocalFuncCoreToolsVersion'; import { tryGetLocalFuncVersion } from '../../funcCoreTools/tryGetLocalFuncVersion'; import { localize } from '../../localize'; import { getGlobalSetting, getWorkspaceSetting } from '../../vsCodeConfig/settings'; -import * as api from '../../vscode-azurefunctions.api'; -import { IFunctionWizardContext } from '../createFunction/IFunctionWizardContext'; +import type * as api from '../../vscode-azurefunctions.api'; +import { type IFunctionWizardContext } from '../createFunction/IFunctionWizardContext'; import { FolderListStep } from './FolderListStep'; import { NewProjectLanguageStep } from './NewProjectLanguageStep'; import { OpenBehaviorStep } from './OpenBehaviorStep'; diff --git a/src/commands/createNewProject/dotnetSteps/DotnetRuntimeStep.ts b/src/commands/createNewProject/dotnetSteps/DotnetRuntimeStep.ts index 408766509..c1942320a 100644 --- a/src/commands/createNewProject/dotnetSteps/DotnetRuntimeStep.ts +++ b/src/commands/createNewProject/dotnetSteps/DotnetRuntimeStep.ts @@ -3,14 +3,14 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { AzureWizardPromptStep, IAzureQuickPickItem } from "@microsoft/vscode-azext-utils"; -import { hiddenStacksSetting } from "../../../constants"; +import { AzureWizardPromptStep, type IAzureQuickPickItem } from "@microsoft/vscode-azext-utils"; import { promptForFuncVersion } from "../../../FuncVersion"; +import { hiddenStacksSetting } from "../../../constants"; import { localize } from "../../../localize"; import { cliFeedUtils } from "../../../utils/cliFeedUtils"; import { dotnetUtils } from "../../../utils/dotnetUtils"; import { getWorkspaceSetting } from "../../../vsCodeConfig/settings"; -import { IProjectWizardContext } from "../IProjectWizardContext"; +import { type IProjectWizardContext } from "../IProjectWizardContext"; export class DotnetRuntimeStep extends AzureWizardPromptStep { public static async createStep(context: IProjectWizardContext): Promise { diff --git a/src/commands/createNewProject/javaSteps/IJavaProjectWizardContext.ts b/src/commands/createNewProject/javaSteps/IJavaProjectWizardContext.ts index c7b664b42..8d06b57ce 100644 --- a/src/commands/createNewProject/javaSteps/IJavaProjectWizardContext.ts +++ b/src/commands/createNewProject/javaSteps/IJavaProjectWizardContext.ts @@ -4,9 +4,9 @@ *--------------------------------------------------------------------------------------------*/ import * as path from 'path'; -import { JavaBuildTool } from '../../../constants'; +import { type JavaBuildTool } from '../../../constants'; import { localize } from "../../../localize"; -import { IProjectWizardContext } from "../IProjectWizardContext"; +import { type IProjectWizardContext } from "../IProjectWizardContext"; export interface IJavaProjectWizardContext extends IProjectWizardContext { javaVersion?: string; diff --git a/src/commands/createNewProject/javaSteps/JavaAppNameStep.ts b/src/commands/createNewProject/javaSteps/JavaAppNameStep.ts index 6e8c8a9cc..d7ed568b5 100644 --- a/src/commands/createNewProject/javaSteps/JavaAppNameStep.ts +++ b/src/commands/createNewProject/javaSteps/JavaAppNameStep.ts @@ -4,10 +4,10 @@ *--------------------------------------------------------------------------------------------*/ import { AzureWizardPromptStep } from "@microsoft/vscode-azext-utils"; -import { InputBoxOptions } from "vscode"; +import { type InputBoxOptions } from "vscode"; import { localize } from "../../../localize"; import { nonNullProp } from "../../../utils/nonNull"; -import { IJavaProjectWizardContext } from "./IJavaProjectWizardContext"; +import { type IJavaProjectWizardContext } from "./IJavaProjectWizardContext"; export class JavaAppNameStep extends AzureWizardPromptStep { public async prompt(context: IJavaProjectWizardContext): Promise { diff --git a/src/commands/createNewProject/javaSteps/JavaArtifactIdStep.ts b/src/commands/createNewProject/javaSteps/JavaArtifactIdStep.ts index 28b58d4bd..7fccfe735 100644 --- a/src/commands/createNewProject/javaSteps/JavaArtifactIdStep.ts +++ b/src/commands/createNewProject/javaSteps/JavaArtifactIdStep.ts @@ -5,9 +5,9 @@ import { AzureWizardPromptStep } from "@microsoft/vscode-azext-utils"; import * as path from 'path'; -import { InputBoxOptions } from "vscode"; +import { type InputBoxOptions } from "vscode"; import { localize } from "../../../localize"; -import { IJavaProjectWizardContext, validateMavenIdentifier } from "./IJavaProjectWizardContext"; +import { validateMavenIdentifier, type IJavaProjectWizardContext } from "./IJavaProjectWizardContext"; export class JavaArtifactIdStep extends AzureWizardPromptStep { public async prompt(context: IJavaProjectWizardContext): Promise { diff --git a/src/commands/createNewProject/javaSteps/JavaBuildToolStep.ts b/src/commands/createNewProject/javaSteps/JavaBuildToolStep.ts index e1ef1a0da..04cd5d714 100644 --- a/src/commands/createNewProject/javaSteps/JavaBuildToolStep.ts +++ b/src/commands/createNewProject/javaSteps/JavaBuildToolStep.ts @@ -3,11 +3,11 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { AzureWizardPromptStep, IAzureQuickPickItem } from "@microsoft/vscode-azext-utils"; +import { AzureWizardPromptStep, type IAzureQuickPickItem } from "@microsoft/vscode-azext-utils"; import { JavaBuildTool } from "../../../constants"; import { previewDescription } from "../../../constants-nls"; import { localize } from "../../../localize"; -import { IJavaProjectWizardContext } from "./IJavaProjectWizardContext"; +import { type IJavaProjectWizardContext } from "./IJavaProjectWizardContext"; export class JavaBuildToolStep extends AzureWizardPromptStep { public static async setDefaultBuildTool(context: IJavaProjectWizardContext): Promise { diff --git a/src/commands/createNewProject/javaSteps/JavaGroupIdStep.ts b/src/commands/createNewProject/javaSteps/JavaGroupIdStep.ts index 318c3d6c4..8eaa3dff0 100644 --- a/src/commands/createNewProject/javaSteps/JavaGroupIdStep.ts +++ b/src/commands/createNewProject/javaSteps/JavaGroupIdStep.ts @@ -4,9 +4,9 @@ *--------------------------------------------------------------------------------------------*/ import { AzureWizardPromptStep } from "@microsoft/vscode-azext-utils"; -import { InputBoxOptions } from "vscode"; +import { type InputBoxOptions } from "vscode"; import { localize } from "../../../localize"; -import { IJavaProjectWizardContext, validateMavenIdentifier } from "./IJavaProjectWizardContext"; +import { validateMavenIdentifier, type IJavaProjectWizardContext } from "./IJavaProjectWizardContext"; export class JavaGroupIdStep extends AzureWizardPromptStep { public async prompt(context: IJavaProjectWizardContext): Promise { diff --git a/src/commands/createNewProject/javaSteps/JavaPackageNameStep.ts b/src/commands/createNewProject/javaSteps/JavaPackageNameStep.ts index 37c39f6d8..ec4109926 100644 --- a/src/commands/createNewProject/javaSteps/JavaPackageNameStep.ts +++ b/src/commands/createNewProject/javaSteps/JavaPackageNameStep.ts @@ -4,9 +4,9 @@ *--------------------------------------------------------------------------------------------*/ import { AzureWizardPromptStep } from "@microsoft/vscode-azext-utils"; -import { InputBoxOptions } from "vscode"; +import { type InputBoxOptions } from "vscode"; import { localize } from "../../../localize"; -import { IJavaProjectWizardContext } from "./IJavaProjectWizardContext"; +import { type IJavaProjectWizardContext } from "./IJavaProjectWizardContext"; export class JavaPackageNameStep extends AzureWizardPromptStep { public async prompt(context: IJavaProjectWizardContext): Promise { diff --git a/src/commands/createNewProject/javaSteps/JavaProjectVersionStep.ts b/src/commands/createNewProject/javaSteps/JavaProjectVersionStep.ts index 5d5d7bdb2..7456ef335 100644 --- a/src/commands/createNewProject/javaSteps/JavaProjectVersionStep.ts +++ b/src/commands/createNewProject/javaSteps/JavaProjectVersionStep.ts @@ -4,9 +4,9 @@ *--------------------------------------------------------------------------------------------*/ import { AzureWizardPromptStep } from "@microsoft/vscode-azext-utils"; -import { InputBoxOptions } from "vscode"; +import { type InputBoxOptions } from "vscode"; import { localize } from "../../../localize"; -import { IJavaProjectWizardContext } from "./IJavaProjectWizardContext"; +import { type IJavaProjectWizardContext } from "./IJavaProjectWizardContext"; export class JavaProjectVersionStep extends AzureWizardPromptStep { public async prompt(context: IJavaProjectWizardContext): Promise { diff --git a/src/commands/createNewProject/javaSteps/JavaVersionStep.ts b/src/commands/createNewProject/javaSteps/JavaVersionStep.ts index 164c69b09..19422d0f0 100644 --- a/src/commands/createNewProject/javaSteps/JavaVersionStep.ts +++ b/src/commands/createNewProject/javaSteps/JavaVersionStep.ts @@ -3,10 +3,10 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { AzureWizardPromptStep, IAzureQuickPickItem } from "@microsoft/vscode-azext-utils"; +import { AzureWizardPromptStep, type IAzureQuickPickItem } from "@microsoft/vscode-azext-utils"; import { hasMinFuncCliVersion } from "../../../funcCoreTools/hasMinFuncCliVersion"; import { localize } from "../../../localize"; -import { IJavaProjectWizardContext } from "./IJavaProjectWizardContext"; +import { type IJavaProjectWizardContext } from "./IJavaProjectWizardContext"; import { getJavaVersion } from "./JavaVersions"; export const java8: string = '8'; diff --git a/src/commands/createNewProject/javaSteps/addJavaCreateProjectSteps.ts b/src/commands/createNewProject/javaSteps/addJavaCreateProjectSteps.ts index 67fdf73b4..d82a50d74 100644 --- a/src/commands/createNewProject/javaSteps/addJavaCreateProjectSteps.ts +++ b/src/commands/createNewProject/javaSteps/addJavaCreateProjectSteps.ts @@ -3,11 +3,11 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { AzureWizardExecuteStep, AzureWizardPromptStep } from "@microsoft/vscode-azext-utils"; -import { IProjectWizardContext } from "../IProjectWizardContext"; +import { type AzureWizardExecuteStep, type AzureWizardPromptStep } from "@microsoft/vscode-azext-utils"; +import { type IProjectWizardContext } from "../IProjectWizardContext"; import { GradleProjectCreateStep } from "../ProjectCreateStep/GradleProjectCreateSteps"; import { MavenProjectCreateStep } from "../ProjectCreateStep/MavenProjectCreateSteps"; -import { IJavaProjectWizardContext } from "./IJavaProjectWizardContext"; +import { type IJavaProjectWizardContext } from "./IJavaProjectWizardContext"; import { JavaAppNameStep } from "./JavaAppNameStep"; import { JavaArtifactIdStep } from "./JavaArtifactIdStep"; import { JavaBuildToolStep } from "./JavaBuildToolStep"; diff --git a/src/commands/createNewProject/pythonSteps/EnterPythonAliasStep.ts b/src/commands/createNewProject/pythonSteps/EnterPythonAliasStep.ts index c0af27b25..18298f44e 100644 --- a/src/commands/createNewProject/pythonSteps/EnterPythonAliasStep.ts +++ b/src/commands/createNewProject/pythonSteps/EnterPythonAliasStep.ts @@ -5,7 +5,7 @@ import { AzureWizardPromptStep, parseError } from "@microsoft/vscode-azext-utils"; import { localize } from "../../../localize"; -import { IPythonVenvWizardContext } from "./IPythonVenvWizardContext"; +import { type IPythonVenvWizardContext } from "./IPythonVenvWizardContext"; import { getPythonVersion, getSupportedPythonVersions, isSupportedPythonVersion } from './pythonVersion'; export class EnterPythonAliasStep extends AzureWizardPromptStep { diff --git a/src/commands/createNewProject/pythonSteps/IPythonVenvWizardContext.ts b/src/commands/createNewProject/pythonSteps/IPythonVenvWizardContext.ts index 9a9468378..aa89e4650 100644 --- a/src/commands/createNewProject/pythonSteps/IPythonVenvWizardContext.ts +++ b/src/commands/createNewProject/pythonSteps/IPythonVenvWizardContext.ts @@ -3,8 +3,8 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { IActionContext } from "@microsoft/vscode-azext-utils"; -import { FuncVersion } from "../../../FuncVersion"; +import { type IActionContext } from "@microsoft/vscode-azext-utils"; +import { type FuncVersion } from "../../../FuncVersion"; export interface IPythonVenvWizardContext extends IActionContext { projectPath: string; diff --git a/src/commands/createNewProject/pythonSteps/PythonAliasListStep.ts b/src/commands/createNewProject/pythonSteps/PythonAliasListStep.ts index a7a3f2f2e..49a2d4239 100644 --- a/src/commands/createNewProject/pythonSteps/PythonAliasListStep.ts +++ b/src/commands/createNewProject/pythonSteps/PythonAliasListStep.ts @@ -3,11 +3,11 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { AzureWizardPromptStep, IAzureQuickPickItem, IWizardOptions } from "@microsoft/vscode-azext-utils"; +import { AzureWizardPromptStep, type IAzureQuickPickItem, type IWizardOptions } from "@microsoft/vscode-azext-utils"; import { localize } from "../../../localize"; import { getGlobalSetting } from "../../../vsCodeConfig/settings"; import { EnterPythonAliasStep } from "./EnterPythonAliasStep"; -import { IPythonVenvWizardContext } from "./IPythonVenvWizardContext"; +import { type IPythonVenvWizardContext } from "./IPythonVenvWizardContext"; import { getPythonVersion, getSupportedPythonVersions, isSupportedPythonVersion } from './pythonVersion'; export class PythonAliasListStep extends AzureWizardPromptStep { diff --git a/src/commands/createNewProject/pythonSteps/PythonVenvCreateStep.ts b/src/commands/createNewProject/pythonSteps/PythonVenvCreateStep.ts index 86c85b8ed..6f10f1ac3 100644 --- a/src/commands/createNewProject/pythonSteps/PythonVenvCreateStep.ts +++ b/src/commands/createNewProject/pythonSteps/PythonVenvCreateStep.ts @@ -4,13 +4,13 @@ *--------------------------------------------------------------------------------------------*/ import { AzureWizardExecuteStep } from '@microsoft/vscode-azext-utils'; -import { Progress } from 'vscode'; +import { type Progress } from 'vscode'; import { ext } from '../../../extensionVariables'; import { localize } from "../../../localize"; import { cpUtils } from "../../../utils/cpUtils"; import { nonNullProp } from '../../../utils/nonNull'; import { venvUtils } from '../../../utils/venvUtils'; -import { IPythonVenvWizardContext } from './IPythonVenvWizardContext'; +import { type IPythonVenvWizardContext } from './IPythonVenvWizardContext'; import { getPythonVersion } from './pythonVersion'; export class PythonVenvCreateStep extends AzureWizardExecuteStep { diff --git a/src/commands/createNewProject/pythonSteps/pythonVersion.ts b/src/commands/createNewProject/pythonSteps/pythonVersion.ts index 06a39f088..5d1ea56de 100644 --- a/src/commands/createNewProject/pythonSteps/pythonVersion.ts +++ b/src/commands/createNewProject/pythonSteps/pythonVersion.ts @@ -3,11 +3,11 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { IActionContext } from '@microsoft/vscode-azext-utils'; +import { type IActionContext } from '@microsoft/vscode-azext-utils'; import * as semver from 'semver'; +import { getMajorVersion, type FuncVersion } from '../../../FuncVersion'; import { ext } from '../../../extensionVariables'; import { getLocalFuncCoreToolsVersion } from '../../../funcCoreTools/getLocalFuncCoreToolsVersion'; -import { FuncVersion, getMajorVersion } from '../../../FuncVersion'; import { localize } from "../../../localize"; import { cpUtils } from "../../../utils/cpUtils"; diff --git a/src/commands/createNewProject/verifyIsProject.ts b/src/commands/createNewProject/verifyIsProject.ts index b50778b3c..4e930b84f 100644 --- a/src/commands/createNewProject/verifyIsProject.ts +++ b/src/commands/createNewProject/verifyIsProject.ts @@ -3,9 +3,9 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { AzExtFsExtra, IActionContext, IAzureQuickPickItem } from '@microsoft/vscode-azext-utils'; +import { AzExtFsExtra, type IActionContext, type IAzureQuickPickItem } from '@microsoft/vscode-azext-utils'; import * as path from 'path'; -import { MessageItem, WorkspaceFolder } from 'vscode'; +import { type MessageItem, type WorkspaceFolder } from 'vscode'; import { hostFileName, projectSubpathSetting } from '../../constants'; import { localize } from '../../localize'; import { telemetryUtils } from '../../utils/telemetryUtils'; diff --git a/src/commands/createSlot.ts b/src/commands/createSlot.ts index 4779e37d3..0d7403ddb 100644 --- a/src/commands/createSlot.ts +++ b/src/commands/createSlot.ts @@ -3,12 +3,12 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { IActionContext } from '@microsoft/vscode-azext-utils'; +import { type IActionContext } from '@microsoft/vscode-azext-utils'; import { functionFilter } from '../constants'; import { ext } from '../extensionVariables'; +import { type SlotTreeItem } from '../tree/SlotTreeItem'; import { SlotsTreeItem } from '../tree/SlotsTreeItem'; -import { SlotTreeItem } from '../tree/SlotTreeItem'; -import { ISiteCreatedOptions } from './createFunctionApp/showSiteCreated'; +import { type ISiteCreatedOptions } from './createFunctionApp/showSiteCreated'; export async function createSlot(context: IActionContext, node?: SlotsTreeItem): Promise { if (!node) { diff --git a/src/commands/deleteFunction.ts b/src/commands/deleteFunction.ts index f4062d955..820553a33 100644 --- a/src/commands/deleteFunction.ts +++ b/src/commands/deleteFunction.ts @@ -3,7 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { AzExtTreeItem, IActionContext, ITreeItemPickerContext } from '@microsoft/vscode-azext-utils'; +import { type AzExtTreeItem, type IActionContext, type ITreeItemPickerContext } from '@microsoft/vscode-azext-utils'; import { localize } from '../localize'; import { deleteNode } from './deleteNode'; diff --git a/src/commands/deleteFunctionApp.ts b/src/commands/deleteFunctionApp.ts index c65e71fa4..876a57582 100644 --- a/src/commands/deleteFunctionApp.ts +++ b/src/commands/deleteFunctionApp.ts @@ -3,10 +3,10 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { IActionContext } from '@microsoft/vscode-azext-utils'; +import { type IActionContext } from '@microsoft/vscode-azext-utils'; import { functionFilter } from '../constants'; import { ext } from '../extensionVariables'; -import { SlotTreeItem } from '../tree/SlotTreeItem'; +import { type SlotTreeItem } from '../tree/SlotTreeItem'; export async function deleteFunctionApp(context: IActionContext, node?: SlotTreeItem): Promise { if (!node) { diff --git a/src/commands/deleteNode.ts b/src/commands/deleteNode.ts index df8d54221..7beffbf6b 100644 --- a/src/commands/deleteNode.ts +++ b/src/commands/deleteNode.ts @@ -3,7 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { AzExtTreeItem, IActionContext } from '@microsoft/vscode-azext-utils'; +import { type AzExtTreeItem, type IActionContext } from '@microsoft/vscode-azext-utils'; import { functionFilter } from '../constants'; import { ext } from '../extensionVariables'; diff --git a/src/commands/deploy/deploy.ts b/src/commands/deploy/deploy.ts index f3b5d875b..2e5999c23 100644 --- a/src/commands/deploy/deploy.ts +++ b/src/commands/deploy/deploy.ts @@ -3,16 +3,16 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import type { SiteConfigResource } from '@azure/arm-appservice'; -import { IDeployContext, IDeployPaths, getDeployFsPath, getDeployNode, deploy as innerDeploy, showDeployConfirmation } from '@microsoft/vscode-azext-azureappservice'; -import { DialogResponses, ExecuteActivityContext, IActionContext } from '@microsoft/vscode-azext-utils'; -import * as vscode from 'vscode'; -import { CodeAction, ConnectionType, DurableBackend, DurableBackendValues, ProjectLanguage, ScmType, deploySubpathSetting, functionFilter, hostFileName, remoteBuildSetting } from '../../constants'; +import { type SiteConfigResource } from '@azure/arm-appservice'; +import { getDeployFsPath, getDeployNode, deploy as innerDeploy, showDeployConfirmation, type IDeployContext, type IDeployPaths } from '@microsoft/vscode-azext-azureappservice'; +import { DialogResponses, type ExecuteActivityContext, type IActionContext } from '@microsoft/vscode-azext-utils'; +import type * as vscode from 'vscode'; +import { CodeAction, ConnectionType, DurableBackend, ProjectLanguage, ScmType, deploySubpathSetting, functionFilter, hostFileName, remoteBuildSetting, type DurableBackendValues } from '../../constants'; import { ext } from '../../extensionVariables'; import { addLocalFuncTelemetry } from '../../funcCoreTools/getLocalFuncCoreToolsVersion'; import { localize } from '../../localize'; import { ResolvedFunctionAppResource } from '../../tree/ResolvedFunctionAppResource'; -import { SlotTreeItem } from '../../tree/SlotTreeItem'; +import { type SlotTreeItem } from '../../tree/SlotTreeItem'; import { createActivityContext } from '../../utils/activityUtils'; import { dotnetUtils } from '../../utils/dotnetUtils'; import { durableUtils } from '../../utils/durableUtils'; @@ -20,7 +20,7 @@ import { isPathEqual } from '../../utils/fs'; import { treeUtils } from '../../utils/treeUtils'; import { getWorkspaceSetting } from '../../vsCodeConfig/settings'; import { verifyInitForVSCode } from '../../vsCodeConfig/verifyInitForVSCode'; -import { ISetConnectionSettingContext } from '../appSettings/connectionSettings/ISetConnectionSettingContext'; +import { type ISetConnectionSettingContext } from '../appSettings/connectionSettings/ISetConnectionSettingContext'; import { validateEventHubsConnection } from '../appSettings/connectionSettings/eventHubs/validateEventHubsConnection'; import { validateSqlDbConnection } from '../appSettings/connectionSettings/sqlDatabase/validateSqlDbConnection'; import { tryGetFunctionProjectRoot } from '../createNewProject/verifyIsProject'; diff --git a/src/commands/deploy/notifyDeployComplete.ts b/src/commands/deploy/notifyDeployComplete.ts index ef25e23bc..4426044ed 100644 --- a/src/commands/deploy/notifyDeployComplete.ts +++ b/src/commands/deploy/notifyDeployComplete.ts @@ -3,14 +3,14 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { AzExtTreeItem, callWithTelemetryAndErrorHandling, IActionContext } from '@microsoft/vscode-azext-utils'; +import { callWithTelemetryAndErrorHandling, type AzExtTreeItem, type IActionContext } from '@microsoft/vscode-azext-utils'; import * as retry from 'p-retry'; -import { MessageItem, window, WorkspaceFolder } from 'vscode'; +import { window, type MessageItem, type WorkspaceFolder } from 'vscode'; import { ext } from '../../extensionVariables'; import { localize } from '../../localize'; -import { RemoteFunctionsTreeItem } from '../../tree/remoteProject/RemoteFunctionsTreeItem'; +import { type SlotTreeItem } from '../../tree/SlotTreeItem'; import { RemoteFunctionTreeItem } from '../../tree/remoteProject/RemoteFunctionTreeItem'; -import { SlotTreeItem } from '../../tree/SlotTreeItem'; +import { RemoteFunctionsTreeItem } from '../../tree/remoteProject/RemoteFunctionsTreeItem'; import { nonNullValue } from '../../utils/nonNull'; import { uploadAppSettings } from '../appSettings/uploadAppSettings'; import { startStreamingLogs } from '../logstream/startStreamingLogs'; diff --git a/src/commands/deploy/runPreDeployTask.ts b/src/commands/deploy/runPreDeployTask.ts index 114e8a326..57596b93c 100644 --- a/src/commands/deploy/runPreDeployTask.ts +++ b/src/commands/deploy/runPreDeployTask.ts @@ -3,7 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { handleFailedPreDeployTask, IDeployContext, IPreDeployTaskResult, tryRunPreDeployTask } from '@microsoft/vscode-azext-azureappservice'; +import { handleFailedPreDeployTask, tryRunPreDeployTask, type IDeployContext, type IPreDeployTaskResult } from '@microsoft/vscode-azext-azureappservice'; import { DialogResponses, UserCancelledError } from '@microsoft/vscode-azext-utils'; import * as vscode from 'vscode'; import { buildNativeDeps, packTaskName, preDeployTaskSetting, tasksFileName } from '../../constants'; diff --git a/src/commands/deploy/shouldValidateConnection.ts b/src/commands/deploy/shouldValidateConnection.ts index 08c7666ac..2925def83 100644 --- a/src/commands/deploy/shouldValidateConnection.ts +++ b/src/commands/deploy/shouldValidateConnection.ts @@ -1,6 +1,6 @@ -import type { StringDictionary } from "@azure/arm-appservice"; -import type { SiteClient } from "@microsoft/vscode-azext-azureappservice"; -import { ConnectionKey, DurableBackend, DurableBackendValues } from "../../constants"; +import { type StringDictionary } from "@azure/arm-appservice"; +import { type SiteClient } from "@microsoft/vscode-azext-azureappservice"; +import { ConnectionKey, DurableBackend, type DurableBackendValues } from "../../constants"; import { getEventHubName } from "../appSettings/connectionSettings/eventHubs/validateEventHubsConnection"; export interface IShouldValidateConnection { diff --git a/src/commands/deploy/showCoreToolsWarning.ts b/src/commands/deploy/showCoreToolsWarning.ts index 4b1dcf57b..ba4bd2f09 100644 --- a/src/commands/deploy/showCoreToolsWarning.ts +++ b/src/commands/deploy/showCoreToolsWarning.ts @@ -3,8 +3,8 @@ * Licensed under the MIT License. See License.md in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { DialogResponses, IActionContext, nonNullValue, openUrl } from "@microsoft/vscode-azext-utils"; -import { MessageItem } from "vscode"; +import { DialogResponses, nonNullValue, openUrl, type IActionContext } from "@microsoft/vscode-azext-utils"; +import { type MessageItem } from "vscode"; import { FuncVersion, funcVersionLink, tryParseFuncVersion } from "../../FuncVersion"; import { tryGetLocalFuncVersion } from "../../funcCoreTools/tryGetLocalFuncVersion"; import { localize } from "../../localize"; diff --git a/src/commands/deploy/showFlexDeployConfirmation.ts b/src/commands/deploy/showFlexDeployConfirmation.ts index 40f854090..5b4e07a5b 100644 --- a/src/commands/deploy/showFlexDeployConfirmation.ts +++ b/src/commands/deploy/showFlexDeployConfirmation.ts @@ -3,8 +3,8 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { IDeployContext, ParsedSite, showCustomDeployConfirmation } from "@microsoft/vscode-azext-azureappservice"; -import { MessageItem } from "vscode"; +import { showCustomDeployConfirmation, type IDeployContext, type ParsedSite } from "@microsoft/vscode-azext-azureappservice"; +import { type MessageItem } from "vscode"; import { localize } from "../../localize"; export async function showFlexDeployConfirmation(context: IDeployContext, site: ParsedSite, deployCommandId: string): Promise { diff --git a/src/commands/deploy/validateRemoteBuild.ts b/src/commands/deploy/validateRemoteBuild.ts index 6eae5587e..6e5f1789d 100644 --- a/src/commands/deploy/validateRemoteBuild.ts +++ b/src/commands/deploy/validateRemoteBuild.ts @@ -3,10 +3,10 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { IDeployContext, ParsedSite } from '@microsoft/vscode-azext-azureappservice'; +import { type IDeployContext, type ParsedSite } from '@microsoft/vscode-azext-azureappservice'; import * as path from 'path'; -import * as vscode from 'vscode'; -import { deploySubpathSetting, packTaskName, preDeployTaskSetting, ProjectLanguage, remoteBuildSetting } from '../../constants'; +import type * as vscode from 'vscode'; +import { ProjectLanguage, deploySubpathSetting, packTaskName, preDeployTaskSetting, remoteBuildSetting } from '../../constants'; import { localize } from '../../localize'; import { updateWorkspaceSetting } from '../../vsCodeConfig/settings'; import { tryGetFunctionProjectRoot } from '../createNewProject/verifyIsProject'; diff --git a/src/commands/deploy/verifyAppSettings.ts b/src/commands/deploy/verifyAppSettings.ts index 94e00ca9a..02d21a314 100644 --- a/src/commands/deploy/verifyAppSettings.ts +++ b/src/commands/deploy/verifyAppSettings.ts @@ -3,19 +3,19 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import type { StringDictionary } from '@azure/arm-appservice'; -import type { ParsedSite, SiteClient } from '@microsoft/vscode-azext-azureappservice'; -import { IActionContext } from '@microsoft/vscode-azext-utils'; +import { type StringDictionary } from '@azure/arm-appservice'; +import { type ParsedSite, type SiteClient } from '@microsoft/vscode-azext-azureappservice'; +import { type IActionContext } from '@microsoft/vscode-azext-utils'; import * as retry from 'p-retry'; -import * as vscode from 'vscode'; +import type * as vscode from 'vscode'; import { FuncVersion, tryParseFuncVersion } from '../../FuncVersion'; -import { ConnectionKey, ConnectionKeyValues, DurableBackend, DurableBackendValues, ProjectLanguage, azureWebJobsFeatureFlags, extensionVersionKey, runFromPackageKey, workerRuntimeKey } from '../../constants'; +import { ConnectionKey, DurableBackend, azureWebJobsFeatureFlags, extensionVersionKey, runFromPackageKey, workerRuntimeKey, type ConnectionKeyValues, type DurableBackendValues, type ProjectLanguage } from '../../constants'; import { ext } from '../../extensionVariables'; import { localize } from '../../localize'; -import { SlotTreeItem } from '../../tree/SlotTreeItem'; +import { type SlotTreeItem } from '../../tree/SlotTreeItem'; import { isNodeV4Plus, isPythonV2Plus } from '../../utils/programmingModelUtils'; import { isKnownWorkerRuntime, promptToUpdateDotnetRuntime, tryGetFunctionsWorkerRuntimeForProject } from '../../vsCodeConfig/settings'; -import { ISetConnectionSettingContext } from '../appSettings/connectionSettings/ISetConnectionSettingContext'; +import { type ISetConnectionSettingContext } from '../appSettings/connectionSettings/ISetConnectionSettingContext'; /** * Just putting a few booleans in an object to avoid ordering mistakes if we passed them as individual params diff --git a/src/commands/deployments/connectToGitHub.ts b/src/commands/deployments/connectToGitHub.ts index c2bd72743..d74206a02 100644 --- a/src/commands/deployments/connectToGitHub.ts +++ b/src/commands/deployments/connectToGitHub.ts @@ -4,8 +4,8 @@ *--------------------------------------------------------------------------------------------*/ import { DeploymentsTreeItem, editScmType } from "@microsoft/vscode-azext-azureappservice"; -import { GenericTreeItem, IActionContext } from "@microsoft/vscode-azext-utils"; -import { functionFilter, ScmType } from "../../constants"; +import { type GenericTreeItem, type IActionContext } from "@microsoft/vscode-azext-utils"; +import { ScmType, functionFilter } from "../../constants"; import { ext } from "../../extensionVariables"; import { isSlotTreeItem } from "../../tree/SlotTreeItem"; diff --git a/src/commands/deployments/disconnectRepo.ts b/src/commands/deployments/disconnectRepo.ts index 0c50d2477..2e504275f 100644 --- a/src/commands/deployments/disconnectRepo.ts +++ b/src/commands/deployments/disconnectRepo.ts @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ import { DeploymentsTreeItem, disconnectRepo as disconnectRepository } from "@microsoft/vscode-azext-azureappservice"; -import { IActionContext } from "@microsoft/vscode-azext-utils"; +import { type IActionContext } from "@microsoft/vscode-azext-utils"; import { functionFilter } from "../../constants"; import { ext } from "../../extensionVariables"; import { isResolvedFunctionApp } from "../../tree/ResolvedFunctionAppResource"; diff --git a/src/commands/deployments/redeployDeployment.ts b/src/commands/deployments/redeployDeployment.ts index e965c47e9..c5a6555cf 100644 --- a/src/commands/deployments/redeployDeployment.ts +++ b/src/commands/deployments/redeployDeployment.ts @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ import { DeploymentTreeItem } from "@microsoft/vscode-azext-azureappservice"; -import { IActionContext } from "@microsoft/vscode-azext-utils"; +import { type IActionContext } from "@microsoft/vscode-azext-utils"; import { functionFilter } from "../../constants"; import { ext } from "../../extensionVariables"; diff --git a/src/commands/deployments/viewCommitInGitHub.ts b/src/commands/deployments/viewCommitInGitHub.ts index 1b479281d..edcf14175 100644 --- a/src/commands/deployments/viewCommitInGitHub.ts +++ b/src/commands/deployments/viewCommitInGitHub.ts @@ -3,8 +3,8 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { DeploymentTreeItem } from "@microsoft/vscode-azext-azureappservice"; -import { IActionContext } from "@microsoft/vscode-azext-utils"; +import { type DeploymentTreeItem } from "@microsoft/vscode-azext-azureappservice"; +import { type IActionContext } from "@microsoft/vscode-azext-utils"; import { functionFilter } from "../../constants"; import { ext } from "../../extensionVariables"; diff --git a/src/commands/deployments/viewDeploymentLogs.ts b/src/commands/deployments/viewDeploymentLogs.ts index 72d6f033f..6f5633205 100644 --- a/src/commands/deployments/viewDeploymentLogs.ts +++ b/src/commands/deployments/viewDeploymentLogs.ts @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ import { DeploymentTreeItem } from "@microsoft/vscode-azext-azureappservice"; -import { IActionContext } from "@microsoft/vscode-azext-utils"; +import { type IActionContext } from "@microsoft/vscode-azext-utils"; import { functionFilter } from "../../constants"; import { ext } from "../../extensionVariables"; diff --git a/src/commands/editAppSetting.ts b/src/commands/editAppSetting.ts index 02092ed9f..c56f6bcc6 100644 --- a/src/commands/editAppSetting.ts +++ b/src/commands/editAppSetting.ts @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ import { AppSettingTreeItem } from '@microsoft/vscode-azext-azureappsettings'; -import { IActionContext } from '@microsoft/vscode-azext-utils'; +import { type IActionContext } from '@microsoft/vscode-azext-utils'; import { functionFilter } from '../constants'; import { ext } from '../extensionVariables'; diff --git a/src/commands/executeFunction.ts b/src/commands/executeFunction.ts index 9158da970..2784951c5 100644 --- a/src/commands/executeFunction.ts +++ b/src/commands/executeFunction.ts @@ -4,20 +4,20 @@ *--------------------------------------------------------------------------------------------*/ import { createHttpHeaders } from '@azure/core-rest-pipeline'; -import { SiteClient } from '@microsoft/vscode-azext-azureappservice'; -import { IActionContext, parseError } from '@microsoft/vscode-azext-utils'; +import { type SiteClient } from '@microsoft/vscode-azext-azureappservice'; +import { parseError, type IActionContext } from '@microsoft/vscode-azext-utils'; import fetch from 'cross-fetch'; import { window } from 'vscode'; -import { FuncVersion } from '../FuncVersion'; +import { type FuncVersion } from '../FuncVersion'; import { functionFilter } from '../constants'; import { ext } from '../extensionVariables'; import { localize } from '../localize'; import { FunctionTreeItemBase } from '../tree/FunctionTreeItemBase'; -import { FuncHostRequest } from '../tree/IProjectTreeItem'; +import { type FuncHostRequest } from '../tree/IProjectTreeItem'; import { RemoteFunctionTreeItem } from '../tree/remoteProject/RemoteFunctionTreeItem'; import { nonNullValue } from '../utils/nonNull'; import { requestUtils } from '../utils/requestUtils'; -import { IFunction } from '../workspace/LocalFunction'; +import { type IFunction } from '../workspace/LocalFunction'; export async function executeFunction(context: IActionContext, node?: FunctionTreeItemBase | IFunction): Promise { context.telemetry.eventVersion = 2; diff --git a/src/commands/initProjectForVSCode/InitVSCodeLanguageStep.ts b/src/commands/initProjectForVSCode/InitVSCodeLanguageStep.ts index 1dea869b6..baa590e9c 100644 --- a/src/commands/initProjectForVSCode/InitVSCodeLanguageStep.ts +++ b/src/commands/initProjectForVSCode/InitVSCodeLanguageStep.ts @@ -3,12 +3,12 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { AzureWizardExecuteStep, AzureWizardPromptStep, IAzureQuickPickItem, IWizardOptions } from '@microsoft/vscode-azext-utils'; -import { QuickPickOptions } from 'vscode'; -import { previewPythonModel, ProjectLanguage } from '../../constants'; +import { AzureWizardPromptStep, type AzureWizardExecuteStep, type IAzureQuickPickItem, type IWizardOptions } from '@microsoft/vscode-azext-utils'; +import { type QuickPickOptions } from 'vscode'; +import { ProjectLanguage, previewPythonModel } from '../../constants'; import { pythonNewModelPreview } from '../../constants-nls'; import { localize } from '../../localize'; -import { IProjectWizardContext } from '../createNewProject/IProjectWizardContext'; +import { type IProjectWizardContext } from '../createNewProject/IProjectWizardContext'; import { BallerinaInitVSCodeStep } from './InitVSCodeStep/BallerinaInitVSCodeStep'; import { DotnetInitVSCodeStep } from './InitVSCodeStep/DotnetInitVSCodeStep'; import { DotnetScriptInitVSCodeStep } from './InitVSCodeStep/DotnetScriptInitVSCodeStep'; diff --git a/src/commands/initProjectForVSCode/InitVSCodeStep/BallerinaInitVSCodeStep.ts b/src/commands/initProjectForVSCode/InitVSCodeStep/BallerinaInitVSCodeStep.ts index 172fc450c..97f2a7695 100644 --- a/src/commands/initProjectForVSCode/InitVSCodeStep/BallerinaInitVSCodeStep.ts +++ b/src/commands/initProjectForVSCode/InitVSCodeStep/BallerinaInitVSCodeStep.ts @@ -3,12 +3,12 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { DebugConfiguration, TaskDefinition } from 'vscode'; -import { ProjectLanguage, func, hostStartCommand, hostStartTaskName } from '../../../constants'; +import { type DebugConfiguration, type TaskDefinition } from 'vscode'; +import { func, hostStartCommand, hostStartTaskName, type ProjectLanguage } from '../../../constants'; import { ballerinaDebugConfig } from '../../../debug/BallerinaDebugProvider'; import { getFuncWatchProblemMatcher } from '../../../vsCodeConfig/settings'; import { convertToFunctionsTaskLabel } from '../../../vsCodeConfig/tasks'; -import { IBallerinaProjectWizardContext } from '../../createNewProject/ballerinaSteps/IBallerinaProjectWizardContext'; +import { type IBallerinaProjectWizardContext } from '../../createNewProject/ballerinaSteps/IBallerinaProjectWizardContext'; import { isBallerinaProject } from '../detectProjectLanguage'; import { InitVSCodeStepBase } from './InitVSCodeStepBase'; diff --git a/src/commands/initProjectForVSCode/InitVSCodeStep/DotnetInitVSCodeStep.ts b/src/commands/initProjectForVSCode/InitVSCodeStep/DotnetInitVSCodeStep.ts index 801fd3e40..759dcc213 100644 --- a/src/commands/initProjectForVSCode/InitVSCodeStep/DotnetInitVSCodeStep.ts +++ b/src/commands/initProjectForVSCode/InitVSCodeStep/DotnetInitVSCodeStep.ts @@ -5,16 +5,16 @@ import { DialogResponses, parseError } from '@microsoft/vscode-azext-utils'; import * as path from 'path'; -import { DebugConfiguration, MessageItem, TaskDefinition } from 'vscode'; -import { func, hostStartCommand, ProjectLanguage } from '../../../constants'; +import { type DebugConfiguration, type MessageItem, type TaskDefinition } from 'vscode'; import { FuncVersion, tryParseFuncVersion } from '../../../FuncVersion'; +import { ProjectLanguage, func, hostStartCommand } from '../../../constants'; import { localize } from "../../../localize"; import { dotnetUtils } from '../../../utils/dotnetUtils'; import { nonNullProp } from '../../../utils/nonNull'; import { openUrl } from '../../../utils/openUrl'; import { getFuncWatchProblemMatcher, getWorkspaceSetting, updateGlobalSetting } from '../../../vsCodeConfig/settings'; import { convertToFunctionsTaskLabel } from '../../../vsCodeConfig/tasks'; -import { IProjectWizardContext } from '../../createNewProject/IProjectWizardContext'; +import { type IProjectWizardContext } from '../../createNewProject/IProjectWizardContext'; import { InitVSCodeStepBase } from './InitVSCodeStepBase'; const dotnetPublishTaskLabel: string = convertToFunctionsTaskLabel('publish'); diff --git a/src/commands/initProjectForVSCode/InitVSCodeStep/DotnetScriptInitVSCodeStep.ts b/src/commands/initProjectForVSCode/InitVSCodeStep/DotnetScriptInitVSCodeStep.ts index c3a8e404f..20cf5550f 100644 --- a/src/commands/initProjectForVSCode/InitVSCodeStep/DotnetScriptInitVSCodeStep.ts +++ b/src/commands/initProjectForVSCode/InitVSCodeStep/DotnetScriptInitVSCodeStep.ts @@ -3,7 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { DebugConfiguration } from "vscode"; +import { type DebugConfiguration } from "vscode"; import { FuncVersion } from "../../../FuncVersion"; import { localize } from "../../../localize"; import { ScriptInitVSCodeStep } from './ScriptInitVSCodeStep'; diff --git a/src/commands/initProjectForVSCode/InitVSCodeStep/InitVSCodeStepBase.ts b/src/commands/initProjectForVSCode/InitVSCodeStep/InitVSCodeStepBase.ts index a72e27f71..a58bce225 100644 --- a/src/commands/initProjectForVSCode/InitVSCodeStep/InitVSCodeStepBase.ts +++ b/src/commands/initProjectForVSCode/InitVSCodeStep/InitVSCodeStepBase.ts @@ -3,21 +3,21 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { AzExtFsExtra, AzureWizardExecuteStep, IActionContext } from '@microsoft/vscode-azext-utils'; +import { AzExtFsExtra, AzureWizardExecuteStep, type IActionContext } from '@microsoft/vscode-azext-utils'; import * as path from 'path'; -import { DebugConfiguration, MessageItem, TaskDefinition, WorkspaceFolder } from 'vscode'; -import { FuncVersion } from '../../../FuncVersion'; -import { ProjectLanguage, deploySubpathSetting, extensionId, func, funcVersionSetting, gitignoreFileName, launchFileName, preDeployTaskSetting, projectLanguageModelSetting, projectLanguageSetting, projectSubpathSetting, settingsFileName, tasksFileName } from '../../../constants'; +import { type DebugConfiguration, type MessageItem, type TaskDefinition, type WorkspaceFolder } from 'vscode'; +import { type FuncVersion } from '../../../FuncVersion'; +import { deploySubpathSetting, extensionId, func, funcVersionSetting, gitignoreFileName, launchFileName, preDeployTaskSetting, projectLanguageModelSetting, projectLanguageSetting, projectSubpathSetting, settingsFileName, tasksFileName, type ProjectLanguage } from '../../../constants'; import { ext } from '../../../extensionVariables'; import { localize } from '../../../localize'; import { confirmEditJsonFile, isPathEqual, isSubpath } from '../../../utils/fs'; import { nonNullProp } from '../../../utils/nonNull'; import { isMultiRootWorkspace } from '../../../utils/workspace'; -import { IExtensionsJson } from '../../../vsCodeConfig/extensions'; -import { ILaunchJson, getDebugConfigs, getLaunchVersion, isDebugConfigEqual, launchVersion, updateDebugConfigs, updateLaunchVersion } from '../../../vsCodeConfig/launch'; +import { type IExtensionsJson } from '../../../vsCodeConfig/extensions'; +import { getDebugConfigs, getLaunchVersion, isDebugConfigEqual, launchVersion, updateDebugConfigs, updateLaunchVersion, type ILaunchJson } from '../../../vsCodeConfig/launch'; import { updateWorkspaceSetting } from '../../../vsCodeConfig/settings'; -import { ITask, ITasksJson, getTasks, getTasksVersion, tasksVersion, updateTasks, updateTasksVersion } from '../../../vsCodeConfig/tasks'; -import { IProjectWizardContext } from '../../createNewProject/IProjectWizardContext'; +import { getTasks, getTasksVersion, tasksVersion, updateTasks, updateTasksVersion, type ITask, type ITasksJson } from '../../../vsCodeConfig/tasks'; +import { type IProjectWizardContext } from '../../createNewProject/IProjectWizardContext'; export abstract class InitVSCodeStepBase extends AzureWizardExecuteStep { public priority: number = 20; diff --git a/src/commands/initProjectForVSCode/InitVSCodeStep/JavaInitVSCodeStep.ts b/src/commands/initProjectForVSCode/InitVSCodeStep/JavaInitVSCodeStep.ts index f71972b22..e71322930 100644 --- a/src/commands/initProjectForVSCode/InitVSCodeStep/JavaInitVSCodeStep.ts +++ b/src/commands/initProjectForVSCode/InitVSCodeStep/JavaInitVSCodeStep.ts @@ -5,15 +5,15 @@ import { AzExtFsExtra } from '@microsoft/vscode-azext-utils'; import * as path from 'path'; -import { DebugConfiguration, TaskDefinition, window } from 'vscode'; -import { buildGradleFileName, func, hostStartCommand, hostStartTaskName, javaBuildTool, JavaBuildTool, pomXmlFileName, ProjectLanguage } from '../../../constants'; +import { window, type DebugConfiguration, type TaskDefinition } from 'vscode'; +import { JavaBuildTool, buildGradleFileName, func, hostStartCommand, hostStartTaskName, javaBuildTool, pomXmlFileName, type ProjectLanguage } from '../../../constants'; import { javaDebugConfig } from '../../../debug/JavaDebugProvider'; import { localize } from "../../../localize"; import { mavenUtils } from '../../../utils/mavenUtils'; import { nonNullProp } from '../../../utils/nonNull'; import { getFuncWatchProblemMatcher } from '../../../vsCodeConfig/settings'; import { convertToFunctionsTaskLabel } from '../../../vsCodeConfig/tasks'; -import { IJavaProjectWizardContext } from '../../createNewProject/javaSteps/IJavaProjectWizardContext'; +import { type IJavaProjectWizardContext } from '../../createNewProject/javaSteps/IJavaProjectWizardContext'; import { InitVSCodeStepBase } from './InitVSCodeStepBase'; const javaPackageTaskLabel: string = convertToFunctionsTaskLabel('package'); diff --git a/src/commands/initProjectForVSCode/InitVSCodeStep/JavaScriptInitVSCodeStep.ts b/src/commands/initProjectForVSCode/InitVSCodeStep/JavaScriptInitVSCodeStep.ts index 55ad477d8..2e4532678 100644 --- a/src/commands/initProjectForVSCode/InitVSCodeStep/JavaScriptInitVSCodeStep.ts +++ b/src/commands/initProjectForVSCode/InitVSCodeStep/JavaScriptInitVSCodeStep.ts @@ -5,12 +5,12 @@ import { AzExtFsExtra } from '@microsoft/vscode-azext-utils'; import * as path from 'path'; -import { DebugConfiguration, TaskDefinition } from "vscode"; -import { extInstallTaskName, func, hostStartCommand, hostStartTaskName, packageJsonFileName, ProjectLanguage } from "../../../constants"; +import { type DebugConfiguration, type TaskDefinition } from "vscode"; +import { extInstallTaskName, func, hostStartCommand, hostStartTaskName, packageJsonFileName, type ProjectLanguage } from "../../../constants"; import { nodeDebugConfig } from "../../../debug/NodeDebugProvider"; import { getFuncWatchProblemMatcher } from '../../../vsCodeConfig/settings'; import { convertToFunctionsTaskLabel } from '../../../vsCodeConfig/tasks'; -import { IProjectWizardContext } from "../../createNewProject/IProjectWizardContext"; +import { type IProjectWizardContext } from "../../createNewProject/IProjectWizardContext"; import { ScriptInitVSCodeStep } from './ScriptInitVSCodeStep'; const npmInstallTaskLabel: string = convertToFunctionsTaskLabel('npm install'); diff --git a/src/commands/initProjectForVSCode/InitVSCodeStep/PowerShellInitVSCodeStep.ts b/src/commands/initProjectForVSCode/InitVSCodeStep/PowerShellInitVSCodeStep.ts index f4bbbb34c..ac0957bc4 100644 --- a/src/commands/initProjectForVSCode/InitVSCodeStep/PowerShellInitVSCodeStep.ts +++ b/src/commands/initProjectForVSCode/InitVSCodeStep/PowerShellInitVSCodeStep.ts @@ -3,7 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { DebugConfiguration } from "vscode"; +import { type DebugConfiguration } from "vscode"; import { powershellDebugConfig } from "../../../debug/PowerShellDebugProvider"; import { ScriptInitVSCodeStep } from './ScriptInitVSCodeStep'; diff --git a/src/commands/initProjectForVSCode/InitVSCodeStep/PythonInitVSCodeStep.ts b/src/commands/initProjectForVSCode/InitVSCodeStep/PythonInitVSCodeStep.ts index a6000ab91..0d47f9cef 100644 --- a/src/commands/initProjectForVSCode/InitVSCodeStep/PythonInitVSCodeStep.ts +++ b/src/commands/initProjectForVSCode/InitVSCodeStep/PythonInitVSCodeStep.ts @@ -6,15 +6,15 @@ import { AzExtFsExtra } from '@microsoft/vscode-azext-utils'; import * as os from 'os'; import * as path from 'path'; -import { DebugConfiguration, TaskDefinition } from 'vscode'; -import { ProjectLanguage, extInstallCommand, extInstallTaskName, func, gitignoreFileName, hostStartCommand, hostStartTaskName, pythonVenvSetting } from "../../../constants"; +import { type DebugConfiguration, type TaskDefinition } from 'vscode'; +import { extInstallCommand, extInstallTaskName, func, gitignoreFileName, hostStartCommand, hostStartTaskName, pythonVenvSetting, type ProjectLanguage } from "../../../constants"; import { pythonDebugConfig } from '../../../debug/PythonDebugProvider'; import { ext } from '../../../extensionVariables'; import { venvUtils } from '../../../utils/venvUtils'; import { getFuncWatchProblemMatcher } from '../../../vsCodeConfig/settings'; import { convertToFunctionsTaskLabel } from '../../../vsCodeConfig/tasks'; -import { IProjectWizardContext } from '../../createNewProject/IProjectWizardContext'; -import { IPythonVenvWizardContext } from '../../createNewProject/pythonSteps/IPythonVenvWizardContext'; +import { type IProjectWizardContext } from '../../createNewProject/IProjectWizardContext'; +import { type IPythonVenvWizardContext } from '../../createNewProject/pythonSteps/IPythonVenvWizardContext'; import { ScriptInitVSCodeStep } from './ScriptInitVSCodeStep'; export class PythonInitVSCodeStep extends ScriptInitVSCodeStep { diff --git a/src/commands/initProjectForVSCode/InitVSCodeStep/ScriptInitVSCodeStep.ts b/src/commands/initProjectForVSCode/InitVSCodeStep/ScriptInitVSCodeStep.ts index 23ce342d1..aac88ff77 100644 --- a/src/commands/initProjectForVSCode/InitVSCodeStep/ScriptInitVSCodeStep.ts +++ b/src/commands/initProjectForVSCode/InitVSCodeStep/ScriptInitVSCodeStep.ts @@ -6,12 +6,12 @@ import { AzExtFsExtra } from '@microsoft/vscode-azext-utils'; import * as path from 'path'; import * as semver from 'semver'; -import { TaskDefinition } from 'vscode'; -import { extensionsCsprojFileName, extInstallTaskName, func, hostStartCommand, hostStartTaskName, ProjectLanguage } from '../../../constants'; +import { type TaskDefinition } from 'vscode'; +import { extensionsCsprojFileName, extInstallTaskName, func, hostStartCommand, hostStartTaskName, type ProjectLanguage } from '../../../constants'; import { getLocalFuncCoreToolsVersion } from '../../../funcCoreTools/getLocalFuncCoreToolsVersion'; import { FuncVersion } from '../../../FuncVersion'; import { getFuncWatchProblemMatcher } from '../../../vsCodeConfig/settings'; -import { IProjectWizardContext } from '../../createNewProject/IProjectWizardContext'; +import { type IProjectWizardContext } from '../../createNewProject/IProjectWizardContext'; import { InitVSCodeStepBase } from './InitVSCodeStepBase'; /** diff --git a/src/commands/initProjectForVSCode/InitVSCodeStep/TypeScriptInitVSCodeStep.ts b/src/commands/initProjectForVSCode/InitVSCodeStep/TypeScriptInitVSCodeStep.ts index 13811f7a4..5479d61e7 100644 --- a/src/commands/initProjectForVSCode/InitVSCodeStep/TypeScriptInitVSCodeStep.ts +++ b/src/commands/initProjectForVSCode/InitVSCodeStep/TypeScriptInitVSCodeStep.ts @@ -5,11 +5,11 @@ import { AzExtFsExtra } from '@microsoft/vscode-azext-utils'; import * as path from 'path'; -import { TaskDefinition } from 'vscode'; -import { ProjectLanguage, extInstallTaskName, func, hostStartCommand, hostStartTaskName, packageJsonFileName } from '../../../constants'; +import { type TaskDefinition } from 'vscode'; +import { extInstallTaskName, func, hostStartCommand, hostStartTaskName, packageJsonFileName, type ProjectLanguage } from '../../../constants'; import { getFuncWatchProblemMatcher } from '../../../vsCodeConfig/settings'; import { convertToFunctionsTaskLabel } from '../../../vsCodeConfig/tasks'; -import { IProjectWizardContext } from '../../createNewProject/IProjectWizardContext'; +import { type IProjectWizardContext } from '../../createNewProject/IProjectWizardContext'; import { JavaScriptInitVSCodeStep } from "./JavaScriptInitVSCodeStep"; const npmPruneTaskLabel: string = convertToFunctionsTaskLabel('npm prune'); @@ -34,7 +34,7 @@ export class TypeScriptInitVSCodeStep extends JavaScriptInitVSCodeStep { public getTasks(language: ProjectLanguage): TaskDefinition[] { const installDependsOn = this.useFuncExtensionsInstall ? [extInstallTaskName, npmInstallTaskLabel] : npmInstallTaskLabel; - const tasks: TaskDefinition[] = [ + const tasks: TaskDefinition[] = [ { type: func, label: hostStartTaskName, diff --git a/src/commands/initProjectForVSCode/detectProjectLanguage.ts b/src/commands/initProjectForVSCode/detectProjectLanguage.ts index 6abc15d6e..7846eb1a6 100644 --- a/src/commands/initProjectForVSCode/detectProjectLanguage.ts +++ b/src/commands/initProjectForVSCode/detectProjectLanguage.ts @@ -3,10 +3,10 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { AzExtFsExtra, IActionContext } from '@microsoft/vscode-azext-utils'; +import { AzExtFsExtra, type IActionContext } from '@microsoft/vscode-azext-utils'; import * as path from 'path'; -import { buildGradleFileName, localSettingsFileName, packageJsonFileName, pomXmlFileName, previewPythonModel, ProjectLanguage, pythonFunctionAppFileName, workerRuntimeKey, ballerinaTomlFileName } from '../../constants'; -import { getLocalSettingsJson, ILocalSettingsJson } from '../../funcConfig/local.settings'; +import { ProjectLanguage, ballerinaTomlFileName, buildGradleFileName, localSettingsFileName, packageJsonFileName, pomXmlFileName, previewPythonModel, pythonFunctionAppFileName, workerRuntimeKey } from '../../constants'; +import { getLocalSettingsJson, type ILocalSettingsJson } from '../../funcConfig/local.settings'; import { dotnetUtils } from '../../utils/dotnetUtils'; import { hasNodeJsDependency, tryGetPackageJson } from '../../utils/nodeJsUtils'; import { telemetryUtils } from '../../utils/telemetryUtils'; @@ -42,7 +42,7 @@ export async function detectProjectLanguage(context: IActionContext, projectPath if (await isFSharpProject(context, projectPath)) { detectedLangs.push(ProjectLanguage.FSharp); } - + if (await isBallerinaProject(projectPath)) { detectedLangs.push(ProjectLanguage.Ballerina); } diff --git a/src/commands/initProjectForVSCode/initProjectForVSCode.ts b/src/commands/initProjectForVSCode/initProjectForVSCode.ts index b38e7c9d5..1e2c51f6b 100644 --- a/src/commands/initProjectForVSCode/initProjectForVSCode.ts +++ b/src/commands/initProjectForVSCode/initProjectForVSCode.ts @@ -3,19 +3,19 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { AzureWizard, IActionContext, UserCancelledError } from '@microsoft/vscode-azext-utils'; -import { window, workspace, WorkspaceFolder } from 'vscode'; -import { funcVersionSetting, ProjectLanguage, projectLanguageModelSetting, projectLanguageSetting, projectTemplateKeySetting } from '../../constants'; +import { AzureWizard, UserCancelledError, type IActionContext } from '@microsoft/vscode-azext-utils'; +import { window, workspace, type WorkspaceFolder } from 'vscode'; +import { latestGAVersion, type FuncVersion } from '../../FuncVersion'; +import { funcVersionSetting, projectLanguageModelSetting, projectLanguageSetting, projectTemplateKeySetting, type ProjectLanguage } from '../../constants'; import { NoWorkspaceError } from '../../errors'; import { tryGetLocalFuncVersion } from '../../funcCoreTools/tryGetLocalFuncVersion'; -import { FuncVersion, latestGAVersion } from '../../FuncVersion'; import { localize } from '../../localize'; import { getContainingWorkspace } from '../../utils/workspace'; import { getGlobalSetting } from '../../vsCodeConfig/settings'; -import { IProjectWizardContext } from '../createNewProject/IProjectWizardContext'; +import { type IProjectWizardContext } from '../createNewProject/IProjectWizardContext'; import { verifyProjectPath } from '../createNewProject/verifyIsProject'; -import { detectProjectLanguage, detectProjectLanguageModel } from './detectProjectLanguage'; import { InitVSCodeLanguageStep } from './InitVSCodeLanguageStep'; +import { detectProjectLanguage, detectProjectLanguageModel } from './detectProjectLanguage'; export async function initProjectForVSCode(context: IActionContext, fsPath?: string, language?: ProjectLanguage): Promise { let workspaceFolder: WorkspaceFolder | undefined; diff --git a/src/commands/initProjectForVSCode/javaSteps/addJavaInitVSCodeSteps.ts b/src/commands/initProjectForVSCode/javaSteps/addJavaInitVSCodeSteps.ts index 11a3d9daf..0caf30f83 100644 --- a/src/commands/initProjectForVSCode/javaSteps/addJavaInitVSCodeSteps.ts +++ b/src/commands/initProjectForVSCode/javaSteps/addJavaInitVSCodeSteps.ts @@ -3,13 +3,13 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { AzureWizardExecuteStep, AzureWizardPromptStep } from "@microsoft/vscode-azext-utils"; +import { type AzureWizardExecuteStep, type AzureWizardPromptStep } from "@microsoft/vscode-azext-utils"; import { JavaBuildTool } from "../../../constants"; -import { IProjectWizardContext } from "../../createNewProject/IProjectWizardContext"; -import { IJavaProjectWizardContext } from "../../createNewProject/javaSteps/IJavaProjectWizardContext"; +import { type IProjectWizardContext } from "../../createNewProject/IProjectWizardContext"; +import { type IJavaProjectWizardContext } from "../../createNewProject/javaSteps/IJavaProjectWizardContext"; import { JavaBuildToolStep } from "../../createNewProject/javaSteps/JavaBuildToolStep"; -import { isGradleProject, isMavenProject } from "../detectProjectLanguage"; import { JavaInitVSCodeStep } from "../InitVSCodeStep/JavaInitVSCodeStep"; +import { isGradleProject, isMavenProject } from "../detectProjectLanguage"; export async function addJavaInitVSCodeSteps( context: IJavaProjectWizardContext, diff --git a/src/commands/initProjectForVSCode/pythonSteps/PythonVenvListStep.ts b/src/commands/initProjectForVSCode/pythonSteps/PythonVenvListStep.ts index 24cfbba0a..308c50777 100644 --- a/src/commands/initProjectForVSCode/pythonSteps/PythonVenvListStep.ts +++ b/src/commands/initProjectForVSCode/pythonSteps/PythonVenvListStep.ts @@ -3,9 +3,9 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { AzureWizardPromptStep, IAzureQuickPickItem } from "@microsoft/vscode-azext-utils"; +import { AzureWizardPromptStep, type IAzureQuickPickItem } from "@microsoft/vscode-azext-utils"; import { localize } from "../../../localize"; -import { IPythonVenvWizardContext } from "../../createNewProject/pythonSteps/IPythonVenvWizardContext"; +import { type IPythonVenvWizardContext } from "../../createNewProject/pythonSteps/IPythonVenvWizardContext"; export class PythonVenvListStep extends AzureWizardPromptStep { public hideStepCount: boolean = true; diff --git a/src/commands/initProjectForVSCode/pythonSteps/addPythonInitVSCodeSteps.ts b/src/commands/initProjectForVSCode/pythonSteps/addPythonInitVSCodeSteps.ts index 92827bc41..462a371a6 100644 --- a/src/commands/initProjectForVSCode/pythonSteps/addPythonInitVSCodeSteps.ts +++ b/src/commands/initProjectForVSCode/pythonSteps/addPythonInitVSCodeSteps.ts @@ -3,11 +3,11 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { AzExtFsExtra, AzureWizardExecuteStep, AzureWizardPromptStep } from "@microsoft/vscode-azext-utils"; +import { AzExtFsExtra, type AzureWizardExecuteStep, type AzureWizardPromptStep } from "@microsoft/vscode-azext-utils"; import { venvUtils } from '../../../utils/venvUtils'; import { getWorkspaceSetting } from "../../../vsCodeConfig/settings"; -import { IProjectWizardContext } from "../../createNewProject/IProjectWizardContext"; -import { IPythonVenvWizardContext } from "../../createNewProject/pythonSteps/IPythonVenvWizardContext"; +import { type IProjectWizardContext } from "../../createNewProject/IProjectWizardContext"; +import { type IPythonVenvWizardContext } from "../../createNewProject/pythonSteps/IPythonVenvWizardContext"; import { PythonAliasListStep } from "../../createNewProject/pythonSteps/PythonAliasListStep"; import { PythonVenvCreateStep } from "../../createNewProject/pythonSteps/PythonVenvCreateStep"; import { PythonInitVSCodeStep } from "../InitVSCodeStep/PythonInitVSCodeStep"; diff --git a/src/commands/logstream/enableFileLogging.ts b/src/commands/logstream/enableFileLogging.ts index 99bde6355..bb89bfc3b 100644 --- a/src/commands/logstream/enableFileLogging.ts +++ b/src/commands/logstream/enableFileLogging.ts @@ -3,9 +3,9 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { SiteLogsConfig } from '@azure/arm-appservice'; -import { ParsedSite } from '@microsoft/vscode-azext-azureappservice'; -import { IActionContext } from '@microsoft/vscode-azext-utils'; +import { type SiteLogsConfig } from '@azure/arm-appservice'; +import { type ParsedSite } from '@microsoft/vscode-azext-azureappservice'; +import { type IActionContext } from '@microsoft/vscode-azext-utils'; export async function enableFileLogging(context: IActionContext, site: ParsedSite, logsConfig?: SiteLogsConfig): Promise { const client = await site.createClient(context); diff --git a/src/commands/logstream/startStreamingLogs.ts b/src/commands/logstream/startStreamingLogs.ts index f2296d206..9f9db0b22 100644 --- a/src/commands/logstream/startStreamingLogs.ts +++ b/src/commands/logstream/startStreamingLogs.ts @@ -3,17 +3,17 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { ApplicationInsightsComponent, ApplicationInsightsManagementClient } from '@azure/arm-appinsights'; -import { SiteLogsConfig, StringDictionary } from '@azure/arm-appservice'; +import { type ApplicationInsightsComponent, type ApplicationInsightsManagementClient } from '@azure/arm-appinsights'; +import { type SiteLogsConfig, type StringDictionary } from '@azure/arm-appservice'; import * as appservice from '@microsoft/vscode-azext-azureappservice'; -import { ParsedSite } from '@microsoft/vscode-azext-azureappservice'; +import { type ParsedSite } from '@microsoft/vscode-azext-azureappservice'; import { uiUtils } from '@microsoft/vscode-azext-azureutils'; -import { AzExtTreeItem, DialogResponses, IActionContext } from '@microsoft/vscode-azext-utils'; +import { DialogResponses, type AzExtTreeItem, type IActionContext } from '@microsoft/vscode-azext-utils'; import { functionFilter } from '../../constants'; import { ext } from '../../extensionVariables'; import { localize } from '../../localize'; -import { SlotTreeItem, isSlotTreeItem } from '../../tree/SlotTreeItem'; -import { RemoteFunctionTreeItem } from '../../tree/remoteProject/RemoteFunctionTreeItem'; +import { isSlotTreeItem, type SlotTreeItem } from '../../tree/SlotTreeItem'; +import { type RemoteFunctionTreeItem } from '../../tree/remoteProject/RemoteFunctionTreeItem'; import { createAppInsightsClient } from '../../utils/azureClients'; import { nonNullProp } from '../../utils/nonNull'; import { openUrl } from '../../utils/openUrl'; diff --git a/src/commands/logstream/stopStreamingLogs.ts b/src/commands/logstream/stopStreamingLogs.ts index a35f50fea..0f7cc0cd0 100644 --- a/src/commands/logstream/stopStreamingLogs.ts +++ b/src/commands/logstream/stopStreamingLogs.ts @@ -4,12 +4,12 @@ *--------------------------------------------------------------------------------------------*/ import * as appservice from '@microsoft/vscode-azext-azureappservice'; -import { ParsedSite } from '@microsoft/vscode-azext-azureappservice'; -import { IActionContext } from '@microsoft/vscode-azext-utils'; +import { type ParsedSite } from '@microsoft/vscode-azext-azureappservice'; +import { type IActionContext } from '@microsoft/vscode-azext-utils'; import { functionFilter } from '../../constants'; import { ext } from '../../extensionVariables'; -import { RemoteFunctionTreeItem } from '../../tree/remoteProject/RemoteFunctionTreeItem'; -import { isSlotTreeItem, SlotTreeItem } from '../../tree/SlotTreeItem'; +import { isSlotTreeItem, type SlotTreeItem } from '../../tree/SlotTreeItem'; +import { type RemoteFunctionTreeItem } from '../../tree/remoteProject/RemoteFunctionTreeItem'; export async function stopStreamingLogs(context: IActionContext, node?: SlotTreeItem | RemoteFunctionTreeItem): Promise { if (!node) { diff --git a/src/commands/openFile.ts b/src/commands/openFile.ts index 894a7e9f2..32e550cf9 100644 --- a/src/commands/openFile.ts +++ b/src/commands/openFile.ts @@ -3,8 +3,8 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { FileTreeItem } from '@microsoft/vscode-azext-azureappservice'; -import { IActionContext } from '@microsoft/vscode-azext-utils'; +import { type FileTreeItem } from '@microsoft/vscode-azext-azureappservice'; +import { type IActionContext } from '@microsoft/vscode-azext-utils'; export async function openFile(context: IActionContext, node: FileTreeItem): Promise { context.telemetry.eventVersion = 2; diff --git a/src/commands/openInPortal.ts b/src/commands/openInPortal.ts index 582ad4162..289d2beb3 100644 --- a/src/commands/openInPortal.ts +++ b/src/commands/openInPortal.ts @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ import { openInPortal as uiOpenInPortal } from '@microsoft/vscode-azext-azureutils'; -import { AzExtTreeItem, IActionContext, nonNullProp } from '@microsoft/vscode-azext-utils'; +import { nonNullProp, type AzExtTreeItem, type IActionContext } from '@microsoft/vscode-azext-utils'; export async function openDeploymentInPortal(_context: IActionContext, node: AzExtTreeItem): Promise { await uiOpenInPortal(node, `${nonNullProp(node, 'parent').parent?.id}/Deployments/${nonNullProp(node, 'id')}`); diff --git a/src/commands/pickFuncProcess.ts b/src/commands/pickFuncProcess.ts index b55dece4a..49215db26 100644 --- a/src/commands/pickFuncProcess.ts +++ b/src/commands/pickFuncProcess.ts @@ -3,19 +3,19 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { AzExtRequestPrepareOptions, sendRequestWithTimeout } from '@microsoft/vscode-azext-azureutils'; -import { IActionContext, UserCancelledError } from '@microsoft/vscode-azext-utils'; +import { sendRequestWithTimeout, type AzExtRequestPrepareOptions } from '@microsoft/vscode-azext-azureutils'; +import { UserCancelledError, type IActionContext } from '@microsoft/vscode-azext-utils'; import * as unixPsTree from 'ps-tree'; import * as vscode from 'vscode'; import { hostStartTaskName } from '../constants'; -import { IPreDebugValidateResult, preDebugValidate } from '../debug/validatePreDebug'; +import { preDebugValidate, type IPreDebugValidateResult } from '../debug/validatePreDebug'; import { ext } from '../extensionVariables'; -import { IRunningFuncTask, getFuncPortFromTaskOrProject, isFuncHostTask, runningFuncTaskMap, stopFuncTaskIfRunning } from '../funcCoreTools/funcHostTask'; +import { getFuncPortFromTaskOrProject, isFuncHostTask, runningFuncTaskMap, stopFuncTaskIfRunning, type IRunningFuncTask } from '../funcCoreTools/funcHostTask'; import { localize } from '../localize'; import { delay } from '../utils/delay'; import { requestUtils } from '../utils/requestUtils'; import { taskUtils } from '../utils/taskUtils'; -import { IProcessInfo, IWindowsProcessTree, ProcessDataFlag, getWindowsProcessTree } from '../utils/windowsProcessTree'; +import { ProcessDataFlag, getWindowsProcessTree, type IProcessInfo, type IWindowsProcessTree } from '../utils/windowsProcessTree'; import { getWorkspaceSetting } from '../vsCodeConfig/settings'; const funcTaskReadyEmitter = new vscode.EventEmitter(); diff --git a/src/commands/registerCommands.ts b/src/commands/registerCommands.ts index f73c429c4..57f400ae8 100644 --- a/src/commands/registerCommands.ts +++ b/src/commands/registerCommands.ts @@ -5,7 +5,7 @@ import { registerSiteCommand } from '@microsoft/vscode-azext-azureappservice'; import { AppSettingTreeItem, AppSettingsTreeItem } from '@microsoft/vscode-azext-azureappsettings'; -import { AzExtParentTreeItem, AzExtTreeItem, IActionContext, registerCommand, registerCommandWithTreeNodeUnwrapping, unwrapTreeNodeCommandCallback } from '@microsoft/vscode-azext-utils'; +import { registerCommand, registerCommandWithTreeNodeUnwrapping, unwrapTreeNodeCommandCallback, type AzExtParentTreeItem, type AzExtTreeItem, type IActionContext } from '@microsoft/vscode-azext-utils'; import { commands } from "vscode"; import { ext } from '../extensionVariables'; import { installOrUpdateFuncCoreTools } from '../funcCoreTools/installOrUpdateFuncCoreTools'; diff --git a/src/commands/remoteDebug/getRemoteDebugLanguage.ts b/src/commands/remoteDebug/getRemoteDebugLanguage.ts index 88df3b945..fcd8407ea 100644 --- a/src/commands/remoteDebug/getRemoteDebugLanguage.ts +++ b/src/commands/remoteDebug/getRemoteDebugLanguage.ts @@ -3,7 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { SiteConfig } from '@azure/arm-appservice'; +import { type SiteConfig } from '@azure/arm-appservice'; import { RemoteDebugLanguage } from '@microsoft/vscode-azext-azureappservice'; export function getRemoteDebugLanguage(siteConfig: SiteConfig, appServicePlan?: string): RemoteDebugLanguage { diff --git a/src/commands/remoteDebug/startRemoteDebug.ts b/src/commands/remoteDebug/startRemoteDebug.ts index 55a5ae00f..491ee9263 100644 --- a/src/commands/remoteDebug/startRemoteDebug.ts +++ b/src/commands/remoteDebug/startRemoteDebug.ts @@ -3,13 +3,13 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { SiteConfig } from '@azure/arm-appservice'; +import { type SiteConfig } from '@azure/arm-appservice'; import * as appservice from '@microsoft/vscode-azext-azureappservice'; -import { IActionContext } from '@microsoft/vscode-azext-utils'; +import { type IActionContext } from '@microsoft/vscode-azext-utils'; import * as vscode from 'vscode'; import { functionFilter } from '../../constants'; import { ext } from '../../extensionVariables'; -import { SlotTreeItem } from '../../tree/SlotTreeItem'; +import { type SlotTreeItem } from '../../tree/SlotTreeItem'; import { getRemoteDebugLanguage } from './getRemoteDebugLanguage'; export async function startRemoteDebug(context: IActionContext, node?: SlotTreeItem): Promise { diff --git a/src/commands/remoteDebugJava/DebugProxy.ts b/src/commands/remoteDebugJava/DebugProxy.ts index 1b7dee751..3e584d882 100644 --- a/src/commands/remoteDebugJava/DebugProxy.ts +++ b/src/commands/remoteDebugJava/DebugProxy.ts @@ -3,11 +3,11 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { User } from '@azure/arm-appservice'; -import { ParsedSite, pingFunctionApp } from '@microsoft/vscode-azext-azureappservice'; -import { IActionContext } from '@microsoft/vscode-azext-utils'; +import { type User } from '@azure/arm-appservice'; +import { pingFunctionApp, type ParsedSite } from '@microsoft/vscode-azext-azureappservice'; +import { type IActionContext } from '@microsoft/vscode-azext-utils'; import { EventEmitter } from 'events'; -import { Server, Socket, createServer } from 'net'; +import { createServer, type Server, type Socket } from 'net'; import * as websocket from 'websocket'; import { ext } from '../../extensionVariables'; diff --git a/src/commands/remoteDebugJava/remoteDebugJavaFunctionApp.ts b/src/commands/remoteDebugJava/remoteDebugJavaFunctionApp.ts index 0df8c38b0..eaff6f099 100644 --- a/src/commands/remoteDebugJava/remoteDebugJavaFunctionApp.ts +++ b/src/commands/remoteDebugJava/remoteDebugJavaFunctionApp.ts @@ -3,14 +3,14 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { SiteConfigResource, StringDictionary, User } from '@azure/arm-appservice'; -import { SiteClient } from '@microsoft/vscode-azext-azureappservice'; -import { DialogResponses, findFreePort, IActionContext } from '@microsoft/vscode-azext-utils'; +import { type SiteConfigResource, type StringDictionary, type User } from '@azure/arm-appservice'; +import { type SiteClient } from '@microsoft/vscode-azext-azureappservice'; +import { DialogResponses, findFreePort, type IActionContext } from '@microsoft/vscode-azext-utils'; import * as vscode from 'vscode'; import { functionFilter } from '../../constants'; import { ext } from '../../extensionVariables'; import { localize } from '../../localize'; -import { SlotTreeItem } from '../../tree/SlotTreeItem'; +import { type SlotTreeItem } from '../../tree/SlotTreeItem'; import { openUrl } from '../../utils/openUrl'; import { DebugProxy } from './DebugProxy'; diff --git a/src/commands/renameAppSetting.ts b/src/commands/renameAppSetting.ts index 9de71463b..f96884911 100644 --- a/src/commands/renameAppSetting.ts +++ b/src/commands/renameAppSetting.ts @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ import { AppSettingTreeItem } from '@microsoft/vscode-azext-azureappsettings'; -import { IActionContext } from '@microsoft/vscode-azext-utils'; +import { type IActionContext } from '@microsoft/vscode-azext-utils'; import { functionFilter } from '../constants'; import { ext } from '../extensionVariables'; diff --git a/src/commands/restartFunctionApp.ts b/src/commands/restartFunctionApp.ts index 9dcf8d1fa..7221c3851 100644 --- a/src/commands/restartFunctionApp.ts +++ b/src/commands/restartFunctionApp.ts @@ -3,8 +3,8 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { IActionContext } from '@microsoft/vscode-azext-utils'; -import { SlotTreeItem } from '../tree/SlotTreeItem'; +import { type IActionContext } from '@microsoft/vscode-azext-utils'; +import { type SlotTreeItem } from '../tree/SlotTreeItem'; import { startFunctionApp } from './startFunctionApp'; import { stopFunctionApp } from './stopFunctionApp'; diff --git a/src/commands/startFunctionApp.ts b/src/commands/startFunctionApp.ts index 58c890867..818888cc9 100644 --- a/src/commands/startFunctionApp.ts +++ b/src/commands/startFunctionApp.ts @@ -3,12 +3,12 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { SiteClient } from '@microsoft/vscode-azext-azureappservice'; -import { IActionContext } from '@microsoft/vscode-azext-utils'; +import { type SiteClient } from '@microsoft/vscode-azext-azureappservice'; +import { type IActionContext } from '@microsoft/vscode-azext-utils'; import { functionFilter } from '../constants'; import { ext } from '../extensionVariables'; import { localize } from '../localize'; -import { SlotTreeItem } from '../tree/SlotTreeItem'; +import { type SlotTreeItem } from '../tree/SlotTreeItem'; export async function startFunctionApp(context: IActionContext, node?: SlotTreeItem): Promise { if (!node) { diff --git a/src/commands/stopFunctionApp.ts b/src/commands/stopFunctionApp.ts index 57ec88652..407ab9484 100644 --- a/src/commands/stopFunctionApp.ts +++ b/src/commands/stopFunctionApp.ts @@ -3,12 +3,12 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { SiteClient } from '@microsoft/vscode-azext-azureappservice'; -import { IActionContext } from '@microsoft/vscode-azext-utils'; +import { type SiteClient } from '@microsoft/vscode-azext-azureappservice'; +import { type IActionContext } from '@microsoft/vscode-azext-utils'; import { functionFilter } from '../constants'; import { ext } from '../extensionVariables'; import { localize } from '../localize'; -import { SlotTreeItem } from '../tree/SlotTreeItem'; +import { type SlotTreeItem } from '../tree/SlotTreeItem'; export async function stopFunctionApp(context: IActionContext, node?: SlotTreeItem): Promise { if (!node) { diff --git a/src/commands/swapSlot.ts b/src/commands/swapSlot.ts index 0070b1f39..348ccf99d 100644 --- a/src/commands/swapSlot.ts +++ b/src/commands/swapSlot.ts @@ -4,11 +4,11 @@ *--------------------------------------------------------------------------------------------*/ import * as appservice from '@microsoft/vscode-azext-azureappservice'; -import { IActionContext } from '@microsoft/vscode-azext-utils'; +import { type IActionContext } from '@microsoft/vscode-azext-utils'; import { functionFilter } from '../constants'; import { ext } from '../extensionVariables'; import { ResolvedFunctionAppResource } from '../tree/ResolvedFunctionAppResource'; -import { SlotTreeItem } from '../tree/SlotTreeItem'; +import { type SlotTreeItem } from '../tree/SlotTreeItem'; export async function swapSlot(context: IActionContext, sourceSlotNode?: SlotTreeItem): Promise { if (!sourceSlotNode) { diff --git a/src/commands/updateDisabledState.ts b/src/commands/updateDisabledState.ts index e2b99d4db..a3e51517f 100644 --- a/src/commands/updateDisabledState.ts +++ b/src/commands/updateDisabledState.ts @@ -3,13 +3,13 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { IActionContext } from '@microsoft/vscode-azext-utils'; +import { type IActionContext } from '@microsoft/vscode-azext-utils'; import { window } from 'vscode'; import { FuncVersion } from '../FuncVersion'; import { functionFilter } from '../constants'; import { ext } from '../extensionVariables'; import { localize } from '../localize'; -import { FunctionTreeItemBase } from '../tree/FunctionTreeItemBase'; +import { type FunctionTreeItemBase } from '../tree/FunctionTreeItemBase'; export async function enableFunction(context: IActionContext, node?: FunctionTreeItemBase): Promise { await updateDisabledState(context, node, false); diff --git a/src/commands/viewProperties.ts b/src/commands/viewProperties.ts index d39873bbb..d2bd718d1 100644 --- a/src/commands/viewProperties.ts +++ b/src/commands/viewProperties.ts @@ -3,10 +3,10 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { IActionContext, openReadOnlyJson } from '@microsoft/vscode-azext-utils'; +import { openReadOnlyJson, type IActionContext } from '@microsoft/vscode-azext-utils'; import { Uri, window } from 'vscode'; import { localize } from '../localize'; -import { SlotTreeItem } from '../tree/SlotTreeItem'; +import { type SlotTreeItem } from '../tree/SlotTreeItem'; import { LocalFunctionTreeItem } from '../tree/localProject/LocalFunctionTreeItem'; export async function viewProperties(context: IActionContext, node: SlotTreeItem | LocalFunctionTreeItem): Promise { diff --git a/src/constants.ts b/src/constants.ts index d1af31375..07a328831 100644 --- a/src/constants.ts +++ b/src/constants.ts @@ -3,7 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { IAzureQuickPickItem } from "@microsoft/vscode-azext-utils"; +import { type IAzureQuickPickItem } from "@microsoft/vscode-azext-utils"; import { localize } from "./localize"; export const extensionId: string = 'ms-azuretools.vscode-azurefunctions'; diff --git a/src/debug/BallerinaDebugProvider.ts b/src/debug/BallerinaDebugProvider.ts index 7b151db61..561ae5f9e 100644 --- a/src/debug/BallerinaDebugProvider.ts +++ b/src/debug/BallerinaDebugProvider.ts @@ -3,7 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { DebugConfiguration, WorkspaceFolder } from 'vscode'; +import { type DebugConfiguration, type WorkspaceFolder } from 'vscode'; import { hostStartTaskName, localhost } from '../constants'; import { localize } from '../localize'; import { FuncDebugProviderBase } from './FuncDebugProviderBase'; diff --git a/src/debug/FuncDebugProviderBase.ts b/src/debug/FuncDebugProviderBase.ts index fc1a75339..0335a57d6 100644 --- a/src/debug/FuncDebugProviderBase.ts +++ b/src/debug/FuncDebugProviderBase.ts @@ -3,11 +3,11 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { callWithTelemetryAndErrorHandling, IActionContext } from '@microsoft/vscode-azext-utils'; -import { CancellationToken, DebugConfiguration, DebugConfigurationProvider, WorkspaceFolder } from 'vscode'; +import { callWithTelemetryAndErrorHandling, type IActionContext } from '@microsoft/vscode-azext-utils'; +import { type CancellationToken, type DebugConfiguration, type DebugConfigurationProvider, type WorkspaceFolder } from 'vscode'; import { isFunctionProject } from '../commands/createNewProject/verifyIsProject'; import { hostStartTaskNameRegExp } from '../constants'; -import { IPreDebugValidateResult, preDebugValidate } from './validatePreDebug'; +import { preDebugValidate, type IPreDebugValidateResult } from './validatePreDebug'; export abstract class FuncDebugProviderBase implements DebugConfigurationProvider { public abstract workerArgKey: string; diff --git a/src/debug/FuncTaskProvider.ts b/src/debug/FuncTaskProvider.ts index 7d5a53b96..8ccd21cb4 100644 --- a/src/debug/FuncTaskProvider.ts +++ b/src/debug/FuncTaskProvider.ts @@ -3,21 +3,21 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { callWithTelemetryAndErrorHandling, IActionContext } from '@microsoft/vscode-azext-utils'; +import { callWithTelemetryAndErrorHandling, type IActionContext } from '@microsoft/vscode-azext-utils'; import * as process from 'process'; -import { CancellationToken, ShellExecution, ShellExecutionOptions, Task, TaskDefinition, TaskProvider, TaskScope, workspace, WorkspaceFolder } from 'vscode'; +import { ShellExecution, Task, TaskScope, workspace, type CancellationToken, type ShellExecutionOptions, type TaskDefinition, type TaskProvider, type WorkspaceFolder } from 'vscode'; import { tryGetFunctionProjectRoot } from '../commands/createNewProject/verifyIsProject'; -import { buildNativeDeps, extInstallCommand, func, hostStartCommand, packCommand, ProjectLanguage, projectLanguageSetting } from '../constants'; +import { ProjectLanguage, buildNativeDeps, extInstallCommand, func, hostStartCommand, packCommand, projectLanguageSetting } from '../constants'; import { getFuncCliPath } from '../funcCoreTools/getFuncCliPath'; import { venvUtils } from '../utils/venvUtils'; import { getFuncWatchProblemMatcher, getWorkspaceSetting } from '../vsCodeConfig/settings'; import { getTasks } from '../vsCodeConfig/tasks'; -import { BallerinaDebugProvider } from './BallerinaDebugProvider'; -import { FuncDebugProviderBase } from './FuncDebugProviderBase'; -import { JavaDebugProvider } from './JavaDebugProvider'; -import { NodeDebugProvider } from './NodeDebugProvider'; -import { PowerShellDebugProvider } from './PowerShellDebugProvider'; -import { PythonDebugProvider } from './PythonDebugProvider'; +import { type BallerinaDebugProvider } from './BallerinaDebugProvider'; +import { type FuncDebugProviderBase } from './FuncDebugProviderBase'; +import { type JavaDebugProvider } from './JavaDebugProvider'; +import { type NodeDebugProvider } from './NodeDebugProvider'; +import { type PowerShellDebugProvider } from './PowerShellDebugProvider'; +import { type PythonDebugProvider } from './PythonDebugProvider'; export class FuncTaskProvider implements TaskProvider { private readonly _nodeDebugProvider: NodeDebugProvider; diff --git a/src/debug/JavaDebugProvider.ts b/src/debug/JavaDebugProvider.ts index ee99af613..b29ca9eac 100644 --- a/src/debug/JavaDebugProvider.ts +++ b/src/debug/JavaDebugProvider.ts @@ -3,7 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { DebugConfiguration, WorkspaceFolder } from 'vscode'; +import { type DebugConfiguration, type WorkspaceFolder } from 'vscode'; import { hostStartTaskName, localhost } from '../constants'; import { localize } from '../localize'; import { FuncDebugProviderBase } from './FuncDebugProviderBase'; diff --git a/src/debug/NodeDebugProvider.ts b/src/debug/NodeDebugProvider.ts index d58ec4889..ab78bfeb9 100644 --- a/src/debug/NodeDebugProvider.ts +++ b/src/debug/NodeDebugProvider.ts @@ -3,7 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { DebugConfiguration, WorkspaceFolder } from 'vscode'; +import { type DebugConfiguration, type WorkspaceFolder } from 'vscode'; import { hostStartTaskName } from '../constants'; import { localize } from '../localize'; import { FuncDebugProviderBase } from './FuncDebugProviderBase'; diff --git a/src/debug/PowerShellDebugProvider.ts b/src/debug/PowerShellDebugProvider.ts index 622086b24..a12d88575 100644 --- a/src/debug/PowerShellDebugProvider.ts +++ b/src/debug/PowerShellDebugProvider.ts @@ -3,7 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { DebugConfiguration, WorkspaceFolder } from 'vscode'; +import { type DebugConfiguration, type WorkspaceFolder } from 'vscode'; import { hostStartTaskName } from '../constants'; import { localize } from '../localize'; import { FuncDebugProviderBase } from './FuncDebugProviderBase'; diff --git a/src/debug/PythonDebugProvider.ts b/src/debug/PythonDebugProvider.ts index 5cc451f68..35d1fe367 100644 --- a/src/debug/PythonDebugProvider.ts +++ b/src/debug/PythonDebugProvider.ts @@ -3,7 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { DebugConfiguration, Extension, extensions, WorkspaceFolder } from 'vscode'; +import { extensions, type DebugConfiguration, type Extension, type WorkspaceFolder } from 'vscode'; import { hostStartTaskName, localhost } from '../constants'; import { localize } from '../localize'; import { FuncDebugProviderBase } from './FuncDebugProviderBase'; diff --git a/src/debug/validatePreDebug.ts b/src/debug/validatePreDebug.ts index 2561bdfec..c139d6663 100644 --- a/src/debug/validatePreDebug.ts +++ b/src/debug/validatePreDebug.ts @@ -4,18 +4,18 @@ *--------------------------------------------------------------------------------------------*/ import { BlobServiceClient } from '@azure/storage-blob'; -import { AzExtFsExtra, IActionContext, parseError } from "@microsoft/vscode-azext-utils"; +import { AzExtFsExtra, parseError, type IActionContext } from "@microsoft/vscode-azext-utils"; import * as path from 'path'; import * as semver from 'semver'; import * as vscode from 'vscode'; +import { type ISetConnectionSettingContext } from '../commands/appSettings/connectionSettings/ISetConnectionSettingContext'; import { validateStorageConnection } from '../commands/appSettings/connectionSettings/azureWebJobsStorage/validateStorageConnection'; import { validateEventHubsConnection } from '../commands/appSettings/connectionSettings/eventHubs/validateEventHubsConnection'; -import { ISetConnectionSettingContext } from '../commands/appSettings/connectionSettings/ISetConnectionSettingContext'; import { validateSqlDbConnection } from '../commands/appSettings/connectionSettings/sqlDatabase/validateSqlDbConnection'; import { tryGetFunctionProjectRoot } from '../commands/createNewProject/verifyIsProject'; -import { CodeAction, ConnectionKey, DurableBackend, DurableBackendValues, functionJsonFileName, localSettingsFileName, localStorageEmulatorConnectionString, ProjectLanguage, projectLanguageModelSetting, projectLanguageSetting, workerRuntimeKey } from "../constants"; +import { CodeAction, ConnectionKey, DurableBackend, ProjectLanguage, functionJsonFileName, localSettingsFileName, localStorageEmulatorConnectionString, projectLanguageModelSetting, projectLanguageSetting, workerRuntimeKey, type DurableBackendValues } from "../constants"; import { ParsedFunctionJson } from "../funcConfig/function"; -import { getLocalSettingsConnectionString, MismatchBehavior, setLocalAppSetting } from "../funcConfig/local.settings"; +import { MismatchBehavior, getLocalSettingsConnectionString, setLocalAppSetting } from "../funcConfig/local.settings"; import { getLocalFuncCoreToolsVersion } from '../funcCoreTools/getLocalFuncCoreToolsVersion'; import { validateFuncCoreToolsInstalled } from '../funcCoreTools/validateFuncCoreToolsInstalled'; import { localize } from '../localize'; diff --git a/src/downloadAzureProject/handleUri.ts b/src/downloadAzureProject/handleUri.ts index 43486c947..fd75b348f 100644 --- a/src/downloadAzureProject/handleUri.ts +++ b/src/downloadAzureProject/handleUri.ts @@ -3,7 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { callWithTelemetryAndErrorHandling, IActionContext } from '@microsoft/vscode-azext-utils'; +import { callWithTelemetryAndErrorHandling, type IActionContext } from '@microsoft/vscode-azext-utils'; import * as querystring from 'querystring'; import * as vscode from 'vscode'; import { ext } from '../extensionVariables'; diff --git a/src/downloadAzureProject/setupProjectFolder.ts b/src/downloadAzureProject/setupProjectFolder.ts index 7a9ccb929..835dd86ce 100644 --- a/src/downloadAzureProject/setupProjectFolder.ts +++ b/src/downloadAzureProject/setupProjectFolder.ts @@ -3,10 +3,10 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { HostKeys } from '@azure/arm-appservice'; +import { type HostKeys } from '@azure/arm-appservice'; import { createHttpHeaders } from '@azure/core-rest-pipeline'; -import { AzExtRequestPrepareOptions, parseAzureResourceId } from '@microsoft/vscode-azext-azureutils'; -import { AzExtFsExtra, IActionContext, parseError } from '@microsoft/vscode-azext-utils'; +import { parseAzureResourceId, type AzExtRequestPrepareOptions } from '@microsoft/vscode-azext-azureutils'; +import { AzExtFsExtra, parseError, type IActionContext } from '@microsoft/vscode-azext-utils'; import * as extract from 'extract-zip'; import * as querystring from 'querystring'; import * as vscode from 'vscode'; @@ -14,7 +14,7 @@ import { initProjectForVSCode } from '../commands/initProjectForVSCode/initProje import { ProjectLanguage } from '../constants'; import { ext } from '../extensionVariables'; import { localize } from '../localize'; -import { SlotTreeItem } from "../tree/SlotTreeItem"; +import { type SlotTreeItem } from "../tree/SlotTreeItem"; import { requestUtils } from '../utils/requestUtils'; import { getRequiredQueryParameter } from './handleUri'; diff --git a/src/extension.ts b/src/extension.ts index 5919a3982..a40c489a1 100644 --- a/src/extension.ts +++ b/src/extension.ts @@ -6,9 +6,9 @@ 'use strict'; import { registerAppServiceExtensionVariables } from '@microsoft/vscode-azext-azureappservice'; -import { AzureAccountTreeItemBase, registerAzureUtilsExtensionVariables } from '@microsoft/vscode-azext-azureutils'; +import { registerAzureUtilsExtensionVariables, type AzureAccountTreeItemBase } from '@microsoft/vscode-azext-azureutils'; import { registerServiceConnectorExtensionVariables } from '@microsoft/vscode-azext-serviceconnector'; -import { IActionContext, apiUtils, callWithTelemetryAndErrorHandling, createApiProvider, createAzExtOutputChannel, createExperimentationService, registerErrorHandler, registerEvent, registerReportIssueCommand, registerUIExtensionVariables } from '@microsoft/vscode-azext-utils'; +import { callWithTelemetryAndErrorHandling, createApiProvider, createAzExtOutputChannel, createExperimentationService, registerErrorHandler, registerEvent, registerReportIssueCommand, registerUIExtensionVariables, type IActionContext, type apiUtils } from '@microsoft/vscode-azext-utils'; import { AzExtResourceType } from '@microsoft/vscode-azureresources-api'; import * as vscode from 'vscode'; import { FunctionAppResolver } from './FunctionAppResolver'; @@ -34,7 +34,7 @@ import { getResourceGroupsApi } from './getExtensionApi'; import { CentralTemplateProvider } from './templates/CentralTemplateProvider'; import { registerContentProvider } from './utils/textUtils'; import { verifyVSCodeConfigOnActivate } from './vsCodeConfig/verifyVSCodeConfigOnActivate'; -import { AzureFunctionsExtensionApi } from './vscode-azurefunctions.api'; +import { type AzureFunctionsExtensionApi } from './vscode-azurefunctions.api'; import { listLocalFunctions } from './workspace/listLocalFunctions'; import { listLocalProjects } from './workspace/listLocalProjects'; diff --git a/src/extensionVariables.ts b/src/extensionVariables.ts index 1e2a128d8..921574454 100644 --- a/src/extensionVariables.ts +++ b/src/extensionVariables.ts @@ -3,12 +3,12 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { IActionContext, IAzExtOutputChannel, IExperimentationServiceAdapter } from "@microsoft/vscode-azext-utils"; -import { AzureHostExtensionApi } from "@microsoft/vscode-azext-utils/hostapi"; -import { ExtensionContext } from "vscode"; +import { type IActionContext, type IAzExtOutputChannel, type IExperimentationServiceAdapter } from "@microsoft/vscode-azext-utils"; +import { type AzureHostExtensionApi } from "@microsoft/vscode-azext-utils/hostapi"; +import { type ExtensionContext } from "vscode"; import { func } from "./constants"; -import { CentralTemplateProvider } from "./templates/CentralTemplateProvider"; -import { AzureAccountTreeItemWithProjects } from "./tree/AzureAccountTreeItemWithProjects"; +import { type CentralTemplateProvider } from "./templates/CentralTemplateProvider"; +import { type AzureAccountTreeItemWithProjects } from "./tree/AzureAccountTreeItemWithProjects"; /** * Used for extensionVariables that can also be set per-action diff --git a/src/funcConfig/host.ts b/src/funcConfig/host.ts index 4dd33cd59..980b65ea2 100644 --- a/src/funcConfig/host.ts +++ b/src/funcConfig/host.ts @@ -3,7 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { DurableBackend } from "../constants"; +import { type DurableBackend } from "../constants"; import { FuncVersion } from "../FuncVersion"; export interface IHostJsonV2 { diff --git a/src/funcConfig/local.settings.ts b/src/funcConfig/local.settings.ts index f1ed2a05f..83b77b943 100644 --- a/src/funcConfig/local.settings.ts +++ b/src/funcConfig/local.settings.ts @@ -3,10 +3,10 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { AzExtFsExtra, DialogResponses, IActionContext, parseError } from '@microsoft/vscode-azext-utils'; +import { AzExtFsExtra, DialogResponses, parseError, type IActionContext } from '@microsoft/vscode-azext-utils'; import * as path from 'path'; -import * as vscode from 'vscode'; -import { ConnectionKeyValues, localSettingsFileName } from '../constants'; +import type * as vscode from 'vscode'; +import { localSettingsFileName, type ConnectionKeyValues } from '../constants'; import { localize } from '../localize'; import { parseJson } from '../utils/parseJson'; diff --git a/src/funcCoreTools/funcHostTask.ts b/src/funcCoreTools/funcHostTask.ts index 0e166b450..99fc3b44c 100644 --- a/src/funcCoreTools/funcHostTask.ts +++ b/src/funcCoreTools/funcHostTask.ts @@ -3,7 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { IActionContext, registerEvent } from '@microsoft/vscode-azext-utils'; +import { registerEvent, type IActionContext } from '@microsoft/vscode-azext-utils'; import * as path from 'path'; import * as vscode from 'vscode'; import { tryGetFunctionProjectRoot } from '../commands/createNewProject/verifyIsProject'; diff --git a/src/funcCoreTools/getFuncCliPath.ts b/src/funcCoreTools/getFuncCliPath.ts index f50895f8b..bb29ace10 100644 --- a/src/funcCoreTools/getFuncCliPath.ts +++ b/src/funcCoreTools/getFuncCliPath.ts @@ -3,8 +3,8 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { IActionContext } from "@microsoft/vscode-azext-utils"; -import { WorkspaceFolder } from "vscode"; +import { type IActionContext } from "@microsoft/vscode-azext-utils"; +import { type WorkspaceFolder } from "vscode"; import { ext } from "../extensionVariables"; import { localize } from "../localize"; import { getWorkspaceSetting } from "../vsCodeConfig/settings"; diff --git a/src/funcCoreTools/getLocalFuncCoreToolsVersion.ts b/src/funcCoreTools/getLocalFuncCoreToolsVersion.ts index 4209438ec..53e1ac69f 100644 --- a/src/funcCoreTools/getLocalFuncCoreToolsVersion.ts +++ b/src/funcCoreTools/getLocalFuncCoreToolsVersion.ts @@ -3,7 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { IActionContext } from '@microsoft/vscode-azext-utils'; +import { type IActionContext } from '@microsoft/vscode-azext-utils'; import * as semver from 'semver'; import { cpUtils } from '../utils/cpUtils'; import { getFuncCliPath } from './getFuncCliPath'; diff --git a/src/funcCoreTools/getNpmDistTag.ts b/src/funcCoreTools/getNpmDistTag.ts index 596b93719..bb123c1e2 100644 --- a/src/funcCoreTools/getNpmDistTag.ts +++ b/src/funcCoreTools/getNpmDistTag.ts @@ -3,9 +3,9 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { IActionContext } from '@microsoft/vscode-azext-utils'; +import { type IActionContext } from '@microsoft/vscode-azext-utils'; import * as semver from 'semver'; -import { FuncVersion, getMajorVersion } from '../FuncVersion'; +import { getMajorVersion, type FuncVersion } from '../FuncVersion'; import { localize } from '../localize'; import { requestUtils } from '../utils/requestUtils'; diff --git a/src/funcCoreTools/hasMinFuncCliVersion.ts b/src/funcCoreTools/hasMinFuncCliVersion.ts index cb24e462a..7aed89b84 100644 --- a/src/funcCoreTools/hasMinFuncCliVersion.ts +++ b/src/funcCoreTools/hasMinFuncCliVersion.ts @@ -4,9 +4,9 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { IActionContext } from '@microsoft/vscode-azext-utils'; +import { type IActionContext } from '@microsoft/vscode-azext-utils'; import * as semver from 'semver'; -import { FuncVersion, getMajorVersion } from "../FuncVersion"; +import { getMajorVersion, type FuncVersion } from "../FuncVersion"; import { getLocalFuncCoreToolsVersion } from './getLocalFuncCoreToolsVersion'; export async function hasMinFuncCliVersion(context: IActionContext, minVersion: string, projectVersion: FuncVersion): Promise { diff --git a/src/funcCoreTools/installFuncCoreTools.ts b/src/funcCoreTools/installFuncCoreTools.ts index 1b026f6f4..111669bd8 100644 --- a/src/funcCoreTools/installFuncCoreTools.ts +++ b/src/funcCoreTools/installFuncCoreTools.ts @@ -3,14 +3,14 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { IActionContext } from '@microsoft/vscode-azext-utils'; +import { type IActionContext } from '@microsoft/vscode-azext-utils'; import { funcPackageName, PackageManager } from '../constants'; import { ext } from '../extensionVariables'; -import { FuncVersion, promptForFuncVersion } from '../FuncVersion'; +import { promptForFuncVersion, type FuncVersion } from '../FuncVersion'; import { localize } from '../localize'; import { cpUtils } from '../utils/cpUtils'; import { getBrewPackageName } from './getBrewPackageName'; -import { getNpmDistTag, INpmDistTag } from './getNpmDistTag'; +import { getNpmDistTag, type INpmDistTag } from './getNpmDistTag'; export let lastCoreToolsInstallCommand: string[] = []; diff --git a/src/funcCoreTools/installOrUpdateFuncCoreTools.ts b/src/funcCoreTools/installOrUpdateFuncCoreTools.ts index 7e4d174b5..aebf20ca3 100644 --- a/src/funcCoreTools/installOrUpdateFuncCoreTools.ts +++ b/src/funcCoreTools/installOrUpdateFuncCoreTools.ts @@ -3,9 +3,9 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { IActionContext, IAzureQuickPickItem } from '@microsoft/vscode-azext-utils'; -import { PackageManager } from '../constants'; -import { FuncVersion, promptForFuncVersion } from '../FuncVersion'; +import { type IActionContext, type IAzureQuickPickItem } from '@microsoft/vscode-azext-utils'; +import { promptForFuncVersion, type FuncVersion } from '../FuncVersion'; +import { type PackageManager } from '../constants'; import { localize } from '../localize'; import { validateNoFuncCliSetting } from './getFuncCliPath'; import { getFuncPackageManagers } from './getFuncPackageManagers'; diff --git a/src/funcCoreTools/tryGetLocalFuncVersion.ts b/src/funcCoreTools/tryGetLocalFuncVersion.ts index 91b814d96..f68170682 100644 --- a/src/funcCoreTools/tryGetLocalFuncVersion.ts +++ b/src/funcCoreTools/tryGetLocalFuncVersion.ts @@ -3,8 +3,8 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { IActionContext } from '@microsoft/vscode-azext-utils'; -import { FuncVersion, tryParseFuncVersion } from '../FuncVersion'; +import { type IActionContext } from '@microsoft/vscode-azext-utils'; +import { tryParseFuncVersion, type FuncVersion } from '../FuncVersion'; import { getLocalFuncCoreToolsVersion } from './getLocalFuncCoreToolsVersion'; export async function tryGetLocalFuncVersion(context: IActionContext, workspacePath: string | undefined): Promise { diff --git a/src/funcCoreTools/uninstallFuncCoreTools.ts b/src/funcCoreTools/uninstallFuncCoreTools.ts index a79ece245..d1aed0127 100644 --- a/src/funcCoreTools/uninstallFuncCoreTools.ts +++ b/src/funcCoreTools/uninstallFuncCoreTools.ts @@ -3,10 +3,10 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { IActionContext, IAzureQuickPickItem } from '@microsoft/vscode-azext-utils'; -import { funcPackageName, PackageManager } from '../constants'; +import { type IActionContext, type IAzureQuickPickItem } from '@microsoft/vscode-azext-utils'; +import { type FuncVersion } from '../FuncVersion'; +import { PackageManager, funcPackageName } from '../constants'; import { ext } from '../extensionVariables'; -import { FuncVersion } from '../FuncVersion'; import { localize } from '../localize'; import { cpUtils } from '../utils/cpUtils'; import { nonNullValue } from '../utils/nonNull'; diff --git a/src/funcCoreTools/updateFuncCoreTools.ts b/src/funcCoreTools/updateFuncCoreTools.ts index 2dcfa6198..47969f605 100644 --- a/src/funcCoreTools/updateFuncCoreTools.ts +++ b/src/funcCoreTools/updateFuncCoreTools.ts @@ -3,15 +3,15 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { IActionContext } from '@microsoft/vscode-azext-utils'; +import { type IActionContext } from '@microsoft/vscode-azext-utils'; import { funcPackageName, PackageManager } from '../constants'; import { ext } from '../extensionVariables'; -import { FuncVersion } from '../FuncVersion'; +import { type FuncVersion } from '../FuncVersion'; import { localize } from '../localize'; import { cpUtils } from '../utils/cpUtils'; import { nonNullValue } from '../utils/nonNull'; import { getBrewPackageName, tryGetInstalledBrewPackageName } from './getBrewPackageName'; -import { getNpmDistTag, INpmDistTag } from './getNpmDistTag'; +import { getNpmDistTag, type INpmDistTag } from './getNpmDistTag'; export async function updateFuncCoreTools(context: IActionContext, packageManager: PackageManager, version: FuncVersion): Promise { ext.outputChannel.show(); diff --git a/src/funcCoreTools/validateFuncCoreToolsInstalled.ts b/src/funcCoreTools/validateFuncCoreToolsInstalled.ts index 49ea0038f..b1f73a6a6 100644 --- a/src/funcCoreTools/validateFuncCoreToolsInstalled.ts +++ b/src/funcCoreTools/validateFuncCoreToolsInstalled.ts @@ -3,17 +3,17 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { callWithTelemetryAndErrorHandling, DialogResponses, IActionContext } from '@microsoft/vscode-azext-utils'; +import { callWithTelemetryAndErrorHandling, DialogResponses, type IActionContext } from '@microsoft/vscode-azext-utils'; import * as os from "os"; -import { env, MessageItem } from 'vscode'; -import { funcVersionSetting, PackageManager } from '../constants'; +import { env, type MessageItem } from 'vscode'; +import { funcVersionSetting, type PackageManager } from '../constants'; import { ext } from '../extensionVariables'; -import { FuncVersion, tryParseFuncVersion } from '../FuncVersion'; +import { tryParseFuncVersion, type FuncVersion } from '../FuncVersion'; import { localize } from '../localize'; import { cpUtils } from '../utils/cpUtils'; import { openUrl } from '../utils/openUrl'; import { getWorkspaceSetting } from '../vsCodeConfig/settings'; -import { generateLinuxErrorMessages, ILinuxErrorMessages } from './generateLinuxErrorMessages'; +import { generateLinuxErrorMessages, type ILinuxErrorMessages } from './generateLinuxErrorMessages'; import { getFuncCliPath, hasFuncCliSetting } from './getFuncCliPath'; import { getFuncPackageManagers } from './getFuncPackageManagers'; import { installFuncCoreTools, lastCoreToolsInstallCommand } from './installFuncCoreTools'; diff --git a/src/funcCoreTools/validateFuncCoreToolsIsLatest.ts b/src/funcCoreTools/validateFuncCoreToolsIsLatest.ts index b76c9a0e3..dfff2ebcd 100644 --- a/src/funcCoreTools/validateFuncCoreToolsIsLatest.ts +++ b/src/funcCoreTools/validateFuncCoreToolsIsLatest.ts @@ -3,11 +3,11 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { callWithTelemetryAndErrorHandling, DialogResponses, IActionContext, parseError } from '@microsoft/vscode-azext-utils'; +import { callWithTelemetryAndErrorHandling, DialogResponses, parseError, type IActionContext } from '@microsoft/vscode-azext-utils'; import * as semver from 'semver'; -import * as vscode from 'vscode'; +import type * as vscode from 'vscode'; import { PackageManager } from '../constants'; -import { FuncVersion, tryParseFuncVersion } from '../FuncVersion'; +import { tryParseFuncVersion, type FuncVersion } from '../FuncVersion'; import { localize } from '../localize'; import { nonNullProp } from '../utils/nonNull'; import { openUrl } from '../utils/openUrl'; diff --git a/src/getExtensionApi.ts b/src/getExtensionApi.ts index dde9916dc..b5710881b 100644 --- a/src/getExtensionApi.ts +++ b/src/getExtensionApi.ts @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ import { apiUtils } from "@microsoft/vscode-azext-utils"; -import { AzureHostExtensionApi } from "@microsoft/vscode-azext-utils/hostapi"; +import { type AzureHostExtensionApi } from "@microsoft/vscode-azext-utils/hostapi"; import { localize } from "./localize"; export async function getResourceGroupsApi(): Promise { diff --git a/src/serviceConnector/createServiceConnector.ts b/src/serviceConnector/createServiceConnector.ts index c07f293c6..fb08bc9e3 100644 --- a/src/serviceConnector/createServiceConnector.ts +++ b/src/serviceConnector/createServiceConnector.ts @@ -4,9 +4,9 @@ *--------------------------------------------------------------------------------------------*/ import { ServiceConnectorGroupTreeItem, createLinker } from "@microsoft/vscode-azext-serviceconnector"; -import { IActionContext } from "@microsoft/vscode-azext-utils"; +import { type IActionContext } from "@microsoft/vscode-azext-utils"; import { localize } from "../localize"; -import { SlotTreeItem } from "../tree/SlotTreeItem"; +import { type SlotTreeItem } from "../tree/SlotTreeItem"; import { createActivityContext } from "../utils/activityUtils"; import { pickFunctionApp } from "../utils/pickFunctionApp"; diff --git a/src/serviceConnector/deleteServiceConnector.ts b/src/serviceConnector/deleteServiceConnector.ts index f5bd29b1e..3adcc7c0c 100644 --- a/src/serviceConnector/deleteServiceConnector.ts +++ b/src/serviceConnector/deleteServiceConnector.ts @@ -4,9 +4,9 @@ *--------------------------------------------------------------------------------------------*/ import { ServiceConnectorTreeItem, deleteLinker } from "@microsoft/vscode-azext-serviceconnector"; -import { IActionContext } from "@microsoft/vscode-azext-utils"; +import { type IActionContext } from "@microsoft/vscode-azext-utils"; import { localize } from "../localize"; -import { SlotTreeItem } from "../tree/SlotTreeItem"; +import { type SlotTreeItem } from "../tree/SlotTreeItem"; import { createActivityContext } from "../utils/activityUtils"; import { pickFunctionApp } from "../utils/pickFunctionApp"; diff --git a/src/serviceConnector/validateServiceConnector.ts b/src/serviceConnector/validateServiceConnector.ts index ffa086927..685c4f48d 100644 --- a/src/serviceConnector/validateServiceConnector.ts +++ b/src/serviceConnector/validateServiceConnector.ts @@ -4,9 +4,9 @@ *--------------------------------------------------------------------------------------------*/ import { ServiceConnectorTreeItem, validateLinker } from "@microsoft/vscode-azext-serviceconnector"; -import { IActionContext } from "@microsoft/vscode-azext-utils"; +import { type IActionContext } from "@microsoft/vscode-azext-utils"; import { localize } from "../localize"; -import { SlotTreeItem } from "../tree/SlotTreeItem"; +import { type SlotTreeItem } from "../tree/SlotTreeItem"; import { createActivityContext } from "../utils/activityUtils"; import { pickFunctionApp } from "../utils/pickFunctionApp"; diff --git a/src/templates/CentralTemplateProvider.ts b/src/templates/CentralTemplateProvider.ts index 1e410b47b..7850e27ed 100644 --- a/src/templates/CentralTemplateProvider.ts +++ b/src/templates/CentralTemplateProvider.ts @@ -3,8 +3,8 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { IActionContext, parseError } from '@microsoft/vscode-azext-utils'; -import { ConfigurationChangeEvent, Disposable, workspace } from 'vscode'; +import { parseError, type IActionContext } from '@microsoft/vscode-azext-utils'; +import { Disposable, workspace, type ConfigurationChangeEvent } from 'vscode'; import { FuncVersion } from '../FuncVersion'; import { ProjectLanguage, TemplateFilter, projectTemplateKeySetting } from '../constants'; import { TemplateSource, ext } from '../extensionVariables'; @@ -14,10 +14,10 @@ import { nonNullValue } from '../utils/nonNull'; import { isNodeV4Plus, isPythonV2Plus } from '../utils/programmingModelUtils'; import { requestUtils } from '../utils/requestUtils'; import { getWorkspaceSetting } from '../vsCodeConfig/settings'; -import { IBindingTemplate } from './IBindingTemplate'; -import { FunctionTemplateBase, IFunctionTemplate, TemplateCategory } from './IFunctionTemplate'; -import { ITemplates } from './ITemplates'; -import { TemplateProviderBase } from './TemplateProviderBase'; +import { type IBindingTemplate } from './IBindingTemplate'; +import { TemplateCategory, type FunctionTemplateBase, type IFunctionTemplate } from './IFunctionTemplate'; +import { type ITemplates } from './ITemplates'; +import { type TemplateProviderBase } from './TemplateProviderBase'; import { BallerinaTemplateProvider } from './ballerina/BallerinaTemplateProvider'; import { getBallerinaVerifiedTemplateIds } from './ballerina/getBallerinaVerifiedTemplateIds'; import { DotnetTemplateProvider } from './dotnet/DotnetTemplateProvider'; @@ -29,7 +29,7 @@ import { PysteinTemplateProvider } from './script/PysteinTemplateProvider'; import { ScriptBundleTemplateProvider } from './script/ScriptBundleTemplateProvider'; import { ScriptTemplateProvider } from './script/ScriptTemplateProvider'; import { getScriptVerifiedTemplateIds } from './script/getScriptVerifiedTemplateIds'; -import { IScriptFunctionTemplate } from './script/parseScriptTemplates'; +import { type IScriptFunctionTemplate } from './script/parseScriptTemplates'; type CachedProviders = { providers: TemplateProviderBase[]; templatesTask?: Promise } diff --git a/src/templates/IBindingTemplate.ts b/src/templates/IBindingTemplate.ts index 97bcdbfd8..7cbd4ca48 100644 --- a/src/templates/IBindingTemplate.ts +++ b/src/templates/IBindingTemplate.ts @@ -3,7 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { BindingSettingValue } from "../funcConfig/function"; +import { type BindingSettingValue } from "../funcConfig/function"; /** * Describes a template used for creating a binding diff --git a/src/templates/IFunctionTemplate.ts b/src/templates/IFunctionTemplate.ts index 2d9f8d13a..735e8c727 100644 --- a/src/templates/IFunctionTemplate.ts +++ b/src/templates/IFunctionTemplate.ts @@ -3,10 +3,10 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { ProjectLanguage } from '../constants'; -import { IBindingSetting } from './IBindingTemplate'; -import { TemplateSchemaVersion } from './TemplateProviderBase'; -import { ParsedJob, RawTemplateV2 } from './script/parseScriptTemplatesV2'; +import { type ProjectLanguage } from '../constants'; +import { type IBindingSetting } from './IBindingTemplate'; +import { type TemplateSchemaVersion } from './TemplateProviderBase'; +import { type ParsedJob, type RawTemplateV2 } from './script/parseScriptTemplatesV2'; export enum TemplateCategory { Core = '$temp_category_core' diff --git a/src/templates/ITemplates.ts b/src/templates/ITemplates.ts index 9be508b1b..c17623199 100644 --- a/src/templates/ITemplates.ts +++ b/src/templates/ITemplates.ts @@ -3,8 +3,8 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { IBindingTemplate } from "./IBindingTemplate"; -import { FunctionTemplateBase } from "./IFunctionTemplate"; +import { type IBindingTemplate } from "./IBindingTemplate"; +import { type FunctionTemplateBase } from "./IFunctionTemplate"; export interface ITemplates { functionTemplates: FunctionTemplateBase[]; diff --git a/src/templates/TemplateProviderBase.ts b/src/templates/TemplateProviderBase.ts index 4ed50b59c..b9c9b206d 100644 --- a/src/templates/TemplateProviderBase.ts +++ b/src/templates/TemplateProviderBase.ts @@ -3,16 +3,16 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { AzExtFsExtra, IActionContext } from '@microsoft/vscode-azext-utils'; +import { AzExtFsExtra, type IActionContext } from '@microsoft/vscode-azext-utils'; import * as path from 'path'; import { Disposable, env } from 'vscode'; import { FuncVersion } from '../FuncVersion'; -import { ProjectLanguage } from '../constants'; +import { type ProjectLanguage } from '../constants'; import { NotImplementedError } from '../errors'; import { ext } from '../extensionVariables'; -import { IBindingTemplate } from './IBindingTemplate'; -import { FunctionTemplateBase } from './IFunctionTemplate'; -import { ITemplates } from './ITemplates'; +import { type IBindingTemplate } from './IBindingTemplate'; +import { type FunctionTemplateBase } from './IFunctionTemplate'; +import { type ITemplates } from './ITemplates'; export enum TemplateType { Script = 'Script', diff --git a/src/templates/ballerina/BallerinaTemplateProvider.ts b/src/templates/ballerina/BallerinaTemplateProvider.ts index 3f4349464..c0261c305 100644 --- a/src/templates/ballerina/BallerinaTemplateProvider.ts +++ b/src/templates/ballerina/BallerinaTemplateProvider.ts @@ -3,11 +3,11 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { AzExtFsExtra, IActionContext } from '@microsoft/vscode-azext-utils'; +import { AzExtFsExtra, type IActionContext } from '@microsoft/vscode-azext-utils'; import * as path from 'path'; -import { IBindingTemplate } from '../IBindingTemplate'; -import { IFunctionTemplate } from '../IFunctionTemplate'; -import { ITemplates } from '../ITemplates'; +import { type IBindingTemplate } from '../IBindingTemplate'; +import { type IFunctionTemplate } from '../IFunctionTemplate'; +import { type ITemplates } from '../ITemplates'; import { TemplateProviderBase, TemplateSchemaVersion, TemplateType } from '../TemplateProviderBase'; import { getScriptResourcesLanguage } from '../script/getScriptResourcesLanguage'; import { parseScriptTemplates } from '../script/parseScriptTemplates'; diff --git a/src/templates/dotnet/DotnetTemplateProvider.ts b/src/templates/dotnet/DotnetTemplateProvider.ts index 8cce297b4..57c624bec 100644 --- a/src/templates/dotnet/DotnetTemplateProvider.ts +++ b/src/templates/dotnet/DotnetTemplateProvider.ts @@ -3,7 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { AzExtFsExtra, IActionContext } from '@microsoft/vscode-azext-utils'; +import { AzExtFsExtra, type IActionContext } from '@microsoft/vscode-azext-utils'; import * as path from 'path'; import { RelativePattern, workspace } from 'vscode'; import { FuncVersion, getMajorVersion } from '../../FuncVersion'; @@ -15,9 +15,9 @@ import { dotnetUtils } from '../../utils/dotnetUtils'; import { nonNullValue } from '../../utils/nonNull'; import { parseJson } from '../../utils/parseJson'; import { requestUtils } from '../../utils/requestUtils'; -import { IBindingTemplate } from '../IBindingTemplate'; -import { IFunctionTemplate } from '../IFunctionTemplate'; -import { ITemplates } from '../ITemplates'; +import { type IBindingTemplate } from '../IBindingTemplate'; +import { type IFunctionTemplate } from '../IFunctionTemplate'; +import { type ITemplates } from '../ITemplates'; import { TemplateProviderBase, TemplateSchemaVersion, TemplateType } from '../TemplateProviderBase'; import { executeDotnetTemplateCommand, getDotnetItemTemplatePath, getDotnetProjectTemplatePath, getDotnetTemplateDir, validateDotnetInstalled } from './executeDotnetTemplateCommand'; import { parseDotnetTemplates } from './parseDotnetTemplates'; diff --git a/src/templates/dotnet/executeDotnetTemplateCommand.ts b/src/templates/dotnet/executeDotnetTemplateCommand.ts index 8c85385f7..7de9bbf09 100644 --- a/src/templates/dotnet/executeDotnetTemplateCommand.ts +++ b/src/templates/dotnet/executeDotnetTemplateCommand.ts @@ -3,10 +3,10 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { IActionContext } from '@microsoft/vscode-azext-utils'; +import { type IActionContext } from '@microsoft/vscode-azext-utils'; import * as path from 'path'; -import { SemVer, coerce as semVerCoerce } from 'semver'; -import { FuncVersion } from '../../FuncVersion'; +import { coerce as semVerCoerce, type SemVer } from 'semver'; +import { type FuncVersion } from '../../FuncVersion'; import { ext } from "../../extensionVariables"; import { localize } from '../../localize'; import { cpUtils } from "../../utils/cpUtils"; diff --git a/src/templates/dotnet/parseDotnetTemplates.ts b/src/templates/dotnet/parseDotnetTemplates.ts index 1470d5f84..29579fc3c 100644 --- a/src/templates/dotnet/parseDotnetTemplates.ts +++ b/src/templates/dotnet/parseDotnetTemplates.ts @@ -3,15 +3,15 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { callWithTelemetryAndErrorHandling, IActionContext } from '@microsoft/vscode-azext-utils'; +import { callWithTelemetryAndErrorHandling, type IActionContext } from '@microsoft/vscode-azext-utils'; import { ProjectLanguage, sqlBindingTemplateRegex, TemplateFilter } from '../../constants'; import { ext } from '../../extensionVariables'; -import { FuncVersion } from '../../FuncVersion'; +import { type FuncVersion } from '../../FuncVersion'; import { localize } from '../../localize'; import { assertTemplateIsV1 } from '../../utils/templateVersionUtils'; -import { IBindingSetting, ValueType } from '../IBindingTemplate'; -import { FunctionTemplateBase, IFunctionTemplate, TemplateCategory } from '../IFunctionTemplate'; -import { ITemplates } from '../ITemplates'; +import { ValueType, type IBindingSetting } from '../IBindingTemplate'; +import { TemplateCategory, type FunctionTemplateBase, type IFunctionTemplate } from '../IFunctionTemplate'; +import { type ITemplates } from '../ITemplates'; import { TemplateSchemaVersion } from '../TemplateProviderBase'; /** diff --git a/src/templates/java/JavaTemplateProvider.ts b/src/templates/java/JavaTemplateProvider.ts index 328385272..bbccdcfac 100644 --- a/src/templates/java/JavaTemplateProvider.ts +++ b/src/templates/java/JavaTemplateProvider.ts @@ -3,14 +3,14 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { AzExtFsExtra, IActionContext } from '@microsoft/vscode-azext-utils'; +import { AzExtFsExtra, type IActionContext } from '@microsoft/vscode-azext-utils'; import * as path from 'path'; import { JavaBuildTool, javaBuildTool, pomXmlFileName } from '../../constants'; import { localize } from '../../localize'; import { mavenUtils } from '../../utils/mavenUtils'; import { parseJson } from '../../utils/parseJson'; import { getWorkspaceSetting } from '../../vsCodeConfig/settings'; -import { ITemplates } from '../ITemplates'; +import { type ITemplates } from '../ITemplates'; import { TemplateSchemaVersion, TemplateType } from '../TemplateProviderBase'; import { ScriptTemplateProvider } from '../script/ScriptTemplateProvider'; import { english } from '../script/getScriptResourcesLanguage'; diff --git a/src/templates/script/NodeV4Provider.ts b/src/templates/script/NodeV4Provider.ts index 54d9de3c2..a83308dcd 100644 --- a/src/templates/script/NodeV4Provider.ts +++ b/src/templates/script/NodeV4Provider.ts @@ -3,11 +3,11 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { AzExtFsExtra, IActionContext } from '@microsoft/vscode-azext-utils'; +import { AzExtFsExtra, type IActionContext } from '@microsoft/vscode-azext-utils'; import * as path from 'path'; -import { IBindingTemplate } from '../IBindingTemplate'; -import { IFunctionTemplate } from '../IFunctionTemplate'; -import { ITemplates } from '../ITemplates'; +import { type IBindingTemplate } from '../IBindingTemplate'; +import { type IFunctionTemplate } from '../IFunctionTemplate'; +import { type ITemplates } from '../ITemplates'; import { TemplateProviderBase, TemplateSchemaVersion, TemplateType } from '../TemplateProviderBase'; import { getScriptResourcesLanguage } from './getScriptResourcesLanguage'; import { parseScriptTemplates } from './parseScriptTemplates'; diff --git a/src/templates/script/PysteinTemplateProvider.ts b/src/templates/script/PysteinTemplateProvider.ts index 3cbc6dd08..e75ab914f 100644 --- a/src/templates/script/PysteinTemplateProvider.ts +++ b/src/templates/script/PysteinTemplateProvider.ts @@ -3,20 +3,20 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { AzExtFsExtra, IActionContext } from '@microsoft/vscode-azext-utils'; +import { AzExtFsExtra, type IActionContext } from '@microsoft/vscode-azext-utils'; import * as path from 'path'; import { ProjectLanguage } from '../../constants'; -import { IBundleMetadata } from '../../funcConfig/host'; +import { type IBundleMetadata } from '../../funcConfig/host'; import { bundleFeedUtils } from '../../utils/bundleFeedUtils'; import { feedUtils } from '../../utils/feedUtils'; import { verifyTemplateIsV2 } from '../../utils/templateVersionUtils'; -import { IBindingTemplate } from '../IBindingTemplate'; -import { FunctionTemplateBase } from '../IFunctionTemplate'; -import { ITemplates } from '../ITemplates'; +import { type IBindingTemplate } from '../IBindingTemplate'; +import { type FunctionTemplateBase } from '../IFunctionTemplate'; +import { type ITemplates } from '../ITemplates'; import { TemplateSchemaVersion, TemplateType } from '../TemplateProviderBase'; import { ScriptBundleTemplateProvider } from './ScriptBundleTemplateProvider'; import { getScriptResourcesLanguage } from './getScriptResourcesLanguage'; -import { RawTemplateV2, parseScriptTemplates } from './parseScriptTemplatesV2'; +import { parseScriptTemplates, type RawTemplateV2 } from './parseScriptTemplatesV2'; export class PysteinTemplateProvider extends ScriptBundleTemplateProvider { diff --git a/src/templates/script/ScriptBundleTemplateProvider.ts b/src/templates/script/ScriptBundleTemplateProvider.ts index f35bad08f..e982b0580 100644 --- a/src/templates/script/ScriptBundleTemplateProvider.ts +++ b/src/templates/script/ScriptBundleTemplateProvider.ts @@ -3,16 +3,16 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { AzExtFsExtra, IActionContext, parseError } from '@microsoft/vscode-azext-utils'; +import { AzExtFsExtra, parseError, type IActionContext } from '@microsoft/vscode-azext-utils'; import * as path from 'path'; import { hostFileName } from '../../constants'; -import { IBundleMetadata, parseHostJson } from '../../funcConfig/host'; +import { parseHostJson, type IBundleMetadata } from '../../funcConfig/host'; import { localize } from '../../localize'; import { bundleFeedUtils } from '../../utils/bundleFeedUtils'; import { feedUtils } from '../../utils/feedUtils'; -import { IBindingTemplate } from '../IBindingTemplate'; -import { IFunctionTemplate } from '../IFunctionTemplate'; -import { ITemplates } from '../ITemplates'; +import { type IBindingTemplate } from '../IBindingTemplate'; +import { type IFunctionTemplate } from '../IFunctionTemplate'; +import { type ITemplates } from '../ITemplates'; import { TemplateSchemaVersion, TemplateType } from '../TemplateProviderBase'; import { ScriptTemplateProvider } from './ScriptTemplateProvider'; import { parseScriptTemplates } from './parseScriptTemplates'; diff --git a/src/templates/script/ScriptTemplateProvider.ts b/src/templates/script/ScriptTemplateProvider.ts index 209b87886..0f8eeface 100644 --- a/src/templates/script/ScriptTemplateProvider.ts +++ b/src/templates/script/ScriptTemplateProvider.ts @@ -3,7 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { AzExtFsExtra, IActionContext } from '@microsoft/vscode-azext-utils'; +import { AzExtFsExtra, type IActionContext } from '@microsoft/vscode-azext-utils'; import * as extract from 'extract-zip'; import * as path from 'path'; import { FuncVersion } from '../../FuncVersion'; @@ -12,9 +12,9 @@ import { bundleFeedUtils } from '../../utils/bundleFeedUtils'; import { cliFeedUtils } from '../../utils/cliFeedUtils'; import { getRandomHexString } from '../../utils/fs'; import { requestUtils } from '../../utils/requestUtils'; -import { IBindingTemplate } from '../IBindingTemplate'; -import { IFunctionTemplate } from '../IFunctionTemplate'; -import { ITemplates } from '../ITemplates'; +import { type IBindingTemplate } from '../IBindingTemplate'; +import { type IFunctionTemplate } from '../IFunctionTemplate'; +import { type ITemplates } from '../ITemplates'; import { TemplateProviderBase, TemplateSchemaVersion, TemplateType } from '../TemplateProviderBase'; import { english, getScriptResourcesLanguage } from './getScriptResourcesLanguage'; import { parseScriptTemplates } from './parseScriptTemplates'; diff --git a/src/templates/script/parseScriptTemplates.ts b/src/templates/script/parseScriptTemplates.ts index a913a9fa5..fa43c6d8b 100644 --- a/src/templates/script/parseScriptTemplates.ts +++ b/src/templates/script/parseScriptTemplates.ts @@ -5,11 +5,11 @@ import { isString } from 'util'; import { ProjectLanguage, sqlBindingTemplateRegex } from '../../constants'; -import { IFunctionBinding, ParsedFunctionJson } from '../../funcConfig/function'; +import { ParsedFunctionJson, type IFunctionBinding } from '../../funcConfig/function'; import { localize } from '../../localize'; -import { IBindingSetting, IBindingTemplate, IEnumValue, ResourceType, ValueType } from '../IBindingTemplate'; -import { IFunctionTemplate, TemplateCategory } from '../IFunctionTemplate'; -import { ITemplates } from '../ITemplates'; +import { type IBindingSetting, type IBindingTemplate, type IEnumValue, type ResourceType, type ValueType } from '../IBindingTemplate'; +import { type IFunctionTemplate, type TemplateCategory } from '../IFunctionTemplate'; +import { type ITemplates } from '../ITemplates'; import { TemplateSchemaVersion } from '../TemplateProviderBase'; /** diff --git a/src/templates/script/parseScriptTemplatesV2.ts b/src/templates/script/parseScriptTemplatesV2.ts index c9634865e..8fda8ec5f 100644 --- a/src/templates/script/parseScriptTemplatesV2.ts +++ b/src/templates/script/parseScriptTemplatesV2.ts @@ -4,9 +4,9 @@ *--------------------------------------------------------------------------------------------*/ import { nonNullValue } from '@microsoft/vscode-azext-utils'; -import { ActionType, ProjectLanguage } from '../../constants'; -import { ResourceType } from '../IBindingTemplate'; -import { FunctionV2Template } from '../IFunctionTemplate'; +import { type ActionType, type ProjectLanguage } from '../../constants'; +import { type ResourceType } from '../IBindingTemplate'; +import { type FunctionV2Template } from '../IFunctionTemplate'; import { TemplateSchemaVersion } from '../TemplateProviderBase'; /** diff --git a/src/tree/AzureAccountTreeItemWithProjects.ts b/src/tree/AzureAccountTreeItemWithProjects.ts index 14ad7ee35..3ee604fe0 100644 --- a/src/tree/AzureAccountTreeItemWithProjects.ts +++ b/src/tree/AzureAccountTreeItemWithProjects.ts @@ -4,21 +4,21 @@ *--------------------------------------------------------------------------------------------*/ import { AzureAccountTreeItemBase } from '@microsoft/vscode-azext-azureutils'; -import { AzExtTreeItem, callWithTelemetryAndErrorHandling, GenericTreeItem, IActionContext, ISubscriptionContext } from '@microsoft/vscode-azext-utils'; +import { GenericTreeItem, callWithTelemetryAndErrorHandling, type AzExtTreeItem, type IActionContext, type ISubscriptionContext } from '@microsoft/vscode-azext-utils'; import * as path from 'path'; import { Disposable, workspace } from 'vscode'; import { funcVersionSetting, hostFileName, projectLanguageSetting, projectSubpathSetting } from '../constants'; import { ext } from '../extensionVariables'; import { localize } from '../localize'; import { treeUtils } from '../utils/treeUtils'; -import { listLocalProjects, LocalProjectInternal } from '../workspace/listLocalProjects'; -import { createRefreshFileWatcher } from './localProject/createRefreshFileWatcher'; +import { listLocalProjects, type LocalProjectInternal } from '../workspace/listLocalProjects'; +import { SubscriptionTreeItem } from './SubscriptionTreeItem'; import { InitLocalProjectTreeItem } from './localProject/InitLocalProjectTreeItem'; import { InvalidLocalProjectTreeItem } from './localProject/InvalidLocalProjectTreeItem'; import { LocalProjectTreeItem } from './localProject/LocalProjectTreeItem'; import { LocalProjectTreeItemBase } from './localProject/LocalProjectTreeItemBase'; +import { createRefreshFileWatcher } from './localProject/createRefreshFileWatcher'; import { isLocalProjectCV, isProjectCV, isRemoteProjectCV } from './projectContextValues'; -import { SubscriptionTreeItem } from './SubscriptionTreeItem'; export class AzureAccountTreeItemWithProjects extends AzureAccountTreeItemBase { private _projectDisposables: Disposable[] = []; diff --git a/src/tree/FunctionBase.ts b/src/tree/FunctionBase.ts index b3b395214..95ff0e29a 100644 --- a/src/tree/FunctionBase.ts +++ b/src/tree/FunctionBase.ts @@ -3,13 +3,13 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { FunctionEnvelope } from "@azure/arm-appservice"; -import { IActionContext } from "@microsoft/vscode-azext-utils"; +import { type FunctionEnvelope } from "@azure/arm-appservice"; +import { type IActionContext } from "@microsoft/vscode-azext-utils"; import * as url from "url"; -import { HttpAuthLevel, ParsedFunctionJson } from "../funcConfig/function"; -import { IParsedHostJson } from "../funcConfig/host"; -import { IFunction } from "../workspace/LocalFunction"; -import { FuncHostRequest, IProjectTreeItem } from "./IProjectTreeItem"; +import { HttpAuthLevel, type ParsedFunctionJson } from "../funcConfig/function"; +import { type IParsedHostJson } from "../funcConfig/host"; +import { type IFunction } from "../workspace/LocalFunction"; +import { type FuncHostRequest, type IProjectTreeItem } from "./IProjectTreeItem"; export abstract class FunctionBase implements IFunction { constructor( diff --git a/src/tree/FunctionTreeItemBase.ts b/src/tree/FunctionTreeItemBase.ts index 8dc08d7c7..643830923 100644 --- a/src/tree/FunctionTreeItemBase.ts +++ b/src/tree/FunctionTreeItemBase.ts @@ -3,14 +3,14 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { AzExtParentTreeItem, AzExtTreeItem, IActionContext, TreeItemIconPath } from '@microsoft/vscode-azext-utils'; +import { AzExtTreeItem, type AzExtParentTreeItem, type IActionContext, type TreeItemIconPath } from '@microsoft/vscode-azext-utils'; import { FuncVersion } from '../FuncVersion'; import { localize } from '../localize'; import { treeUtils } from '../utils/treeUtils'; -import { IFunction } from '../workspace/LocalFunction'; -import { FunctionBase } from './FunctionBase'; -import { FunctionsTreeItemBase } from './FunctionsTreeItemBase'; -import { ApplicationSettings, FuncHostRequest, IProjectTreeItem } from './IProjectTreeItem'; +import { type IFunction } from '../workspace/LocalFunction'; +import { type FunctionBase } from './FunctionBase'; +import { type FunctionsTreeItemBase } from './FunctionsTreeItemBase'; +import { type ApplicationSettings, type FuncHostRequest, type IProjectTreeItem } from './IProjectTreeItem'; import { ProjectResource, getProjectContextValue } from './projectContextValues'; diff --git a/src/tree/FunctionsTreeItemBase.ts b/src/tree/FunctionsTreeItemBase.ts index 5bb413a82..f776f9c43 100644 --- a/src/tree/FunctionsTreeItemBase.ts +++ b/src/tree/FunctionsTreeItemBase.ts @@ -3,10 +3,10 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { AzExtParentTreeItem, TreeItemIconPath } from '@microsoft/vscode-azext-utils'; +import { AzExtParentTreeItem, type TreeItemIconPath } from '@microsoft/vscode-azext-utils'; import { ThemeIcon } from 'vscode'; import { localize } from '../localize'; -import { IProjectTreeItem } from './IProjectTreeItem'; +import { type IProjectTreeItem } from './IProjectTreeItem'; import { getProjectContextValue, ProjectAccess, ProjectResource } from './projectContextValues'; export abstract class FunctionsTreeItemBase extends AzExtParentTreeItem { diff --git a/src/tree/IProjectTreeItem.ts b/src/tree/IProjectTreeItem.ts index bf1d8b3ea..5cbc3d8b8 100644 --- a/src/tree/IProjectTreeItem.ts +++ b/src/tree/IProjectTreeItem.ts @@ -3,10 +3,10 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { IActionContext } from '@microsoft/vscode-azext-utils'; -import { IParsedHostJson } from '../funcConfig/host'; -import { FuncVersion } from '../FuncVersion'; -import { ProjectSource } from './projectContextValues'; +import { type IActionContext } from '@microsoft/vscode-azext-utils'; +import { type FuncVersion } from '../FuncVersion'; +import { type IParsedHostJson } from '../funcConfig/host'; +import { type ProjectSource } from './projectContextValues'; export type ApplicationSettings = { [propertyName: string]: string }; diff --git a/src/tree/ResolvedFunctionAppResource.ts b/src/tree/ResolvedFunctionAppResource.ts index eecc4109c..0bddad4d6 100644 --- a/src/tree/ResolvedFunctionAppResource.ts +++ b/src/tree/ResolvedFunctionAppResource.ts @@ -3,23 +3,23 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { Site, SiteConfig, SiteSourceControl, StringDictionary } from "@azure/arm-appservice"; -import { DeleteLastServicePlanStep, DeleteSiteStep, DeploymentTreeItem, DeploymentsTreeItem, IDeleteSiteWizardContext, LogFilesTreeItem, ParsedSite, SiteFilesTreeItem, getFile } from "@microsoft/vscode-azext-azureappservice"; +import { type Site, type SiteConfig, type SiteSourceControl, type StringDictionary } from "@azure/arm-appservice"; +import { DeleteLastServicePlanStep, DeleteSiteStep, DeploymentTreeItem, DeploymentsTreeItem, LogFilesTreeItem, ParsedSite, SiteFilesTreeItem, getFile, type IDeleteSiteWizardContext } from "@microsoft/vscode-azext-azureappservice"; import { AppSettingTreeItem, AppSettingsTreeItem } from "@microsoft/vscode-azext-azureappsettings"; import { ServiceConnectorGroupTreeItem } from "@microsoft/vscode-azext-serviceconnector"; -import { AzExtTreeItem, AzureWizard, DeleteConfirmationStep, IActionContext, ISubscriptionContext, TreeItemIconPath, nonNullValue } from "@microsoft/vscode-azext-utils"; -import { ResolvedAppResourceBase } from "@microsoft/vscode-azext-utils/hostapi"; -import { ViewPropertiesModel } from "@microsoft/vscode-azureresources-api"; -import { FuncVersion, latestGAVersion, tryParseFuncVersion } from "../FuncVersion"; +import { AzureWizard, DeleteConfirmationStep, nonNullValue, type AzExtTreeItem, type IActionContext, type ISubscriptionContext, type TreeItemIconPath } from "@microsoft/vscode-azext-utils"; +import { type ResolvedAppResourceBase } from "@microsoft/vscode-azext-utils/hostapi"; +import { type ViewPropertiesModel } from "@microsoft/vscode-azureresources-api"; +import { latestGAVersion, tryParseFuncVersion, type FuncVersion } from "../FuncVersion"; import { runFromPackageKey } from "../constants"; import { ext } from "../extensionVariables"; -import { IParsedHostJson, parseHostJson } from "../funcConfig/host"; +import { parseHostJson, type IParsedHostJson } from "../funcConfig/host"; import { localize } from "../localize"; import { createActivityContext } from "../utils/activityUtils"; import { envUtils } from "../utils/envUtils"; import { treeUtils } from "../utils/treeUtils"; -import { ApplicationSettings, FuncHostRequest } from "./IProjectTreeItem"; -import { SlotTreeItem } from "./SlotTreeItem"; +import { type ApplicationSettings, type FuncHostRequest } from "./IProjectTreeItem"; +import { type SlotTreeItem } from "./SlotTreeItem"; import { SlotsTreeItem } from "./SlotsTreeItem"; import { ProjectResource, ProjectSource, matchesAnyPart } from "./projectContextValues"; import { RemoteFunctionsTreeItem } from "./remoteProject/RemoteFunctionsTreeItem"; diff --git a/src/tree/SlotTreeItem.ts b/src/tree/SlotTreeItem.ts index 0fa1745fa..1be7df2e0 100644 --- a/src/tree/SlotTreeItem.ts +++ b/src/tree/SlotTreeItem.ts @@ -3,16 +3,16 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { DeploymentsTreeItem, ParsedSite } from '@microsoft/vscode-azext-azureappservice'; -import { AppSettingsTreeItem } from '@microsoft/vscode-azext-azureappsettings'; -import { AzExtParentTreeItem, AzExtTreeItem, IActionContext } from '@microsoft/vscode-azext-utils'; -import { FuncVersion } from '../FuncVersion'; -import { IParsedHostJson } from '../funcConfig/host'; +import { type DeploymentsTreeItem, type ParsedSite } from '@microsoft/vscode-azext-azureappservice'; +import { type AppSettingsTreeItem } from '@microsoft/vscode-azext-azureappsettings'; +import { AzExtParentTreeItem, type AzExtTreeItem, type IActionContext } from '@microsoft/vscode-azext-utils'; +import { type FuncVersion } from '../FuncVersion'; +import { type IParsedHostJson } from '../funcConfig/host'; import { treeUtils } from '../utils/treeUtils'; -import { ApplicationSettings, FuncHostRequest, IProjectTreeItem } from './IProjectTreeItem'; +import { type ApplicationSettings, type FuncHostRequest, type IProjectTreeItem } from './IProjectTreeItem'; import { ResolvedFunctionAppResource } from './ResolvedFunctionAppResource'; import { ProjectSource } from './projectContextValues'; -import { RemoteFunctionTreeItem } from './remoteProject/RemoteFunctionTreeItem'; +import { type RemoteFunctionTreeItem } from './remoteProject/RemoteFunctionTreeItem'; export function isSlotTreeItem(treeItem: SlotTreeItem | RemoteFunctionTreeItem | AzExtParentTreeItem): treeItem is SlotTreeItem { return !!(treeItem as SlotTreeItem).site; diff --git a/src/tree/SlotsTreeItem.ts b/src/tree/SlotsTreeItem.ts index 7a021834d..69fb7bb77 100644 --- a/src/tree/SlotsTreeItem.ts +++ b/src/tree/SlotsTreeItem.ts @@ -3,10 +3,10 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { Site, WebSiteManagementClient } from '@azure/arm-appservice'; -import { createSlot, ParsedSite } from '@microsoft/vscode-azext-azureappservice'; +import { type Site, type WebSiteManagementClient } from '@azure/arm-appservice'; +import { ParsedSite, createSlot } from '@microsoft/vscode-azext-azureappservice'; import { uiUtils } from '@microsoft/vscode-azext-azureutils'; -import { AzExtParentTreeItem, AzExtTreeItem, IActionContext, ICreateChildImplContext, TreeItemIconPath } from '@microsoft/vscode-azext-utils'; +import { AzExtParentTreeItem, type AzExtTreeItem, type IActionContext, type ICreateChildImplContext, type TreeItemIconPath } from '@microsoft/vscode-azext-utils'; import { showSiteCreated } from '../commands/createFunctionApp/showSiteCreated'; import { localize } from '../localize'; import { createWebSiteClient } from '../utils/azureClients'; diff --git a/src/tree/SubscriptionTreeItem.ts b/src/tree/SubscriptionTreeItem.ts index 981ea4453..6112bb64f 100644 --- a/src/tree/SubscriptionTreeItem.ts +++ b/src/tree/SubscriptionTreeItem.ts @@ -3,15 +3,15 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { Site, WebSiteManagementClient } from '@azure/arm-appservice'; -import { AppInsightsCreateStep, AppInsightsListStep, AppKind, AppServicePlanCreateStep, CustomLocationListStep, IAppServiceWizardContext, LogAnalyticsCreateStep, SiteNameStep, WebsiteOS } from '@microsoft/vscode-azext-azureappservice'; -import { INewStorageAccountDefaults, LocationListStep, ResourceGroupCreateStep, ResourceGroupListStep, StorageAccountCreateStep, StorageAccountKind, StorageAccountListStep, StorageAccountPerformance, StorageAccountReplication, SubscriptionTreeItemBase, uiUtils } from '@microsoft/vscode-azext-azureutils'; -import { AzExtTreeItem, AzureWizard, AzureWizardExecuteStep, AzureWizardPromptStep, IActionContext, ICreateChildImplContext, parseError } from '@microsoft/vscode-azext-utils'; -import { WorkspaceFolder } from 'vscode'; +import { type Site, type WebSiteManagementClient } from '@azure/arm-appservice'; +import { AppInsightsCreateStep, AppInsightsListStep, AppKind, AppServicePlanCreateStep, CustomLocationListStep, LogAnalyticsCreateStep, SiteNameStep, WebsiteOS, type IAppServiceWizardContext } from '@microsoft/vscode-azext-azureappservice'; +import { LocationListStep, ResourceGroupCreateStep, ResourceGroupListStep, StorageAccountCreateStep, StorageAccountKind, StorageAccountListStep, StorageAccountPerformance, StorageAccountReplication, SubscriptionTreeItemBase, uiUtils, type INewStorageAccountDefaults } from '@microsoft/vscode-azext-azureutils'; +import { AzureWizard, parseError, type AzExtTreeItem, type AzureWizardExecuteStep, type AzureWizardPromptStep, type IActionContext, type ICreateChildImplContext } from '@microsoft/vscode-azext-utils'; +import { type WorkspaceFolder } from 'vscode'; import { FuncVersion, latestGAVersion, tryParseFuncVersion } from '../FuncVersion'; import { FunctionAppCreateStep } from '../commands/createFunctionApp/FunctionAppCreateStep'; import { FunctionAppHostingPlanStep, setConsumptionPlanProperties } from '../commands/createFunctionApp/FunctionAppHostingPlanStep'; -import { IFunctionAppWizardContext } from '../commands/createFunctionApp/IFunctionAppWizardContext'; +import { type IFunctionAppWizardContext } from '../commands/createFunctionApp/IFunctionAppWizardContext'; import { FunctionAppStackStep } from '../commands/createFunctionApp/stacks/FunctionAppStackStep'; import { funcVersionSetting, projectLanguageSetting } from '../constants'; import { ext } from '../extensionVariables'; diff --git a/src/tree/localProject/InitLocalProjectTreeItem.ts b/src/tree/localProject/InitLocalProjectTreeItem.ts index 9a28b0380..8043a652e 100644 --- a/src/tree/localProject/InitLocalProjectTreeItem.ts +++ b/src/tree/localProject/InitLocalProjectTreeItem.ts @@ -3,8 +3,8 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { AzExtParentTreeItem, AzExtTreeItem, GenericTreeItem } from '@microsoft/vscode-azext-utils'; -import { ThemeIcon, WorkspaceFolder } from 'vscode'; +import { GenericTreeItem, type AzExtParentTreeItem, type AzExtTreeItem } from '@microsoft/vscode-azext-utils'; +import { ThemeIcon, type WorkspaceFolder } from 'vscode'; import { localize } from '../../localize'; import { isLocalProjectCV } from '../projectContextValues'; import { LocalProjectTreeItemBase } from './LocalProjectTreeItemBase'; diff --git a/src/tree/localProject/InvalidLocalProjectTreeItem.ts b/src/tree/localProject/InvalidLocalProjectTreeItem.ts index 2835b8424..b4404b62c 100644 --- a/src/tree/localProject/InvalidLocalProjectTreeItem.ts +++ b/src/tree/localProject/InvalidLocalProjectTreeItem.ts @@ -3,8 +3,8 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { AzExtParentTreeItem, AzExtTreeItem } from '@microsoft/vscode-azext-utils'; -import { WorkspaceFolder } from 'vscode'; +import { type AzExtParentTreeItem, type AzExtTreeItem } from '@microsoft/vscode-azext-utils'; +import { type WorkspaceFolder } from 'vscode'; import { LocalProjectTreeItemBase } from './LocalProjectTreeItemBase'; export class InvalidLocalProjectTreeItem extends LocalProjectTreeItemBase { diff --git a/src/tree/localProject/LocalFunctionTreeItem.ts b/src/tree/localProject/LocalFunctionTreeItem.ts index 1f9581d2c..0fc24812a 100644 --- a/src/tree/localProject/LocalFunctionTreeItem.ts +++ b/src/tree/localProject/LocalFunctionTreeItem.ts @@ -3,10 +3,10 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { IActionContext } from '@microsoft/vscode-azext-utils'; -import { ILocalFunction } from '../../workspace/LocalFunction'; +import { type IActionContext } from '@microsoft/vscode-azext-utils'; +import { type ILocalFunction } from '../../workspace/LocalFunction'; import { FunctionTreeItemBase } from '../FunctionTreeItemBase'; -import { LocalFunctionsTreeItem } from './LocalFunctionsTreeItem'; +import { type LocalFunctionsTreeItem } from './LocalFunctionsTreeItem'; export class LocalFunctionTreeItem extends FunctionTreeItemBase { public readonly parent: LocalFunctionsTreeItem; diff --git a/src/tree/localProject/LocalFunctionsTreeItem.ts b/src/tree/localProject/LocalFunctionsTreeItem.ts index 78f974ea0..fa5583cd2 100644 --- a/src/tree/localProject/LocalFunctionsTreeItem.ts +++ b/src/tree/localProject/LocalFunctionsTreeItem.ts @@ -3,7 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { AzExtTreeItem, GenericTreeItem, IActionContext, InvalidTreeItem } from '@microsoft/vscode-azext-utils'; +import { GenericTreeItem, InvalidTreeItem, type AzExtTreeItem, type IActionContext } from '@microsoft/vscode-azext-utils'; import * as path from 'path'; import { ThemeIcon } from 'vscode'; import { functionJsonFileName } from '../../constants'; @@ -13,7 +13,7 @@ import { findFiles } from '../../utils/workspace'; import { listLocalFunctions } from '../../workspace/listLocalFunctions'; import { FunctionsTreeItemBase } from '../FunctionsTreeItemBase'; import { LocalFunctionTreeItem } from './LocalFunctionTreeItem'; -import { LocalProjectTreeItem } from './LocalProjectTreeItem'; +import { type LocalProjectTreeItem } from './LocalProjectTreeItem'; export class ProjectNotRunningError extends Error { } diff --git a/src/tree/localProject/LocalProjectTreeItem.ts b/src/tree/localProject/LocalProjectTreeItem.ts index 1da82231d..a23a83b12 100644 --- a/src/tree/localProject/LocalProjectTreeItem.ts +++ b/src/tree/localProject/LocalProjectTreeItem.ts @@ -3,20 +3,20 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { AzExtParentTreeItem, AzExtTreeItem, callWithTelemetryAndErrorHandling, IActionContext } from '@microsoft/vscode-azext-utils'; +import { callWithTelemetryAndErrorHandling, type AzExtParentTreeItem, type AzExtTreeItem, type IActionContext } from '@microsoft/vscode-azext-utils'; import * as path from 'path'; -import { Disposable, TaskScope, WorkspaceFolder } from 'vscode'; +import { Disposable, type TaskScope, type WorkspaceFolder } from 'vscode'; +import { type FuncVersion } from '../../FuncVersion'; import { onDotnetFuncTaskReady } from '../../commands/pickFuncProcess'; -import { functionJsonFileName, localSettingsFileName, ProjectLanguage } from '../../constants'; -import { IParsedHostJson } from '../../funcConfig/host'; +import { functionJsonFileName, localSettingsFileName, type ProjectLanguage } from '../../constants'; +import { type IParsedHostJson } from '../../funcConfig/host'; import { onFuncTaskStarted } from '../../funcCoreTools/funcHostTask'; -import { FuncVersion } from '../../FuncVersion'; -import { LocalProjectInternal } from '../../workspace/listLocalProjects'; -import { ApplicationSettings, FuncHostRequest, IProjectTreeItem } from '../IProjectTreeItem'; -import { isLocalProjectCV, matchesAnyPart, ProjectResource, ProjectSource } from '../projectContextValues'; -import { createRefreshFileWatcher } from './createRefreshFileWatcher'; +import { type LocalProjectInternal } from '../../workspace/listLocalProjects'; +import { type ApplicationSettings, type FuncHostRequest, type IProjectTreeItem } from '../IProjectTreeItem'; +import { ProjectResource, ProjectSource, isLocalProjectCV, matchesAnyPart } from '../projectContextValues'; import { LocalFunctionsTreeItem } from './LocalFunctionsTreeItem'; import { LocalProjectTreeItemBase } from './LocalProjectTreeItemBase'; +import { createRefreshFileWatcher } from './createRefreshFileWatcher'; export class LocalProjectTreeItem extends LocalProjectTreeItemBase implements Disposable, IProjectTreeItem { diff --git a/src/tree/localProject/LocalProjectTreeItemBase.ts b/src/tree/localProject/LocalProjectTreeItemBase.ts index bbce29d3c..58b83a629 100644 --- a/src/tree/localProject/LocalProjectTreeItemBase.ts +++ b/src/tree/localProject/LocalProjectTreeItemBase.ts @@ -3,9 +3,9 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { AzExtParentTreeItem, TreeItemIconPath } from '@microsoft/vscode-azext-utils'; +import { AzExtParentTreeItem, type TreeItemIconPath } from '@microsoft/vscode-azext-utils'; import * as path from 'path'; -import { WorkspaceFolder } from 'vscode'; +import { type WorkspaceFolder } from 'vscode'; import { localize } from '../../localize'; import { treeUtils } from '../../utils/treeUtils'; diff --git a/src/tree/localProject/createRefreshFileWatcher.ts b/src/tree/localProject/createRefreshFileWatcher.ts index 245d49484..efd1aa082 100644 --- a/src/tree/localProject/createRefreshFileWatcher.ts +++ b/src/tree/localProject/createRefreshFileWatcher.ts @@ -3,8 +3,8 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { AzExtTreeItem, callWithTelemetryAndErrorHandling, IActionContext } from '@microsoft/vscode-azext-utils'; -import { Disposable, FileSystemWatcher, workspace } from 'vscode'; +import { callWithTelemetryAndErrorHandling, type AzExtTreeItem, type IActionContext } from '@microsoft/vscode-azext-utils'; +import { Disposable, workspace, type FileSystemWatcher } from 'vscode'; export function createRefreshFileWatcher(ti: AzExtTreeItem, globPattern: string): Disposable { const refreshMethod: () => Promise = async (): Promise => { diff --git a/src/tree/remoteProject/RemoteFunction.ts b/src/tree/remoteProject/RemoteFunction.ts index e99fd6ace..a843ddd79 100644 --- a/src/tree/remoteProject/RemoteFunction.ts +++ b/src/tree/remoteProject/RemoteFunction.ts @@ -3,12 +3,12 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { FunctionEnvelope, HostKeys } from "@azure/arm-appservice"; -import { IFunctionKeys, ParsedSite } from "@microsoft/vscode-azext-azureappservice"; -import { IActionContext, nonNullProp, parseError } from "@microsoft/vscode-azext-utils"; -import { HttpAuthLevel, ParsedFunctionJson } from "../../funcConfig/function"; +import { type FunctionEnvelope, type HostKeys } from "@azure/arm-appservice"; +import { type IFunctionKeys, type ParsedSite } from "@microsoft/vscode-azext-azureappservice"; +import { nonNullProp, parseError, type IActionContext } from "@microsoft/vscode-azext-utils"; +import { HttpAuthLevel, type ParsedFunctionJson } from "../../funcConfig/function"; import { FunctionBase } from "../FunctionBase"; -import { IProjectTreeItem } from "../IProjectTreeItem"; +import { type IProjectTreeItem } from "../IProjectTreeItem"; export class RemoteFunction extends FunctionBase { constructor( diff --git a/src/tree/remoteProject/RemoteFunctionTreeItem.ts b/src/tree/remoteProject/RemoteFunctionTreeItem.ts index c61c40848..fe3e9b52e 100644 --- a/src/tree/remoteProject/RemoteFunctionTreeItem.ts +++ b/src/tree/remoteProject/RemoteFunctionTreeItem.ts @@ -3,18 +3,18 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { HostKeys } from '@azure/arm-appservice'; -import { IFunctionKeys } from '@microsoft/vscode-azext-azureappservice'; -import { DialogResponses, IActionContext, parseError } from '@microsoft/vscode-azext-utils'; -import { ViewPropertiesModel } from '@microsoft/vscode-azureresources-api'; +import { type HostKeys } from '@azure/arm-appservice'; +import { type IFunctionKeys } from '@microsoft/vscode-azext-azureappservice'; +import { DialogResponses, parseError, type IActionContext } from '@microsoft/vscode-azext-utils'; +import { type ViewPropertiesModel } from '@microsoft/vscode-azureresources-api'; import { ProgressLocation, window } from 'vscode'; import { ext } from '../../extensionVariables'; import { HttpAuthLevel } from '../../funcConfig/function'; import { localize } from '../../localize'; import { nonNullProp } from '../../utils/nonNull'; import { FunctionTreeItemBase } from '../FunctionTreeItemBase'; -import { RemoteFunction } from './RemoteFunction'; -import { RemoteFunctionsTreeItem } from './RemoteFunctionsTreeItem'; +import { type RemoteFunction } from './RemoteFunction'; +import { type RemoteFunctionsTreeItem } from './RemoteFunctionsTreeItem'; export class RemoteFunctionTreeItem extends FunctionTreeItemBase { public readonly parent: RemoteFunctionsTreeItem; diff --git a/src/tree/remoteProject/RemoteFunctionsTreeItem.ts b/src/tree/remoteProject/RemoteFunctionsTreeItem.ts index 26518af64..b2aeb7a62 100644 --- a/src/tree/remoteProject/RemoteFunctionsTreeItem.ts +++ b/src/tree/remoteProject/RemoteFunctionsTreeItem.ts @@ -3,13 +3,13 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { FunctionEnvelope } from '@azure/arm-appservice'; -import { AzExtTreeItem, IActionContext, nonNullProp } from '@microsoft/vscode-azext-utils'; +import { type FunctionEnvelope } from '@azure/arm-appservice'; +import { nonNullProp, type AzExtTreeItem, type IActionContext } from '@microsoft/vscode-azext-utils'; import * as retry from 'p-retry'; import { ParsedFunctionJson } from '../../funcConfig/function'; import { localize } from '../../localize'; import { FunctionsTreeItemBase } from '../FunctionsTreeItemBase'; -import { SlotTreeItem } from '../SlotTreeItem'; +import { type SlotTreeItem } from '../SlotTreeItem'; import { RemoteFunction } from './RemoteFunction'; import { RemoteFunctionTreeItem, getFunctionNameFromId } from './RemoteFunctionTreeItem'; diff --git a/src/utils/activityUtils.ts b/src/utils/activityUtils.ts index 97e515646..419702ee4 100644 --- a/src/utils/activityUtils.ts +++ b/src/utils/activityUtils.ts @@ -3,7 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { ExecuteActivityContext } from "@microsoft/vscode-azext-utils"; +import { type ExecuteActivityContext } from "@microsoft/vscode-azext-utils"; import { ext } from "../extensionVariables"; import { getWorkspaceSetting } from "../vsCodeConfig/settings"; diff --git a/src/utils/azure.ts b/src/utils/azure.ts index 80cf979de..8b0eb4074 100644 --- a/src/utils/azure.ts +++ b/src/utils/azure.ts @@ -3,14 +3,14 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { AppKind, IAppServiceWizardContext } from '@microsoft/vscode-azext-azureappservice'; +import { AppKind, type IAppServiceWizardContext } from '@microsoft/vscode-azext-azureappservice'; import { VerifyProvidersStep } from '@microsoft/vscode-azext-azureutils'; -import { AzureWizard, AzureWizardExecuteStep, IActionContext, IAzureQuickPickItem } from '@microsoft/vscode-azext-utils'; +import { AzureWizard, type AzureWizardExecuteStep, type IActionContext, type IAzureQuickPickItem } from '@microsoft/vscode-azext-utils'; import { isArray } from 'util'; -import { IFunctionAppWizardContext } from '../commands/createFunctionApp/IFunctionAppWizardContext'; +import { type IFunctionAppWizardContext } from '../commands/createFunctionApp/IFunctionAppWizardContext'; import { webProvider } from '../constants'; import { localize } from '../localize'; -import { ICreateFunctionAppContext, SubscriptionTreeItem } from '../tree/SubscriptionTreeItem'; +import { type ICreateFunctionAppContext, type SubscriptionTreeItem } from '../tree/SubscriptionTreeItem'; export interface IBaseResourceWithName { name?: string; diff --git a/src/utils/azureClients.ts b/src/utils/azureClients.ts index 46310986a..7d7502f86 100644 --- a/src/utils/azureClients.ts +++ b/src/utils/azureClients.ts @@ -3,14 +3,14 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import type { ApplicationInsightsManagementClient } from '@azure/arm-appinsights'; -import type { WebSiteManagementClient } from '@azure/arm-appservice'; -import type { CosmosDBManagementClient } from '@azure/arm-cosmosdb'; -import type { EventHubManagementClient } from '@azure/arm-eventhub'; -import type { ServiceBusManagementClient } from '@azure/arm-servicebus'; -import type { SqlManagementClient } from '@azure/arm-sql'; -import type { StorageManagementClient } from '@azure/arm-storage'; -import { AzExtClientContext, createAzureClient } from '@microsoft/vscode-azext-azureutils'; +import { type ApplicationInsightsManagementClient } from '@azure/arm-appinsights'; +import { type WebSiteManagementClient } from '@azure/arm-appservice'; +import { type CosmosDBManagementClient } from '@azure/arm-cosmosdb'; +import { type EventHubManagementClient } from '@azure/arm-eventhub'; +import { type ServiceBusManagementClient } from '@azure/arm-servicebus'; +import { type SqlManagementClient } from '@azure/arm-sql'; +import { type StorageManagementClient } from '@azure/arm-storage'; +import { createAzureClient, type AzExtClientContext } from '@microsoft/vscode-azext-azureutils'; // Lazy-load @azure packages to improve startup performance. // NOTE: The client is the only import that matters, the rest of the types disappear when compiled to JavaScript diff --git a/src/utils/ballerinaUtils.ts b/src/utils/ballerinaUtils.ts index 1a106ef5a..4d4af87b3 100644 --- a/src/utils/ballerinaUtils.ts +++ b/src/utils/ballerinaUtils.ts @@ -6,7 +6,7 @@ import { DialogResponses } from "@microsoft/vscode-azext-utils"; import { unlinkSync } from 'fs'; import * as vscode from 'vscode'; -import { IProjectWizardContext } from "../commands/createNewProject/IProjectWizardContext"; +import { type IProjectWizardContext } from "../commands/createNewProject/IProjectWizardContext"; import { localize } from '../localize'; import { openUrl } from '../utils/openUrl'; import { cpUtils } from './cpUtils'; diff --git a/src/utils/bundleFeedUtils.ts b/src/utils/bundleFeedUtils.ts index d807076ba..9b3d2450f 100644 --- a/src/utils/bundleFeedUtils.ts +++ b/src/utils/bundleFeedUtils.ts @@ -3,14 +3,14 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { IActionContext } from '@microsoft/vscode-azext-utils'; +import { type IActionContext } from '@microsoft/vscode-azext-utils'; import * as semver from 'semver'; import { ext, TemplateSource } from '../extensionVariables'; -import { IBundleMetadata, IHostJsonV2 } from '../funcConfig/host'; +import { type IBundleMetadata, type IHostJsonV2 } from '../funcConfig/host'; import { localize } from '../localize'; -import { IBindingTemplate } from '../templates/IBindingTemplate'; -import { FunctionTemplateBase, IFunctionTemplate } from '../templates/IFunctionTemplate'; -import { TemplateSchemaVersion } from '../templates/TemplateProviderBase'; +import { type IBindingTemplate } from '../templates/IBindingTemplate'; +import { type FunctionTemplateBase, type IFunctionTemplate } from '../templates/IFunctionTemplate'; +import { type TemplateSchemaVersion } from '../templates/TemplateProviderBase'; import { feedUtils } from './feedUtils'; import { nugetUtils } from './nugetUtils'; diff --git a/src/utils/cliFeedUtils.ts b/src/utils/cliFeedUtils.ts index 4719c4610..abb7e6864 100644 --- a/src/utils/cliFeedUtils.ts +++ b/src/utils/cliFeedUtils.ts @@ -3,10 +3,10 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { IActionContext } from '@microsoft/vscode-azext-utils'; +import { type IActionContext } from '@microsoft/vscode-azext-utils'; import * as semver from 'semver'; import { ext, TemplateSource } from '../extensionVariables'; -import { FuncVersion, getMajorVersion } from '../FuncVersion'; +import { getMajorVersion, type FuncVersion } from '../FuncVersion'; import { localize } from '../localize'; import { feedUtils } from './feedUtils'; diff --git a/src/utils/cpUtils.ts b/src/utils/cpUtils.ts index 9aac4df3e..7f7f16699 100644 --- a/src/utils/cpUtils.ts +++ b/src/utils/cpUtils.ts @@ -3,7 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { IAzExtOutputChannel } from '@microsoft/vscode-azext-utils'; +import { type IAzExtOutputChannel } from '@microsoft/vscode-azext-utils'; import * as cp from 'child_process'; import * as os from 'os'; import { localize } from '../localize'; diff --git a/src/utils/dotnetUtils.ts b/src/utils/dotnetUtils.ts index 7ecfd6492..900e6e455 100644 --- a/src/utils/dotnetUtils.ts +++ b/src/utils/dotnetUtils.ts @@ -3,12 +3,12 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { AzExtFsExtra, IActionContext } from '@microsoft/vscode-azext-utils'; +import { AzExtFsExtra, type IActionContext } from '@microsoft/vscode-azext-utils'; import * as path from 'path'; -import { ProjectLanguage } from '../constants'; import { FuncVersion } from '../FuncVersion'; +import { ProjectLanguage } from '../constants'; import { localize } from "../localize"; -import { cliFeedUtils } from './cliFeedUtils'; +import { type cliFeedUtils } from './cliFeedUtils'; import { telemetryUtils } from './telemetryUtils'; import { findFiles } from './workspace'; diff --git a/src/utils/durableUtils.ts b/src/utils/durableUtils.ts index cb21ca29c..e376d3e09 100644 --- a/src/utils/durableUtils.ts +++ b/src/utils/durableUtils.ts @@ -3,14 +3,14 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { AzExtFsExtra, IParsedError, parseError } from "@microsoft/vscode-azext-utils"; +import { AzExtFsExtra, parseError, type IParsedError } from "@microsoft/vscode-azext-utils"; import * as path from "path"; -import { Uri } from "vscode"; +import { type Uri } from "vscode"; import * as xml2js from "xml2js"; -import { IFunctionWizardContext } from "../commands/createFunction/IFunctionWizardContext"; -import { ConnectionKey, DurableBackend, DurableBackendValues, ProjectLanguage, hostFileName, requirementsFileName } from "../constants"; +import { type IFunctionWizardContext } from "../commands/createFunction/IFunctionWizardContext"; +import { ConnectionKey, DurableBackend, ProjectLanguage, hostFileName, requirementsFileName, type DurableBackendValues } from "../constants"; import { ext } from "../extensionVariables"; -import { IHostJsonV2, INetheriteTaskJson, ISqlTaskJson, IStorageTaskJson } from "../funcConfig/host"; +import { type IHostJsonV2, type INetheriteTaskJson, type ISqlTaskJson, type IStorageTaskJson } from "../funcConfig/host"; import { localize } from "../localize"; import { cpUtils } from "./cpUtils"; import { dotnetUtils } from "./dotnetUtils"; diff --git a/src/utils/feedUtils.ts b/src/utils/feedUtils.ts index ca204ff27..9f586966b 100644 --- a/src/utils/feedUtils.ts +++ b/src/utils/feedUtils.ts @@ -3,7 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { IActionContext } from '@microsoft/vscode-azext-utils'; +import { type IActionContext } from '@microsoft/vscode-azext-utils'; import { nonNullProp } from './nonNull'; import { parseJson } from './parseJson'; import { requestUtils } from './requestUtils'; diff --git a/src/utils/fs.ts b/src/utils/fs.ts index 3bbdc9c5e..8f3ad7ed4 100644 --- a/src/utils/fs.ts +++ b/src/utils/fs.ts @@ -3,10 +3,10 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { AzExtFsExtra, DialogResponses, IActionContext, parseError } from "@microsoft/vscode-azext-utils"; +import { AzExtFsExtra, DialogResponses, parseError, type IActionContext } from "@microsoft/vscode-azext-utils"; import * as crypto from "crypto"; import * as path from 'path'; -import { FileType, MessageItem } from "vscode"; +import { FileType, type MessageItem } from "vscode"; import { localize } from "../localize"; export async function copyFolder(context: IActionContext, fromPath: string, toPath: string): Promise { diff --git a/src/utils/gradleUtils.ts b/src/utils/gradleUtils.ts index eb9e4802c..259d2425d 100644 --- a/src/utils/gradleUtils.ts +++ b/src/utils/gradleUtils.ts @@ -3,7 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { IActionContext } from "@microsoft/vscode-azext-utils"; +import { type IActionContext } from "@microsoft/vscode-azext-utils"; import * as vscode from 'vscode'; import { localize } from '../localize'; import { cpUtils } from './cpUtils'; diff --git a/src/utils/javaUtils.ts b/src/utils/javaUtils.ts index ce3f63cea..2ed55aa00 100644 --- a/src/utils/javaUtils.ts +++ b/src/utils/javaUtils.ts @@ -3,7 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { IActionContext } from "@microsoft/vscode-azext-utils"; +import { type IActionContext } from "@microsoft/vscode-azext-utils"; import { nonNullProp } from "./nonNull"; import { requestUtils } from "./requestUtils"; diff --git a/src/utils/mavenUtils.ts b/src/utils/mavenUtils.ts index c591f1922..b2c165ebf 100644 --- a/src/utils/mavenUtils.ts +++ b/src/utils/mavenUtils.ts @@ -3,7 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { AzExtFsExtra, DialogResponses, IActionContext, IAzExtOutputChannel, TelemetryProperties } from "@microsoft/vscode-azext-utils"; +import { AzExtFsExtra, DialogResponses, type IActionContext, type IAzExtOutputChannel, type TelemetryProperties } from "@microsoft/vscode-azext-utils"; import * as vscode from 'vscode'; import * as xml2js from 'xml2js'; import { localize } from '../localize'; diff --git a/src/utils/pickFunctionApp.ts b/src/utils/pickFunctionApp.ts index 6636e2692..f7775a527 100644 --- a/src/utils/pickFunctionApp.ts +++ b/src/utils/pickFunctionApp.ts @@ -3,10 +3,10 @@ * Licensed under the MIT License. See License.md in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { ITreeItemPickerContext } from "@microsoft/vscode-azext-utils"; +import { type ITreeItemPickerContext } from "@microsoft/vscode-azext-utils"; import { functionFilter } from "../constants"; import { ext } from "../extensionVariables"; -import { SlotTreeItem } from "../tree/SlotTreeItem"; +import { type SlotTreeItem } from "../tree/SlotTreeItem"; export async function pickFunctionApp(context: ITreeItemPickerContext): Promise { return await ext.rgApi.pickAppResource(context, { diff --git a/src/utils/requestUtils.ts b/src/utils/requestUtils.ts index cea389b2e..bf96be30b 100644 --- a/src/utils/requestUtils.ts +++ b/src/utils/requestUtils.ts @@ -3,10 +3,10 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { ServiceClient } from "@azure/core-client"; +import { type ServiceClient } from "@azure/core-client"; import { createPipelineRequest } from "@azure/core-rest-pipeline"; -import { AzExtPipelineResponse, AzExtRequestPrepareOptions, createGenericClient, sendRequestWithTimeout } from '@microsoft/vscode-azext-azureutils'; -import { AzExtFsExtra, IActionContext, parseError } from "@microsoft/vscode-azext-utils"; +import { createGenericClient, sendRequestWithTimeout, type AzExtPipelineResponse, type AzExtRequestPrepareOptions } from '@microsoft/vscode-azext-azureutils'; +import { AzExtFsExtra, parseError, type IActionContext } from "@microsoft/vscode-azext-utils"; import * as fse from 'fs-extra'; import * as path from 'path'; import { URLSearchParams } from "url"; diff --git a/src/utils/taskUtils.ts b/src/utils/taskUtils.ts index 4eae084b9..69d3413b9 100644 --- a/src/utils/taskUtils.ts +++ b/src/utils/taskUtils.ts @@ -3,7 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { Task, tasks as codeTasks, WorkspaceFolder } from "vscode"; +import { tasks as codeTasks, type Task, type WorkspaceFolder } from "vscode"; import { isPathEqual } from "./fs"; export namespace taskUtils { diff --git a/src/utils/telemetryUtils.ts b/src/utils/telemetryUtils.ts index 5c494b549..706a51377 100644 --- a/src/utils/telemetryUtils.ts +++ b/src/utils/telemetryUtils.ts @@ -3,7 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { IActionContext } from '@microsoft/vscode-azext-utils'; +import { type IActionContext } from '@microsoft/vscode-azext-utils'; export namespace telemetryUtils { export async function runWithDurationTelemetry(context: IActionContext, prefix: string, callback: () => Promise): Promise { diff --git a/src/utils/templateVersionUtils.ts b/src/utils/templateVersionUtils.ts index 33d8a7199..e285acb8a 100644 --- a/src/utils/templateVersionUtils.ts +++ b/src/utils/templateVersionUtils.ts @@ -3,9 +3,9 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { ProjectLanguage } from "../constants"; -import { IBindingTemplate } from "../templates/IBindingTemplate"; -import { FunctionTemplateBase, FunctionV2Template, IFunctionTemplate } from "../templates/IFunctionTemplate"; +import { type ProjectLanguage } from "../constants"; +import { type IBindingTemplate } from "../templates/IBindingTemplate"; +import { type FunctionTemplateBase, type FunctionV2Template, type IFunctionTemplate } from "../templates/IFunctionTemplate"; import { TemplateSchemaVersion } from "../templates/TemplateProviderBase"; import { isPythonV2Plus } from "./programmingModelUtils"; diff --git a/src/utils/treeUtils.ts b/src/utils/treeUtils.ts index 28935e94c..5acce9619 100644 --- a/src/utils/treeUtils.ts +++ b/src/utils/treeUtils.ts @@ -3,7 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { AzExtTreeItem, TreeItemIconPath } from '@microsoft/vscode-azext-utils'; +import { type AzExtTreeItem, type TreeItemIconPath } from '@microsoft/vscode-azext-utils'; import * as path from 'path'; import { ext } from '../extensionVariables'; diff --git a/src/utils/venvUtils.ts b/src/utils/venvUtils.ts index 69e86e4e4..55b9b6142 100644 --- a/src/utils/venvUtils.ts +++ b/src/utils/venvUtils.ts @@ -3,7 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { AzExtFsExtra, IParsedError, parseError } from '@microsoft/vscode-azext-utils'; +import { AzExtFsExtra, parseError, type IParsedError } from '@microsoft/vscode-azext-utils'; import * as path from 'path'; import * as vscode from 'vscode'; import { pythonVenvSetting, requirementsFileName } from "../constants"; diff --git a/src/utils/verifyExtensionBundle.ts b/src/utils/verifyExtensionBundle.ts index 4ef5a336f..a84b78e05 100644 --- a/src/utils/verifyExtensionBundle.ts +++ b/src/utils/verifyExtensionBundle.ts @@ -3,16 +3,16 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { AzExtFsExtra, IActionContext } from '@microsoft/vscode-azext-utils'; +import { AzExtFsExtra, type IActionContext } from '@microsoft/vscode-azext-utils'; import * as path from 'path'; import { FuncVersion } from '../FuncVersion'; -import { IBindingWizardContext } from '../commands/addBinding/IBindingWizardContext'; -import { IFunctionWizardContext } from '../commands/createFunction/IFunctionWizardContext'; +import { type IBindingWizardContext } from '../commands/addBinding/IBindingWizardContext'; +import { type IFunctionWizardContext } from '../commands/createFunction/IFunctionWizardContext'; import { ProjectLanguage, extInstallCommand, extensionsCsprojFileName, hostFileName, settingsFileName, tasksFileName, vscodeFolderName } from '../constants'; -import { IHostJsonV2 } from '../funcConfig/host'; +import { type IHostJsonV2 } from '../funcConfig/host'; import { localize } from '../localize'; -import { IBindingTemplate } from '../templates/IBindingTemplate'; -import { FunctionTemplateBase } from '../templates/IFunctionTemplate'; +import { type IBindingTemplate } from '../templates/IBindingTemplate'; +import { type FunctionTemplateBase } from '../templates/IFunctionTemplate'; import { promptToReinitializeProject } from '../vsCodeConfig/promptToReinitializeProject'; import { bundleFeedUtils } from './bundleFeedUtils'; diff --git a/src/utils/workspace.ts b/src/utils/workspace.ts index c3b3c515d..d61a7552f 100644 --- a/src/utils/workspace.ts +++ b/src/utils/workspace.ts @@ -3,7 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { IActionContext, IAzureQuickPickItem, UserCancelledError } from '@microsoft/vscode-azext-utils'; +import { UserCancelledError, type IActionContext, type IAzureQuickPickItem } from '@microsoft/vscode-azext-utils'; import * as globby from 'globby'; import * as path from 'path'; import * as vscode from 'vscode'; diff --git a/src/vsCodeConfig/launch.ts b/src/vsCodeConfig/launch.ts index b43c389ec..d0a4c807c 100644 --- a/src/vsCodeConfig/launch.ts +++ b/src/vsCodeConfig/launch.ts @@ -3,7 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { DebugConfiguration, workspace, WorkspaceConfiguration, WorkspaceFolder } from "vscode"; +import { workspace, type DebugConfiguration, type WorkspaceConfiguration, type WorkspaceFolder } from "vscode"; const configurationsKey: string = 'configurations'; const launchKey: string = 'launch'; diff --git a/src/vsCodeConfig/promptToReinitializeProject.ts b/src/vsCodeConfig/promptToReinitializeProject.ts index 233ea9d60..bad814f37 100644 --- a/src/vsCodeConfig/promptToReinitializeProject.ts +++ b/src/vsCodeConfig/promptToReinitializeProject.ts @@ -3,8 +3,8 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { DialogResponses, IActionContext } from '@microsoft/vscode-azext-utils'; -import * as vscode from 'vscode'; +import { DialogResponses, type IActionContext } from '@microsoft/vscode-azext-utils'; +import type * as vscode from 'vscode'; import { initProjectForVSCode } from '../commands/initProjectForVSCode/initProjectForVSCode'; import { localize } from '../localize'; import { getWorkspaceSetting, updateWorkspaceSetting } from './settings'; diff --git a/src/vsCodeConfig/settings.ts b/src/vsCodeConfig/settings.ts index 887e84f44..7663a789e 100644 --- a/src/vsCodeConfig/settings.ts +++ b/src/vsCodeConfig/settings.ts @@ -3,8 +3,8 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { IActionContext } from "@microsoft/vscode-azext-utils"; -import { ConfigurationTarget, Uri, workspace, WorkspaceConfiguration, WorkspaceFolder } from "vscode"; +import { type IActionContext } from "@microsoft/vscode-azext-utils"; +import { ConfigurationTarget, Uri, workspace, type WorkspaceConfiguration, type WorkspaceFolder } from "vscode"; import { ProjectLanguage } from '../constants'; import { ext } from "../extensionVariables"; import { dotnetUtils } from "../utils/dotnetUtils"; diff --git a/src/vsCodeConfig/tasks.ts b/src/vsCodeConfig/tasks.ts index 720a1dbfa..01cb41c0e 100644 --- a/src/vsCodeConfig/tasks.ts +++ b/src/vsCodeConfig/tasks.ts @@ -3,7 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { TaskDefinition, workspace, WorkspaceConfiguration, WorkspaceFolder } from "vscode"; +import { workspace, type TaskDefinition, type WorkspaceConfiguration, type WorkspaceFolder } from "vscode"; const tasksKey: string = 'tasks'; const versionKey: string = 'version'; diff --git a/src/vsCodeConfig/verifyInitForVSCode.ts b/src/vsCodeConfig/verifyInitForVSCode.ts index 44ef0e145..37ade2703 100644 --- a/src/vsCodeConfig/verifyInitForVSCode.ts +++ b/src/vsCodeConfig/verifyInitForVSCode.ts @@ -3,12 +3,12 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { DialogResponses, IActionContext } from '@microsoft/vscode-azext-utils'; -import { FuncVersion, tryParseFuncVersion } from '../FuncVersion'; +import { DialogResponses, type IActionContext } from '@microsoft/vscode-azext-utils'; +import { tryParseFuncVersion, type FuncVersion } from '../FuncVersion'; import { initProjectForVSCode } from '../commands/initProjectForVSCode/initProjectForVSCode'; -import { ProjectLanguage, funcVersionSetting, projectLanguageModelSetting, projectLanguageSetting } from '../constants'; +import { funcVersionSetting, projectLanguageModelSetting, projectLanguageSetting, type ProjectLanguage } from '../constants'; import { localize } from '../localize'; -import { TemplateSchemaVersion } from '../templates/TemplateProviderBase'; +import { type TemplateSchemaVersion } from '../templates/TemplateProviderBase'; import { nonNullOrEmptyValue } from '../utils/nonNull'; import { getTemplateVersionFromLanguageAndModel } from '../utils/templateVersionUtils'; import { getWorkspaceSetting } from './settings'; diff --git a/src/vsCodeConfig/verifyPythonVenv.ts b/src/vsCodeConfig/verifyPythonVenv.ts index 7adb2f051..66bacfec0 100644 --- a/src/vsCodeConfig/verifyPythonVenv.ts +++ b/src/vsCodeConfig/verifyPythonVenv.ts @@ -3,15 +3,15 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { AzExtFsExtra, AzureWizard, DialogResponses, IActionContext } from '@microsoft/vscode-azext-utils'; +import { AzExtFsExtra, AzureWizard, DialogResponses, type IActionContext } from '@microsoft/vscode-azext-utils'; import * as path from 'path'; import * as vscode from 'vscode'; -import { IPythonVenvWizardContext } from '../commands/createNewProject/pythonSteps/IPythonVenvWizardContext'; +import { type FuncVersion } from '../FuncVersion'; +import { type IPythonVenvWizardContext } from '../commands/createNewProject/pythonSteps/IPythonVenvWizardContext'; import { PythonAliasListStep } from '../commands/createNewProject/pythonSteps/PythonAliasListStep'; import { PythonVenvCreateStep } from '../commands/createNewProject/pythonSteps/PythonVenvCreateStep'; import { pythonVenvSetting } from '../constants'; import { ext } from '../extensionVariables'; -import { FuncVersion } from '../FuncVersion'; import { localize } from '../localize'; import { getWorkspaceSetting, updateGlobalSetting } from './settings'; diff --git a/src/vsCodeConfig/verifyTargetFramework.ts b/src/vsCodeConfig/verifyTargetFramework.ts index ff135f5f9..2bb3fa29c 100644 --- a/src/vsCodeConfig/verifyTargetFramework.ts +++ b/src/vsCodeConfig/verifyTargetFramework.ts @@ -3,13 +3,13 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { DialogResponses, IActionContext } from '@microsoft/vscode-azext-utils'; -import * as vscode from 'vscode'; -import { deploySubpathSetting, ProjectLanguage } from '../constants'; +import { DialogResponses, type IActionContext } from '@microsoft/vscode-azext-utils'; +import type * as vscode from 'vscode'; +import { deploySubpathSetting, type ProjectLanguage } from '../constants'; import { localize } from '../localize'; import { dotnetUtils } from '../utils/dotnetUtils'; import { getWorkspaceSetting, updateWorkspaceSetting } from './settings'; -import { getTasks, ITask, updateTasks } from './tasks'; +import { getTasks, updateTasks, type ITask } from './tasks'; export async function verifyTargetFramework(projectLanguage: ProjectLanguage, folder: vscode.WorkspaceFolder, projectPath: string, context: IActionContext): Promise { const settingKey: string = 'showTargetFrameworkWarning'; diff --git a/src/vsCodeConfig/verifyVSCodeConfigOnActivate.ts b/src/vsCodeConfig/verifyVSCodeConfigOnActivate.ts index aedc365c1..4f3840edf 100644 --- a/src/vsCodeConfig/verifyVSCodeConfigOnActivate.ts +++ b/src/vsCodeConfig/verifyVSCodeConfigOnActivate.ts @@ -3,14 +3,14 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { callWithTelemetryAndErrorHandling, DialogResponses, IActionContext } from '@microsoft/vscode-azext-utils'; +import { callWithTelemetryAndErrorHandling, DialogResponses, type IActionContext } from '@microsoft/vscode-azext-utils'; import * as path from 'path'; -import * as vscode from 'vscode'; +import type * as vscode from 'vscode'; import { tryGetFunctionProjectRoot } from '../commands/createNewProject/verifyIsProject'; import { initProjectForVSCode } from '../commands/initProjectForVSCode/initProjectForVSCode'; import { funcVersionSetting, ProjectLanguage, projectLanguageModelSetting, projectLanguageSetting, TemplateFilter } from '../constants'; import { ext } from '../extensionVariables'; -import { FuncVersion, tryParseFuncVersion } from '../FuncVersion'; +import { tryParseFuncVersion, type FuncVersion } from '../FuncVersion'; import { localize } from '../localize'; import { verifyExtensionsConfig } from '../utils/verifyExtensionBundle'; import { getWorkspaceSetting, updateGlobalSetting } from './settings'; diff --git a/src/vscode-azurefunctions.api.d.ts b/src/vscode-azurefunctions.api.d.ts index 479a7cf07..a42cf44f8 100644 --- a/src/vscode-azurefunctions.api.d.ts +++ b/src/vscode-azurefunctions.api.d.ts @@ -3,9 +3,9 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { AzureWizardExecuteStep, IActionContext } from "@microsoft/vscode-azext-utils"; -import * as vscode from 'vscode'; -import { JobType } from "./templates/script/parseScriptTemplatesV2"; +import { type AzureWizardExecuteStep, type IActionContext } from "@microsoft/vscode-azext-utils"; +import type * as vscode from 'vscode'; +import { type JobType } from "./templates/script/parseScriptTemplatesV2"; export interface ILocalFunction { name: string; diff --git a/src/workspace/LocalFunction.ts b/src/workspace/LocalFunction.ts index 5db28c10f..b1e074156 100644 --- a/src/workspace/LocalFunction.ts +++ b/src/workspace/LocalFunction.ts @@ -3,11 +3,11 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { FunctionEnvelope } from "@azure/arm-appservice"; -import { IActionContext } from "@microsoft/vscode-azext-utils"; -import { ParsedFunctionJson } from "../funcConfig/function"; +import { type FunctionEnvelope } from "@azure/arm-appservice"; +import { type IActionContext } from "@microsoft/vscode-azext-utils"; +import { type ParsedFunctionJson } from "../funcConfig/function"; import { FunctionBase } from "../tree/FunctionBase"; -import { FuncHostRequest, IProjectTreeItem } from "../tree/IProjectTreeItem"; +import { type FuncHostRequest, type IProjectTreeItem } from "../tree/IProjectTreeItem"; export interface IFunction { project: IProjectTreeItem; diff --git a/src/workspace/LocalProject.ts b/src/workspace/LocalProject.ts index 1f9a5477e..0ffe63041 100644 --- a/src/workspace/LocalProject.ts +++ b/src/workspace/LocalProject.ts @@ -3,17 +3,17 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { AzExtFsExtra, IActionContext } from "@microsoft/vscode-azext-utils"; -import { Task, tasks } from "vscode"; -import { FuncVersion } from "../FuncVersion"; +import { AzExtFsExtra, type IActionContext } from "@microsoft/vscode-azext-utils"; +import { tasks, type Task } from "vscode"; +import { type FuncVersion } from "../FuncVersion"; import { hostFileName, localSettingsFileName } from "../constants"; -import { IParsedHostJson, parseHostJson } from "../funcConfig/host"; -import { ILocalSettingsJson, MismatchBehavior, getLocalSettingsJson, setLocalAppSetting } from "../funcConfig/local.settings"; +import { parseHostJson, type IParsedHostJson } from "../funcConfig/host"; +import { MismatchBehavior, getLocalSettingsJson, setLocalAppSetting, type ILocalSettingsJson } from "../funcConfig/local.settings"; import { getFuncPortFromTaskOrProject, isFuncHostTask, runningFuncPortMap } from "../funcCoreTools/funcHostTask"; -import { ApplicationSettings, FuncHostRequest } from "../tree/IProjectTreeItem"; +import { type ApplicationSettings, type FuncHostRequest } from "../tree/IProjectTreeItem"; import { ProjectSource } from "../tree/projectContextValues"; import { requestUtils } from "../utils/requestUtils"; -import { LocalProjectInternal, LocalProjectOptionsInternal } from "./listLocalProjects"; +import { type LocalProjectInternal, type LocalProjectOptionsInternal } from "./listLocalProjects"; import path = require("path"); export class LocalProject implements LocalProjectInternal { diff --git a/src/workspace/listLocalFunctions.ts b/src/workspace/listLocalFunctions.ts index 0cae95d82..fe654647e 100644 --- a/src/workspace/listLocalFunctions.ts +++ b/src/workspace/listLocalFunctions.ts @@ -3,16 +3,16 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { FunctionEnvelope } from "@azure/arm-appservice"; -import { AzExtFsExtra, IActionContext, callWithTelemetryAndErrorHandling, nonNullProp } from "@microsoft/vscode-azext-utils"; +import { type FunctionEnvelope } from "@azure/arm-appservice"; +import { AzExtFsExtra, callWithTelemetryAndErrorHandling, nonNullProp, type IActionContext } from "@microsoft/vscode-azext-utils"; import { functionJsonFileName } from "../constants"; import { ParsedFunctionJson } from "../funcConfig/function"; import { runningFuncTaskMap } from "../funcCoreTools/funcHostTask"; import { ProjectNotRunningError, getFunctionFolders } from "../tree/localProject/LocalFunctionsTreeItem"; import { isNodeV4Plus, isPythonV2Plus } from "../utils/programmingModelUtils"; import { requestUtils } from "../utils/requestUtils"; -import { ILocalFunction, LocalFunction } from "./LocalFunction"; -import { LocalProjectInternal } from "./listLocalProjects"; +import { LocalFunction, type ILocalFunction } from "./LocalFunction"; +import { type LocalProjectInternal } from "./listLocalProjects"; import path = require("path"); interface InvalidLocalFunction { diff --git a/src/workspace/listLocalProjects.ts b/src/workspace/listLocalProjects.ts index 30ef4fb4f..8362bd034 100644 --- a/src/workspace/listLocalProjects.ts +++ b/src/workspace/listLocalProjects.ts @@ -3,17 +3,17 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { IActionContext, callWithTelemetryAndErrorHandling } from "@microsoft/vscode-azext-utils"; +import { callWithTelemetryAndErrorHandling, type IActionContext } from "@microsoft/vscode-azext-utils"; import * as vscode from "vscode"; -import { FuncVersion, tryParseFuncVersion } from "../FuncVersion"; +import { tryParseFuncVersion, type FuncVersion } from "../FuncVersion"; import { tryGetFunctionProjectRoot } from "../commands/createNewProject/verifyIsProject"; import { getFunctionAppName, getJavaDebugSubpath } from "../commands/initProjectForVSCode/InitVSCodeStep/JavaInitVSCodeStep"; -import { JavaBuildTool, ProjectLanguage, funcVersionSetting, javaBuildTool, projectLanguageModelSetting, projectLanguageSetting } from "../constants"; +import { ProjectLanguage, funcVersionSetting, javaBuildTool, projectLanguageModelSetting, projectLanguageSetting, type JavaBuildTool } from "../constants"; import { localize } from "../localize"; -import { IProjectTreeItem } from "../tree/IProjectTreeItem"; +import { type IProjectTreeItem } from "../tree/IProjectTreeItem"; import { dotnetUtils } from "../utils/dotnetUtils"; import { getWorkspaceSetting } from "../vsCodeConfig/settings"; -import { ListLocalProjectsResult } from "../vscode-azurefunctions.api"; +import { type ListLocalProjectsResult } from "../vscode-azurefunctions.api"; import { LocalProject } from "./LocalProject"; import path = require("path"); diff --git a/test/addBinding.test.ts b/test/addBinding.test.ts index da10edc53..6f4bf8931 100644 --- a/test/addBinding.test.ts +++ b/test/addBinding.test.ts @@ -4,11 +4,11 @@ *--------------------------------------------------------------------------------------------*/ import { createTestActionContext, runWithTestActionContext } from '@microsoft/vscode-azext-dev'; -import { AzExtFsExtra, AzExtTreeItem } from '@microsoft/vscode-azext-utils'; +import { AzExtFsExtra, type AzExtTreeItem } from '@microsoft/vscode-azext-utils'; import * as assert from 'assert'; import * as path from 'path'; import { Uri } from 'vscode'; -import { IFunctionBinding, IFunctionJson, ProjectLanguage, addBinding, createNewProjectInternal, ext, getRandomHexString } from '../extension.bundle'; +import { ProjectLanguage, addBinding, createNewProjectInternal, ext, getRandomHexString, type IFunctionBinding, type IFunctionJson } from '../extension.bundle'; import { cleanTestWorkspace, getTestWorkspaceFolder } from './global.test'; suite('Add Binding', () => { diff --git a/test/api.test.ts b/test/api.test.ts index 664cb37c4..f9407a1a2 100644 --- a/test/api.test.ts +++ b/test/api.test.ts @@ -4,14 +4,14 @@ *--------------------------------------------------------------------------------------------*/ import { runWithInputs } from '@microsoft/vscode-azext-dev'; -import { apiUtils } from "@microsoft/vscode-azext-utils"; +import { type apiUtils } from "@microsoft/vscode-azext-utils"; import * as path from 'path'; -import { Extension, extensions } from "vscode"; +import { extensions, type Extension } from "vscode"; import { ProjectLanguage, extensionId, nonNullValue, registerOnActionStartHandler } from '../extension.bundle'; // eslint-disable-next-line no-restricted-imports -import { AzureFunctionsExtensionApi } from '../src/vscode-azurefunctions.api'; +import { type AzureFunctionsExtensionApi } from '../src/vscode-azurefunctions.api'; import { getTestWorkspaceFolder, testFolderPath } from './global.test'; -import { IValidateProjectOptions, getJavaScriptValidateOptions, validateProject } from './project/validateProject'; +import { getJavaScriptValidateOptions, validateProject, type IValidateProjectOptions } from './project/validateProject'; suite(`AzureFunctionsExtensionApi`, () => { let api: AzureFunctionsExtensionApi; diff --git a/test/createFunction/FunctionTesterBase.ts b/test/createFunction/FunctionTesterBase.ts index 970e34b74..2c0d39c9d 100644 --- a/test/createFunction/FunctionTesterBase.ts +++ b/test/createFunction/FunctionTesterBase.ts @@ -3,13 +3,13 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { runWithTestActionContext, TestActionContext } from '@microsoft/vscode-azext-dev'; +import { runWithTestActionContext, type TestActionContext } from '@microsoft/vscode-azext-dev'; import { AzExtFsExtra } from '@microsoft/vscode-azext-utils'; import * as assert from 'assert'; import * as path from 'path'; -import { Disposable } from 'vscode'; -import { createFunctionInternal, FunctionTemplateBase, FuncVersion, getRandomHexString, ProjectLanguage, TemplateFilter, TemplateSource } from '../../extension.bundle'; -import { addParallelSuite, ParallelSuiteOptions, ParallelTest } from '../addParallelSuite'; +import { type Disposable } from 'vscode'; +import { createFunctionInternal, getRandomHexString, TemplateFilter, type FunctionTemplateBase, type FuncVersion, type ProjectLanguage, type TemplateSource } from '../../extension.bundle'; +import { addParallelSuite, type ParallelSuiteOptions, type ParallelTest } from '../addParallelSuite'; import { runForTemplateSource, testFolderPath } from '../global.test'; export interface CreateFunctionTestCase { diff --git a/test/createFunction/createFunction.Ballerina.ts b/test/createFunction/createFunction.Ballerina.ts index eba623ed6..dc0fb1efb 100644 --- a/test/createFunction/createFunction.Ballerina.ts +++ b/test/createFunction/createFunction.Ballerina.ts @@ -9,7 +9,7 @@ import { FuncVersion, ProjectLanguage, funcVersionSetting, projectLanguageSettin import { allTemplateSources, isLongRunningVersion } from '../global.test'; import { getRotatingAuthLevel } from '../nightly/getRotatingValue'; import { runWithFuncSetting } from '../runWithSetting'; -import { CreateFunctionTestCase, FunctionTesterBase } from './FunctionTesterBase'; +import { FunctionTesterBase, type CreateFunctionTestCase } from './FunctionTesterBase'; class BallerinaFunctionTester extends FunctionTesterBase { public language: ProjectLanguage = ProjectLanguage.Ballerina; diff --git a/test/createFunction/createFunction.CSharp.test.ts b/test/createFunction/createFunction.CSharp.test.ts index 1f0f0a264..e6d5157c9 100644 --- a/test/createFunction/createFunction.CSharp.test.ts +++ b/test/createFunction/createFunction.CSharp.test.ts @@ -6,11 +6,11 @@ import { AzExtFsExtra } from '@microsoft/vscode-azext-utils'; import * as path from 'path'; import * as vscode from 'vscode'; -import { durableUtils, FuncVersion, funcVersionSetting, ProjectLanguage, projectLanguageSetting, TemplateSource } from '../../extension.bundle'; +import { durableUtils, FuncVersion, funcVersionSetting, ProjectLanguage, projectLanguageSetting, type TemplateSource } from '../../extension.bundle'; import { allTemplateSources, isLongRunningVersion } from '../global.test'; import { getRotatingAuthLevel } from '../nightly/getRotatingValue'; import { runWithFuncSetting } from '../runWithSetting'; -import { CreateFunctionTestCase, FunctionTesterBase } from './FunctionTesterBase'; +import { FunctionTesterBase, type CreateFunctionTestCase } from './FunctionTesterBase'; class CSharpFunctionTester extends FunctionTesterBase { public language: ProjectLanguage = ProjectLanguage.CSharp; diff --git a/test/createFunction/createFunction.CSharpScript.test.ts b/test/createFunction/createFunction.CSharpScript.test.ts index bfe360fc3..ecafbe4f6 100644 --- a/test/createFunction/createFunction.CSharpScript.test.ts +++ b/test/createFunction/createFunction.CSharpScript.test.ts @@ -6,7 +6,7 @@ import { AzExtFsExtra } from '@microsoft/vscode-azext-utils'; import * as path from 'path'; import * as vscode from 'vscode'; -import { durableUtils, FuncVersion, funcVersionSetting, ProjectLanguage, projectLanguageSetting, TemplateSource } from '../../extension.bundle'; +import { durableUtils, FuncVersion, funcVersionSetting, ProjectLanguage, projectLanguageSetting, type TemplateSource } from '../../extension.bundle'; import { allTemplateSources, shouldSkipVersion } from '../global.test'; import { getDotnetScriptValidateOptions, validateProject } from '../project/validateProject'; import { runWithFuncSetting } from '../runWithSetting'; diff --git a/test/createFunction/createFunction.JavaScript.v1.test.ts b/test/createFunction/createFunction.JavaScript.v1.test.ts index 4a7d9d1e6..21af764b4 100644 --- a/test/createFunction/createFunction.JavaScript.v1.test.ts +++ b/test/createFunction/createFunction.JavaScript.v1.test.ts @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ import * as path from 'path'; -import { FuncVersion, ProjectLanguage, TemplateSource } from '../../extension.bundle'; +import { FuncVersion, ProjectLanguage, type TemplateSource } from '../../extension.bundle'; import { allTemplateSources, shouldSkipVersion } from '../global.test'; import { FunctionTesterBase } from './FunctionTesterBase'; diff --git a/test/createFunction/createFunction.Script.v2.test.ts b/test/createFunction/createFunction.Script.v2.test.ts index 3b7e76ad4..a38fea30e 100644 --- a/test/createFunction/createFunction.Script.v2.test.ts +++ b/test/createFunction/createFunction.Script.v2.test.ts @@ -10,7 +10,7 @@ import { FuncVersion, ProjectLanguage, durableUtils, funcVersionSetting, project import { allTemplateSources, isLongRunningVersion } from '../global.test'; import { getRotatingAuthLevel } from '../nightly/getRotatingValue'; import { runWithFuncSetting } from '../runWithSetting'; -import { CreateFunctionTestCase, FunctionTesterBase } from './FunctionTesterBase'; +import { FunctionTesterBase, type CreateFunctionTestCase } from './FunctionTesterBase'; abstract class NodeScriptFunctionTester extends FunctionTesterBase { protected override async initializeTestFolder(testFolder: string): Promise { diff --git a/test/global.test.ts b/test/global.test.ts index abbac717e..d7b6516ce 100644 --- a/test/global.test.ts +++ b/test/global.test.ts @@ -9,7 +9,7 @@ import * as assert from 'assert'; import * as os from 'os'; import * as path from 'path'; import * as vscode from 'vscode'; -import { CentralTemplateProvider, deploySubpathSetting, envUtils, ext, FuncVersion, funcVersionSetting, getGlobalSetting, getRandomHexString, IActionContext, parseError, preDeployTaskSetting, ProjectLanguage, projectLanguageSetting, pythonVenvSetting, registerOnActionStartHandler, TemplateFilter, templateFilterSetting, TemplateSource, updateGlobalSetting, updateWorkspaceSetting } from '../extension.bundle'; +import { CentralTemplateProvider, deploySubpathSetting, envUtils, ext, FuncVersion, funcVersionSetting, getGlobalSetting, getRandomHexString, parseError, preDeployTaskSetting, ProjectLanguage, projectLanguageSetting, pythonVenvSetting, registerOnActionStartHandler, TemplateFilter, templateFilterSetting, TemplateSource, updateGlobalSetting, updateWorkspaceSetting, type IActionContext } from '../extension.bundle'; /** * Folder for most tests that do not need a workspace open diff --git a/test/nightly/createProjectAndDeploy.test.ts b/test/nightly/createProjectAndDeploy.test.ts index 581207446..f34896970 100644 --- a/test/nightly/createProjectAndDeploy.test.ts +++ b/test/nightly/createProjectAndDeploy.test.ts @@ -3,17 +3,17 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { ServiceClient } from '@azure/core-client'; +import { type ServiceClient } from '@azure/core-client'; import { createPipelineRequest } from '@azure/core-rest-pipeline'; -import { createTestActionContext, runWithTestActionContext, TestInput } from '@microsoft/vscode-azext-dev'; +import { createTestActionContext, runWithTestActionContext, type TestInput } from '@microsoft/vscode-azext-dev'; import { AzExtFsExtra } from '@microsoft/vscode-azext-utils'; import * as assert from 'assert'; import * as path from 'path'; import * as vscode from 'vscode'; -import { copyFunctionUrl, createGenericClient, createNewProjectInternal, deployProductionSlot, FuncVersion, getRandomHexString, nonNullProp } from '../../extension.bundle'; -import { addParallelSuite, ParallelTest, runInSeries } from '../addParallelSuite'; +import { FuncVersion, copyFunctionUrl, createGenericClient, createNewProjectInternal, deployProductionSlot, getRandomHexString, nonNullProp } from '../../extension.bundle'; +import { addParallelSuite, runInSeries, type ParallelTest } from '../addParallelSuite'; import { getTestWorkspaceFolder } from '../global.test'; -import { defaultTestFuncVersion, getBallerinaValidateOptions, getCSharpValidateOptions, getJavaScriptValidateOptions, getPowerShellValidateOptions, getPythonValidateOptions, getTypeScriptValidateOptions, IValidateProjectOptions, validateProject } from '../project/validateProject'; +import { defaultTestFuncVersion, getBallerinaValidateOptions, getCSharpValidateOptions, getJavaScriptValidateOptions, getPowerShellValidateOptions, getPythonValidateOptions, getTypeScriptValidateOptions, validateProject, type IValidateProjectOptions } from '../project/validateProject'; import { getRotatingAuthLevel, getRotatingLocation, getRotatingNodeVersion, getRotatingPythonVersion } from './getRotatingValue'; import { resourceGroupsToDelete } from './global.nightly.test'; diff --git a/test/nightly/functionAppOperations.test.ts b/test/nightly/functionAppOperations.test.ts index 0256fb918..a805e9bf7 100644 --- a/test/nightly/functionAppOperations.test.ts +++ b/test/nightly/functionAppOperations.test.ts @@ -3,12 +3,12 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { Site } from '@azure/arm-appservice'; +import { type Site } from '@azure/arm-appservice'; import { tryGetWebApp } from '@microsoft/vscode-azext-azureappservice'; import { runWithInputs, runWithTestActionContext } from '@microsoft/vscode-azext-dev'; import * as assert from 'assert'; import * as vscode from 'vscode'; -import { createFunctionAppAdvanced, deleteFunctionApp, DialogResponses, getRandomHexString, ProjectLanguage, registerOnActionStartHandler } from '../../extension.bundle'; +import { DialogResponses, ProjectLanguage, createFunctionAppAdvanced, deleteFunctionApp, getRandomHexString, registerOnActionStartHandler } from '../../extension.bundle'; import { cleanTestWorkspace, longRunningTestsEnabled } from '../global.test'; import { runWithFuncSetting } from '../runWithSetting'; import { getRotatingLocation, getRotatingNodeVersion } from './getRotatingValue'; diff --git a/test/project/createAndValidateProject.ts b/test/project/createAndValidateProject.ts index ae33f763d..b688db9b9 100644 --- a/test/project/createAndValidateProject.ts +++ b/test/project/createAndValidateProject.ts @@ -3,14 +3,14 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { TestActionContext, TestInput } from '@microsoft/vscode-azext-dev'; +import { type TestActionContext, type TestInput } from '@microsoft/vscode-azext-dev'; import * as path from 'path'; import { ProjectLanguage, createNewProjectInternal, getRandomHexString, hiddenStacksSetting } from '../../extension.bundle'; // eslint-disable-next-line no-restricted-imports -import * as api from '../../src/vscode-azurefunctions.api'; +import type * as api from '../../src/vscode-azurefunctions.api'; import { testFolderPath } from '../global.test'; import { runWithFuncSetting } from '../runWithSetting'; -import { IValidateProjectOptions, validateProject } from './validateProject'; +import { validateProject, type IValidateProjectOptions } from './validateProject'; export interface ICreateProjectTestOptions extends IValidateProjectOptions { isHiddenLanguage?: boolean; diff --git a/test/project/createNewProject.test.ts b/test/project/createNewProject.test.ts index 5bc4b69d8..af72a02ee 100644 --- a/test/project/createNewProject.test.ts +++ b/test/project/createNewProject.test.ts @@ -5,9 +5,9 @@ import { runWithTestActionContext, TestInput } from '@microsoft/vscode-azext-dev'; import { FuncVersion, JavaBuildTool, ProjectLanguage, TemplateSource } from '../../extension.bundle'; -import { addParallelSuite, ParallelTest } from '../addParallelSuite'; +import { addParallelSuite, type ParallelTest } from '../addParallelSuite'; import { allTemplateSources, runForTemplateSource, shouldSkipVersion } from '../global.test'; -import { createAndValidateProject, ICreateProjectTestOptions } from './createAndValidateProject'; +import { createAndValidateProject, type ICreateProjectTestOptions } from './createAndValidateProject'; import { getBallerinaValidateOptions, getCSharpValidateOptions, getCustomValidateOptions, getDotnetScriptValidateOptions, getFSharpValidateOptions, getJavaScriptValidateOptions, getJavaValidateOptions, getPowerShellValidateOptions, getPythonValidateOptions, getTypeScriptValidateOptions } from './validateProject'; interface CreateProjectTestCase extends ICreateProjectTestOptions { diff --git a/test/project/initProjectForVSCode.test.ts b/test/project/initProjectForVSCode.test.ts index ed3430784..c1c5f6e38 100644 --- a/test/project/initProjectForVSCode.test.ts +++ b/test/project/initProjectForVSCode.test.ts @@ -3,12 +3,12 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { runWithTestActionContext, TestInput } from '@microsoft/vscode-azext-dev'; +import { runWithTestActionContext, type TestInput } from '@microsoft/vscode-azext-dev'; import { AzExtFsExtra } from '@microsoft/vscode-azext-utils'; import * as path from 'path'; import { FuncVersion, getRandomHexString, initProjectForVSCode, JavaBuildTool, ProjectLanguage } from '../../extension.bundle'; import { cleanTestWorkspace, testFolderPath } from '../global.test'; -import { getBallerinaValidateOptions, getCSharpValidateOptions, getCustomValidateOptions, getFSharpValidateOptions, getJavaScriptValidateOptions, getJavaValidateOptions, getPowerShellValidateOptions, getPythonValidateOptions, getTypeScriptValidateOptions, IValidateProjectOptions, validateProject } from './validateProject'; +import { getBallerinaValidateOptions, getCSharpValidateOptions, getCustomValidateOptions, getFSharpValidateOptions, getJavaScriptValidateOptions, getJavaValidateOptions, getPowerShellValidateOptions, getPythonValidateOptions, getTypeScriptValidateOptions, validateProject, type IValidateProjectOptions } from './validateProject'; suite('Init Project For VS Code', function (this: Mocha.Suite): void { this.timeout(30 * 1000); diff --git a/test/project/validateProject.ts b/test/project/validateProject.ts index 332a80bdf..f10e4c309 100644 --- a/test/project/validateProject.ts +++ b/test/project/validateProject.ts @@ -8,7 +8,7 @@ import * as assert from 'assert'; import * as fse from 'fs-extra'; import * as globby from 'globby'; import * as path from 'path'; -import { extensionId, FuncVersion, getContainingWorkspace, IExtensionsJson, ILaunchJson, ITasksJson, JavaBuildTool, ProjectLanguage } from '../../extension.bundle'; +import { FuncVersion, JavaBuildTool, ProjectLanguage, extensionId, getContainingWorkspace, type IExtensionsJson, type ILaunchJson, type ITasksJson } from '../../extension.bundle'; export const defaultTestFuncVersion: FuncVersion = FuncVersion.v4; diff --git a/test/templateCount.test.ts b/test/templateCount.test.ts index f325ff5b5..84f8d7b73 100644 --- a/test/templateCount.test.ts +++ b/test/templateCount.test.ts @@ -5,7 +5,7 @@ import { runWithTestActionContext } from '@microsoft/vscode-azext-dev'; import * as assert from 'assert'; -import { CentralTemplateProvider, FuncVersion, FunctionTemplateBase, ProjectLanguage, TemplateFilter, TemplateSource } from '../extension.bundle'; +import { FuncVersion, ProjectLanguage, TemplateFilter, TemplateSource, type CentralTemplateProvider, type FunctionTemplateBase } from '../extension.bundle'; import { getTestWorkspaceFolder, longRunningTestsEnabled, runForTemplateSource, shouldSkipVersion, skipStagingTemplateSource } from './global.test'; import { javaUtils } from './utils/javaUtils'; diff --git a/test/updateBackupTemplates.ts b/test/updateBackupTemplates.ts index 3953a1eab..7cb5d6bc7 100644 --- a/test/updateBackupTemplates.ts +++ b/test/updateBackupTemplates.ts @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ import { createTestActionContext } from '@microsoft/vscode-azext-dev'; -import { CentralTemplateProvider, FuncVersion, ProjectLanguage, supportedLanguages as resourceLanguages, TemplateProviderBase } from '../extension.bundle'; +import { CentralTemplateProvider, FuncVersion, ProjectLanguage, supportedLanguages as resourceLanguages, type TemplateProviderBase } from '../extension.bundle'; import { getTestWorkspaceFolder, updateBackupTemplates } from './global.test'; import { javaUtils } from './utils/javaUtils';