From 22914c06ada35784ce7fa8696101c3a00db334c0 Mon Sep 17 00:00:00 2001 From: Alex Weininger Date: Tue, 26 Sep 2023 16:42:00 -0400 Subject: [PATCH] Update auth package (#751) * Update auth package * Fixup --- package-lock.json | 101 ++++++++++++++++++++-- package.json | 2 +- test/api/MockAzureSubscriptionProvider.ts | 7 ++ 3 files changed, 100 insertions(+), 10 deletions(-) diff --git a/package-lock.json b/package-lock.json index 44dc7d76..f0b0b82a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -12,7 +12,7 @@ "@azure/arm-resources": "^5.2.0", "@azure/arm-resources-profile-2020-09-01-hybrid": "^2.1.0", "@azure/arm-subscriptions": "^5.1.0", - "@microsoft/vscode-azext-azureauth": "^1.1.3", + "@microsoft/vscode-azext-azureauth": "^1.2.1", "@microsoft/vscode-azext-azureutils": "^2.0.0", "@microsoft/vscode-azext-utils": "^2.0.0", "buffer": "^6.0.3", @@ -726,12 +726,13 @@ } }, "node_modules/@microsoft/vscode-azext-azureauth": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/@microsoft/vscode-azext-azureauth/-/vscode-azext-azureauth-1.1.3.tgz", - "integrity": "sha512-uz+lk0mdRcvm8ZvRGnr6DGrPW6WgzKfH0NIM8ed701y/kh4MPsc1rQ1g5JgYCKzILUOpP/jUBfHMKSrSi+VuPQ==", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@microsoft/vscode-azext-azureauth/-/vscode-azext-azureauth-1.2.1.tgz", + "integrity": "sha512-WYXYc8m+vR2N26c7d6W8ahaTt/Jx8uE9pCfzhQ/FLSIxIYQ2fba3Epu11X4vUVU1Vpa1cqU29B0lQmIc8mem8g==", "dependencies": { "@azure/arm-subscriptions": "^5.1.0", - "@azure/ms-rest-azure-env": "^2.0.0" + "@azure/ms-rest-azure-env": "^2.0.0", + "cross-fetch": "^4.0.0" } }, "node_modules/@microsoft/vscode-azext-azureutils": { @@ -3235,6 +3236,14 @@ "integrity": "sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==", "dev": true }, + "node_modules/cross-fetch": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/cross-fetch/-/cross-fetch-4.0.0.tgz", + "integrity": "sha512-e4a5N8lVvuLgAWgnCrLr2PP0YyDOTHa9H/Rj54dirp61qXnNq46m82bRhNqIA5VccJtWBvPTFRV3TtvHUKPB1g==", + "dependencies": { + "node-fetch": "^2.6.12" + } + }, "node_modules/cross-spawn": { "version": "7.0.3", "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", @@ -8168,6 +8177,25 @@ "dev": true, "optional": true }, + "node_modules/node-fetch": { + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.7.0.tgz", + "integrity": "sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==", + "dependencies": { + "whatwg-url": "^5.0.0" + }, + "engines": { + "node": "4.x || >=6.0.0" + }, + "peerDependencies": { + "encoding": "^0.1.0" + }, + "peerDependenciesMeta": { + "encoding": { + "optional": true + } + } + }, "node_modules/node-releases": { "version": "1.1.72", "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-1.1.72.tgz", @@ -10540,6 +10568,11 @@ "node": ">= 0.10" } }, + "node_modules/tr46": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", + "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==" + }, "node_modules/traverse": { "version": "0.3.9", "resolved": "https://registry.npmjs.org/traverse/-/traverse-0.3.9.tgz", @@ -11223,6 +11256,11 @@ "node": ">=10.13.0" } }, + "node_modules/webidl-conversions": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", + "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==" + }, "node_modules/webpack": { "version": "5.76.0", "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.76.0.tgz", @@ -11537,6 +11575,15 @@ "node": ">=10.13.0" } }, + "node_modules/whatwg-url": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", + "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==", + "dependencies": { + "tr46": "~0.0.3", + "webidl-conversions": "^3.0.0" + } + }, "node_modules/which": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", @@ -12624,12 +12671,13 @@ } }, "@microsoft/vscode-azext-azureauth": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/@microsoft/vscode-azext-azureauth/-/vscode-azext-azureauth-1.1.3.tgz", - "integrity": "sha512-uz+lk0mdRcvm8ZvRGnr6DGrPW6WgzKfH0NIM8ed701y/kh4MPsc1rQ1g5JgYCKzILUOpP/jUBfHMKSrSi+VuPQ==", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@microsoft/vscode-azext-azureauth/-/vscode-azext-azureauth-1.2.1.tgz", + "integrity": "sha512-WYXYc8m+vR2N26c7d6W8ahaTt/Jx8uE9pCfzhQ/FLSIxIYQ2fba3Epu11X4vUVU1Vpa1cqU29B0lQmIc8mem8g==", "requires": { "@azure/arm-subscriptions": "^5.1.0", - "@azure/ms-rest-azure-env": "^2.0.0" + "@azure/ms-rest-azure-env": "^2.0.0", + "cross-fetch": "^4.0.0" } }, "@microsoft/vscode-azext-azureutils": { @@ -14544,6 +14592,14 @@ "integrity": "sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==", "dev": true }, + "cross-fetch": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/cross-fetch/-/cross-fetch-4.0.0.tgz", + "integrity": "sha512-e4a5N8lVvuLgAWgnCrLr2PP0YyDOTHa9H/Rj54dirp61qXnNq46m82bRhNqIA5VccJtWBvPTFRV3TtvHUKPB1g==", + "requires": { + "node-fetch": "^2.6.12" + } + }, "cross-spawn": { "version": "7.0.3", "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", @@ -18352,6 +18408,14 @@ "dev": true, "optional": true }, + "node-fetch": { + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.7.0.tgz", + "integrity": "sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==", + "requires": { + "whatwg-url": "^5.0.0" + } + }, "node-releases": { "version": "1.1.72", "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-1.1.72.tgz", @@ -20188,6 +20252,11 @@ "through2": "^2.0.3" } }, + "tr46": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", + "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==" + }, "traverse": { "version": "0.3.9", "resolved": "https://registry.npmjs.org/traverse/-/traverse-0.3.9.tgz", @@ -20739,6 +20808,11 @@ "graceful-fs": "^4.1.2" } }, + "webidl-conversions": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", + "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==" + }, "webpack": { "version": "5.76.0", "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.76.0.tgz", @@ -21002,6 +21076,15 @@ "source-map": "~0.6.1" } }, + "whatwg-url": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", + "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==", + "requires": { + "tr46": "~0.0.3", + "webidl-conversions": "^3.0.0" + } + }, "which": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", diff --git a/package.json b/package.json index 2c0f6e43..f5c15782 100644 --- a/package.json +++ b/package.json @@ -611,7 +611,7 @@ "@azure/arm-resources": "^5.2.0", "@azure/arm-resources-profile-2020-09-01-hybrid": "^2.1.0", "@azure/arm-subscriptions": "^5.1.0", - "@microsoft/vscode-azext-azureauth": "^1.1.3", + "@microsoft/vscode-azext-azureauth": "^1.2.1", "@microsoft/vscode-azext-azureutils": "^2.0.0", "@microsoft/vscode-azext-utils": "^2.0.0", "buffer": "^6.0.3", diff --git a/test/api/MockAzureSubscriptionProvider.ts b/test/api/MockAzureSubscriptionProvider.ts index 5e5dd5d4..35899bdd 100644 --- a/test/api/MockAzureSubscriptionProvider.ts +++ b/test/api/MockAzureSubscriptionProvider.ts @@ -3,6 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ +import { TenantIdDescription } from '@azure/arm-subscriptions'; import type { AzureSubscription, AzureSubscriptionProvider } from '@microsoft/vscode-azext-azureauth'; import { Disposable, Event } from 'vscode'; import { MockResources } from './mockServiceFactory'; @@ -40,6 +41,12 @@ export class MockAzureSubscriptionProvider implements AzureSubscriptionProvider throw new Error('Method not implemented.'); } + public async getTenants(): Promise { + return [{ + tenantId: 'tenantId', + }]; + } + public onDidSignIn: Event = () => { return new Disposable(() => { }) }; public onDidSignOut: Event = () => { return new Disposable(() => { }) }; }