Add listSubscriptions to resourceApi (#829)

* Add listSubscriptions to resourceApi

* Bump api version

* Bump package

* Change AzureSubscription imports

* Fix test for getting v1 API
This commit is contained in:
Nathan 2024-04-10 11:53:37 -07:00 коммит произвёл GitHub
Родитель 02492b9fb8
Коммит c2ce04860b
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: B5690EEEBB952194
6 изменённых файлов: 221 добавлений и 72 удалений

273
package-lock.json сгенерированный
Просмотреть файл

@ -13,7 +13,7 @@
"@azure/arm-resources-profile-2020-09-01-hybrid": "^2.1.0",
"@microsoft/vscode-azext-azureauth": "^2.3.0",
"@microsoft/vscode-azext-azureutils": "^2.0.0",
"@microsoft/vscode-azext-utils": "^2.0.0",
"@microsoft/vscode-azext-utils": "^2.4.0",
"buffer": "^6.0.3",
"jsonc-parser": "^2.2.1",
"uuid": "^9.0.0",
@ -557,23 +557,27 @@
}
},
"node_modules/@microsoft/1ds-core-js": {
"version": "3.2.12",
"resolved": "https://registry.npmjs.org/@microsoft/1ds-core-js/-/1ds-core-js-3.2.12.tgz",
"integrity": "sha512-cHpxZZ+pbtOyqFMFB/c1COpaOE3VPFU6phYVHVvOA9DvoeMZfI/Xrxaj7B/vfq4MmkiE7nOAPhv5ZRn+i6OogA==",
"version": "4.1.0",
"resolved": "https://registry.npmjs.org/@microsoft/1ds-core-js/-/1ds-core-js-4.1.0.tgz",
"integrity": "sha512-pZstuGzxrmyKaVoXrBvRjPYLE6/hR/wMN0qBJyAdq+APLLDO73QL2re3+8SM/J24e6ykieQ3mjUPgs8POjNZWA==",
"dependencies": {
"@microsoft/applicationinsights-core-js": "2.8.14",
"@microsoft/applicationinsights-shims": "^2.0.2",
"@microsoft/dynamicproto-js": "^1.1.7"
"@microsoft/applicationinsights-core-js": "3.1.0",
"@microsoft/applicationinsights-shims": "3.0.1",
"@microsoft/dynamicproto-js": "^2.0.3",
"@nevware21/ts-async": ">= 0.3.0 < 2.x",
"@nevware21/ts-utils": ">= 0.10.5 < 2.x"
}
},
"node_modules/@microsoft/1ds-post-js": {
"version": "3.2.12",
"resolved": "https://registry.npmjs.org/@microsoft/1ds-post-js/-/1ds-post-js-3.2.12.tgz",
"integrity": "sha512-vhIVYg4FzBfwtM8tBqDUq3xU+cFu6SQ7biuJHtQpd5PVjDgvAovVOMRF1khsZE/k2rttRRBpmBgNEqG3Ptoysw==",
"version": "4.1.0",
"resolved": "https://registry.npmjs.org/@microsoft/1ds-post-js/-/1ds-post-js-4.1.0.tgz",
"integrity": "sha512-I82QeHMT8DamsgZ78RdNT0cSde8zGb+uwMTFzd9wE6M52q50oTF6sBRhoaVbsU+RvVxiS4vk9py3AWY/g8EDVA==",
"dependencies": {
"@microsoft/1ds-core-js": "3.2.12",
"@microsoft/applicationinsights-shims": "^2.0.2",
"@microsoft/dynamicproto-js": "^1.1.7"
"@microsoft/1ds-core-js": "4.1.0",
"@microsoft/applicationinsights-shims": "3.0.1",
"@microsoft/dynamicproto-js": "^2.0.3",
"@nevware21/ts-async": ">= 0.3.0 < 2.x",
"@nevware21/ts-utils": ">= 0.10.5 < 2.x"
}
},
"node_modules/@microsoft/api-extractor": {
@ -623,27 +627,82 @@
"node": ">=12.20"
}
},
"node_modules/@microsoft/applicationinsights-core-js": {
"version": "2.8.14",
"resolved": "https://registry.npmjs.org/@microsoft/applicationinsights-core-js/-/applicationinsights-core-js-2.8.14.tgz",
"integrity": "sha512-XacWUHdjSHMUwdngMZBp0oiCBifD56CQK2Egu2PiBiF4xu2AO2yNCtWSXsQX2g5OkEhVwaEjfa/aH3WbpYxB1g==",
"node_modules/@microsoft/applicationinsights-channel-js": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/@microsoft/applicationinsights-channel-js/-/applicationinsights-channel-js-3.1.0.tgz",
"integrity": "sha512-VJUZT1FpQ5+XV3t4/AKprWiyH0gEEPDoJr6E8ZVopKoVVX/AjorkhPcZ4oDlpeEWpBeMxg+PeZOdTMKyY0atOw==",
"dependencies": {
"@microsoft/applicationinsights-shims": "2.0.2",
"@microsoft/dynamicproto-js": "^1.1.9"
"@microsoft/applicationinsights-common": "3.1.0",
"@microsoft/applicationinsights-core-js": "3.1.0",
"@microsoft/applicationinsights-shims": "3.0.1",
"@microsoft/dynamicproto-js": "^2.0.3",
"@nevware21/ts-async": ">= 0.3.0 < 2.x",
"@nevware21/ts-utils": ">= 0.10.5 < 2.x"
},
"peerDependencies": {
"tslib": "*"
}
},
"node_modules/@microsoft/applicationinsights-common": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/@microsoft/applicationinsights-common/-/applicationinsights-common-3.1.0.tgz",
"integrity": "sha512-PpWdCbTPsH5MSDIkHKaIBpEJcsnPcnAjlTCk+ls0DOfIB/T6bTn3TuKsDfSu/sxdLhDQiJeUXu8G3qOQ3L0nBA==",
"dependencies": {
"@microsoft/applicationinsights-core-js": "3.1.0",
"@microsoft/applicationinsights-shims": "3.0.1",
"@microsoft/dynamicproto-js": "^2.0.3",
"@nevware21/ts-utils": ">= 0.10.5 < 2.x"
},
"peerDependencies": {
"tslib": "*"
}
},
"node_modules/@microsoft/applicationinsights-core-js": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/@microsoft/applicationinsights-core-js/-/applicationinsights-core-js-3.1.0.tgz",
"integrity": "sha512-pHaZ3CQx+KdfRV3yV/xuMEvIEJ1KxlK6klnFcuz4AMXOOPeuvWy1FsUIQ/sVA97TXEDl87LqV6QDnH99bLZpMg==",
"dependencies": {
"@microsoft/applicationinsights-shims": "3.0.1",
"@microsoft/dynamicproto-js": "^2.0.3",
"@nevware21/ts-async": ">= 0.3.0 < 2.x",
"@nevware21/ts-utils": ">= 0.10.5 < 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.1.0",
"resolved": "https://registry.npmjs.org/@microsoft/applicationinsights-web-basic/-/applicationinsights-web-basic-3.1.0.tgz",
"integrity": "sha512-H2pDmc9YNTk+aoJ+1nkxSoYo/o2c/YLBO8+n3wdDAKuEpKio0HvMbsiKbGczGpLGixA/yYrd9b9vIikjSwGtUA==",
"dependencies": {
"@microsoft/applicationinsights-channel-js": "3.1.0",
"@microsoft/applicationinsights-common": "3.1.0",
"@microsoft/applicationinsights-core-js": "3.1.0",
"@microsoft/applicationinsights-shims": "3.0.1",
"@microsoft/dynamicproto-js": "^2.0.3",
"@nevware21/ts-async": ">= 0.3.0 < 2.x",
"@nevware21/ts-utils": ">= 0.10.5 < 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",
@ -767,12 +826,12 @@
}
},
"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.4.0",
"resolved": "https://registry.npmjs.org/@microsoft/vscode-azext-utils/-/vscode-azext-utils-2.4.0.tgz",
"integrity": "sha512-xWZiB1md9zdKsljyaTftj2EK+xJGynzRoMGT0MoMARewJ+xRDlS/xKUlguUoAzWoMFtS4COuEPoY6KYBgICOog==",
"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",
@ -798,6 +857,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.5",
"resolved": "https://registry.npmjs.org/@nevware21/ts-utils/-/ts-utils-0.10.5.tgz",
"integrity": "sha512-+TEvP0+l/VBR5bJZoYFV+o6aQQ1O6y80uys5AVyyCKeWvrgWu/yNydqSBQNsk4BuEfkayg7R9+HCJRRRIvptTA=="
},
"node_modules/@nodelib/fs.scandir": {
"version": "2.1.5",
"resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz",
@ -1303,15 +1375,16 @@
}
},
"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.3",
"resolved": "https://registry.npmjs.org/@vscode/extension-telemetry/-/extension-telemetry-0.9.3.tgz",
"integrity": "sha512-F1to8DhI5wP30/gqUDeX5LA/eyUuGbGgDMbSuVUJeER+7byehcpsYW2ySjVDHlfXqwGIvMd+QW9g+p0zWaFS3w==",
"dependencies": {
"@microsoft/1ds-core-js": "^3.2.3",
"@microsoft/1ds-post-js": "^3.2.3"
"@microsoft/1ds-core-js": "^4.1.0",
"@microsoft/1ds-post-js": "^4.1.0",
"@microsoft/applicationinsights-web-basic": "^3.1.0"
},
"engines": {
"vscode": "^1.60.0"
"vscode": "^1.75.0"
}
},
"node_modules/@vscode/test-electron": {
@ -12338,23 +12411,27 @@
}
},
"@microsoft/1ds-core-js": {
"version": "3.2.12",
"resolved": "https://registry.npmjs.org/@microsoft/1ds-core-js/-/1ds-core-js-3.2.12.tgz",
"integrity": "sha512-cHpxZZ+pbtOyqFMFB/c1COpaOE3VPFU6phYVHVvOA9DvoeMZfI/Xrxaj7B/vfq4MmkiE7nOAPhv5ZRn+i6OogA==",
"version": "4.1.0",
"resolved": "https://registry.npmjs.org/@microsoft/1ds-core-js/-/1ds-core-js-4.1.0.tgz",
"integrity": "sha512-pZstuGzxrmyKaVoXrBvRjPYLE6/hR/wMN0qBJyAdq+APLLDO73QL2re3+8SM/J24e6ykieQ3mjUPgs8POjNZWA==",
"requires": {
"@microsoft/applicationinsights-core-js": "2.8.14",
"@microsoft/applicationinsights-shims": "^2.0.2",
"@microsoft/dynamicproto-js": "^1.1.7"
"@microsoft/applicationinsights-core-js": "3.1.0",
"@microsoft/applicationinsights-shims": "3.0.1",
"@microsoft/dynamicproto-js": "^2.0.3",
"@nevware21/ts-async": ">= 0.3.0 < 2.x",
"@nevware21/ts-utils": ">= 0.10.5 < 2.x"
}
},
"@microsoft/1ds-post-js": {
"version": "3.2.12",
"resolved": "https://registry.npmjs.org/@microsoft/1ds-post-js/-/1ds-post-js-3.2.12.tgz",
"integrity": "sha512-vhIVYg4FzBfwtM8tBqDUq3xU+cFu6SQ7biuJHtQpd5PVjDgvAovVOMRF1khsZE/k2rttRRBpmBgNEqG3Ptoysw==",
"version": "4.1.0",
"resolved": "https://registry.npmjs.org/@microsoft/1ds-post-js/-/1ds-post-js-4.1.0.tgz",
"integrity": "sha512-I82QeHMT8DamsgZ78RdNT0cSde8zGb+uwMTFzd9wE6M52q50oTF6sBRhoaVbsU+RvVxiS4vk9py3AWY/g8EDVA==",
"requires": {
"@microsoft/1ds-core-js": "3.2.12",
"@microsoft/applicationinsights-shims": "^2.0.2",
"@microsoft/dynamicproto-js": "^1.1.7"
"@microsoft/1ds-core-js": "4.1.0",
"@microsoft/applicationinsights-shims": "3.0.1",
"@microsoft/dynamicproto-js": "^2.0.3",
"@nevware21/ts-async": ">= 0.3.0 < 2.x",
"@nevware21/ts-utils": ">= 0.10.5 < 2.x"
}
},
"@microsoft/api-extractor": {
@ -12396,24 +12473,70 @@
"@rushstack/node-core-library": "3.61.0"
}
},
"@microsoft/applicationinsights-core-js": {
"version": "2.8.14",
"resolved": "https://registry.npmjs.org/@microsoft/applicationinsights-core-js/-/applicationinsights-core-js-2.8.14.tgz",
"integrity": "sha512-XacWUHdjSHMUwdngMZBp0oiCBifD56CQK2Egu2PiBiF4xu2AO2yNCtWSXsQX2g5OkEhVwaEjfa/aH3WbpYxB1g==",
"@microsoft/applicationinsights-channel-js": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/@microsoft/applicationinsights-channel-js/-/applicationinsights-channel-js-3.1.0.tgz",
"integrity": "sha512-VJUZT1FpQ5+XV3t4/AKprWiyH0gEEPDoJr6E8ZVopKoVVX/AjorkhPcZ4oDlpeEWpBeMxg+PeZOdTMKyY0atOw==",
"requires": {
"@microsoft/applicationinsights-shims": "2.0.2",
"@microsoft/dynamicproto-js": "^1.1.9"
"@microsoft/applicationinsights-common": "3.1.0",
"@microsoft/applicationinsights-core-js": "3.1.0",
"@microsoft/applicationinsights-shims": "3.0.1",
"@microsoft/dynamicproto-js": "^2.0.3",
"@nevware21/ts-async": ">= 0.3.0 < 2.x",
"@nevware21/ts-utils": ">= 0.10.5 < 2.x"
}
},
"@microsoft/applicationinsights-common": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/@microsoft/applicationinsights-common/-/applicationinsights-common-3.1.0.tgz",
"integrity": "sha512-PpWdCbTPsH5MSDIkHKaIBpEJcsnPcnAjlTCk+ls0DOfIB/T6bTn3TuKsDfSu/sxdLhDQiJeUXu8G3qOQ3L0nBA==",
"requires": {
"@microsoft/applicationinsights-core-js": "3.1.0",
"@microsoft/applicationinsights-shims": "3.0.1",
"@microsoft/dynamicproto-js": "^2.0.3",
"@nevware21/ts-utils": ">= 0.10.5 < 2.x"
}
},
"@microsoft/applicationinsights-core-js": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/@microsoft/applicationinsights-core-js/-/applicationinsights-core-js-3.1.0.tgz",
"integrity": "sha512-pHaZ3CQx+KdfRV3yV/xuMEvIEJ1KxlK6klnFcuz4AMXOOPeuvWy1FsUIQ/sVA97TXEDl87LqV6QDnH99bLZpMg==",
"requires": {
"@microsoft/applicationinsights-shims": "3.0.1",
"@microsoft/dynamicproto-js": "^2.0.3",
"@nevware21/ts-async": ">= 0.3.0 < 2.x",
"@nevware21/ts-utils": ">= 0.10.5 < 2.x"
}
},
"@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==",
"requires": {
"@nevware21/ts-utils": ">= 0.9.4 < 2.x"
}
},
"@microsoft/applicationinsights-web-basic": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/@microsoft/applicationinsights-web-basic/-/applicationinsights-web-basic-3.1.0.tgz",
"integrity": "sha512-H2pDmc9YNTk+aoJ+1nkxSoYo/o2c/YLBO8+n3wdDAKuEpKio0HvMbsiKbGczGpLGixA/yYrd9b9vIikjSwGtUA==",
"requires": {
"@microsoft/applicationinsights-channel-js": "3.1.0",
"@microsoft/applicationinsights-common": "3.1.0",
"@microsoft/applicationinsights-core-js": "3.1.0",
"@microsoft/applicationinsights-shims": "3.0.1",
"@microsoft/dynamicproto-js": "^2.0.3",
"@nevware21/ts-async": ">= 0.3.0 < 2.x",
"@nevware21/ts-utils": ">= 0.10.5 < 2.x"
}
},
"@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==",
"requires": {
"@nevware21/ts-utils": ">= 0.10.4 < 2.x"
}
},
"@microsoft/eslint-config-azuretools": {
"version": "0.2.1",
@ -12524,12 +12647,12 @@
}
},
"@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.4.0",
"resolved": "https://registry.npmjs.org/@microsoft/vscode-azext-utils/-/vscode-azext-utils-2.4.0.tgz",
"integrity": "sha512-xWZiB1md9zdKsljyaTftj2EK+xJGynzRoMGT0MoMARewJ+xRDlS/xKUlguUoAzWoMFtS4COuEPoY6KYBgICOog==",
"requires": {
"@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",
@ -12551,6 +12674,19 @@
"resolved": "https://registry.npmjs.org/@microsoft/vscode-azureresources-api/-/vscode-azureresources-api-2.0.4.tgz",
"integrity": "sha512-LridV1h2rCydrBzEpwy+pUIUx61GpZNwrK04G7LdlhoxHrzuM/WAoy8jXaSC/FSKSsXD1QXuE6u/YofEfsuKeg=="
},
"@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==",
"requires": {
"@nevware21/ts-utils": ">= 0.10.0 < 2.x"
}
},
"@nevware21/ts-utils": {
"version": "0.10.5",
"resolved": "https://registry.npmjs.org/@nevware21/ts-utils/-/ts-utils-0.10.5.tgz",
"integrity": "sha512-+TEvP0+l/VBR5bJZoYFV+o6aQQ1O6y80uys5AVyyCKeWvrgWu/yNydqSBQNsk4BuEfkayg7R9+HCJRRRIvptTA=="
},
"@nodelib/fs.scandir": {
"version": "2.1.5",
"resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz",
@ -12936,12 +13072,13 @@
}
},
"@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.3",
"resolved": "https://registry.npmjs.org/@vscode/extension-telemetry/-/extension-telemetry-0.9.3.tgz",
"integrity": "sha512-F1to8DhI5wP30/gqUDeX5LA/eyUuGbGgDMbSuVUJeER+7byehcpsYW2ySjVDHlfXqwGIvMd+QW9g+p0zWaFS3w==",
"requires": {
"@microsoft/1ds-core-js": "^3.2.3",
"@microsoft/1ds-post-js": "^3.2.3"
"@microsoft/1ds-core-js": "^4.1.0",
"@microsoft/1ds-post-js": "^4.1.0",
"@microsoft/applicationinsights-web-basic": "^3.1.0"
}
},
"@vscode/test-electron": {

Просмотреть файл

@ -618,7 +618,7 @@
"@azure/arm-resources-profile-2020-09-01-hybrid": "^2.1.0",
"@microsoft/vscode-azext-azureauth": "^2.3.0",
"@microsoft/vscode-azext-azureutils": "^2.0.0",
"@microsoft/vscode-azext-utils": "^2.0.0",
"@microsoft/vscode-azext-utils": "^2.4.0",
"buffer": "^6.0.3",
"jsonc-parser": "^2.2.1",
"uuid": "^9.0.0",

Просмотреть файл

@ -5,10 +5,11 @@
import { AzExtTreeDataProvider, AzExtTreeItem, ITreeItemPickerContext } from '@microsoft/vscode-azext-utils';
import { Activity, AppResourceResolver, AzureHostExtensionApi, AzureResourceGroupsExtensionApi, LocalResourceProvider, PickAppResourceOptions, WorkspaceResourceProvider } from '@microsoft/vscode-azext-utils/hostapi';
import { AzureSubscription } from 'api/src';
import { Disposable, TreeView } from 'vscode';
export class InternalAzureResourceGroupsExtensionApi implements AzureHostExtensionApi, AzureResourceGroupsExtensionApi {
public static apiVersion = '0.0.1';
public static apiVersion = '0.0.2';
#appResourceTree: AzExtTreeDataProvider;
#appResourceTreeView: TreeView<unknown>;
@ -19,6 +20,7 @@ export class InternalAzureResourceGroupsExtensionApi implements AzureHostExtensi
#registerWorkspaceResourceProvider: (id: string, resolver: WorkspaceResourceProvider) => Disposable;
#registerActivity: (activity: Activity) => Promise<void>;
#pickAppResource: <T extends AzExtTreeItem>(context: ITreeItemPickerContext, options?: PickAppResourceOptions) => Promise<T>;
#getSubscriptions: (filter: boolean) => Promise<AzureSubscription[]>;
// This `Omit` is here because the interface expects those keys to be defined, but in this object they will not be
// They are replaced with functions defined on this class that merely wrap the newly-named keys
@ -33,6 +35,11 @@ export class InternalAzureResourceGroupsExtensionApi implements AzureHostExtensi
this.#registerWorkspaceResourceProvider = options.registerWorkspaceResourceProvider;
this.#registerActivity = options.registerActivity;
this.#pickAppResource = options.pickAppResource;
this.#getSubscriptions = options.getSubscriptions;
}
public get getSubscriptions(): (filter: boolean) => Promise<AzureSubscription[]> {
return this.#getSubscriptions;
}
public get appResourceTree(): AzExtTreeDataProvider {

Просмотреть файл

@ -7,6 +7,7 @@
import { registerAzureUtilsExtensionVariables, setupAzureLogger } from '@microsoft/vscode-azext-azureutils';
import { AzExtTreeDataProvider, AzureExtensionApiFactory, IActionContext, callWithTelemetryAndErrorHandling, createApiProvider, createAzExtLogOutputChannel, createExperimentationService, registerUIExtensionVariables } from '@microsoft/vscode-azext-utils';
import { AzureSubscription } from 'api/src';
import { GetApiOptions, apiUtils } from 'api/src/utils/apiUtils';
import * as vscode from 'vscode';
import { ActivityLogTreeItem } from './activityLog/ActivityLogsTreeItem';
@ -152,6 +153,9 @@ export async function activate(context: vscode.ExtensionContext, perfStats: { lo
ext.appResourceTree = new CompatibleAzExtTreeDataProvider(azureResourceTreeDataProvider);
ext.workspaceTree = new CompatibleAzExtTreeDataProvider(workspaceResourceTreeDataProvider);
const getSubscriptions: (filter: boolean) => Promise<AzureSubscription[]> =
async (filter: boolean) => { return await (await azureResourceTreeDataProvider.getAzureSubscriptionProvider()).getSubscriptions(filter) };
return createApiProvider(
[
{
@ -166,6 +170,7 @@ export async function activate(context: vscode.ExtensionContext, perfStats: { lo
registerWorkspaceResourceProvider,
registerActivity,
pickAppResource: createCompatibilityPickAppResource(),
getSubscriptions,
}),
},
v2ApiFactory,

Просмотреть файл

@ -48,7 +48,7 @@ export abstract class AzureResourceTreeDataProviderBase extends ResourceTreeData
return super.isAncestorOf(element, id)
}
protected async getAzureSubscriptionProvider(): Promise<AzureSubscriptionProvider> {
public async getAzureSubscriptionProvider(): Promise<AzureSubscriptionProvider> {
// override for testing
if (ext.testing.overrideAzureSubscriptionProvider) {
return ext.testing.overrideAzureSubscriptionProvider();

Просмотреть файл

@ -7,7 +7,7 @@ suite('v1 API tests', async () => {
assert.ok(apiProvider, 'API provider is undefined');
const v1Api = apiProvider.getApi('0.0.1', {
const v1Api = apiProvider.getApi('0.0.2', {
extensionId: 'ms-azuretools.vscode-azureresourcegroups-tests',
});