New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@azure/core-client

Package Overview
Dependencies
Maintainers
3
Versions
330
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@azure/core-client - npm Package Compare versions

Comparing version 1.1.0 to 1.1.1

10

CHANGELOG.md
# Release History
## 1.1.1 (2021-05-06)
### Features Added
- Expose `allowInsecureConnection` in `ServiceClientOptions` and `OperationRequestOptions` to allow operation requests to HTTP endpoints
### Fixed
- Consider more mapper types as primitive thus requires wrapping
## 1.1.0 (2021-03-30)

@@ -4,0 +14,0 @@

@@ -24,2 +24,3 @@ // Copyright (c) Microsoft Corporation.

this._baseUri = options.baseUri;
this._allowInsecureConnection = options.allowInsecureConnection;
this._httpClient = options.httpClient || getCachedDefaultHttpClient();

@@ -79,2 +80,5 @@ this.pipeline = options.pipeline || createDefaultPipeline(options);

}
if (requestOptions.allowInsecureConnection) {
request.allowInsecureConnection = true;
}
}

@@ -88,2 +92,5 @@ if (options.abortSignal) {

}
if (this._allowInsecureConnection) {
request.allowInsecureConnection = true;
}
if (request.streamResponseStatusCodes === undefined) {

@@ -90,0 +97,0 @@ request.streamResponseStatusCodes = getStreamingResponseStatusCodes(operationSpec);

20

dist-esm/src/utils.js

@@ -9,8 +9,12 @@ // Copyright (c) Microsoft Corporation.

*/
export function isPrimitiveBody(value) {
return (typeof value === "string" ||
typeof value === "number" ||
typeof value === "boolean" ||
value === undefined ||
value === null);
export function isPrimitiveBody(value, mapperTypeName) {
return (mapperTypeName !== "Composite" &&
mapperTypeName !== "Dictionary" &&
(typeof value === "string" ||
typeof value === "number" ||
typeof value === "boolean" ||
(mapperTypeName === null || mapperTypeName === void 0 ? void 0 : mapperTypeName.match(/^(Date|DateTime|DateTimeRfc1123|UnixTime|ByteArray|Base64Url)$/i)) !==
null ||
value === undefined ||
value === null));
}

@@ -111,7 +115,5 @@ const validateISODuration = /^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;

hasNullableType: isNullable,
shouldWrapBody: expectedBodyTypeName !== "Composite" &&
expectedBodyTypeName !== "Dictionary" &&
isPrimitiveBody(fullResponse.parsedBody)
shouldWrapBody: isPrimitiveBody(fullResponse.parsedBody, expectedBodyTypeName)
});
}
//# sourceMappingURL=utils.js.map
{
"name": "@azure/core-client",
"version": "1.1.0",
"version": "1.1.1",
"description": "Core library for interfacing with AutoRest generated code",

@@ -5,0 +5,0 @@ "sdk-type": "client",

@@ -367,2 +367,6 @@ import { AbortSignalLike } from '@azure/abort-controller';

shouldDeserialize?: boolean | ((response: PipelineResponse) => boolean);
/**
* Set to true if the request is sent over HTTP instead of HTTPS
*/
allowInsecureConnection?: boolean;
}

@@ -550,2 +554,6 @@ /**

/**
* Set to true if the request is sent over HTTP instead of HTTPS
*/
private readonly _allowInsecureConnection?;
/**
* The HTTP client that will be used to send requests.

@@ -602,2 +610,6 @@ */

pipeline?: Pipeline;
/**
* Set to true if the request is sent over HTTP instead of HTTPS
*/
allowInsecureConnection?: boolean;
}

@@ -604,0 +616,0 @@ export declare interface SimpleMapperType {

@@ -394,2 +394,6 @@ import { AbortSignalLike } from '@azure/abort-controller';

shouldDeserialize?: boolean | ((response: PipelineResponse) => boolean);
/**
* Set to true if the request is sent over HTTP instead of HTTPS
*/
allowInsecureConnection?: boolean;
}

@@ -592,2 +596,6 @@

/**
* Set to true if the request is sent over HTTP instead of HTTPS
*/
private readonly _allowInsecureConnection?;
/**
* The HTTP client that will be used to send requests.

@@ -645,2 +653,6 @@ */

pipeline?: Pipeline;
/**
* Set to true if the request is sent over HTTP instead of HTTPS
*/
allowInsecureConnection?: boolean;
}

@@ -647,0 +659,0 @@

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