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

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/browser/fs-extra.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/

/* eslint-disable */
export const fse = {};
2 changes: 1 addition & 1 deletion src/commands/browseContainerApp.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import { localize } from '../utils/localize';
import { pickContainerApp } from '../utils/pickItem/pickContainerApp';

export async function browseContainerAppNode(context: IActionContext, node?: ContainerAppItem): Promise<void> {
node ??= await pickContainerApp(context)
node ??= await pickContainerApp(context);
await browseContainerApp(node.containerApp);
}

Expand Down
2 changes: 1 addition & 1 deletion src/commands/createContainerApp/createContainerApp.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ export async function createContainerApp(context: IActionContext, item?: Managed
wizardContext.telemetry.properties.isAzdExtensionInstalled = 'true';
}

const wizard: AzureWizard<ContainerAppCreateContext> = new AzureWizard(wizardContext, {
const wizard = new AzureWizard<ContainerAppCreateContext>(wizardContext, {
title: localize('createContainerApp', 'Create container app'),
promptSteps: [
new ContainerAppCreateStartingResourcesLogStep(item),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ export async function showContainerAppNotification(containerApp: ContainerApp, i
const browse: MessageItem = { title: localize('browse', 'Browse') };
const buttons: MessageItem[] = [];
if (isIngressEnabled(containerApp)) {
buttons.push(browse)
buttons.push(browse);
}
const result = await window.showInformationMessage(message, ...buttons)
const result = await window.showInformationMessage(message, ...buttons);

context.telemetry.properties.clicked = 'canceled';
if (result === browse) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export class LogAnalyticsListStep extends AzureWizardPromptStep<ManagedEnvironme

const workspaces: Workspace[] = await LogAnalyticsListStep.getLogAnalyticsWorkspaces(context);
return picks.concat(workspaces.map(ws => {
return { label: nonNullProp(ws, 'name'), data: ws }
return { label: nonNullProp(ws, 'name'), data: ws };
}));
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ export async function createManagedEnvironment(context: IActionContext, node?: {
LocationListStep.addProviderForFiltering(wizardContext, logAnalyticsProvider, logAnalyticsResourceType);
LocationListStep.addStep(wizardContext, promptSteps);

const wizard: AzureWizard<ManagedEnvironmentCreateContext> = new AzureWizard(wizardContext, {
const wizard = new AzureWizard<ManagedEnvironmentCreateContext>(wizardContext, {
title,
promptSteps,
executeSteps,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export async function deleteManagedEnvironment(context: IActionContext, node?: M
containerAppNames: containerApps.map(ca => ca.name),
};

const wizard: AzureWizard<IDeleteManagedEnvironmentContext> = new AzureWizard(wizardContext, {
const wizard = new AzureWizard<IDeleteManagedEnvironmentContext>(wizardContext, {
title: localize('deleteManagedEnvironment', 'Delete container apps environment "{0}"', managedEnvironment.name),
promptSteps: [new DeleteEnvironmentConfirmationStep()],
executeSteps: [new DeleteAllContainerAppsStep(), new DeleteManagedEnvironmentStep()]
Expand Down
4 changes: 2 additions & 2 deletions src/commands/deployContainerApp/deployContainerApp.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ export async function deployContainerApp(context: IActionContext, node?: Contain
let confirmationViewTabTitle: string = localize('deployContainerAppTabTitle', 'Summary - Deploy Image to Container App');
let title: string = localize('deployContainerAppTitle', 'Deploy image to container app');

const promptSteps: AzureWizardPromptStep<ContainerAppDeployContext>[] = []
const promptSteps: AzureWizardPromptStep<ContainerAppDeployContext>[] = [];
if (wizardContext.ui instanceof CopilotUserInput) {
promptSteps.push(new OpenLoadingViewStep());
confirmationViewDescription = localize('viewDescription', 'Please review AI generated inputs and select any you would like to modify. Note: Any input proceeding the modified input will need to change as well');
Expand All @@ -80,7 +80,7 @@ export async function deployContainerApp(context: IActionContext, node?: Contain
new OpenConfirmationViewStep(confirmationViewTitle, confirmationViewTabTitle, confirmationViewDescription, title, () => wizard.confirmationViewProperties)
);

const wizard: AzureWizard<ContainerAppDeployContext> = new AzureWizard(wizardContext, {
const wizard = new AzureWizard<ContainerAppDeployContext>(wizardContext, {
title: title,
promptSteps: promptSteps,
executeSteps: [
Expand Down
2 changes: 1 addition & 1 deletion src/commands/deployImage/deployImage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ export async function deployImage(context: IActionContext & Partial<ContainerReg
wizardContext.telemetry.properties.basedOnLatestRevision = containerApp.latestRevisionName === node.revision.name ? 'true' : 'false';

const parentResourceName: string = getParentResource(containerApp, node.revision).name ?? containerApp.name;
const wizard: AzureWizard<DeployImageContext> = new AzureWizard(wizardContext, {
const wizard = new AzureWizard<DeployImageContext>(wizardContext, {
title: localize('deployImageTitle', 'Deploy image to "{0}"', parentResourceName),
promptSteps: [
new ContainerAppDeployStartingResourcesLogStep(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ type TreeItemDeploymentConfigurationContext = IContainerAppContext & DeploymentC
export async function getTreeItemDeploymentConfiguration(context: IContainerAppContext, item: ContainerAppItem): Promise<DeploymentConfiguration> {
const wizardContext: TreeItemDeploymentConfigurationContext = context;

const wizard: AzureWizard<TreeItemDeploymentConfigurationContext> = new AzureWizard(wizardContext, {
const wizard = new AzureWizard<TreeItemDeploymentConfigurationContext>(wizardContext, {
promptSteps: [new RootFolderStep()],
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@ export class DockerfileValidateStep extends FilePathsVerifyStep {
fileType = 'dockerfile';

public shouldExecute(context: WorkspaceDeploymentConfigurationContext): boolean {
return !context.dockerfilePath
return !context.dockerfilePath;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export async function getWorkspaceDeploymentConfiguration(context: IContainerApp
...await createActivityContext(),
});

const wizard: AzureWizard<WorkspaceDeploymentConfigurationContext> = new AzureWizard(wizardContext, {
const wizard = new AzureWizard<WorkspaceDeploymentConfigurationContext>(wizardContext, {
title: localize('selectWorkspaceDeploymentConfigurationTitle', 'Select a workspace deployment configuration'),
promptSteps: [
new RootFolderStep(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export class ManagedEnvironmentSortByLocalSettingsStrategy<T extends DeployWorks
}

const asyncTasks: Promise<void>[] = [];
const recommendedEnvironmentIds: Set<string> = new Set();
const recommendedEnvironmentIds = new Set<string>();

const client = await createContainerAppsAPIClient(context);
for (const config of deploymentConfigurations) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ export async function deployWorkspaceProjectInternal(
new DeployWorkspaceProjectSaveSettingsStep()
);

const wizard: AzureWizard<DeployWorkspaceProjectInternalContext> = new AzureWizard(wizardContext, {
const wizard = new AzureWizard<DeployWorkspaceProjectInternalContext>(wizardContext, {
title: options.suppressWizardTitle ?
undefined :
localize('deployWorkspaceProjectTitle', 'Deploy workspace project to a container app'),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import { ConvertSettingsStep } from "./ConvertSettingsStep";
export async function convertV1ToV2SettingsSchema(context: IContainerAppContext): Promise<ConvertSettingsContext> {
const wizardContext: ConvertSettingsContext = context;

const wizard: AzureWizard<ConvertSettingsContext> = new AzureWizard(wizardContext, {
const wizard = new AzureWizard<ConvertSettingsContext>(wizardContext, {
promptSteps: [new RootFolderStep()],
executeSteps: [new ConvertSettingsStep()]
});
Expand Down
2 changes: 1 addition & 1 deletion src/commands/editContainer/editContainer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ export async function editContainer(context: IActionContext, node?: ContainersIt
wizardContext.telemetry.properties.containersIdx = String(wizardContext.containersIdx ?? 0);
wizardContext.telemetry.properties.basedOnLatestRevision = containerApp.latestRevisionName === item.revision.name ? 'true' : 'false';

const wizard: AzureWizard<ContainerEditContext> = new AzureWizard(wizardContext, {
const wizard = new AzureWizard<ContainerEditContext>(wizardContext, {
title: localize('editContainer', 'Edit container profile for "{0}" (draft)', parentResource.name),
promptSteps: [
new ContainerEditStartingResourcesLogStep(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ export async function editContainerImage(context: IActionContext, node?: ImageIt
wizardContext.telemetry.properties.containersIdx = String(item.containersIdx ?? 0);
wizardContext.telemetry.properties.basedOnLatestRevision = containerApp.latestRevisionName === item.revision.name ? 'true' : 'false';

const wizard: AzureWizard<ContainerEditUpdateContext> = new AzureWizard(wizardContext, {
const wizard = new AzureWizard<ContainerEditUpdateContext>(wizardContext, {
title: localize('editContainerImage', 'Edit container image for "{0}" (draft)', parentResource.name),
promptSteps: [
new ContainerEditStartingResourcesLogStep(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ export async function addEnvironmentVariable(context: IActionContext, node?: Env
};
wizardContext.telemetry.properties.revisionMode = containerApp.revisionsMode;

const wizard: AzureWizard<EnvironmentVariableAddContext> = new AzureWizard(wizardContext, {
const wizard = new AzureWizard<EnvironmentVariableAddContext>(wizardContext, {
title: localize('updateEnvironmentVariables', 'Add environment variable to "{0}" (draft)', parentResource.name),
promptSteps: [
new EnvironmentVariableNameStep(item),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ export async function convertEnvironmentVariable(context: IActionContext, node?:
// Create an output reference to pass to the draft step so we can edit after prompting
const editDraftStepOutputs: EnvironmentVariableEditOutputs = {};

const wizard: AzureWizard<EnvironmentVariableConvertContext> = new AzureWizard(wizardContext, {
const wizard = new AzureWizard<EnvironmentVariableConvertContext>(wizardContext, {
title: localize('convertEnvironmentVariableTitle', 'Convert environment variable "{0}" to use a secret (draft)', wizardContext.environmentVariable.name),
promptSteps: [
new SecretNameStep(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ export async function deleteEnvironmentVariable(context: IActionContext, node?:
wizardContext.telemetry.properties.revisionMode = containerApp.revisionsMode;

const confirmMessage: string = localize('confirmDeleteEnv', 'Are you sure you want to delete environment variable "{0}" locally?\n\nThis change will not be reflected in your container app until you deploy changes.', item.envVariable.name);
const wizard: AzureWizard<EnvironmentVariableDeleteContext> = new AzureWizard(wizardContext, {
const wizard = new AzureWizard<EnvironmentVariableDeleteContext>(wizardContext, {
title: localize('deleteEnvironmentVariable', 'Delete environment variable "{0}" from "{1}" (draft)', item.envVariable.name, parentResource.name),
promptSteps: [
new DeleteConfirmationStep(confirmMessage),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ export async function editEnvironmentVariableName(context: IActionContext, node?
// Create an output reference to pass to the draft step so we can edit after prompting
const editDraftStepOutputs: EnvironmentVariableEditOutputs = {};

const wizard: AzureWizard<EnvironmentVariableEditContext> = new AzureWizard(wizardContext, {
const wizard = new AzureWizard<EnvironmentVariableEditContext>(wizardContext, {
title: localize('editNameTitle', 'Edit environment variable name in "{0}" (draft)', parentResource.name),
promptSteps: [
new EnvironmentVariableNameStep(item),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ export async function editEnvironmentVariableValue(context: IActionContext, node
const editDraftStepOutputs: EnvironmentVariableEditOutputs = {};

const title: string = localize('editEnvironmentVariableValue', 'Edit environment variable value for "{0}" (draft)', wizardContext.environmentVariable.name);
const wizard: AzureWizard<EnvironmentVariableEditContext> = new AzureWizard(wizardContext, {
const wizard = new AzureWizard<EnvironmentVariableEditContext>(wizardContext, {
title,
promptSteps: [
new EnvironmentVariableTypeListStep(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export class EnvironmentVariablesEditDraftStep<T extends EnvironmentVariablesEdi
this.revisionDraftTemplate.containers ??= [];
const container: Container = this.revisionDraftTemplate.containers[context.containersIdx] ?? {};

const envMap: Map<string, EnvironmentVar> = new Map();
const envMap = new Map<string, EnvironmentVar>();
// Set current environment variables
for (const env of container.env ?? []) {
envMap.set(nonNullProp(env, 'name'), env);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ export async function editEnvironmentVariables(context: IActionContext, node?: E
};
wizardContext.telemetry.properties.revisionMode = containerApp.revisionsMode;

const wizard: AzureWizard<EnvironmentVariablesEditContext> = new AzureWizard(wizardContext, {
const wizard = new AzureWizard<EnvironmentVariablesEditContext>(wizardContext, {
title: localize('editEnvironmentVariables', 'Edit environment variables for "{0}" (draft)', parentResource.name),
promptSteps: [
new EnvFileListStep({ suppressSkipPick: true }),
Expand Down
2 changes: 1 addition & 1 deletion src/commands/gitHub/disconnectRepo/disconnectRepo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ export async function disconnectRepo(context: ITreeItemPickerContext, node?: Con
new GitHubRepositoryDisconnectStep()
];

const wizard: AzureWizard<IDisconnectRepoContext> = new AzureWizard(wizardContext, {
const wizard = new AzureWizard<IDisconnectRepoContext>(wizardContext, {
title: localize('disconnectRepository', 'Disconnect "{0}" from a GitHub repository', containerApp.name),
promptSteps,
executeSteps,
Expand Down
2 changes: 1 addition & 1 deletion src/commands/image/imageSource/EnvFileListStep.ts
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ export class EnvFileListStep<T extends EnvFileListContext> extends AzureWizardPr

const data: string = await AzExtFsExtra.readFile(envPath);
const envData: DotenvParseOutput = parse(data);
return Object.keys(envData).map(name => { return { name, value: envData[name] } });
return Object.keys(envData).map(name => { return { name, value: envData[name] }; });
}

public static async workspaceHasEnvFile(rootFolder?: WorkspaceFolder): Promise<boolean> {
Expand Down
2 changes: 1 addition & 1 deletion src/commands/image/imageSource/ImageSourceListStep.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ export class ImageSourceListStep extends AzureWizardPromptStep<ImageSourceContex

const isVirtualWorkspace = !!workspace.workspaceFolders?.length && workspace.workspaceFolders.every(f => f.uri.scheme !== 'file');
if (env.uiKind === UIKind.Desktop && !isVirtualWorkspace) {
picks.push({ label: imageSourceLabels[2], detail: imageSourceDetails[2], data: ImageSource.RemoteAcrBuild, suppressPersistence: true })
picks.push({ label: imageSourceLabels[2], detail: imageSourceDetails[2], data: ImageSource.RemoteAcrBuild, suppressPersistence: true });
}

context.imageSource = (await context.ui.showQuickPick(picks, { placeHolder })).data;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export abstract class RegistryRepositoriesListStepBase extends AzureWizardPrompt
} else {
result = await context.ui.showQuickPick(this.getPicks(context, picksCache), { placeHolder });
}
} while (result === noMatchingResourcesQp || result === loadMoreQp)
} while (result === noMatchingResourcesQp || result === loadMoreQp);

context.repositoryName = result.label;
}
Expand All @@ -36,7 +36,7 @@ export abstract class RegistryRepositoriesListStepBase extends AzureWizardPrompt
name: localize('repository', 'Repository'),
value: context.repositoryName ?? '',
contextPropertyName: 'repositoryName'
}
};
}

public abstract getPicks(context: ContainerRegistryImageSourceContext, picksCache: QuickPicksCache | undefined): Promise<QuickPickItem[]>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export abstract class RepositoryTagListStepBase extends AzureWizardPromptStep<Co

do {
result = await context.ui.showQuickPick(this.getPicks(context, picksCache), { placeHolder });
} while (result === loadMoreQp)
} while (result === loadMoreQp);

context.tag = result.label;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ export class AcrListStep<T extends ContainerRegistryImageSourceContext> extends
name: localize('registry', 'Registry'),
value: this.pickLabel ?? '',
contextPropertyName: 'registry'
}
};
}

private async getPicks(context: T): Promise<IAzureQuickPickItem<Registry | typeof noMatchingResources | undefined>[]> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ export class AcrTagListStep extends RepositoryTagListStepBase {
const manifests: ArtifactManifestProperties[] = await uiUtils.listAllIterator(repoClient.listManifestProperties());

const tags = manifests.reduce((allTags: { tag: string, date: Date }[], m) => {
const tagsWithDates = m.tags.map(t => { return { tag: t, date: m.lastUpdatedOn } });
const tagsWithDates = m.tags.map(t => { return { tag: t, date: m.lastUpdatedOn }; });
return allTags.concat(tagsWithDates);
}, []);
return tags.map((t) => { { return { label: t.tag, description: dayjs(t.date).fromNow() } } });
return tags.map((t) => { { return { label: t.tag, description: dayjs(t.date).fromNow() }; } });
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ export class RegistryNameStep extends AzureWizardPromptStep<CreateAcrContext> {

generatedName = generateRelatedName(name);
registryAvailable = !!(await RegistryNameStep.isNameAvailable(context, generatedName)).nameAvailable;
} while (!registryAvailable)
} while (!registryAvailable);

if (!registryAvailable) {
throw new Error(localize('failedToGenerateName', 'Failed to generate an available container registry name.'));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export async function createAcr(context: IActionContext, node?: { subscription:

LocationListStep.addStep(wizardContext, promptSteps);

const wizard: AzureWizard<CreateAcrContext> = new AzureWizard(wizardContext, {
const wizard = new AzureWizard<CreateAcrContext>(wizardContext, {
title,
promptSteps,
executeSteps,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ export class DockerHubContainerRepositoryListStep extends RegistryRepositoriesLi
const picks: QuickPickItem[] = response.results.map((r) => {
return !!suggestedRepository && r.name === suggestedRepository ?
{ label: r.name, description: r.description ? `${r.description} ${currentlyDeployedPickDescription}` : currentlyDeployedPickDescription, suppressPersistence: true } :
{ label: r.name, description: r.description, suppressPersistence: srExists }
{ label: r.name, description: r.description, suppressPersistence: srExists };
});
cachedPicks.cache.push(...picks);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export class DockerHubContainerTagListStep extends RepositoryTagListStepBase {
public async getPicks(context: ContainerRegistryImageSourceContext, cachedPicks: QuickPicksCache): Promise<QuickPickItem[]> {
const response = await getTagsForRepo(context, nonNullProp(context, 'dockerHubNamespace'), nonNullProp(context, 'repositoryName'), cachedPicks.next);

cachedPicks.cache.push(...response.results.map((t) => { return { label: t.name } }));
cachedPicks.cache.push(...response.results.map((t) => { return { label: t.name }; }));

if (response.next) {
cachedPicks.next = response.next;
Expand Down
Loading