Socket
Socket
Sign inDemoInstall

@microsoft/vscode-azext-azureutils

Package Overview
Dependencies
Maintainers
10
Versions
41
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@microsoft/vscode-azext-azureutils - npm Package Compare versions

Comparing version 1.0.0 to 1.0.1

6

index.d.ts

@@ -365,3 +365,7 @@ /*---------------------------------------------------------------------------------------------

*/
export declare function createGenericClient(context: IActionContext, clientInfo: AzExtGenericClientInfo | undefined): Promise<ServiceClient>;
export declare function createGenericClient(context: IActionContext, clientInfo: AzExtGenericClientInfo | undefined, options?: IGenericClientOptions): Promise<ServiceClient>;
export interface IGenericClientOptions {
noRetryPolicy?: boolean;
addStatusCodePolicy?: boolean;
}

@@ -368,0 +372,0 @@ export type AzExtRequestPrepareOptions = PipelineRequestOptions & { rejectUnauthorized?: boolean }

10

out/src/createAzureClient.js

@@ -69,3 +69,3 @@ "use strict";

}
const client = yield createGenericClient(context, clientInfo, { noRetryPolicy: true });
const client = yield createGenericClient(context, clientInfo, { noRetryPolicy: true, addStatusCodePolicy: true });
return yield client.sendRequest(request);

@@ -91,3 +91,3 @@ });

});
addAzExtPipeline(context, client.pipeline, endpoint, { retryOptions });
addAzExtPipeline(context, client.pipeline, endpoint, { retryOptions }, options === null || options === void 0 ? void 0 : options.addStatusCodePolicy);
return client;

@@ -97,3 +97,3 @@ });

exports.createGenericClient = createGenericClient;
function addAzExtPipeline(context, pipeline, endpoint, options) {
function addAzExtPipeline(context, pipeline, endpoint, options, addStatusCodePolicy) {
// ServiceClient has default pipeline policies that the core-client SDKs require. Rather than building an entirely custom pipeline,

@@ -120,3 +120,5 @@ // it's easier to just remove the default policies and add ours as-needed

pipeline.addPolicy(new RemoveBOMPolicy(), { phase: 'Deserialize', beforePolicies: [MissingContentTypePolicy.Name] });
pipeline.addPolicy(new StatusCodePolicy() /*intentionally not in a phase*/);
if (addStatusCodePolicy) {
pipeline.addPolicy(new StatusCodePolicy() /*intentionally not in a phase*/);
}
return pipeline;

@@ -123,0 +125,0 @@ }

{
"name": "@microsoft/vscode-azext-azureutils",
"author": "Microsoft Corporation",
"version": "1.0.0",
"version": "1.0.1",
"description": "Common Azure utils for developing Azure extensions for VS Code",

@@ -6,0 +6,0 @@ "tags": [

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc