@microsoft/vscode-azext-azureutils
Advanced tools
Comparing version 1.0.1 to 1.1.0
@@ -17,3 +17,3 @@ /*--------------------------------------------------------------------------------------------- | ||
import { AzureSubscription } from '@microsoft/vscode-azureresources-api'; | ||
import { Disposable, Progress, Uri } from 'vscode'; | ||
import { Disposable, LogOutputChannel, Progress, Uri } from 'vscode'; | ||
@@ -426,1 +426,8 @@ export type OpenInPortalOptions = { | ||
export declare function createPortalUri(subscription: AzureSubscription, id: string, options?: OpenInPortalOptions): Uri; | ||
/** | ||
* Pipe Azure SDK logs into the provided log outptut channel using the @azure/logger package. | ||
* | ||
* @param logOutputChannel - log output channel to pipe logs into | ||
*/ | ||
export function setupAzureLogger(logOutputChannel: LogOutputChannel): Disposable; |
@@ -192,3 +192,6 @@ "use strict"; | ||
const resourceTypeData = (_a = providerData.resourceTypes) === null || _a === void 0 ? void 0 : _a.find(rt => { var _a; return ((_a = rt.resourceType) === null || _a === void 0 ? void 0 : _a.toLowerCase()) === resourceType.toLowerCase(); }); | ||
return (0, vscode_azext_utils_1.nonNullProp)((0, vscode_azext_utils_1.nonNullValue)(resourceTypeData, 'resourceTypeData'), 'locations'); | ||
if (!resourceTypeData) { | ||
throw new ProviderResourceTypeNotFoundError(providerData, resourceType); | ||
} | ||
return (0, vscode_azext_utils_1.nonNullProp)(resourceTypeData, 'locations'); | ||
}); | ||
@@ -211,2 +214,7 @@ } | ||
} | ||
class ProviderResourceTypeNotFoundError extends Error { | ||
constructor(provider, expectedResourceType) { | ||
super((0, localize_1.localize)('noResourceType', 'Provider "{0}" does not have resource type "{1}".', provider.id, expectedResourceType)); | ||
} | ||
} | ||
//# sourceMappingURL=LocationListStep.js.map |
{ | ||
"name": "@microsoft/vscode-azext-azureutils", | ||
"author": "Microsoft Corporation", | ||
"version": "1.0.1", | ||
"version": "1.1.0", | ||
"description": "Common Azure utils for developing Azure extensions for VS Code", | ||
@@ -42,2 +42,3 @@ "tags": [ | ||
"@azure/core-rest-pipeline": "^1.9.0", | ||
"@azure/logger": "^1.0.4", | ||
"@microsoft/vscode-azext-utils": "^1.0.0", | ||
@@ -44,0 +45,0 @@ "semver": "^7.3.7", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
129137
31
2087
12
+ Added@azure/logger@^1.0.4