Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@azure/core-rest-pipeline

Package Overview
Dependencies
Maintainers
3
Versions
319
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@azure/core-rest-pipeline - npm Package Compare versions

Comparing version 1.2.1-alpha.20210831.4 to 1.3.0

dist-esm/src/createPipelineFromOptions.js

9

CHANGELOG.md
# Release History
## 1.2.1 (Unreleased)
## 1.3.0 (2021-09-02)
### Features Added
### Breaking Changes
### Bugs Fixed

@@ -15,2 +11,5 @@

- Allow `number`, `boolean` and `string` for input raw http headers. [PR #17358](https://github.com/Azure/azure-sdk-for-js/pull/17358)
- Refactor `createPipelineFromOptions` to its own file to help tree shaking. [PR #17015](https://github.com/Azure/azure-sdk-for-js/pull/17015)
## 1.2.0 (2021-08-04)

@@ -17,0 +16,0 @@

// Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.
export const SDK_VERSION = "1.2.1";
export const SDK_VERSION = "1.3.0";
//# sourceMappingURL=constants.js.map
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.
export { createEmptyPipeline, createPipelineFromOptions } from "./pipeline";
export { createEmptyPipeline } from "./pipeline";
export { createPipelineFromOptions } from "./createPipelineFromOptions";
export { createDefaultHttpClient } from "./defaultHttpClient";

@@ -5,0 +6,0 @@ export { createHttpHeaders } from "./httpHeaders";

// Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.
import { logPolicy } from "./policies/logPolicy";
import { userAgentPolicy } from "./policies/userAgentPolicy";
import { redirectPolicy } from "./policies/redirectPolicy";
import { exponentialRetryPolicy } from "./policies/exponentialRetryPolicy";
import { tracingPolicy } from "./policies/tracingPolicy";
import { setClientRequestIdPolicy } from "./policies/setClientRequestIdPolicy";
import { throttlingRetryPolicy } from "./policies/throttlingRetryPolicy";
import { systemErrorRetryPolicy } from "./policies/systemErrorRetryPolicy";
import { decompressResponsePolicy } from "./policies/decompressResponsePolicy";
import { proxyPolicy } from "./policies/proxyPolicy";
import { isNode } from "./util/helpers";
import { formDataPolicy } from "./policies/formDataPolicy";
const ValidPhaseNames = new Set(["Deserialize", "Serialize", "Retry"]);

@@ -253,23 +241,2 @@ /**

}
/**
* Create a new pipeline with a default set of customizable policies.
* @param options - Options to configure a custom pipeline.
*/
export function createPipelineFromOptions(options) {
const pipeline = HttpPipeline.create();
if (isNode) {
pipeline.addPolicy(proxyPolicy(options.proxyOptions));
pipeline.addPolicy(decompressResponsePolicy());
}
pipeline.addPolicy(formDataPolicy());
pipeline.addPolicy(tracingPolicy(options.userAgentOptions));
pipeline.addPolicy(userAgentPolicy(options.userAgentOptions));
pipeline.addPolicy(setClientRequestIdPolicy());
pipeline.addPolicy(throttlingRetryPolicy(), { phase: "Retry" });
pipeline.addPolicy(systemErrorRetryPolicy(options.retryOptions), { phase: "Retry" });
pipeline.addPolicy(exponentialRetryPolicy(options.retryOptions), { phase: "Retry" });
pipeline.addPolicy(redirectPolicy(options.redirectOptions), { afterPhase: "Retry" });
pipeline.addPolicy(logPolicy(options.loggingOptions), { afterPhase: "Retry" });
return pipeline;
}
//# sourceMappingURL=pipeline.js.map
{
"name": "@azure/core-rest-pipeline",
"version": "1.2.1-alpha.20210831.4",
"version": "1.3.0",
"description": "Isomorphic client library for making HTTP requests in node.js and browser.",

@@ -103,4 +103,4 @@ "sdk-type": "client",

"@types/uuid": "^8.0.0",
"@azure/eslint-plugin-azure-sdk": ">=3.0.0-alpha <3.0.0-alphb",
"@azure/dev-tool": ">=1.0.0-alpha <1.0.0-alphb",
"@azure/eslint-plugin-azure-sdk": "^3.0.0",
"@azure/dev-tool": "^1.0.0",
"chai": "^4.2.0",

@@ -107,0 +107,0 @@ "downlevel-dts": "~0.4.0",

@@ -152,3 +152,3 @@ /// <reference types="node" />

*/
export declare function createHttpHeaders(rawHeaders?: RawHttpHeaders): HttpHeaders;
export declare function createHttpHeaders(rawHeaders?: RawHttpHeadersInput): HttpHeaders;
/**

@@ -258,3 +258,3 @@ * Create a new pipeline with a default set of customizable policies.

*/
set(name: string, value: string | number): void;
set(name: string, value: string | number | boolean): void;
/**

@@ -632,2 +632,6 @@ * Removes a specific header from the collection.

/**
* A HttpHeaders collection for input, represented as a simple JSON object.
*/
export declare type RawHttpHeadersInput = Record<string, string | number | boolean>;
/**
* A policy to follow Location headers from the server in order

@@ -634,0 +638,0 @@ * to support server-side redirection.

@@ -163,3 +163,3 @@ /// <reference types="node" />

*/
export declare function createHttpHeaders(rawHeaders?: RawHttpHeaders): HttpHeaders;
export declare function createHttpHeaders(rawHeaders?: RawHttpHeadersInput): HttpHeaders;

@@ -283,3 +283,3 @@ /**

*/
set(name: string, value: string | number): void;
set(name: string, value: string | number | boolean): void;
/**

@@ -676,2 +676,7 @@ * Removes a specific header from the collection.

/**
* A HttpHeaders collection for input, represented as a simple JSON object.
*/
export declare type RawHttpHeadersInput = Record<string, string | number | boolean>;
/**
* A policy to follow Location headers from the server in order

@@ -678,0 +683,0 @@ * to support server-side redirection.

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc