diff --git a/package-lock.json b/package-lock.json index 0aebfe767..7fb7bdcda 100644 --- a/package-lock.json +++ b/package-lock.json @@ -11,7 +11,7 @@ "dependencies": { "@azure/arm-resources": "^5.2.0", "@azure/arm-resources-profile-2020-09-01-hybrid": "^2.1.0", - "@microsoft/vscode-azext-azureauth": "^5.1.1", + "@microsoft/vscode-azext-azureauth": "file:../vscode-azuretools/auth/microsoft-vscode-azext-azureauth-6.0.0-alpha.1.tgz", "@microsoft/vscode-azext-azureutils": "^4.0.0", "@microsoft/vscode-azext-utils": "^4.0.2", "form-data": "^4.0.4", @@ -36,7 +36,7 @@ "@types/ws": "^8.5.10" }, "engines": { - "vscode": "^1.105.0" + "vscode": "^1.106.0" } }, "node_modules/@azu/format-text": { @@ -67,11 +67,6 @@ "node": ">=8.0.0" } }, - "node_modules/@azure/abort-controller/node_modules/tslib": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.2.0.tgz", - "integrity": "sha512-gS9GVHRU+RGn5KQM2rllAlR3dU6m7AcpJKdtH8gFvQiC4Otgk98XnmMU+nZenHt/+VhnBPWwgrJsyrdcw6i23w==" - }, "node_modules/@azure/arm-authorization": { "version": "9.0.0", "resolved": "https://registry.npmjs.org/@azure/arm-authorization/-/arm-authorization-9.0.0.tgz", @@ -102,16 +97,6 @@ "node": ">=14.0.0" } }, - "node_modules/@azure/arm-authorization-profile-2020-09-01-hybrid/node_modules/tslib": { - "version": "2.7.0", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.7.0.tgz", - "integrity": "sha512-gLXCKdN1/j47AiHiOkJN69hJmcbGTHI0ImLmbYLHykhgeN0jVGola9yVjFgzCUklsZQMW55o+dW7IXv3RCXDzA==" - }, - "node_modules/@azure/arm-authorization/node_modules/tslib": { - "version": "2.7.0", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.7.0.tgz", - "integrity": "sha512-gLXCKdN1/j47AiHiOkJN69hJmcbGTHI0ImLmbYLHykhgeN0jVGola9yVjFgzCUklsZQMW55o+dW7IXv3RCXDzA==" - }, "node_modules/@azure/arm-msi": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/@azure/arm-msi/-/arm-msi-2.1.0.tgz", @@ -127,11 +112,6 @@ "node": ">=14.0.0" } }, - "node_modules/@azure/arm-msi/node_modules/tslib": { - "version": "2.7.0", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.7.0.tgz", - "integrity": "sha512-gLXCKdN1/j47AiHiOkJN69hJmcbGTHI0ImLmbYLHykhgeN0jVGola9yVjFgzCUklsZQMW55o+dW7IXv3RCXDzA==" - }, "node_modules/@azure/arm-resources": { "version": "5.2.0", "resolved": "https://registry.npmjs.org/@azure/arm-resources/-/arm-resources-5.2.0.tgz", @@ -166,11 +146,6 @@ "node": ">=14.0.0" } }, - "node_modules/@azure/arm-resources-profile-2020-09-01-hybrid/node_modules/tslib": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.0.tgz", - "integrity": "sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ==" - }, "node_modules/@azure/arm-resources-subscriptions": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/@azure/arm-resources-subscriptions/-/arm-resources-subscriptions-2.1.0.tgz", @@ -186,16 +161,6 @@ "node": ">=14.0.0" } }, - "node_modules/@azure/arm-resources-subscriptions/node_modules/tslib": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.0.tgz", - "integrity": "sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ==" - }, - "node_modules/@azure/arm-resources/node_modules/tslib": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.1.tgz", - "integrity": "sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw==" - }, "node_modules/@azure/arm-storage": { "version": "18.3.0", "resolved": "https://registry.npmjs.org/@azure/arm-storage/-/arm-storage-18.3.0.tgz", @@ -230,16 +195,6 @@ "node": ">=12.0.0" } }, - "node_modules/@azure/arm-storage-profile-2020-09-01-hybrid/node_modules/tslib": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.0.tgz", - "integrity": "sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ==" - }, - "node_modules/@azure/arm-storage/node_modules/tslib": { - "version": "2.7.0", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.7.0.tgz", - "integrity": "sha512-gLXCKdN1/j47AiHiOkJN69hJmcbGTHI0ImLmbYLHykhgeN0jVGola9yVjFgzCUklsZQMW55o+dW7IXv3RCXDzA==" - }, "node_modules/@azure/core-asynciterator-polyfill": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/@azure/core-asynciterator-polyfill/-/core-asynciterator-polyfill-1.0.2.tgz", @@ -249,16 +204,17 @@ } }, "node_modules/@azure/core-auth": { - "version": "1.7.2", - "resolved": "https://registry.npmjs.org/@azure/core-auth/-/core-auth-1.7.2.tgz", - "integrity": "sha512-Igm/S3fDYmnMq1uKS38Ae1/m37B3zigdlZw+kocwEhh5GjyKjPrXKO2J6rzpC1wAxrNil/jX9BJRqBshyjnF3g==", + "version": "1.10.1", + "resolved": "https://registry.npmjs.org/@azure/core-auth/-/core-auth-1.10.1.tgz", + "integrity": "sha512-ykRMW8PjVAn+RS6ww5cmK9U2CyH9p4Q88YJwvUslfuMmN98w/2rdGRLPqJYObapBCdzBVeDgYWdJnFPFb7qzpg==", + "license": "MIT", "dependencies": { - "@azure/abort-controller": "^2.0.0", - "@azure/core-util": "^1.1.0", + "@azure/abort-controller": "^2.1.2", + "@azure/core-util": "^1.13.0", "tslib": "^2.6.2" }, "engines": { - "node": ">=18.0.0" + "node": ">=20.0.0" } }, "node_modules/@azure/core-auth/node_modules/@azure/abort-controller": { @@ -272,11 +228,6 @@ "node": ">=18.0.0" } }, - "node_modules/@azure/core-auth/node_modules/tslib": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", - "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" - }, "node_modules/@azure/core-client": { "version": "1.9.2", "resolved": "https://registry.npmjs.org/@azure/core-client/-/core-client-1.9.2.tgz", @@ -305,11 +256,6 @@ "node": ">=18.0.0" } }, - "node_modules/@azure/core-client/node_modules/tslib": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", - "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" - }, "node_modules/@azure/core-lro": { "version": "2.7.2", "resolved": "https://registry.npmjs.org/@azure/core-lro/-/core-lro-2.7.2.tgz", @@ -335,11 +281,6 @@ "node": ">=18.0.0" } }, - "node_modules/@azure/core-lro/node_modules/tslib": { - "version": "2.7.0", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.7.0.tgz", - "integrity": "sha512-gLXCKdN1/j47AiHiOkJN69hJmcbGTHI0ImLmbYLHykhgeN0jVGola9yVjFgzCUklsZQMW55o+dW7IXv3RCXDzA==" - }, "node_modules/@azure/core-paging": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/@azure/core-paging/-/core-paging-1.2.1.tgz", @@ -352,27 +293,22 @@ "node": ">=12.0.0" } }, - "node_modules/@azure/core-paging/node_modules/tslib": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.1.tgz", - "integrity": "sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw==" - }, "node_modules/@azure/core-rest-pipeline": { - "version": "1.16.0", - "resolved": "https://registry.npmjs.org/@azure/core-rest-pipeline/-/core-rest-pipeline-1.16.0.tgz", - "integrity": "sha512-CeuTvsXxCUmEuxH5g/aceuSl6w2EugvNHKAtKKVdiX915EjJJxAwfzNNWZreNnbxHZ2fi0zaM6wwS23x2JVqSQ==", + "version": "1.22.2", + "resolved": "https://registry.npmjs.org/@azure/core-rest-pipeline/-/core-rest-pipeline-1.22.2.tgz", + "integrity": "sha512-MzHym+wOi8CLUlKCQu12de0nwcq9k9Kuv43j4Wa++CsCpJwps2eeBQwD2Bu8snkxTtDKDx4GwjuR9E8yC8LNrg==", + "license": "MIT", "dependencies": { - "@azure/abort-controller": "^2.0.0", - "@azure/core-auth": "^1.4.0", - "@azure/core-tracing": "^1.0.1", - "@azure/core-util": "^1.9.0", - "@azure/logger": "^1.0.0", - "http-proxy-agent": "^7.0.0", - "https-proxy-agent": "^7.0.0", + "@azure/abort-controller": "^2.1.2", + "@azure/core-auth": "^1.10.0", + "@azure/core-tracing": "^1.3.0", + "@azure/core-util": "^1.13.0", + "@azure/logger": "^1.3.0", + "@typespec/ts-http-runtime": "^0.3.0", "tslib": "^2.6.2" }, "engines": { - "node": ">=18.0.0" + "node": ">=20.0.0" } }, "node_modules/@azure/core-rest-pipeline/node_modules/@azure/abort-controller": { @@ -386,37 +322,30 @@ "node": ">=18.0.0" } }, - "node_modules/@azure/core-rest-pipeline/node_modules/tslib": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", - "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" - }, "node_modules/@azure/core-tracing": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@azure/core-tracing/-/core-tracing-1.1.2.tgz", - "integrity": "sha512-dawW9ifvWAWmUm9/h+/UQ2jrdvjCJ7VJEuCJ6XVNudzcOwm53BFZH4Q845vjfgoUAM8ZxokvVNxNxAITc502YA==", + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/@azure/core-tracing/-/core-tracing-1.3.1.tgz", + "integrity": "sha512-9MWKevR7Hz8kNzzPLfX4EAtGM2b8mr50HPDBvio96bURP/9C+HjdH3sBlLSNNrvRAr5/k/svoH457gB5IKpmwQ==", + "license": "MIT", "dependencies": { "tslib": "^2.6.2" }, "engines": { - "node": ">=18.0.0" + "node": ">=20.0.0" } }, - "node_modules/@azure/core-tracing/node_modules/tslib": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", - "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" - }, "node_modules/@azure/core-util": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/@azure/core-util/-/core-util-1.9.0.tgz", - "integrity": "sha512-AfalUQ1ZppaKuxPPMsFEUdX6GZPB3d9paR9d/TTL7Ow2De8cJaC7ibi7kWVlFAVPCYo31OcnGymc0R89DX8Oaw==", + "version": "1.13.1", + "resolved": "https://registry.npmjs.org/@azure/core-util/-/core-util-1.13.1.tgz", + "integrity": "sha512-XPArKLzsvl0Hf0CaGyKHUyVgF7oDnhKoP85Xv6M4StF/1AhfORhZudHtOyf2s+FcbuQ9dPRAjB8J2KvRRMUK2A==", + "license": "MIT", "dependencies": { - "@azure/abort-controller": "^2.0.0", + "@azure/abort-controller": "^2.1.2", + "@typespec/ts-http-runtime": "^0.3.0", "tslib": "^2.6.2" }, "engines": { - "node": ">=18.0.0" + "node": ">=20.0.0" } }, "node_modules/@azure/core-util/node_modules/@azure/abort-controller": { @@ -430,87 +359,86 @@ "node": ">=18.0.0" } }, - "node_modules/@azure/core-util/node_modules/tslib": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", - "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" - }, "node_modules/@azure/identity": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/@azure/identity/-/identity-4.2.1.tgz", - "integrity": "sha512-U8hsyC9YPcEIzoaObJlRDvp7KiF0MGS7xcWbyJSVvXRkC/HXo1f0oYeBYmEvVgRfacw7GHf6D6yAoh9JHz6A5Q==", + "version": "4.13.0", + "resolved": "https://registry.npmjs.org/@azure/identity/-/identity-4.13.0.tgz", + "integrity": "sha512-uWC0fssc+hs1TGGVkkghiaFkkS7NkTxfnCH+Hdg+yTehTpMcehpok4PgUKKdyCH+9ldu6FhiHRv84Ntqj1vVcw==", + "license": "MIT", "dependencies": { - "@azure/abort-controller": "^1.0.0", - "@azure/core-auth": "^1.5.0", - "@azure/core-client": "^1.4.0", - "@azure/core-rest-pipeline": "^1.1.0", + "@azure/abort-controller": "^2.0.0", + "@azure/core-auth": "^1.9.0", + "@azure/core-client": "^1.9.2", + "@azure/core-rest-pipeline": "^1.17.0", "@azure/core-tracing": "^1.0.0", - "@azure/core-util": "^1.3.0", + "@azure/core-util": "^1.11.0", "@azure/logger": "^1.0.0", - "@azure/msal-browser": "^3.11.1", - "@azure/msal-node": "^2.9.2", - "events": "^3.0.0", - "jws": "^4.0.0", - "open": "^8.0.0", - "stoppable": "^1.1.0", + "@azure/msal-browser": "^4.2.0", + "@azure/msal-node": "^3.5.0", + "open": "^10.1.0", "tslib": "^2.2.0" }, "engines": { - "node": ">=18.0.0" + "node": ">=20.0.0" } }, - "node_modules/@azure/identity/node_modules/tslib": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", - "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" + "node_modules/@azure/identity/node_modules/@azure/abort-controller": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/@azure/abort-controller/-/abort-controller-2.1.2.tgz", + "integrity": "sha512-nBrLsEWm4J2u5LpAPjxADTlq3trDgVZZXHNKabeXZtpq3d3AbN/KGO82R87rdDz5/lYB024rtEf10/q0urNgsA==", + "license": "MIT", + "dependencies": { + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } }, "node_modules/@azure/logger": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/@azure/logger/-/logger-1.0.4.tgz", - "integrity": "sha512-ustrPY8MryhloQj7OWGe+HrYx+aoiOxzbXTtgblbV3xwCqpzUK36phH3XNHQKj3EPonyFUuDTfR3qFhTEAuZEg==", + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/@azure/logger/-/logger-1.3.0.tgz", + "integrity": "sha512-fCqPIfOcLE+CGqGPd66c8bZpwAji98tZ4JI9i/mlTNTlsIWslCfpg48s/ypyLxZTump5sypjrKn2/kY7q8oAbA==", + "license": "MIT", "dependencies": { - "tslib": "^2.2.0" + "@typespec/ts-http-runtime": "^0.3.0", + "tslib": "^2.6.2" }, "engines": { - "node": ">=14.0.0" + "node": ">=20.0.0" } }, - "node_modules/@azure/logger/node_modules/tslib": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.1.tgz", - "integrity": "sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw==" - }, "node_modules/@azure/ms-rest-azure-env": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/@azure/ms-rest-azure-env/-/ms-rest-azure-env-2.0.0.tgz", - "integrity": "sha512-dG76W7ElfLi+fbTjnZVGj+M9e0BIEJmRxU6fHaUQ12bZBe8EJKYb2GV50YWNaP2uJiVQ5+7nXEVj1VN1UQtaEw==", - "peer": true + "integrity": "sha512-dG76W7ElfLi+fbTjnZVGj+M9e0BIEJmRxU6fHaUQ12bZBe8EJKYb2GV50YWNaP2uJiVQ5+7nXEVj1VN1UQtaEw==" }, "node_modules/@azure/msal-browser": { - "version": "3.13.0", - "resolved": "https://registry.npmjs.org/@azure/msal-browser/-/msal-browser-3.13.0.tgz", - "integrity": "sha512-fD906nmJei3yE7la6DZTdUtXKvpwzJURkfsiz9747Icv4pit77cegSm6prJTKLQ1fw4iiZzrrWwxnhMLrTf5gQ==", + "version": "4.27.0", + "resolved": "https://registry.npmjs.org/@azure/msal-browser/-/msal-browser-4.27.0.tgz", + "integrity": "sha512-bZ8Pta6YAbdd0o0PEaL1/geBsPrLEnyY/RDWqvF1PP9RUH8EMLvUMGoZFYS6jSlUan6KZ9IMTLCnwpWWpQRK/w==", + "license": "MIT", "dependencies": { - "@azure/msal-common": "14.9.0" + "@azure/msal-common": "15.13.3" }, "engines": { "node": ">=0.8.0" } }, "node_modules/@azure/msal-common": { - "version": "14.9.0", - "resolved": "https://registry.npmjs.org/@azure/msal-common/-/msal-common-14.9.0.tgz", - "integrity": "sha512-yzBPRlWPnTBeixxLNI3BBIgF5/bHpbhoRVuuDBnYjCyWRavaPUsKAHUDYLqpGkBLDciA6TCc6GOxN4/S3WiSxg==", + "version": "15.13.3", + "resolved": "https://registry.npmjs.org/@azure/msal-common/-/msal-common-15.13.3.tgz", + "integrity": "sha512-shSDU7Ioecya+Aob5xliW9IGq1Ui8y4EVSdWGyI1Gbm4Vg61WpP95LuzcY214/wEjSn6w4PZYD4/iVldErHayQ==", + "license": "MIT", "engines": { "node": ">=0.8.0" } }, "node_modules/@azure/msal-node": { - "version": "2.9.2", - "resolved": "https://registry.npmjs.org/@azure/msal-node/-/msal-node-2.9.2.tgz", - "integrity": "sha512-8tvi6Cos3m+0KmRbPjgkySXi+UQU/QiuVRFnrxIwt5xZlEEFa69O04RTaNESGgImyBBlYbo2mfE8/U8Bbdk1WQ==", + "version": "3.8.4", + "resolved": "https://registry.npmjs.org/@azure/msal-node/-/msal-node-3.8.4.tgz", + "integrity": "sha512-lvuAwsDpPDE/jSuVQOBMpLbXuVuLsPNRwWCyK3/6bPlBk0fGWegqoZ0qjZclMWyQ2JNvIY3vHY7hoFmFmFQcOw==", + "license": "MIT", "dependencies": { - "@azure/msal-common": "14.12.0", + "@azure/msal-common": "15.13.3", "jsonwebtoken": "^9.0.0", "uuid": "^8.3.0" }, @@ -518,18 +446,11 @@ "node": ">=16" } }, - "node_modules/@azure/msal-node/node_modules/@azure/msal-common": { - "version": "14.12.0", - "resolved": "https://registry.npmjs.org/@azure/msal-common/-/msal-common-14.12.0.tgz", - "integrity": "sha512-IDDXmzfdwmDkv4SSmMEyAniJf6fDu3FJ7ncOjlxkDuT85uSnLEhZi3fGZpoR7T4XZpOMx9teM9GXBgrfJgyeBw==", - "engines": { - "node": ">=0.8.0" - } - }, "node_modules/@azure/msal-node/node_modules/uuid": { "version": "8.3.2", "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==", + "license": "MIT", "bin": { "uuid": "dist/bin/uuid" } @@ -1583,19 +1504,17 @@ } }, "node_modules/@microsoft/vscode-azext-azureauth": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/@microsoft/vscode-azext-azureauth/-/vscode-azext-azureauth-5.1.1.tgz", - "integrity": "sha512-HY83Wswphs1EWjYy/tUtdg9Vw2eEZE5+YcdYo4yTynBgTsfFOtP53QwmmyBT6DV1qUTYGVtb+mHmy5MjNuLAMQ==", + "version": "6.0.0-alpha.1", + "resolved": "file:../vscode-azuretools/auth/microsoft-vscode-azext-azureauth-6.0.0-alpha.1.tgz", + "integrity": "sha512-nO/ZzgNNgLWBrD3Mfucbhjh1XLAWckDtJ4bRbwUhZ4aNi6/1bjp72I9XHYjO16Q1/O40ymtpPjnUdyQqv/8GeQ==", "license": "MIT", "dependencies": { "@azure/arm-resources-subscriptions": "^2.1.0", - "@azure/core-client": "^1.9.2", - "@azure/core-rest-pipeline": "^1.16.0", - "@azure/identity": "^4.2.0", + "@azure/identity": "^4.13.0", "@azure/ms-rest-azure-env": "^2.0.0" }, "engines": { - "vscode": "^1.105.0" + "vscode": "^1.106.0" } }, "node_modules/@microsoft/vscode-azext-azureutils": { @@ -2226,7 +2145,6 @@ "integrity": "sha512-LCCV0HdSZZZb34qifBsyWlUmok6W7ouER+oQIGBScS8EsZsQbrtFTUrDX4hOl+CS6p7cnNC4td+qrSVGSCTUfQ==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "undici-types": "~6.21.0" } @@ -2320,7 +2238,6 @@ "integrity": "sha512-lJi3PfxVmo0AkEY93ecfN+r8SofEqZNGByvHAI3GBLrvt1Cw6H5k1IM02nSzu0RfUafr2EvFSw0wAsZgubNplQ==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "@typescript-eslint/scope-manager": "8.47.0", "@typescript-eslint/types": "8.47.0", @@ -2507,6 +2424,20 @@ "url": "https://opencollective.com/typescript-eslint" } }, + "node_modules/@typespec/ts-http-runtime": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/@typespec/ts-http-runtime/-/ts-http-runtime-0.3.2.tgz", + "integrity": "sha512-IlqQ/Gv22xUC1r/WQm4StLkYQmaaTsXAhUVsNE0+xiyf0yRFiH5++q78U3bw6bLKDCTmh0uqKB9eG9+Bt75Dkg==", + "license": "MIT", + "dependencies": { + "http-proxy-agent": "^7.0.0", + "https-proxy-agent": "^7.0.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=20.0.0" + } + }, "node_modules/@vscode/extension-telemetry": { "version": "0.9.9", "resolved": "https://registry.npmjs.org/@vscode/extension-telemetry/-/extension-telemetry-0.9.9.tgz", @@ -2874,7 +2805,6 @@ "integrity": "sha512-NZyJarBfL7nWwIq+FDL6Zp/yHEhePMNnnJ0y3qfieCrmNvYct8uvtiV41UvlSe6apAfk0fY1FbWx+NwfmpvtTg==", "dev": true, "license": "MIT", - "peer": true, "bin": { "acorn": "bin/acorn" }, @@ -3201,7 +3131,23 @@ "node_modules/buffer-equal-constant-time": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/buffer-equal-constant-time/-/buffer-equal-constant-time-1.0.1.tgz", - "integrity": "sha512-zRpUiDwd/xk6ADqPMATG8vc9VPrkck7T07OIx0gnjmJAnHnTVXNQG3vfvWNuiZIkwu9KrKdA1iJKfsfTVxE6NA==" + "integrity": "sha512-zRpUiDwd/xk6ADqPMATG8vc9VPrkck7T07OIx0gnjmJAnHnTVXNQG3vfvWNuiZIkwu9KrKdA1iJKfsfTVxE6NA==", + "license": "BSD-3-Clause" + }, + "node_modules/bundle-name": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/bundle-name/-/bundle-name-4.1.0.tgz", + "integrity": "sha512-tjwM5exMg6BGRI+kNmTntNsvdZS1X8BFYS6tnJ2hdH0kVxM6/eVZ2xy+FqStSWvYmtfFMDLIxurorHwDKfDz5Q==", + "license": "MIT", + "dependencies": { + "run-applescript": "^7.0.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } }, "node_modules/c8": { "version": "10.1.3", @@ -3295,7 +3241,6 @@ "integrity": "sha512-p4Z49OGG5W/WBCPSS/dH3jQ73kD6tiMmUM+bckNK6Jr5JHMG3k9bg/BvKR8lKmtVBKmOiuVaV2ws8s9oSbwysg==", "dev": true, "license": "MIT", - "peer": true, "engines": { "node": ">=18" } @@ -3754,12 +3699,44 @@ "node": ">=0.10.0" } }, + "node_modules/default-browser": { + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/default-browser/-/default-browser-5.4.0.tgz", + "integrity": "sha512-XDuvSq38Hr1MdN47EDvYtx3U0MTqpCEn+F6ft8z2vYDzMrvQhVp0ui9oQdqW3MvK3vqUETglt1tVGgjLuJ5izg==", + "license": "MIT", + "dependencies": { + "bundle-name": "^4.1.0", + "default-browser-id": "^5.0.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/default-browser-id": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/default-browser-id/-/default-browser-id-5.0.1.tgz", + "integrity": "sha512-x1VCxdX4t+8wVfd1so/9w+vQ4vx7lKd2Qp5tDRutErwmR85OgmfX7RlLRMWafRMY7hbEiXIbudNrjOAPa/hL8Q==", + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/define-lazy-prop": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/define-lazy-prop/-/define-lazy-prop-2.0.0.tgz", - "integrity": "sha512-Ds09qNh8yw3khSjiJjiUInaGX9xlqZDY7JVryGxdxV7NPeuqQfplOpQ66yJFZut3jLa5zOwkXw1g9EI2uKh4Og==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/define-lazy-prop/-/define-lazy-prop-3.0.0.tgz", + "integrity": "sha512-N+MeXYoqr3pOgn8xfyRPREN7gHakLYjhsHhWGT3fWAiL4IkAt0iDw14QiiEm2bE30c5XX5q0FtAA3CK5f9/BUg==", + "license": "MIT", "engines": { - "node": ">=8" + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/delayed-stream": { @@ -3882,6 +3859,7 @@ "version": "1.0.11", "resolved": "https://registry.npmjs.org/ecdsa-sig-formatter/-/ecdsa-sig-formatter-1.0.11.tgz", "integrity": "sha512-nagl3RYrbNv6kQkeJIpt6NJZy8twLB/2vtz6yN9Z4vRKHN4/QZJIEbqohALSgwKdnksuY3k5Addp5lg8sVoVcQ==", + "license": "Apache-2.0", "dependencies": { "safe-buffer": "^5.0.1" } @@ -4022,7 +4000,6 @@ "dev": true, "hasInstallScript": true, "license": "MIT", - "peer": true, "bin": { "esbuild": "bin/esbuild" }, @@ -4141,7 +4118,6 @@ "integrity": "sha512-BhHmn2yNOFA9H9JmmIVKJmd288g9hrVRDkdoIgRCRuSySRUHH7r/DI6aAXW9T1WwUuY3DFgrcaqB+deURBLR5g==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "@eslint-community/eslint-utils": "^4.8.0", "@eslint-community/regexpp": "^4.12.1", @@ -4341,14 +4317,6 @@ "node": ">=0.10.0" } }, - "node_modules/events": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/events/-/events-3.3.0.tgz", - "integrity": "sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==", - "engines": { - "node": ">=0.8.x" - } - }, "node_modules/expand-template": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/expand-template/-/expand-template-2.0.3.tgz", @@ -5063,14 +5031,15 @@ } }, "node_modules/is-docker": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/is-docker/-/is-docker-2.2.1.tgz", - "integrity": "sha512-F+i2BKsFrH66iaUFc0woD8sLy8getkwTwtOBjvs56Cx4CgJDeKQeqfz8wAYiSb8JOprWhHH5p77PbmYCvvUuXQ==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-docker/-/is-docker-3.0.0.tgz", + "integrity": "sha512-eljcgEDlEns/7AXFosB5K/2nCM4P7FQPkGc/DWLy5rmFEWvZayGrik1d9/QIY5nJ4f9YsVvBkA6kJpHn9rISdQ==", + "license": "MIT", "bin": { "is-docker": "cli.js" }, "engines": { - "node": ">=8" + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" @@ -5109,6 +5078,24 @@ "node": ">=0.10.0" } }, + "node_modules/is-inside-container": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-inside-container/-/is-inside-container-1.0.0.tgz", + "integrity": "sha512-KIYLCCJghfHZxqjYBE7rEy0OBuTd5xCHS7tHVgvCLkx7StIoaxwNW3hCALgEUjFfeRk+MG/Qxmp/vtETEF3tRA==", + "license": "MIT", + "dependencies": { + "is-docker": "^3.0.0" + }, + "bin": { + "is-inside-container": "cli.js" + }, + "engines": { + "node": ">=14.16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/is-interactive": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/is-interactive/-/is-interactive-2.0.0.tgz", @@ -5166,14 +5153,18 @@ } }, "node_modules/is-wsl": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-2.2.0.tgz", - "integrity": "sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww==", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-3.1.0.tgz", + "integrity": "sha512-UcVfVfaK4Sc4m7X3dUSoHoozQGBEFeDC+zVo06t98xe8CzHSZZBekNXH+tu0NalHolcJ/QAGqS46Hef7QXBIMw==", + "license": "MIT", "dependencies": { - "is-docker": "^2.0.0" + "is-inside-container": "^1.0.0" }, "engines": { - "node": ">=8" + "node": ">=16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/isarray": { @@ -5351,11 +5342,12 @@ } }, "node_modules/jsonwebtoken": { - "version": "9.0.2", - "resolved": "https://registry.npmjs.org/jsonwebtoken/-/jsonwebtoken-9.0.2.tgz", - "integrity": "sha512-PRp66vJ865SSqOlgqS8hujT5U4AOgMfhrwYIuIhfKaoSCZcirrmASQr8CX7cUg+RMih+hgznrjp99o+W4pJLHQ==", + "version": "9.0.3", + "resolved": "https://registry.npmjs.org/jsonwebtoken/-/jsonwebtoken-9.0.3.tgz", + "integrity": "sha512-MT/xP0CrubFRNLNKvxJ2BYfy53Zkm++5bX9dtuPbqAeQpTVe0MQTFhao8+Cp//EmJp244xt6Drw/GVEGCUj40g==", + "license": "MIT", "dependencies": { - "jws": "^3.2.2", + "jws": "^4.0.1", "lodash.includes": "^4.3.0", "lodash.isboolean": "^3.0.3", "lodash.isinteger": "^4.0.4", @@ -5371,25 +5363,6 @@ "npm": ">=6" } }, - "node_modules/jsonwebtoken/node_modules/jwa": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/jwa/-/jwa-1.4.1.tgz", - "integrity": "sha512-qiLX/xhEEFKUAJ6FiBMbes3w9ATzyk5W7Hvzpa/SLYdxNtng+gcurvrI7TbACjIXlsJyr05/S1oUhZrc63evQA==", - "dependencies": { - "buffer-equal-constant-time": "1.0.1", - "ecdsa-sig-formatter": "1.0.11", - "safe-buffer": "^5.0.1" - } - }, - "node_modules/jsonwebtoken/node_modules/jws": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/jws/-/jws-3.2.2.tgz", - "integrity": "sha512-YHlZCB6lMTllWDtSPHz/ZXTsi8S00usEV6v1tjq8tOUZzw7DpSDWVXjXDre6ed1w/pd495ODpHZYSdkRTsa0HA==", - "dependencies": { - "jwa": "^1.4.1", - "safe-buffer": "^5.0.1" - } - }, "node_modules/jszip": { "version": "3.10.1", "resolved": "https://registry.npmjs.org/jszip/-/jszip-3.10.1.tgz", @@ -5404,21 +5377,23 @@ } }, "node_modules/jwa": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/jwa/-/jwa-2.0.0.tgz", - "integrity": "sha512-jrZ2Qx916EA+fq9cEAeCROWPTfCwi1IVHqT2tapuqLEVVDKFDENFw1oL+MwrTvH6msKxsd1YTDVw6uKEcsrLEA==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/jwa/-/jwa-2.0.1.tgz", + "integrity": "sha512-hRF04fqJIP8Abbkq5NKGN0Bbr3JxlQ+qhZufXVr0DvujKy93ZCbXZMHDL4EOtodSbCWxOqR8MS1tXA5hwqCXDg==", + "license": "MIT", "dependencies": { - "buffer-equal-constant-time": "1.0.1", + "buffer-equal-constant-time": "^1.0.1", "ecdsa-sig-formatter": "1.0.11", "safe-buffer": "^5.0.1" } }, "node_modules/jws": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/jws/-/jws-4.0.0.tgz", - "integrity": "sha512-KDncfTmOZoOMTFG4mBlG0qUIOlc03fmzH+ru6RgYVZhPkyiy/92Owlt/8UEN+a4TXR1FQetfIpJE8ApdvdVxTg==", + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/jws/-/jws-4.0.1.tgz", + "integrity": "sha512-EKI/M/yqPncGUUh44xz0PxSidXFr/+r0pA70+gIYhjv+et7yxM+s29Y+VGDkovRofQem0fs7Uvf4+YmAdyRduA==", + "license": "MIT", "dependencies": { - "jwa": "^2.0.0", + "jwa": "^2.0.1", "safe-buffer": "^5.0.1" } }, @@ -5529,12 +5504,14 @@ "node_modules/lodash.includes": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/lodash.includes/-/lodash.includes-4.3.0.tgz", - "integrity": "sha512-W3Bx6mdkRTGtlJISOvVD/lbqjTlPPUDTMnlXZFnVwi9NKJ6tiAk6LVdlhZMm17VZisqhKcgzpO5Wz91PCt5b0w==" + "integrity": "sha512-W3Bx6mdkRTGtlJISOvVD/lbqjTlPPUDTMnlXZFnVwi9NKJ6tiAk6LVdlhZMm17VZisqhKcgzpO5Wz91PCt5b0w==", + "license": "MIT" }, "node_modules/lodash.isboolean": { "version": "3.0.3", "resolved": "https://registry.npmjs.org/lodash.isboolean/-/lodash.isboolean-3.0.3.tgz", - "integrity": "sha512-Bz5mupy2SVbPHURB98VAcw+aHh4vRV5IPNhILUCsOzRmsTmSQ17jIuqopAentWoehktxGd9e/hbIXq980/1QJg==" + "integrity": "sha512-Bz5mupy2SVbPHURB98VAcw+aHh4vRV5IPNhILUCsOzRmsTmSQ17jIuqopAentWoehktxGd9e/hbIXq980/1QJg==", + "license": "MIT" }, "node_modules/lodash.isequal": { "version": "4.5.0", @@ -5545,22 +5522,26 @@ "node_modules/lodash.isinteger": { "version": "4.0.4", "resolved": "https://registry.npmjs.org/lodash.isinteger/-/lodash.isinteger-4.0.4.tgz", - "integrity": "sha512-DBwtEWN2caHQ9/imiNeEA5ys1JoRtRfY3d7V9wkqtbycnAmTvRRmbHKDV4a0EYc678/dia0jrte4tjYwVBaZUA==" + "integrity": "sha512-DBwtEWN2caHQ9/imiNeEA5ys1JoRtRfY3d7V9wkqtbycnAmTvRRmbHKDV4a0EYc678/dia0jrte4tjYwVBaZUA==", + "license": "MIT" }, "node_modules/lodash.isnumber": { "version": "3.0.3", "resolved": "https://registry.npmjs.org/lodash.isnumber/-/lodash.isnumber-3.0.3.tgz", - "integrity": "sha512-QYqzpfwO3/CWf3XP+Z+tkQsfaLL/EnUlXWVkIk5FUPc4sBdTehEqZONuyRt2P67PXAk+NXmTBcc97zw9t1FQrw==" + "integrity": "sha512-QYqzpfwO3/CWf3XP+Z+tkQsfaLL/EnUlXWVkIk5FUPc4sBdTehEqZONuyRt2P67PXAk+NXmTBcc97zw9t1FQrw==", + "license": "MIT" }, "node_modules/lodash.isplainobject": { "version": "4.0.6", "resolved": "https://registry.npmjs.org/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz", - "integrity": "sha512-oSXzaWypCMHkPC3NvBEaPHf0KsA5mvPrOPgQWDsbg8n7orZ290M0BmC/jgRZ4vcJ6DTAhjrsSYgdsW/F+MFOBA==" + "integrity": "sha512-oSXzaWypCMHkPC3NvBEaPHf0KsA5mvPrOPgQWDsbg8n7orZ290M0BmC/jgRZ4vcJ6DTAhjrsSYgdsW/F+MFOBA==", + "license": "MIT" }, "node_modules/lodash.isstring": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/lodash.isstring/-/lodash.isstring-4.0.1.tgz", - "integrity": "sha512-0wJxfxH1wgO3GrbuP+dTTk7op+6L41QCXbGINEmD+ny/G/eCqGzxyCsh7159S+mgDDcoarnBw6PC1PS5+wUGgw==" + "integrity": "sha512-0wJxfxH1wgO3GrbuP+dTTk7op+6L41QCXbGINEmD+ny/G/eCqGzxyCsh7159S+mgDDcoarnBw6PC1PS5+wUGgw==", + "license": "MIT" }, "node_modules/lodash.merge": { "version": "4.6.2", @@ -5572,7 +5553,8 @@ "node_modules/lodash.once": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/lodash.once/-/lodash.once-4.1.1.tgz", - "integrity": "sha512-Sb487aTOCr9drQVL8pIxOzVhafOjZN9UU54hiN8PU3uAiSV7lx1yYNpbNmex2PK6dSJoNTSJUUswT651yww3Mg==" + "integrity": "sha512-Sb487aTOCr9drQVL8pIxOzVhafOjZN9UU54hiN8PU3uAiSV7lx1yYNpbNmex2PK6dSJoNTSJUUswT651yww3Mg==", + "license": "MIT" }, "node_modules/lodash.truncate": { "version": "4.4.2", @@ -6060,16 +6042,18 @@ } }, "node_modules/open": { - "version": "8.4.2", - "resolved": "https://registry.npmjs.org/open/-/open-8.4.2.tgz", - "integrity": "sha512-7x81NCL719oNbsq/3mh+hVrAWmFuEYUqrq/Iw3kUzH8ReypT9QQ0BLoJS7/G9k6N81XjW4qHWtjWwe/9eLy1EQ==", + "version": "10.2.0", + "resolved": "https://registry.npmjs.org/open/-/open-10.2.0.tgz", + "integrity": "sha512-YgBpdJHPyQ2UE5x+hlSXcnejzAvD0b22U2OuAP+8OnlJT+PjWPxtgmGqKKc+RgTM63U9gN0YzrYc71R2WT/hTA==", + "license": "MIT", "dependencies": { - "define-lazy-prop": "^2.0.0", - "is-docker": "^2.1.1", - "is-wsl": "^2.2.0" + "default-browser": "^5.2.1", + "define-lazy-prop": "^3.0.0", + "is-inside-container": "^1.0.0", + "wsl-utils": "^0.1.0" }, "engines": { - "node": ">=12" + "node": ">=18" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" @@ -6811,6 +6795,18 @@ "node": ">=0.10.0" } }, + "node_modules/run-applescript": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/run-applescript/-/run-applescript-7.1.0.tgz", + "integrity": "sha512-DPe5pVFaAsinSaV6QjQ6gdiedWDcRCbUuiQfQa2wmWV7+xC9bGulGI8+TdRmoFkAPaBXk8CrAbnlY2ISniJ47Q==", + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/run-parallel": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", @@ -7240,15 +7236,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/stoppable": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/stoppable/-/stoppable-1.1.0.tgz", - "integrity": "sha512-KXDYZ9dszj6bzvnEMRYvxgeTHU74QBFL54XKtP3nyMuJ81CFYtABZ3bAzL2EdFUaEwJOBOgENyFj3R7oTzDyyw==", - "engines": { - "node": ">=4", - "npm": ">=6" - } - }, "node_modules/string_decoder": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", @@ -7686,10 +7673,10 @@ } }, "node_modules/tslib": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", - "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", - "peer": true + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", + "license": "0BSD" }, "node_modules/tsx": { "version": "4.20.6", @@ -7779,7 +7766,6 @@ "integrity": "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==", "dev": true, "license": "Apache-2.0", - "peer": true, "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" @@ -8149,6 +8135,21 @@ } } }, + "node_modules/wsl-utils": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/wsl-utils/-/wsl-utils-0.1.0.tgz", + "integrity": "sha512-h3Fbisa2nKGPxCpm89Hk33lBLsnaGBvctQopaBSOW/uIs6FTe1ATyAnKFJrzVs9vpGdsTe73WF3V4lIsk4Gacw==", + "license": "MIT", + "dependencies": { + "is-wsl": "^3.1.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/xml2js": { "version": "0.5.0", "resolved": "https://registry.npmjs.org/xml2js/-/xml2js-0.5.0.tgz", diff --git a/package.json b/package.json index dd2d36340..c412d5b0b 100644 --- a/package.json +++ b/package.json @@ -7,7 +7,7 @@ "icon": "resources/resourceGroup.png", "aiKey": "0c6ae279ed8443289764825290e4f9e2-1a736e7c-1324-4338-be46-fc2a58ae4d14-7255", "engines": { - "vscode": "^1.105.0" + "vscode": "^1.106.0" }, "repository": { "type": "git", @@ -921,7 +921,7 @@ "dependencies": { "@azure/arm-resources": "^5.2.0", "@azure/arm-resources-profile-2020-09-01-hybrid": "^2.1.0", - "@microsoft/vscode-azext-azureauth": "^5.1.1", + "@microsoft/vscode-azext-azureauth": "file:../vscode-azuretools/auth/microsoft-vscode-azext-azureauth-6.0.0-alpha.1.tgz", "@microsoft/vscode-azext-azureutils": "^4.0.0", "@microsoft/vscode-azext-utils": "^4.0.2", "form-data": "^4.0.4", diff --git a/src/cloudConsole/cloudConsole.ts b/src/cloudConsole/cloudConsole.ts index 28fe001ee..a0aa11d22 100644 --- a/src/cloudConsole/cloudConsole.ts +++ b/src/cloudConsole/cloudConsole.ts @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ import { TenantIdDescription } from '@azure/arm-resources-subscriptions'; -import { AzureSubscriptionProvider, getConfiguredAzureEnv } from '@microsoft/vscode-azext-azureauth'; +import { AzureSubscriptionProvider, AzureTenant, getConfiguredAzureEnv } from '@microsoft/vscode-azext-azureauth'; import { IActionContext, IAzureQuickPickItem, IParsedError, callWithTelemetryAndErrorHandlingSync, nonNullProp, parseError } from '@microsoft/vscode-azext-utils'; import * as cp from 'child_process'; import { default as FormData } from 'form-data'; @@ -262,20 +262,18 @@ export function createCloudConsole(subscriptionProvider: AzureSubscriptionProvid res.end(); }); - if (!await subscriptionProvider.isSignedIn()) { - serverQueue.push({ type: 'log', args: [localize('loggingIn', "Signing in...")] }); - try { - if (await subscriptionProvider.signIn()) { - serverQueue.push({ type: 'log', args: [localize('loggingIn', "Signed in successful.")] }); - } - } catch (e) { - serverQueue.push({ type: 'log', args: [localize('loggingIn', parseError(e).message)] }); - // We used to delay for a second then exit here, but then the user can't read or copy the error message - // await delay(1000); - // serverQueue.push({ type: 'exit' }); - updateStatus('Disconnected'); - return; + serverQueue.push({ type: 'log', args: [localize('loggingIn', "Signing in...")] }); + try { + if (await subscriptionProvider.signIn()) { + serverQueue.push({ type: 'log', args: [localize('loggingIn', "Signed in successful.")] }); } + } catch (e) { + serverQueue.push({ type: 'log', args: [localize('loggingIn', parseError(e).message)] }); + // We used to delay for a second then exit here, but then the user can't read or copy the error message + // await delay(1000); + // serverQueue.push({ type: 'exit' }); + updateStatus('Disconnected'); + return; } const env: TerminalOptions['env'] = { @@ -336,10 +334,13 @@ export function createCloudConsole(subscriptionProvider: AzureSubscriptionProvid liveServerQueue = serverQueue; - const tenants = await subscriptionProvider.getTenants(); + const tenants: AzureTenant[] = []; + for (const account of await subscriptionProvider.getAccounts({ filter: false })) { + tenants.push(...await subscriptionProvider.getTenantsForAccount(account, { filter: false })); + } let selectedTenant: TenantIdDescription | undefined = undefined; - const subscriptions = await subscriptionProvider.getSubscriptions(false); + const subscriptions = await subscriptionProvider.getAvailableSubscriptions({ filter: false }); if (tenants.length <= 1) { serverQueue.push({ type: 'log', args: [localize('foundOneTenant', `Found 1 tenant.`)] }); // if they have only one tenant, use it diff --git a/src/commands/accounts/logIn.ts b/src/commands/accounts/logIn.ts index 354cf15c0..cb1214b51 100644 --- a/src/commands/accounts/logIn.ts +++ b/src/commands/accounts/logIn.ts @@ -18,6 +18,7 @@ export async function logIn(_context: IActionContext): Promise { await provider.signIn(); } finally { _isLoggingIn = false; + // TODO: do we need this or does the session change event take care of it? ext.actions.refreshAzureTree(); // Refresh now that sign in is complete ext.actions.refreshTenantTree(); // Refresh now that sign in is complete } diff --git a/src/commands/accounts/selectSubscriptions.ts b/src/commands/accounts/selectSubscriptions.ts index bd4c88cd8..3c1281b79 100644 --- a/src/commands/accounts/selectSubscriptions.ts +++ b/src/commands/accounts/selectSubscriptions.ts @@ -3,7 +3,7 @@ * Licensed under the MIT License. See License.md in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { AzureSubscription } from "@microsoft/vscode-azext-azureauth"; +import { AzureSubscription, isNotSignedInError } from "@microsoft/vscode-azext-azureauth"; import { IActionContext, IAzureQuickPickItem, nonNullValue } from "@microsoft/vscode-azext-utils"; import * as vscode from "vscode"; import { ext } from "../../extensionVariables"; @@ -28,8 +28,7 @@ export interface SelectSubscriptionOptions { export async function selectSubscriptions(context: IActionContext, options?: SelectSubscriptionOptions): Promise { const provider = await ext.subscriptionProviderFactory(); - if (await provider.isSignedIn()) { - + try { const selectedSubscriptionsWithFullId = await getSelectedTenantAndSubscriptionIds(); const selectedSubscriptionIds = selectedSubscriptionsWithFullId.map(id => id.split('/')[1]); @@ -37,7 +36,7 @@ export async function selectSubscriptions(context: IActionContext, options?: Sel const subscriptionQuickPickItems: () => Promise[]> = async () => { // If there are no tenants selected by default all subscriptions will be shown. - let subscriptions = await provider.getSubscriptions(false); + let subscriptions = await provider.getAvailableSubscriptions({ noCache: true, filter: false, }); if (options?.account || options?.tenantId) { @@ -89,13 +88,17 @@ export async function selectSubscriptions(context: IActionContext, options?: Sel } ext.actions.refreshAzureTree(); - } else { - const signIn: vscode.MessageItem = { title: localize('signIn', 'Sign In') }; - void vscode.window.showInformationMessage(localize('notSignedIn', 'You are not signed in. Sign in to continue.'), signIn).then((input) => { - if (input === signIn) { - void provider.signIn(); - } - }); + } catch (error) { + if (isNotSignedInError(error)) { + const signIn: vscode.MessageItem = { title: localize('signIn', 'Sign In') }; + void vscode.window.showInformationMessage(localize('notSignedIn', 'You are not signed in. Sign in to continue.'), signIn).then((input) => { + if (input === signIn) { + void provider.signIn(); + } + }); + } else { + throw error; + } } } diff --git a/src/commands/registerCommands.ts b/src/commands/registerCommands.ts index d9e647fdd..95c7fcff6 100644 --- a/src/commands/registerCommands.ts +++ b/src/commands/registerCommands.ts @@ -41,10 +41,19 @@ export function registerCommands(): void { registerCommand('azureResourceGroups.uploadFileCloudConsole', uploadFileToCloudShell); // Special-case refresh that ignores the selected/focused node and always refreshes the entire tree. Used by the refresh button in the tree title. - registerCommand('azureResourceGroups.refreshTree', () => ext.actions.refreshAzureTree()); + registerCommand('azureResourceGroups.refreshTree', () => { + ext.clearCacheOnNextLoad = true; + ext.actions.refreshAzureTree(); + }); registerCommand('azureWorkspace.refreshTree', () => ext.actions.refreshWorkspaceTree()); - registerCommand('azureFocusView.refreshTree', () => ext.actions.refreshFocusTree()); - registerCommand('azureTenantsView.refreshTree', () => ext.actions.refreshTenantTree()); + registerCommand('azureFocusView.refreshTree', () => { + ext.clearCacheOnNextLoad = true; + ext.actions.refreshFocusTree(); + }); + registerCommand('azureTenantsView.refreshTree', () => { + ext.clearCacheOnNextLoad = true; + ext.actions.refreshTenantTree(); + }); // v1.5 client extensions attach these commands to tree item context menus for refreshing their tree items registerCommand('azureResourceGroups.refresh', async (context, node?: ResourceGroupsItem) => { @@ -78,7 +87,7 @@ export function registerCommands(): void { }); registerCommand('azureTenantsView.signInToTenant', async (_context, node: TenantTreeItem) => { - await (await ext.subscriptionProviderFactory()).signIn(node.tenantId, node.account); + await (await ext.subscriptionProviderFactory()).signIn(node); ext.actions.refreshTenantTree(node); }); diff --git a/src/extension.ts b/src/extension.ts index c348a6076..a200d4478 100644 --- a/src/extension.ts +++ b/src/extension.ts @@ -212,7 +212,7 @@ export async function activate(context: vscode.ExtensionContext, perfStats: { lo ext.workspaceTree = new CompatibleAzExtTreeDataProvider(workspaceResourceTreeDataProvider); const getSubscriptions: (filter: boolean) => Promise = - async (filter: boolean) => { return await (await ext.subscriptionProviderFactory()).getSubscriptions(filter); }; + async (filter: boolean) => { return await (await ext.subscriptionProviderFactory()).getAvailableSubscriptions({ filter }); }; const apiFactories: AzureExtensionApiFactory[] = [ { diff --git a/src/extensionVariables.ts b/src/extensionVariables.ts index 4a9515daa..13dff5479 100644 --- a/src/extensionVariables.ts +++ b/src/extensionVariables.ts @@ -51,6 +51,7 @@ export namespace ext { export let azureTreeState: TreeItemStateStore; export let subscriptionProviderFactory: () => Promise; + export let clearCacheOnNextLoad: boolean | undefined; export let managedIdentityBranchDataProvider: ManagedIdentityBranchDataProvider; // eslint-disable-next-line @typescript-eslint/no-namespace diff --git a/src/managedIdentity/TargetServiceRoleAssignmentItem.ts b/src/managedIdentity/TargetServiceRoleAssignmentItem.ts index 19903bd2f..30d234b85 100644 --- a/src/managedIdentity/TargetServiceRoleAssignmentItem.ts +++ b/src/managedIdentity/TargetServiceRoleAssignmentItem.ts @@ -29,7 +29,7 @@ export class TargetServiceRoleAssignmentItem implements TreeElementBase { if (this._loadedAllSubscriptions) { // filter out this sub since it's already loaded - const subscriptions = (await (await ext.subscriptionProviderFactory()).getSubscriptions(false)).filter(s => s.subscriptionId !== this.subscription.subscriptionId); + const subscriptions = (await (await ext.subscriptionProviderFactory()).getAvailableSubscriptions({ filter: false })).filter(s => s.subscriptionId !== this.subscription.subscriptionId); await Promise.allSettled(subscriptions.map(async (subscription) => { children.push(...await createRoleDefinitionsItems(context, subscription, this.msi, this.subscription.subscriptionId)); })); diff --git a/src/services/getSubscriptionProviderFactory.ts b/src/services/getSubscriptionProviderFactory.ts index 0b1e5b131..059908fc9 100644 --- a/src/services/getSubscriptionProviderFactory.ts +++ b/src/services/getSubscriptionProviderFactory.ts @@ -1,5 +1,11 @@ -import { AzureDevOpsSubscriptionProviderInitializer, AzureSubscriptionProvider, createAzureDevOpsSubscriptionProviderFactory } from "@microsoft/vscode-azext-azureauth"; -import { IActionContext } from "@microsoft/vscode-azext-utils"; +/*--------------------------------------------------------------------------------------------- +* Copyright (c) Microsoft Corporation. All rights reserved. +* Licensed under the MIT License. See License.md in the project root for license information. +*--------------------------------------------------------------------------------------------*/ + +import type { AzureSubscriptionProvider } from "@microsoft/vscode-azext-azureauth"; +import { type AzureDevOpsSubscriptionProviderInitializer, createAzureDevOpsSubscriptionProviderFactory } from "@microsoft/vscode-azext-azureauth/azdo"; +import type { IActionContext } from "@microsoft/vscode-azext-utils"; import { createVSCodeAzureSubscriptionProviderFactory } from "./VSCodeAzureSubscriptionProvider"; /** @@ -32,7 +38,7 @@ export function getSubscriptionProviderFactory(activateContext?: IActionContext) const initializer: AzureDevOpsSubscriptionProviderInitializer = { serviceConnectionId, - domain, + tenantId: domain, clientId, }; return createAzureDevOpsSubscriptionProviderFactory(initializer); diff --git a/src/tree/ResourceTreeDataProviderBase.ts b/src/tree/ResourceTreeDataProviderBase.ts index f70dd8acb..888275b40 100644 --- a/src/tree/ResourceTreeDataProviderBase.ts +++ b/src/tree/ResourceTreeDataProviderBase.ts @@ -59,15 +59,9 @@ export abstract class ResourceTreeDataProviderBase extends vscode.Disposable imp if (!inCloudShell()) { // Only outside of Cloud Shell will we monitor for ongoing session changes // Inside we must avoid due to https://github.com/microsoft/vscode-dev/issues/1334 - const one = this.subscriptionProvider.onDidSignIn(() => { + this.statusSubscription = this.subscriptionProvider.onRefreshSuggested(() => { this.notifyTreeDataChanged(); }); - - const two = this.subscriptionProvider.onDidSignOut(() => { - this.notifyTreeDataChanged(); - }); - - this.statusSubscription = vscode.Disposable.from(one, two); } } diff --git a/src/tree/azure/AzureResourceTreeDataProvider.ts b/src/tree/azure/AzureResourceTreeDataProvider.ts index 264a6e0b5..08e7f71fc 100644 --- a/src/tree/azure/AzureResourceTreeDataProvider.ts +++ b/src/tree/azure/AzureResourceTreeDataProvider.ts @@ -3,7 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { AzureSubscription, getUnauthenticatedTenants } from '@microsoft/vscode-azext-azureauth'; +import { AzureSubscription, AzureTenant, getMetricsForTelemetry, isNotSignedInError } from '@microsoft/vscode-azext-azureauth'; import { callWithTelemetryAndErrorHandling, createSubscriptionContext, IActionContext, nonNullValueAndProp, registerEvent, TreeElementBase } from '@microsoft/vscode-azext-utils'; import * as vscode from 'vscode'; import { ResourceModelBase } from '../../../api/src/index'; @@ -14,12 +14,12 @@ import { ext } from '../../extensionVariables'; import { localize } from '../../utils/localize'; import { BranchDataItemCache } from '../BranchDataItemCache'; import { GenericItem } from '../GenericItem'; +import { getSignInTreeItems, tryGetLoggingInTreeItems } from '../getSignInTreeItems'; import { ResourceGroupsItem } from '../ResourceGroupsItem'; import { TreeItemStateStore } from '../TreeItemState'; -import { onGetAzureChildrenBase } from '../onGetAzureChildrenBase'; import { AzureResourceTreeDataProviderBase } from './AzureResourceTreeDataProviderBase'; -import { SubscriptionItem } from './SubscriptionItem'; import { AzureResourceGroupingManager } from './grouping/AzureResourceGroupingManager'; +import { SubscriptionItem } from './SubscriptionItem'; export class AzureResourceTreeDataProvider extends AzureResourceTreeDataProviderBase { private readonly groupingChangeSubscription: vscode.Disposable; @@ -67,27 +67,45 @@ export class AzureResourceTreeDataProvider extends AzureResourceTreeDataProvider if (element?.getChildren) { return await element.getChildren(); } else { + const maybeLogInItems = tryGetLoggingInTreeItems(); + if (maybeLogInItems?.length) { + return maybeLogInItems; + } + const subscriptionProvider = await this.getAzureSubscriptionProvider(); - // When a user is signed in 'OnGetChildrenBase' will return no children - const children: ResourceGroupsItem[] = await onGetAzureChildrenBase(subscriptionProvider, this); - if (children.length === 0) { - this.sendSubscriptionTelemetryIfNeeded(); - let subscriptions: AzureSubscription[]; + try { await vscode.commands.executeCommand('setContext', 'azureResourceGroups.needsTenantAuth', false); - if ((subscriptions = await subscriptionProvider.getSubscriptions(true)).length === 0) { - if ( - // If there are no subscriptions at all (ignoring filters) AND if unauthenicated tenants exist - (await subscriptionProvider.getSubscriptions(false)).length === 0 && - (await getUnauthenticatedTenants(subscriptionProvider)).length > 0 - ) { - // Subscriptions might exist in an unauthenticated tenant. Show welcome view. - await vscode.commands.executeCommand('setContext', 'azureResourceGroups.needsTenantAuth', true); - return []; + const subscriptions = await subscriptionProvider.getAvailableSubscriptions({ noCache: ext.clearCacheOnNextLoad }); + this.sendSubscriptionTelemetryIfNeeded(); // Don't send until the above call is done, to avoid cache missing + + if (subscriptions.length === 0) { + // No subscriptions through the filters. Decide what to show. + const selectSubscriptionsItem = new GenericItem(localize('noSubscriptions', 'Select Subscriptions...'), { + commandId: 'azureResourceGroups.selectSubscriptions' + }); + + const allSubscriptions = await subscriptionProvider.getAvailableSubscriptions({ filter: false }); + if (allSubscriptions.length === 0) { + // No subscriptions at all (ignoring filters) + const allUnauthenticatedTenants: AzureTenant[] = []; + for (const account of await subscriptionProvider.getAccounts({ filter: false })) { + allUnauthenticatedTenants.push(...await subscriptionProvider.getUnauthenticatedTenantsForAccount(account)); + } + + if (allUnauthenticatedTenants.length > 0) { + // Subscriptions might exist in an unauthenticated tenant. Show welcome view. + await vscode.commands.executeCommand('setContext', 'azureResourceGroups.needsTenantAuth', true); + return []; + } else { + // All tenants are authenticated but no subscriptions exist + // The prior behavior was to still show the Select Subscriptions item in this case + // TODO: this isn't exactly right? Should we throw a `NotSignedInError` instead? + return [selectSubscriptionsItem]; + } } else { - return [new GenericItem(localize('noSubscriptions', 'Select Subscriptions...'), { - commandId: 'azureResourceGroups.selectSubscriptions' - })]; + // Subscriptions exist but are all filtered out, show the Select Subscriptions item + return [selectSubscriptionsItem]; } } else { //find duplicate subscriptions and change the name to include the account name. If duplicate subs are in the same account add the tenant id instead @@ -181,8 +199,16 @@ export class AzureResourceTreeDataProvider extends AzureResourceTreeDataProvider }); } } + } catch (error) { + if (isNotSignedInError(error)) { + return getSignInTreeItems(true); + } + + // TODO: Else do we throw? What did we do before? + return []; + } finally { + ext.clearCacheOnNextLoad = false; } - return children; } } @@ -198,21 +224,21 @@ export class AzureResourceTreeDataProvider extends AzureResourceTreeDataProvider context.telemetry.properties.isActivationEvent = 'true'; context.errorHandling.suppressDisplay = true; - const subscriptionProvider = await this.getAzureSubscriptionProvider(); - const subscriptions = await subscriptionProvider.getSubscriptions(false); - - const tenantSet = new Set(); - const subscriptionSet = new Set(); - subscriptions.forEach(sub => { - tenantSet.add(sub.tenantId); - subscriptionSet.add(sub.subscriptionId); - }); + const { + totalAccounts, + visibleTenants, + visibleSubscriptions, + subscriptionIdList, + subscriptionIdListIsIncomplete, + } = await getMetricsForTelemetry(await this.getAzureSubscriptionProvider()); - // Number of tenants and subscriptions really belong in Measurements but for backwards compatibility + // These counts really belong in Measurements but for backwards compatibility // they will be put into Properties instead. - context.telemetry.properties.numtenants = tenantSet.size.toString(); - context.telemetry.properties.numsubscriptions = subscriptionSet.size.toString(); - context.telemetry.properties.subscriptions = JSON.stringify(Array.from(subscriptionSet)); + context.telemetry.properties.numaccounts = totalAccounts.toString(); + context.telemetry.properties.numtenants = visibleTenants.toString(); + context.telemetry.properties.numsubscriptions = visibleSubscriptions.toString(); + context.telemetry.properties.subscriptions = subscriptionIdList; + context.telemetry.properties.subscriptionidlistisincomplete = subscriptionIdListIsIncomplete.toString(); }); } } diff --git a/src/tree/azure/FocusViewTreeDataProvider.ts b/src/tree/azure/FocusViewTreeDataProvider.ts index 834249640..802f0696b 100644 --- a/src/tree/azure/FocusViewTreeDataProvider.ts +++ b/src/tree/azure/FocusViewTreeDataProvider.ts @@ -3,7 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { AzureSubscription } from '@microsoft/vscode-azext-azureauth'; +import { isNotSignedInError } from '@microsoft/vscode-azext-azureauth'; import { TreeElementBase } from '@microsoft/vscode-azext-utils'; import * as vscode from 'vscode'; import { AzExtResourceType, AzureResource, ResourceModelBase } from '../../../api/src/index'; @@ -55,8 +55,12 @@ export class FocusViewTreeDataProvider extends AzureResourceTreeDataProviderBase } const provider = await this.getAzureSubscriptionProvider(); - let subscriptions: AzureSubscription[] | undefined; - if (await provider.isSignedIn() && (subscriptions = await provider.getSubscriptions(true)).length > 0) { + try { + const subscriptions = await provider.getAvailableSubscriptions({ noCache: ext.clearCacheOnNextLoad }); + if (subscriptions.length === 0) { + return []; + } + const showHiddenTypes = settingUtils.getWorkspaceSetting(showHiddenTypesSettingKey); let resources: AzureResource[] = []; @@ -86,8 +90,14 @@ export class FocusViewTreeDataProvider extends AzureResourceTreeDataProviderBase } return focusedGroupItem ? [focusedGroupItem] : []; - } else { - return []; + } catch (error) { + if (isNotSignedInError(error)) { + return []; + } else { + throw error; + } + } finally { + ext.clearCacheOnNextLoad = false; } } } diff --git a/src/tree/getSignInTreeItems.ts b/src/tree/getSignInTreeItems.ts new file mode 100644 index 000000000..ba8a85992 --- /dev/null +++ b/src/tree/getSignInTreeItems.ts @@ -0,0 +1,64 @@ +/*--------------------------------------------------------------------------------------------- +* Copyright (c) Microsoft Corporation. All rights reserved. +* Licensed under the MIT License. See License.md in the project root for license information. +*--------------------------------------------------------------------------------------------*/ + +import * as vscode from 'vscode'; +import { isLoggingIn } from "../commands/accounts/logIn"; +import { localize } from "../utils/localize"; +import { GenericItem } from "./GenericItem"; +import { ResourceGroupsItem } from "./ResourceGroupsItem"; + +export function tryGetLoggingInTreeItems(): ResourceGroupsItem[] | undefined { + if (isLoggingIn()) { + return [ + new GenericItem( + localize('signingIn', 'Waiting for Azure sign-in...'), + { + commandId: 'azureResourceGroups.logIn', + iconPath: new vscode.ThemeIcon('loading~spin') + } + ) + ]; + } + + return undefined; +} + +export function getSignInTreeItems(includeCreateAccountItems: boolean): ResourceGroupsItem[] { + const children: ResourceGroupsItem[] = [ + new GenericItem( + localize('signInLabel', 'Sign in to Azure...'), + { + commandId: 'azureResourceGroups.logIn', + iconPath: new vscode.ThemeIcon('sign-in') + } + ) + ]; + + if (includeCreateAccountItems) { + children.push( + new GenericItem( + localize('createAccountLabel', 'Create an Azure Account...'), + { + commandId: 'azureResourceGroups.openUrl', + commandArgs: ['https://aka.ms/VSCodeCreateAzureAccount'], + iconPath: new vscode.ThemeIcon('add') + } + ) + ); + + children.push( + new GenericItem( + localize('createStudentAccount', 'Create an Azure for Students Account...'), + { + commandId: 'azureResourceGroups.openUrl', + commandArgs: ['https://aka.ms/student-account'], + iconPath: new vscode.ThemeIcon('mortar-board') + } + ) + ); + } + + return children; +} diff --git a/src/tree/onGetAzureChildrenBase.ts b/src/tree/onGetAzureChildrenBase.ts deleted file mode 100644 index 00488865f..000000000 --- a/src/tree/onGetAzureChildrenBase.ts +++ /dev/null @@ -1,57 +0,0 @@ -/*--------------------------------------------------------------------------------------------- -* Copyright (c) Microsoft Corporation. All rights reserved. -* Licensed under the MIT License. See License.md in the project root for license information. -*--------------------------------------------------------------------------------------------*/ - -import { AzureSubscriptionProvider } from "@microsoft/vscode-azext-azureauth"; -import * as vscode from 'vscode'; -import { isLoggingIn } from "../commands/accounts/logIn"; -import { localize } from "../utils/localize"; -import { GenericItem } from "./GenericItem"; -import { ResourceGroupsItem } from "./ResourceGroupsItem"; -import { AzureResourceTreeDataProvider } from "./azure/AzureResourceTreeDataProvider"; - -export async function onGetAzureChildrenBase(subscriptionProvider: AzureSubscriptionProvider, tdp?: AzureResourceTreeDataProvider): Promise { - const children: ResourceGroupsItem[] = []; - - if (subscriptionProvider) { - if (isLoggingIn()) { - return [ - new GenericItem( - localize('signingIn', 'Waiting for Azure sign-in...'), - { - commandId: 'azureResourceGroups.logIn', - iconPath: new vscode.ThemeIcon('loading~spin') - } - )]; - } else if (!(await subscriptionProvider.isSignedIn())) { - children.push( - new GenericItem( - localize('signInLabel', 'Sign in to Azure...'), - { - commandId: 'azureResourceGroups.logIn', - iconPath: new vscode.ThemeIcon('sign-in') - } - )); - if (tdp) { - children.push( - new GenericItem( - localize('createAccountLabel', 'Create an Azure Account...'), - { - commandId: 'azureResourceGroups.openUrl', - commandArgs: ['https://aka.ms/VSCodeCreateAzureAccount'], - iconPath: new vscode.ThemeIcon('add') - })); - children.push( - new GenericItem( - localize('createStudentAccount', 'Create an Azure for Students Account...'), - { - commandId: 'azureResourceGroups.openUrl', - commandArgs: ['https://aka.ms/student-account'], - iconPath: new vscode.ThemeIcon('mortar-board') - })); - } - } - } - return children; -} diff --git a/src/tree/tenants/TenantResourceTreeDataProvider.ts b/src/tree/tenants/TenantResourceTreeDataProvider.ts index d4df989bf..f7b244eab 100644 --- a/src/tree/tenants/TenantResourceTreeDataProvider.ts +++ b/src/tree/tenants/TenantResourceTreeDataProvider.ts @@ -3,19 +3,20 @@ * Licensed under the MIT License. See License.md in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { getConfiguredAuthProviderId } from '@microsoft/vscode-azext-azureauth'; -import { IActionContext, TreeElementBase, callWithTelemetryAndErrorHandling, nonNullProp, nonNullValueAndProp } from '@microsoft/vscode-azext-utils'; +import { isNotSignedInError } from '@microsoft/vscode-azext-azureauth'; +import { IActionContext, TreeElementBase, callWithTelemetryAndErrorHandling } from '@microsoft/vscode-azext-utils'; import { ResourceModelBase } from 'api/src'; import * as vscode from 'vscode'; import { TenantResourceProviderManager } from '../../api/ResourceProviderManagers'; +import { ext } from '../../extensionVariables'; import { BranchDataItemCache } from '../BranchDataItemCache'; import { GenericItem } from '../GenericItem'; +import { getSignInTreeItems, tryGetLoggingInTreeItems } from '../getSignInTreeItems'; import { ResourceGroupsItem } from '../ResourceGroupsItem'; import { ResourceTreeDataProviderBase } from "../ResourceTreeDataProviderBase"; -import { onGetAzureChildrenBase } from '../onGetAzureChildrenBase'; +import { isTenantFilteredOut } from './registerTenantTree'; import { TenantResourceBranchDataProviderManager } from "./TenantResourceBranchDataProviderManager"; import { TenantTreeItem } from './TenantTreeItem'; -import { isTenantFilteredOut } from './registerTenantTree'; export class TenantResourceTreeDataProvider extends ResourceTreeDataProviderBase { constructor( @@ -39,39 +40,53 @@ export class TenantResourceTreeDataProvider extends ResourceTreeDataProviderBase async onGetChildren(element?: ResourceGroupsItem | undefined): Promise { return await callWithTelemetryAndErrorHandling('azureTenantsView.getChildren', async (context: IActionContext) => { - if (element) { + if (element?.getChildren) { return await element.getChildren(); } else { + const maybeLogInItems = tryGetLoggingInTreeItems(); + if (maybeLogInItems?.length) { + return maybeLogInItems; + } + const subscriptionProvider = await this.getAzureSubscriptionProvider(); - const children: ResourceGroupsItem[] = await onGetAzureChildrenBase(subscriptionProvider); + const children: ResourceGroupsItem[] = []; - if (children.length === 0) { - const accounts = Array.from((await vscode.authentication.getAccounts(getConfiguredAuthProviderId()))).sort((a, b) => a.label.localeCompare(b.label)); + try { + const accounts = await subscriptionProvider.getAccounts({ filter: false, noCache: ext.clearCacheOnNextLoad }); context.telemetry.properties.accountCount = accounts.length.toString(); for (const account of accounts) { - const tenants = (await subscriptionProvider.getTenants(account)) - // eslint-disable-next-line @typescript-eslint/no-non-null-assertion - .sort((a, b) => a.displayName!.localeCompare(b.displayName!)); + const allTenants = await subscriptionProvider.getTenantsForAccount(account, { filter: false, noCache: ext.clearCacheOnNextLoad }); + const unauthenticatedTenants = await subscriptionProvider.getUnauthenticatedTenantsForAccount(account); const tenantItems: ResourceGroupsItem[] = []; - for await (const tenant of tenants) { - const isSignedIn = await subscriptionProvider.isSignedIn(nonNullProp(tenant, 'tenantId'), account); + for await (const tenant of allTenants) { + // TODO: This is n^2 which is not great, but the number of tenants is usually quite small + const isSignedIn = !unauthenticatedTenants.some(uat => uat.tenantId === tenant.tenantId); tenantItems.push(new TenantTreeItem(tenant, account, { contextValue: isSignedIn ? 'tenantName' : 'tenantNameNotSignedIn', - checkboxState: (!isSignedIn || isTenantFilteredOut(nonNullProp(tenant, 'tenantId'), account.id)) ? + checkboxState: (!isSignedIn || isTenantFilteredOut(tenant.tenantId, account.id)) ? vscode.TreeItemCheckboxState.Unchecked : vscode.TreeItemCheckboxState.Checked, description: tenant.tenantId })); } - children.push(new GenericItem(nonNullValueAndProp(account, 'label'), { + children.push(new GenericItem(account.label, { children: tenantItems, iconPath: new vscode.ThemeIcon('account'), contextValue: 'accountName', collapsibleState: vscode.TreeItemCollapsibleState.Expanded, })); } + return children; + } catch (error) { + if (isNotSignedInError(error)) { + return getSignInTreeItems(false); + } + + // TODO: Else do we throw? What did we do before? + return []; + } finally { + ext.clearCacheOnNextLoad = false; } - return children; } }); } diff --git a/test/api/MockAzureSubscriptionProvider.ts b/test/api/MockAzureSubscriptionProvider.ts index 1e4adccef..4e27568c1 100644 --- a/test/api/MockAzureSubscriptionProvider.ts +++ b/test/api/MockAzureSubscriptionProvider.ts @@ -3,57 +3,68 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import type { AzureSubscription, AzureSubscriptionProvider, AzureTenant } from '@microsoft/vscode-azext-azureauth'; -import { Disposable, Event } from 'vscode'; -import { MockResources } from './mockServiceFactory'; +import type { AzureAccount, AzureSubscription, AzureSubscriptionProvider, AzureTenant, TenantIdAndAccount } from '@microsoft/vscode-azext-azureauth'; +import type * as vscode from 'vscode'; +import type { MockResources } from './mockServiceFactory'; export class MockAzureSubscriptionProvider implements AzureSubscriptionProvider { public constructor(private readonly resources: MockResources) { } - async getSubscriptions(_filter: boolean): Promise { - return this.resources.subscriptions.map((subscription) => ({ - authentication: { - getSession: () => { - return undefined; - } - }, - environment: { - portalUrl: 'portalUrl', - }, - isCustomCloud: false, - name: subscription.name, - tenantId: 'tenantId', - account: { - id: 'accountId', - label: 'accountLabel', - }, - subscriptionId: subscription.subscriptionId, - } as unknown as AzureSubscription)); + public onRefreshSuggested(): vscode.Disposable { + return { + dispose: () => { /* no-op */ }, + }; } - public async isSignedIn(): Promise { - return true; + public async getUnauthenticatedTenantsForAccount(): Promise { + return []; + } + + public async getAvailableSubscriptions(): Promise { + const subscriptions: AzureSubscription[] = []; + for (const acc of await this.getAccounts()) { + for (const tenant of await this.getTenantsForAccount(acc)) { + subscriptions.push(...await this.getSubscriptionsForTenant(tenant)); + } + } + return subscriptions; } public async signIn(): Promise { return true; } - public async signOut(): Promise { - throw new Error('Method not implemented.'); + public async getAccounts(): Promise { + return [{ + id: 'accountId', + label: 'Mock Account', + }]; } - public async getTenants(): Promise { + public async getTenantsForAccount(account: AzureAccount): Promise { return [{ + account, tenantId: 'tenantId', - account: { - id: 'accountId', - label: 'accountLabel', - } + displayName: 'Mock Tenant', }]; } - public onDidSignIn: Event = () => { return new Disposable(() => { /* noop */ }); }; - public onDidSignOut: Event = () => { return new Disposable(() => { /* noop */ }); }; + public async getSubscriptionsForTenant(tenant: TenantIdAndAccount): Promise { + return this.resources.subscriptions.map((subscription) => ({ + authentication: { + getSession: () => { + return undefined; + } + }, + environment: { + portalUrl: 'portalUrl', + }, + isCustomCloud: false, + name: subscription.name, + tenantId: tenant.tenantId, + account: tenant.account, + subscriptionId: subscription.subscriptionId, + } as unknown as AzureSubscription)); + } }