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

@azure/storage-blob

Package Overview
Dependencies
Maintainers
4
Versions
442
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@azure/storage-blob - npm Package Compare versions

Comparing version 12.3.1-alpha.20201111.1 to 12.3.1-alpha.20201204.1

4

CHANGELOG.md

@@ -5,2 +5,6 @@ # Release History

- Fixed a bug where the `credential` property of the `StorageClient` is not set correctly when using a Token credential. Fixed bug [12219](https://github.com/Azure/azure-sdk-for-js/issues/12219).
- Blob Batch operations now reorder the subresponses in the client side to perserve the original input order. See `BlobBatchClient.submitBatch()` and [12335](https://github.com/Azure/azure-sdk-for-js/issues/12335).
- Won't remove the first space in the `userAgentOptions.userAgentPrefix` passed to the `newPipeline()` now. Fixed bug [7536](https://github.com/Azure/azure-sdk-for-js/issues/7536).
- Added `isHierarchicalNamespaceEnabled` to the response of `BlobServiceClient.getAccountInfo()`.

@@ -7,0 +11,0 @@ ## 12.3.0 (2020-11-10)

@@ -5,2 +5,3 @@ import { __awaiter, __generator } from "tslib";

import { getBodyAsText } from "./BatchUtils";
import { logger } from "./log";
var HTTP_HEADER_DELIMITER = ": ";

@@ -61,4 +62,3 @@ var SPACE_DELIMITER = " ";

subResponse = subResponses[index];
deserializedSubResponses[index] = {};
deserializedSubResponse = deserializedSubResponses[index];
deserializedSubResponse = {};
deserializedSubResponse.headers = new HttpHeaders();

@@ -115,5 +115,17 @@ responseLines = subResponse.split("" + HTTP_LINE_ENDING);

} // Inner for end
if (contentId != NOT_FOUND) {
// The response will contain the Content-ID header for each corresponding subrequest response to use for tracking.
// The Content-IDs are set to a valid index in the subrequests we sent. In the status code 202 path, we could expect it
// to be 1-1 mapping from the [0, subRequests.size) to the Content-IDs returned. If not, we simply don't return that
// unexpected subResponse in the parsed reponse and we can always look it up in the raw response for debugging purpose.
if (contentId != NOT_FOUND &&
Number.isInteger(contentId) &&
contentId >= 0 &&
contentId < this.subRequests.size &&
deserializedSubResponses[contentId] === undefined) {
deserializedSubResponse._request = this.subRequests.get(contentId);
deserializedSubResponses[contentId] = deserializedSubResponse;
}
else {
logger.error("subResponses[" + index + "] is dropped as the Content-ID is not found or invalid, Content-ID: " + contentId);
}
if (subRespFailed) {

@@ -120,0 +132,0 @@ subResponsesFailedCount++;

4

dist-esm/storage-blob/src/BlobBatch.js

@@ -8,3 +8,3 @@ import { __assign, __awaiter, __extends, __generator } from "tslib";

import { Pipeline } from "./Pipeline";
import { getURLPath, getURLPathAndQuery, iEqual } from "./utils/utils.common";
import { attachCredential, getURLPath, getURLPathAndQuery, iEqual } from "./utils/utils.common";
import { HeaderConstants, BATCH_MAX_REQUEST, HTTP_VERSION_1_1, HTTP_LINE_ENDING, StorageOAuthScopes } from "./utils/constants";

@@ -245,3 +245,3 @@ import { StorageSharedKeyCredential } from "./credentials/StorageSharedKeyCredential";

factories[2] = isTokenCredential(credential)
? bearerTokenAuthenticationPolicy(credential, StorageOAuthScopes)
? attachCredential(bearerTokenAuthenticationPolicy(credential, StorageOAuthScopes), credential)
: credential;

@@ -248,0 +248,0 @@ }

@@ -35,3 +35,3 @@ /*

_this = _super.call(this, undefined, options) || this;
_this.version = "2020-02-10";
_this.version = '2020-02-10';
_this.baseUri = "{url}";

@@ -38,0 +38,0 @@ _this.requestContentType = "application/json; charset=utf-8";

@@ -12,2 +12,3 @@ // Copyright (c) Microsoft Corporation. All rights reserved.

import { getCachedDefaultHttpClient } from "./utils/cache";
import { attachCredential } from "./utils/utils.common";
// Export following interfaces and types for customers who want to implement their

@@ -95,3 +96,3 @@ // own RequestPolicy or HTTPClient

factories.push(isTokenCredential(credential)
? bearerTokenAuthenticationPolicy(credential, StorageOAuthScopes)
? attachCredential(bearerTokenAuthenticationPolicy(credential, StorageOAuthScopes), credential)
: credential);

@@ -98,0 +99,0 @@ return new Pipeline(factories, pipelineOptions);

@@ -33,6 +33,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved.

if ((isNode && factory instanceof StorageSharedKeyCredential) ||
factory instanceof AnonymousCredential ||
isTokenCredential(factory)) {
factory instanceof AnonymousCredential) {
this.credential = factory;
}
else if (isTokenCredential(factory.credential)) {
// Only works if the factory has been attached a "credential" property.
// We do that in newPipeline() when using TokenCredential.
this.credential = factory.credential;
}
}

@@ -39,0 +43,0 @@ // Override protocol layer's default content-type

@@ -24,5 +24,3 @@ // Copyright (c) Microsoft Corporation. All rights reserved.

if (telemetry) {
// FIXME: replace() only replaces the first space. And we have no idea why we need to replace spaces in the first place.
// But fixing this would be a breaking change. Logged an issue here: https://github.com/Azure/azure-sdk-for-js/issues/10793
var telemetryString = (telemetry.userAgentPrefix || "").replace(" ", "");
var telemetryString = telemetry.userAgentPrefix || "";
if (telemetryString.length > 0 && userAgentInfo.indexOf(telemetryString) === -1) {

@@ -29,0 +27,0 @@ userAgentInfo.push(telemetryString);

@@ -643,2 +643,14 @@ // Copyright (c) Microsoft Corporation. All rights reserved.

}
/**
* Attach a TokenCredential to an object.
*
* @export
* @param {T} thing
* @param {TokenCredential} credential
* @returns {T}
*/
export function attachCredential(thing, credential) {
thing.credential = credential;
return thing;
}
//# sourceMappingURL=utils.common.js.map
{
"name": "@azure/storage-blob",
"sdk-type": "client",
"version": "12.3.1-alpha.20201111.1",
"version": "12.3.1-alpha.20201204.1",
"description": "Microsoft Azure Storage SDK for JavaScript - Blob",

@@ -6,0 +6,0 @@ "main": "./dist/index.js",

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

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

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

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

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

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