From a816a4690d4786a72a020a0cbbd89fe00d0cf5c4 Mon Sep 17 00:00:00 2001 From: Matthew Rayermann Date: Tue, 23 Jan 2024 09:25:30 -0800 Subject: [PATCH] Changes to azure package --- azure/package-lock.json | 143 ++++++++++++++++++++------- azure/package.json | 2 +- azure/src/wizard/LocationListStep.ts | 18 +++- 3 files changed, 123 insertions(+), 40 deletions(-) diff --git a/azure/package-lock.json b/azure/package-lock.json index 60bb50e8d8..d58c711937 100644 --- a/azure/package-lock.json +++ b/azure/package-lock.json @@ -1,6 +1,6 @@ { "name": "@microsoft/vscode-azext-azureutils", - "version": "2.0.3", + "version": "2.1.0-agent.1", "lockfileVersion": 3, "requires": true, "packages": { @@ -17,7 +17,7 @@ "@azure/core-client": "^1.6.0", "@azure/core-rest-pipeline": "^1.9.0", "@azure/logger": "^1.0.4", - "@microsoft/vscode-azext-utils": "^2.0.0", + "@microsoft/vscode-azext-utils": "2.2.0-agent.1", "semver": "^7.3.7", "uuid": "^9.0.0" }, @@ -415,46 +415,105 @@ } }, "node_modules/@microsoft/1ds-core-js": { - "version": "3.2.9", - "resolved": "https://registry.npmjs.org/@microsoft/1ds-core-js/-/1ds-core-js-3.2.9.tgz", - "integrity": "sha512-3pCfM2TzHn3gU9pxHztduKcVRdb/nzruvPFfHPZD0IM0mb0h6TGo2isELF3CTMahTx50RAC51ojNIw2/7VRkOg==", + "version": "4.0.5", + "resolved": "https://registry.npmjs.org/@microsoft/1ds-core-js/-/1ds-core-js-4.0.5.tgz", + "integrity": "sha512-uTOSUoXt/KgnLlGWED+vLLnYCFq1kDFbej+pGAbR+6tMGajCgw3Xz3Xcal0nYhk9RM2hvWWAt5gs6Bu2Si/46g==", "dependencies": { - "@microsoft/applicationinsights-core-js": "2.8.10", - "@microsoft/applicationinsights-shims": "^2.0.2", - "@microsoft/dynamicproto-js": "^1.1.7" + "@microsoft/applicationinsights-core-js": "3.0.7", + "@microsoft/applicationinsights-shims": "3.0.1", + "@microsoft/dynamicproto-js": "^2.0.2", + "@nevware21/ts-async": ">= 0.3.0 < 2.x", + "@nevware21/ts-utils": ">= 0.10.1 < 2.x" } }, "node_modules/@microsoft/1ds-post-js": { - "version": "3.2.9", - "resolved": "https://registry.npmjs.org/@microsoft/1ds-post-js/-/1ds-post-js-3.2.9.tgz", - "integrity": "sha512-D/RtqkQ2Nr4cuoGqmhi5QTmi3cBlxehIThJ1u3BaH9H/YkLNTKEcHZRWTXy14bXheCefNHciLuadg37G2Kekcg==", + "version": "4.0.5", + "resolved": "https://registry.npmjs.org/@microsoft/1ds-post-js/-/1ds-post-js-4.0.5.tgz", + "integrity": "sha512-jziJe/nXxgDhnW0sWkXbj9ZfwHXRH6UCn6eGgyWlog3iWP8FgXzna8Rugvct2r43XEqGs6c/NKxuFXAVtyGXjg==", + "dependencies": { + "@microsoft/1ds-core-js": "4.0.5", + "@microsoft/applicationinsights-shims": "3.0.1", + "@microsoft/dynamicproto-js": "^2.0.2", + "@nevware21/ts-async": ">= 0.3.0 < 2.x", + "@nevware21/ts-utils": ">= 0.10.1 < 2.x" + } + }, + "node_modules/@microsoft/applicationinsights-channel-js": { + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/@microsoft/applicationinsights-channel-js/-/applicationinsights-channel-js-3.0.7.tgz", + "integrity": "sha512-3y8ct8V2bGo7QaYVrfQcWZeOci2tUZhXkme3k7nKa2P7upSX/1d+dPF12EelxrtWVLxtfCQJkk+2W4M1AyejGQ==", "dependencies": { - "@microsoft/1ds-core-js": "3.2.9", - "@microsoft/applicationinsights-shims": "^2.0.2", - "@microsoft/dynamicproto-js": "^1.1.7" + "@microsoft/applicationinsights-common": "3.0.7", + "@microsoft/applicationinsights-core-js": "3.0.7", + "@microsoft/applicationinsights-shims": "3.0.1", + "@microsoft/dynamicproto-js": "^2.0.2", + "@nevware21/ts-async": ">= 0.3.0 < 2.x", + "@nevware21/ts-utils": ">= 0.10.1 < 2.x" + }, + "peerDependencies": { + "tslib": "*" + } + }, + "node_modules/@microsoft/applicationinsights-common": { + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/@microsoft/applicationinsights-common/-/applicationinsights-common-3.0.7.tgz", + "integrity": "sha512-boumvLA7LZu0NmwT9ThpTAI64BNYUlOkFNcjUbYeKNEaE6CBPGX/z25XXlYu+j4hHldDaCn9zC1LuN7AuoMJSA==", + "dependencies": { + "@microsoft/applicationinsights-core-js": "3.0.7", + "@microsoft/applicationinsights-shims": "3.0.1", + "@microsoft/dynamicproto-js": "^2.0.2", + "@nevware21/ts-utils": ">= 0.10.1 < 2.x" + }, + "peerDependencies": { + "tslib": "*" } }, "node_modules/@microsoft/applicationinsights-core-js": { - "version": "2.8.10", - "resolved": "https://registry.npmjs.org/@microsoft/applicationinsights-core-js/-/applicationinsights-core-js-2.8.10.tgz", - "integrity": "sha512-jQrufDW0+sV8fBhRvzIPNGiCC6dELH+Ug0DM5CfN9757TBqZJz8CSWyDjex39as8+jD0F/8HRU9QdmrVgq5vFg==", + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/@microsoft/applicationinsights-core-js/-/applicationinsights-core-js-3.0.7.tgz", + "integrity": "sha512-sVnnVW4fWXzZdtUTVjuwH3xGa1cj+tW7r72voMZzyuNOZ41fBOCK9AqoV0nKP5VCgNjySwn6Rpbw82I4TKKosQ==", "dependencies": { - "@microsoft/applicationinsights-shims": "2.0.2", - "@microsoft/dynamicproto-js": "^1.1.7" + "@microsoft/applicationinsights-shims": "3.0.1", + "@microsoft/dynamicproto-js": "^2.0.2", + "@nevware21/ts-async": ">= 0.3.0 < 2.x", + "@nevware21/ts-utils": ">= 0.10.1 < 2.x" }, "peerDependencies": { "tslib": "*" } }, "node_modules/@microsoft/applicationinsights-shims": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/@microsoft/applicationinsights-shims/-/applicationinsights-shims-2.0.2.tgz", - "integrity": "sha512-PoHEgsnmcqruLNHZ/amACqdJ6YYQpED0KSRe6J7gIJTtpZC1FfFU9b1fmDKDKtFoUSrPzEh1qzO3kmRZP0betg==" + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/@microsoft/applicationinsights-shims/-/applicationinsights-shims-3.0.1.tgz", + "integrity": "sha512-DKwboF47H1nb33rSUfjqI6ryX29v+2QWcTrRvcQDA32AZr5Ilkr7whOOSsD1aBzwqX0RJEIP1Z81jfE3NBm/Lg==", + "dependencies": { + "@nevware21/ts-utils": ">= 0.9.4 < 2.x" + } + }, + "node_modules/@microsoft/applicationinsights-web-basic": { + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/@microsoft/applicationinsights-web-basic/-/applicationinsights-web-basic-3.0.7.tgz", + "integrity": "sha512-D1Zuv/UMwm37bosZi7aZgjLt4xXTAe98ttAoSel/JThglZ2grYBixBHUjgAGzyno8u9JZElPviRHIAWWYAk3TQ==", + "dependencies": { + "@microsoft/applicationinsights-channel-js": "3.0.7", + "@microsoft/applicationinsights-common": "3.0.7", + "@microsoft/applicationinsights-core-js": "3.0.7", + "@microsoft/applicationinsights-shims": "3.0.1", + "@microsoft/dynamicproto-js": "^2.0.2", + "@nevware21/ts-async": ">= 0.3.0 < 2.x", + "@nevware21/ts-utils": ">= 0.10.1 < 2.x" + }, + "peerDependencies": { + "tslib": "*" + } }, "node_modules/@microsoft/dynamicproto-js": { - "version": "1.1.9", - "resolved": "https://registry.npmjs.org/@microsoft/dynamicproto-js/-/dynamicproto-js-1.1.9.tgz", - "integrity": "sha512-n1VPsljTSkthsAFYdiWfC+DKzK2WwcRp83Y1YAqdX552BstvsDjft9YXppjUzp11BPsapDoO1LDgrDB0XVsfNQ==" + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/@microsoft/dynamicproto-js/-/dynamicproto-js-2.0.3.tgz", + "integrity": "sha512-JTWTU80rMy3mdxOjjpaiDQsTLZ6YSGGqsjURsY6AUQtIj0udlF/jYmhdLZu8693ZIC0T1IwYnFa0+QeiMnziBA==", + "dependencies": { + "@nevware21/ts-utils": ">= 0.10.4 < 2.x" + } }, "node_modules/@microsoft/eslint-config-azuretools": { "version": "0.2.1", @@ -708,12 +767,12 @@ "dev": true }, "node_modules/@microsoft/vscode-azext-utils": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/@microsoft/vscode-azext-utils/-/vscode-azext-utils-2.0.0.tgz", - "integrity": "sha512-I75IMSo1CvrF8J7S/RoHrvl4yQRWufvFGHSdlGfjBPdYFJ7O9J5hjeDCmv9/WIa8+qbSUmFPPyNZIXibbplSUQ==", + "version": "2.2.0-agent.1", + "resolved": "https://registry.npmjs.org/@microsoft/vscode-azext-utils/-/vscode-azext-utils-2.2.0-agent.1.tgz", + "integrity": "sha512-kHIo0gT1N4bJhPXFlvp3cysvh3QJCIsaULiBtPoOcCIMrZ5ziniRBQRyfCRUprSU5BYKmUgLg/XLljFX1feg7Q==", "dependencies": { "@microsoft/vscode-azureresources-api": "^2.0.4", - "@vscode/extension-telemetry": "^0.6.2", + "@vscode/extension-telemetry": "^0.9.0", "dayjs": "^1.11.2", "escape-string-regexp": "^2.0.0", "html-to-text": "^8.2.0", @@ -731,6 +790,19 @@ "resolved": "https://registry.npmjs.org/@microsoft/vscode-azureresources-api/-/vscode-azureresources-api-2.0.4.tgz", "integrity": "sha512-LridV1h2rCydrBzEpwy+pUIUx61GpZNwrK04G7LdlhoxHrzuM/WAoy8jXaSC/FSKSsXD1QXuE6u/YofEfsuKeg==" }, + "node_modules/@nevware21/ts-async": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/@nevware21/ts-async/-/ts-async-0.4.0.tgz", + "integrity": "sha512-dbV826TTehQIBIJjh8GDSbwn1Z6+cnkyNbRlpcpdBPH8mROD2zabIUKqWcw9WRdTjjUIm21K+OR4DXWlAyOVTQ==", + "dependencies": { + "@nevware21/ts-utils": ">= 0.10.0 < 2.x" + } + }, + "node_modules/@nevware21/ts-utils": { + "version": "0.10.4", + "resolved": "https://registry.npmjs.org/@nevware21/ts-utils/-/ts-utils-0.10.4.tgz", + "integrity": "sha512-+QSEh9TZ7SFwZEEyIvP8NabL5I5WFE/gvk4LXtW4LjWyTEc/6t2Hog6r1MmY3hIQG9tLe6fARIAXjAQ/M8Kb6A==" + }, "node_modules/@nodelib/fs.scandir": { "version": "2.1.5", "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", @@ -1089,15 +1161,16 @@ "dev": true }, "node_modules/@vscode/extension-telemetry": { - "version": "0.6.2", - "resolved": "https://registry.npmjs.org/@vscode/extension-telemetry/-/extension-telemetry-0.6.2.tgz", - "integrity": "sha512-yb/wxLuaaCRcBAZtDCjNYSisAXz3FWsSqAha5nhHcYxx2ZPdQdWuZqVXGKq0ZpHVndBWWtK6XqtpCN2/HB4S1w==", + "version": "0.9.2", + "resolved": "https://registry.npmjs.org/@vscode/extension-telemetry/-/extension-telemetry-0.9.2.tgz", + "integrity": "sha512-O6VMCDkzypjULhgy2l6fih3c3fExPmSj7aewtW5jBJYgXcIIjtkJOttIfnKOCP4S8sNfc6xc1Do4MbUDmhduEw==", "dependencies": { - "@microsoft/1ds-core-js": "^3.2.3", - "@microsoft/1ds-post-js": "^3.2.3" + "@microsoft/1ds-core-js": "^4.0.3", + "@microsoft/1ds-post-js": "^4.0.3", + "@microsoft/applicationinsights-web-basic": "^3.0.6" }, "engines": { - "vscode": "^1.60.0" + "vscode": "^1.75.0" } }, "node_modules/@vscode/test-electron": { diff --git a/azure/package.json b/azure/package.json index a970520b6f..3d3f816aff 100644 --- a/azure/package.json +++ b/azure/package.json @@ -39,7 +39,7 @@ "@azure/core-client": "^1.6.0", "@azure/core-rest-pipeline": "^1.9.0", "@azure/logger": "^1.0.4", - "@microsoft/vscode-azext-utils": "^2.0.0", + "@microsoft/vscode-azext-utils": "2.2.0-agent.1", "semver": "^7.3.7", "uuid": "^9.0.0" }, diff --git a/azure/src/wizard/LocationListStep.ts b/azure/src/wizard/LocationListStep.ts index 1cdf997a2e..6c96643f2e 100644 --- a/azure/src/wizard/LocationListStep.ts +++ b/azure/src/wizard/LocationListStep.ts @@ -5,7 +5,7 @@ import type { ExtendedLocation, Provider } from '@azure/arm-resources'; import type { Location } from '@azure/arm-resources-subscriptions'; -import { AzureWizardPromptStep, IActionContext, IAzureQuickPickItem, IAzureQuickPickOptions, nonNullProp, nonNullValue } from '@microsoft/vscode-azext-utils'; +import { AgentQuickPickItem, AgentQuickPickOptions, AzureWizardPromptStep, IActionContext, IAzureQuickPickOptions, nonNullProp, nonNullValue } from '@microsoft/vscode-azext-utils'; import * as vscode from 'vscode'; import * as types from '../../index'; import { createResourcesClient, createSubscriptionsClient } from '../clients'; @@ -175,7 +175,16 @@ export class LocationListStep extends } public async prompt(wizardContext: T): Promise { - const options: IAzureQuickPickOptions = { placeHolder: vscode.l10n.t('Select a location for new resources.'), enableGrouping: true, ...this.options }; + const options: AgentQuickPickOptions = { + placeHolder: vscode.l10n.t('Select a location for new resources.'), + enableGrouping: true, + agentMetadata: { + paramterNameTitle: vscode.l10n.t('Location'), + parameterName: 'location', + parameterDescription: vscode.l10n.t('The location where resources will be deployed.') + }, + ...this.options + }; wizardContext._location = (await wizardContext.ui.showQuickPick(this.getQuickPicks(wizardContext), options)).data; wizardContext.telemetry.properties.locationType = wizardContext._location.type; } @@ -184,7 +193,7 @@ export class LocationListStep extends return !wizardContext._location; } - protected async getQuickPicks(wizardContext: T): Promise[]> { + protected async getQuickPicks(wizardContext: T): Promise[]> { let locations: types.AzExtLocation[] = await LocationListStep.getLocations(wizardContext); locations = locations.sort(compareLocation); @@ -193,7 +202,8 @@ export class LocationListStep extends label: nonNullProp(l, 'displayName'), group: l.metadata?.regionCategory, data: l, - description: LocationListStep.getQuickPickDescription?.(l) + description: LocationListStep.getQuickPickDescription?.(l), + agentMetadata: {} }; }); }