Merge pull request #769 from actions/users/ashwinsangem/bump_major_version

Bumped up to a major version(v3.0.0)
This commit is contained in:
Ashwin Sangem 2022-03-21 13:56:53 +05:30 committed by GitHub
commit 4b0cf6cc46
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
14 changed files with 3936 additions and 1285 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

2417
dist/restore/index.js vendored
View File

@ -1405,7 +1405,36 @@ exports.default = _default;
/* 39 */, /* 39 */,
/* 40 */, /* 40 */,
/* 41 */, /* 41 */,
/* 42 */, /* 42 */
/***/ (function(__unusedmodule, exports, __webpack_require__) {
"use strict";
/*
* Copyright The OpenTelemetry Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.createTraceState = void 0;
var tracestate_impl_1 = __webpack_require__(756);
function createTraceState(rawTraceState) {
return new tracestate_impl_1.TraceStateImpl(rawTraceState);
}
exports.createTraceState = createTraceState;
//# sourceMappingURL=utils.js.map
/***/ }),
/* 43 */, /* 43 */,
/* 44 */, /* 44 */,
/* 45 */, /* 45 */,
@ -1473,17 +1502,7 @@ exports.parseURL = __webpack_require__(936).parseURL;
/***/ }), /***/ }),
/* 71 */ /* 71 */,
/***/ (function() {
"use strict";
if (typeof Symbol === undefined || !Symbol.asyncIterator) {
Symbol.asyncIterator = Symbol.for("Symbol.asyncIterator");
}
//# sourceMappingURL=index.js.map
/***/ }),
/* 72 */, /* 72 */,
/* 73 */, /* 73 */,
/* 74 */, /* 74 */,
@ -2743,7 +2762,19 @@ Object.defineProperty(exports, "__esModule", { value: true });
/***/ }), /***/ }),
/* 96 */, /* 96 */,
/* 97 */, /* 97 */
/***/ (function() {
"use strict";
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.
if (typeof Symbol === undefined || !Symbol.asyncIterator) {
Symbol.asyncIterator = Symbol.for("Symbol.asyncIterator");
}
//# sourceMappingURL=index.js.map
/***/ }),
/* 98 */, /* 98 */,
/* 99 */, /* 99 */,
/* 100 */, /* 100 */,
@ -4439,7 +4470,7 @@ var NoopTracer_1 = __webpack_require__(151);
var NoopTracerProvider = /** @class */ (function () { var NoopTracerProvider = /** @class */ (function () {
function NoopTracerProvider() { function NoopTracerProvider() {
} }
NoopTracerProvider.prototype.getTracer = function (_name, _version) { NoopTracerProvider.prototype.getTracer = function (_name, _version, _options) {
return new NoopTracer_1.NoopTracer(); return new NoopTracer_1.NoopTracer();
}; };
return NoopTracerProvider; return NoopTracerProvider;
@ -9645,6 +9676,29 @@ var events = __webpack_require__(614);
var fs = __webpack_require__(747); var fs = __webpack_require__(747);
var util = __webpack_require__(669); var util = __webpack_require__(669);
function _interopNamespace(e) {
if (e && e.__esModule) return e;
var n = Object.create(null);
if (e) {
Object.keys(e).forEach(function (k) {
if (k !== 'default') {
var d = Object.getOwnPropertyDescriptor(e, k);
Object.defineProperty(n, k, d.get ? d : {
enumerable: true,
get: function () { return e[k]; }
});
}
});
}
n["default"] = e;
return Object.freeze(n);
}
var coreHttp__namespace = /*#__PURE__*/_interopNamespace(coreHttp);
var os__namespace = /*#__PURE__*/_interopNamespace(os);
var fs__namespace = /*#__PURE__*/_interopNamespace(fs);
var util__namespace = /*#__PURE__*/_interopNamespace(util);
/* /*
* Copyright (c) Microsoft Corporation. * Copyright (c) Microsoft Corporation.
* Licensed under the MIT License. * Licensed under the MIT License.
@ -10599,10 +10653,10 @@ const BlobItemInternal = {
modelProperties: { modelProperties: {
name: { name: {
serializedName: "Name", serializedName: "Name",
required: true,
xmlName: "Name", xmlName: "Name",
type: { type: {
name: "String" name: "Composite",
className: "BlobName"
} }
}, },
deleted: { deleted: {
@ -10677,6 +10731,30 @@ const BlobItemInternal = {
} }
} }
}; };
const BlobName = {
serializedName: "BlobName",
type: {
name: "Composite",
className: "BlobName",
modelProperties: {
encoded: {
serializedName: "Encoded",
xmlName: "Encoded",
xmlIsAttribute: true,
type: {
name: "Boolean"
}
},
content: {
serializedName: "content",
xmlName: "content",
type: {
name: "String"
}
}
}
}
};
const BlobPropertiesInternal = { const BlobPropertiesInternal = {
serializedName: "BlobPropertiesInternal", serializedName: "BlobPropertiesInternal",
xmlName: "Properties", xmlName: "Properties",
@ -11120,10 +11198,10 @@ const BlobPrefix = {
modelProperties: { modelProperties: {
name: { name: {
serializedName: "Name", serializedName: "Name",
required: true,
xmlName: "Name", xmlName: "Name",
type: { type: {
name: "String" name: "Composite",
className: "BlobName"
} }
} }
} }
@ -12746,6 +12824,59 @@ const ContainerSubmitBatchExceptionHeaders = {
} }
} }
}; };
const ContainerFilterBlobsHeaders = {
serializedName: "Container_filterBlobsHeaders",
type: {
name: "Composite",
className: "ContainerFilterBlobsHeaders",
modelProperties: {
clientRequestId: {
serializedName: "x-ms-client-request-id",
xmlName: "x-ms-client-request-id",
type: {
name: "String"
}
},
requestId: {
serializedName: "x-ms-request-id",
xmlName: "x-ms-request-id",
type: {
name: "String"
}
},
version: {
serializedName: "x-ms-version",
xmlName: "x-ms-version",
type: {
name: "String"
}
},
date: {
serializedName: "date",
xmlName: "date",
type: {
name: "DateTimeRfc1123"
}
}
}
}
};
const ContainerFilterBlobsExceptionHeaders = {
serializedName: "Container_filterBlobsExceptionHeaders",
type: {
name: "Composite",
className: "ContainerFilterBlobsExceptionHeaders",
modelProperties: {
errorCode: {
serializedName: "x-ms-error-code",
xmlName: "x-ms-error-code",
type: {
name: "String"
}
}
}
}
};
const ContainerAcquireLeaseHeaders = { const ContainerAcquireLeaseHeaders = {
serializedName: "Container_acquireLeaseHeaders", serializedName: "Container_acquireLeaseHeaders",
type: { type: {
@ -15254,6 +15385,13 @@ const BlobCopyFromURLHeaders = {
name: "ByteArray" name: "ByteArray"
} }
}, },
encryptionScope: {
serializedName: "x-ms-encryption-scope",
xmlName: "x-ms-encryption-scope",
type: {
name: "String"
}
},
errorCode: { errorCode: {
serializedName: "x-ms-error-code", serializedName: "x-ms-error-code",
xmlName: "x-ms-error-code", xmlName: "x-ms-error-code",
@ -17771,6 +17909,7 @@ var Mappers = /*#__PURE__*/Object.freeze({
ListBlobsFlatSegmentResponse: ListBlobsFlatSegmentResponse, ListBlobsFlatSegmentResponse: ListBlobsFlatSegmentResponse,
BlobFlatListSegment: BlobFlatListSegment, BlobFlatListSegment: BlobFlatListSegment,
BlobItemInternal: BlobItemInternal, BlobItemInternal: BlobItemInternal,
BlobName: BlobName,
BlobPropertiesInternal: BlobPropertiesInternal, BlobPropertiesInternal: BlobPropertiesInternal,
ListBlobsHierarchySegmentResponse: ListBlobsHierarchySegmentResponse, ListBlobsHierarchySegmentResponse: ListBlobsHierarchySegmentResponse,
BlobHierarchyListSegment: BlobHierarchyListSegment, BlobHierarchyListSegment: BlobHierarchyListSegment,
@ -17822,6 +17961,8 @@ var Mappers = /*#__PURE__*/Object.freeze({
ContainerRenameExceptionHeaders: ContainerRenameExceptionHeaders, ContainerRenameExceptionHeaders: ContainerRenameExceptionHeaders,
ContainerSubmitBatchHeaders: ContainerSubmitBatchHeaders, ContainerSubmitBatchHeaders: ContainerSubmitBatchHeaders,
ContainerSubmitBatchExceptionHeaders: ContainerSubmitBatchExceptionHeaders, ContainerSubmitBatchExceptionHeaders: ContainerSubmitBatchExceptionHeaders,
ContainerFilterBlobsHeaders: ContainerFilterBlobsHeaders,
ContainerFilterBlobsExceptionHeaders: ContainerFilterBlobsExceptionHeaders,
ContainerAcquireLeaseHeaders: ContainerAcquireLeaseHeaders, ContainerAcquireLeaseHeaders: ContainerAcquireLeaseHeaders,
ContainerAcquireLeaseExceptionHeaders: ContainerAcquireLeaseExceptionHeaders, ContainerAcquireLeaseExceptionHeaders: ContainerAcquireLeaseExceptionHeaders,
ContainerReleaseLeaseHeaders: ContainerReleaseLeaseHeaders, ContainerReleaseLeaseHeaders: ContainerReleaseLeaseHeaders,
@ -18009,7 +18150,7 @@ const timeoutInSeconds = {
const version = { const version = {
parameterPath: "version", parameterPath: "version",
mapper: { mapper: {
defaultValue: "2020-10-02", defaultValue: "2021-04-10",
isConstant: true, isConstant: true,
serializedName: "x-ms-version", serializedName: "x-ms-version",
type: { type: {
@ -18104,7 +18245,7 @@ const include = {
element: { element: {
type: { type: {
name: "Enum", name: "Enum",
allowedValues: ["metadata", "deleted"] allowedValues: ["metadata", "deleted", "system"]
} }
} }
} }
@ -18626,11 +18767,10 @@ const encryptionKeySha256 = {
} }
}; };
const encryptionAlgorithm = { const encryptionAlgorithm = {
parameterPath: ["options", "encryptionAlgorithm"], parameterPath: ["options", "cpkInfo", "encryptionAlgorithm"],
mapper: { mapper: {
defaultValue: "AES256",
isConstant: true,
serializedName: "x-ms-encryption-algorithm", serializedName: "x-ms-encryption-algorithm",
xmlName: "x-ms-encryption-algorithm",
type: { type: {
name: "String" name: "String"
} }
@ -19547,7 +19687,7 @@ class Service {
setProperties(blobServiceProperties, options) { setProperties(blobServiceProperties, options) {
const operationArguments = { const operationArguments = {
blobServiceProperties, blobServiceProperties,
options: coreHttp.operationOptionsToRequestOptionsBase(options || {}) options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
}; };
return this.client.sendOperationRequest(operationArguments, setPropertiesOperationSpec); return this.client.sendOperationRequest(operationArguments, setPropertiesOperationSpec);
} }
@ -19558,9 +19698,9 @@ class Service {
*/ */
getProperties(options) { getProperties(options) {
const operationArguments = { const operationArguments = {
options: coreHttp.operationOptionsToRequestOptionsBase(options || {}) options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
}; };
return this.client.sendOperationRequest(operationArguments, getPropertiesOperationSpec); return this.client.sendOperationRequest(operationArguments, getPropertiesOperationSpec$2);
} }
/** /**
* Retrieves statistics related to replication for the Blob service. It is only available on the * Retrieves statistics related to replication for the Blob service. It is only available on the
@ -19570,7 +19710,7 @@ class Service {
*/ */
getStatistics(options) { getStatistics(options) {
const operationArguments = { const operationArguments = {
options: coreHttp.operationOptionsToRequestOptionsBase(options || {}) options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
}; };
return this.client.sendOperationRequest(operationArguments, getStatisticsOperationSpec); return this.client.sendOperationRequest(operationArguments, getStatisticsOperationSpec);
} }
@ -19580,7 +19720,7 @@ class Service {
*/ */
listContainersSegment(options) { listContainersSegment(options) {
const operationArguments = { const operationArguments = {
options: coreHttp.operationOptionsToRequestOptionsBase(options || {}) options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
}; };
return this.client.sendOperationRequest(operationArguments, listContainersSegmentOperationSpec); return this.client.sendOperationRequest(operationArguments, listContainersSegmentOperationSpec);
} }
@ -19593,7 +19733,7 @@ class Service {
getUserDelegationKey(keyInfo, options) { getUserDelegationKey(keyInfo, options) {
const operationArguments = { const operationArguments = {
keyInfo, keyInfo,
options: coreHttp.operationOptionsToRequestOptionsBase(options || {}) options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
}; };
return this.client.sendOperationRequest(operationArguments, getUserDelegationKeyOperationSpec); return this.client.sendOperationRequest(operationArguments, getUserDelegationKeyOperationSpec);
} }
@ -19603,9 +19743,9 @@ class Service {
*/ */
getAccountInfo(options) { getAccountInfo(options) {
const operationArguments = { const operationArguments = {
options: coreHttp.operationOptionsToRequestOptionsBase(options || {}) options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
}; };
return this.client.sendOperationRequest(operationArguments, getAccountInfoOperationSpec); return this.client.sendOperationRequest(operationArguments, getAccountInfoOperationSpec$2);
} }
/** /**
* The Batch operation allows multiple API calls to be embedded into a single HTTP request. * The Batch operation allows multiple API calls to be embedded into a single HTTP request.
@ -19620,9 +19760,9 @@ class Service {
contentLength, contentLength,
multipartContentType, multipartContentType,
body, body,
options: coreHttp.operationOptionsToRequestOptionsBase(options || {}) options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
}; };
return this.client.sendOperationRequest(operationArguments, submitBatchOperationSpec); return this.client.sendOperationRequest(operationArguments, submitBatchOperationSpec$1);
} }
/** /**
* The Filter Blobs operation enables callers to list blobs across all containers whose tags match a * The Filter Blobs operation enables callers to list blobs across all containers whose tags match a
@ -19632,13 +19772,13 @@ class Service {
*/ */
filterBlobs(options) { filterBlobs(options) {
const operationArguments = { const operationArguments = {
options: coreHttp.operationOptionsToRequestOptionsBase(options || {}) options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
}; };
return this.client.sendOperationRequest(operationArguments, filterBlobsOperationSpec); return this.client.sendOperationRequest(operationArguments, filterBlobsOperationSpec$1);
} }
} }
// Operation Specifications // Operation Specifications
const xmlSerializer = new coreHttp.Serializer(Mappers, /* isXml */ true); const xmlSerializer$5 = new coreHttp__namespace.Serializer(Mappers, /* isXml */ true);
const setPropertiesOperationSpec = { const setPropertiesOperationSpec = {
path: "/", path: "/",
httpMethod: "PUT", httpMethod: "PUT",
@ -19667,9 +19807,9 @@ const setPropertiesOperationSpec = {
isXML: true, isXML: true,
contentType: "application/xml; charset=utf-8", contentType: "application/xml; charset=utf-8",
mediaType: "xml", mediaType: "xml",
serializer: xmlSerializer serializer: xmlSerializer$5
}; };
const getPropertiesOperationSpec = { const getPropertiesOperationSpec$2 = {
path: "/", path: "/",
httpMethod: "GET", httpMethod: "GET",
responses: { responses: {
@ -19694,7 +19834,7 @@ const getPropertiesOperationSpec = {
accept1 accept1
], ],
isXML: true, isXML: true,
serializer: xmlSerializer serializer: xmlSerializer$5
}; };
const getStatisticsOperationSpec = { const getStatisticsOperationSpec = {
path: "/", path: "/",
@ -19721,7 +19861,7 @@ const getStatisticsOperationSpec = {
accept1 accept1
], ],
isXML: true, isXML: true,
serializer: xmlSerializer serializer: xmlSerializer$5
}; };
const listContainersSegmentOperationSpec = { const listContainersSegmentOperationSpec = {
path: "/", path: "/",
@ -19751,7 +19891,7 @@ const listContainersSegmentOperationSpec = {
accept1 accept1
], ],
isXML: true, isXML: true,
serializer: xmlSerializer serializer: xmlSerializer$5
}; };
const getUserDelegationKeyOperationSpec = { const getUserDelegationKeyOperationSpec = {
path: "/", path: "/",
@ -19782,9 +19922,9 @@ const getUserDelegationKeyOperationSpec = {
isXML: true, isXML: true,
contentType: "application/xml; charset=utf-8", contentType: "application/xml; charset=utf-8",
mediaType: "xml", mediaType: "xml",
serializer: xmlSerializer serializer: xmlSerializer$5
}; };
const getAccountInfoOperationSpec = { const getAccountInfoOperationSpec$2 = {
path: "/", path: "/",
httpMethod: "GET", httpMethod: "GET",
responses: { responses: {
@ -19800,9 +19940,9 @@ const getAccountInfoOperationSpec = {
urlParameters: [url], urlParameters: [url],
headerParameters: [version, accept1], headerParameters: [version, accept1],
isXML: true, isXML: true,
serializer: xmlSerializer serializer: xmlSerializer$5
}; };
const submitBatchOperationSpec = { const submitBatchOperationSpec$1 = {
path: "/", path: "/",
httpMethod: "POST", httpMethod: "POST",
responses: { responses: {
@ -19832,9 +19972,9 @@ const submitBatchOperationSpec = {
isXML: true, isXML: true,
contentType: "application/xml; charset=utf-8", contentType: "application/xml; charset=utf-8",
mediaType: "xml", mediaType: "xml",
serializer: xmlSerializer serializer: xmlSerializer$5
}; };
const filterBlobsOperationSpec = { const filterBlobsOperationSpec$1 = {
path: "/", path: "/",
httpMethod: "GET", httpMethod: "GET",
responses: { responses: {
@ -19861,7 +20001,7 @@ const filterBlobsOperationSpec = {
accept1 accept1
], ],
isXML: true, isXML: true,
serializer: xmlSerializer serializer: xmlSerializer$5
}; };
/* /*
@ -19887,9 +20027,9 @@ class Container {
*/ */
create(options) { create(options) {
const operationArguments = { const operationArguments = {
options: coreHttp.operationOptionsToRequestOptionsBase(options || {}) options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
}; };
return this.client.sendOperationRequest(operationArguments, createOperationSpec); return this.client.sendOperationRequest(operationArguments, createOperationSpec$2);
} }
/** /**
* returns all user-defined metadata and system properties for the specified container. The data * returns all user-defined metadata and system properties for the specified container. The data
@ -19898,7 +20038,7 @@ class Container {
*/ */
getProperties(options) { getProperties(options) {
const operationArguments = { const operationArguments = {
options: coreHttp.operationOptionsToRequestOptionsBase(options || {}) options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
}; };
return this.client.sendOperationRequest(operationArguments, getPropertiesOperationSpec$1); return this.client.sendOperationRequest(operationArguments, getPropertiesOperationSpec$1);
} }
@ -19909,9 +20049,9 @@ class Container {
*/ */
delete(options) { delete(options) {
const operationArguments = { const operationArguments = {
options: coreHttp.operationOptionsToRequestOptionsBase(options || {}) options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
}; };
return this.client.sendOperationRequest(operationArguments, deleteOperationSpec); return this.client.sendOperationRequest(operationArguments, deleteOperationSpec$1);
} }
/** /**
* operation sets one or more user-defined name-value pairs for the specified container. * operation sets one or more user-defined name-value pairs for the specified container.
@ -19919,9 +20059,9 @@ class Container {
*/ */
setMetadata(options) { setMetadata(options) {
const operationArguments = { const operationArguments = {
options: coreHttp.operationOptionsToRequestOptionsBase(options || {}) options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
}; };
return this.client.sendOperationRequest(operationArguments, setMetadataOperationSpec); return this.client.sendOperationRequest(operationArguments, setMetadataOperationSpec$1);
} }
/** /**
* gets the permissions for the specified container. The permissions indicate whether container data * gets the permissions for the specified container. The permissions indicate whether container data
@ -19930,7 +20070,7 @@ class Container {
*/ */
getAccessPolicy(options) { getAccessPolicy(options) {
const operationArguments = { const operationArguments = {
options: coreHttp.operationOptionsToRequestOptionsBase(options || {}) options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
}; };
return this.client.sendOperationRequest(operationArguments, getAccessPolicyOperationSpec); return this.client.sendOperationRequest(operationArguments, getAccessPolicyOperationSpec);
} }
@ -19941,7 +20081,7 @@ class Container {
*/ */
setAccessPolicy(options) { setAccessPolicy(options) {
const operationArguments = { const operationArguments = {
options: coreHttp.operationOptionsToRequestOptionsBase(options || {}) options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
}; };
return this.client.sendOperationRequest(operationArguments, setAccessPolicyOperationSpec); return this.client.sendOperationRequest(operationArguments, setAccessPolicyOperationSpec);
} }
@ -19951,7 +20091,7 @@ class Container {
*/ */
restore(options) { restore(options) {
const operationArguments = { const operationArguments = {
options: coreHttp.operationOptionsToRequestOptionsBase(options || {}) options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
}; };
return this.client.sendOperationRequest(operationArguments, restoreOperationSpec); return this.client.sendOperationRequest(operationArguments, restoreOperationSpec);
} }
@ -19963,7 +20103,7 @@ class Container {
rename(sourceContainerName, options) { rename(sourceContainerName, options) {
const operationArguments = { const operationArguments = {
sourceContainerName, sourceContainerName,
options: coreHttp.operationOptionsToRequestOptionsBase(options || {}) options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
}; };
return this.client.sendOperationRequest(operationArguments, renameOperationSpec); return this.client.sendOperationRequest(operationArguments, renameOperationSpec);
} }
@ -19980,9 +20120,20 @@ class Container {
contentLength, contentLength,
multipartContentType, multipartContentType,
body, body,
options: coreHttp.operationOptionsToRequestOptionsBase(options || {}) options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
}; };
return this.client.sendOperationRequest(operationArguments, submitBatchOperationSpec$1); return this.client.sendOperationRequest(operationArguments, submitBatchOperationSpec);
}
/**
* The Filter Blobs operation enables callers to list blobs in a container whose tags match a given
* search expression. Filter blobs searches within the given container.
* @param options The options parameters.
*/
filterBlobs(options) {
const operationArguments = {
options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
};
return this.client.sendOperationRequest(operationArguments, filterBlobsOperationSpec);
} }
/** /**
* [Update] establishes and manages a lock on a container for delete operations. The lock duration can * [Update] establishes and manages a lock on a container for delete operations. The lock duration can
@ -19991,9 +20142,9 @@ class Container {
*/ */
acquireLease(options) { acquireLease(options) {
const operationArguments = { const operationArguments = {
options: coreHttp.operationOptionsToRequestOptionsBase(options || {}) options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
}; };
return this.client.sendOperationRequest(operationArguments, acquireLeaseOperationSpec); return this.client.sendOperationRequest(operationArguments, acquireLeaseOperationSpec$1);
} }
/** /**
* [Update] establishes and manages a lock on a container for delete operations. The lock duration can * [Update] establishes and manages a lock on a container for delete operations. The lock duration can
@ -20004,9 +20155,9 @@ class Container {
releaseLease(leaseId, options) { releaseLease(leaseId, options) {
const operationArguments = { const operationArguments = {
leaseId, leaseId,
options: coreHttp.operationOptionsToRequestOptionsBase(options || {}) options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
}; };
return this.client.sendOperationRequest(operationArguments, releaseLeaseOperationSpec); return this.client.sendOperationRequest(operationArguments, releaseLeaseOperationSpec$1);
} }
/** /**
* [Update] establishes and manages a lock on a container for delete operations. The lock duration can * [Update] establishes and manages a lock on a container for delete operations. The lock duration can
@ -20017,9 +20168,9 @@ class Container {
renewLease(leaseId, options) { renewLease(leaseId, options) {
const operationArguments = { const operationArguments = {
leaseId, leaseId,
options: coreHttp.operationOptionsToRequestOptionsBase(options || {}) options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
}; };
return this.client.sendOperationRequest(operationArguments, renewLeaseOperationSpec); return this.client.sendOperationRequest(operationArguments, renewLeaseOperationSpec$1);
} }
/** /**
* [Update] establishes and manages a lock on a container for delete operations. The lock duration can * [Update] establishes and manages a lock on a container for delete operations. The lock duration can
@ -20028,9 +20179,9 @@ class Container {
*/ */
breakLease(options) { breakLease(options) {
const operationArguments = { const operationArguments = {
options: coreHttp.operationOptionsToRequestOptionsBase(options || {}) options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
}; };
return this.client.sendOperationRequest(operationArguments, breakLeaseOperationSpec); return this.client.sendOperationRequest(operationArguments, breakLeaseOperationSpec$1);
} }
/** /**
* [Update] establishes and manages a lock on a container for delete operations. The lock duration can * [Update] establishes and manages a lock on a container for delete operations. The lock duration can
@ -20045,9 +20196,9 @@ class Container {
const operationArguments = { const operationArguments = {
leaseId, leaseId,
proposedLeaseId, proposedLeaseId,
options: coreHttp.operationOptionsToRequestOptionsBase(options || {}) options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
}; };
return this.client.sendOperationRequest(operationArguments, changeLeaseOperationSpec); return this.client.sendOperationRequest(operationArguments, changeLeaseOperationSpec$1);
} }
/** /**
* [Update] The List Blobs operation returns a list of the blobs under the specified container * [Update] The List Blobs operation returns a list of the blobs under the specified container
@ -20055,7 +20206,7 @@ class Container {
*/ */
listBlobFlatSegment(options) { listBlobFlatSegment(options) {
const operationArguments = { const operationArguments = {
options: coreHttp.operationOptionsToRequestOptionsBase(options || {}) options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
}; };
return this.client.sendOperationRequest(operationArguments, listBlobFlatSegmentOperationSpec); return this.client.sendOperationRequest(operationArguments, listBlobFlatSegmentOperationSpec);
} }
@ -20070,7 +20221,7 @@ class Container {
listBlobHierarchySegment(delimiter, options) { listBlobHierarchySegment(delimiter, options) {
const operationArguments = { const operationArguments = {
delimiter, delimiter,
options: coreHttp.operationOptionsToRequestOptionsBase(options || {}) options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
}; };
return this.client.sendOperationRequest(operationArguments, listBlobHierarchySegmentOperationSpec); return this.client.sendOperationRequest(operationArguments, listBlobHierarchySegmentOperationSpec);
} }
@ -20080,14 +20231,14 @@ class Container {
*/ */
getAccountInfo(options) { getAccountInfo(options) {
const operationArguments = { const operationArguments = {
options: coreHttp.operationOptionsToRequestOptionsBase(options || {}) options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
}; };
return this.client.sendOperationRequest(operationArguments, getAccountInfoOperationSpec$1); return this.client.sendOperationRequest(operationArguments, getAccountInfoOperationSpec$1);
} }
} }
// Operation Specifications // Operation Specifications
const xmlSerializer$1 = new coreHttp.Serializer(Mappers, /* isXml */ true); const xmlSerializer$4 = new coreHttp__namespace.Serializer(Mappers, /* isXml */ true);
const createOperationSpec = { const createOperationSpec$2 = {
path: "/{containerName}", path: "/{containerName}",
httpMethod: "PUT", httpMethod: "PUT",
responses: { responses: {
@ -20111,7 +20262,7 @@ const createOperationSpec = {
preventEncryptionScopeOverride preventEncryptionScopeOverride
], ],
isXML: true, isXML: true,
serializer: xmlSerializer$1 serializer: xmlSerializer$4
}; };
const getPropertiesOperationSpec$1 = { const getPropertiesOperationSpec$1 = {
path: "/{containerName}", path: "/{containerName}",
@ -20134,9 +20285,9 @@ const getPropertiesOperationSpec$1 = {
leaseId leaseId
], ],
isXML: true, isXML: true,
serializer: xmlSerializer$1 serializer: xmlSerializer$4
}; };
const deleteOperationSpec = { const deleteOperationSpec$1 = {
path: "/{containerName}", path: "/{containerName}",
httpMethod: "DELETE", httpMethod: "DELETE",
responses: { responses: {
@ -20159,9 +20310,9 @@ const deleteOperationSpec = {
ifUnmodifiedSince ifUnmodifiedSince
], ],
isXML: true, isXML: true,
serializer: xmlSerializer$1 serializer: xmlSerializer$4
}; };
const setMetadataOperationSpec = { const setMetadataOperationSpec$1 = {
path: "/{containerName}", path: "/{containerName}",
httpMethod: "PUT", httpMethod: "PUT",
responses: { responses: {
@ -20188,7 +20339,7 @@ const setMetadataOperationSpec = {
ifModifiedSince ifModifiedSince
], ],
isXML: true, isXML: true,
serializer: xmlSerializer$1 serializer: xmlSerializer$4
}; };
const getAccessPolicyOperationSpec = { const getAccessPolicyOperationSpec = {
path: "/{containerName}", path: "/{containerName}",
@ -20227,7 +20378,7 @@ const getAccessPolicyOperationSpec = {
leaseId leaseId
], ],
isXML: true, isXML: true,
serializer: xmlSerializer$1 serializer: xmlSerializer$4
}; };
const setAccessPolicyOperationSpec = { const setAccessPolicyOperationSpec = {
path: "/{containerName}", path: "/{containerName}",
@ -20261,7 +20412,7 @@ const setAccessPolicyOperationSpec = {
isXML: true, isXML: true,
contentType: "application/xml; charset=utf-8", contentType: "application/xml; charset=utf-8",
mediaType: "xml", mediaType: "xml",
serializer: xmlSerializer$1 serializer: xmlSerializer$4
}; };
const restoreOperationSpec = { const restoreOperationSpec = {
path: "/{containerName}", path: "/{containerName}",
@ -20289,7 +20440,7 @@ const restoreOperationSpec = {
deletedContainerVersion deletedContainerVersion
], ],
isXML: true, isXML: true,
serializer: xmlSerializer$1 serializer: xmlSerializer$4
}; };
const renameOperationSpec = { const renameOperationSpec = {
path: "/{containerName}", path: "/{containerName}",
@ -20317,9 +20468,9 @@ const renameOperationSpec = {
sourceLeaseId sourceLeaseId
], ],
isXML: true, isXML: true,
serializer: xmlSerializer$1 serializer: xmlSerializer$4
}; };
const submitBatchOperationSpec$1 = { const submitBatchOperationSpec = {
path: "/{containerName}", path: "/{containerName}",
httpMethod: "POST", httpMethod: "POST",
responses: { responses: {
@ -20353,9 +20504,39 @@ const submitBatchOperationSpec$1 = {
isXML: true, isXML: true,
contentType: "application/xml; charset=utf-8", contentType: "application/xml; charset=utf-8",
mediaType: "xml", mediaType: "xml",
serializer: xmlSerializer$1 serializer: xmlSerializer$4
}; };
const acquireLeaseOperationSpec = { const filterBlobsOperationSpec = {
path: "/{containerName}",
httpMethod: "GET",
responses: {
200: {
bodyMapper: FilterBlobSegment,
headersMapper: ContainerFilterBlobsHeaders
},
default: {
bodyMapper: StorageError,
headersMapper: ContainerFilterBlobsExceptionHeaders
}
},
queryParameters: [
timeoutInSeconds,
marker,
maxPageSize,
comp5,
where,
restype2
],
urlParameters: [url],
headerParameters: [
version,
requestId,
accept1
],
isXML: true,
serializer: xmlSerializer$4
};
const acquireLeaseOperationSpec$1 = {
path: "/{containerName}", path: "/{containerName}",
httpMethod: "PUT", httpMethod: "PUT",
responses: { responses: {
@ -20384,9 +20565,9 @@ const acquireLeaseOperationSpec = {
proposedLeaseId proposedLeaseId
], ],
isXML: true, isXML: true,
serializer: xmlSerializer$1 serializer: xmlSerializer$4
}; };
const releaseLeaseOperationSpec = { const releaseLeaseOperationSpec$1 = {
path: "/{containerName}", path: "/{containerName}",
httpMethod: "PUT", httpMethod: "PUT",
responses: { responses: {
@ -20414,9 +20595,9 @@ const releaseLeaseOperationSpec = {
leaseId1 leaseId1
], ],
isXML: true, isXML: true,
serializer: xmlSerializer$1 serializer: xmlSerializer$4
}; };
const renewLeaseOperationSpec = { const renewLeaseOperationSpec$1 = {
path: "/{containerName}", path: "/{containerName}",
httpMethod: "PUT", httpMethod: "PUT",
responses: { responses: {
@ -20444,9 +20625,9 @@ const renewLeaseOperationSpec = {
action2 action2
], ],
isXML: true, isXML: true,
serializer: xmlSerializer$1 serializer: xmlSerializer$4
}; };
const breakLeaseOperationSpec = { const breakLeaseOperationSpec$1 = {
path: "/{containerName}", path: "/{containerName}",
httpMethod: "PUT", httpMethod: "PUT",
responses: { responses: {
@ -20474,9 +20655,9 @@ const breakLeaseOperationSpec = {
breakPeriod breakPeriod
], ],
isXML: true, isXML: true,
serializer: xmlSerializer$1 serializer: xmlSerializer$4
}; };
const changeLeaseOperationSpec = { const changeLeaseOperationSpec$1 = {
path: "/{containerName}", path: "/{containerName}",
httpMethod: "PUT", httpMethod: "PUT",
responses: { responses: {
@ -20505,7 +20686,7 @@ const changeLeaseOperationSpec = {
proposedLeaseId1 proposedLeaseId1
], ],
isXML: true, isXML: true,
serializer: xmlSerializer$1 serializer: xmlSerializer$4
}; };
const listBlobFlatSegmentOperationSpec = { const listBlobFlatSegmentOperationSpec = {
path: "/{containerName}", path: "/{containerName}",
@ -20536,7 +20717,7 @@ const listBlobFlatSegmentOperationSpec = {
accept1 accept1
], ],
isXML: true, isXML: true,
serializer: xmlSerializer$1 serializer: xmlSerializer$4
}; };
const listBlobHierarchySegmentOperationSpec = { const listBlobHierarchySegmentOperationSpec = {
path: "/{containerName}", path: "/{containerName}",
@ -20568,7 +20749,7 @@ const listBlobHierarchySegmentOperationSpec = {
accept1 accept1
], ],
isXML: true, isXML: true,
serializer: xmlSerializer$1 serializer: xmlSerializer$4
}; };
const getAccountInfoOperationSpec$1 = { const getAccountInfoOperationSpec$1 = {
path: "/{containerName}", path: "/{containerName}",
@ -20586,7 +20767,7 @@ const getAccountInfoOperationSpec$1 = {
urlParameters: [url], urlParameters: [url],
headerParameters: [version, accept1], headerParameters: [version, accept1],
isXML: true, isXML: true,
serializer: xmlSerializer$1 serializer: xmlSerializer$4
}; };
/* /*
@ -20612,7 +20793,7 @@ class Blob$1 {
*/ */
download(options) { download(options) {
const operationArguments = { const operationArguments = {
options: coreHttp.operationOptionsToRequestOptionsBase(options || {}) options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
}; };
return this.client.sendOperationRequest(operationArguments, downloadOperationSpec); return this.client.sendOperationRequest(operationArguments, downloadOperationSpec);
} }
@ -20623,9 +20804,9 @@ class Blob$1 {
*/ */
getProperties(options) { getProperties(options) {
const operationArguments = { const operationArguments = {
options: coreHttp.operationOptionsToRequestOptionsBase(options || {}) options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
}; };
return this.client.sendOperationRequest(operationArguments, getPropertiesOperationSpec$2); return this.client.sendOperationRequest(operationArguments, getPropertiesOperationSpec);
} }
/** /**
* If the storage account's soft delete feature is disabled then, when a blob is deleted, it is * If the storage account's soft delete feature is disabled then, when a blob is deleted, it is
@ -20644,9 +20825,9 @@ class Blob$1 {
*/ */
delete(options) { delete(options) {
const operationArguments = { const operationArguments = {
options: coreHttp.operationOptionsToRequestOptionsBase(options || {}) options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
}; };
return this.client.sendOperationRequest(operationArguments, deleteOperationSpec$1); return this.client.sendOperationRequest(operationArguments, deleteOperationSpec);
} }
/** /**
* Undelete a blob that was previously soft deleted * Undelete a blob that was previously soft deleted
@ -20654,7 +20835,7 @@ class Blob$1 {
*/ */
undelete(options) { undelete(options) {
const operationArguments = { const operationArguments = {
options: coreHttp.operationOptionsToRequestOptionsBase(options || {}) options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
}; };
return this.client.sendOperationRequest(operationArguments, undeleteOperationSpec); return this.client.sendOperationRequest(operationArguments, undeleteOperationSpec);
} }
@ -20666,7 +20847,7 @@ class Blob$1 {
setExpiry(expiryOptions, options) { setExpiry(expiryOptions, options) {
const operationArguments = { const operationArguments = {
expiryOptions, expiryOptions,
options: coreHttp.operationOptionsToRequestOptionsBase(options || {}) options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
}; };
return this.client.sendOperationRequest(operationArguments, setExpiryOperationSpec); return this.client.sendOperationRequest(operationArguments, setExpiryOperationSpec);
} }
@ -20676,7 +20857,7 @@ class Blob$1 {
*/ */
setHttpHeaders(options) { setHttpHeaders(options) {
const operationArguments = { const operationArguments = {
options: coreHttp.operationOptionsToRequestOptionsBase(options || {}) options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
}; };
return this.client.sendOperationRequest(operationArguments, setHttpHeadersOperationSpec); return this.client.sendOperationRequest(operationArguments, setHttpHeadersOperationSpec);
} }
@ -20686,7 +20867,7 @@ class Blob$1 {
*/ */
setImmutabilityPolicy(options) { setImmutabilityPolicy(options) {
const operationArguments = { const operationArguments = {
options: coreHttp.operationOptionsToRequestOptionsBase(options || {}) options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
}; };
return this.client.sendOperationRequest(operationArguments, setImmutabilityPolicyOperationSpec); return this.client.sendOperationRequest(operationArguments, setImmutabilityPolicyOperationSpec);
} }
@ -20696,7 +20877,7 @@ class Blob$1 {
*/ */
deleteImmutabilityPolicy(options) { deleteImmutabilityPolicy(options) {
const operationArguments = { const operationArguments = {
options: coreHttp.operationOptionsToRequestOptionsBase(options || {}) options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
}; };
return this.client.sendOperationRequest(operationArguments, deleteImmutabilityPolicyOperationSpec); return this.client.sendOperationRequest(operationArguments, deleteImmutabilityPolicyOperationSpec);
} }
@ -20708,7 +20889,7 @@ class Blob$1 {
setLegalHold(legalHold, options) { setLegalHold(legalHold, options) {
const operationArguments = { const operationArguments = {
legalHold, legalHold,
options: coreHttp.operationOptionsToRequestOptionsBase(options || {}) options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
}; };
return this.client.sendOperationRequest(operationArguments, setLegalHoldOperationSpec); return this.client.sendOperationRequest(operationArguments, setLegalHoldOperationSpec);
} }
@ -20719,9 +20900,9 @@ class Blob$1 {
*/ */
setMetadata(options) { setMetadata(options) {
const operationArguments = { const operationArguments = {
options: coreHttp.operationOptionsToRequestOptionsBase(options || {}) options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
}; };
return this.client.sendOperationRequest(operationArguments, setMetadataOperationSpec$1); return this.client.sendOperationRequest(operationArguments, setMetadataOperationSpec);
} }
/** /**
* [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete * [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete
@ -20730,9 +20911,9 @@ class Blob$1 {
*/ */
acquireLease(options) { acquireLease(options) {
const operationArguments = { const operationArguments = {
options: coreHttp.operationOptionsToRequestOptionsBase(options || {}) options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
}; };
return this.client.sendOperationRequest(operationArguments, acquireLeaseOperationSpec$1); return this.client.sendOperationRequest(operationArguments, acquireLeaseOperationSpec);
} }
/** /**
* [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete * [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete
@ -20743,9 +20924,9 @@ class Blob$1 {
releaseLease(leaseId, options) { releaseLease(leaseId, options) {
const operationArguments = { const operationArguments = {
leaseId, leaseId,
options: coreHttp.operationOptionsToRequestOptionsBase(options || {}) options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
}; };
return this.client.sendOperationRequest(operationArguments, releaseLeaseOperationSpec$1); return this.client.sendOperationRequest(operationArguments, releaseLeaseOperationSpec);
} }
/** /**
* [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete * [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete
@ -20756,9 +20937,9 @@ class Blob$1 {
renewLease(leaseId, options) { renewLease(leaseId, options) {
const operationArguments = { const operationArguments = {
leaseId, leaseId,
options: coreHttp.operationOptionsToRequestOptionsBase(options || {}) options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
}; };
return this.client.sendOperationRequest(operationArguments, renewLeaseOperationSpec$1); return this.client.sendOperationRequest(operationArguments, renewLeaseOperationSpec);
} }
/** /**
* [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete * [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete
@ -20773,9 +20954,9 @@ class Blob$1 {
const operationArguments = { const operationArguments = {
leaseId, leaseId,
proposedLeaseId, proposedLeaseId,
options: coreHttp.operationOptionsToRequestOptionsBase(options || {}) options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
}; };
return this.client.sendOperationRequest(operationArguments, changeLeaseOperationSpec$1); return this.client.sendOperationRequest(operationArguments, changeLeaseOperationSpec);
} }
/** /**
* [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete * [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete
@ -20784,9 +20965,9 @@ class Blob$1 {
*/ */
breakLease(options) { breakLease(options) {
const operationArguments = { const operationArguments = {
options: coreHttp.operationOptionsToRequestOptionsBase(options || {}) options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
}; };
return this.client.sendOperationRequest(operationArguments, breakLeaseOperationSpec$1); return this.client.sendOperationRequest(operationArguments, breakLeaseOperationSpec);
} }
/** /**
* The Create Snapshot operation creates a read-only snapshot of a blob * The Create Snapshot operation creates a read-only snapshot of a blob
@ -20794,7 +20975,7 @@ class Blob$1 {
*/ */
createSnapshot(options) { createSnapshot(options) {
const operationArguments = { const operationArguments = {
options: coreHttp.operationOptionsToRequestOptionsBase(options || {}) options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
}; };
return this.client.sendOperationRequest(operationArguments, createSnapshotOperationSpec); return this.client.sendOperationRequest(operationArguments, createSnapshotOperationSpec);
} }
@ -20809,7 +20990,7 @@ class Blob$1 {
startCopyFromURL(copySource, options) { startCopyFromURL(copySource, options) {
const operationArguments = { const operationArguments = {
copySource, copySource,
options: coreHttp.operationOptionsToRequestOptionsBase(options || {}) options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
}; };
return this.client.sendOperationRequest(operationArguments, startCopyFromURLOperationSpec); return this.client.sendOperationRequest(operationArguments, startCopyFromURLOperationSpec);
} }
@ -20825,7 +21006,7 @@ class Blob$1 {
copyFromURL(copySource, options) { copyFromURL(copySource, options) {
const operationArguments = { const operationArguments = {
copySource, copySource,
options: coreHttp.operationOptionsToRequestOptionsBase(options || {}) options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
}; };
return this.client.sendOperationRequest(operationArguments, copyFromURLOperationSpec); return this.client.sendOperationRequest(operationArguments, copyFromURLOperationSpec);
} }
@ -20839,7 +21020,7 @@ class Blob$1 {
abortCopyFromURL(copyId, options) { abortCopyFromURL(copyId, options) {
const operationArguments = { const operationArguments = {
copyId, copyId,
options: coreHttp.operationOptionsToRequestOptionsBase(options || {}) options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
}; };
return this.client.sendOperationRequest(operationArguments, abortCopyFromURLOperationSpec); return this.client.sendOperationRequest(operationArguments, abortCopyFromURLOperationSpec);
} }
@ -20855,7 +21036,7 @@ class Blob$1 {
setTier(tier, options) { setTier(tier, options) {
const operationArguments = { const operationArguments = {
tier, tier,
options: coreHttp.operationOptionsToRequestOptionsBase(options || {}) options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
}; };
return this.client.sendOperationRequest(operationArguments, setTierOperationSpec); return this.client.sendOperationRequest(operationArguments, setTierOperationSpec);
} }
@ -20865,9 +21046,9 @@ class Blob$1 {
*/ */
getAccountInfo(options) { getAccountInfo(options) {
const operationArguments = { const operationArguments = {
options: coreHttp.operationOptionsToRequestOptionsBase(options || {}) options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
}; };
return this.client.sendOperationRequest(operationArguments, getAccountInfoOperationSpec$2); return this.client.sendOperationRequest(operationArguments, getAccountInfoOperationSpec);
} }
/** /**
* The Query operation enables users to select/project on blob data by providing simple query * The Query operation enables users to select/project on blob data by providing simple query
@ -20876,7 +21057,7 @@ class Blob$1 {
*/ */
query(options) { query(options) {
const operationArguments = { const operationArguments = {
options: coreHttp.operationOptionsToRequestOptionsBase(options || {}) options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
}; };
return this.client.sendOperationRequest(operationArguments, queryOperationSpec); return this.client.sendOperationRequest(operationArguments, queryOperationSpec);
} }
@ -20886,7 +21067,7 @@ class Blob$1 {
*/ */
getTags(options) { getTags(options) {
const operationArguments = { const operationArguments = {
options: coreHttp.operationOptionsToRequestOptionsBase(options || {}) options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
}; };
return this.client.sendOperationRequest(operationArguments, getTagsOperationSpec); return this.client.sendOperationRequest(operationArguments, getTagsOperationSpec);
} }
@ -20896,13 +21077,13 @@ class Blob$1 {
*/ */
setTags(options) { setTags(options) {
const operationArguments = { const operationArguments = {
options: coreHttp.operationOptionsToRequestOptionsBase(options || {}) options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
}; };
return this.client.sendOperationRequest(operationArguments, setTagsOperationSpec); return this.client.sendOperationRequest(operationArguments, setTagsOperationSpec);
} }
} }
// Operation Specifications // Operation Specifications
const xmlSerializer$2 = new coreHttp.Serializer(Mappers, /* isXml */ true); const xmlSerializer$3 = new coreHttp__namespace.Serializer(Mappers, /* isXml */ true);
const downloadOperationSpec = { const downloadOperationSpec = {
path: "/{containerName}/{blob}", path: "/{containerName}/{blob}",
httpMethod: "GET", httpMethod: "GET",
@ -20950,9 +21131,9 @@ const downloadOperationSpec = {
ifTags ifTags
], ],
isXML: true, isXML: true,
serializer: xmlSerializer$2 serializer: xmlSerializer$3
}; };
const getPropertiesOperationSpec$2 = { const getPropertiesOperationSpec = {
path: "/{containerName}/{blob}", path: "/{containerName}/{blob}",
httpMethod: "HEAD", httpMethod: "HEAD",
responses: { responses: {
@ -20985,9 +21166,9 @@ const getPropertiesOperationSpec$2 = {
ifTags ifTags
], ],
isXML: true, isXML: true,
serializer: xmlSerializer$2 serializer: xmlSerializer$3
}; };
const deleteOperationSpec$1 = { const deleteOperationSpec = {
path: "/{containerName}/{blob}", path: "/{containerName}/{blob}",
httpMethod: "DELETE", httpMethod: "DELETE",
responses: { responses: {
@ -21019,7 +21200,7 @@ const deleteOperationSpec$1 = {
deleteSnapshots deleteSnapshots
], ],
isXML: true, isXML: true,
serializer: xmlSerializer$2 serializer: xmlSerializer$3
}; };
const undeleteOperationSpec = { const undeleteOperationSpec = {
path: "/{containerName}/{blob}", path: "/{containerName}/{blob}",
@ -21041,7 +21222,7 @@ const undeleteOperationSpec = {
accept1 accept1
], ],
isXML: true, isXML: true,
serializer: xmlSerializer$2 serializer: xmlSerializer$3
}; };
const setExpiryOperationSpec = { const setExpiryOperationSpec = {
path: "/{containerName}/{blob}", path: "/{containerName}/{blob}",
@ -21065,7 +21246,7 @@ const setExpiryOperationSpec = {
expiresOn expiresOn
], ],
isXML: true, isXML: true,
serializer: xmlSerializer$2 serializer: xmlSerializer$3
}; };
const setHttpHeadersOperationSpec = { const setHttpHeadersOperationSpec = {
path: "/{containerName}/{blob}", path: "/{containerName}/{blob}",
@ -21099,7 +21280,7 @@ const setHttpHeadersOperationSpec = {
blobContentDisposition blobContentDisposition
], ],
isXML: true, isXML: true,
serializer: xmlSerializer$2 serializer: xmlSerializer$3
}; };
const setImmutabilityPolicyOperationSpec = { const setImmutabilityPolicyOperationSpec = {
path: "/{containerName}/{blob}", path: "/{containerName}/{blob}",
@ -21124,7 +21305,7 @@ const setImmutabilityPolicyOperationSpec = {
immutabilityPolicyMode immutabilityPolicyMode
], ],
isXML: true, isXML: true,
serializer: xmlSerializer$2 serializer: xmlSerializer$3
}; };
const deleteImmutabilityPolicyOperationSpec = { const deleteImmutabilityPolicyOperationSpec = {
path: "/{containerName}/{blob}", path: "/{containerName}/{blob}",
@ -21146,7 +21327,7 @@ const deleteImmutabilityPolicyOperationSpec = {
accept1 accept1
], ],
isXML: true, isXML: true,
serializer: xmlSerializer$2 serializer: xmlSerializer$3
}; };
const setLegalHoldOperationSpec = { const setLegalHoldOperationSpec = {
path: "/{containerName}/{blob}", path: "/{containerName}/{blob}",
@ -21169,9 +21350,9 @@ const setLegalHoldOperationSpec = {
legalHold legalHold
], ],
isXML: true, isXML: true,
serializer: xmlSerializer$2 serializer: xmlSerializer$3
}; };
const setMetadataOperationSpec$1 = { const setMetadataOperationSpec = {
path: "/{containerName}/{blob}", path: "/{containerName}/{blob}",
httpMethod: "PUT", httpMethod: "PUT",
responses: { responses: {
@ -21202,9 +21383,9 @@ const setMetadataOperationSpec$1 = {
encryptionScope encryptionScope
], ],
isXML: true, isXML: true,
serializer: xmlSerializer$2 serializer: xmlSerializer$3
}; };
const acquireLeaseOperationSpec$1 = { const acquireLeaseOperationSpec = {
path: "/{containerName}/{blob}", path: "/{containerName}/{blob}",
httpMethod: "PUT", httpMethod: "PUT",
responses: { responses: {
@ -21232,9 +21413,9 @@ const acquireLeaseOperationSpec$1 = {
ifTags ifTags
], ],
isXML: true, isXML: true,
serializer: xmlSerializer$2 serializer: xmlSerializer$3
}; };
const releaseLeaseOperationSpec$1 = { const releaseLeaseOperationSpec = {
path: "/{containerName}/{blob}", path: "/{containerName}/{blob}",
httpMethod: "PUT", httpMethod: "PUT",
responses: { responses: {
@ -21261,9 +21442,9 @@ const releaseLeaseOperationSpec$1 = {
ifTags ifTags
], ],
isXML: true, isXML: true,
serializer: xmlSerializer$2 serializer: xmlSerializer$3
}; };
const renewLeaseOperationSpec$1 = { const renewLeaseOperationSpec = {
path: "/{containerName}/{blob}", path: "/{containerName}/{blob}",
httpMethod: "PUT", httpMethod: "PUT",
responses: { responses: {
@ -21290,9 +21471,9 @@ const renewLeaseOperationSpec$1 = {
ifTags ifTags
], ],
isXML: true, isXML: true,
serializer: xmlSerializer$2 serializer: xmlSerializer$3
}; };
const changeLeaseOperationSpec$1 = { const changeLeaseOperationSpec = {
path: "/{containerName}/{blob}", path: "/{containerName}/{blob}",
httpMethod: "PUT", httpMethod: "PUT",
responses: { responses: {
@ -21320,9 +21501,9 @@ const changeLeaseOperationSpec$1 = {
ifTags ifTags
], ],
isXML: true, isXML: true,
serializer: xmlSerializer$2 serializer: xmlSerializer$3
}; };
const breakLeaseOperationSpec$1 = { const breakLeaseOperationSpec = {
path: "/{containerName}/{blob}", path: "/{containerName}/{blob}",
httpMethod: "PUT", httpMethod: "PUT",
responses: { responses: {
@ -21349,7 +21530,7 @@ const breakLeaseOperationSpec$1 = {
ifTags ifTags
], ],
isXML: true, isXML: true,
serializer: xmlSerializer$2 serializer: xmlSerializer$3
}; };
const createSnapshotOperationSpec = { const createSnapshotOperationSpec = {
path: "/{containerName}/{blob}", path: "/{containerName}/{blob}",
@ -21382,7 +21563,7 @@ const createSnapshotOperationSpec = {
encryptionScope encryptionScope
], ],
isXML: true, isXML: true,
serializer: xmlSerializer$2 serializer: xmlSerializer$3
}; };
const startCopyFromURLOperationSpec = { const startCopyFromURLOperationSpec = {
path: "/{containerName}/{blob}", path: "/{containerName}/{blob}",
@ -21424,7 +21605,7 @@ const startCopyFromURLOperationSpec = {
legalHold1 legalHold1
], ],
isXML: true, isXML: true,
serializer: xmlSerializer$2 serializer: xmlSerializer$3
}; };
const copyFromURLOperationSpec = { const copyFromURLOperationSpec = {
path: "/{containerName}/{blob}", path: "/{containerName}/{blob}",
@ -21453,6 +21634,7 @@ const copyFromURLOperationSpec = {
ifTags, ifTags,
immutabilityPolicyExpiry, immutabilityPolicyExpiry,
immutabilityPolicyMode, immutabilityPolicyMode,
encryptionScope,
tier, tier,
sourceIfModifiedSince, sourceIfModifiedSince,
sourceIfUnmodifiedSince, sourceIfUnmodifiedSince,
@ -21466,7 +21648,7 @@ const copyFromURLOperationSpec = {
copySourceAuthorization copySourceAuthorization
], ],
isXML: true, isXML: true,
serializer: xmlSerializer$2 serializer: xmlSerializer$3
}; };
const abortCopyFromURLOperationSpec = { const abortCopyFromURLOperationSpec = {
path: "/{containerName}/{blob}", path: "/{containerName}/{blob}",
@ -21494,7 +21676,7 @@ const abortCopyFromURLOperationSpec = {
copyActionAbortConstant copyActionAbortConstant
], ],
isXML: true, isXML: true,
serializer: xmlSerializer$2 serializer: xmlSerializer$3
}; };
const setTierOperationSpec = { const setTierOperationSpec = {
path: "/{containerName}/{blob}", path: "/{containerName}/{blob}",
@ -21528,9 +21710,9 @@ const setTierOperationSpec = {
tier1 tier1
], ],
isXML: true, isXML: true,
serializer: xmlSerializer$2 serializer: xmlSerializer$3
}; };
const getAccountInfoOperationSpec$2 = { const getAccountInfoOperationSpec = {
path: "/{containerName}/{blob}", path: "/{containerName}/{blob}",
httpMethod: "GET", httpMethod: "GET",
responses: { responses: {
@ -21546,7 +21728,7 @@ const getAccountInfoOperationSpec$2 = {
urlParameters: [url], urlParameters: [url],
headerParameters: [version, accept1], headerParameters: [version, accept1],
isXML: true, isXML: true,
serializer: xmlSerializer$2 serializer: xmlSerializer$3
}; };
const queryOperationSpec = { const queryOperationSpec = {
path: "/{containerName}/{blob}", path: "/{containerName}/{blob}",
@ -21596,7 +21778,7 @@ const queryOperationSpec = {
isXML: true, isXML: true,
contentType: "application/xml; charset=utf-8", contentType: "application/xml; charset=utf-8",
mediaType: "xml", mediaType: "xml",
serializer: xmlSerializer$2 serializer: xmlSerializer$3
}; };
const getTagsOperationSpec = { const getTagsOperationSpec = {
path: "/{containerName}/{blob}", path: "/{containerName}/{blob}",
@ -21626,7 +21808,7 @@ const getTagsOperationSpec = {
ifTags ifTags
], ],
isXML: true, isXML: true,
serializer: xmlSerializer$2 serializer: xmlSerializer$3
}; };
const setTagsOperationSpec = { const setTagsOperationSpec = {
path: "/{containerName}/{blob}", path: "/{containerName}/{blob}",
@ -21660,7 +21842,7 @@ const setTagsOperationSpec = {
isXML: true, isXML: true,
contentType: "application/xml; charset=utf-8", contentType: "application/xml; charset=utf-8",
mediaType: "xml", mediaType: "xml",
serializer: xmlSerializer$2 serializer: xmlSerializer$3
}; };
/* /*
@ -21690,7 +21872,7 @@ class PageBlob {
const operationArguments = { const operationArguments = {
contentLength, contentLength,
blobContentLength, blobContentLength,
options: coreHttp.operationOptionsToRequestOptionsBase(options || {}) options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
}; };
return this.client.sendOperationRequest(operationArguments, createOperationSpec$1); return this.client.sendOperationRequest(operationArguments, createOperationSpec$1);
} }
@ -21704,7 +21886,7 @@ class PageBlob {
const operationArguments = { const operationArguments = {
contentLength, contentLength,
body, body,
options: coreHttp.operationOptionsToRequestOptionsBase(options || {}) options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
}; };
return this.client.sendOperationRequest(operationArguments, uploadPagesOperationSpec); return this.client.sendOperationRequest(operationArguments, uploadPagesOperationSpec);
} }
@ -21716,7 +21898,7 @@ class PageBlob {
clearPages(contentLength, options) { clearPages(contentLength, options) {
const operationArguments = { const operationArguments = {
contentLength, contentLength,
options: coreHttp.operationOptionsToRequestOptionsBase(options || {}) options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
}; };
return this.client.sendOperationRequest(operationArguments, clearPagesOperationSpec); return this.client.sendOperationRequest(operationArguments, clearPagesOperationSpec);
} }
@ -21737,7 +21919,7 @@ class PageBlob {
sourceRange, sourceRange,
contentLength, contentLength,
range, range,
options: coreHttp.operationOptionsToRequestOptionsBase(options || {}) options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
}; };
return this.client.sendOperationRequest(operationArguments, uploadPagesFromURLOperationSpec); return this.client.sendOperationRequest(operationArguments, uploadPagesFromURLOperationSpec);
} }
@ -21748,7 +21930,7 @@ class PageBlob {
*/ */
getPageRanges(options) { getPageRanges(options) {
const operationArguments = { const operationArguments = {
options: coreHttp.operationOptionsToRequestOptionsBase(options || {}) options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
}; };
return this.client.sendOperationRequest(operationArguments, getPageRangesOperationSpec); return this.client.sendOperationRequest(operationArguments, getPageRangesOperationSpec);
} }
@ -21759,7 +21941,7 @@ class PageBlob {
*/ */
getPageRangesDiff(options) { getPageRangesDiff(options) {
const operationArguments = { const operationArguments = {
options: coreHttp.operationOptionsToRequestOptionsBase(options || {}) options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
}; };
return this.client.sendOperationRequest(operationArguments, getPageRangesDiffOperationSpec); return this.client.sendOperationRequest(operationArguments, getPageRangesDiffOperationSpec);
} }
@ -21772,7 +21954,7 @@ class PageBlob {
resize(blobContentLength, options) { resize(blobContentLength, options) {
const operationArguments = { const operationArguments = {
blobContentLength, blobContentLength,
options: coreHttp.operationOptionsToRequestOptionsBase(options || {}) options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
}; };
return this.client.sendOperationRequest(operationArguments, resizeOperationSpec); return this.client.sendOperationRequest(operationArguments, resizeOperationSpec);
} }
@ -21786,7 +21968,7 @@ class PageBlob {
updateSequenceNumber(sequenceNumberAction, options) { updateSequenceNumber(sequenceNumberAction, options) {
const operationArguments = { const operationArguments = {
sequenceNumberAction, sequenceNumberAction,
options: coreHttp.operationOptionsToRequestOptionsBase(options || {}) options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
}; };
return this.client.sendOperationRequest(operationArguments, updateSequenceNumberOperationSpec); return this.client.sendOperationRequest(operationArguments, updateSequenceNumberOperationSpec);
} }
@ -21805,14 +21987,14 @@ class PageBlob {
copyIncremental(copySource, options) { copyIncremental(copySource, options) {
const operationArguments = { const operationArguments = {
copySource, copySource,
options: coreHttp.operationOptionsToRequestOptionsBase(options || {}) options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
}; };
return this.client.sendOperationRequest(operationArguments, copyIncrementalOperationSpec); return this.client.sendOperationRequest(operationArguments, copyIncrementalOperationSpec);
} }
} }
// Operation Specifications // Operation Specifications
const xmlSerializer$3 = new coreHttp.Serializer(Mappers, /* isXml */ true); const xmlSerializer$2 = new coreHttp__namespace.Serializer(Mappers, /* isXml */ true);
const serializer = new coreHttp.Serializer(Mappers, /* isXml */ false); const serializer$2 = new coreHttp__namespace.Serializer(Mappers, /* isXml */ false);
const createOperationSpec$1 = { const createOperationSpec$1 = {
path: "/{containerName}/{blob}", path: "/{containerName}/{blob}",
httpMethod: "PUT", httpMethod: "PUT",
@ -21859,7 +22041,7 @@ const createOperationSpec$1 = {
blobSequenceNumber blobSequenceNumber
], ],
isXML: true, isXML: true,
serializer: xmlSerializer$3 serializer: xmlSerializer$2
}; };
const uploadPagesOperationSpec = { const uploadPagesOperationSpec = {
path: "/{containerName}/{blob}", path: "/{containerName}/{blob}",
@ -21901,7 +22083,7 @@ const uploadPagesOperationSpec = {
ifSequenceNumberEqualTo ifSequenceNumberEqualTo
], ],
mediaType: "binary", mediaType: "binary",
serializer serializer: serializer$2
}; };
const clearPagesOperationSpec = { const clearPagesOperationSpec = {
path: "/{containerName}/{blob}", path: "/{containerName}/{blob}",
@ -21939,7 +22121,7 @@ const clearPagesOperationSpec = {
pageWrite1 pageWrite1
], ],
isXML: true, isXML: true,
serializer: xmlSerializer$3 serializer: xmlSerializer$2
}; };
const uploadPagesFromURLOperationSpec = { const uploadPagesFromURLOperationSpec = {
path: "/{containerName}/{blob}", path: "/{containerName}/{blob}",
@ -21986,7 +22168,7 @@ const uploadPagesFromURLOperationSpec = {
range1 range1
], ],
isXML: true, isXML: true,
serializer: xmlSerializer$3 serializer: xmlSerializer$2
}; };
const getPageRangesOperationSpec = { const getPageRangesOperationSpec = {
path: "/{containerName}/{blob}", path: "/{containerName}/{blob}",
@ -22020,7 +22202,7 @@ const getPageRangesOperationSpec = {
ifTags ifTags
], ],
isXML: true, isXML: true,
serializer: xmlSerializer$3 serializer: xmlSerializer$2
}; };
const getPageRangesDiffOperationSpec = { const getPageRangesDiffOperationSpec = {
path: "/{containerName}/{blob}", path: "/{containerName}/{blob}",
@ -22056,7 +22238,7 @@ const getPageRangesDiffOperationSpec = {
prevSnapshotUrl prevSnapshotUrl
], ],
isXML: true, isXML: true,
serializer: xmlSerializer$3 serializer: xmlSerializer$2
}; };
const resizeOperationSpec = { const resizeOperationSpec = {
path: "/{containerName}/{blob}", path: "/{containerName}/{blob}",
@ -22089,7 +22271,7 @@ const resizeOperationSpec = {
blobContentLength blobContentLength
], ],
isXML: true, isXML: true,
serializer: xmlSerializer$3 serializer: xmlSerializer$2
}; };
const updateSequenceNumberOperationSpec = { const updateSequenceNumberOperationSpec = {
path: "/{containerName}/{blob}", path: "/{containerName}/{blob}",
@ -22119,7 +22301,7 @@ const updateSequenceNumberOperationSpec = {
sequenceNumberAction sequenceNumberAction
], ],
isXML: true, isXML: true,
serializer: xmlSerializer$3 serializer: xmlSerializer$2
}; };
const copyIncrementalOperationSpec = { const copyIncrementalOperationSpec = {
path: "/{containerName}/{blob}", path: "/{containerName}/{blob}",
@ -22147,7 +22329,7 @@ const copyIncrementalOperationSpec = {
copySource copySource
], ],
isXML: true, isXML: true,
serializer: xmlSerializer$3 serializer: xmlSerializer$2
}; };
/* /*
@ -22174,9 +22356,9 @@ class AppendBlob {
create(contentLength, options) { create(contentLength, options) {
const operationArguments = { const operationArguments = {
contentLength, contentLength,
options: coreHttp.operationOptionsToRequestOptionsBase(options || {}) options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
}; };
return this.client.sendOperationRequest(operationArguments, createOperationSpec$2); return this.client.sendOperationRequest(operationArguments, createOperationSpec);
} }
/** /**
* The Append Block operation commits a new block of data to the end of an existing append blob. The * The Append Block operation commits a new block of data to the end of an existing append blob. The
@ -22190,7 +22372,7 @@ class AppendBlob {
const operationArguments = { const operationArguments = {
contentLength, contentLength,
body, body,
options: coreHttp.operationOptionsToRequestOptionsBase(options || {}) options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
}; };
return this.client.sendOperationRequest(operationArguments, appendBlockOperationSpec); return this.client.sendOperationRequest(operationArguments, appendBlockOperationSpec);
} }
@ -22207,7 +22389,7 @@ class AppendBlob {
const operationArguments = { const operationArguments = {
sourceUrl, sourceUrl,
contentLength, contentLength,
options: coreHttp.operationOptionsToRequestOptionsBase(options || {}) options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
}; };
return this.client.sendOperationRequest(operationArguments, appendBlockFromUrlOperationSpec); return this.client.sendOperationRequest(operationArguments, appendBlockFromUrlOperationSpec);
} }
@ -22218,15 +22400,15 @@ class AppendBlob {
*/ */
seal(options) { seal(options) {
const operationArguments = { const operationArguments = {
options: coreHttp.operationOptionsToRequestOptionsBase(options || {}) options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
}; };
return this.client.sendOperationRequest(operationArguments, sealOperationSpec); return this.client.sendOperationRequest(operationArguments, sealOperationSpec);
} }
} }
// Operation Specifications // Operation Specifications
const xmlSerializer$4 = new coreHttp.Serializer(Mappers, /* isXml */ true); const xmlSerializer$1 = new coreHttp__namespace.Serializer(Mappers, /* isXml */ true);
const serializer$1 = new coreHttp.Serializer(Mappers, /* isXml */ false); const serializer$1 = new coreHttp__namespace.Serializer(Mappers, /* isXml */ false);
const createOperationSpec$2 = { const createOperationSpec = {
path: "/{containerName}/{blob}", path: "/{containerName}/{blob}",
httpMethod: "PUT", httpMethod: "PUT",
responses: { responses: {
@ -22269,7 +22451,7 @@ const createOperationSpec$2 = {
blobType1 blobType1
], ],
isXML: true, isXML: true,
serializer: xmlSerializer$4 serializer: xmlSerializer$1
}; };
const appendBlockOperationSpec = { const appendBlockOperationSpec = {
path: "/{containerName}/{blob}", path: "/{containerName}/{blob}",
@ -22353,7 +22535,7 @@ const appendBlockFromUrlOperationSpec = {
sourceRange1 sourceRange1
], ],
isXML: true, isXML: true,
serializer: xmlSerializer$4 serializer: xmlSerializer$1
}; };
const sealOperationSpec = { const sealOperationSpec = {
path: "/{containerName}/{blob}", path: "/{containerName}/{blob}",
@ -22381,7 +22563,7 @@ const sealOperationSpec = {
appendPosition appendPosition
], ],
isXML: true, isXML: true,
serializer: xmlSerializer$4 serializer: xmlSerializer$1
}; };
/* /*
@ -22413,7 +22595,7 @@ class BlockBlob {
const operationArguments = { const operationArguments = {
contentLength, contentLength,
body, body,
options: coreHttp.operationOptionsToRequestOptionsBase(options || {}) options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
}; };
return this.client.sendOperationRequest(operationArguments, uploadOperationSpec); return this.client.sendOperationRequest(operationArguments, uploadOperationSpec);
} }
@ -22434,7 +22616,7 @@ class BlockBlob {
const operationArguments = { const operationArguments = {
contentLength, contentLength,
copySource, copySource,
options: coreHttp.operationOptionsToRequestOptionsBase(options || {}) options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
}; };
return this.client.sendOperationRequest(operationArguments, putBlobFromUrlOperationSpec); return this.client.sendOperationRequest(operationArguments, putBlobFromUrlOperationSpec);
} }
@ -22452,7 +22634,7 @@ class BlockBlob {
blockId, blockId,
contentLength, contentLength,
body, body,
options: coreHttp.operationOptionsToRequestOptionsBase(options || {}) options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
}; };
return this.client.sendOperationRequest(operationArguments, stageBlockOperationSpec); return this.client.sendOperationRequest(operationArguments, stageBlockOperationSpec);
} }
@ -22471,7 +22653,7 @@ class BlockBlob {
blockId, blockId,
contentLength, contentLength,
sourceUrl, sourceUrl,
options: coreHttp.operationOptionsToRequestOptionsBase(options || {}) options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
}; };
return this.client.sendOperationRequest(operationArguments, stageBlockFromURLOperationSpec); return this.client.sendOperationRequest(operationArguments, stageBlockFromURLOperationSpec);
} }
@ -22489,7 +22671,7 @@ class BlockBlob {
commitBlockList(blocks, options) { commitBlockList(blocks, options) {
const operationArguments = { const operationArguments = {
blocks, blocks,
options: coreHttp.operationOptionsToRequestOptionsBase(options || {}) options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
}; };
return this.client.sendOperationRequest(operationArguments, commitBlockListOperationSpec); return this.client.sendOperationRequest(operationArguments, commitBlockListOperationSpec);
} }
@ -22503,14 +22685,14 @@ class BlockBlob {
getBlockList(listType, options) { getBlockList(listType, options) {
const operationArguments = { const operationArguments = {
listType, listType,
options: coreHttp.operationOptionsToRequestOptionsBase(options || {}) options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
}; };
return this.client.sendOperationRequest(operationArguments, getBlockListOperationSpec); return this.client.sendOperationRequest(operationArguments, getBlockListOperationSpec);
} }
} }
// Operation Specifications // Operation Specifications
const xmlSerializer$5 = new coreHttp.Serializer(Mappers, /* isXml */ true); const xmlSerializer = new coreHttp__namespace.Serializer(Mappers, /* isXml */ true);
const serializer$2 = new coreHttp.Serializer(Mappers, /* isXml */ false); const serializer = new coreHttp__namespace.Serializer(Mappers, /* isXml */ false);
const uploadOperationSpec = { const uploadOperationSpec = {
path: "/{containerName}/{blob}", path: "/{containerName}/{blob}",
httpMethod: "PUT", httpMethod: "PUT",
@ -22558,7 +22740,7 @@ const uploadOperationSpec = {
blobType2 blobType2
], ],
mediaType: "binary", mediaType: "binary",
serializer: serializer$2 serializer
}; };
const putBlobFromUrlOperationSpec = { const putBlobFromUrlOperationSpec = {
path: "/{containerName}/{blob}", path: "/{containerName}/{blob}",
@ -22611,7 +22793,7 @@ const putBlobFromUrlOperationSpec = {
copySourceBlobProperties copySourceBlobProperties
], ],
isXML: true, isXML: true,
serializer: xmlSerializer$5 serializer: xmlSerializer
}; };
const stageBlockOperationSpec = { const stageBlockOperationSpec = {
path: "/{containerName}/{blob}", path: "/{containerName}/{blob}",
@ -22647,7 +22829,7 @@ const stageBlockOperationSpec = {
accept2 accept2
], ],
mediaType: "binary", mediaType: "binary",
serializer: serializer$2 serializer
}; };
const stageBlockFromURLOperationSpec = { const stageBlockFromURLOperationSpec = {
path: "/{containerName}/{blob}", path: "/{containerName}/{blob}",
@ -22688,7 +22870,7 @@ const stageBlockFromURLOperationSpec = {
sourceRange1 sourceRange1
], ],
isXML: true, isXML: true,
serializer: xmlSerializer$5 serializer: xmlSerializer
}; };
const commitBlockListOperationSpec = { const commitBlockListOperationSpec = {
path: "/{containerName}/{blob}", path: "/{containerName}/{blob}",
@ -22738,7 +22920,7 @@ const commitBlockListOperationSpec = {
isXML: true, isXML: true,
contentType: "application/xml; charset=utf-8", contentType: "application/xml; charset=utf-8",
mediaType: "xml", mediaType: "xml",
serializer: xmlSerializer$5 serializer: xmlSerializer
}; };
const getBlockListOperationSpec = { const getBlockListOperationSpec = {
path: "/{containerName}/{blob}", path: "/{containerName}/{blob}",
@ -22768,7 +22950,7 @@ const getBlockListOperationSpec = {
ifTags ifTags
], ],
isXML: true, isXML: true,
serializer: xmlSerializer$5 serializer: xmlSerializer
}; };
// Copyright (c) Microsoft Corporation. // Copyright (c) Microsoft Corporation.
@ -22779,8 +22961,8 @@ const logger = logger$1.createClientLogger("storage-blob");
// Copyright (c) Microsoft Corporation. // Copyright (c) Microsoft Corporation.
// Licensed under the MIT license. // Licensed under the MIT license.
const SDK_VERSION = "12.8.0"; const SDK_VERSION = "12.9.0";
const SERVICE_VERSION = "2020-10-02"; const SERVICE_VERSION = "2021-04-10";
const BLOCK_BLOB_MAX_UPLOAD_BLOB_BYTES = 256 * 1024 * 1024; // 256MB const BLOCK_BLOB_MAX_UPLOAD_BLOB_BYTES = 256 * 1024 * 1024; // 256MB
const BLOCK_BLOB_MAX_STAGE_BLOCK_BYTES = 4000 * 1024 * 1024; // 4000MB const BLOCK_BLOB_MAX_STAGE_BLOCK_BYTES = 4000 * 1024 * 1024; // 4000MB
const BLOCK_BLOB_MAX_BLOCKS = 50000; const BLOCK_BLOB_MAX_BLOCKS = 50000;
@ -22797,15 +22979,15 @@ const URLConstants = {
SIGNATURE: "sig", SIGNATURE: "sig",
SNAPSHOT: "snapshot", SNAPSHOT: "snapshot",
VERSIONID: "versionid", VERSIONID: "versionid",
TIMEOUT: "timeout" TIMEOUT: "timeout",
} },
}; };
const HTTPURLConnection = { const HTTPURLConnection = {
HTTP_ACCEPTED: 202, HTTP_ACCEPTED: 202,
HTTP_CONFLICT: 409, HTTP_CONFLICT: 409,
HTTP_NOT_FOUND: 404, HTTP_NOT_FOUND: 404,
HTTP_PRECON_FAILED: 412, HTTP_PRECON_FAILED: 412,
HTTP_RANGE_NOT_SATISFIABLE: 416 HTTP_RANGE_NOT_SATISFIABLE: 416,
}; };
const HeaderConstants = { const HeaderConstants = {
AUTHORIZATION: "Authorization", AUTHORIZATION: "Authorization",
@ -22830,7 +23012,7 @@ const HeaderConstants = {
X_MS_COPY_SOURCE: "x-ms-copy-source", X_MS_COPY_SOURCE: "x-ms-copy-source",
X_MS_DATE: "x-ms-date", X_MS_DATE: "x-ms-date",
X_MS_ERROR_CODE: "x-ms-error-code", X_MS_ERROR_CODE: "x-ms-error-code",
X_MS_VERSION: "x-ms-version" X_MS_VERSION: "x-ms-version",
}; };
const ETagNone = ""; const ETagNone = "";
const ETagAny = "*"; const ETagAny = "*";
@ -22935,7 +23117,7 @@ const StorageBlobLoggingAllowedHeaderNames = [
"x-ms-tag-count", "x-ms-tag-count",
"x-ms-encryption-key-sha256", "x-ms-encryption-key-sha256",
"x-ms-if-tags", "x-ms-if-tags",
"x-ms-source-if-tags" "x-ms-source-if-tags",
]; ];
const StorageBlobLoggingAllowedQueryParameters = [ const StorageBlobLoggingAllowedQueryParameters = [
"comp", "comp",
@ -22970,8 +23152,9 @@ const StorageBlobLoggingAllowedQueryParameters = [
"skt", "skt",
"sktid", "sktid",
"skv", "skv",
"snapshot" "snapshot",
]; ];
const BlobUsesCustomerSpecifiedEncryptionMsg = "BlobUsesCustomerSpecifiedEncryption";
// Copyright (c) Microsoft Corporation. // Copyright (c) Microsoft Corporation.
/** /**
@ -23111,7 +23294,7 @@ function extractConnectionStringParts(connectionString) {
url: blobEndpoint, url: blobEndpoint,
accountName, accountName,
accountKey, accountKey,
proxyUri proxyUri,
}; };
} }
else { else {
@ -23443,14 +23626,14 @@ function toBlobTags(tags) {
return undefined; return undefined;
} }
const res = { const res = {
blobTagSet: [] blobTagSet: [],
}; };
for (const key in tags) { for (const key in tags) {
if (Object.prototype.hasOwnProperty.call(tags, key)) { if (Object.prototype.hasOwnProperty.call(tags, key)) {
const value = tags[key]; const value = tags[key];
res.blobTagSet.push({ res.blobTagSet.push({
key, key,
value value,
}); });
} }
} }
@ -23490,33 +23673,33 @@ function toQuerySerialization(textConfiguration) {
fieldQuote: textConfiguration.fieldQuote || "", fieldQuote: textConfiguration.fieldQuote || "",
recordSeparator: textConfiguration.recordSeparator, recordSeparator: textConfiguration.recordSeparator,
escapeChar: textConfiguration.escapeCharacter || "", escapeChar: textConfiguration.escapeCharacter || "",
headersPresent: textConfiguration.hasHeaders || false headersPresent: textConfiguration.hasHeaders || false,
} },
} },
}; };
case "json": case "json":
return { return {
format: { format: {
type: "json", type: "json",
jsonTextConfiguration: { jsonTextConfiguration: {
recordSeparator: textConfiguration.recordSeparator recordSeparator: textConfiguration.recordSeparator,
} },
} },
}; };
case "arrow": case "arrow":
return { return {
format: { format: {
type: "arrow", type: "arrow",
arrowConfiguration: { arrowConfiguration: {
schema: textConfiguration.schema schema: textConfiguration.schema,
} },
} },
}; };
case "parquet": case "parquet":
return { return {
format: { format: {
type: "parquet" type: "parquet",
} },
}; };
default: default:
throw Error("Invalid BlobQueryTextConfiguration."); throw Error("Invalid BlobQueryTextConfiguration.");
@ -23540,7 +23723,7 @@ function parseObjectReplicationRecord(objectReplicationRecord) {
} }
const rule = { const rule = {
ruleId: ids[1], ruleId: ids[1],
replicationStatus: objectReplicationRecord[key] replicationStatus: objectReplicationRecord[key],
}; };
const policyIndex = orProperties.findIndex((policy) => policy.policyId === ids[0]); const policyIndex = orProperties.findIndex((policy) => policy.policyId === ids[0]);
if (policyIndex > -1) { if (policyIndex > -1) {
@ -23549,7 +23732,7 @@ function parseObjectReplicationRecord(objectReplicationRecord) {
else { else {
orProperties.push({ orProperties.push({
policyId: ids[0], policyId: ids[0],
rules: [rule] rules: [rule],
}); });
} }
} }
@ -23568,6 +23751,202 @@ function attachCredential(thing, credential) {
function httpAuthorizationToString(httpAuthorization) { function httpAuthorizationToString(httpAuthorization) {
return httpAuthorization ? httpAuthorization.scheme + " " + httpAuthorization.value : undefined; return httpAuthorization ? httpAuthorization.scheme + " " + httpAuthorization.value : undefined;
} }
function BlobNameToString(name) {
if (name.encoded) {
return decodeURIComponent(name.content);
}
else {
return name.content;
}
}
function ConvertInternalResponseOfListBlobFlat(internalResponse) {
return Object.assign(Object.assign({}, internalResponse), { segment: {
blobItems: internalResponse.segment.blobItems.map((blobItemInteral) => {
const blobItem = Object.assign(Object.assign({}, blobItemInteral), { name: BlobNameToString(blobItemInteral.name) });
return blobItem;
}),
} });
}
function ConvertInternalResponseOfListBlobHierarchy(internalResponse) {
var _a;
return Object.assign(Object.assign({}, internalResponse), { segment: {
blobPrefixes: (_a = internalResponse.segment.blobPrefixes) === null || _a === void 0 ? void 0 : _a.map((blobPrefixInternal) => {
const blobPrefix = {
name: BlobNameToString(blobPrefixInternal.name),
};
return blobPrefix;
}),
blobItems: internalResponse.segment.blobItems.map((blobItemInteral) => {
const blobItem = Object.assign(Object.assign({}, blobItemInteral), { name: BlobNameToString(blobItemInteral.name) });
return blobItem;
}),
} });
}
function decodeBase64String(value) {
if (coreHttp.isNode) {
return Buffer.from(value, "base64");
}
else {
const byteString = atob(value);
const arr = new Uint8Array(byteString.length);
for (let i = 0; i < byteString.length; i++) {
arr[i] = byteString.charCodeAt(i);
}
return arr;
}
}
function ParseBoolean(content) {
if (content === undefined)
return undefined;
if (content === "true")
return true;
if (content === "false")
return false;
return undefined;
}
function ParseBlobName(blobNameInXML) {
if (blobNameInXML["$"] !== undefined && blobNameInXML["#"] !== undefined) {
return {
encoded: ParseBoolean(blobNameInXML["$"]["Encoded"]),
content: blobNameInXML["#"],
};
}
else {
return {
encoded: false,
content: blobNameInXML,
};
}
}
function ParseBlobItem(blobInXML) {
const blobPropertiesInXML = blobInXML["Properties"];
const blobProperties = {
createdOn: new Date(blobPropertiesInXML["Creation-Time"]),
lastModified: new Date(blobPropertiesInXML["Last-Modified"]),
etag: blobPropertiesInXML["Etag"],
contentLength: blobPropertiesInXML["Content-Length"] === undefined
? undefined
: parseFloat(blobPropertiesInXML["Content-Length"]),
contentType: blobPropertiesInXML["Content-Type"],
contentEncoding: blobPropertiesInXML["Content-Encoding"],
contentLanguage: blobPropertiesInXML["Content-Language"],
contentMD5: decodeBase64String(blobPropertiesInXML["Content-MD5"]),
contentDisposition: blobPropertiesInXML["Content-Disposition"],
cacheControl: blobPropertiesInXML["Cache-Control"],
blobSequenceNumber: blobPropertiesInXML["x-ms-blob-sequence-number"] === undefined
? undefined
: parseFloat(blobPropertiesInXML["x-ms-blob-sequence-number"]),
blobType: blobPropertiesInXML["BlobType"],
leaseStatus: blobPropertiesInXML["LeaseStatus"],
leaseState: blobPropertiesInXML["LeaseState"],
leaseDuration: blobPropertiesInXML["LeaseDuration"],
copyId: blobPropertiesInXML["CopyId"],
copyStatus: blobPropertiesInXML["CopyStatus"],
copySource: blobPropertiesInXML["CopySource"],
copyProgress: blobPropertiesInXML["CopyProgress"],
copyCompletedOn: blobPropertiesInXML["CopyCompletionTime"] === undefined
? undefined
: new Date(blobPropertiesInXML["CopyCompletionTime"]),
copyStatusDescription: blobPropertiesInXML["CopyStatusDescription"],
serverEncrypted: ParseBoolean(blobPropertiesInXML["ServerEncrypted"]),
incrementalCopy: ParseBoolean(blobPropertiesInXML["IncrementalCopy"]),
destinationSnapshot: blobPropertiesInXML["DestinationSnapshot"],
deletedOn: blobPropertiesInXML["DeletedTime"] === undefined
? undefined
: new Date(blobPropertiesInXML["DeletedTime"]),
remainingRetentionDays: blobPropertiesInXML["RemainingRetentionDays"] === undefined
? undefined
: parseFloat(blobPropertiesInXML["RemainingRetentionDays"]),
accessTier: blobPropertiesInXML["AccessTier"],
accessTierInferred: ParseBoolean(blobPropertiesInXML["AccessTierInferred"]),
archiveStatus: blobPropertiesInXML["ArchiveStatus"],
customerProvidedKeySha256: blobPropertiesInXML["CustomerProvidedKeySha256"],
encryptionScope: blobPropertiesInXML["EncryptionScope"],
accessTierChangedOn: blobPropertiesInXML["AccessTierChangeTime"] === undefined
? undefined
: new Date(blobPropertiesInXML["AccessTierChangeTime"]),
tagCount: blobPropertiesInXML["TagCount"] === undefined
? undefined
: parseFloat(blobPropertiesInXML["TagCount"]),
expiresOn: blobPropertiesInXML["Expiry-Time"] === undefined
? undefined
: new Date(blobPropertiesInXML["Expiry-Time"]),
isSealed: ParseBoolean(blobPropertiesInXML["Sealed"]),
rehydratePriority: blobPropertiesInXML["RehydratePriority"],
lastAccessedOn: blobPropertiesInXML["LastAccessTime"] === undefined
? undefined
: new Date(blobPropertiesInXML["LastAccessTime"]),
immutabilityPolicyExpiresOn: blobPropertiesInXML["ImmutabilityPolicyUntilDate"] === undefined
? undefined
: new Date(blobPropertiesInXML["ImmutabilityPolicyUntilDate"]),
immutabilityPolicyMode: blobPropertiesInXML["ImmutabilityPolicyMode"],
legalHold: ParseBoolean(blobPropertiesInXML["LegalHold"]),
};
return {
name: ParseBlobName(blobInXML["Name"]),
deleted: ParseBoolean(blobInXML["Deleted"]),
snapshot: blobInXML["Snapshot"],
versionId: blobInXML["VersionId"],
isCurrentVersion: ParseBoolean(blobInXML["IsCurrentVersion"]),
properties: blobProperties,
metadata: blobInXML["Metadata"],
blobTags: ParseBlobTags(blobInXML["Tags"]),
objectReplicationMetadata: blobInXML["OrMetadata"],
hasVersionsOnly: ParseBoolean(blobInXML["HasVersionsOnly"]),
};
}
function ParseBlobPrefix(blobPrefixInXML) {
return {
name: ParseBlobName(blobPrefixInXML["Name"]),
};
}
function ParseBlobTag(blobTagInXML) {
return {
key: blobTagInXML["Key"],
value: blobTagInXML["Value"],
};
}
function ParseBlobTags(blobTagsInXML) {
if (blobTagsInXML === undefined ||
blobTagsInXML["TagSet"] === undefined ||
blobTagsInXML["TagSet"]["Tag"] === undefined) {
return undefined;
}
const blobTagSet = [];
if (blobTagsInXML["TagSet"]["Tag"] instanceof Array) {
blobTagsInXML["TagSet"]["Tag"].forEach((blobTagInXML) => {
blobTagSet.push(ParseBlobTag(blobTagInXML));
});
}
else {
blobTagSet.push(ParseBlobTag(blobTagsInXML["TagSet"]["Tag"]));
}
return { blobTagSet: blobTagSet };
}
function ProcessBlobItems(blobArrayInXML) {
const blobItems = [];
if (blobArrayInXML instanceof Array) {
blobArrayInXML.forEach((blobInXML) => {
blobItems.push(ParseBlobItem(blobInXML));
});
}
else {
blobItems.push(ParseBlobItem(blobArrayInXML));
}
return blobItems;
}
function ProcessBlobPrefixes(blobPrefixesInXML) {
const blobPrefixes = [];
if (blobPrefixesInXML instanceof Array) {
blobPrefixesInXML.forEach((blobPrefixInXML) => {
blobPrefixes.push(ParseBlobPrefix(blobPrefixInXML));
});
}
else {
blobPrefixes.push(ParseBlobPrefix(blobPrefixesInXML));
}
return blobPrefixes;
}
// Copyright (c) Microsoft Corporation. // Copyright (c) Microsoft Corporation.
/** /**
@ -23598,9 +23977,16 @@ class StorageBrowserPolicy extends coreHttp.BaseRequestPolicy {
* @param request - * @param request -
*/ */
async sendRequest(request) { async sendRequest(request) {
{ if (coreHttp.isNode) {
return this._nextPolicy.sendRequest(request); return this._nextPolicy.sendRequest(request);
} }
if (request.method.toUpperCase() === "GET" || request.method.toUpperCase() === "HEAD") {
request.url = setURLParameter(request.url, URLConstants.Parameters.FORCE_BROWSER_NO_CACHE, new Date().getTime().toString());
}
request.headers.remove(HeaderConstants.COOKIE);
// According to XHR standards, content-length should be fully controlled by browsers
request.headers.remove(HeaderConstants.CONTENT_LENGTH);
return this._nextPolicy.sendRequest(request);
} }
} }
@ -23621,6 +24007,10 @@ class StorageBrowserPolicyFactory {
} }
// Copyright (c) Microsoft Corporation. // Copyright (c) Microsoft Corporation.
/**
* RetryPolicy types.
*/
exports.StorageRetryPolicyType = void 0;
(function (StorageRetryPolicyType) { (function (StorageRetryPolicyType) {
/** /**
* Exponential retry. Retry time delay grows exponentially. * Exponential retry. Retry time delay grows exponentially.
@ -23638,7 +24028,7 @@ const DEFAULT_RETRY_OPTIONS = {
retryDelayInMs: 4 * 1000, retryDelayInMs: 4 * 1000,
retryPolicyType: exports.StorageRetryPolicyType.EXPONENTIAL, retryPolicyType: exports.StorageRetryPolicyType.EXPONENTIAL,
secondaryHost: "", secondaryHost: "",
tryTimeoutInMs: undefined // Use server side default timeout strategy tryTimeoutInMs: undefined, // Use server side default timeout strategy
}; };
const RETRY_ABORT_ERROR = new abortController.AbortError("The operation was aborted."); const RETRY_ABORT_ERROR = new abortController.AbortError("The operation was aborted.");
/** /**
@ -23675,7 +24065,7 @@ class StorageRetryPolicy extends coreHttp.BaseRequestPolicy {
: DEFAULT_RETRY_OPTIONS.maxRetryDelayInMs, : DEFAULT_RETRY_OPTIONS.maxRetryDelayInMs,
secondaryHost: retryOptions.secondaryHost secondaryHost: retryOptions.secondaryHost
? retryOptions.secondaryHost ? retryOptions.secondaryHost
: DEFAULT_RETRY_OPTIONS.secondaryHost : DEFAULT_RETRY_OPTIONS.secondaryHost,
}; };
} }
/** /**
@ -23752,7 +24142,7 @@ class StorageRetryPolicy extends coreHttp.BaseRequestPolicy {
"ENOTFOUND", "ENOTFOUND",
"TIMEOUT", "TIMEOUT",
"EPIPE", "EPIPE",
"REQUEST_SEND_ERROR" // For default xhr based http client provided in ms-rest-js "REQUEST_SEND_ERROR", // For default xhr based http client provided in ms-rest-js
]; ];
if (err) { if (err) {
for (const retriableError of retriableErrors) { for (const retriableError of retriableErrors) {
@ -23938,7 +24328,7 @@ class TelemetryPolicy extends coreHttp.BaseRequestPolicy {
* @param request - * @param request -
*/ */
async sendRequest(request) { async sendRequest(request) {
{ if (coreHttp.isNode) {
if (!request.headers) { if (!request.headers) {
request.headers = new coreHttp.HttpHeaders(); request.headers = new coreHttp.HttpHeaders();
} }
@ -23961,7 +24351,7 @@ class TelemetryPolicyFactory {
*/ */
constructor(telemetry) { constructor(telemetry) {
const userAgentInfo = []; const userAgentInfo = [];
{ if (coreHttp.isNode) {
if (telemetry) { if (telemetry) {
const telemetryString = telemetry.userAgentPrefix || ""; const telemetryString = telemetry.userAgentPrefix || "";
if (telemetryString.length > 0 && userAgentInfo.indexOf(telemetryString) === -1) { if (telemetryString.length > 0 && userAgentInfo.indexOf(telemetryString) === -1) {
@ -23974,7 +24364,7 @@ class TelemetryPolicyFactory {
userAgentInfo.push(libInfo); userAgentInfo.push(libInfo);
} }
// e.g. (NODE-VERSION 4.9.1; Windows_NT 10.0.16299) // e.g. (NODE-VERSION 4.9.1; Windows_NT 10.0.16299)
const runtimeInfo = `(NODE-VERSION ${process.version}; ${os.type()} ${os.release()})`; const runtimeInfo = `(NODE-VERSION ${process.version}; ${os__namespace.type()} ${os__namespace.release()})`;
if (userAgentInfo.indexOf(runtimeInfo) === -1) { if (userAgentInfo.indexOf(runtimeInfo) === -1) {
userAgentInfo.push(runtimeInfo); userAgentInfo.push(runtimeInfo);
} }
@ -23998,6 +24388,247 @@ function getCachedDefaultHttpClient() {
return _defaultHttpClient; return _defaultHttpClient;
} }
// Copyright (c) Microsoft Corporation.
/**
* A set of constants used internally when processing requests.
*/
const Constants = {
DefaultScope: "/.default",
/**
* Defines constants for use with HTTP headers.
*/
HeaderConstants: {
/**
* The Authorization header.
*/
AUTHORIZATION: "authorization",
},
};
// Default options for the cycler if none are provided
const DEFAULT_CYCLER_OPTIONS = {
forcedRefreshWindowInMs: 1000,
retryIntervalInMs: 3000,
refreshWindowInMs: 1000 * 60 * 2, // Start refreshing 2m before expiry
};
/**
* Converts an an unreliable access token getter (which may resolve with null)
* into an AccessTokenGetter by retrying the unreliable getter in a regular
* interval.
*
* @param getAccessToken - a function that produces a promise of an access
* token that may fail by returning null
* @param retryIntervalInMs - the time (in milliseconds) to wait between retry
* attempts
* @param timeoutInMs - the timestamp after which the refresh attempt will fail,
* throwing an exception
* @returns - a promise that, if it resolves, will resolve with an access token
*/
async function beginRefresh(getAccessToken, retryIntervalInMs, timeoutInMs) {
// This wrapper handles exceptions gracefully as long as we haven't exceeded
// the timeout.
async function tryGetAccessToken() {
if (Date.now() < timeoutInMs) {
try {
return await getAccessToken();
}
catch (_a) {
return null;
}
}
else {
const finalToken = await getAccessToken();
// Timeout is up, so throw if it's still null
if (finalToken === null) {
throw new Error("Failed to refresh access token.");
}
return finalToken;
}
}
let token = await tryGetAccessToken();
while (token === null) {
await coreHttp.delay(retryIntervalInMs);
token = await tryGetAccessToken();
}
return token;
}
/**
* Creates a token cycler from a credential, scopes, and optional settings.
*
* A token cycler represents a way to reliably retrieve a valid access token
* from a TokenCredential. It will handle initializing the token, refreshing it
* when it nears expiration, and synchronizes refresh attempts to avoid
* concurrency hazards.
*
* @param credential - the underlying TokenCredential that provides the access
* token
* @param scopes - the scopes to request authorization for
* @param tokenCyclerOptions - optionally override default settings for the cycler
*
* @returns - a function that reliably produces a valid access token
*/
function createTokenCycler(credential, scopes, tokenCyclerOptions) {
let refreshWorker = null;
let token = null;
const options = Object.assign(Object.assign({}, DEFAULT_CYCLER_OPTIONS), tokenCyclerOptions);
/**
* This little holder defines several predicates that we use to construct
* the rules of refreshing the token.
*/
const cycler = {
/**
* Produces true if a refresh job is currently in progress.
*/
get isRefreshing() {
return refreshWorker !== null;
},
/**
* Produces true if the cycler SHOULD refresh (we are within the refresh
* window and not already refreshing)
*/
get shouldRefresh() {
var _a;
return (!cycler.isRefreshing &&
((_a = token === null || token === void 0 ? void 0 : token.expiresOnTimestamp) !== null && _a !== void 0 ? _a : 0) - options.refreshWindowInMs < Date.now());
},
/**
* Produces true if the cycler MUST refresh (null or nearly-expired
* token).
*/
get mustRefresh() {
return (token === null || token.expiresOnTimestamp - options.forcedRefreshWindowInMs < Date.now());
},
};
/**
* Starts a refresh job or returns the existing job if one is already
* running.
*/
function refresh(getTokenOptions) {
var _a;
if (!cycler.isRefreshing) {
// We bind `scopes` here to avoid passing it around a lot
const tryGetAccessToken = () => credential.getToken(scopes, getTokenOptions);
// Take advantage of promise chaining to insert an assignment to `token`
// before the refresh can be considered done.
refreshWorker = beginRefresh(tryGetAccessToken, options.retryIntervalInMs,
// If we don't have a token, then we should timeout immediately
(_a = token === null || token === void 0 ? void 0 : token.expiresOnTimestamp) !== null && _a !== void 0 ? _a : Date.now())
.then((_token) => {
refreshWorker = null;
token = _token;
return token;
})
.catch((reason) => {
// We also should reset the refresher if we enter a failed state. All
// existing awaiters will throw, but subsequent requests will start a
// new retry chain.
refreshWorker = null;
token = null;
throw reason;
});
}
return refreshWorker;
}
return async (tokenOptions) => {
//
// Simple rules:
// - If we MUST refresh, then return the refresh task, blocking
// the pipeline until a token is available.
// - If we SHOULD refresh, then run refresh but don't return it
// (we can still use the cached token).
// - Return the token, since it's fine if we didn't return in
// step 1.
//
if (cycler.mustRefresh)
return refresh(tokenOptions);
if (cycler.shouldRefresh) {
refresh(tokenOptions);
}
return token;
};
}
/**
* We will retrieve the challenge only if the response status code was 401,
* and if the response contained the header "WWW-Authenticate" with a non-empty value.
*/
function getChallenge(response) {
const challenge = response.headers.get("WWW-Authenticate");
if (response.status === 401 && challenge) {
return challenge;
}
return;
}
/**
* Converts: `Bearer a="b" c="d"`.
* Into: `[ { a: 'b', c: 'd' }]`.
*
* @internal
*/
function parseChallenge(challenge) {
const bearerChallenge = challenge.slice("Bearer ".length);
const challengeParts = `${bearerChallenge.trim()} `.split(" ").filter((x) => x);
const keyValuePairs = challengeParts.map((keyValue) => (([key, value]) => ({ [key]: value }))(keyValue.trim().split("=")));
// Key-value pairs to plain object:
return keyValuePairs.reduce((a, b) => (Object.assign(Object.assign({}, a), b)), {});
}
// #endregion
/**
* Creates a new factory for a RequestPolicy that applies a bearer token to
* the requests' `Authorization` headers.
*
* @param credential - The TokenCredential implementation that can supply the bearer token.
* @param scopes - The scopes for which the bearer token applies.
*/
function storageBearerTokenChallengeAuthenticationPolicy(credential, scopes) {
// This simple function encapsulates the entire process of reliably retrieving the token
let getToken = createTokenCycler(credential, scopes);
class StorageBearerTokenChallengeAuthenticationPolicy extends coreHttp.BaseRequestPolicy {
constructor(nextPolicy, options) {
super(nextPolicy, options);
}
async sendRequest(webResource) {
if (!webResource.url.toLowerCase().startsWith("https://")) {
throw new Error("Bearer token authentication is not permitted for non-TLS protected (non-https) URLs.");
}
const getTokenInternal = getToken;
const token = (await getTokenInternal({
abortSignal: webResource.abortSignal,
tracingOptions: {
tracingContext: webResource.tracingContext,
},
})).token;
webResource.headers.set(Constants.HeaderConstants.AUTHORIZATION, `Bearer ${token}`);
const response = await this._nextPolicy.sendRequest(webResource);
if ((response === null || response === void 0 ? void 0 : response.status) === 401) {
const challenge = getChallenge(response);
if (challenge) {
const challengeInfo = parseChallenge(challenge);
const challengeScopes = challengeInfo.resource_id + Constants.DefaultScope;
const parsedAuthUri = coreHttp.URLBuilder.parse(challengeInfo.authorization_uri);
const pathSegments = parsedAuthUri.getPath().split("/");
const tenantId = pathSegments[1];
const getTokenForChallenge = createTokenCycler(credential, challengeScopes);
const tokenForChallenge = (await getTokenForChallenge({
abortSignal: webResource.abortSignal,
tracingOptions: {
tracingContext: webResource.tracingContext,
},
tenantId: tenantId,
})).token;
getToken = getTokenForChallenge;
webResource.headers.set(Constants.HeaderConstants.AUTHORIZATION, `Bearer ${tokenForChallenge}`);
return this._nextPolicy.sendRequest(webResource);
}
}
return response;
}
}
return {
create: (nextPolicy, options) => {
return new StorageBearerTokenChallengeAuthenticationPolicy(nextPolicy, options);
},
};
}
// Copyright (c) Microsoft Corporation. // Copyright (c) Microsoft Corporation.
/** /**
* A helper to decide if a given argument satisfies the Pipeline contract * A helper to decide if a given argument satisfies the Pipeline contract
@ -24043,7 +24674,7 @@ class Pipeline {
toServiceClientOptions() { toServiceClientOptions() {
return { return {
httpClient: this.options.httpClient, httpClient: this.options.httpClient,
requestPolicyFactories: this.factories requestPolicyFactories: this.factories,
}; };
} }
} }
@ -24055,6 +24686,7 @@ class Pipeline {
* @returns A new Pipeline object. * @returns A new Pipeline object.
*/ */
function newPipeline(credential, pipelineOptions = {}) { function newPipeline(credential, pipelineOptions = {}) {
var _a;
if (credential === undefined) { if (credential === undefined) {
credential = new AnonymousCredential(); credential = new AnonymousCredential();
} }
@ -24076,16 +24708,16 @@ function newPipeline(credential, pipelineOptions = {}) {
coreHttp.logPolicy({ coreHttp.logPolicy({
logger: logger.info, logger: logger.info,
allowedHeaderNames: StorageBlobLoggingAllowedHeaderNames, allowedHeaderNames: StorageBlobLoggingAllowedHeaderNames,
allowedQueryParameters: StorageBlobLoggingAllowedQueryParameters allowedQueryParameters: StorageBlobLoggingAllowedQueryParameters,
}) }),
]; ];
{ if (coreHttp.isNode) {
// policies only available in Node.js runtime, not in browsers // policies only available in Node.js runtime, not in browsers
factories.push(coreHttp.proxyPolicy(pipelineOptions.proxyOptions)); factories.push(coreHttp.proxyPolicy(pipelineOptions.proxyOptions));
factories.push(coreHttp.disableResponseDecompressionPolicy()); factories.push(coreHttp.disableResponseDecompressionPolicy());
} }
factories.push(coreHttp.isTokenCredential(credential) factories.push(coreHttp.isTokenCredential(credential)
? attachCredential(coreHttp.bearerTokenAuthenticationPolicy(credential, StorageOAuthScopes), credential) ? attachCredential(storageBearerTokenChallengeAuthenticationPolicy(credential, (_a = pipelineOptions.audience) !== null && _a !== void 0 ? _a : StorageOAuthScopes), credential)
: credential); : credential);
return new Pipeline(factories, pipelineOptions); return new Pipeline(factories, pipelineOptions);
} }
@ -24112,7 +24744,9 @@ class StorageSharedKeyCredentialPolicy extends CredentialPolicy {
*/ */
signRequest(request) { signRequest(request) {
request.headers.set(HeaderConstants.X_MS_DATE, new Date().toUTCString()); request.headers.set(HeaderConstants.X_MS_DATE, new Date().toUTCString());
if (request.body && typeof request.body === "string" && request.body.length > 0) { if (request.body &&
(typeof request.body === "string" || request.body !== undefined) &&
request.body.length > 0) {
request.headers.set(HeaderConstants.CONTENT_LENGTH, Buffer.byteLength(request.body)); request.headers.set(HeaderConstants.CONTENT_LENGTH, Buffer.byteLength(request.body));
} }
const stringToSign = [ const stringToSign = [
@ -24127,7 +24761,7 @@ class StorageSharedKeyCredentialPolicy extends CredentialPolicy {
this.getHeaderValueToSign(request, HeaderConstants.IF_MATCH), this.getHeaderValueToSign(request, HeaderConstants.IF_MATCH),
this.getHeaderValueToSign(request, HeaderConstants.IF_NONE_MATCH), this.getHeaderValueToSign(request, HeaderConstants.IF_NONE_MATCH),
this.getHeaderValueToSign(request, HeaderConstants.IF_UNMODIFIED_SINCE), this.getHeaderValueToSign(request, HeaderConstants.IF_UNMODIFIED_SINCE),
this.getHeaderValueToSign(request, HeaderConstants.RANGE) this.getHeaderValueToSign(request, HeaderConstants.RANGE),
].join("\n") + ].join("\n") +
"\n" + "\n" +
this.getCanonicalizedHeadersString(request) + this.getCanonicalizedHeadersString(request) +
@ -24256,9 +24890,7 @@ class StorageSharedKeyCredential extends Credential {
* @param stringToSign - * @param stringToSign -
*/ */
computeHMACSHA256(stringToSign) { computeHMACSHA256(stringToSign) {
return crypto.createHmac("sha256", this.accountKey) return crypto.createHmac("sha256", this.accountKey).update(stringToSign, "utf8").digest("base64");
.update(stringToSign, "utf8")
.digest("base64");
} }
} }
@ -24270,8 +24902,8 @@ class StorageSharedKeyCredential extends Credential {
* Changes may cause incorrect behavior and will be lost if the code is regenerated. * Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/ */
const packageName = "azure-storage-blob"; const packageName = "azure-storage-blob";
const packageVersion = "12.8.0"; const packageVersion = "12.9.0";
class StorageClientContext extends coreHttp.ServiceClient { class StorageClientContext extends coreHttp__namespace.ServiceClient {
/** /**
* Initializes a new instance of the StorageClientContext class. * Initializes a new instance of the StorageClientContext class.
* @param url The URL of the service account, container, or blob that is the target of the desired * @param url The URL of the service account, container, or blob that is the target of the desired
@ -24287,7 +24919,7 @@ class StorageClientContext extends coreHttp.ServiceClient {
options = {}; options = {};
} }
if (!options.userAgent) { if (!options.userAgent) {
const defaultUserAgent = coreHttp.getDefaultUserAgentValue(); const defaultUserAgent = coreHttp__namespace.getDefaultUserAgentValue();
options.userAgent = `${packageName}/${packageVersion} ${defaultUserAgent}`; options.userAgent = `${packageName}/${packageVersion} ${defaultUserAgent}`;
} }
super(undefined, options); super(undefined, options);
@ -24296,7 +24928,7 @@ class StorageClientContext extends coreHttp.ServiceClient {
// Parameter assignments // Parameter assignments
this.url = url; this.url = url;
// Assigning values to Constant parameters // Assigning values to Constant parameters
this.version = options.version || "2020-10-02"; this.version = options.version || "2021-04-10";
} }
} }
@ -24343,7 +24975,7 @@ class StorageClient {
*/ */
const createSpan = coreTracing.createSpanFunction({ const createSpan = coreTracing.createSpanFunction({
packagePrefix: "Azure.Storage.Blob", packagePrefix: "Azure.Storage.Blob",
namespace: "Microsoft.Storage" namespace: "Microsoft.Storage",
}); });
/** /**
* @internal * @internal
@ -24357,7 +24989,7 @@ function convertTracingToRequestOptionsBase(options) {
return { return {
// By passing spanOptions if they exist at runtime, we're backwards compatible with @azure/core-tracing@preview.13 and earlier. // By passing spanOptions if they exist at runtime, we're backwards compatible with @azure/core-tracing@preview.13 and earlier.
spanOptions: (_a = options === null || options === void 0 ? void 0 : options.tracingOptions) === null || _a === void 0 ? void 0 : _a.spanOptions, spanOptions: (_a = options === null || options === void 0 ? void 0 : options.tracingOptions) === null || _a === void 0 ? void 0 : _a.spanOptions,
tracingContext: (_b = options === null || options === void 0 ? void 0 : options.tracingOptions) === null || _b === void 0 ? void 0 : _b.tracingContext tracingContext: (_b = options === null || options === void 0 ? void 0 : options.tracingOptions) === null || _b === void 0 ? void 0 : _b.tracingContext,
}; };
} }
@ -24414,6 +25046,10 @@ class BlobSASPermissions {
* Specifies SetImmutabilityPolicy access granted. * Specifies SetImmutabilityPolicy access granted.
*/ */
this.setImmutabilityPolicy = false; this.setImmutabilityPolicy = false;
/**
* Specifies that Permanent Delete is permitted.
*/
this.permanentDelete = false;
} }
/** /**
* Creates a {@link BlobSASPermissions} from the specified permissions string. This method will throw an * Creates a {@link BlobSASPermissions} from the specified permissions string. This method will throw an
@ -24455,6 +25091,9 @@ class BlobSASPermissions {
case "i": case "i":
blobSASPermissions.setImmutabilityPolicy = true; blobSASPermissions.setImmutabilityPolicy = true;
break; break;
case "y":
blobSASPermissions.permanentDelete = true;
break;
default: default:
throw new RangeError(`Invalid permission: ${char}`); throw new RangeError(`Invalid permission: ${char}`);
} }
@ -24499,6 +25138,9 @@ class BlobSASPermissions {
if (permissionLike.setImmutabilityPolicy) { if (permissionLike.setImmutabilityPolicy) {
blobSASPermissions.setImmutabilityPolicy = true; blobSASPermissions.setImmutabilityPolicy = true;
} }
if (permissionLike.permanentDelete) {
blobSASPermissions.permanentDelete = true;
}
return blobSASPermissions; return blobSASPermissions;
} }
/** /**
@ -24539,6 +25181,9 @@ class BlobSASPermissions {
if (this.setImmutabilityPolicy) { if (this.setImmutabilityPolicy) {
permissions.push("i"); permissions.push("i");
} }
if (this.permanentDelete) {
permissions.push("y");
}
return permissions.join(""); return permissions.join("");
} }
} }
@ -24598,6 +25243,14 @@ class ContainerSASPermissions {
* Specifies SetImmutabilityPolicy access granted. * Specifies SetImmutabilityPolicy access granted.
*/ */
this.setImmutabilityPolicy = false; this.setImmutabilityPolicy = false;
/**
* Specifies that Permanent Delete is permitted.
*/
this.permanentDelete = false;
/**
* Specifies that Filter Blobs by Tags is permitted.
*/
this.filterByTags = false;
} }
/** /**
* Creates an {@link ContainerSASPermissions} from the specified permissions string. This method will throw an * Creates an {@link ContainerSASPermissions} from the specified permissions string. This method will throw an
@ -24642,6 +25295,12 @@ class ContainerSASPermissions {
case "i": case "i":
containerSASPermissions.setImmutabilityPolicy = true; containerSASPermissions.setImmutabilityPolicy = true;
break; break;
case "y":
containerSASPermissions.permanentDelete = true;
break;
case "f":
containerSASPermissions.filterByTags = true;
break;
default: default:
throw new RangeError(`Invalid permission ${char}`); throw new RangeError(`Invalid permission ${char}`);
} }
@ -24689,6 +25348,12 @@ class ContainerSASPermissions {
if (permissionLike.setImmutabilityPolicy) { if (permissionLike.setImmutabilityPolicy) {
containerSASPermissions.setImmutabilityPolicy = true; containerSASPermissions.setImmutabilityPolicy = true;
} }
if (permissionLike.permanentDelete) {
containerSASPermissions.permanentDelete = true;
}
if (permissionLike.filterByTags) {
containerSASPermissions.filterByTags = true;
}
return containerSASPermissions; return containerSASPermissions;
} }
/** /**
@ -24734,6 +25399,12 @@ class ContainerSASPermissions {
if (this.setImmutabilityPolicy) { if (this.setImmutabilityPolicy) {
permissions.push("i"); permissions.push("i");
} }
if (this.permanentDelete) {
permissions.push("y");
}
if (this.filterByTags) {
permissions.push("f");
}
return permissions.join(""); return permissions.join("");
} }
} }
@ -24763,9 +25434,7 @@ class UserDelegationKeyCredential {
*/ */
computeHMACSHA256(stringToSign) { computeHMACSHA256(stringToSign) {
// console.log(`stringToSign: ${JSON.stringify(stringToSign)}`); // console.log(`stringToSign: ${JSON.stringify(stringToSign)}`);
return crypto.createHmac("sha256", this.key) return crypto.createHmac("sha256", this.key).update(stringToSign, "utf8").digest("base64");
.update(stringToSign, "utf8")
.digest("base64");
} }
} }
@ -24783,6 +25452,10 @@ function ipRangeToString(ipRange) {
} }
// Copyright (c) Microsoft Corporation. // Copyright (c) Microsoft Corporation.
/**
* Protocols for generated SAS.
*/
exports.SASProtocol = void 0;
(function (SASProtocol) { (function (SASProtocol) {
/** /**
* Protocol that allows HTTPS only * Protocol that allows HTTPS only
@ -24803,7 +25476,7 @@ function ipRangeToString(ipRange) {
* NOTE: Instances of this class are immutable. * NOTE: Instances of this class are immutable.
*/ */
class SASQueryParameters { class SASQueryParameters {
constructor(version, signature, permissionsOrOptions, services, resourceTypes, protocol, startsOn, expiresOn, ipRange, identifier, resource, cacheControl, contentDisposition, contentEncoding, contentLanguage, contentType, userDelegationKey, preauthorizedAgentObjectId, correlationId) { constructor(version, signature, permissionsOrOptions, services, resourceTypes, protocol, startsOn, expiresOn, ipRange, identifier, resource, cacheControl, contentDisposition, contentEncoding, contentLanguage, contentType, userDelegationKey, preauthorizedAgentObjectId, correlationId, encryptionScope) {
this.version = version; this.version = version;
this.signature = signature; this.signature = signature;
if (permissionsOrOptions !== undefined && typeof permissionsOrOptions !== "string") { if (permissionsOrOptions !== undefined && typeof permissionsOrOptions !== "string") {
@ -24816,6 +25489,7 @@ class SASQueryParameters {
this.expiresOn = permissionsOrOptions.expiresOn; this.expiresOn = permissionsOrOptions.expiresOn;
this.ipRangeInner = permissionsOrOptions.ipRange; this.ipRangeInner = permissionsOrOptions.ipRange;
this.identifier = permissionsOrOptions.identifier; this.identifier = permissionsOrOptions.identifier;
this.encryptionScope = permissionsOrOptions.encryptionScope;
this.resource = permissionsOrOptions.resource; this.resource = permissionsOrOptions.resource;
this.cacheControl = permissionsOrOptions.cacheControl; this.cacheControl = permissionsOrOptions.cacheControl;
this.contentDisposition = permissionsOrOptions.contentDisposition; this.contentDisposition = permissionsOrOptions.contentDisposition;
@ -24841,6 +25515,7 @@ class SASQueryParameters {
this.protocol = protocol; this.protocol = protocol;
this.startsOn = startsOn; this.startsOn = startsOn;
this.ipRangeInner = ipRange; this.ipRangeInner = ipRange;
this.encryptionScope = encryptionScope;
this.identifier = identifier; this.identifier = identifier;
this.resource = resource; this.resource = resource;
this.cacheControl = cacheControl; this.cacheControl = cacheControl;
@ -24869,7 +25544,7 @@ class SASQueryParameters {
if (this.ipRangeInner) { if (this.ipRangeInner) {
return { return {
end: this.ipRangeInner.end, end: this.ipRangeInner.end,
start: this.ipRangeInner.start start: this.ipRangeInner.start,
}; };
} }
return undefined; return undefined;
@ -24888,6 +25563,7 @@ class SASQueryParameters {
"se", "se",
"sip", "sip",
"si", "si",
"ses",
"skoid", "skoid",
"sktid", "sktid",
"skt", "skt",
@ -24903,7 +25579,7 @@ class SASQueryParameters {
"rscl", "rscl",
"rsct", "rsct",
"saoid", "saoid",
"scid" "scid",
]; ];
const queries = []; const queries = [];
for (const param of params) { for (const param of params) {
@ -24932,6 +25608,9 @@ class SASQueryParameters {
case "si": case "si":
this.tryAppendQueryParameter(queries, param, this.identifier); this.tryAppendQueryParameter(queries, param, this.identifier);
break; break;
case "ses":
this.tryAppendQueryParameter(queries, param, this.encryptionScope);
break;
case "skoid": // Signed object ID case "skoid": // Signed object ID
this.tryAppendQueryParameter(queries, param, this.signedOid); this.tryAppendQueryParameter(queries, param, this.signedOid);
break; break;
@ -25016,6 +25695,15 @@ function generateBlobSASQueryParameters(blobSASSignatureValues, sharedKeyCredent
if (sharedKeyCredential === undefined && userDelegationKeyCredential === undefined) { if (sharedKeyCredential === undefined && userDelegationKeyCredential === undefined) {
throw TypeError("Invalid sharedKeyCredential, userDelegationKey or accountName."); throw TypeError("Invalid sharedKeyCredential, userDelegationKey or accountName.");
} }
// Version 2020-12-06 adds support for encryptionscope in SAS.
if (version >= "2020-12-06") {
if (sharedKeyCredential !== undefined) {
return generateBlobSASQueryParameters20201206(blobSASSignatureValues, sharedKeyCredential);
}
else {
return generateBlobSASQueryParametersUDK20201206(blobSASSignatureValues, userDelegationKeyCredential);
}
}
// Version 2019-12-12 adds support for the blob tags permission. // Version 2019-12-12 adds support for the blob tags permission.
// Version 2018-11-09 adds support for the signed resource and signed blob snapshot time fields. // Version 2018-11-09 adds support for the signed resource and signed blob snapshot time fields.
// https://docs.microsoft.com/en-us/rest/api/storageservices/constructing-a-service-sas#constructing-the-signature-string // https://docs.microsoft.com/en-us/rest/api/storageservices/constructing-a-service-sas#constructing-the-signature-string
@ -25097,7 +25785,7 @@ function generateBlobSASQueryParameters20150405(blobSASSignatureValues, sharedKe
blobSASSignatureValues.contentDisposition ? blobSASSignatureValues.contentDisposition : "", blobSASSignatureValues.contentDisposition ? blobSASSignatureValues.contentDisposition : "",
blobSASSignatureValues.contentEncoding ? blobSASSignatureValues.contentEncoding : "", blobSASSignatureValues.contentEncoding ? blobSASSignatureValues.contentEncoding : "",
blobSASSignatureValues.contentLanguage ? blobSASSignatureValues.contentLanguage : "", blobSASSignatureValues.contentLanguage ? blobSASSignatureValues.contentLanguage : "",
blobSASSignatureValues.contentType ? blobSASSignatureValues.contentType : "" blobSASSignatureValues.contentType ? blobSASSignatureValues.contentType : "",
].join("\n"); ].join("\n");
const signature = sharedKeyCredential.computeHMACSHA256(stringToSign); const signature = sharedKeyCredential.computeHMACSHA256(stringToSign);
return new SASQueryParameters(blobSASSignatureValues.version, signature, verifiedPermissions, undefined, undefined, blobSASSignatureValues.protocol, blobSASSignatureValues.startsOn, blobSASSignatureValues.expiresOn, blobSASSignatureValues.ipRange, blobSASSignatureValues.identifier, resource, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, blobSASSignatureValues.contentLanguage, blobSASSignatureValues.contentType); return new SASQueryParameters(blobSASSignatureValues.version, signature, verifiedPermissions, undefined, undefined, blobSASSignatureValues.protocol, blobSASSignatureValues.startsOn, blobSASSignatureValues.expiresOn, blobSASSignatureValues.ipRange, blobSASSignatureValues.identifier, resource, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, blobSASSignatureValues.contentLanguage, blobSASSignatureValues.contentType);
@ -25166,11 +25854,81 @@ function generateBlobSASQueryParameters20181109(blobSASSignatureValues, sharedKe
blobSASSignatureValues.contentDisposition ? blobSASSignatureValues.contentDisposition : "", blobSASSignatureValues.contentDisposition ? blobSASSignatureValues.contentDisposition : "",
blobSASSignatureValues.contentEncoding ? blobSASSignatureValues.contentEncoding : "", blobSASSignatureValues.contentEncoding ? blobSASSignatureValues.contentEncoding : "",
blobSASSignatureValues.contentLanguage ? blobSASSignatureValues.contentLanguage : "", blobSASSignatureValues.contentLanguage ? blobSASSignatureValues.contentLanguage : "",
blobSASSignatureValues.contentType ? blobSASSignatureValues.contentType : "" blobSASSignatureValues.contentType ? blobSASSignatureValues.contentType : "",
].join("\n"); ].join("\n");
const signature = sharedKeyCredential.computeHMACSHA256(stringToSign); const signature = sharedKeyCredential.computeHMACSHA256(stringToSign);
return new SASQueryParameters(blobSASSignatureValues.version, signature, verifiedPermissions, undefined, undefined, blobSASSignatureValues.protocol, blobSASSignatureValues.startsOn, blobSASSignatureValues.expiresOn, blobSASSignatureValues.ipRange, blobSASSignatureValues.identifier, resource, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, blobSASSignatureValues.contentLanguage, blobSASSignatureValues.contentType); return new SASQueryParameters(blobSASSignatureValues.version, signature, verifiedPermissions, undefined, undefined, blobSASSignatureValues.protocol, blobSASSignatureValues.startsOn, blobSASSignatureValues.expiresOn, blobSASSignatureValues.ipRange, blobSASSignatureValues.identifier, resource, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, blobSASSignatureValues.contentLanguage, blobSASSignatureValues.contentType);
} }
/**
* ONLY AVAILABLE IN NODE.JS RUNTIME.
* IMPLEMENTATION FOR API VERSION FROM 2020-12-06.
*
* Creates an instance of SASQueryParameters.
*
* Only accepts required settings needed to create a SAS. For optional settings please
* set corresponding properties directly, such as permissions, startsOn and identifier.
*
* WARNING: When identifier is not provided, permissions and expiresOn are required.
* You MUST assign value to identifier or expiresOn & permissions manually if you initial with
* this constructor.
*
* @param blobSASSignatureValues -
* @param sharedKeyCredential -
*/
function generateBlobSASQueryParameters20201206(blobSASSignatureValues, sharedKeyCredential) {
blobSASSignatureValues = SASSignatureValuesSanityCheckAndAutofill(blobSASSignatureValues);
if (!blobSASSignatureValues.identifier &&
!(blobSASSignatureValues.permissions && blobSASSignatureValues.expiresOn)) {
throw new RangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when 'identifier' is not provided.");
}
let resource = "c";
let timestamp = blobSASSignatureValues.snapshotTime;
if (blobSASSignatureValues.blobName) {
resource = "b";
if (blobSASSignatureValues.snapshotTime) {
resource = "bs";
}
else if (blobSASSignatureValues.versionId) {
resource = "bv";
timestamp = blobSASSignatureValues.versionId;
}
}
// Calling parse and toString guarantees the proper ordering and throws on invalid characters.
let verifiedPermissions;
if (blobSASSignatureValues.permissions) {
if (blobSASSignatureValues.blobName) {
verifiedPermissions = BlobSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString();
}
else {
verifiedPermissions = ContainerSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString();
}
}
// Signature is generated on the un-url-encoded values.
const stringToSign = [
verifiedPermissions ? verifiedPermissions : "",
blobSASSignatureValues.startsOn
? truncatedISO8061Date(blobSASSignatureValues.startsOn, false)
: "",
blobSASSignatureValues.expiresOn
? truncatedISO8061Date(blobSASSignatureValues.expiresOn, false)
: "",
getCanonicalName(sharedKeyCredential.accountName, blobSASSignatureValues.containerName, blobSASSignatureValues.blobName),
blobSASSignatureValues.identifier,
blobSASSignatureValues.ipRange ? ipRangeToString(blobSASSignatureValues.ipRange) : "",
blobSASSignatureValues.protocol ? blobSASSignatureValues.protocol : "",
blobSASSignatureValues.version,
resource,
timestamp,
blobSASSignatureValues.encryptionScope,
blobSASSignatureValues.cacheControl ? blobSASSignatureValues.cacheControl : "",
blobSASSignatureValues.contentDisposition ? blobSASSignatureValues.contentDisposition : "",
blobSASSignatureValues.contentEncoding ? blobSASSignatureValues.contentEncoding : "",
blobSASSignatureValues.contentLanguage ? blobSASSignatureValues.contentLanguage : "",
blobSASSignatureValues.contentType ? blobSASSignatureValues.contentType : "",
].join("\n");
const signature = sharedKeyCredential.computeHMACSHA256(stringToSign);
return new SASQueryParameters(blobSASSignatureValues.version, signature, verifiedPermissions, undefined, undefined, blobSASSignatureValues.protocol, blobSASSignatureValues.startsOn, blobSASSignatureValues.expiresOn, blobSASSignatureValues.ipRange, blobSASSignatureValues.identifier, resource, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, blobSASSignatureValues.contentLanguage, blobSASSignatureValues.contentType, undefined, undefined, undefined, blobSASSignatureValues.encryptionScope);
}
/** /**
* ONLY AVAILABLE IN NODE.JS RUNTIME. * ONLY AVAILABLE IN NODE.JS RUNTIME.
* IMPLEMENTATION FOR API VERSION FROM 2018-11-09. * IMPLEMENTATION FOR API VERSION FROM 2018-11-09.
@ -25242,7 +26000,7 @@ function generateBlobSASQueryParametersUDK20181109(blobSASSignatureValues, userD
blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentDisposition,
blobSASSignatureValues.contentEncoding, blobSASSignatureValues.contentEncoding,
blobSASSignatureValues.contentLanguage, blobSASSignatureValues.contentLanguage,
blobSASSignatureValues.contentType blobSASSignatureValues.contentType,
].join("\n"); ].join("\n");
const signature = userDelegationKeyCredential.computeHMACSHA256(stringToSign); const signature = userDelegationKeyCredential.computeHMACSHA256(stringToSign);
return new SASQueryParameters(blobSASSignatureValues.version, signature, verifiedPermissions, undefined, undefined, blobSASSignatureValues.protocol, blobSASSignatureValues.startsOn, blobSASSignatureValues.expiresOn, blobSASSignatureValues.ipRange, blobSASSignatureValues.identifier, resource, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, blobSASSignatureValues.contentLanguage, blobSASSignatureValues.contentType, userDelegationKeyCredential.userDelegationKey); return new SASQueryParameters(blobSASSignatureValues.version, signature, verifiedPermissions, undefined, undefined, blobSASSignatureValues.protocol, blobSASSignatureValues.startsOn, blobSASSignatureValues.expiresOn, blobSASSignatureValues.ipRange, blobSASSignatureValues.identifier, resource, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, blobSASSignatureValues.contentLanguage, blobSASSignatureValues.contentType, userDelegationKeyCredential.userDelegationKey);
@ -25321,11 +26079,91 @@ function generateBlobSASQueryParametersUDK20200210(blobSASSignatureValues, userD
blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentDisposition,
blobSASSignatureValues.contentEncoding, blobSASSignatureValues.contentEncoding,
blobSASSignatureValues.contentLanguage, blobSASSignatureValues.contentLanguage,
blobSASSignatureValues.contentType blobSASSignatureValues.contentType,
].join("\n"); ].join("\n");
const signature = userDelegationKeyCredential.computeHMACSHA256(stringToSign); const signature = userDelegationKeyCredential.computeHMACSHA256(stringToSign);
return new SASQueryParameters(blobSASSignatureValues.version, signature, verifiedPermissions, undefined, undefined, blobSASSignatureValues.protocol, blobSASSignatureValues.startsOn, blobSASSignatureValues.expiresOn, blobSASSignatureValues.ipRange, blobSASSignatureValues.identifier, resource, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, blobSASSignatureValues.contentLanguage, blobSASSignatureValues.contentType, userDelegationKeyCredential.userDelegationKey, blobSASSignatureValues.preauthorizedAgentObjectId, blobSASSignatureValues.correlationId); return new SASQueryParameters(blobSASSignatureValues.version, signature, verifiedPermissions, undefined, undefined, blobSASSignatureValues.protocol, blobSASSignatureValues.startsOn, blobSASSignatureValues.expiresOn, blobSASSignatureValues.ipRange, blobSASSignatureValues.identifier, resource, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, blobSASSignatureValues.contentLanguage, blobSASSignatureValues.contentType, userDelegationKeyCredential.userDelegationKey, blobSASSignatureValues.preauthorizedAgentObjectId, blobSASSignatureValues.correlationId);
} }
/**
* ONLY AVAILABLE IN NODE.JS RUNTIME.
* IMPLEMENTATION FOR API VERSION FROM 2020-12-06.
*
* Creates an instance of SASQueryParameters.
*
* Only accepts required settings needed to create a SAS. For optional settings please
* set corresponding properties directly, such as permissions, startsOn.
*
* WARNING: identifier will be ignored, permissions and expiresOn are required.
*
* @param blobSASSignatureValues -
* @param userDelegationKeyCredential -
*/
function generateBlobSASQueryParametersUDK20201206(blobSASSignatureValues, userDelegationKeyCredential) {
blobSASSignatureValues = SASSignatureValuesSanityCheckAndAutofill(blobSASSignatureValues);
// Stored access policies are not supported for a user delegation SAS.
if (!blobSASSignatureValues.permissions || !blobSASSignatureValues.expiresOn) {
throw new RangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when generating user delegation SAS.");
}
let resource = "c";
let timestamp = blobSASSignatureValues.snapshotTime;
if (blobSASSignatureValues.blobName) {
resource = "b";
if (blobSASSignatureValues.snapshotTime) {
resource = "bs";
}
else if (blobSASSignatureValues.versionId) {
resource = "bv";
timestamp = blobSASSignatureValues.versionId;
}
}
// Calling parse and toString guarantees the proper ordering and throws on invalid characters.
let verifiedPermissions;
if (blobSASSignatureValues.permissions) {
if (blobSASSignatureValues.blobName) {
verifiedPermissions = BlobSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString();
}
else {
verifiedPermissions = ContainerSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString();
}
}
// Signature is generated on the un-url-encoded values.
const stringToSign = [
verifiedPermissions ? verifiedPermissions : "",
blobSASSignatureValues.startsOn
? truncatedISO8061Date(blobSASSignatureValues.startsOn, false)
: "",
blobSASSignatureValues.expiresOn
? truncatedISO8061Date(blobSASSignatureValues.expiresOn, false)
: "",
getCanonicalName(userDelegationKeyCredential.accountName, blobSASSignatureValues.containerName, blobSASSignatureValues.blobName),
userDelegationKeyCredential.userDelegationKey.signedObjectId,
userDelegationKeyCredential.userDelegationKey.signedTenantId,
userDelegationKeyCredential.userDelegationKey.signedStartsOn
? truncatedISO8061Date(userDelegationKeyCredential.userDelegationKey.signedStartsOn, false)
: "",
userDelegationKeyCredential.userDelegationKey.signedExpiresOn
? truncatedISO8061Date(userDelegationKeyCredential.userDelegationKey.signedExpiresOn, false)
: "",
userDelegationKeyCredential.userDelegationKey.signedService,
userDelegationKeyCredential.userDelegationKey.signedVersion,
blobSASSignatureValues.preauthorizedAgentObjectId,
undefined,
blobSASSignatureValues.correlationId,
blobSASSignatureValues.ipRange ? ipRangeToString(blobSASSignatureValues.ipRange) : "",
blobSASSignatureValues.protocol ? blobSASSignatureValues.protocol : "",
blobSASSignatureValues.version,
resource,
timestamp,
blobSASSignatureValues.encryptionScope,
blobSASSignatureValues.cacheControl,
blobSASSignatureValues.contentDisposition,
blobSASSignatureValues.contentEncoding,
blobSASSignatureValues.contentLanguage,
blobSASSignatureValues.contentType,
].join("\n");
const signature = userDelegationKeyCredential.computeHMACSHA256(stringToSign);
return new SASQueryParameters(blobSASSignatureValues.version, signature, verifiedPermissions, undefined, undefined, blobSASSignatureValues.protocol, blobSASSignatureValues.startsOn, blobSASSignatureValues.expiresOn, blobSASSignatureValues.ipRange, blobSASSignatureValues.identifier, resource, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, blobSASSignatureValues.contentLanguage, blobSASSignatureValues.contentType, userDelegationKeyCredential.userDelegationKey, blobSASSignatureValues.preauthorizedAgentObjectId, blobSASSignatureValues.correlationId, blobSASSignatureValues.encryptionScope);
}
function getCanonicalName(accountName, containerName, blobName) { function getCanonicalName(accountName, containerName, blobName) {
// Container: "/blob/account/containerName" // Container: "/blob/account/containerName"
// Blob: "/blob/account/containerName/blobName" // Blob: "/blob/account/containerName/blobName"
@ -25359,6 +26197,11 @@ function SASSignatureValuesSanityCheckAndAutofill(blobSASSignatureValues) {
version < "2019-10-10") { version < "2019-10-10") {
throw RangeError("'version' must be >= '2019-10-10' when providing 'x' permission."); throw RangeError("'version' must be >= '2019-10-10' when providing 'x' permission.");
} }
if (blobSASSignatureValues.permissions &&
blobSASSignatureValues.permissions.permanentDelete &&
version < "2019-10-10") {
throw RangeError("'version' must be >= '2019-10-10' when providing 'y' permission.");
}
if (blobSASSignatureValues.permissions && if (blobSASSignatureValues.permissions &&
blobSASSignatureValues.permissions.tag && blobSASSignatureValues.permissions.tag &&
version < "2019-12-12") { version < "2019-12-12") {
@ -25369,10 +26212,18 @@ function SASSignatureValuesSanityCheckAndAutofill(blobSASSignatureValues) {
(blobSASSignatureValues.permissions.move || blobSASSignatureValues.permissions.execute)) { (blobSASSignatureValues.permissions.move || blobSASSignatureValues.permissions.execute)) {
throw RangeError("'version' must be >= '2020-02-10' when providing the 'm' or 'e' permission."); throw RangeError("'version' must be >= '2020-02-10' when providing the 'm' or 'e' permission.");
} }
if (version < "2021-04-10" &&
blobSASSignatureValues.permissions &&
blobSASSignatureValues.permissions.filterByTags) {
throw RangeError("'version' must be >= '2021-04-10' when providing the 'f' permission.");
}
if (version < "2020-02-10" && if (version < "2020-02-10" &&
(blobSASSignatureValues.preauthorizedAgentObjectId || blobSASSignatureValues.correlationId)) { (blobSASSignatureValues.preauthorizedAgentObjectId || blobSASSignatureValues.correlationId)) {
throw RangeError("'version' must be >= '2020-02-10' when providing 'preauthorizedAgentObjectId' or 'correlationId'."); throw RangeError("'version' must be >= '2020-02-10' when providing 'preauthorizedAgentObjectId' or 'correlationId'.");
} }
if (blobSASSignatureValues.encryptionScope && version < "2020-12-06") {
throw RangeError("'version' must be >= '2020-12-06' when provided 'encryptionScope' in SAS.");
}
blobSASSignatureValues.version = version; blobSASSignatureValues.version = version;
return blobSASSignatureValues; return blobSASSignatureValues;
} }
@ -25446,7 +26297,7 @@ class BlobLeaseClient {
catch (e) { catch (e) {
span.setStatus({ span.setStatus({
code: coreTracing.SpanStatusCode.ERROR, code: coreTracing.SpanStatusCode.ERROR,
message: e.message message: e.message,
}); });
throw e; throw e;
} }
@ -25481,7 +26332,7 @@ class BlobLeaseClient {
catch (e) { catch (e) {
span.setStatus({ span.setStatus({
code: coreTracing.SpanStatusCode.ERROR, code: coreTracing.SpanStatusCode.ERROR,
message: e.message message: e.message,
}); });
throw e; throw e;
} }
@ -25514,7 +26365,7 @@ class BlobLeaseClient {
catch (e) { catch (e) {
span.setStatus({ span.setStatus({
code: coreTracing.SpanStatusCode.ERROR, code: coreTracing.SpanStatusCode.ERROR,
message: e.message message: e.message,
}); });
throw e; throw e;
} }
@ -25546,7 +26397,7 @@ class BlobLeaseClient {
catch (e) { catch (e) {
span.setStatus({ span.setStatus({
code: coreTracing.SpanStatusCode.ERROR, code: coreTracing.SpanStatusCode.ERROR,
message: e.message message: e.message,
}); });
throw e; throw e;
} }
@ -25581,7 +26432,7 @@ class BlobLeaseClient {
catch (e) { catch (e) {
span.setStatus({ span.setStatus({
code: coreTracing.SpanStatusCode.ERROR, code: coreTracing.SpanStatusCode.ERROR,
message: e.message message: e.message,
}); });
throw e; throw e;
} }
@ -25661,8 +26512,7 @@ class RetriableReadableStream extends stream.Readable {
}); });
} }
else { else {
this.destroy(new Error(`Data corruption failure: received less data than required and reached maxRetires limitation. Received data offset: ${this this.destroy(new Error(`Data corruption failure: received less data than required and reached maxRetires limitation. Received data offset: ${this.offset - 1}, data needed offset: ${this.end}, retries: ${this.retries}, max retries: ${this.maxRetryRequests}`));
.offset - 1}, data needed offset: ${this.end}, retries: ${this.retries}, max retries: ${this.maxRetryRequests}`));
} }
} }
else { else {
@ -26507,7 +27357,7 @@ class AvroReader {
} }
async initialize(options = {}) { async initialize(options = {}) {
const header = await AvroParser.readFixedBytes(this._headerStream, AVRO_INIT_BYTES.length, { const header = await AvroParser.readFixedBytes(this._headerStream, AVRO_INIT_BYTES.length, {
abortSignal: options.abortSignal abortSignal: options.abortSignal,
}); });
if (!arraysEqual(header, AVRO_INIT_BYTES)) { if (!arraysEqual(header, AVRO_INIT_BYTES)) {
throw new Error("Stream is not an Avro file."); throw new Error("Stream is not an Avro file.");
@ -26515,7 +27365,7 @@ class AvroReader {
// File metadata is written as if defined by the following map schema: // File metadata is written as if defined by the following map schema:
// { "type": "map", "values": "bytes"} // { "type": "map", "values": "bytes"}
this._metadata = await AvroParser.readMap(this._headerStream, AvroParser.readString, { this._metadata = await AvroParser.readMap(this._headerStream, AvroParser.readString, {
abortSignal: options.abortSignal abortSignal: options.abortSignal,
}); });
// Validate codec // Validate codec
const codec = this._metadata[AVRO_CODEC_KEY]; const codec = this._metadata[AVRO_CODEC_KEY];
@ -26524,7 +27374,7 @@ class AvroReader {
} }
// The 16-byte, randomly-generated sync marker for this file. // The 16-byte, randomly-generated sync marker for this file.
this._syncMarker = await AvroParser.readFixedBytes(this._headerStream, AVRO_SYNC_MARKER_SIZE, { this._syncMarker = await AvroParser.readFixedBytes(this._headerStream, AVRO_SYNC_MARKER_SIZE, {
abortSignal: options.abortSignal abortSignal: options.abortSignal,
}); });
// Parse the schema // Parse the schema
const schema = JSON.parse(this._metadata[AVRO_SCHEMA_KEY]); const schema = JSON.parse(this._metadata[AVRO_SCHEMA_KEY]);
@ -26533,7 +27383,7 @@ class AvroReader {
this._blockOffset = this._initialBlockOffset + this._dataStream.position; this._blockOffset = this._initialBlockOffset + this._dataStream.position;
} }
this._itemsRemainingInBlock = await AvroParser.readLong(this._dataStream, { this._itemsRemainingInBlock = await AvroParser.readLong(this._dataStream, {
abortSignal: options.abortSignal abortSignal: options.abortSignal,
}); });
// skip block length // skip block length
await AvroParser.readLong(this._dataStream, { abortSignal: options.abortSignal }); await AvroParser.readLong(this._dataStream, { abortSignal: options.abortSignal });
@ -26555,13 +27405,13 @@ class AvroReader {
} }
while (this.hasNext()) { while (this.hasNext()) {
const result = yield tslib.__await(this._itemType.read(this._dataStream, { const result = yield tslib.__await(this._itemType.read(this._dataStream, {
abortSignal: options.abortSignal abortSignal: options.abortSignal,
})); }));
this._itemsRemainingInBlock--; this._itemsRemainingInBlock--;
this._objectIndex++; this._objectIndex++;
if (this._itemsRemainingInBlock == 0) { if (this._itemsRemainingInBlock == 0) {
const marker = yield tslib.__await(AvroParser.readFixedBytes(this._dataStream, AVRO_SYNC_MARKER_SIZE, { const marker = yield tslib.__await(AvroParser.readFixedBytes(this._dataStream, AVRO_SYNC_MARKER_SIZE, {
abortSignal: options.abortSignal abortSignal: options.abortSignal,
})); }));
this._blockOffset = this._initialBlockOffset + this._dataStream.position; this._blockOffset = this._initialBlockOffset + this._dataStream.position;
this._objectIndex = 0; this._objectIndex = 0;
@ -26570,7 +27420,7 @@ class AvroReader {
} }
try { try {
this._itemsRemainingInBlock = yield tslib.__await(AvroParser.readLong(this._dataStream, { this._itemsRemainingInBlock = yield tslib.__await(AvroParser.readLong(this._dataStream, {
abortSignal: options.abortSignal abortSignal: options.abortSignal,
})); }));
} }
catch (err) { catch (err) {
@ -26769,7 +27619,7 @@ class BlobQuickQueryStream extends stream.Readable {
position, position,
name, name,
isFatal: fatal, isFatal: fatal,
description description,
}); });
} }
break; break;
@ -27145,6 +27995,11 @@ class BlobQueryResponse {
} }
// Copyright (c) Microsoft Corporation. // Copyright (c) Microsoft Corporation.
/**
* Represents the access tier on a blob.
* For detailed information about block blob level tiering see {@link https://docs.microsoft.com/azure/storage/blobs/storage-blob-storage-tiers|Hot, cool and archive storage tiers.}
*/
exports.BlockBlobTier = void 0;
(function (BlockBlobTier) { (function (BlockBlobTier) {
/** /**
* Optimized for storing data that is accessed frequently. * Optimized for storing data that is accessed frequently.
@ -27160,6 +28015,12 @@ class BlobQueryResponse {
*/ */
BlockBlobTier["Archive"] = "Archive"; BlockBlobTier["Archive"] = "Archive";
})(exports.BlockBlobTier || (exports.BlockBlobTier = {})); })(exports.BlockBlobTier || (exports.BlockBlobTier = {}));
/**
* Specifies the page blob tier to set the blob to. This is only applicable to page blobs on premium storage accounts.
* Please see {@link https://docs.microsoft.com/azure/storage/storage-premium-storage#scalability-and-performance-targets|here}
* for detailed information on the corresponding IOPS and throughput per PageBlobTier.
*/
exports.PremiumPageBlobTier = void 0;
(function (PremiumPageBlobTier) { (function (PremiumPageBlobTier) {
/** /**
* P4 Tier. * P4 Tier.
@ -27220,6 +28081,20 @@ function ensureCpkIfSpecified(cpk, isHttps) {
cpk.encryptionAlgorithm = EncryptionAlgorithmAES25; cpk.encryptionAlgorithm = EncryptionAlgorithmAES25;
} }
} }
/**
* Defines the known cloud audiences for Storage.
*/
exports.StorageBlobAudience = void 0;
(function (StorageBlobAudience) {
/**
* The OAuth scope to use to retrieve an AAD token for Azure Storage.
*/
StorageBlobAudience["StorageOAuthScopes"] = "https://storage.azure.com/.default";
/**
* The OAuth scope to use to retrieve an AAD token for Azure Disk.
*/
StorageBlobAudience["DiskComputeOAuthScopes"] = "https://disk.compute.azure.com/.default";
})(exports.StorageBlobAudience || (exports.StorageBlobAudience = {}));
// Copyright (c) Microsoft Corporation. // Copyright (c) Microsoft Corporation.
// Licensed under the MIT license. // Licensed under the MIT license.
@ -27232,16 +28107,16 @@ function ensureCpkIfSpecified(cpk, isHttps) {
function rangeResponseFromModel(response) { function rangeResponseFromModel(response) {
const pageRange = (response._response.parsedBody.pageRange || []).map((x) => ({ const pageRange = (response._response.parsedBody.pageRange || []).map((x) => ({
offset: x.start, offset: x.start,
count: x.end - x.start count: x.end - x.start,
})); }));
const clearRange = (response._response.parsedBody.clearRange || []).map((x) => ({ const clearRange = (response._response.parsedBody.clearRange || []).map((x) => ({
offset: x.start, offset: x.start,
count: x.end - x.start count: x.end - x.start,
})); }));
return Object.assign(Object.assign({}, response), { pageRange, return Object.assign(Object.assign({}, response), { pageRange,
clearRange, _response: Object.assign(Object.assign({}, response._response), { parsedBody: { clearRange, _response: Object.assign(Object.assign({}, response._response), { parsedBody: {
pageRange, pageRange,
clearRange clearRange,
} }) }); } }) });
} }
@ -27254,7 +28129,7 @@ function rangeResponseFromModel(response) {
*/ */
class BlobBeginCopyFromUrlPoller extends coreLro.Poller { class BlobBeginCopyFromUrlPoller extends coreLro.Poller {
constructor(options) { constructor(options) {
const { blobClient, copySource, intervalInMs = 15000, onProgress, resumeFrom, startCopyFromURLOptions } = options; const { blobClient, copySource, intervalInMs = 15000, onProgress, resumeFrom, startCopyFromURLOptions, } = options;
let state; let state;
if (resumeFrom) { if (resumeFrom) {
state = JSON.parse(resumeFrom).state; state = JSON.parse(resumeFrom).state;
@ -27290,7 +28165,7 @@ const cancel = async function cancel(options = {}) {
} }
// if abortCopyFromURL throws, it will bubble up to user's poller.cancelOperation call // if abortCopyFromURL throws, it will bubble up to user's poller.cancelOperation call
await state.blobClient.abortCopyFromURL(copyId, { await state.blobClient.abortCopyFromURL(copyId, {
abortSignal: options.abortSignal abortSignal: options.abortSignal,
}); });
state.isCancelled = true; state.isCancelled = true;
return makeBlobBeginCopyFromURLPollOperation(state); return makeBlobBeginCopyFromURLPollOperation(state);
@ -27368,7 +28243,7 @@ function makeBlobBeginCopyFromURLPollOperation(state) {
state: Object.assign({}, state), state: Object.assign({}, state),
cancel, cancel,
toString, toString,
update update,
}; };
} }
@ -28010,7 +28885,7 @@ async function streamToBuffer2(stream, buffer, encoding) {
*/ */
async function readStreamToLocalFile(rs, file) { async function readStreamToLocalFile(rs, file) {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
const ws = fs.createWriteStream(file); const ws = fs__namespace.createWriteStream(file);
rs.on("error", (err) => { rs.on("error", (err) => {
reject(err); reject(err);
}); });
@ -28026,8 +28901,8 @@ async function readStreamToLocalFile(rs, file) {
* *
* Promisified version of fs.stat(). * Promisified version of fs.stat().
*/ */
const fsStat = util.promisify(fs.stat); const fsStat = util__namespace.promisify(fs__namespace.stat);
const fsCreateReadStream = fs.createReadStream; const fsCreateReadStream = fs__namespace.createReadStream;
/** /**
* A BlobClient represents a URL to an Azure Storage blob; the blob may be a block blob, * A BlobClient represents a URL to an Azure Storage blob; the blob may be a block blob,
@ -28070,12 +28945,17 @@ class BlobClient extends StorageClient {
const blobName = blobNameOrOptions; const blobName = blobNameOrOptions;
const extractedCreds = extractConnectionStringParts(urlOrConnectionString); const extractedCreds = extractConnectionStringParts(urlOrConnectionString);
if (extractedCreds.kind === "AccountConnString") { if (extractedCreds.kind === "AccountConnString") {
{ if (coreHttp.isNode) {
const sharedKeyCredential = new StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey); const sharedKeyCredential = new StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey);
url = appendToURLPath(appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)); url = appendToURLPath(appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName));
if (!options.proxyOptions) {
options.proxyOptions = coreHttp.getDefaultProxySettings(extractedCreds.proxyUri); options.proxyOptions = coreHttp.getDefaultProxySettings(extractedCreds.proxyUri);
}
pipeline = newPipeline(sharedKeyCredential, options); pipeline = newPipeline(sharedKeyCredential, options);
} }
else {
throw new Error("Account connection string is only supported in Node.js environment");
}
} }
else if (extractedCreds.kind === "SASConnString") { else if (extractedCreds.kind === "SASConnString") {
url = url =
@ -28092,10 +28972,8 @@ class BlobClient extends StorageClient {
throw new Error("Expecting non-empty strings for containerName and blobName parameters"); throw new Error("Expecting non-empty strings for containerName and blobName parameters");
} }
super(url, pipeline); super(url, pipeline);
({ ({ blobName: this._name, containerName: this._containerName } =
blobName: this._name, this.getBlobAndContainerNamesFromUrl());
containerName: this._containerName
} = this.getBlobAndContainerNamesFromUrl());
this.blobContext = new Blob$1(this.storageClientContext); this.blobContext = new Blob$1(this.storageClientContext);
this._snapshot = getURLParameter(this.url, URLConstants.Parameters.SNAPSHOT); this._snapshot = getURLParameter(this.url, URLConstants.Parameters.SNAPSHOT);
this._versionId = getURLParameter(this.url, URLConstants.Parameters.VERSIONID); this._versionId = getURLParameter(this.url, URLConstants.Parameters.VERSIONID);
@ -28220,11 +29098,13 @@ class BlobClient extends StorageClient {
const { span, updatedOptions } = createSpan("BlobClient-download", options); const { span, updatedOptions } = createSpan("BlobClient-download", options);
try { try {
const res = await this.blobContext.download(Object.assign({ abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), requestOptions: { const res = await this.blobContext.download(Object.assign({ abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), requestOptions: {
onDownloadProgress: coreHttp.isNode ? undefined : options.onProgress // for Node.js, progress is reported by RetriableReadableStream onDownloadProgress: coreHttp.isNode ? undefined : options.onProgress, // for Node.js, progress is reported by RetriableReadableStream
}, range: offset === 0 && !count ? undefined : rangeToString({ offset, count }), rangeGetContentMD5: options.rangeGetContentMD5, rangeGetContentCRC64: options.rangeGetContentCrc64, snapshot: options.snapshot, cpkInfo: options.customerProvidedKey }, convertTracingToRequestOptionsBase(updatedOptions))); }, range: offset === 0 && !count ? undefined : rangeToString({ offset, count }), rangeGetContentMD5: options.rangeGetContentMD5, rangeGetContentCRC64: options.rangeGetContentCrc64, snapshot: options.snapshot, cpkInfo: options.customerProvidedKey }, convertTracingToRequestOptionsBase(updatedOptions)));
const wrappedRes = Object.assign(Object.assign({}, res), { _response: res._response, objectReplicationDestinationPolicyId: res.objectReplicationPolicyId, objectReplicationSourceProperties: parseObjectReplicationRecord(res.objectReplicationRules) }); const wrappedRes = Object.assign(Object.assign({}, res), { _response: res._response, objectReplicationDestinationPolicyId: res.objectReplicationPolicyId, objectReplicationSourceProperties: parseObjectReplicationRecord(res.objectReplicationRules) });
// Return browser response immediately // Return browser response immediately
if (false) {} if (!coreHttp.isNode) {
return wrappedRes;
}
// We support retrying when download stream unexpected ends in Node.js runtime // We support retrying when download stream unexpected ends in Node.js runtime
// Following code shouldn't be bundled into browser build, however some // Following code shouldn't be bundled into browser build, however some
// bundlers may try to bundle following code and "FileReadResponse.ts". // bundlers may try to bundle following code and "FileReadResponse.ts".
@ -28249,16 +29129,16 @@ class BlobClient extends StorageClient {
ifModifiedSince: options.conditions.ifModifiedSince, ifModifiedSince: options.conditions.ifModifiedSince,
ifNoneMatch: options.conditions.ifNoneMatch, ifNoneMatch: options.conditions.ifNoneMatch,
ifUnmodifiedSince: options.conditions.ifUnmodifiedSince, ifUnmodifiedSince: options.conditions.ifUnmodifiedSince,
ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions,
}, },
range: rangeToString({ range: rangeToString({
count: offset + res.contentLength - start, count: offset + res.contentLength - start,
offset: start offset: start,
}), }),
rangeGetContentMD5: options.rangeGetContentMD5, rangeGetContentMD5: options.rangeGetContentMD5,
rangeGetContentCRC64: options.rangeGetContentCrc64, rangeGetContentCRC64: options.rangeGetContentCrc64,
snapshot: options.snapshot, snapshot: options.snapshot,
cpkInfo: options.customerProvidedKey cpkInfo: options.customerProvidedKey,
}; };
// Debug purpose only // Debug purpose only
// console.log( // console.log(
@ -28269,13 +29149,13 @@ class BlobClient extends StorageClient {
return (await this.blobContext.download(Object.assign({ abortSignal: options.abortSignal }, updatedDownloadOptions))).readableStreamBody; return (await this.blobContext.download(Object.assign({ abortSignal: options.abortSignal }, updatedDownloadOptions))).readableStreamBody;
}, offset, res.contentLength, { }, offset, res.contentLength, {
maxRetryRequests: options.maxRetryRequests, maxRetryRequests: options.maxRetryRequests,
onProgress: options.onProgress onProgress: options.onProgress,
}); });
} }
catch (e) { catch (e) {
span.setStatus({ span.setStatus({
code: coreTracing.SpanStatusCode.ERROR, code: coreTracing.SpanStatusCode.ERROR,
message: e.message message: e.message,
}); });
throw e; throw e;
} }
@ -28300,21 +29180,23 @@ class BlobClient extends StorageClient {
abortSignal: options.abortSignal, abortSignal: options.abortSignal,
customerProvidedKey: options.customerProvidedKey, customerProvidedKey: options.customerProvidedKey,
conditions: options.conditions, conditions: options.conditions,
tracingOptions: updatedOptions.tracingOptions tracingOptions: updatedOptions.tracingOptions,
}); });
return true; return true;
} }
catch (e) { catch (e) {
if (e.statusCode === 404) { if (e.statusCode === 404) {
span.setStatus({ // Expected exception when checking blob existence
code: coreTracing.SpanStatusCode.ERROR,
message: "Expected exception when checking blob existence"
});
return false; return false;
} }
else if (e.statusCode === 409 &&
e.details.errorCode === BlobUsesCustomerSpecifiedEncryptionMsg) {
// Expected exception when checking blob existence
return true;
}
span.setStatus({ span.setStatus({
code: coreTracing.SpanStatusCode.ERROR, code: coreTracing.SpanStatusCode.ERROR,
message: e.message message: e.message,
}); });
throw e; throw e;
} }
@ -28346,7 +29228,7 @@ class BlobClient extends StorageClient {
catch (e) { catch (e) {
span.setStatus({ span.setStatus({
code: coreTracing.SpanStatusCode.ERROR, code: coreTracing.SpanStatusCode.ERROR,
message: e.message message: e.message,
}); });
throw e; throw e;
} }
@ -28373,7 +29255,7 @@ class BlobClient extends StorageClient {
catch (e) { catch (e) {
span.setStatus({ span.setStatus({
code: coreTracing.SpanStatusCode.ERROR, code: coreTracing.SpanStatusCode.ERROR,
message: e.message message: e.message,
}); });
throw e; throw e;
} }
@ -28395,20 +29277,19 @@ class BlobClient extends StorageClient {
const { span, updatedOptions } = createSpan("BlobClient-deleteIfExists", options); const { span, updatedOptions } = createSpan("BlobClient-deleteIfExists", options);
try { try {
const res = await this.delete(updatedOptions); const res = await this.delete(updatedOptions);
return Object.assign(Object.assign({ succeeded: true }, res), { _response: res._response // _response is made non-enumerable return Object.assign(Object.assign({ succeeded: true }, res), { _response: res._response });
});
} }
catch (e) { catch (e) {
if (((_a = e.details) === null || _a === void 0 ? void 0 : _a.errorCode) === "BlobNotFound") { if (((_a = e.details) === null || _a === void 0 ? void 0 : _a.errorCode) === "BlobNotFound") {
span.setStatus({ span.setStatus({
code: coreTracing.SpanStatusCode.ERROR, code: coreTracing.SpanStatusCode.ERROR,
message: "Expected exception when deleting a blob or snapshot only if it exists." message: "Expected exception when deleting a blob or snapshot only if it exists.",
}); });
return Object.assign(Object.assign({ succeeded: false }, (_b = e.response) === null || _b === void 0 ? void 0 : _b.parsedHeaders), { _response: e.response }); return Object.assign(Object.assign({ succeeded: false }, (_b = e.response) === null || _b === void 0 ? void 0 : _b.parsedHeaders), { _response: e.response });
} }
span.setStatus({ span.setStatus({
code: coreTracing.SpanStatusCode.ERROR, code: coreTracing.SpanStatusCode.ERROR,
message: e.message message: e.message,
}); });
throw e; throw e;
} }
@ -28432,7 +29313,7 @@ class BlobClient extends StorageClient {
catch (e) { catch (e) {
span.setStatus({ span.setStatus({
code: coreTracing.SpanStatusCode.ERROR, code: coreTracing.SpanStatusCode.ERROR,
message: e.message message: e.message,
}); });
throw e; throw e;
} }
@ -28466,7 +29347,7 @@ class BlobClient extends StorageClient {
catch (e) { catch (e) {
span.setStatus({ span.setStatus({
code: coreTracing.SpanStatusCode.ERROR, code: coreTracing.SpanStatusCode.ERROR,
message: e.message message: e.message,
}); });
throw e; throw e;
} }
@ -28496,7 +29377,7 @@ class BlobClient extends StorageClient {
catch (e) { catch (e) {
span.setStatus({ span.setStatus({
code: coreTracing.SpanStatusCode.ERROR, code: coreTracing.SpanStatusCode.ERROR,
message: e.message message: e.message,
}); });
throw e; throw e;
} }
@ -28522,7 +29403,7 @@ class BlobClient extends StorageClient {
catch (e) { catch (e) {
span.setStatus({ span.setStatus({
code: coreTracing.SpanStatusCode.ERROR, code: coreTracing.SpanStatusCode.ERROR,
message: e.message message: e.message,
}); });
throw e; throw e;
} }
@ -28546,7 +29427,7 @@ class BlobClient extends StorageClient {
catch (e) { catch (e) {
span.setStatus({ span.setStatus({
code: coreTracing.SpanStatusCode.ERROR, code: coreTracing.SpanStatusCode.ERROR,
message: e.message message: e.message,
}); });
throw e; throw e;
} }
@ -28580,7 +29461,7 @@ class BlobClient extends StorageClient {
catch (e) { catch (e) {
span.setStatus({ span.setStatus({
code: coreTracing.SpanStatusCode.ERROR, code: coreTracing.SpanStatusCode.ERROR,
message: e.message message: e.message,
}); });
throw e; throw e;
} }
@ -28664,7 +29545,7 @@ class BlobClient extends StorageClient {
const client = { const client = {
abortCopyFromURL: (...args) => this.abortCopyFromURL(...args), abortCopyFromURL: (...args) => this.abortCopyFromURL(...args),
getProperties: (...args) => this.getProperties(...args), getProperties: (...args) => this.getProperties(...args),
startCopyFromURL: (...args) => this.startCopyFromURL(...args) startCopyFromURL: (...args) => this.startCopyFromURL(...args),
}; };
const poller = new BlobBeginCopyFromUrlPoller({ const poller = new BlobBeginCopyFromUrlPoller({
blobClient: client, blobClient: client,
@ -28672,7 +29553,7 @@ class BlobClient extends StorageClient {
intervalInMs: options.intervalInMs, intervalInMs: options.intervalInMs,
onProgress: options.onProgress, onProgress: options.onProgress,
resumeFrom: options.resumeFrom, resumeFrom: options.resumeFrom,
startCopyFromURLOptions: options startCopyFromURLOptions: options,
}); });
// Trigger the startCopyFromURL call by calling poll. // Trigger the startCopyFromURL call by calling poll.
// Any errors from this method should be surfaced to the user. // Any errors from this method should be surfaced to the user.
@ -28695,7 +29576,7 @@ class BlobClient extends StorageClient {
catch (e) { catch (e) {
span.setStatus({ span.setStatus({
code: coreTracing.SpanStatusCode.ERROR, code: coreTracing.SpanStatusCode.ERROR,
message: e.message message: e.message,
}); });
throw e; throw e;
} }
@ -28721,13 +29602,13 @@ class BlobClient extends StorageClient {
sourceIfMatch: options.sourceConditions.ifMatch, sourceIfMatch: options.sourceConditions.ifMatch,
sourceIfModifiedSince: options.sourceConditions.ifModifiedSince, sourceIfModifiedSince: options.sourceConditions.ifModifiedSince,
sourceIfNoneMatch: options.sourceConditions.ifNoneMatch, sourceIfNoneMatch: options.sourceConditions.ifNoneMatch,
sourceIfUnmodifiedSince: options.sourceConditions.ifUnmodifiedSince sourceIfUnmodifiedSince: options.sourceConditions.ifUnmodifiedSince,
}, sourceContentMD5: options.sourceContentMD5, copySourceAuthorization: httpAuthorizationToString(options.sourceAuthorization), blobTagsString: toBlobTagsString(options.tags), immutabilityPolicyExpiry: (_b = options.immutabilityPolicy) === null || _b === void 0 ? void 0 : _b.expiriesOn, immutabilityPolicyMode: (_c = options.immutabilityPolicy) === null || _c === void 0 ? void 0 : _c.policyMode, legalHold: options.legalHold }, convertTracingToRequestOptionsBase(updatedOptions))); }, sourceContentMD5: options.sourceContentMD5, copySourceAuthorization: httpAuthorizationToString(options.sourceAuthorization), blobTagsString: toBlobTagsString(options.tags), immutabilityPolicyExpiry: (_b = options.immutabilityPolicy) === null || _b === void 0 ? void 0 : _b.expiriesOn, immutabilityPolicyMode: (_c = options.immutabilityPolicy) === null || _c === void 0 ? void 0 : _c.policyMode, legalHold: options.legalHold, encryptionScope: options.encryptionScope }, convertTracingToRequestOptionsBase(updatedOptions)));
} }
catch (e) { catch (e) {
span.setStatus({ span.setStatus({
code: coreTracing.SpanStatusCode.ERROR, code: coreTracing.SpanStatusCode.ERROR,
message: e.message message: e.message,
}); });
throw e; throw e;
} }
@ -28755,7 +29636,7 @@ class BlobClient extends StorageClient {
catch (e) { catch (e) {
span.setStatus({ span.setStatus({
code: coreTracing.SpanStatusCode.ERROR, code: coreTracing.SpanStatusCode.ERROR,
message: e.message message: e.message,
}); });
throw e; throw e;
} }
@ -28832,7 +29713,7 @@ class BlobClient extends StorageClient {
conditions: options.conditions, conditions: options.conditions,
maxRetryRequests: options.maxRetryRequestsPerBlock, maxRetryRequests: options.maxRetryRequestsPerBlock,
customerProvidedKey: options.customerProvidedKey, customerProvidedKey: options.customerProvidedKey,
tracingOptions: Object.assign(Object.assign({}, options.tracingOptions), convertTracingToRequestOptionsBase(updatedOptions)) tracingOptions: Object.assign(Object.assign({}, options.tracingOptions), convertTracingToRequestOptionsBase(updatedOptions)),
}); });
const stream = response.readableStreamBody; const stream = response.readableStreamBody;
await streamToBuffer(stream, buffer, off - offset, chunkEnd - offset); await streamToBuffer(stream, buffer, off - offset, chunkEnd - offset);
@ -28851,7 +29732,7 @@ class BlobClient extends StorageClient {
catch (e) { catch (e) {
span.setStatus({ span.setStatus({
code: coreTracing.SpanStatusCode.ERROR, code: coreTracing.SpanStatusCode.ERROR,
message: e.message message: e.message,
}); });
throw e; throw e;
} }
@ -28889,7 +29770,7 @@ class BlobClient extends StorageClient {
catch (e) { catch (e) {
span.setStatus({ span.setStatus({
code: coreTracing.SpanStatusCode.ERROR, code: coreTracing.SpanStatusCode.ERROR,
message: e.message message: e.message,
}); });
throw e; throw e;
} }
@ -28970,13 +29851,13 @@ class BlobClient extends StorageClient {
sourceIfModifiedSince: options.sourceConditions.ifModifiedSince, sourceIfModifiedSince: options.sourceConditions.ifModifiedSince,
sourceIfNoneMatch: options.sourceConditions.ifNoneMatch, sourceIfNoneMatch: options.sourceConditions.ifNoneMatch,
sourceIfUnmodifiedSince: options.sourceConditions.ifUnmodifiedSince, sourceIfUnmodifiedSince: options.sourceConditions.ifUnmodifiedSince,
sourceIfTags: options.sourceConditions.tagConditions sourceIfTags: options.sourceConditions.tagConditions,
}, immutabilityPolicyExpiry: (_b = options.immutabilityPolicy) === null || _b === void 0 ? void 0 : _b.expiriesOn, immutabilityPolicyMode: (_c = options.immutabilityPolicy) === null || _c === void 0 ? void 0 : _c.policyMode, legalHold: options.legalHold, rehydratePriority: options.rehydratePriority, tier: toAccessTier(options.tier), blobTagsString: toBlobTagsString(options.tags), sealBlob: options.sealBlob }, convertTracingToRequestOptionsBase(updatedOptions))); }, immutabilityPolicyExpiry: (_b = options.immutabilityPolicy) === null || _b === void 0 ? void 0 : _b.expiriesOn, immutabilityPolicyMode: (_c = options.immutabilityPolicy) === null || _c === void 0 ? void 0 : _c.policyMode, legalHold: options.legalHold, rehydratePriority: options.rehydratePriority, tier: toAccessTier(options.tier), blobTagsString: toBlobTagsString(options.tags), sealBlob: options.sealBlob }, convertTracingToRequestOptionsBase(updatedOptions)));
} }
catch (e) { catch (e) {
span.setStatus({ span.setStatus({
code: coreTracing.SpanStatusCode.ERROR, code: coreTracing.SpanStatusCode.ERROR,
message: e.message message: e.message,
}); });
throw e; throw e;
} }
@ -29017,7 +29898,7 @@ class BlobClient extends StorageClient {
catch (e) { catch (e) {
span.setStatus({ span.setStatus({
code: coreTracing.SpanStatusCode.ERROR, code: coreTracing.SpanStatusCode.ERROR,
message: e.message message: e.message,
}); });
throw e; throw e;
} }
@ -29038,7 +29919,7 @@ class BlobClient extends StorageClient {
catch (e) { catch (e) {
span.setStatus({ span.setStatus({
code: coreTracing.SpanStatusCode.ERROR, code: coreTracing.SpanStatusCode.ERROR,
message: e.message message: e.message,
}); });
throw e; throw e;
} }
@ -29059,7 +29940,7 @@ class BlobClient extends StorageClient {
catch (e) { catch (e) {
span.setStatus({ span.setStatus({
code: coreTracing.SpanStatusCode.ERROR, code: coreTracing.SpanStatusCode.ERROR,
message: e.message message: e.message,
}); });
throw e; throw e;
} }
@ -29110,12 +29991,17 @@ class AppendBlobClient extends BlobClient {
const blobName = blobNameOrOptions; const blobName = blobNameOrOptions;
const extractedCreds = extractConnectionStringParts(urlOrConnectionString); const extractedCreds = extractConnectionStringParts(urlOrConnectionString);
if (extractedCreds.kind === "AccountConnString") { if (extractedCreds.kind === "AccountConnString") {
{ if (coreHttp.isNode) {
const sharedKeyCredential = new StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey); const sharedKeyCredential = new StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey);
url = appendToURLPath(appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)); url = appendToURLPath(appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName));
if (!options.proxyOptions) {
options.proxyOptions = coreHttp.getDefaultProxySettings(extractedCreds.proxyUri); options.proxyOptions = coreHttp.getDefaultProxySettings(extractedCreds.proxyUri);
}
pipeline = newPipeline(sharedKeyCredential, options); pipeline = newPipeline(sharedKeyCredential, options);
} }
else {
throw new Error("Account connection string is only supported in Node.js environment");
}
} }
else if (extractedCreds.kind === "SASConnString") { else if (extractedCreds.kind === "SASConnString") {
url = url =
@ -29170,7 +30056,7 @@ class AppendBlobClient extends BlobClient {
catch (e) { catch (e) {
span.setStatus({ span.setStatus({
code: coreTracing.SpanStatusCode.ERROR, code: coreTracing.SpanStatusCode.ERROR,
message: e.message message: e.message,
}); });
throw e; throw e;
} }
@ -29191,20 +30077,19 @@ class AppendBlobClient extends BlobClient {
const conditions = { ifNoneMatch: ETagAny }; const conditions = { ifNoneMatch: ETagAny };
try { try {
const res = await this.create(Object.assign(Object.assign({}, updatedOptions), { conditions })); const res = await this.create(Object.assign(Object.assign({}, updatedOptions), { conditions }));
return Object.assign(Object.assign({ succeeded: true }, res), { _response: res._response // _response is made non-enumerable return Object.assign(Object.assign({ succeeded: true }, res), { _response: res._response });
});
} }
catch (e) { catch (e) {
if (((_a = e.details) === null || _a === void 0 ? void 0 : _a.errorCode) === "BlobAlreadyExists") { if (((_a = e.details) === null || _a === void 0 ? void 0 : _a.errorCode) === "BlobAlreadyExists") {
span.setStatus({ span.setStatus({
code: coreTracing.SpanStatusCode.ERROR, code: coreTracing.SpanStatusCode.ERROR,
message: "Expected exception when creating a blob only if it does not already exist." message: "Expected exception when creating a blob only if it does not already exist.",
}); });
return Object.assign(Object.assign({ succeeded: false }, (_b = e.response) === null || _b === void 0 ? void 0 : _b.parsedHeaders), { _response: e.response }); return Object.assign(Object.assign({ succeeded: false }, (_b = e.response) === null || _b === void 0 ? void 0 : _b.parsedHeaders), { _response: e.response });
} }
span.setStatus({ span.setStatus({
code: coreTracing.SpanStatusCode.ERROR, code: coreTracing.SpanStatusCode.ERROR,
message: e.message message: e.message,
}); });
throw e; throw e;
} }
@ -29227,7 +30112,7 @@ class AppendBlobClient extends BlobClient {
catch (e) { catch (e) {
span.setStatus({ span.setStatus({
code: coreTracing.SpanStatusCode.ERROR, code: coreTracing.SpanStatusCode.ERROR,
message: e.message message: e.message,
}); });
throw e; throw e;
} }
@ -29266,13 +30151,13 @@ class AppendBlobClient extends BlobClient {
try { try {
ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps);
return await this.appendBlobContext.appendBlock(contentLength, body, Object.assign({ abortSignal: options.abortSignal, appendPositionAccessConditions: options.conditions, leaseAccessConditions: options.conditions, modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), requestOptions: { return await this.appendBlobContext.appendBlock(contentLength, body, Object.assign({ abortSignal: options.abortSignal, appendPositionAccessConditions: options.conditions, leaseAccessConditions: options.conditions, modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), requestOptions: {
onUploadProgress: options.onProgress onUploadProgress: options.onProgress,
}, transactionalContentMD5: options.transactionalContentMD5, transactionalContentCrc64: options.transactionalContentCrc64, cpkInfo: options.customerProvidedKey, encryptionScope: options.encryptionScope }, convertTracingToRequestOptionsBase(updatedOptions))); }, transactionalContentMD5: options.transactionalContentMD5, transactionalContentCrc64: options.transactionalContentCrc64, cpkInfo: options.customerProvidedKey, encryptionScope: options.encryptionScope }, convertTracingToRequestOptionsBase(updatedOptions)));
} }
catch (e) { catch (e) {
span.setStatus({ span.setStatus({
code: coreTracing.SpanStatusCode.ERROR, code: coreTracing.SpanStatusCode.ERROR,
message: e.message message: e.message,
}); });
throw e; throw e;
} }
@ -29305,13 +30190,13 @@ class AppendBlobClient extends BlobClient {
sourceIfMatch: options.sourceConditions.ifMatch, sourceIfMatch: options.sourceConditions.ifMatch,
sourceIfModifiedSince: options.sourceConditions.ifModifiedSince, sourceIfModifiedSince: options.sourceConditions.ifModifiedSince,
sourceIfNoneMatch: options.sourceConditions.ifNoneMatch, sourceIfNoneMatch: options.sourceConditions.ifNoneMatch,
sourceIfUnmodifiedSince: options.sourceConditions.ifUnmodifiedSince sourceIfUnmodifiedSince: options.sourceConditions.ifUnmodifiedSince,
}, copySourceAuthorization: httpAuthorizationToString(options.sourceAuthorization), cpkInfo: options.customerProvidedKey, encryptionScope: options.encryptionScope }, convertTracingToRequestOptionsBase(updatedOptions))); }, copySourceAuthorization: httpAuthorizationToString(options.sourceAuthorization), cpkInfo: options.customerProvidedKey, encryptionScope: options.encryptionScope }, convertTracingToRequestOptionsBase(updatedOptions)));
} }
catch (e) { catch (e) {
span.setStatus({ span.setStatus({
code: coreTracing.SpanStatusCode.ERROR, code: coreTracing.SpanStatusCode.ERROR,
message: e.message message: e.message,
}); });
throw e; throw e;
} }
@ -29362,12 +30247,17 @@ class BlockBlobClient extends BlobClient {
const blobName = blobNameOrOptions; const blobName = blobNameOrOptions;
const extractedCreds = extractConnectionStringParts(urlOrConnectionString); const extractedCreds = extractConnectionStringParts(urlOrConnectionString);
if (extractedCreds.kind === "AccountConnString") { if (extractedCreds.kind === "AccountConnString") {
{ if (coreHttp.isNode) {
const sharedKeyCredential = new StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey); const sharedKeyCredential = new StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey);
url = appendToURLPath(appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)); url = appendToURLPath(appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName));
if (!options.proxyOptions) {
options.proxyOptions = coreHttp.getDefaultProxySettings(extractedCreds.proxyUri); options.proxyOptions = coreHttp.getDefaultProxySettings(extractedCreds.proxyUri);
}
pipeline = newPipeline(sharedKeyCredential, options); pipeline = newPipeline(sharedKeyCredential, options);
} }
else {
throw new Error("Account connection string is only supported in Node.js environment");
}
} }
else if (extractedCreds.kind === "SASConnString") { else if (extractedCreds.kind === "SASConnString") {
url = url =
@ -29433,23 +30323,25 @@ class BlockBlobClient extends BlobClient {
ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps);
const { span, updatedOptions } = createSpan("BlockBlobClient-query", options); const { span, updatedOptions } = createSpan("BlockBlobClient-query", options);
try { try {
if (false) {} if (!coreHttp.isNode) {
throw new Error("This operation currently is only supported in Node.js.");
}
const response = await this._blobContext.query(Object.assign({ abortSignal: options.abortSignal, queryRequest: { const response = await this._blobContext.query(Object.assign({ abortSignal: options.abortSignal, queryRequest: {
queryType: "SQL", queryType: "SQL",
expression: query, expression: query,
inputSerialization: toQuerySerialization(options.inputTextConfiguration), inputSerialization: toQuerySerialization(options.inputTextConfiguration),
outputSerialization: toQuerySerialization(options.outputTextConfiguration) outputSerialization: toQuerySerialization(options.outputTextConfiguration),
}, leaseAccessConditions: options.conditions, modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }) }, convertTracingToRequestOptionsBase(updatedOptions))); }, leaseAccessConditions: options.conditions, modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }) }, convertTracingToRequestOptionsBase(updatedOptions)));
return new BlobQueryResponse(response, { return new BlobQueryResponse(response, {
abortSignal: options.abortSignal, abortSignal: options.abortSignal,
onProgress: options.onProgress, onProgress: options.onProgress,
onError: options.onError onError: options.onError,
}); });
} }
catch (e) { catch (e) {
span.setStatus({ span.setStatus({
code: coreTracing.SpanStatusCode.ERROR, code: coreTracing.SpanStatusCode.ERROR,
message: e.message message: e.message,
}); });
throw e; throw e;
} }
@ -29491,13 +30383,13 @@ class BlockBlobClient extends BlobClient {
try { try {
ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps);
return await this.blockBlobContext.upload(contentLength, body, Object.assign({ abortSignal: options.abortSignal, blobHttpHeaders: options.blobHTTPHeaders, leaseAccessConditions: options.conditions, metadata: options.metadata, modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), requestOptions: { return await this.blockBlobContext.upload(contentLength, body, Object.assign({ abortSignal: options.abortSignal, blobHttpHeaders: options.blobHTTPHeaders, leaseAccessConditions: options.conditions, metadata: options.metadata, modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), requestOptions: {
onUploadProgress: options.onProgress onUploadProgress: options.onProgress,
}, cpkInfo: options.customerProvidedKey, encryptionScope: options.encryptionScope, immutabilityPolicyExpiry: (_b = options.immutabilityPolicy) === null || _b === void 0 ? void 0 : _b.expiriesOn, immutabilityPolicyMode: (_c = options.immutabilityPolicy) === null || _c === void 0 ? void 0 : _c.policyMode, legalHold: options.legalHold, tier: toAccessTier(options.tier), blobTagsString: toBlobTagsString(options.tags) }, convertTracingToRequestOptionsBase(updatedOptions))); }, cpkInfo: options.customerProvidedKey, encryptionScope: options.encryptionScope, immutabilityPolicyExpiry: (_b = options.immutabilityPolicy) === null || _b === void 0 ? void 0 : _b.expiriesOn, immutabilityPolicyMode: (_c = options.immutabilityPolicy) === null || _c === void 0 ? void 0 : _c.policyMode, legalHold: options.legalHold, tier: toAccessTier(options.tier), blobTagsString: toBlobTagsString(options.tags) }, convertTracingToRequestOptionsBase(updatedOptions)));
} }
catch (e) { catch (e) {
span.setStatus({ span.setStatus({
code: coreTracing.SpanStatusCode.ERROR, code: coreTracing.SpanStatusCode.ERROR,
message: e.message message: e.message,
}); });
throw e; throw e;
} }
@ -29534,13 +30426,13 @@ class BlockBlobClient extends BlobClient {
sourceIfModifiedSince: (_b = options.sourceConditions) === null || _b === void 0 ? void 0 : _b.ifModifiedSince, sourceIfModifiedSince: (_b = options.sourceConditions) === null || _b === void 0 ? void 0 : _b.ifModifiedSince,
sourceIfNoneMatch: (_c = options.sourceConditions) === null || _c === void 0 ? void 0 : _c.ifNoneMatch, sourceIfNoneMatch: (_c = options.sourceConditions) === null || _c === void 0 ? void 0 : _c.ifNoneMatch,
sourceIfUnmodifiedSince: (_d = options.sourceConditions) === null || _d === void 0 ? void 0 : _d.ifUnmodifiedSince, sourceIfUnmodifiedSince: (_d = options.sourceConditions) === null || _d === void 0 ? void 0 : _d.ifUnmodifiedSince,
sourceIfTags: (_e = options.sourceConditions) === null || _e === void 0 ? void 0 : _e.tagConditions sourceIfTags: (_e = options.sourceConditions) === null || _e === void 0 ? void 0 : _e.tagConditions,
}, cpkInfo: options.customerProvidedKey, copySourceAuthorization: httpAuthorizationToString(options.sourceAuthorization), tier: toAccessTier(options.tier), blobTagsString: toBlobTagsString(options.tags) }), convertTracingToRequestOptionsBase(updatedOptions))); }, cpkInfo: options.customerProvidedKey, copySourceAuthorization: httpAuthorizationToString(options.sourceAuthorization), tier: toAccessTier(options.tier), blobTagsString: toBlobTagsString(options.tags) }), convertTracingToRequestOptionsBase(updatedOptions)));
} }
catch (e) { catch (e) {
span.setStatus({ span.setStatus({
code: coreTracing.SpanStatusCode.ERROR, code: coreTracing.SpanStatusCode.ERROR,
message: e.message message: e.message,
}); });
throw e; throw e;
} }
@ -29564,13 +30456,13 @@ class BlockBlobClient extends BlobClient {
try { try {
ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps);
return await this.blockBlobContext.stageBlock(blockId, contentLength, body, Object.assign({ abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, requestOptions: { return await this.blockBlobContext.stageBlock(blockId, contentLength, body, Object.assign({ abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, requestOptions: {
onUploadProgress: options.onProgress onUploadProgress: options.onProgress,
}, transactionalContentMD5: options.transactionalContentMD5, transactionalContentCrc64: options.transactionalContentCrc64, cpkInfo: options.customerProvidedKey, encryptionScope: options.encryptionScope }, convertTracingToRequestOptionsBase(updatedOptions))); }, transactionalContentMD5: options.transactionalContentMD5, transactionalContentCrc64: options.transactionalContentCrc64, cpkInfo: options.customerProvidedKey, encryptionScope: options.encryptionScope }, convertTracingToRequestOptionsBase(updatedOptions)));
} }
catch (e) { catch (e) {
span.setStatus({ span.setStatus({
code: coreTracing.SpanStatusCode.ERROR, code: coreTracing.SpanStatusCode.ERROR,
message: e.message message: e.message,
}); });
throw e; throw e;
} }
@ -29608,7 +30500,7 @@ class BlockBlobClient extends BlobClient {
catch (e) { catch (e) {
span.setStatus({ span.setStatus({
code: coreTracing.SpanStatusCode.ERROR, code: coreTracing.SpanStatusCode.ERROR,
message: e.message message: e.message,
}); });
throw e; throw e;
} }
@ -29639,7 +30531,7 @@ class BlockBlobClient extends BlobClient {
catch (e) { catch (e) {
span.setStatus({ span.setStatus({
code: coreTracing.SpanStatusCode.ERROR, code: coreTracing.SpanStatusCode.ERROR,
message: e.message message: e.message,
}); });
throw e; throw e;
} }
@ -29673,7 +30565,7 @@ class BlockBlobClient extends BlobClient {
catch (e) { catch (e) {
span.setStatus({ span.setStatus({
code: coreTracing.SpanStatusCode.ERROR, code: coreTracing.SpanStatusCode.ERROR,
message: e.message message: e.message,
}); });
throw e; throw e;
} }
@ -29700,7 +30592,7 @@ class BlockBlobClient extends BlobClient {
async uploadData(data, options = {}) { async uploadData(data, options = {}) {
const { span, updatedOptions } = createSpan("BlockBlobClient-uploadData", options); const { span, updatedOptions } = createSpan("BlockBlobClient-uploadData", options);
try { try {
if (true) { if (coreHttp.isNode) {
let buffer; let buffer;
if (data instanceof Buffer) { if (data instanceof Buffer) {
buffer = data; buffer = data;
@ -29714,12 +30606,15 @@ class BlockBlobClient extends BlobClient {
} }
return this.uploadSeekableInternal((offset, size) => buffer.slice(offset, offset + size), buffer.byteLength, updatedOptions); return this.uploadSeekableInternal((offset, size) => buffer.slice(offset, offset + size), buffer.byteLength, updatedOptions);
} }
else {} else {
const browserBlob = new Blob([data]);
return this.uploadSeekableInternal((offset, size) => browserBlob.slice(offset, offset + size), browserBlob.size, updatedOptions);
}
} }
catch (e) { catch (e) {
span.setStatus({ span.setStatus({
code: coreTracing.SpanStatusCode.ERROR, code: coreTracing.SpanStatusCode.ERROR,
message: e.message message: e.message,
}); });
throw e; throw e;
} }
@ -29755,7 +30650,7 @@ class BlockBlobClient extends BlobClient {
catch (e) { catch (e) {
span.setStatus({ span.setStatus({
code: coreTracing.SpanStatusCode.ERROR, code: coreTracing.SpanStatusCode.ERROR,
message: e.message message: e.message,
}); });
throw e; throw e;
} }
@ -29768,7 +30663,7 @@ class BlockBlobClient extends BlobClient {
* Uploads data to block blob. Requires a bodyFactory as the data source, * Uploads data to block blob. Requires a bodyFactory as the data source,
* which need to return a {@link HttpRequestBody} object with the offset and size provided. * which need to return a {@link HttpRequestBody} object with the offset and size provided.
* *
* When data length is no more than the specifiled {@link BlockBlobParallelUploadOptions.maxSingleShotSize} (default is * When data length is no more than the specified {@link BlockBlobParallelUploadOptions.maxSingleShotSize} (default is
* {@link BLOCK_BLOB_MAX_UPLOAD_BLOB_BYTES}), this method will use 1 {@link upload} call to finish the upload. * {@link BLOCK_BLOB_MAX_UPLOAD_BLOB_BYTES}), this method will use 1 {@link upload} call to finish the upload.
* Otherwise, this method will call {@link stageBlock} to upload blocks, and finally call {@link commitBlockList} * Otherwise, this method will call {@link stageBlock} to upload blocks, and finally call {@link commitBlockList}
* to commit the block list. * to commit the block list.
@ -29834,14 +30729,14 @@ class BlockBlobClient extends BlobClient {
abortSignal: options.abortSignal, abortSignal: options.abortSignal,
conditions: options.conditions, conditions: options.conditions,
encryptionScope: options.encryptionScope, encryptionScope: options.encryptionScope,
tracingOptions: updatedOptions.tracingOptions tracingOptions: updatedOptions.tracingOptions,
}); });
// Update progress after block is successfully uploaded to server, in case of block trying // Update progress after block is successfully uploaded to server, in case of block trying
// TODO: Hook with convenience layer progress event in finer level // TODO: Hook with convenience layer progress event in finer level
transferProgress += contentLength; transferProgress += contentLength;
if (options.onProgress) { if (options.onProgress) {
options.onProgress({ options.onProgress({
loadedBytes: transferProgress loadedBytes: transferProgress,
}); });
} }
}); });
@ -29852,7 +30747,7 @@ class BlockBlobClient extends BlobClient {
catch (e) { catch (e) {
span.setStatus({ span.setStatus({
code: coreTracing.SpanStatusCode.ERROR, code: coreTracing.SpanStatusCode.ERROR,
message: e.message message: e.message,
}); });
throw e; throw e;
} }
@ -29881,14 +30776,14 @@ class BlockBlobClient extends BlobClient {
return () => fsCreateReadStream(filePath, { return () => fsCreateReadStream(filePath, {
autoClose: true, autoClose: true,
end: count ? offset + count - 1 : Infinity, end: count ? offset + count - 1 : Infinity,
start: offset start: offset,
}); });
}, size, Object.assign(Object.assign({}, options), { tracingOptions: Object.assign(Object.assign({}, options.tracingOptions), convertTracingToRequestOptionsBase(updatedOptions)) })); }, size, Object.assign(Object.assign({}, options), { tracingOptions: Object.assign(Object.assign({}, options.tracingOptions), convertTracingToRequestOptionsBase(updatedOptions)) }));
} }
catch (e) { catch (e) {
span.setStatus({ span.setStatus({
code: coreTracing.SpanStatusCode.ERROR, code: coreTracing.SpanStatusCode.ERROR,
message: e.message message: e.message,
}); });
throw e; throw e;
} }
@ -29932,7 +30827,7 @@ class BlockBlobClient extends BlobClient {
await this.stageBlock(blockID, body, length, { await this.stageBlock(blockID, body, length, {
conditions: options.conditions, conditions: options.conditions,
encryptionScope: options.encryptionScope, encryptionScope: options.encryptionScope,
tracingOptions: updatedOptions.tracingOptions tracingOptions: updatedOptions.tracingOptions,
}); });
// Update progress after block is successfully uploaded to server, in case of block trying // Update progress after block is successfully uploaded to server, in case of block trying
transferProgress += length; transferProgress += length;
@ -29951,7 +30846,7 @@ class BlockBlobClient extends BlobClient {
catch (e) { catch (e) {
span.setStatus({ span.setStatus({
code: coreTracing.SpanStatusCode.ERROR, code: coreTracing.SpanStatusCode.ERROR,
message: e.message message: e.message,
}); });
throw e; throw e;
} }
@ -30002,12 +30897,17 @@ class PageBlobClient extends BlobClient {
const blobName = blobNameOrOptions; const blobName = blobNameOrOptions;
const extractedCreds = extractConnectionStringParts(urlOrConnectionString); const extractedCreds = extractConnectionStringParts(urlOrConnectionString);
if (extractedCreds.kind === "AccountConnString") { if (extractedCreds.kind === "AccountConnString") {
{ if (coreHttp.isNode) {
const sharedKeyCredential = new StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey); const sharedKeyCredential = new StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey);
url = appendToURLPath(appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)); url = appendToURLPath(appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName));
if (!options.proxyOptions) {
options.proxyOptions = coreHttp.getDefaultProxySettings(extractedCreds.proxyUri); options.proxyOptions = coreHttp.getDefaultProxySettings(extractedCreds.proxyUri);
}
pipeline = newPipeline(sharedKeyCredential, options); pipeline = newPipeline(sharedKeyCredential, options);
} }
else {
throw new Error("Account connection string is only supported in Node.js environment");
}
} }
else if (extractedCreds.kind === "SASConnString") { else if (extractedCreds.kind === "SASConnString") {
url = url =
@ -30057,7 +30957,7 @@ class PageBlobClient extends BlobClient {
catch (e) { catch (e) {
span.setStatus({ span.setStatus({
code: coreTracing.SpanStatusCode.ERROR, code: coreTracing.SpanStatusCode.ERROR,
message: e.message message: e.message,
}); });
throw e; throw e;
} }
@ -30080,20 +30980,19 @@ class PageBlobClient extends BlobClient {
try { try {
const conditions = { ifNoneMatch: ETagAny }; const conditions = { ifNoneMatch: ETagAny };
const res = await this.create(size, Object.assign(Object.assign({}, options), { conditions, tracingOptions: updatedOptions.tracingOptions })); const res = await this.create(size, Object.assign(Object.assign({}, options), { conditions, tracingOptions: updatedOptions.tracingOptions }));
return Object.assign(Object.assign({ succeeded: true }, res), { _response: res._response // _response is made non-enumerable return Object.assign(Object.assign({ succeeded: true }, res), { _response: res._response });
});
} }
catch (e) { catch (e) {
if (((_a = e.details) === null || _a === void 0 ? void 0 : _a.errorCode) === "BlobAlreadyExists") { if (((_a = e.details) === null || _a === void 0 ? void 0 : _a.errorCode) === "BlobAlreadyExists") {
span.setStatus({ span.setStatus({
code: coreTracing.SpanStatusCode.ERROR, code: coreTracing.SpanStatusCode.ERROR,
message: "Expected exception when creating a blob only if it does not already exist." message: "Expected exception when creating a blob only if it does not already exist.",
}); });
return Object.assign(Object.assign({ succeeded: false }, (_b = e.response) === null || _b === void 0 ? void 0 : _b.parsedHeaders), { _response: e.response }); return Object.assign(Object.assign({ succeeded: false }, (_b = e.response) === null || _b === void 0 ? void 0 : _b.parsedHeaders), { _response: e.response });
} }
span.setStatus({ span.setStatus({
code: coreTracing.SpanStatusCode.ERROR, code: coreTracing.SpanStatusCode.ERROR,
message: e.message message: e.message,
}); });
throw e; throw e;
} }
@ -30118,13 +31017,13 @@ class PageBlobClient extends BlobClient {
try { try {
ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps);
return await this.pageBlobContext.uploadPages(count, body, Object.assign({ abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), requestOptions: { return await this.pageBlobContext.uploadPages(count, body, Object.assign({ abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), requestOptions: {
onUploadProgress: options.onProgress onUploadProgress: options.onProgress,
}, range: rangeToString({ offset, count }), sequenceNumberAccessConditions: options.conditions, transactionalContentMD5: options.transactionalContentMD5, transactionalContentCrc64: options.transactionalContentCrc64, cpkInfo: options.customerProvidedKey, encryptionScope: options.encryptionScope }, convertTracingToRequestOptionsBase(updatedOptions))); }, range: rangeToString({ offset, count }), sequenceNumberAccessConditions: options.conditions, transactionalContentMD5: options.transactionalContentMD5, transactionalContentCrc64: options.transactionalContentCrc64, cpkInfo: options.customerProvidedKey, encryptionScope: options.encryptionScope }, convertTracingToRequestOptionsBase(updatedOptions)));
} }
catch (e) { catch (e) {
span.setStatus({ span.setStatus({
code: coreTracing.SpanStatusCode.ERROR, code: coreTracing.SpanStatusCode.ERROR,
message: e.message message: e.message,
}); });
throw e; throw e;
} }
@ -30154,13 +31053,13 @@ class PageBlobClient extends BlobClient {
sourceIfMatch: options.sourceConditions.ifMatch, sourceIfMatch: options.sourceConditions.ifMatch,
sourceIfModifiedSince: options.sourceConditions.ifModifiedSince, sourceIfModifiedSince: options.sourceConditions.ifModifiedSince,
sourceIfNoneMatch: options.sourceConditions.ifNoneMatch, sourceIfNoneMatch: options.sourceConditions.ifNoneMatch,
sourceIfUnmodifiedSince: options.sourceConditions.ifUnmodifiedSince sourceIfUnmodifiedSince: options.sourceConditions.ifUnmodifiedSince,
}, cpkInfo: options.customerProvidedKey, encryptionScope: options.encryptionScope, copySourceAuthorization: httpAuthorizationToString(options.sourceAuthorization) }, convertTracingToRequestOptionsBase(updatedOptions))); }, cpkInfo: options.customerProvidedKey, encryptionScope: options.encryptionScope, copySourceAuthorization: httpAuthorizationToString(options.sourceAuthorization) }, convertTracingToRequestOptionsBase(updatedOptions)));
} }
catch (e) { catch (e) {
span.setStatus({ span.setStatus({
code: coreTracing.SpanStatusCode.ERROR, code: coreTracing.SpanStatusCode.ERROR,
message: e.message message: e.message,
}); });
throw e; throw e;
} }
@ -30187,7 +31086,7 @@ class PageBlobClient extends BlobClient {
catch (e) { catch (e) {
span.setStatus({ span.setStatus({
code: coreTracing.SpanStatusCode.ERROR, code: coreTracing.SpanStatusCode.ERROR,
message: e.message message: e.message,
}); });
throw e; throw e;
} }
@ -30216,7 +31115,7 @@ class PageBlobClient extends BlobClient {
catch (e) { catch (e) {
span.setStatus({ span.setStatus({
code: coreTracing.SpanStatusCode.ERROR, code: coreTracing.SpanStatusCode.ERROR,
message: e.message message: e.message,
}); });
throw e; throw e;
} }
@ -30246,7 +31145,7 @@ class PageBlobClient extends BlobClient {
catch (e) { catch (e) {
span.setStatus({ span.setStatus({
code: coreTracing.SpanStatusCode.ERROR, code: coreTracing.SpanStatusCode.ERROR,
message: e.message message: e.message,
}); });
throw e; throw e;
} }
@ -30276,7 +31175,7 @@ class PageBlobClient extends BlobClient {
catch (e) { catch (e) {
span.setStatus({ span.setStatus({
code: coreTracing.SpanStatusCode.ERROR, code: coreTracing.SpanStatusCode.ERROR,
message: e.message message: e.message,
}); });
throw e; throw e;
} }
@ -30302,7 +31201,7 @@ class PageBlobClient extends BlobClient {
catch (e) { catch (e) {
span.setStatus({ span.setStatus({
code: coreTracing.SpanStatusCode.ERROR, code: coreTracing.SpanStatusCode.ERROR,
message: e.message message: e.message,
}); });
throw e; throw e;
} }
@ -30329,7 +31228,7 @@ class PageBlobClient extends BlobClient {
catch (e) { catch (e) {
span.setStatus({ span.setStatus({
code: coreTracing.SpanStatusCode.ERROR, code: coreTracing.SpanStatusCode.ERROR,
message: e.message message: e.message,
}); });
throw e; throw e;
} }
@ -30359,7 +31258,7 @@ class PageBlobClient extends BlobClient {
catch (e) { catch (e) {
span.setStatus({ span.setStatus({
code: coreTracing.SpanStatusCode.ERROR, code: coreTracing.SpanStatusCode.ERROR,
message: e.message message: e.message,
}); });
throw e; throw e;
} }
@ -30507,7 +31406,7 @@ class BatchResponseParser {
return { return {
subResponses: deserializedSubResponses, subResponses: deserializedSubResponses,
subResponsesSucceededCount: subResponsesSucceededCount, subResponsesSucceededCount: subResponsesSucceededCount,
subResponsesFailedCount: subResponsesFailedCount subResponsesFailedCount: subResponsesFailedCount,
}; };
} }
} }
@ -30654,7 +31553,7 @@ class BlobBatch {
this.setBatchType("delete"); this.setBatchType("delete");
await this.addSubRequestInternal({ await this.addSubRequestInternal({
url: url, url: url,
credential: credential credential: credential,
}, async () => { }, async () => {
await new BlobClient(url, this.batchRequest.createPipeline(credential)).delete(updatedOptions); await new BlobClient(url, this.batchRequest.createPipeline(credential)).delete(updatedOptions);
}); });
@ -30662,7 +31561,7 @@ class BlobBatch {
catch (e) { catch (e) {
span.setStatus({ span.setStatus({
code: coreTracing.SpanStatusCode.ERROR, code: coreTracing.SpanStatusCode.ERROR,
message: e.message message: e.message,
}); });
throw e; throw e;
} }
@ -30701,7 +31600,7 @@ class BlobBatch {
this.setBatchType("setAccessTier"); this.setBatchType("setAccessTier");
await this.addSubRequestInternal({ await this.addSubRequestInternal({
url: url, url: url,
credential: credential credential: credential,
}, async () => { }, async () => {
await new BlobClient(url, this.batchRequest.createPipeline(credential)).setAccessTier(tier, updatedOptions); await new BlobClient(url, this.batchRequest.createPipeline(credential)).setAccessTier(tier, updatedOptions);
}); });
@ -30709,7 +31608,7 @@ class BlobBatch {
catch (e) { catch (e) {
span.setStatus({ span.setStatus({
code: coreTracing.SpanStatusCode.ERROR, code: coreTracing.SpanStatusCode.ERROR,
message: e.message message: e.message,
}); });
throw e; throw e;
} }
@ -30766,7 +31665,7 @@ class InnerBatchRequest {
this.subRequestPrefix, this.subRequestPrefix,
`${HeaderConstants.CONTENT_ID}: ${this.operationCount}`, `${HeaderConstants.CONTENT_ID}: ${this.operationCount}`,
"", "",
`${request.method.toString()} ${getURLPathAndQuery(request.url)} ${HTTP_VERSION_1_1}${HTTP_LINE_ENDING}` // sub request start line with method `${request.method.toString()} ${getURLPathAndQuery(request.url)} ${HTTP_VERSION_1_1}${HTTP_LINE_ENDING}`, // sub request start line with method
].join(HTTP_LINE_ENDING); ].join(HTTP_LINE_ENDING);
for (const header of request.headers.headersArray()) { for (const header of request.headers.headersArray()) {
this.body += `${header.name}: ${header.value}${HTTP_LINE_ENDING}`; this.body += `${header.name}: ${header.value}${HTTP_LINE_ENDING}`;
@ -30806,7 +31705,7 @@ class BatchRequestAssemblePolicy extends coreHttp.BaseRequestPolicy {
this.dummyResponse = { this.dummyResponse = {
request: new coreHttp.WebResource(), request: new coreHttp.WebResource(),
status: 200, status: 200,
headers: new coreHttp.HttpHeaders() headers: new coreHttp.HttpHeaders(),
}; };
this.batchRequest = batchRequest; this.batchRequest = batchRequest;
} }
@ -30973,14 +31872,14 @@ class BlobBatchClient {
version: rawBatchResponse.version, version: rawBatchResponse.version,
subResponses: responseSummary.subResponses, subResponses: responseSummary.subResponses,
subResponsesSucceededCount: responseSummary.subResponsesSucceededCount, subResponsesSucceededCount: responseSummary.subResponsesSucceededCount,
subResponsesFailedCount: responseSummary.subResponsesFailedCount subResponsesFailedCount: responseSummary.subResponsesFailedCount,
}; };
return res; return res;
} }
catch (e) { catch (e) {
span.setStatus({ span.setStatus({
code: coreTracing.SpanStatusCode.ERROR, code: coreTracing.SpanStatusCode.ERROR,
message: e.message message: e.message,
}); });
throw e; throw e;
} }
@ -31026,12 +31925,17 @@ class ContainerClient extends StorageClient {
const containerName = credentialOrPipelineOrContainerName; const containerName = credentialOrPipelineOrContainerName;
const extractedCreds = extractConnectionStringParts(urlOrConnectionString); const extractedCreds = extractConnectionStringParts(urlOrConnectionString);
if (extractedCreds.kind === "AccountConnString") { if (extractedCreds.kind === "AccountConnString") {
{ if (coreHttp.isNode) {
const sharedKeyCredential = new StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey); const sharedKeyCredential = new StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey);
url = appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)); url = appendToURLPath(extractedCreds.url, encodeURIComponent(containerName));
if (!options.proxyOptions) {
options.proxyOptions = coreHttp.getDefaultProxySettings(extractedCreds.proxyUri); options.proxyOptions = coreHttp.getDefaultProxySettings(extractedCreds.proxyUri);
}
pipeline = newPipeline(sharedKeyCredential, options); pipeline = newPipeline(sharedKeyCredential, options);
} }
else {
throw new Error("Account connection string is only supported in Node.js environment");
}
} }
else if (extractedCreds.kind === "SASConnString") { else if (extractedCreds.kind === "SASConnString") {
url = url =
@ -31083,7 +31987,7 @@ class ContainerClient extends StorageClient {
catch (e) { catch (e) {
span.setStatus({ span.setStatus({
code: coreTracing.SpanStatusCode.ERROR, code: coreTracing.SpanStatusCode.ERROR,
message: e.message message: e.message,
}); });
throw e; throw e;
} }
@ -31103,20 +32007,19 @@ class ContainerClient extends StorageClient {
const { span, updatedOptions } = createSpan("ContainerClient-createIfNotExists", options); const { span, updatedOptions } = createSpan("ContainerClient-createIfNotExists", options);
try { try {
const res = await this.create(updatedOptions); const res = await this.create(updatedOptions);
return Object.assign(Object.assign({ succeeded: true }, res), { _response: res._response // _response is made non-enumerable return Object.assign(Object.assign({ succeeded: true }, res), { _response: res._response });
});
} }
catch (e) { catch (e) {
if (((_a = e.details) === null || _a === void 0 ? void 0 : _a.errorCode) === "ContainerAlreadyExists") { if (((_a = e.details) === null || _a === void 0 ? void 0 : _a.errorCode) === "ContainerAlreadyExists") {
span.setStatus({ span.setStatus({
code: coreTracing.SpanStatusCode.ERROR, code: coreTracing.SpanStatusCode.ERROR,
message: "Expected exception when creating a container only if it does not already exist." message: "Expected exception when creating a container only if it does not already exist.",
}); });
return Object.assign(Object.assign({ succeeded: false }, (_b = e.response) === null || _b === void 0 ? void 0 : _b.parsedHeaders), { _response: e.response }); return Object.assign(Object.assign({ succeeded: false }, (_b = e.response) === null || _b === void 0 ? void 0 : _b.parsedHeaders), { _response: e.response });
} }
span.setStatus({ span.setStatus({
code: coreTracing.SpanStatusCode.ERROR, code: coreTracing.SpanStatusCode.ERROR,
message: e.message message: e.message,
}); });
throw e; throw e;
} }
@ -31138,7 +32041,7 @@ class ContainerClient extends StorageClient {
try { try {
await this.getProperties({ await this.getProperties({
abortSignal: options.abortSignal, abortSignal: options.abortSignal,
tracingOptions: updatedOptions.tracingOptions tracingOptions: updatedOptions.tracingOptions,
}); });
return true; return true;
} }
@ -31146,13 +32049,13 @@ class ContainerClient extends StorageClient {
if (e.statusCode === 404) { if (e.statusCode === 404) {
span.setStatus({ span.setStatus({
code: coreTracing.SpanStatusCode.ERROR, code: coreTracing.SpanStatusCode.ERROR,
message: "Expected exception when checking container existence" message: "Expected exception when checking container existence",
}); });
return false; return false;
} }
span.setStatus({ span.setStatus({
code: coreTracing.SpanStatusCode.ERROR, code: coreTracing.SpanStatusCode.ERROR,
message: e.message message: e.message,
}); });
throw e; throw e;
} }
@ -31226,7 +32129,7 @@ class ContainerClient extends StorageClient {
catch (e) { catch (e) {
span.setStatus({ span.setStatus({
code: coreTracing.SpanStatusCode.ERROR, code: coreTracing.SpanStatusCode.ERROR,
message: e.message message: e.message,
}); });
throw e; throw e;
} }
@ -31252,7 +32155,7 @@ class ContainerClient extends StorageClient {
catch (e) { catch (e) {
span.setStatus({ span.setStatus({
code: coreTracing.SpanStatusCode.ERROR, code: coreTracing.SpanStatusCode.ERROR,
message: e.message message: e.message,
}); });
throw e; throw e;
} }
@ -31272,20 +32175,19 @@ class ContainerClient extends StorageClient {
const { span, updatedOptions } = createSpan("ContainerClient-deleteIfExists", options); const { span, updatedOptions } = createSpan("ContainerClient-deleteIfExists", options);
try { try {
const res = await this.delete(updatedOptions); const res = await this.delete(updatedOptions);
return Object.assign(Object.assign({ succeeded: true }, res), { _response: res._response // _response is made non-enumerable return Object.assign(Object.assign({ succeeded: true }, res), { _response: res._response });
});
} }
catch (e) { catch (e) {
if (((_a = e.details) === null || _a === void 0 ? void 0 : _a.errorCode) === "ContainerNotFound") { if (((_a = e.details) === null || _a === void 0 ? void 0 : _a.errorCode) === "ContainerNotFound") {
span.setStatus({ span.setStatus({
code: coreTracing.SpanStatusCode.ERROR, code: coreTracing.SpanStatusCode.ERROR,
message: "Expected exception when deleting a container only if it exists." message: "Expected exception when deleting a container only if it exists.",
}); });
return Object.assign(Object.assign({ succeeded: false }, (_b = e.response) === null || _b === void 0 ? void 0 : _b.parsedHeaders), { _response: e.response }); return Object.assign(Object.assign({ succeeded: false }, (_b = e.response) === null || _b === void 0 ? void 0 : _b.parsedHeaders), { _response: e.response });
} }
span.setStatus({ span.setStatus({
code: coreTracing.SpanStatusCode.ERROR, code: coreTracing.SpanStatusCode.ERROR,
message: e.message message: e.message,
}); });
throw e; throw e;
} }
@ -31319,7 +32221,7 @@ class ContainerClient extends StorageClient {
catch (e) { catch (e) {
span.setStatus({ span.setStatus({
code: coreTracing.SpanStatusCode.ERROR, code: coreTracing.SpanStatusCode.ERROR,
message: e.message message: e.message,
}); });
throw e; throw e;
} }
@ -31355,13 +32257,13 @@ class ContainerClient extends StorageClient {
requestId: response.requestId, requestId: response.requestId,
clientRequestId: response.clientRequestId, clientRequestId: response.clientRequestId,
signedIdentifiers: [], signedIdentifiers: [],
version: response.version version: response.version,
}; };
for (const identifier of response) { for (const identifier of response) {
let accessPolicy = undefined; let accessPolicy = undefined;
if (identifier.accessPolicy) { if (identifier.accessPolicy) {
accessPolicy = { accessPolicy = {
permissions: identifier.accessPolicy.permissions permissions: identifier.accessPolicy.permissions,
}; };
if (identifier.accessPolicy.expiresOn) { if (identifier.accessPolicy.expiresOn) {
accessPolicy.expiresOn = new Date(identifier.accessPolicy.expiresOn); accessPolicy.expiresOn = new Date(identifier.accessPolicy.expiresOn);
@ -31372,7 +32274,7 @@ class ContainerClient extends StorageClient {
} }
res.signedIdentifiers.push({ res.signedIdentifiers.push({
accessPolicy, accessPolicy,
id: identifier.id id: identifier.id,
}); });
} }
return res; return res;
@ -31380,7 +32282,7 @@ class ContainerClient extends StorageClient {
catch (e) { catch (e) {
span.setStatus({ span.setStatus({
code: coreTracing.SpanStatusCode.ERROR, code: coreTracing.SpanStatusCode.ERROR,
message: e.message message: e.message,
}); });
throw e; throw e;
} }
@ -31419,9 +32321,9 @@ class ContainerClient extends StorageClient {
permissions: identifier.accessPolicy.permissions, permissions: identifier.accessPolicy.permissions,
startsOn: identifier.accessPolicy.startsOn startsOn: identifier.accessPolicy.startsOn
? truncatedISO8061Date(identifier.accessPolicy.startsOn) ? truncatedISO8061Date(identifier.accessPolicy.startsOn)
: "" : "",
}, },
id: identifier.id id: identifier.id,
}); });
} }
return await this.containerContext.setAccessPolicy(Object.assign({ abortSignal: options.abortSignal, access, containerAcl: acl, leaseAccessConditions: options.conditions, modifiedAccessConditions: options.conditions }, convertTracingToRequestOptionsBase(updatedOptions))); return await this.containerContext.setAccessPolicy(Object.assign({ abortSignal: options.abortSignal, access, containerAcl: acl, leaseAccessConditions: options.conditions, modifiedAccessConditions: options.conditions }, convertTracingToRequestOptionsBase(updatedOptions)));
@ -31429,7 +32331,7 @@ class ContainerClient extends StorageClient {
catch (e) { catch (e) {
span.setStatus({ span.setStatus({
code: coreTracing.SpanStatusCode.ERROR, code: coreTracing.SpanStatusCode.ERROR,
message: e.message message: e.message,
}); });
throw e; throw e;
} }
@ -31475,13 +32377,13 @@ class ContainerClient extends StorageClient {
const response = await blockBlobClient.upload(body, contentLength, updatedOptions); const response = await blockBlobClient.upload(body, contentLength, updatedOptions);
return { return {
blockBlobClient, blockBlobClient,
response response,
}; };
} }
catch (e) { catch (e) {
span.setStatus({ span.setStatus({
code: coreTracing.SpanStatusCode.ERROR, code: coreTracing.SpanStatusCode.ERROR,
message: e.message message: e.message,
}); });
throw e; throw e;
} }
@ -31512,7 +32414,7 @@ class ContainerClient extends StorageClient {
catch (e) { catch (e) {
span.setStatus({ span.setStatus({
code: coreTracing.SpanStatusCode.ERROR, code: coreTracing.SpanStatusCode.ERROR,
message: e.message message: e.message,
}); });
throw e; throw e;
} }
@ -31534,8 +32436,12 @@ class ContainerClient extends StorageClient {
const { span, updatedOptions } = createSpan("ContainerClient-listBlobFlatSegment", options); const { span, updatedOptions } = createSpan("ContainerClient-listBlobFlatSegment", options);
try { try {
const response = await this.containerContext.listBlobFlatSegment(Object.assign(Object.assign({ marker }, options), convertTracingToRequestOptionsBase(updatedOptions))); const response = await this.containerContext.listBlobFlatSegment(Object.assign(Object.assign({ marker }, options), convertTracingToRequestOptionsBase(updatedOptions)));
const wrappedResponse = Object.assign(Object.assign({}, response), { _response: response._response, segment: Object.assign(Object.assign({}, response.segment), { blobItems: response.segment.blobItems.map((blobItemInteral) => { response.segment.blobItems = [];
const blobItem = Object.assign(Object.assign({}, blobItemInteral), { tags: toTags(blobItemInteral.blobTags), objectReplicationSourceProperties: parseObjectReplicationRecord(blobItemInteral.objectReplicationMetadata) }); if (response.segment["Blob"] !== undefined) {
response.segment.blobItems = ProcessBlobItems(response.segment["Blob"]);
}
const wrappedResponse = Object.assign(Object.assign({}, response), { _response: Object.assign(Object.assign({}, response._response), { parsedBody: ConvertInternalResponseOfListBlobFlat(response._response.parsedBody) }), segment: Object.assign(Object.assign({}, response.segment), { blobItems: response.segment.blobItems.map((blobItemInteral) => {
const blobItem = Object.assign(Object.assign({}, blobItemInteral), { name: BlobNameToString(blobItemInteral.name), tags: toTags(blobItemInteral.blobTags), objectReplicationSourceProperties: parseObjectReplicationRecord(blobItemInteral.objectReplicationMetadata) });
return blobItem; return blobItem;
}) }) }); }) }) });
return wrappedResponse; return wrappedResponse;
@ -31543,7 +32449,7 @@ class ContainerClient extends StorageClient {
catch (e) { catch (e) {
span.setStatus({ span.setStatus({
code: coreTracing.SpanStatusCode.ERROR, code: coreTracing.SpanStatusCode.ERROR,
message: e.message message: e.message,
}); });
throw e; throw e;
} }
@ -31563,19 +32469,33 @@ class ContainerClient extends StorageClient {
* @param options - Options to Container List Blob Hierarchy Segment operation. * @param options - Options to Container List Blob Hierarchy Segment operation.
*/ */
async listBlobHierarchySegment(delimiter, marker, options = {}) { async listBlobHierarchySegment(delimiter, marker, options = {}) {
var _a;
const { span, updatedOptions } = createSpan("ContainerClient-listBlobHierarchySegment", options); const { span, updatedOptions } = createSpan("ContainerClient-listBlobHierarchySegment", options);
try { try {
const response = await this.containerContext.listBlobHierarchySegment(delimiter, Object.assign(Object.assign({ marker }, options), convertTracingToRequestOptionsBase(updatedOptions))); const response = await this.containerContext.listBlobHierarchySegment(delimiter, Object.assign(Object.assign({ marker }, options), convertTracingToRequestOptionsBase(updatedOptions)));
const wrappedResponse = Object.assign(Object.assign({}, response), { _response: response._response, segment: Object.assign(Object.assign({}, response.segment), { blobItems: response.segment.blobItems.map((blobItemInteral) => { response.segment.blobItems = [];
const blobItem = Object.assign(Object.assign({}, blobItemInteral), { tags: toTags(blobItemInteral.blobTags), objectReplicationSourceProperties: parseObjectReplicationRecord(blobItemInteral.objectReplicationMetadata) }); if (response.segment["Blob"] !== undefined) {
response.segment.blobItems = ProcessBlobItems(response.segment["Blob"]);
}
response.segment.blobPrefixes = [];
if (response.segment["BlobPrefix"] !== undefined) {
response.segment.blobPrefixes = ProcessBlobPrefixes(response.segment["BlobPrefix"]);
}
const wrappedResponse = Object.assign(Object.assign({}, response), { _response: Object.assign(Object.assign({}, response._response), { parsedBody: ConvertInternalResponseOfListBlobHierarchy(response._response.parsedBody) }), segment: Object.assign(Object.assign({}, response.segment), { blobItems: response.segment.blobItems.map((blobItemInteral) => {
const blobItem = Object.assign(Object.assign({}, blobItemInteral), { name: BlobNameToString(blobItemInteral.name), tags: toTags(blobItemInteral.blobTags), objectReplicationSourceProperties: parseObjectReplicationRecord(blobItemInteral.objectReplicationMetadata) });
return blobItem; return blobItem;
}), blobPrefixes: (_a = response.segment.blobPrefixes) === null || _a === void 0 ? void 0 : _a.map((blobPrefixInternal) => {
const blobPrefix = {
name: BlobNameToString(blobPrefixInternal.name),
};
return blobPrefix;
}) }) }); }) }) });
return wrappedResponse; return wrappedResponse;
} }
catch (e) { catch (e) {
span.setStatus({ span.setStatus({
code: coreTracing.SpanStatusCode.ERROR, code: coreTracing.SpanStatusCode.ERROR,
message: e.message message: e.message,
}); });
throw e; throw e;
} }
@ -31757,7 +32677,7 @@ class ContainerClient extends StorageClient {
*/ */
byPage: (settings = {}) => { byPage: (settings = {}) => {
return this.listSegments(settings.continuationToken, Object.assign({ maxPageSize: settings.maxPageSize }, updatedOptions)); return this.listSegments(settings.continuationToken, Object.assign({ maxPageSize: settings.maxPageSize }, updatedOptions));
} },
}; };
} }
/** /**
@ -31831,7 +32751,7 @@ class ContainerClient extends StorageClient {
* if (item.kind === "prefix") { * if (item.kind === "prefix") {
* console.log(`\tBlobPrefix: ${item.name}`); * console.log(`\tBlobPrefix: ${item.name}`);
* } else { * } else {
* console.log(`\tBlobItem: name - ${item.name}, last modified - ${item.properties.lastModified}`); * console.log(`\tBlobItem: name - ${item.name}`);
* } * }
* } * }
* ``` * ```
@ -31846,7 +32766,7 @@ class ContainerClient extends StorageClient {
* if (item.kind === "prefix") { * if (item.kind === "prefix") {
* console.log(`\tBlobPrefix: ${item.name}`); * console.log(`\tBlobPrefix: ${item.name}`);
* } else { * } else {
* console.log(`\tBlobItem: name - ${item.name}, last modified - ${item.properties.lastModified}`); * console.log(`\tBlobItem: name - ${item.name}`);
* } * }
* entity = await iter.next(); * entity = await iter.next();
* } * }
@ -31864,7 +32784,7 @@ class ContainerClient extends StorageClient {
* } * }
* } * }
* for (const blob of response.segment.blobItems) { * for (const blob of response.segment.blobItems) {
* console.log(`\tBlobItem: name - ${blob.name}, last modified - ${blob.properties.lastModified}`); * console.log(`\tBlobItem: name - ${blob.name}`);
* } * }
* } * }
* ``` * ```
@ -31875,7 +32795,9 @@ class ContainerClient extends StorageClient {
* console.log("Listing blobs by hierarchy by page, specifying a prefix and a max page size"); * console.log("Listing blobs by hierarchy by page, specifying a prefix and a max page size");
* *
* let i = 1; * let i = 1;
* for await (const response of containerClient.listBlobsByHierarchy("/", { prefix: "prefix2/sub1/"}).byPage({ maxPageSize: 2 })) { * for await (const response of containerClient
* .listBlobsByHierarchy("/", { prefix: "prefix2/sub1/" })
* .byPage({ maxPageSize: 2 })) {
* console.log(`Page ${i++}`); * console.log(`Page ${i++}`);
* const segment = response.segment; * const segment = response.segment;
* *
@ -31886,7 +32808,7 @@ class ContainerClient extends StorageClient {
* } * }
* *
* for (const blob of response.segment.blobItems) { * for (const blob of response.segment.blobItems) {
* console.log(`\tBlobItem: name - ${blob.name}, last modified - ${blob.properties.lastModified}`); * console.log(`\tBlobItem: name - ${blob.name}`);
* } * }
* } * }
* ``` * ```
@ -31953,7 +32875,208 @@ class ContainerClient extends StorageClient {
*/ */
byPage: (settings = {}) => { byPage: (settings = {}) => {
return this.listHierarchySegments(delimiter, settings.continuationToken, Object.assign({ maxPageSize: settings.maxPageSize }, updatedOptions)); return this.listHierarchySegments(delimiter, settings.continuationToken, Object.assign({ maxPageSize: settings.maxPageSize }, updatedOptions));
},
};
} }
/**
* The Filter Blobs operation enables callers to list blobs in the container whose tags
* match a given search expression.
*
* @param tagFilterSqlExpression - The where parameter enables the caller to query blobs whose tags match a given expression.
* The given expression must evaluate to true for a blob to be returned in the results.
* The[OData - ABNF] filter syntax rule defines the formal grammar for the value of the where query parameter;
* however, only a subset of the OData filter syntax is supported in the Blob service.
* @param marker - A string value that identifies the portion of
* the list of blobs to be returned with the next listing operation. The
* operation returns the continuationToken value within the response body if the
* listing operation did not return all blobs remaining to be listed
* with the current page. The continuationToken value can be used as the value for
* the marker parameter in a subsequent call to request the next page of list
* items. The marker value is opaque to the client.
* @param options - Options to find blobs by tags.
*/
async findBlobsByTagsSegment(tagFilterSqlExpression, marker, options = {}) {
const { span, updatedOptions } = createSpan("ContainerClient-findBlobsByTagsSegment", options);
try {
const response = await this.containerContext.filterBlobs(Object.assign({ abortSignal: options.abortSignal, where: tagFilterSqlExpression, marker, maxPageSize: options.maxPageSize }, convertTracingToRequestOptionsBase(updatedOptions)));
const wrappedResponse = Object.assign(Object.assign({}, response), { _response: response._response, blobs: response.blobs.map((blob) => {
var _a;
let tagValue = "";
if (((_a = blob.tags) === null || _a === void 0 ? void 0 : _a.blobTagSet.length) === 1) {
tagValue = blob.tags.blobTagSet[0].value;
}
return Object.assign(Object.assign({}, blob), { tags: toTags(blob.tags), tagValue });
}) });
return wrappedResponse;
}
catch (e) {
span.setStatus({
code: coreTracing.SpanStatusCode.ERROR,
message: e.message,
});
throw e;
}
finally {
span.end();
}
}
/**
* Returns an AsyncIterableIterator for ContainerFindBlobsByTagsSegmentResponse.
*
* @param tagFilterSqlExpression - The where parameter enables the caller to query blobs whose tags match a given expression.
* The given expression must evaluate to true for a blob to be returned in the results.
* The[OData - ABNF] filter syntax rule defines the formal grammar for the value of the where query parameter;
* however, only a subset of the OData filter syntax is supported in the Blob service.
* @param marker - A string value that identifies the portion of
* the list of blobs to be returned with the next listing operation. The
* operation returns the continuationToken value within the response body if the
* listing operation did not return all blobs remaining to be listed
* with the current page. The continuationToken value can be used as the value for
* the marker parameter in a subsequent call to request the next page of list
* items. The marker value is opaque to the client.
* @param options - Options to find blobs by tags.
*/
findBlobsByTagsSegments(tagFilterSqlExpression, marker, options = {}) {
return tslib.__asyncGenerator(this, arguments, function* findBlobsByTagsSegments_1() {
let response;
if (!!marker || marker === undefined) {
do {
response = yield tslib.__await(this.findBlobsByTagsSegment(tagFilterSqlExpression, marker, options));
response.blobs = response.blobs || [];
marker = response.continuationToken;
yield yield tslib.__await(response);
} while (marker);
}
});
}
/**
* Returns an AsyncIterableIterator for blobs.
*
* @param tagFilterSqlExpression - The where parameter enables the caller to query blobs whose tags match a given expression.
* The given expression must evaluate to true for a blob to be returned in the results.
* The[OData - ABNF] filter syntax rule defines the formal grammar for the value of the where query parameter;
* however, only a subset of the OData filter syntax is supported in the Blob service.
* @param options - Options to findBlobsByTagsItems.
*/
findBlobsByTagsItems(tagFilterSqlExpression, options = {}) {
return tslib.__asyncGenerator(this, arguments, function* findBlobsByTagsItems_1() {
var e_3, _a;
let marker;
try {
for (var _b = tslib.__asyncValues(this.findBlobsByTagsSegments(tagFilterSqlExpression, marker, options)), _c; _c = yield tslib.__await(_b.next()), !_c.done;) {
const segment = _c.value;
yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(segment.blobs)));
}
}
catch (e_3_1) { e_3 = { error: e_3_1 }; }
finally {
try {
if (_c && !_c.done && (_a = _b.return)) yield tslib.__await(_a.call(_b));
}
finally { if (e_3) throw e_3.error; }
}
});
}
/**
* Returns an async iterable iterator to find all blobs with specified tag
* under the specified container.
*
* .byPage() returns an async iterable iterator to list the blobs in pages.
*
* Example using `for await` syntax:
*
* ```js
* let i = 1;
* for await (const blob of containerClient.findBlobsByTags("tagkey='tagvalue'")) {
* console.log(`Blob ${i++}: ${blob.name}`);
* }
* ```
*
* Example using `iter.next()`:
*
* ```js
* let i = 1;
* const iter = containerClient.findBlobsByTags("tagkey='tagvalue'");
* let blobItem = await iter.next();
* while (!blobItem.done) {
* console.log(`Blob ${i++}: ${blobItem.value.name}`);
* blobItem = await iter.next();
* }
* ```
*
* Example using `byPage()`:
*
* ```js
* // passing optional maxPageSize in the page settings
* let i = 1;
* for await (const response of containerClient.findBlobsByTags("tagkey='tagvalue'").byPage({ maxPageSize: 20 })) {
* if (response.blobs) {
* for (const blob of response.blobs) {
* console.log(`Blob ${i++}: ${blob.name}`);
* }
* }
* }
* ```
*
* Example using paging with a marker:
*
* ```js
* let i = 1;
* let iterator = containerClient.findBlobsByTags("tagkey='tagvalue'").byPage({ maxPageSize: 2 });
* let response = (await iterator.next()).value;
*
* // Prints 2 blob names
* if (response.blobs) {
* for (const blob of response.blobs) {
* console.log(`Blob ${i++}: ${blob.name}`);
* }
* }
*
* // Gets next marker
* let marker = response.continuationToken;
* // Passing next marker as continuationToken
* iterator = containerClient
* .findBlobsByTags("tagkey='tagvalue'")
* .byPage({ continuationToken: marker, maxPageSize: 10 });
* response = (await iterator.next()).value;
*
* // Prints blob names
* if (response.blobs) {
* for (const blob of response.blobs) {
* console.log(`Blob ${i++}: ${blob.name}`);
* }
* }
* ```
*
* @param tagFilterSqlExpression - The where parameter enables the caller to query blobs whose tags match a given expression.
* The given expression must evaluate to true for a blob to be returned in the results.
* The[OData - ABNF] filter syntax rule defines the formal grammar for the value of the where query parameter;
* however, only a subset of the OData filter syntax is supported in the Blob service.
* @param options - Options to find blobs by tags.
*/
findBlobsByTags(tagFilterSqlExpression, options = {}) {
// AsyncIterableIterator to iterate over blobs
const listSegmentOptions = Object.assign({}, options);
const iter = this.findBlobsByTagsItems(tagFilterSqlExpression, listSegmentOptions);
return {
/**
* The next method, part of the iteration protocol
*/
next() {
return iter.next();
},
/**
* The connection to the async iterator, part of the iteration protocol
*/
[Symbol.asyncIterator]() {
return this;
},
/**
* Return an AsyncIterableIterator that works a page at a time
*/
byPage: (settings = {}) => {
return this.findBlobsByTagsSegments(tagFilterSqlExpression, settings.continuationToken, Object.assign({ maxPageSize: settings.maxPageSize }, listSegmentOptions));
},
}; };
} }
getContainerNameFromUrl() { getContainerNameFromUrl() {
@ -32086,6 +33209,10 @@ class AccountSASPermissions {
* Permission to set immutability policy. * Permission to set immutability policy.
*/ */
this.setImmutabilityPolicy = false; this.setImmutabilityPolicy = false;
/**
* Specifies that Permanent Delete is permitted.
*/
this.permanentDelete = false;
} }
/** /**
* Parse initializes the AccountSASPermissions fields from a string. * Parse initializes the AccountSASPermissions fields from a string.
@ -32132,6 +33259,9 @@ class AccountSASPermissions {
case "i": case "i":
accountSASPermissions.setImmutabilityPolicy = true; accountSASPermissions.setImmutabilityPolicy = true;
break; break;
case "y":
accountSASPermissions.permanentDelete = true;
break;
default: default:
throw new RangeError(`Invalid permission character: ${c}`); throw new RangeError(`Invalid permission character: ${c}`);
} }
@ -32182,6 +33312,9 @@ class AccountSASPermissions {
if (permissionLike.setImmutabilityPolicy) { if (permissionLike.setImmutabilityPolicy) {
accountSASPermissions.setImmutabilityPolicy = true; accountSASPermissions.setImmutabilityPolicy = true;
} }
if (permissionLike.permanentDelete) {
accountSASPermissions.permanentDelete = true;
}
return accountSASPermissions; return accountSASPermissions;
} }
/** /**
@ -32235,6 +33368,9 @@ class AccountSASPermissions {
if (this.setImmutabilityPolicy) { if (this.setImmutabilityPolicy) {
permissions.push("i"); permissions.push("i");
} }
if (this.permanentDelete) {
permissions.push("y");
}
return permissions.join(""); return permissions.join("");
} }
} }
@ -32417,6 +33553,11 @@ function generateAccountSASQueryParameters(accountSASSignatureValues, sharedKeyC
version < "2019-10-10") { version < "2019-10-10") {
throw RangeError("'version' must be >= '2019-10-10' when provided 'x' permission."); throw RangeError("'version' must be >= '2019-10-10' when provided 'x' permission.");
} }
if (accountSASSignatureValues.permissions &&
accountSASSignatureValues.permissions.permanentDelete &&
version < "2019-10-10") {
throw RangeError("'version' must be >= '2019-10-10' when provided 'y' permission.");
}
if (accountSASSignatureValues.permissions && if (accountSASSignatureValues.permissions &&
accountSASSignatureValues.permissions.tag && accountSASSignatureValues.permissions.tag &&
version < "2019-12-12") { version < "2019-12-12") {
@ -32427,10 +33568,15 @@ function generateAccountSASQueryParameters(accountSASSignatureValues, sharedKeyC
version < "2019-12-12") { version < "2019-12-12") {
throw RangeError("'version' must be >= '2019-12-12' when provided 'f' permission."); throw RangeError("'version' must be >= '2019-12-12' when provided 'f' permission.");
} }
if (accountSASSignatureValues.encryptionScope && version < "2020-12-06") {
throw RangeError("'version' must be >= '2020-12-06' when provided 'encryptionScope' in SAS.");
}
const parsedPermissions = AccountSASPermissions.parse(accountSASSignatureValues.permissions.toString()); const parsedPermissions = AccountSASPermissions.parse(accountSASSignatureValues.permissions.toString());
const parsedServices = AccountSASServices.parse(accountSASSignatureValues.services).toString(); const parsedServices = AccountSASServices.parse(accountSASSignatureValues.services).toString();
const parsedResourceTypes = AccountSASResourceTypes.parse(accountSASSignatureValues.resourceTypes).toString(); const parsedResourceTypes = AccountSASResourceTypes.parse(accountSASSignatureValues.resourceTypes).toString();
const stringToSign = [ let stringToSign;
if (version >= "2020-12-06") {
stringToSign = [
sharedKeyCredential.accountName, sharedKeyCredential.accountName,
parsedPermissions, parsedPermissions,
parsedServices, parsedServices,
@ -32442,10 +33588,28 @@ function generateAccountSASQueryParameters(accountSASSignatureValues, sharedKeyC
accountSASSignatureValues.ipRange ? ipRangeToString(accountSASSignatureValues.ipRange) : "", accountSASSignatureValues.ipRange ? ipRangeToString(accountSASSignatureValues.ipRange) : "",
accountSASSignatureValues.protocol ? accountSASSignatureValues.protocol : "", accountSASSignatureValues.protocol ? accountSASSignatureValues.protocol : "",
version, version,
"" // Account SAS requires an additional newline character accountSASSignatureValues.encryptionScope ? accountSASSignatureValues.encryptionScope : "",
"", // Account SAS requires an additional newline character
].join("\n"); ].join("\n");
}
else {
stringToSign = [
sharedKeyCredential.accountName,
parsedPermissions,
parsedServices,
parsedResourceTypes,
accountSASSignatureValues.startsOn
? truncatedISO8061Date(accountSASSignatureValues.startsOn, false)
: "",
truncatedISO8061Date(accountSASSignatureValues.expiresOn, false),
accountSASSignatureValues.ipRange ? ipRangeToString(accountSASSignatureValues.ipRange) : "",
accountSASSignatureValues.protocol ? accountSASSignatureValues.protocol : "",
version,
"", // Account SAS requires an additional newline character
].join("\n");
}
const signature = sharedKeyCredential.computeHMACSHA256(stringToSign); const signature = sharedKeyCredential.computeHMACSHA256(stringToSign);
return new SASQueryParameters(version, signature, parsedPermissions.toString(), parsedServices, parsedResourceTypes, accountSASSignatureValues.protocol, accountSASSignatureValues.startsOn, accountSASSignatureValues.expiresOn, accountSASSignatureValues.ipRange); return new SASQueryParameters(version, signature, parsedPermissions.toString(), parsedServices, parsedResourceTypes, accountSASSignatureValues.protocol, accountSASSignatureValues.startsOn, accountSASSignatureValues.expiresOn, accountSASSignatureValues.ipRange, undefined, undefined, undefined, undefined, undefined, undefined, undefined, undefined, undefined, undefined, accountSASSignatureValues.encryptionScope);
} }
/** /**
@ -32492,12 +33656,17 @@ class BlobServiceClient extends StorageClient {
options = options || {}; options = options || {};
const extractedCreds = extractConnectionStringParts(connectionString); const extractedCreds = extractConnectionStringParts(connectionString);
if (extractedCreds.kind === "AccountConnString") { if (extractedCreds.kind === "AccountConnString") {
{ if (coreHttp.isNode) {
const sharedKeyCredential = new StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey); const sharedKeyCredential = new StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey);
if (!options.proxyOptions) {
options.proxyOptions = coreHttp.getDefaultProxySettings(extractedCreds.proxyUri); options.proxyOptions = coreHttp.getDefaultProxySettings(extractedCreds.proxyUri);
}
const pipeline = newPipeline(sharedKeyCredential, options); const pipeline = newPipeline(sharedKeyCredential, options);
return new BlobServiceClient(extractedCreds.url, pipeline); return new BlobServiceClient(extractedCreds.url, pipeline);
} }
else {
throw new Error("Account connection string is only supported in Node.js environment");
}
} }
else if (extractedCreds.kind === "SASConnString") { else if (extractedCreds.kind === "SASConnString") {
const pipeline = newPipeline(new AnonymousCredential(), options); const pipeline = newPipeline(new AnonymousCredential(), options);
@ -32536,13 +33705,13 @@ class BlobServiceClient extends StorageClient {
const containerCreateResponse = await containerClient.create(updatedOptions); const containerCreateResponse = await containerClient.create(updatedOptions);
return { return {
containerClient, containerClient,
containerCreateResponse containerCreateResponse,
}; };
} }
catch (e) { catch (e) {
span.setStatus({ span.setStatus({
code: coreTracing.SpanStatusCode.ERROR, code: coreTracing.SpanStatusCode.ERROR,
message: e.message message: e.message,
}); });
throw e; throw e;
} }
@ -32566,7 +33735,7 @@ class BlobServiceClient extends StorageClient {
catch (e) { catch (e) {
span.setStatus({ span.setStatus({
code: coreTracing.SpanStatusCode.ERROR, code: coreTracing.SpanStatusCode.ERROR,
message: e.message message: e.message,
}); });
throw e; throw e;
} }
@ -32596,7 +33765,7 @@ class BlobServiceClient extends StorageClient {
catch (e) { catch (e) {
span.setStatus({ span.setStatus({
code: coreTracing.SpanStatusCode.ERROR, code: coreTracing.SpanStatusCode.ERROR,
message: e.message message: e.message,
}); });
throw e; throw e;
} }
@ -32626,7 +33795,7 @@ class BlobServiceClient extends StorageClient {
catch (e) { catch (e) {
span.setStatus({ span.setStatus({
code: coreTracing.SpanStatusCode.ERROR, code: coreTracing.SpanStatusCode.ERROR,
message: e.message message: e.message,
}); });
throw e; throw e;
} }
@ -32650,7 +33819,7 @@ class BlobServiceClient extends StorageClient {
catch (e) { catch (e) {
span.setStatus({ span.setStatus({
code: coreTracing.SpanStatusCode.ERROR, code: coreTracing.SpanStatusCode.ERROR,
message: e.message message: e.message,
}); });
throw e; throw e;
} }
@ -32675,7 +33844,7 @@ class BlobServiceClient extends StorageClient {
catch (e) { catch (e) {
span.setStatus({ span.setStatus({
code: coreTracing.SpanStatusCode.ERROR, code: coreTracing.SpanStatusCode.ERROR,
message: e.message message: e.message,
}); });
throw e; throw e;
} }
@ -32700,7 +33869,7 @@ class BlobServiceClient extends StorageClient {
catch (e) { catch (e) {
span.setStatus({ span.setStatus({
code: coreTracing.SpanStatusCode.ERROR, code: coreTracing.SpanStatusCode.ERROR,
message: e.message message: e.message,
}); });
throw e; throw e;
} }
@ -32726,7 +33895,7 @@ class BlobServiceClient extends StorageClient {
catch (e) { catch (e) {
span.setStatus({ span.setStatus({
code: coreTracing.SpanStatusCode.ERROR, code: coreTracing.SpanStatusCode.ERROR,
message: e.message message: e.message,
}); });
throw e; throw e;
} }
@ -32756,7 +33925,7 @@ class BlobServiceClient extends StorageClient {
catch (e) { catch (e) {
span.setStatus({ span.setStatus({
code: coreTracing.SpanStatusCode.ERROR, code: coreTracing.SpanStatusCode.ERROR,
message: e.message message: e.message,
}); });
throw e; throw e;
} }
@ -32799,7 +33968,7 @@ class BlobServiceClient extends StorageClient {
catch (e) { catch (e) {
span.setStatus({ span.setStatus({
code: coreTracing.SpanStatusCode.ERROR, code: coreTracing.SpanStatusCode.ERROR,
message: e.message message: e.message,
}); });
throw e; throw e;
} }
@ -32965,7 +34134,7 @@ class BlobServiceClient extends StorageClient {
*/ */
byPage: (settings = {}) => { byPage: (settings = {}) => {
return this.findBlobsByTagsSegments(tagFilterSqlExpression, settings.continuationToken, Object.assign({ maxPageSize: settings.maxPageSize }, listSegmentOptions)); return this.findBlobsByTagsSegments(tagFilterSqlExpression, settings.continuationToken, Object.assign({ maxPageSize: settings.maxPageSize }, listSegmentOptions));
} },
}; };
} }
/** /**
@ -33103,6 +34272,9 @@ class BlobServiceClient extends StorageClient {
if (options.includeMetadata) { if (options.includeMetadata) {
include.push("metadata"); include.push("metadata");
} }
if (options.includeSystem) {
include.push("system");
}
// AsyncIterableIterator to iterate over containers // AsyncIterableIterator to iterate over containers
const listSegmentOptions = Object.assign(Object.assign({}, options), (include.length > 0 ? { include } : {})); const listSegmentOptions = Object.assign(Object.assign({}, options), (include.length > 0 ? { include } : {}));
const iter = this.listItems(listSegmentOptions); const iter = this.listItems(listSegmentOptions);
@ -33124,7 +34296,7 @@ class BlobServiceClient extends StorageClient {
*/ */
byPage: (settings = {}) => { byPage: (settings = {}) => {
return this.listSegments(settings.continuationToken, Object.assign({ maxPageSize: settings.maxPageSize }, listSegmentOptions)); return this.listSegments(settings.continuationToken, Object.assign({ maxPageSize: settings.maxPageSize }, listSegmentOptions));
} },
}; };
} }
/** /**
@ -33143,7 +34315,7 @@ class BlobServiceClient extends StorageClient {
try { try {
const response = await this.serviceContext.getUserDelegationKey({ const response = await this.serviceContext.getUserDelegationKey({
startsOn: truncatedISO8061Date(startsOn, false), startsOn: truncatedISO8061Date(startsOn, false),
expiresOn: truncatedISO8061Date(expiresOn, false) expiresOn: truncatedISO8061Date(expiresOn, false),
}, Object.assign({ abortSignal: options.abortSignal }, convertTracingToRequestOptionsBase(updatedOptions))); }, Object.assign({ abortSignal: options.abortSignal }, convertTracingToRequestOptionsBase(updatedOptions)));
const userDelegationKey = { const userDelegationKey = {
signedObjectId: response.signedObjectId, signedObjectId: response.signedObjectId,
@ -33152,7 +34324,7 @@ class BlobServiceClient extends StorageClient {
signedExpiresOn: new Date(response.signedExpiresOn), signedExpiresOn: new Date(response.signedExpiresOn),
signedService: response.signedService, signedService: response.signedService,
signedVersion: response.signedVersion, signedVersion: response.signedVersion,
value: response.value value: response.value,
}; };
const res = Object.assign({ _response: response._response, requestId: response.requestId, clientRequestId: response.clientRequestId, version: response.version, date: response.date, errorCode: response.errorCode }, userDelegationKey); const res = Object.assign({ _response: response._response, requestId: response.requestId, clientRequestId: response.clientRequestId, version: response.version, date: response.date, errorCode: response.errorCode }, userDelegationKey);
return res; return res;
@ -33160,7 +34332,7 @@ class BlobServiceClient extends StorageClient {
catch (e) { catch (e) {
span.setStatus({ span.setStatus({
code: coreTracing.SpanStatusCode.ERROR, code: coreTracing.SpanStatusCode.ERROR,
message: e.message message: e.message,
}); });
throw e; throw e;
} }
@ -33209,39 +34381,27 @@ class BlobServiceClient extends StorageClient {
Object.defineProperty(exports, 'BaseRequestPolicy', { Object.defineProperty(exports, 'BaseRequestPolicy', {
enumerable: true, enumerable: true,
get: function () { get: function () { return coreHttp.BaseRequestPolicy; }
return coreHttp.BaseRequestPolicy;
}
}); });
Object.defineProperty(exports, 'HttpHeaders', { Object.defineProperty(exports, 'HttpHeaders', {
enumerable: true, enumerable: true,
get: function () { get: function () { return coreHttp.HttpHeaders; }
return coreHttp.HttpHeaders;
}
}); });
Object.defineProperty(exports, 'RequestPolicyOptions', { Object.defineProperty(exports, 'RequestPolicyOptions', {
enumerable: true, enumerable: true,
get: function () { get: function () { return coreHttp.RequestPolicyOptions; }
return coreHttp.RequestPolicyOptions;
}
}); });
Object.defineProperty(exports, 'RestError', { Object.defineProperty(exports, 'RestError', {
enumerable: true, enumerable: true,
get: function () { get: function () { return coreHttp.RestError; }
return coreHttp.RestError;
}
}); });
Object.defineProperty(exports, 'WebResource', { Object.defineProperty(exports, 'WebResource', {
enumerable: true, enumerable: true,
get: function () { get: function () { return coreHttp.WebResource; }
return coreHttp.WebResource;
}
}); });
Object.defineProperty(exports, 'deserializationPolicy', { Object.defineProperty(exports, 'deserializationPolicy', {
enumerable: true, enumerable: true,
get: function () { get: function () { return coreHttp.deserializationPolicy; }
return coreHttp.deserializationPolicy;
}
}); });
exports.AccountSASPermissions = AccountSASPermissions; exports.AccountSASPermissions = AccountSASPermissions;
exports.AccountSASResourceTypes = AccountSASResourceTypes; exports.AccountSASResourceTypes = AccountSASResourceTypes;
@ -35133,9 +36293,9 @@ var ProxyTracerProvider = /** @class */ (function () {
/** /**
* Get a {@link ProxyTracer} * Get a {@link ProxyTracer}
*/ */
ProxyTracerProvider.prototype.getTracer = function (name, version) { ProxyTracerProvider.prototype.getTracer = function (name, version, options) {
var _a; var _a;
return ((_a = this.getDelegateTracer(name, version)) !== null && _a !== void 0 ? _a : new ProxyTracer_1.ProxyTracer(this, name, version)); return ((_a = this.getDelegateTracer(name, version, options)) !== null && _a !== void 0 ? _a : new ProxyTracer_1.ProxyTracer(this, name, version, options));
}; };
ProxyTracerProvider.prototype.getDelegate = function () { ProxyTracerProvider.prototype.getDelegate = function () {
var _a; var _a;
@ -35147,9 +36307,9 @@ var ProxyTracerProvider = /** @class */ (function () {
ProxyTracerProvider.prototype.setDelegate = function (delegate) { ProxyTracerProvider.prototype.setDelegate = function (delegate) {
this._delegate = delegate; this._delegate = delegate;
}; };
ProxyTracerProvider.prototype.getDelegateTracer = function (name, version) { ProxyTracerProvider.prototype.getDelegateTracer = function (name, version, options) {
var _a; var _a;
return (_a = this._delegate) === null || _a === void 0 ? void 0 : _a.getTracer(name, version); return (_a = this._delegate) === null || _a === void 0 ? void 0 : _a.getTracer(name, version, options);
}; };
return ProxyTracerProvider; return ProxyTracerProvider;
}()); }());
@ -35188,10 +36348,11 @@ var NOOP_TRACER = new NoopTracer_1.NoopTracer();
* Proxy tracer provided by the proxy tracer provider * Proxy tracer provided by the proxy tracer provider
*/ */
var ProxyTracer = /** @class */ (function () { var ProxyTracer = /** @class */ (function () {
function ProxyTracer(_provider, name, version) { function ProxyTracer(_provider, name, version, options) {
this._provider = _provider; this._provider = _provider;
this.name = name; this.name = name;
this.version = version; this.version = version;
this.options = options;
} }
ProxyTracer.prototype.startSpan = function (name, options, context) { ProxyTracer.prototype.startSpan = function (name, options, context) {
return this._getTracer().startSpan(name, options, context); return this._getTracer().startSpan(name, options, context);
@ -35208,7 +36369,7 @@ var ProxyTracer = /** @class */ (function () {
if (this._delegate) { if (this._delegate) {
return this._delegate; return this._delegate;
} }
var tracer = this._provider.getDelegateTracer(this.name, this.version); var tracer = this._provider.getDelegateTracer(this.name, this.version, this.options);
if (!tracer) { if (!tracer) {
return NOOP_TRACER; return NOOP_TRACER;
} }
@ -36208,12 +37369,13 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
}; };
Object.defineProperty(exports, "__esModule", { value: true }); Object.defineProperty(exports, "__esModule", { value: true });
exports.diag = exports.propagation = exports.trace = exports.context = exports.INVALID_SPAN_CONTEXT = exports.INVALID_TRACEID = exports.INVALID_SPANID = exports.isValidSpanId = exports.isValidTraceId = exports.isSpanContextValid = exports.baggageEntryMetadataFromString = void 0; exports.diag = exports.propagation = exports.trace = exports.context = exports.INVALID_SPAN_CONTEXT = exports.INVALID_TRACEID = exports.INVALID_SPANID = exports.isValidSpanId = exports.isValidTraceId = exports.isSpanContextValid = exports.createTraceState = exports.baggageEntryMetadataFromString = void 0;
__exportStar(__webpack_require__(880), exports); __exportStar(__webpack_require__(880), exports);
var utils_1 = __webpack_require__(112); var utils_1 = __webpack_require__(112);
Object.defineProperty(exports, "baggageEntryMetadataFromString", { enumerable: true, get: function () { return utils_1.baggageEntryMetadataFromString; } }); Object.defineProperty(exports, "baggageEntryMetadataFromString", { enumerable: true, get: function () { return utils_1.baggageEntryMetadataFromString; } });
__exportStar(__webpack_require__(452), exports); __exportStar(__webpack_require__(452), exports);
__exportStar(__webpack_require__(158), exports); __exportStar(__webpack_require__(158), exports);
__exportStar(__webpack_require__(907), exports);
__exportStar(__webpack_require__(893), exports); __exportStar(__webpack_require__(893), exports);
__exportStar(__webpack_require__(881), exports); __exportStar(__webpack_require__(881), exports);
__exportStar(__webpack_require__(906), exports); __exportStar(__webpack_require__(906), exports);
@ -36229,8 +37391,11 @@ __exportStar(__webpack_require__(220), exports);
__exportStar(__webpack_require__(932), exports); __exportStar(__webpack_require__(932), exports);
__exportStar(__webpack_require__(975), exports); __exportStar(__webpack_require__(975), exports);
__exportStar(__webpack_require__(207), exports); __exportStar(__webpack_require__(207), exports);
var utils_2 = __webpack_require__(42);
Object.defineProperty(exports, "createTraceState", { enumerable: true, get: function () { return utils_2.createTraceState; } });
__exportStar(__webpack_require__(694), exports); __exportStar(__webpack_require__(694), exports);
__exportStar(__webpack_require__(695), exports); __exportStar(__webpack_require__(695), exports);
__exportStar(__webpack_require__(743), exports);
var spancontext_utils_1 = __webpack_require__(629); var spancontext_utils_1 = __webpack_require__(629);
Object.defineProperty(exports, "isSpanContextValid", { enumerable: true, get: function () { return spancontext_utils_1.isSpanContextValid; } }); Object.defineProperty(exports, "isSpanContextValid", { enumerable: true, get: function () { return spancontext_utils_1.isSpanContextValid; } });
Object.defineProperty(exports, "isValidTraceId", { enumerable: true, get: function () { return spancontext_utils_1.isValidTraceId; } }); Object.defineProperty(exports, "isValidTraceId", { enumerable: true, get: function () { return spancontext_utils_1.isValidTraceId; } });
@ -39151,7 +40316,7 @@ function defer(fn)
Object.defineProperty(exports, '__esModule', { value: true }); Object.defineProperty(exports, '__esModule', { value: true });
__webpack_require__(71); __webpack_require__(97);
var tslib = __webpack_require__(671); var tslib = __webpack_require__(671);
// Copyright (c) Microsoft Corporation. // Copyright (c) Microsoft Corporation.
@ -40952,7 +42117,58 @@ Object.defineProperty(exports, "__esModule", { value: true });
/* 587 */, /* 587 */,
/* 588 */, /* 588 */,
/* 589 */, /* 589 */,
/* 590 */, /* 590 */
/***/ (function(__unusedmodule, exports) {
"use strict";
/*
* Copyright The OpenTelemetry Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.validateValue = exports.validateKey = void 0;
var VALID_KEY_CHAR_RANGE = '[_0-9a-z-*/]';
var VALID_KEY = "[a-z]" + VALID_KEY_CHAR_RANGE + "{0,255}";
var VALID_VENDOR_KEY = "[a-z0-9]" + VALID_KEY_CHAR_RANGE + "{0,240}@[a-z]" + VALID_KEY_CHAR_RANGE + "{0,13}";
var VALID_KEY_REGEX = new RegExp("^(?:" + VALID_KEY + "|" + VALID_VENDOR_KEY + ")$");
var VALID_VALUE_BASE_REGEX = /^[ -~]{0,255}[!-~]$/;
var INVALID_VALUE_COMMA_EQUAL_REGEX = /,|=/;
/**
* Key is opaque string up to 256 characters printable. It MUST begin with a
* lowercase letter, and can only contain lowercase letters a-z, digits 0-9,
* underscores _, dashes -, asterisks *, and forward slashes /.
* For multi-tenant vendor scenarios, an at sign (@) can be used to prefix the
* vendor name. Vendors SHOULD set the tenant ID at the beginning of the key.
* see https://www.w3.org/TR/trace-context/#key
*/
function validateKey(key) {
return VALID_KEY_REGEX.test(key);
}
exports.validateKey = validateKey;
/**
* Value is opaque string up to 256 characters printable ASCII RFC0020
* characters (i.e., the range 0x20 to 0x7E) except comma , and =.
*/
function validateValue(value) {
return (VALID_VALUE_BASE_REGEX.test(value) &&
!INVALID_VALUE_COMMA_EQUAL_REGEX.test(value));
}
exports.validateValue = validateValue;
//# sourceMappingURL=tracestate-validators.js.map
/***/ }),
/* 591 */, /* 591 */,
/* 592 */, /* 592 */,
/* 593 */, /* 593 */,
@ -46004,7 +47220,30 @@ exports.OidcClient = OidcClient;
//# sourceMappingURL=oidc-utils.js.map //# sourceMappingURL=oidc-utils.js.map
/***/ }), /***/ }),
/* 743 */, /* 743 */
/***/ (function(__unusedmodule, exports) {
"use strict";
/*
* Copyright The OpenTelemetry Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
Object.defineProperty(exports, "__esModule", { value: true });
//# sourceMappingURL=tracer_options.js.map
/***/ }),
/* 744 */, /* 744 */,
/* 745 */, /* 745 */,
/* 746 */, /* 746 */,
@ -46101,7 +47340,117 @@ function async(callback)
/* 753 */, /* 753 */,
/* 754 */, /* 754 */,
/* 755 */, /* 755 */,
/* 756 */, /* 756 */
/***/ (function(__unusedmodule, exports, __webpack_require__) {
"use strict";
/*
* Copyright The OpenTelemetry Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.TraceStateImpl = void 0;
var tracestate_validators_1 = __webpack_require__(590);
var MAX_TRACE_STATE_ITEMS = 32;
var MAX_TRACE_STATE_LEN = 512;
var LIST_MEMBERS_SEPARATOR = ',';
var LIST_MEMBER_KEY_VALUE_SPLITTER = '=';
/**
* TraceState must be a class and not a simple object type because of the spec
* requirement (https://www.w3.org/TR/trace-context/#tracestate-field).
*
* Here is the list of allowed mutations:
* - New key-value pair should be added into the beginning of the list
* - The value of any key can be updated. Modified keys MUST be moved to the
* beginning of the list.
*/
var TraceStateImpl = /** @class */ (function () {
function TraceStateImpl(rawTraceState) {
this._internalState = new Map();
if (rawTraceState)
this._parse(rawTraceState);
}
TraceStateImpl.prototype.set = function (key, value) {
// TODO: Benchmark the different approaches(map vs list) and
// use the faster one.
var traceState = this._clone();
if (traceState._internalState.has(key)) {
traceState._internalState.delete(key);
}
traceState._internalState.set(key, value);
return traceState;
};
TraceStateImpl.prototype.unset = function (key) {
var traceState = this._clone();
traceState._internalState.delete(key);
return traceState;
};
TraceStateImpl.prototype.get = function (key) {
return this._internalState.get(key);
};
TraceStateImpl.prototype.serialize = function () {
var _this = this;
return this._keys()
.reduce(function (agg, key) {
agg.push(key + LIST_MEMBER_KEY_VALUE_SPLITTER + _this.get(key));
return agg;
}, [])
.join(LIST_MEMBERS_SEPARATOR);
};
TraceStateImpl.prototype._parse = function (rawTraceState) {
if (rawTraceState.length > MAX_TRACE_STATE_LEN)
return;
this._internalState = rawTraceState
.split(LIST_MEMBERS_SEPARATOR)
.reverse() // Store in reverse so new keys (.set(...)) will be placed at the beginning
.reduce(function (agg, part) {
var listMember = part.trim(); // Optional Whitespace (OWS) handling
var i = listMember.indexOf(LIST_MEMBER_KEY_VALUE_SPLITTER);
if (i !== -1) {
var key = listMember.slice(0, i);
var value = listMember.slice(i + 1, part.length);
if (tracestate_validators_1.validateKey(key) && tracestate_validators_1.validateValue(value)) {
agg.set(key, value);
}
else {
// TODO: Consider to add warning log
}
}
return agg;
}, new Map());
// Because of the reverse() requirement, trunc must be done after map is created
if (this._internalState.size > MAX_TRACE_STATE_ITEMS) {
this._internalState = new Map(Array.from(this._internalState.entries())
.reverse() // Use reverse same as original tracestate parse chain
.slice(0, MAX_TRACE_STATE_ITEMS));
}
};
TraceStateImpl.prototype._keys = function () {
return Array.from(this._internalState.keys()).reverse();
};
TraceStateImpl.prototype._clone = function () {
var traceState = new TraceStateImpl();
traceState._internalState = new Map(this._internalState);
return traceState;
};
return TraceStateImpl;
}());
exports.TraceStateImpl = TraceStateImpl;
//# sourceMappingURL=tracestate-impl.js.map
/***/ }),
/* 757 */, /* 757 */,
/* 758 */, /* 758 */,
/* 759 */, /* 759 */,
@ -48285,7 +49634,7 @@ module.exports = v4;
Object.defineProperty(exports, "__esModule", { value: true }); Object.defineProperty(exports, "__esModule", { value: true });
exports.VERSION = void 0; exports.VERSION = void 0;
// this is autogenerated file, see scripts/version-update.js // this is autogenerated file, see scripts/version-update.js
exports.VERSION = '1.0.4'; exports.VERSION = '1.1.0';
//# sourceMappingURL=version.js.map //# sourceMappingURL=version.js.map
/***/ }), /***/ }),
@ -49576,7 +50925,6 @@ class Poller {
}); });
} }
/** /**
* @internal
* Starts a loop that will break only if the poller is done * Starts a loop that will break only if the poller is done
* or if the poller is stopped. * or if the poller is stopped.
*/ */
@ -49590,7 +50938,6 @@ class Poller {
} }
} }
/** /**
* @internal
* pollOnce does one polling, by calling to the update method of the underlying * pollOnce does one polling, by calling to the update method of the underlying
* poll operation to make any relevant change effective. * poll operation to make any relevant change effective.
* *
@ -49624,7 +50971,6 @@ class Poller {
} }
} }
/** /**
* @internal
* fireProgress calls the functions passed in via onProgress the method of the poller. * fireProgress calls the functions passed in via onProgress the method of the poller.
* *
* It loops over all of the callbacks received from onProgress, and executes them, sending them * It loops over all of the callbacks received from onProgress, and executes them, sending them
@ -49638,7 +50984,6 @@ class Poller {
} }
} }
/** /**
* @internal
* Invokes the underlying operation's cancel method, and rejects the * Invokes the underlying operation's cancel method, and rejects the
* pollUntilDone promise. * pollUntilDone promise.
*/ */
@ -49812,7 +51157,7 @@ class Poller {
*/ */
function getPollingUrl(rawResponse, defaultPath) { function getPollingUrl(rawResponse, defaultPath) {
var _a, _b, _c; var _a, _b, _c;
return ((_c = (_b = (_a = getAzureAsyncOperation(rawResponse)) !== null && _a !== void 0 ? _a : getLocation(rawResponse)) !== null && _b !== void 0 ? _b : getOperationLocation(rawResponse)) !== null && _c !== void 0 ? _c : defaultPath); return ((_c = (_b = (_a = getAzureAsyncOperation(rawResponse)) !== null && _a !== void 0 ? _a : getOperationLocation(rawResponse)) !== null && _b !== void 0 ? _b : getLocation(rawResponse)) !== null && _c !== void 0 ? _c : defaultPath);
} }
function getLocation(rawResponse) { function getLocation(rawResponse) {
return rawResponse.headers["location"]; return rawResponse.headers["location"];
@ -49823,19 +51168,29 @@ function getOperationLocation(rawResponse) {
function getAzureAsyncOperation(rawResponse) { function getAzureAsyncOperation(rawResponse) {
return rawResponse.headers["azure-asyncoperation"]; return rawResponse.headers["azure-asyncoperation"];
} }
function findResourceLocation(requestMethod, rawResponse, requestPath) {
switch (requestMethod) {
case "PUT": {
return requestPath;
}
case "POST":
case "PATCH": {
return getLocation(rawResponse);
}
default: {
return undefined;
}
}
}
function inferLroMode(requestPath, requestMethod, rawResponse) { function inferLroMode(requestPath, requestMethod, rawResponse) {
if (getAzureAsyncOperation(rawResponse) !== undefined) { if (getAzureAsyncOperation(rawResponse) !== undefined ||
getOperationLocation(rawResponse) !== undefined) {
return { return {
mode: "AzureAsync", mode: "Location",
resourceLocation: requestMethod === "PUT" resourceLocation: findResourceLocation(requestMethod, rawResponse, requestPath),
? requestPath
: requestMethod === "POST" || requestMethod === "PATCH"
? getLocation(rawResponse)
: undefined,
}; };
} }
else if (getLocation(rawResponse) !== undefined || else if (getLocation(rawResponse) !== undefined) {
getOperationLocation(rawResponse) !== undefined) {
return { return {
mode: "Location", mode: "Location",
}; };
@ -49905,13 +51260,13 @@ function processBodyPollingOperationResult(response) {
const logger = logger$1.createClientLogger("core-lro"); const logger = logger$1.createClientLogger("core-lro");
// Copyright (c) Microsoft Corporation. // Copyright (c) Microsoft Corporation.
function getResponseStatus(rawResponse) { function isPollingDone(rawResponse) {
var _a; var _a;
if (isUnexpectedPollingResponse(rawResponse) || rawResponse.statusCode === 202) {
return false;
}
const { status } = (_a = rawResponse.body) !== null && _a !== void 0 ? _a : {}; const { status } = (_a = rawResponse.body) !== null && _a !== void 0 ? _a : {};
return typeof status === "string" ? status.toLowerCase() : "succeeded"; const state = typeof status === "string" ? status.toLowerCase() : "succeeded";
}
function isAzureAsyncPollingDone(rawResponse) {
const state = getResponseStatus(rawResponse);
if (isUnexpectedPollingResponse(rawResponse) || failureStates.includes(state)) { if (isUnexpectedPollingResponse(rawResponse) || failureStates.includes(state)) {
throw new Error(`The long running operation has failed. The provisioning state: ${state}.`); throw new Error(`The long running operation has failed. The provisioning state: ${state}.`);
} }
@ -49931,9 +51286,9 @@ async function sendFinalRequest(lro, resourceLocation, lroResourceLocationConfig
return lro.sendPollRequest(resourceLocation !== null && resourceLocation !== void 0 ? resourceLocation : lro.requestPath); return lro.sendPollRequest(resourceLocation !== null && resourceLocation !== void 0 ? resourceLocation : lro.requestPath);
} }
} }
function processAzureAsyncOperationResult(lro, resourceLocation, lroResourceLocationConfig) { function processLocationPollingOperationResult(lro, resourceLocation, lroResourceLocationConfig) {
return (response) => { return (response) => {
if (isAzureAsyncPollingDone(response.rawResponse)) { if (isPollingDone(response.rawResponse)) {
if (resourceLocation === undefined) { if (resourceLocation === undefined) {
return Object.assign(Object.assign({}, response), { done: true }); return Object.assign(Object.assign({}, response), { done: true });
} }
@ -49948,14 +51303,6 @@ function processAzureAsyncOperationResult(lro, resourceLocation, lroResourceLoca
}; };
} }
// Copyright (c) Microsoft Corporation.
function isLocationPollingDone(rawResponse) {
return !isUnexpectedPollingResponse(rawResponse) && rawResponse.statusCode !== 202;
}
function processLocationPollingOperationResult(response) {
return Object.assign(Object.assign({}, response), { done: isLocationPollingDone(response.rawResponse) });
}
// Copyright (c) Microsoft Corporation. // Copyright (c) Microsoft Corporation.
// Licensed under the MIT license. // Licensed under the MIT license.
function processPassthroughOperationResult(response) { function processPassthroughOperationResult(response) {
@ -49968,11 +51315,8 @@ function processPassthroughOperationResult(response) {
*/ */
function createGetLroStatusFromResponse(lroPrimitives, config, lroResourceLocationConfig) { function createGetLroStatusFromResponse(lroPrimitives, config, lroResourceLocationConfig) {
switch (config.mode) { switch (config.mode) {
case "AzureAsync": {
return processAzureAsyncOperationResult(lroPrimitives, config.resourceLocation, lroResourceLocationConfig);
}
case "Location": { case "Location": {
return processLocationPollingOperationResult; return processLocationPollingOperationResult(lroPrimitives, config.resourceLocation, lroResourceLocationConfig);
} }
case "Body": { case "Body": {
return processBodyPollingOperationResult; return processBodyPollingOperationResult;
@ -50513,7 +51857,30 @@ Object.defineProperty(exports, "__esModule", { value: true });
//# sourceMappingURL=attributes.js.map //# sourceMappingURL=attributes.js.map
/***/ }), /***/ }),
/* 907 */, /* 907 */
/***/ (function(__unusedmodule, exports) {
"use strict";
/*
* Copyright The OpenTelemetry Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
Object.defineProperty(exports, "__esModule", { value: true });
//# sourceMappingURL=Attributes.js.map
/***/ }),
/* 908 */, /* 908 */,
/* 909 */, /* 909 */,
/* 910 */ /* 910 */
@ -53428,7 +54795,7 @@ var FormData = __webpack_require__(790);
var node_fetch = __webpack_require__(454); var node_fetch = __webpack_require__(454);
var coreTracing = __webpack_require__(263); var coreTracing = __webpack_require__(263);
var url = __webpack_require__(835); var url = __webpack_require__(835);
__webpack_require__(71); __webpack_require__(97);
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; } function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }

2417
dist/save/index.js vendored
View File

@ -1405,7 +1405,36 @@ exports.default = _default;
/* 39 */, /* 39 */,
/* 40 */, /* 40 */,
/* 41 */, /* 41 */,
/* 42 */, /* 42 */
/***/ (function(__unusedmodule, exports, __webpack_require__) {
"use strict";
/*
* Copyright The OpenTelemetry Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.createTraceState = void 0;
var tracestate_impl_1 = __webpack_require__(756);
function createTraceState(rawTraceState) {
return new tracestate_impl_1.TraceStateImpl(rawTraceState);
}
exports.createTraceState = createTraceState;
//# sourceMappingURL=utils.js.map
/***/ }),
/* 43 */, /* 43 */,
/* 44 */, /* 44 */,
/* 45 */, /* 45 */,
@ -1473,17 +1502,7 @@ exports.parseURL = __webpack_require__(936).parseURL;
/***/ }), /***/ }),
/* 71 */ /* 71 */,
/***/ (function() {
"use strict";
if (typeof Symbol === undefined || !Symbol.asyncIterator) {
Symbol.asyncIterator = Symbol.for("Symbol.asyncIterator");
}
//# sourceMappingURL=index.js.map
/***/ }),
/* 72 */, /* 72 */,
/* 73 */, /* 73 */,
/* 74 */, /* 74 */,
@ -2743,7 +2762,19 @@ Object.defineProperty(exports, "__esModule", { value: true });
/***/ }), /***/ }),
/* 96 */, /* 96 */,
/* 97 */, /* 97 */
/***/ (function() {
"use strict";
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.
if (typeof Symbol === undefined || !Symbol.asyncIterator) {
Symbol.asyncIterator = Symbol.for("Symbol.asyncIterator");
}
//# sourceMappingURL=index.js.map
/***/ }),
/* 98 */, /* 98 */,
/* 99 */, /* 99 */,
/* 100 */, /* 100 */,
@ -4439,7 +4470,7 @@ var NoopTracer_1 = __webpack_require__(151);
var NoopTracerProvider = /** @class */ (function () { var NoopTracerProvider = /** @class */ (function () {
function NoopTracerProvider() { function NoopTracerProvider() {
} }
NoopTracerProvider.prototype.getTracer = function (_name, _version) { NoopTracerProvider.prototype.getTracer = function (_name, _version, _options) {
return new NoopTracer_1.NoopTracer(); return new NoopTracer_1.NoopTracer();
}; };
return NoopTracerProvider; return NoopTracerProvider;
@ -9645,6 +9676,29 @@ var events = __webpack_require__(614);
var fs = __webpack_require__(747); var fs = __webpack_require__(747);
var util = __webpack_require__(669); var util = __webpack_require__(669);
function _interopNamespace(e) {
if (e && e.__esModule) return e;
var n = Object.create(null);
if (e) {
Object.keys(e).forEach(function (k) {
if (k !== 'default') {
var d = Object.getOwnPropertyDescriptor(e, k);
Object.defineProperty(n, k, d.get ? d : {
enumerable: true,
get: function () { return e[k]; }
});
}
});
}
n["default"] = e;
return Object.freeze(n);
}
var coreHttp__namespace = /*#__PURE__*/_interopNamespace(coreHttp);
var os__namespace = /*#__PURE__*/_interopNamespace(os);
var fs__namespace = /*#__PURE__*/_interopNamespace(fs);
var util__namespace = /*#__PURE__*/_interopNamespace(util);
/* /*
* Copyright (c) Microsoft Corporation. * Copyright (c) Microsoft Corporation.
* Licensed under the MIT License. * Licensed under the MIT License.
@ -10599,10 +10653,10 @@ const BlobItemInternal = {
modelProperties: { modelProperties: {
name: { name: {
serializedName: "Name", serializedName: "Name",
required: true,
xmlName: "Name", xmlName: "Name",
type: { type: {
name: "String" name: "Composite",
className: "BlobName"
} }
}, },
deleted: { deleted: {
@ -10677,6 +10731,30 @@ const BlobItemInternal = {
} }
} }
}; };
const BlobName = {
serializedName: "BlobName",
type: {
name: "Composite",
className: "BlobName",
modelProperties: {
encoded: {
serializedName: "Encoded",
xmlName: "Encoded",
xmlIsAttribute: true,
type: {
name: "Boolean"
}
},
content: {
serializedName: "content",
xmlName: "content",
type: {
name: "String"
}
}
}
}
};
const BlobPropertiesInternal = { const BlobPropertiesInternal = {
serializedName: "BlobPropertiesInternal", serializedName: "BlobPropertiesInternal",
xmlName: "Properties", xmlName: "Properties",
@ -11120,10 +11198,10 @@ const BlobPrefix = {
modelProperties: { modelProperties: {
name: { name: {
serializedName: "Name", serializedName: "Name",
required: true,
xmlName: "Name", xmlName: "Name",
type: { type: {
name: "String" name: "Composite",
className: "BlobName"
} }
} }
} }
@ -12746,6 +12824,59 @@ const ContainerSubmitBatchExceptionHeaders = {
} }
} }
}; };
const ContainerFilterBlobsHeaders = {
serializedName: "Container_filterBlobsHeaders",
type: {
name: "Composite",
className: "ContainerFilterBlobsHeaders",
modelProperties: {
clientRequestId: {
serializedName: "x-ms-client-request-id",
xmlName: "x-ms-client-request-id",
type: {
name: "String"
}
},
requestId: {
serializedName: "x-ms-request-id",
xmlName: "x-ms-request-id",
type: {
name: "String"
}
},
version: {
serializedName: "x-ms-version",
xmlName: "x-ms-version",
type: {
name: "String"
}
},
date: {
serializedName: "date",
xmlName: "date",
type: {
name: "DateTimeRfc1123"
}
}
}
}
};
const ContainerFilterBlobsExceptionHeaders = {
serializedName: "Container_filterBlobsExceptionHeaders",
type: {
name: "Composite",
className: "ContainerFilterBlobsExceptionHeaders",
modelProperties: {
errorCode: {
serializedName: "x-ms-error-code",
xmlName: "x-ms-error-code",
type: {
name: "String"
}
}
}
}
};
const ContainerAcquireLeaseHeaders = { const ContainerAcquireLeaseHeaders = {
serializedName: "Container_acquireLeaseHeaders", serializedName: "Container_acquireLeaseHeaders",
type: { type: {
@ -15254,6 +15385,13 @@ const BlobCopyFromURLHeaders = {
name: "ByteArray" name: "ByteArray"
} }
}, },
encryptionScope: {
serializedName: "x-ms-encryption-scope",
xmlName: "x-ms-encryption-scope",
type: {
name: "String"
}
},
errorCode: { errorCode: {
serializedName: "x-ms-error-code", serializedName: "x-ms-error-code",
xmlName: "x-ms-error-code", xmlName: "x-ms-error-code",
@ -17771,6 +17909,7 @@ var Mappers = /*#__PURE__*/Object.freeze({
ListBlobsFlatSegmentResponse: ListBlobsFlatSegmentResponse, ListBlobsFlatSegmentResponse: ListBlobsFlatSegmentResponse,
BlobFlatListSegment: BlobFlatListSegment, BlobFlatListSegment: BlobFlatListSegment,
BlobItemInternal: BlobItemInternal, BlobItemInternal: BlobItemInternal,
BlobName: BlobName,
BlobPropertiesInternal: BlobPropertiesInternal, BlobPropertiesInternal: BlobPropertiesInternal,
ListBlobsHierarchySegmentResponse: ListBlobsHierarchySegmentResponse, ListBlobsHierarchySegmentResponse: ListBlobsHierarchySegmentResponse,
BlobHierarchyListSegment: BlobHierarchyListSegment, BlobHierarchyListSegment: BlobHierarchyListSegment,
@ -17822,6 +17961,8 @@ var Mappers = /*#__PURE__*/Object.freeze({
ContainerRenameExceptionHeaders: ContainerRenameExceptionHeaders, ContainerRenameExceptionHeaders: ContainerRenameExceptionHeaders,
ContainerSubmitBatchHeaders: ContainerSubmitBatchHeaders, ContainerSubmitBatchHeaders: ContainerSubmitBatchHeaders,
ContainerSubmitBatchExceptionHeaders: ContainerSubmitBatchExceptionHeaders, ContainerSubmitBatchExceptionHeaders: ContainerSubmitBatchExceptionHeaders,
ContainerFilterBlobsHeaders: ContainerFilterBlobsHeaders,
ContainerFilterBlobsExceptionHeaders: ContainerFilterBlobsExceptionHeaders,
ContainerAcquireLeaseHeaders: ContainerAcquireLeaseHeaders, ContainerAcquireLeaseHeaders: ContainerAcquireLeaseHeaders,
ContainerAcquireLeaseExceptionHeaders: ContainerAcquireLeaseExceptionHeaders, ContainerAcquireLeaseExceptionHeaders: ContainerAcquireLeaseExceptionHeaders,
ContainerReleaseLeaseHeaders: ContainerReleaseLeaseHeaders, ContainerReleaseLeaseHeaders: ContainerReleaseLeaseHeaders,
@ -18009,7 +18150,7 @@ const timeoutInSeconds = {
const version = { const version = {
parameterPath: "version", parameterPath: "version",
mapper: { mapper: {
defaultValue: "2020-10-02", defaultValue: "2021-04-10",
isConstant: true, isConstant: true,
serializedName: "x-ms-version", serializedName: "x-ms-version",
type: { type: {
@ -18104,7 +18245,7 @@ const include = {
element: { element: {
type: { type: {
name: "Enum", name: "Enum",
allowedValues: ["metadata", "deleted"] allowedValues: ["metadata", "deleted", "system"]
} }
} }
} }
@ -18626,11 +18767,10 @@ const encryptionKeySha256 = {
} }
}; };
const encryptionAlgorithm = { const encryptionAlgorithm = {
parameterPath: ["options", "encryptionAlgorithm"], parameterPath: ["options", "cpkInfo", "encryptionAlgorithm"],
mapper: { mapper: {
defaultValue: "AES256",
isConstant: true,
serializedName: "x-ms-encryption-algorithm", serializedName: "x-ms-encryption-algorithm",
xmlName: "x-ms-encryption-algorithm",
type: { type: {
name: "String" name: "String"
} }
@ -19547,7 +19687,7 @@ class Service {
setProperties(blobServiceProperties, options) { setProperties(blobServiceProperties, options) {
const operationArguments = { const operationArguments = {
blobServiceProperties, blobServiceProperties,
options: coreHttp.operationOptionsToRequestOptionsBase(options || {}) options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
}; };
return this.client.sendOperationRequest(operationArguments, setPropertiesOperationSpec); return this.client.sendOperationRequest(operationArguments, setPropertiesOperationSpec);
} }
@ -19558,9 +19698,9 @@ class Service {
*/ */
getProperties(options) { getProperties(options) {
const operationArguments = { const operationArguments = {
options: coreHttp.operationOptionsToRequestOptionsBase(options || {}) options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
}; };
return this.client.sendOperationRequest(operationArguments, getPropertiesOperationSpec); return this.client.sendOperationRequest(operationArguments, getPropertiesOperationSpec$2);
} }
/** /**
* Retrieves statistics related to replication for the Blob service. It is only available on the * Retrieves statistics related to replication for the Blob service. It is only available on the
@ -19570,7 +19710,7 @@ class Service {
*/ */
getStatistics(options) { getStatistics(options) {
const operationArguments = { const operationArguments = {
options: coreHttp.operationOptionsToRequestOptionsBase(options || {}) options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
}; };
return this.client.sendOperationRequest(operationArguments, getStatisticsOperationSpec); return this.client.sendOperationRequest(operationArguments, getStatisticsOperationSpec);
} }
@ -19580,7 +19720,7 @@ class Service {
*/ */
listContainersSegment(options) { listContainersSegment(options) {
const operationArguments = { const operationArguments = {
options: coreHttp.operationOptionsToRequestOptionsBase(options || {}) options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
}; };
return this.client.sendOperationRequest(operationArguments, listContainersSegmentOperationSpec); return this.client.sendOperationRequest(operationArguments, listContainersSegmentOperationSpec);
} }
@ -19593,7 +19733,7 @@ class Service {
getUserDelegationKey(keyInfo, options) { getUserDelegationKey(keyInfo, options) {
const operationArguments = { const operationArguments = {
keyInfo, keyInfo,
options: coreHttp.operationOptionsToRequestOptionsBase(options || {}) options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
}; };
return this.client.sendOperationRequest(operationArguments, getUserDelegationKeyOperationSpec); return this.client.sendOperationRequest(operationArguments, getUserDelegationKeyOperationSpec);
} }
@ -19603,9 +19743,9 @@ class Service {
*/ */
getAccountInfo(options) { getAccountInfo(options) {
const operationArguments = { const operationArguments = {
options: coreHttp.operationOptionsToRequestOptionsBase(options || {}) options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
}; };
return this.client.sendOperationRequest(operationArguments, getAccountInfoOperationSpec); return this.client.sendOperationRequest(operationArguments, getAccountInfoOperationSpec$2);
} }
/** /**
* The Batch operation allows multiple API calls to be embedded into a single HTTP request. * The Batch operation allows multiple API calls to be embedded into a single HTTP request.
@ -19620,9 +19760,9 @@ class Service {
contentLength, contentLength,
multipartContentType, multipartContentType,
body, body,
options: coreHttp.operationOptionsToRequestOptionsBase(options || {}) options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
}; };
return this.client.sendOperationRequest(operationArguments, submitBatchOperationSpec); return this.client.sendOperationRequest(operationArguments, submitBatchOperationSpec$1);
} }
/** /**
* The Filter Blobs operation enables callers to list blobs across all containers whose tags match a * The Filter Blobs operation enables callers to list blobs across all containers whose tags match a
@ -19632,13 +19772,13 @@ class Service {
*/ */
filterBlobs(options) { filterBlobs(options) {
const operationArguments = { const operationArguments = {
options: coreHttp.operationOptionsToRequestOptionsBase(options || {}) options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
}; };
return this.client.sendOperationRequest(operationArguments, filterBlobsOperationSpec); return this.client.sendOperationRequest(operationArguments, filterBlobsOperationSpec$1);
} }
} }
// Operation Specifications // Operation Specifications
const xmlSerializer = new coreHttp.Serializer(Mappers, /* isXml */ true); const xmlSerializer$5 = new coreHttp__namespace.Serializer(Mappers, /* isXml */ true);
const setPropertiesOperationSpec = { const setPropertiesOperationSpec = {
path: "/", path: "/",
httpMethod: "PUT", httpMethod: "PUT",
@ -19667,9 +19807,9 @@ const setPropertiesOperationSpec = {
isXML: true, isXML: true,
contentType: "application/xml; charset=utf-8", contentType: "application/xml; charset=utf-8",
mediaType: "xml", mediaType: "xml",
serializer: xmlSerializer serializer: xmlSerializer$5
}; };
const getPropertiesOperationSpec = { const getPropertiesOperationSpec$2 = {
path: "/", path: "/",
httpMethod: "GET", httpMethod: "GET",
responses: { responses: {
@ -19694,7 +19834,7 @@ const getPropertiesOperationSpec = {
accept1 accept1
], ],
isXML: true, isXML: true,
serializer: xmlSerializer serializer: xmlSerializer$5
}; };
const getStatisticsOperationSpec = { const getStatisticsOperationSpec = {
path: "/", path: "/",
@ -19721,7 +19861,7 @@ const getStatisticsOperationSpec = {
accept1 accept1
], ],
isXML: true, isXML: true,
serializer: xmlSerializer serializer: xmlSerializer$5
}; };
const listContainersSegmentOperationSpec = { const listContainersSegmentOperationSpec = {
path: "/", path: "/",
@ -19751,7 +19891,7 @@ const listContainersSegmentOperationSpec = {
accept1 accept1
], ],
isXML: true, isXML: true,
serializer: xmlSerializer serializer: xmlSerializer$5
}; };
const getUserDelegationKeyOperationSpec = { const getUserDelegationKeyOperationSpec = {
path: "/", path: "/",
@ -19782,9 +19922,9 @@ const getUserDelegationKeyOperationSpec = {
isXML: true, isXML: true,
contentType: "application/xml; charset=utf-8", contentType: "application/xml; charset=utf-8",
mediaType: "xml", mediaType: "xml",
serializer: xmlSerializer serializer: xmlSerializer$5
}; };
const getAccountInfoOperationSpec = { const getAccountInfoOperationSpec$2 = {
path: "/", path: "/",
httpMethod: "GET", httpMethod: "GET",
responses: { responses: {
@ -19800,9 +19940,9 @@ const getAccountInfoOperationSpec = {
urlParameters: [url], urlParameters: [url],
headerParameters: [version, accept1], headerParameters: [version, accept1],
isXML: true, isXML: true,
serializer: xmlSerializer serializer: xmlSerializer$5
}; };
const submitBatchOperationSpec = { const submitBatchOperationSpec$1 = {
path: "/", path: "/",
httpMethod: "POST", httpMethod: "POST",
responses: { responses: {
@ -19832,9 +19972,9 @@ const submitBatchOperationSpec = {
isXML: true, isXML: true,
contentType: "application/xml; charset=utf-8", contentType: "application/xml; charset=utf-8",
mediaType: "xml", mediaType: "xml",
serializer: xmlSerializer serializer: xmlSerializer$5
}; };
const filterBlobsOperationSpec = { const filterBlobsOperationSpec$1 = {
path: "/", path: "/",
httpMethod: "GET", httpMethod: "GET",
responses: { responses: {
@ -19861,7 +20001,7 @@ const filterBlobsOperationSpec = {
accept1 accept1
], ],
isXML: true, isXML: true,
serializer: xmlSerializer serializer: xmlSerializer$5
}; };
/* /*
@ -19887,9 +20027,9 @@ class Container {
*/ */
create(options) { create(options) {
const operationArguments = { const operationArguments = {
options: coreHttp.operationOptionsToRequestOptionsBase(options || {}) options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
}; };
return this.client.sendOperationRequest(operationArguments, createOperationSpec); return this.client.sendOperationRequest(operationArguments, createOperationSpec$2);
} }
/** /**
* returns all user-defined metadata and system properties for the specified container. The data * returns all user-defined metadata and system properties for the specified container. The data
@ -19898,7 +20038,7 @@ class Container {
*/ */
getProperties(options) { getProperties(options) {
const operationArguments = { const operationArguments = {
options: coreHttp.operationOptionsToRequestOptionsBase(options || {}) options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
}; };
return this.client.sendOperationRequest(operationArguments, getPropertiesOperationSpec$1); return this.client.sendOperationRequest(operationArguments, getPropertiesOperationSpec$1);
} }
@ -19909,9 +20049,9 @@ class Container {
*/ */
delete(options) { delete(options) {
const operationArguments = { const operationArguments = {
options: coreHttp.operationOptionsToRequestOptionsBase(options || {}) options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
}; };
return this.client.sendOperationRequest(operationArguments, deleteOperationSpec); return this.client.sendOperationRequest(operationArguments, deleteOperationSpec$1);
} }
/** /**
* operation sets one or more user-defined name-value pairs for the specified container. * operation sets one or more user-defined name-value pairs for the specified container.
@ -19919,9 +20059,9 @@ class Container {
*/ */
setMetadata(options) { setMetadata(options) {
const operationArguments = { const operationArguments = {
options: coreHttp.operationOptionsToRequestOptionsBase(options || {}) options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
}; };
return this.client.sendOperationRequest(operationArguments, setMetadataOperationSpec); return this.client.sendOperationRequest(operationArguments, setMetadataOperationSpec$1);
} }
/** /**
* gets the permissions for the specified container. The permissions indicate whether container data * gets the permissions for the specified container. The permissions indicate whether container data
@ -19930,7 +20070,7 @@ class Container {
*/ */
getAccessPolicy(options) { getAccessPolicy(options) {
const operationArguments = { const operationArguments = {
options: coreHttp.operationOptionsToRequestOptionsBase(options || {}) options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
}; };
return this.client.sendOperationRequest(operationArguments, getAccessPolicyOperationSpec); return this.client.sendOperationRequest(operationArguments, getAccessPolicyOperationSpec);
} }
@ -19941,7 +20081,7 @@ class Container {
*/ */
setAccessPolicy(options) { setAccessPolicy(options) {
const operationArguments = { const operationArguments = {
options: coreHttp.operationOptionsToRequestOptionsBase(options || {}) options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
}; };
return this.client.sendOperationRequest(operationArguments, setAccessPolicyOperationSpec); return this.client.sendOperationRequest(operationArguments, setAccessPolicyOperationSpec);
} }
@ -19951,7 +20091,7 @@ class Container {
*/ */
restore(options) { restore(options) {
const operationArguments = { const operationArguments = {
options: coreHttp.operationOptionsToRequestOptionsBase(options || {}) options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
}; };
return this.client.sendOperationRequest(operationArguments, restoreOperationSpec); return this.client.sendOperationRequest(operationArguments, restoreOperationSpec);
} }
@ -19963,7 +20103,7 @@ class Container {
rename(sourceContainerName, options) { rename(sourceContainerName, options) {
const operationArguments = { const operationArguments = {
sourceContainerName, sourceContainerName,
options: coreHttp.operationOptionsToRequestOptionsBase(options || {}) options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
}; };
return this.client.sendOperationRequest(operationArguments, renameOperationSpec); return this.client.sendOperationRequest(operationArguments, renameOperationSpec);
} }
@ -19980,9 +20120,20 @@ class Container {
contentLength, contentLength,
multipartContentType, multipartContentType,
body, body,
options: coreHttp.operationOptionsToRequestOptionsBase(options || {}) options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
}; };
return this.client.sendOperationRequest(operationArguments, submitBatchOperationSpec$1); return this.client.sendOperationRequest(operationArguments, submitBatchOperationSpec);
}
/**
* The Filter Blobs operation enables callers to list blobs in a container whose tags match a given
* search expression. Filter blobs searches within the given container.
* @param options The options parameters.
*/
filterBlobs(options) {
const operationArguments = {
options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
};
return this.client.sendOperationRequest(operationArguments, filterBlobsOperationSpec);
} }
/** /**
* [Update] establishes and manages a lock on a container for delete operations. The lock duration can * [Update] establishes and manages a lock on a container for delete operations. The lock duration can
@ -19991,9 +20142,9 @@ class Container {
*/ */
acquireLease(options) { acquireLease(options) {
const operationArguments = { const operationArguments = {
options: coreHttp.operationOptionsToRequestOptionsBase(options || {}) options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
}; };
return this.client.sendOperationRequest(operationArguments, acquireLeaseOperationSpec); return this.client.sendOperationRequest(operationArguments, acquireLeaseOperationSpec$1);
} }
/** /**
* [Update] establishes and manages a lock on a container for delete operations. The lock duration can * [Update] establishes and manages a lock on a container for delete operations. The lock duration can
@ -20004,9 +20155,9 @@ class Container {
releaseLease(leaseId, options) { releaseLease(leaseId, options) {
const operationArguments = { const operationArguments = {
leaseId, leaseId,
options: coreHttp.operationOptionsToRequestOptionsBase(options || {}) options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
}; };
return this.client.sendOperationRequest(operationArguments, releaseLeaseOperationSpec); return this.client.sendOperationRequest(operationArguments, releaseLeaseOperationSpec$1);
} }
/** /**
* [Update] establishes and manages a lock on a container for delete operations. The lock duration can * [Update] establishes and manages a lock on a container for delete operations. The lock duration can
@ -20017,9 +20168,9 @@ class Container {
renewLease(leaseId, options) { renewLease(leaseId, options) {
const operationArguments = { const operationArguments = {
leaseId, leaseId,
options: coreHttp.operationOptionsToRequestOptionsBase(options || {}) options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
}; };
return this.client.sendOperationRequest(operationArguments, renewLeaseOperationSpec); return this.client.sendOperationRequest(operationArguments, renewLeaseOperationSpec$1);
} }
/** /**
* [Update] establishes and manages a lock on a container for delete operations. The lock duration can * [Update] establishes and manages a lock on a container for delete operations. The lock duration can
@ -20028,9 +20179,9 @@ class Container {
*/ */
breakLease(options) { breakLease(options) {
const operationArguments = { const operationArguments = {
options: coreHttp.operationOptionsToRequestOptionsBase(options || {}) options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
}; };
return this.client.sendOperationRequest(operationArguments, breakLeaseOperationSpec); return this.client.sendOperationRequest(operationArguments, breakLeaseOperationSpec$1);
} }
/** /**
* [Update] establishes and manages a lock on a container for delete operations. The lock duration can * [Update] establishes and manages a lock on a container for delete operations. The lock duration can
@ -20045,9 +20196,9 @@ class Container {
const operationArguments = { const operationArguments = {
leaseId, leaseId,
proposedLeaseId, proposedLeaseId,
options: coreHttp.operationOptionsToRequestOptionsBase(options || {}) options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
}; };
return this.client.sendOperationRequest(operationArguments, changeLeaseOperationSpec); return this.client.sendOperationRequest(operationArguments, changeLeaseOperationSpec$1);
} }
/** /**
* [Update] The List Blobs operation returns a list of the blobs under the specified container * [Update] The List Blobs operation returns a list of the blobs under the specified container
@ -20055,7 +20206,7 @@ class Container {
*/ */
listBlobFlatSegment(options) { listBlobFlatSegment(options) {
const operationArguments = { const operationArguments = {
options: coreHttp.operationOptionsToRequestOptionsBase(options || {}) options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
}; };
return this.client.sendOperationRequest(operationArguments, listBlobFlatSegmentOperationSpec); return this.client.sendOperationRequest(operationArguments, listBlobFlatSegmentOperationSpec);
} }
@ -20070,7 +20221,7 @@ class Container {
listBlobHierarchySegment(delimiter, options) { listBlobHierarchySegment(delimiter, options) {
const operationArguments = { const operationArguments = {
delimiter, delimiter,
options: coreHttp.operationOptionsToRequestOptionsBase(options || {}) options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
}; };
return this.client.sendOperationRequest(operationArguments, listBlobHierarchySegmentOperationSpec); return this.client.sendOperationRequest(operationArguments, listBlobHierarchySegmentOperationSpec);
} }
@ -20080,14 +20231,14 @@ class Container {
*/ */
getAccountInfo(options) { getAccountInfo(options) {
const operationArguments = { const operationArguments = {
options: coreHttp.operationOptionsToRequestOptionsBase(options || {}) options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
}; };
return this.client.sendOperationRequest(operationArguments, getAccountInfoOperationSpec$1); return this.client.sendOperationRequest(operationArguments, getAccountInfoOperationSpec$1);
} }
} }
// Operation Specifications // Operation Specifications
const xmlSerializer$1 = new coreHttp.Serializer(Mappers, /* isXml */ true); const xmlSerializer$4 = new coreHttp__namespace.Serializer(Mappers, /* isXml */ true);
const createOperationSpec = { const createOperationSpec$2 = {
path: "/{containerName}", path: "/{containerName}",
httpMethod: "PUT", httpMethod: "PUT",
responses: { responses: {
@ -20111,7 +20262,7 @@ const createOperationSpec = {
preventEncryptionScopeOverride preventEncryptionScopeOverride
], ],
isXML: true, isXML: true,
serializer: xmlSerializer$1 serializer: xmlSerializer$4
}; };
const getPropertiesOperationSpec$1 = { const getPropertiesOperationSpec$1 = {
path: "/{containerName}", path: "/{containerName}",
@ -20134,9 +20285,9 @@ const getPropertiesOperationSpec$1 = {
leaseId leaseId
], ],
isXML: true, isXML: true,
serializer: xmlSerializer$1 serializer: xmlSerializer$4
}; };
const deleteOperationSpec = { const deleteOperationSpec$1 = {
path: "/{containerName}", path: "/{containerName}",
httpMethod: "DELETE", httpMethod: "DELETE",
responses: { responses: {
@ -20159,9 +20310,9 @@ const deleteOperationSpec = {
ifUnmodifiedSince ifUnmodifiedSince
], ],
isXML: true, isXML: true,
serializer: xmlSerializer$1 serializer: xmlSerializer$4
}; };
const setMetadataOperationSpec = { const setMetadataOperationSpec$1 = {
path: "/{containerName}", path: "/{containerName}",
httpMethod: "PUT", httpMethod: "PUT",
responses: { responses: {
@ -20188,7 +20339,7 @@ const setMetadataOperationSpec = {
ifModifiedSince ifModifiedSince
], ],
isXML: true, isXML: true,
serializer: xmlSerializer$1 serializer: xmlSerializer$4
}; };
const getAccessPolicyOperationSpec = { const getAccessPolicyOperationSpec = {
path: "/{containerName}", path: "/{containerName}",
@ -20227,7 +20378,7 @@ const getAccessPolicyOperationSpec = {
leaseId leaseId
], ],
isXML: true, isXML: true,
serializer: xmlSerializer$1 serializer: xmlSerializer$4
}; };
const setAccessPolicyOperationSpec = { const setAccessPolicyOperationSpec = {
path: "/{containerName}", path: "/{containerName}",
@ -20261,7 +20412,7 @@ const setAccessPolicyOperationSpec = {
isXML: true, isXML: true,
contentType: "application/xml; charset=utf-8", contentType: "application/xml; charset=utf-8",
mediaType: "xml", mediaType: "xml",
serializer: xmlSerializer$1 serializer: xmlSerializer$4
}; };
const restoreOperationSpec = { const restoreOperationSpec = {
path: "/{containerName}", path: "/{containerName}",
@ -20289,7 +20440,7 @@ const restoreOperationSpec = {
deletedContainerVersion deletedContainerVersion
], ],
isXML: true, isXML: true,
serializer: xmlSerializer$1 serializer: xmlSerializer$4
}; };
const renameOperationSpec = { const renameOperationSpec = {
path: "/{containerName}", path: "/{containerName}",
@ -20317,9 +20468,9 @@ const renameOperationSpec = {
sourceLeaseId sourceLeaseId
], ],
isXML: true, isXML: true,
serializer: xmlSerializer$1 serializer: xmlSerializer$4
}; };
const submitBatchOperationSpec$1 = { const submitBatchOperationSpec = {
path: "/{containerName}", path: "/{containerName}",
httpMethod: "POST", httpMethod: "POST",
responses: { responses: {
@ -20353,9 +20504,39 @@ const submitBatchOperationSpec$1 = {
isXML: true, isXML: true,
contentType: "application/xml; charset=utf-8", contentType: "application/xml; charset=utf-8",
mediaType: "xml", mediaType: "xml",
serializer: xmlSerializer$1 serializer: xmlSerializer$4
}; };
const acquireLeaseOperationSpec = { const filterBlobsOperationSpec = {
path: "/{containerName}",
httpMethod: "GET",
responses: {
200: {
bodyMapper: FilterBlobSegment,
headersMapper: ContainerFilterBlobsHeaders
},
default: {
bodyMapper: StorageError,
headersMapper: ContainerFilterBlobsExceptionHeaders
}
},
queryParameters: [
timeoutInSeconds,
marker,
maxPageSize,
comp5,
where,
restype2
],
urlParameters: [url],
headerParameters: [
version,
requestId,
accept1
],
isXML: true,
serializer: xmlSerializer$4
};
const acquireLeaseOperationSpec$1 = {
path: "/{containerName}", path: "/{containerName}",
httpMethod: "PUT", httpMethod: "PUT",
responses: { responses: {
@ -20384,9 +20565,9 @@ const acquireLeaseOperationSpec = {
proposedLeaseId proposedLeaseId
], ],
isXML: true, isXML: true,
serializer: xmlSerializer$1 serializer: xmlSerializer$4
}; };
const releaseLeaseOperationSpec = { const releaseLeaseOperationSpec$1 = {
path: "/{containerName}", path: "/{containerName}",
httpMethod: "PUT", httpMethod: "PUT",
responses: { responses: {
@ -20414,9 +20595,9 @@ const releaseLeaseOperationSpec = {
leaseId1 leaseId1
], ],
isXML: true, isXML: true,
serializer: xmlSerializer$1 serializer: xmlSerializer$4
}; };
const renewLeaseOperationSpec = { const renewLeaseOperationSpec$1 = {
path: "/{containerName}", path: "/{containerName}",
httpMethod: "PUT", httpMethod: "PUT",
responses: { responses: {
@ -20444,9 +20625,9 @@ const renewLeaseOperationSpec = {
action2 action2
], ],
isXML: true, isXML: true,
serializer: xmlSerializer$1 serializer: xmlSerializer$4
}; };
const breakLeaseOperationSpec = { const breakLeaseOperationSpec$1 = {
path: "/{containerName}", path: "/{containerName}",
httpMethod: "PUT", httpMethod: "PUT",
responses: { responses: {
@ -20474,9 +20655,9 @@ const breakLeaseOperationSpec = {
breakPeriod breakPeriod
], ],
isXML: true, isXML: true,
serializer: xmlSerializer$1 serializer: xmlSerializer$4
}; };
const changeLeaseOperationSpec = { const changeLeaseOperationSpec$1 = {
path: "/{containerName}", path: "/{containerName}",
httpMethod: "PUT", httpMethod: "PUT",
responses: { responses: {
@ -20505,7 +20686,7 @@ const changeLeaseOperationSpec = {
proposedLeaseId1 proposedLeaseId1
], ],
isXML: true, isXML: true,
serializer: xmlSerializer$1 serializer: xmlSerializer$4
}; };
const listBlobFlatSegmentOperationSpec = { const listBlobFlatSegmentOperationSpec = {
path: "/{containerName}", path: "/{containerName}",
@ -20536,7 +20717,7 @@ const listBlobFlatSegmentOperationSpec = {
accept1 accept1
], ],
isXML: true, isXML: true,
serializer: xmlSerializer$1 serializer: xmlSerializer$4
}; };
const listBlobHierarchySegmentOperationSpec = { const listBlobHierarchySegmentOperationSpec = {
path: "/{containerName}", path: "/{containerName}",
@ -20568,7 +20749,7 @@ const listBlobHierarchySegmentOperationSpec = {
accept1 accept1
], ],
isXML: true, isXML: true,
serializer: xmlSerializer$1 serializer: xmlSerializer$4
}; };
const getAccountInfoOperationSpec$1 = { const getAccountInfoOperationSpec$1 = {
path: "/{containerName}", path: "/{containerName}",
@ -20586,7 +20767,7 @@ const getAccountInfoOperationSpec$1 = {
urlParameters: [url], urlParameters: [url],
headerParameters: [version, accept1], headerParameters: [version, accept1],
isXML: true, isXML: true,
serializer: xmlSerializer$1 serializer: xmlSerializer$4
}; };
/* /*
@ -20612,7 +20793,7 @@ class Blob$1 {
*/ */
download(options) { download(options) {
const operationArguments = { const operationArguments = {
options: coreHttp.operationOptionsToRequestOptionsBase(options || {}) options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
}; };
return this.client.sendOperationRequest(operationArguments, downloadOperationSpec); return this.client.sendOperationRequest(operationArguments, downloadOperationSpec);
} }
@ -20623,9 +20804,9 @@ class Blob$1 {
*/ */
getProperties(options) { getProperties(options) {
const operationArguments = { const operationArguments = {
options: coreHttp.operationOptionsToRequestOptionsBase(options || {}) options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
}; };
return this.client.sendOperationRequest(operationArguments, getPropertiesOperationSpec$2); return this.client.sendOperationRequest(operationArguments, getPropertiesOperationSpec);
} }
/** /**
* If the storage account's soft delete feature is disabled then, when a blob is deleted, it is * If the storage account's soft delete feature is disabled then, when a blob is deleted, it is
@ -20644,9 +20825,9 @@ class Blob$1 {
*/ */
delete(options) { delete(options) {
const operationArguments = { const operationArguments = {
options: coreHttp.operationOptionsToRequestOptionsBase(options || {}) options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
}; };
return this.client.sendOperationRequest(operationArguments, deleteOperationSpec$1); return this.client.sendOperationRequest(operationArguments, deleteOperationSpec);
} }
/** /**
* Undelete a blob that was previously soft deleted * Undelete a blob that was previously soft deleted
@ -20654,7 +20835,7 @@ class Blob$1 {
*/ */
undelete(options) { undelete(options) {
const operationArguments = { const operationArguments = {
options: coreHttp.operationOptionsToRequestOptionsBase(options || {}) options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
}; };
return this.client.sendOperationRequest(operationArguments, undeleteOperationSpec); return this.client.sendOperationRequest(operationArguments, undeleteOperationSpec);
} }
@ -20666,7 +20847,7 @@ class Blob$1 {
setExpiry(expiryOptions, options) { setExpiry(expiryOptions, options) {
const operationArguments = { const operationArguments = {
expiryOptions, expiryOptions,
options: coreHttp.operationOptionsToRequestOptionsBase(options || {}) options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
}; };
return this.client.sendOperationRequest(operationArguments, setExpiryOperationSpec); return this.client.sendOperationRequest(operationArguments, setExpiryOperationSpec);
} }
@ -20676,7 +20857,7 @@ class Blob$1 {
*/ */
setHttpHeaders(options) { setHttpHeaders(options) {
const operationArguments = { const operationArguments = {
options: coreHttp.operationOptionsToRequestOptionsBase(options || {}) options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
}; };
return this.client.sendOperationRequest(operationArguments, setHttpHeadersOperationSpec); return this.client.sendOperationRequest(operationArguments, setHttpHeadersOperationSpec);
} }
@ -20686,7 +20867,7 @@ class Blob$1 {
*/ */
setImmutabilityPolicy(options) { setImmutabilityPolicy(options) {
const operationArguments = { const operationArguments = {
options: coreHttp.operationOptionsToRequestOptionsBase(options || {}) options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
}; };
return this.client.sendOperationRequest(operationArguments, setImmutabilityPolicyOperationSpec); return this.client.sendOperationRequest(operationArguments, setImmutabilityPolicyOperationSpec);
} }
@ -20696,7 +20877,7 @@ class Blob$1 {
*/ */
deleteImmutabilityPolicy(options) { deleteImmutabilityPolicy(options) {
const operationArguments = { const operationArguments = {
options: coreHttp.operationOptionsToRequestOptionsBase(options || {}) options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
}; };
return this.client.sendOperationRequest(operationArguments, deleteImmutabilityPolicyOperationSpec); return this.client.sendOperationRequest(operationArguments, deleteImmutabilityPolicyOperationSpec);
} }
@ -20708,7 +20889,7 @@ class Blob$1 {
setLegalHold(legalHold, options) { setLegalHold(legalHold, options) {
const operationArguments = { const operationArguments = {
legalHold, legalHold,
options: coreHttp.operationOptionsToRequestOptionsBase(options || {}) options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
}; };
return this.client.sendOperationRequest(operationArguments, setLegalHoldOperationSpec); return this.client.sendOperationRequest(operationArguments, setLegalHoldOperationSpec);
} }
@ -20719,9 +20900,9 @@ class Blob$1 {
*/ */
setMetadata(options) { setMetadata(options) {
const operationArguments = { const operationArguments = {
options: coreHttp.operationOptionsToRequestOptionsBase(options || {}) options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
}; };
return this.client.sendOperationRequest(operationArguments, setMetadataOperationSpec$1); return this.client.sendOperationRequest(operationArguments, setMetadataOperationSpec);
} }
/** /**
* [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete * [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete
@ -20730,9 +20911,9 @@ class Blob$1 {
*/ */
acquireLease(options) { acquireLease(options) {
const operationArguments = { const operationArguments = {
options: coreHttp.operationOptionsToRequestOptionsBase(options || {}) options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
}; };
return this.client.sendOperationRequest(operationArguments, acquireLeaseOperationSpec$1); return this.client.sendOperationRequest(operationArguments, acquireLeaseOperationSpec);
} }
/** /**
* [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete * [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete
@ -20743,9 +20924,9 @@ class Blob$1 {
releaseLease(leaseId, options) { releaseLease(leaseId, options) {
const operationArguments = { const operationArguments = {
leaseId, leaseId,
options: coreHttp.operationOptionsToRequestOptionsBase(options || {}) options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
}; };
return this.client.sendOperationRequest(operationArguments, releaseLeaseOperationSpec$1); return this.client.sendOperationRequest(operationArguments, releaseLeaseOperationSpec);
} }
/** /**
* [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete * [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete
@ -20756,9 +20937,9 @@ class Blob$1 {
renewLease(leaseId, options) { renewLease(leaseId, options) {
const operationArguments = { const operationArguments = {
leaseId, leaseId,
options: coreHttp.operationOptionsToRequestOptionsBase(options || {}) options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
}; };
return this.client.sendOperationRequest(operationArguments, renewLeaseOperationSpec$1); return this.client.sendOperationRequest(operationArguments, renewLeaseOperationSpec);
} }
/** /**
* [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete * [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete
@ -20773,9 +20954,9 @@ class Blob$1 {
const operationArguments = { const operationArguments = {
leaseId, leaseId,
proposedLeaseId, proposedLeaseId,
options: coreHttp.operationOptionsToRequestOptionsBase(options || {}) options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
}; };
return this.client.sendOperationRequest(operationArguments, changeLeaseOperationSpec$1); return this.client.sendOperationRequest(operationArguments, changeLeaseOperationSpec);
} }
/** /**
* [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete * [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete
@ -20784,9 +20965,9 @@ class Blob$1 {
*/ */
breakLease(options) { breakLease(options) {
const operationArguments = { const operationArguments = {
options: coreHttp.operationOptionsToRequestOptionsBase(options || {}) options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
}; };
return this.client.sendOperationRequest(operationArguments, breakLeaseOperationSpec$1); return this.client.sendOperationRequest(operationArguments, breakLeaseOperationSpec);
} }
/** /**
* The Create Snapshot operation creates a read-only snapshot of a blob * The Create Snapshot operation creates a read-only snapshot of a blob
@ -20794,7 +20975,7 @@ class Blob$1 {
*/ */
createSnapshot(options) { createSnapshot(options) {
const operationArguments = { const operationArguments = {
options: coreHttp.operationOptionsToRequestOptionsBase(options || {}) options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
}; };
return this.client.sendOperationRequest(operationArguments, createSnapshotOperationSpec); return this.client.sendOperationRequest(operationArguments, createSnapshotOperationSpec);
} }
@ -20809,7 +20990,7 @@ class Blob$1 {
startCopyFromURL(copySource, options) { startCopyFromURL(copySource, options) {
const operationArguments = { const operationArguments = {
copySource, copySource,
options: coreHttp.operationOptionsToRequestOptionsBase(options || {}) options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
}; };
return this.client.sendOperationRequest(operationArguments, startCopyFromURLOperationSpec); return this.client.sendOperationRequest(operationArguments, startCopyFromURLOperationSpec);
} }
@ -20825,7 +21006,7 @@ class Blob$1 {
copyFromURL(copySource, options) { copyFromURL(copySource, options) {
const operationArguments = { const operationArguments = {
copySource, copySource,
options: coreHttp.operationOptionsToRequestOptionsBase(options || {}) options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
}; };
return this.client.sendOperationRequest(operationArguments, copyFromURLOperationSpec); return this.client.sendOperationRequest(operationArguments, copyFromURLOperationSpec);
} }
@ -20839,7 +21020,7 @@ class Blob$1 {
abortCopyFromURL(copyId, options) { abortCopyFromURL(copyId, options) {
const operationArguments = { const operationArguments = {
copyId, copyId,
options: coreHttp.operationOptionsToRequestOptionsBase(options || {}) options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
}; };
return this.client.sendOperationRequest(operationArguments, abortCopyFromURLOperationSpec); return this.client.sendOperationRequest(operationArguments, abortCopyFromURLOperationSpec);
} }
@ -20855,7 +21036,7 @@ class Blob$1 {
setTier(tier, options) { setTier(tier, options) {
const operationArguments = { const operationArguments = {
tier, tier,
options: coreHttp.operationOptionsToRequestOptionsBase(options || {}) options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
}; };
return this.client.sendOperationRequest(operationArguments, setTierOperationSpec); return this.client.sendOperationRequest(operationArguments, setTierOperationSpec);
} }
@ -20865,9 +21046,9 @@ class Blob$1 {
*/ */
getAccountInfo(options) { getAccountInfo(options) {
const operationArguments = { const operationArguments = {
options: coreHttp.operationOptionsToRequestOptionsBase(options || {}) options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
}; };
return this.client.sendOperationRequest(operationArguments, getAccountInfoOperationSpec$2); return this.client.sendOperationRequest(operationArguments, getAccountInfoOperationSpec);
} }
/** /**
* The Query operation enables users to select/project on blob data by providing simple query * The Query operation enables users to select/project on blob data by providing simple query
@ -20876,7 +21057,7 @@ class Blob$1 {
*/ */
query(options) { query(options) {
const operationArguments = { const operationArguments = {
options: coreHttp.operationOptionsToRequestOptionsBase(options || {}) options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
}; };
return this.client.sendOperationRequest(operationArguments, queryOperationSpec); return this.client.sendOperationRequest(operationArguments, queryOperationSpec);
} }
@ -20886,7 +21067,7 @@ class Blob$1 {
*/ */
getTags(options) { getTags(options) {
const operationArguments = { const operationArguments = {
options: coreHttp.operationOptionsToRequestOptionsBase(options || {}) options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
}; };
return this.client.sendOperationRequest(operationArguments, getTagsOperationSpec); return this.client.sendOperationRequest(operationArguments, getTagsOperationSpec);
} }
@ -20896,13 +21077,13 @@ class Blob$1 {
*/ */
setTags(options) { setTags(options) {
const operationArguments = { const operationArguments = {
options: coreHttp.operationOptionsToRequestOptionsBase(options || {}) options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
}; };
return this.client.sendOperationRequest(operationArguments, setTagsOperationSpec); return this.client.sendOperationRequest(operationArguments, setTagsOperationSpec);
} }
} }
// Operation Specifications // Operation Specifications
const xmlSerializer$2 = new coreHttp.Serializer(Mappers, /* isXml */ true); const xmlSerializer$3 = new coreHttp__namespace.Serializer(Mappers, /* isXml */ true);
const downloadOperationSpec = { const downloadOperationSpec = {
path: "/{containerName}/{blob}", path: "/{containerName}/{blob}",
httpMethod: "GET", httpMethod: "GET",
@ -20950,9 +21131,9 @@ const downloadOperationSpec = {
ifTags ifTags
], ],
isXML: true, isXML: true,
serializer: xmlSerializer$2 serializer: xmlSerializer$3
}; };
const getPropertiesOperationSpec$2 = { const getPropertiesOperationSpec = {
path: "/{containerName}/{blob}", path: "/{containerName}/{blob}",
httpMethod: "HEAD", httpMethod: "HEAD",
responses: { responses: {
@ -20985,9 +21166,9 @@ const getPropertiesOperationSpec$2 = {
ifTags ifTags
], ],
isXML: true, isXML: true,
serializer: xmlSerializer$2 serializer: xmlSerializer$3
}; };
const deleteOperationSpec$1 = { const deleteOperationSpec = {
path: "/{containerName}/{blob}", path: "/{containerName}/{blob}",
httpMethod: "DELETE", httpMethod: "DELETE",
responses: { responses: {
@ -21019,7 +21200,7 @@ const deleteOperationSpec$1 = {
deleteSnapshots deleteSnapshots
], ],
isXML: true, isXML: true,
serializer: xmlSerializer$2 serializer: xmlSerializer$3
}; };
const undeleteOperationSpec = { const undeleteOperationSpec = {
path: "/{containerName}/{blob}", path: "/{containerName}/{blob}",
@ -21041,7 +21222,7 @@ const undeleteOperationSpec = {
accept1 accept1
], ],
isXML: true, isXML: true,
serializer: xmlSerializer$2 serializer: xmlSerializer$3
}; };
const setExpiryOperationSpec = { const setExpiryOperationSpec = {
path: "/{containerName}/{blob}", path: "/{containerName}/{blob}",
@ -21065,7 +21246,7 @@ const setExpiryOperationSpec = {
expiresOn expiresOn
], ],
isXML: true, isXML: true,
serializer: xmlSerializer$2 serializer: xmlSerializer$3
}; };
const setHttpHeadersOperationSpec = { const setHttpHeadersOperationSpec = {
path: "/{containerName}/{blob}", path: "/{containerName}/{blob}",
@ -21099,7 +21280,7 @@ const setHttpHeadersOperationSpec = {
blobContentDisposition blobContentDisposition
], ],
isXML: true, isXML: true,
serializer: xmlSerializer$2 serializer: xmlSerializer$3
}; };
const setImmutabilityPolicyOperationSpec = { const setImmutabilityPolicyOperationSpec = {
path: "/{containerName}/{blob}", path: "/{containerName}/{blob}",
@ -21124,7 +21305,7 @@ const setImmutabilityPolicyOperationSpec = {
immutabilityPolicyMode immutabilityPolicyMode
], ],
isXML: true, isXML: true,
serializer: xmlSerializer$2 serializer: xmlSerializer$3
}; };
const deleteImmutabilityPolicyOperationSpec = { const deleteImmutabilityPolicyOperationSpec = {
path: "/{containerName}/{blob}", path: "/{containerName}/{blob}",
@ -21146,7 +21327,7 @@ const deleteImmutabilityPolicyOperationSpec = {
accept1 accept1
], ],
isXML: true, isXML: true,
serializer: xmlSerializer$2 serializer: xmlSerializer$3
}; };
const setLegalHoldOperationSpec = { const setLegalHoldOperationSpec = {
path: "/{containerName}/{blob}", path: "/{containerName}/{blob}",
@ -21169,9 +21350,9 @@ const setLegalHoldOperationSpec = {
legalHold legalHold
], ],
isXML: true, isXML: true,
serializer: xmlSerializer$2 serializer: xmlSerializer$3
}; };
const setMetadataOperationSpec$1 = { const setMetadataOperationSpec = {
path: "/{containerName}/{blob}", path: "/{containerName}/{blob}",
httpMethod: "PUT", httpMethod: "PUT",
responses: { responses: {
@ -21202,9 +21383,9 @@ const setMetadataOperationSpec$1 = {
encryptionScope encryptionScope
], ],
isXML: true, isXML: true,
serializer: xmlSerializer$2 serializer: xmlSerializer$3
}; };
const acquireLeaseOperationSpec$1 = { const acquireLeaseOperationSpec = {
path: "/{containerName}/{blob}", path: "/{containerName}/{blob}",
httpMethod: "PUT", httpMethod: "PUT",
responses: { responses: {
@ -21232,9 +21413,9 @@ const acquireLeaseOperationSpec$1 = {
ifTags ifTags
], ],
isXML: true, isXML: true,
serializer: xmlSerializer$2 serializer: xmlSerializer$3
}; };
const releaseLeaseOperationSpec$1 = { const releaseLeaseOperationSpec = {
path: "/{containerName}/{blob}", path: "/{containerName}/{blob}",
httpMethod: "PUT", httpMethod: "PUT",
responses: { responses: {
@ -21261,9 +21442,9 @@ const releaseLeaseOperationSpec$1 = {
ifTags ifTags
], ],
isXML: true, isXML: true,
serializer: xmlSerializer$2 serializer: xmlSerializer$3
}; };
const renewLeaseOperationSpec$1 = { const renewLeaseOperationSpec = {
path: "/{containerName}/{blob}", path: "/{containerName}/{blob}",
httpMethod: "PUT", httpMethod: "PUT",
responses: { responses: {
@ -21290,9 +21471,9 @@ const renewLeaseOperationSpec$1 = {
ifTags ifTags
], ],
isXML: true, isXML: true,
serializer: xmlSerializer$2 serializer: xmlSerializer$3
}; };
const changeLeaseOperationSpec$1 = { const changeLeaseOperationSpec = {
path: "/{containerName}/{blob}", path: "/{containerName}/{blob}",
httpMethod: "PUT", httpMethod: "PUT",
responses: { responses: {
@ -21320,9 +21501,9 @@ const changeLeaseOperationSpec$1 = {
ifTags ifTags
], ],
isXML: true, isXML: true,
serializer: xmlSerializer$2 serializer: xmlSerializer$3
}; };
const breakLeaseOperationSpec$1 = { const breakLeaseOperationSpec = {
path: "/{containerName}/{blob}", path: "/{containerName}/{blob}",
httpMethod: "PUT", httpMethod: "PUT",
responses: { responses: {
@ -21349,7 +21530,7 @@ const breakLeaseOperationSpec$1 = {
ifTags ifTags
], ],
isXML: true, isXML: true,
serializer: xmlSerializer$2 serializer: xmlSerializer$3
}; };
const createSnapshotOperationSpec = { const createSnapshotOperationSpec = {
path: "/{containerName}/{blob}", path: "/{containerName}/{blob}",
@ -21382,7 +21563,7 @@ const createSnapshotOperationSpec = {
encryptionScope encryptionScope
], ],
isXML: true, isXML: true,
serializer: xmlSerializer$2 serializer: xmlSerializer$3
}; };
const startCopyFromURLOperationSpec = { const startCopyFromURLOperationSpec = {
path: "/{containerName}/{blob}", path: "/{containerName}/{blob}",
@ -21424,7 +21605,7 @@ const startCopyFromURLOperationSpec = {
legalHold1 legalHold1
], ],
isXML: true, isXML: true,
serializer: xmlSerializer$2 serializer: xmlSerializer$3
}; };
const copyFromURLOperationSpec = { const copyFromURLOperationSpec = {
path: "/{containerName}/{blob}", path: "/{containerName}/{blob}",
@ -21453,6 +21634,7 @@ const copyFromURLOperationSpec = {
ifTags, ifTags,
immutabilityPolicyExpiry, immutabilityPolicyExpiry,
immutabilityPolicyMode, immutabilityPolicyMode,
encryptionScope,
tier, tier,
sourceIfModifiedSince, sourceIfModifiedSince,
sourceIfUnmodifiedSince, sourceIfUnmodifiedSince,
@ -21466,7 +21648,7 @@ const copyFromURLOperationSpec = {
copySourceAuthorization copySourceAuthorization
], ],
isXML: true, isXML: true,
serializer: xmlSerializer$2 serializer: xmlSerializer$3
}; };
const abortCopyFromURLOperationSpec = { const abortCopyFromURLOperationSpec = {
path: "/{containerName}/{blob}", path: "/{containerName}/{blob}",
@ -21494,7 +21676,7 @@ const abortCopyFromURLOperationSpec = {
copyActionAbortConstant copyActionAbortConstant
], ],
isXML: true, isXML: true,
serializer: xmlSerializer$2 serializer: xmlSerializer$3
}; };
const setTierOperationSpec = { const setTierOperationSpec = {
path: "/{containerName}/{blob}", path: "/{containerName}/{blob}",
@ -21528,9 +21710,9 @@ const setTierOperationSpec = {
tier1 tier1
], ],
isXML: true, isXML: true,
serializer: xmlSerializer$2 serializer: xmlSerializer$3
}; };
const getAccountInfoOperationSpec$2 = { const getAccountInfoOperationSpec = {
path: "/{containerName}/{blob}", path: "/{containerName}/{blob}",
httpMethod: "GET", httpMethod: "GET",
responses: { responses: {
@ -21546,7 +21728,7 @@ const getAccountInfoOperationSpec$2 = {
urlParameters: [url], urlParameters: [url],
headerParameters: [version, accept1], headerParameters: [version, accept1],
isXML: true, isXML: true,
serializer: xmlSerializer$2 serializer: xmlSerializer$3
}; };
const queryOperationSpec = { const queryOperationSpec = {
path: "/{containerName}/{blob}", path: "/{containerName}/{blob}",
@ -21596,7 +21778,7 @@ const queryOperationSpec = {
isXML: true, isXML: true,
contentType: "application/xml; charset=utf-8", contentType: "application/xml; charset=utf-8",
mediaType: "xml", mediaType: "xml",
serializer: xmlSerializer$2 serializer: xmlSerializer$3
}; };
const getTagsOperationSpec = { const getTagsOperationSpec = {
path: "/{containerName}/{blob}", path: "/{containerName}/{blob}",
@ -21626,7 +21808,7 @@ const getTagsOperationSpec = {
ifTags ifTags
], ],
isXML: true, isXML: true,
serializer: xmlSerializer$2 serializer: xmlSerializer$3
}; };
const setTagsOperationSpec = { const setTagsOperationSpec = {
path: "/{containerName}/{blob}", path: "/{containerName}/{blob}",
@ -21660,7 +21842,7 @@ const setTagsOperationSpec = {
isXML: true, isXML: true,
contentType: "application/xml; charset=utf-8", contentType: "application/xml; charset=utf-8",
mediaType: "xml", mediaType: "xml",
serializer: xmlSerializer$2 serializer: xmlSerializer$3
}; };
/* /*
@ -21690,7 +21872,7 @@ class PageBlob {
const operationArguments = { const operationArguments = {
contentLength, contentLength,
blobContentLength, blobContentLength,
options: coreHttp.operationOptionsToRequestOptionsBase(options || {}) options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
}; };
return this.client.sendOperationRequest(operationArguments, createOperationSpec$1); return this.client.sendOperationRequest(operationArguments, createOperationSpec$1);
} }
@ -21704,7 +21886,7 @@ class PageBlob {
const operationArguments = { const operationArguments = {
contentLength, contentLength,
body, body,
options: coreHttp.operationOptionsToRequestOptionsBase(options || {}) options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
}; };
return this.client.sendOperationRequest(operationArguments, uploadPagesOperationSpec); return this.client.sendOperationRequest(operationArguments, uploadPagesOperationSpec);
} }
@ -21716,7 +21898,7 @@ class PageBlob {
clearPages(contentLength, options) { clearPages(contentLength, options) {
const operationArguments = { const operationArguments = {
contentLength, contentLength,
options: coreHttp.operationOptionsToRequestOptionsBase(options || {}) options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
}; };
return this.client.sendOperationRequest(operationArguments, clearPagesOperationSpec); return this.client.sendOperationRequest(operationArguments, clearPagesOperationSpec);
} }
@ -21737,7 +21919,7 @@ class PageBlob {
sourceRange, sourceRange,
contentLength, contentLength,
range, range,
options: coreHttp.operationOptionsToRequestOptionsBase(options || {}) options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
}; };
return this.client.sendOperationRequest(operationArguments, uploadPagesFromURLOperationSpec); return this.client.sendOperationRequest(operationArguments, uploadPagesFromURLOperationSpec);
} }
@ -21748,7 +21930,7 @@ class PageBlob {
*/ */
getPageRanges(options) { getPageRanges(options) {
const operationArguments = { const operationArguments = {
options: coreHttp.operationOptionsToRequestOptionsBase(options || {}) options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
}; };
return this.client.sendOperationRequest(operationArguments, getPageRangesOperationSpec); return this.client.sendOperationRequest(operationArguments, getPageRangesOperationSpec);
} }
@ -21759,7 +21941,7 @@ class PageBlob {
*/ */
getPageRangesDiff(options) { getPageRangesDiff(options) {
const operationArguments = { const operationArguments = {
options: coreHttp.operationOptionsToRequestOptionsBase(options || {}) options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
}; };
return this.client.sendOperationRequest(operationArguments, getPageRangesDiffOperationSpec); return this.client.sendOperationRequest(operationArguments, getPageRangesDiffOperationSpec);
} }
@ -21772,7 +21954,7 @@ class PageBlob {
resize(blobContentLength, options) { resize(blobContentLength, options) {
const operationArguments = { const operationArguments = {
blobContentLength, blobContentLength,
options: coreHttp.operationOptionsToRequestOptionsBase(options || {}) options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
}; };
return this.client.sendOperationRequest(operationArguments, resizeOperationSpec); return this.client.sendOperationRequest(operationArguments, resizeOperationSpec);
} }
@ -21786,7 +21968,7 @@ class PageBlob {
updateSequenceNumber(sequenceNumberAction, options) { updateSequenceNumber(sequenceNumberAction, options) {
const operationArguments = { const operationArguments = {
sequenceNumberAction, sequenceNumberAction,
options: coreHttp.operationOptionsToRequestOptionsBase(options || {}) options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
}; };
return this.client.sendOperationRequest(operationArguments, updateSequenceNumberOperationSpec); return this.client.sendOperationRequest(operationArguments, updateSequenceNumberOperationSpec);
} }
@ -21805,14 +21987,14 @@ class PageBlob {
copyIncremental(copySource, options) { copyIncremental(copySource, options) {
const operationArguments = { const operationArguments = {
copySource, copySource,
options: coreHttp.operationOptionsToRequestOptionsBase(options || {}) options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
}; };
return this.client.sendOperationRequest(operationArguments, copyIncrementalOperationSpec); return this.client.sendOperationRequest(operationArguments, copyIncrementalOperationSpec);
} }
} }
// Operation Specifications // Operation Specifications
const xmlSerializer$3 = new coreHttp.Serializer(Mappers, /* isXml */ true); const xmlSerializer$2 = new coreHttp__namespace.Serializer(Mappers, /* isXml */ true);
const serializer = new coreHttp.Serializer(Mappers, /* isXml */ false); const serializer$2 = new coreHttp__namespace.Serializer(Mappers, /* isXml */ false);
const createOperationSpec$1 = { const createOperationSpec$1 = {
path: "/{containerName}/{blob}", path: "/{containerName}/{blob}",
httpMethod: "PUT", httpMethod: "PUT",
@ -21859,7 +22041,7 @@ const createOperationSpec$1 = {
blobSequenceNumber blobSequenceNumber
], ],
isXML: true, isXML: true,
serializer: xmlSerializer$3 serializer: xmlSerializer$2
}; };
const uploadPagesOperationSpec = { const uploadPagesOperationSpec = {
path: "/{containerName}/{blob}", path: "/{containerName}/{blob}",
@ -21901,7 +22083,7 @@ const uploadPagesOperationSpec = {
ifSequenceNumberEqualTo ifSequenceNumberEqualTo
], ],
mediaType: "binary", mediaType: "binary",
serializer serializer: serializer$2
}; };
const clearPagesOperationSpec = { const clearPagesOperationSpec = {
path: "/{containerName}/{blob}", path: "/{containerName}/{blob}",
@ -21939,7 +22121,7 @@ const clearPagesOperationSpec = {
pageWrite1 pageWrite1
], ],
isXML: true, isXML: true,
serializer: xmlSerializer$3 serializer: xmlSerializer$2
}; };
const uploadPagesFromURLOperationSpec = { const uploadPagesFromURLOperationSpec = {
path: "/{containerName}/{blob}", path: "/{containerName}/{blob}",
@ -21986,7 +22168,7 @@ const uploadPagesFromURLOperationSpec = {
range1 range1
], ],
isXML: true, isXML: true,
serializer: xmlSerializer$3 serializer: xmlSerializer$2
}; };
const getPageRangesOperationSpec = { const getPageRangesOperationSpec = {
path: "/{containerName}/{blob}", path: "/{containerName}/{blob}",
@ -22020,7 +22202,7 @@ const getPageRangesOperationSpec = {
ifTags ifTags
], ],
isXML: true, isXML: true,
serializer: xmlSerializer$3 serializer: xmlSerializer$2
}; };
const getPageRangesDiffOperationSpec = { const getPageRangesDiffOperationSpec = {
path: "/{containerName}/{blob}", path: "/{containerName}/{blob}",
@ -22056,7 +22238,7 @@ const getPageRangesDiffOperationSpec = {
prevSnapshotUrl prevSnapshotUrl
], ],
isXML: true, isXML: true,
serializer: xmlSerializer$3 serializer: xmlSerializer$2
}; };
const resizeOperationSpec = { const resizeOperationSpec = {
path: "/{containerName}/{blob}", path: "/{containerName}/{blob}",
@ -22089,7 +22271,7 @@ const resizeOperationSpec = {
blobContentLength blobContentLength
], ],
isXML: true, isXML: true,
serializer: xmlSerializer$3 serializer: xmlSerializer$2
}; };
const updateSequenceNumberOperationSpec = { const updateSequenceNumberOperationSpec = {
path: "/{containerName}/{blob}", path: "/{containerName}/{blob}",
@ -22119,7 +22301,7 @@ const updateSequenceNumberOperationSpec = {
sequenceNumberAction sequenceNumberAction
], ],
isXML: true, isXML: true,
serializer: xmlSerializer$3 serializer: xmlSerializer$2
}; };
const copyIncrementalOperationSpec = { const copyIncrementalOperationSpec = {
path: "/{containerName}/{blob}", path: "/{containerName}/{blob}",
@ -22147,7 +22329,7 @@ const copyIncrementalOperationSpec = {
copySource copySource
], ],
isXML: true, isXML: true,
serializer: xmlSerializer$3 serializer: xmlSerializer$2
}; };
/* /*
@ -22174,9 +22356,9 @@ class AppendBlob {
create(contentLength, options) { create(contentLength, options) {
const operationArguments = { const operationArguments = {
contentLength, contentLength,
options: coreHttp.operationOptionsToRequestOptionsBase(options || {}) options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
}; };
return this.client.sendOperationRequest(operationArguments, createOperationSpec$2); return this.client.sendOperationRequest(operationArguments, createOperationSpec);
} }
/** /**
* The Append Block operation commits a new block of data to the end of an existing append blob. The * The Append Block operation commits a new block of data to the end of an existing append blob. The
@ -22190,7 +22372,7 @@ class AppendBlob {
const operationArguments = { const operationArguments = {
contentLength, contentLength,
body, body,
options: coreHttp.operationOptionsToRequestOptionsBase(options || {}) options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
}; };
return this.client.sendOperationRequest(operationArguments, appendBlockOperationSpec); return this.client.sendOperationRequest(operationArguments, appendBlockOperationSpec);
} }
@ -22207,7 +22389,7 @@ class AppendBlob {
const operationArguments = { const operationArguments = {
sourceUrl, sourceUrl,
contentLength, contentLength,
options: coreHttp.operationOptionsToRequestOptionsBase(options || {}) options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
}; };
return this.client.sendOperationRequest(operationArguments, appendBlockFromUrlOperationSpec); return this.client.sendOperationRequest(operationArguments, appendBlockFromUrlOperationSpec);
} }
@ -22218,15 +22400,15 @@ class AppendBlob {
*/ */
seal(options) { seal(options) {
const operationArguments = { const operationArguments = {
options: coreHttp.operationOptionsToRequestOptionsBase(options || {}) options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
}; };
return this.client.sendOperationRequest(operationArguments, sealOperationSpec); return this.client.sendOperationRequest(operationArguments, sealOperationSpec);
} }
} }
// Operation Specifications // Operation Specifications
const xmlSerializer$4 = new coreHttp.Serializer(Mappers, /* isXml */ true); const xmlSerializer$1 = new coreHttp__namespace.Serializer(Mappers, /* isXml */ true);
const serializer$1 = new coreHttp.Serializer(Mappers, /* isXml */ false); const serializer$1 = new coreHttp__namespace.Serializer(Mappers, /* isXml */ false);
const createOperationSpec$2 = { const createOperationSpec = {
path: "/{containerName}/{blob}", path: "/{containerName}/{blob}",
httpMethod: "PUT", httpMethod: "PUT",
responses: { responses: {
@ -22269,7 +22451,7 @@ const createOperationSpec$2 = {
blobType1 blobType1
], ],
isXML: true, isXML: true,
serializer: xmlSerializer$4 serializer: xmlSerializer$1
}; };
const appendBlockOperationSpec = { const appendBlockOperationSpec = {
path: "/{containerName}/{blob}", path: "/{containerName}/{blob}",
@ -22353,7 +22535,7 @@ const appendBlockFromUrlOperationSpec = {
sourceRange1 sourceRange1
], ],
isXML: true, isXML: true,
serializer: xmlSerializer$4 serializer: xmlSerializer$1
}; };
const sealOperationSpec = { const sealOperationSpec = {
path: "/{containerName}/{blob}", path: "/{containerName}/{blob}",
@ -22381,7 +22563,7 @@ const sealOperationSpec = {
appendPosition appendPosition
], ],
isXML: true, isXML: true,
serializer: xmlSerializer$4 serializer: xmlSerializer$1
}; };
/* /*
@ -22413,7 +22595,7 @@ class BlockBlob {
const operationArguments = { const operationArguments = {
contentLength, contentLength,
body, body,
options: coreHttp.operationOptionsToRequestOptionsBase(options || {}) options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
}; };
return this.client.sendOperationRequest(operationArguments, uploadOperationSpec); return this.client.sendOperationRequest(operationArguments, uploadOperationSpec);
} }
@ -22434,7 +22616,7 @@ class BlockBlob {
const operationArguments = { const operationArguments = {
contentLength, contentLength,
copySource, copySource,
options: coreHttp.operationOptionsToRequestOptionsBase(options || {}) options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
}; };
return this.client.sendOperationRequest(operationArguments, putBlobFromUrlOperationSpec); return this.client.sendOperationRequest(operationArguments, putBlobFromUrlOperationSpec);
} }
@ -22452,7 +22634,7 @@ class BlockBlob {
blockId, blockId,
contentLength, contentLength,
body, body,
options: coreHttp.operationOptionsToRequestOptionsBase(options || {}) options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
}; };
return this.client.sendOperationRequest(operationArguments, stageBlockOperationSpec); return this.client.sendOperationRequest(operationArguments, stageBlockOperationSpec);
} }
@ -22471,7 +22653,7 @@ class BlockBlob {
blockId, blockId,
contentLength, contentLength,
sourceUrl, sourceUrl,
options: coreHttp.operationOptionsToRequestOptionsBase(options || {}) options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
}; };
return this.client.sendOperationRequest(operationArguments, stageBlockFromURLOperationSpec); return this.client.sendOperationRequest(operationArguments, stageBlockFromURLOperationSpec);
} }
@ -22489,7 +22671,7 @@ class BlockBlob {
commitBlockList(blocks, options) { commitBlockList(blocks, options) {
const operationArguments = { const operationArguments = {
blocks, blocks,
options: coreHttp.operationOptionsToRequestOptionsBase(options || {}) options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
}; };
return this.client.sendOperationRequest(operationArguments, commitBlockListOperationSpec); return this.client.sendOperationRequest(operationArguments, commitBlockListOperationSpec);
} }
@ -22503,14 +22685,14 @@ class BlockBlob {
getBlockList(listType, options) { getBlockList(listType, options) {
const operationArguments = { const operationArguments = {
listType, listType,
options: coreHttp.operationOptionsToRequestOptionsBase(options || {}) options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
}; };
return this.client.sendOperationRequest(operationArguments, getBlockListOperationSpec); return this.client.sendOperationRequest(operationArguments, getBlockListOperationSpec);
} }
} }
// Operation Specifications // Operation Specifications
const xmlSerializer$5 = new coreHttp.Serializer(Mappers, /* isXml */ true); const xmlSerializer = new coreHttp__namespace.Serializer(Mappers, /* isXml */ true);
const serializer$2 = new coreHttp.Serializer(Mappers, /* isXml */ false); const serializer = new coreHttp__namespace.Serializer(Mappers, /* isXml */ false);
const uploadOperationSpec = { const uploadOperationSpec = {
path: "/{containerName}/{blob}", path: "/{containerName}/{blob}",
httpMethod: "PUT", httpMethod: "PUT",
@ -22558,7 +22740,7 @@ const uploadOperationSpec = {
blobType2 blobType2
], ],
mediaType: "binary", mediaType: "binary",
serializer: serializer$2 serializer
}; };
const putBlobFromUrlOperationSpec = { const putBlobFromUrlOperationSpec = {
path: "/{containerName}/{blob}", path: "/{containerName}/{blob}",
@ -22611,7 +22793,7 @@ const putBlobFromUrlOperationSpec = {
copySourceBlobProperties copySourceBlobProperties
], ],
isXML: true, isXML: true,
serializer: xmlSerializer$5 serializer: xmlSerializer
}; };
const stageBlockOperationSpec = { const stageBlockOperationSpec = {
path: "/{containerName}/{blob}", path: "/{containerName}/{blob}",
@ -22647,7 +22829,7 @@ const stageBlockOperationSpec = {
accept2 accept2
], ],
mediaType: "binary", mediaType: "binary",
serializer: serializer$2 serializer
}; };
const stageBlockFromURLOperationSpec = { const stageBlockFromURLOperationSpec = {
path: "/{containerName}/{blob}", path: "/{containerName}/{blob}",
@ -22688,7 +22870,7 @@ const stageBlockFromURLOperationSpec = {
sourceRange1 sourceRange1
], ],
isXML: true, isXML: true,
serializer: xmlSerializer$5 serializer: xmlSerializer
}; };
const commitBlockListOperationSpec = { const commitBlockListOperationSpec = {
path: "/{containerName}/{blob}", path: "/{containerName}/{blob}",
@ -22738,7 +22920,7 @@ const commitBlockListOperationSpec = {
isXML: true, isXML: true,
contentType: "application/xml; charset=utf-8", contentType: "application/xml; charset=utf-8",
mediaType: "xml", mediaType: "xml",
serializer: xmlSerializer$5 serializer: xmlSerializer
}; };
const getBlockListOperationSpec = { const getBlockListOperationSpec = {
path: "/{containerName}/{blob}", path: "/{containerName}/{blob}",
@ -22768,7 +22950,7 @@ const getBlockListOperationSpec = {
ifTags ifTags
], ],
isXML: true, isXML: true,
serializer: xmlSerializer$5 serializer: xmlSerializer
}; };
// Copyright (c) Microsoft Corporation. // Copyright (c) Microsoft Corporation.
@ -22779,8 +22961,8 @@ const logger = logger$1.createClientLogger("storage-blob");
// Copyright (c) Microsoft Corporation. // Copyright (c) Microsoft Corporation.
// Licensed under the MIT license. // Licensed under the MIT license.
const SDK_VERSION = "12.8.0"; const SDK_VERSION = "12.9.0";
const SERVICE_VERSION = "2020-10-02"; const SERVICE_VERSION = "2021-04-10";
const BLOCK_BLOB_MAX_UPLOAD_BLOB_BYTES = 256 * 1024 * 1024; // 256MB const BLOCK_BLOB_MAX_UPLOAD_BLOB_BYTES = 256 * 1024 * 1024; // 256MB
const BLOCK_BLOB_MAX_STAGE_BLOCK_BYTES = 4000 * 1024 * 1024; // 4000MB const BLOCK_BLOB_MAX_STAGE_BLOCK_BYTES = 4000 * 1024 * 1024; // 4000MB
const BLOCK_BLOB_MAX_BLOCKS = 50000; const BLOCK_BLOB_MAX_BLOCKS = 50000;
@ -22797,15 +22979,15 @@ const URLConstants = {
SIGNATURE: "sig", SIGNATURE: "sig",
SNAPSHOT: "snapshot", SNAPSHOT: "snapshot",
VERSIONID: "versionid", VERSIONID: "versionid",
TIMEOUT: "timeout" TIMEOUT: "timeout",
} },
}; };
const HTTPURLConnection = { const HTTPURLConnection = {
HTTP_ACCEPTED: 202, HTTP_ACCEPTED: 202,
HTTP_CONFLICT: 409, HTTP_CONFLICT: 409,
HTTP_NOT_FOUND: 404, HTTP_NOT_FOUND: 404,
HTTP_PRECON_FAILED: 412, HTTP_PRECON_FAILED: 412,
HTTP_RANGE_NOT_SATISFIABLE: 416 HTTP_RANGE_NOT_SATISFIABLE: 416,
}; };
const HeaderConstants = { const HeaderConstants = {
AUTHORIZATION: "Authorization", AUTHORIZATION: "Authorization",
@ -22830,7 +23012,7 @@ const HeaderConstants = {
X_MS_COPY_SOURCE: "x-ms-copy-source", X_MS_COPY_SOURCE: "x-ms-copy-source",
X_MS_DATE: "x-ms-date", X_MS_DATE: "x-ms-date",
X_MS_ERROR_CODE: "x-ms-error-code", X_MS_ERROR_CODE: "x-ms-error-code",
X_MS_VERSION: "x-ms-version" X_MS_VERSION: "x-ms-version",
}; };
const ETagNone = ""; const ETagNone = "";
const ETagAny = "*"; const ETagAny = "*";
@ -22935,7 +23117,7 @@ const StorageBlobLoggingAllowedHeaderNames = [
"x-ms-tag-count", "x-ms-tag-count",
"x-ms-encryption-key-sha256", "x-ms-encryption-key-sha256",
"x-ms-if-tags", "x-ms-if-tags",
"x-ms-source-if-tags" "x-ms-source-if-tags",
]; ];
const StorageBlobLoggingAllowedQueryParameters = [ const StorageBlobLoggingAllowedQueryParameters = [
"comp", "comp",
@ -22970,8 +23152,9 @@ const StorageBlobLoggingAllowedQueryParameters = [
"skt", "skt",
"sktid", "sktid",
"skv", "skv",
"snapshot" "snapshot",
]; ];
const BlobUsesCustomerSpecifiedEncryptionMsg = "BlobUsesCustomerSpecifiedEncryption";
// Copyright (c) Microsoft Corporation. // Copyright (c) Microsoft Corporation.
/** /**
@ -23111,7 +23294,7 @@ function extractConnectionStringParts(connectionString) {
url: blobEndpoint, url: blobEndpoint,
accountName, accountName,
accountKey, accountKey,
proxyUri proxyUri,
}; };
} }
else { else {
@ -23443,14 +23626,14 @@ function toBlobTags(tags) {
return undefined; return undefined;
} }
const res = { const res = {
blobTagSet: [] blobTagSet: [],
}; };
for (const key in tags) { for (const key in tags) {
if (Object.prototype.hasOwnProperty.call(tags, key)) { if (Object.prototype.hasOwnProperty.call(tags, key)) {
const value = tags[key]; const value = tags[key];
res.blobTagSet.push({ res.blobTagSet.push({
key, key,
value value,
}); });
} }
} }
@ -23490,33 +23673,33 @@ function toQuerySerialization(textConfiguration) {
fieldQuote: textConfiguration.fieldQuote || "", fieldQuote: textConfiguration.fieldQuote || "",
recordSeparator: textConfiguration.recordSeparator, recordSeparator: textConfiguration.recordSeparator,
escapeChar: textConfiguration.escapeCharacter || "", escapeChar: textConfiguration.escapeCharacter || "",
headersPresent: textConfiguration.hasHeaders || false headersPresent: textConfiguration.hasHeaders || false,
} },
} },
}; };
case "json": case "json":
return { return {
format: { format: {
type: "json", type: "json",
jsonTextConfiguration: { jsonTextConfiguration: {
recordSeparator: textConfiguration.recordSeparator recordSeparator: textConfiguration.recordSeparator,
} },
} },
}; };
case "arrow": case "arrow":
return { return {
format: { format: {
type: "arrow", type: "arrow",
arrowConfiguration: { arrowConfiguration: {
schema: textConfiguration.schema schema: textConfiguration.schema,
} },
} },
}; };
case "parquet": case "parquet":
return { return {
format: { format: {
type: "parquet" type: "parquet",
} },
}; };
default: default:
throw Error("Invalid BlobQueryTextConfiguration."); throw Error("Invalid BlobQueryTextConfiguration.");
@ -23540,7 +23723,7 @@ function parseObjectReplicationRecord(objectReplicationRecord) {
} }
const rule = { const rule = {
ruleId: ids[1], ruleId: ids[1],
replicationStatus: objectReplicationRecord[key] replicationStatus: objectReplicationRecord[key],
}; };
const policyIndex = orProperties.findIndex((policy) => policy.policyId === ids[0]); const policyIndex = orProperties.findIndex((policy) => policy.policyId === ids[0]);
if (policyIndex > -1) { if (policyIndex > -1) {
@ -23549,7 +23732,7 @@ function parseObjectReplicationRecord(objectReplicationRecord) {
else { else {
orProperties.push({ orProperties.push({
policyId: ids[0], policyId: ids[0],
rules: [rule] rules: [rule],
}); });
} }
} }
@ -23568,6 +23751,202 @@ function attachCredential(thing, credential) {
function httpAuthorizationToString(httpAuthorization) { function httpAuthorizationToString(httpAuthorization) {
return httpAuthorization ? httpAuthorization.scheme + " " + httpAuthorization.value : undefined; return httpAuthorization ? httpAuthorization.scheme + " " + httpAuthorization.value : undefined;
} }
function BlobNameToString(name) {
if (name.encoded) {
return decodeURIComponent(name.content);
}
else {
return name.content;
}
}
function ConvertInternalResponseOfListBlobFlat(internalResponse) {
return Object.assign(Object.assign({}, internalResponse), { segment: {
blobItems: internalResponse.segment.blobItems.map((blobItemInteral) => {
const blobItem = Object.assign(Object.assign({}, blobItemInteral), { name: BlobNameToString(blobItemInteral.name) });
return blobItem;
}),
} });
}
function ConvertInternalResponseOfListBlobHierarchy(internalResponse) {
var _a;
return Object.assign(Object.assign({}, internalResponse), { segment: {
blobPrefixes: (_a = internalResponse.segment.blobPrefixes) === null || _a === void 0 ? void 0 : _a.map((blobPrefixInternal) => {
const blobPrefix = {
name: BlobNameToString(blobPrefixInternal.name),
};
return blobPrefix;
}),
blobItems: internalResponse.segment.blobItems.map((blobItemInteral) => {
const blobItem = Object.assign(Object.assign({}, blobItemInteral), { name: BlobNameToString(blobItemInteral.name) });
return blobItem;
}),
} });
}
function decodeBase64String(value) {
if (coreHttp.isNode) {
return Buffer.from(value, "base64");
}
else {
const byteString = atob(value);
const arr = new Uint8Array(byteString.length);
for (let i = 0; i < byteString.length; i++) {
arr[i] = byteString.charCodeAt(i);
}
return arr;
}
}
function ParseBoolean(content) {
if (content === undefined)
return undefined;
if (content === "true")
return true;
if (content === "false")
return false;
return undefined;
}
function ParseBlobName(blobNameInXML) {
if (blobNameInXML["$"] !== undefined && blobNameInXML["#"] !== undefined) {
return {
encoded: ParseBoolean(blobNameInXML["$"]["Encoded"]),
content: blobNameInXML["#"],
};
}
else {
return {
encoded: false,
content: blobNameInXML,
};
}
}
function ParseBlobItem(blobInXML) {
const blobPropertiesInXML = blobInXML["Properties"];
const blobProperties = {
createdOn: new Date(blobPropertiesInXML["Creation-Time"]),
lastModified: new Date(blobPropertiesInXML["Last-Modified"]),
etag: blobPropertiesInXML["Etag"],
contentLength: blobPropertiesInXML["Content-Length"] === undefined
? undefined
: parseFloat(blobPropertiesInXML["Content-Length"]),
contentType: blobPropertiesInXML["Content-Type"],
contentEncoding: blobPropertiesInXML["Content-Encoding"],
contentLanguage: blobPropertiesInXML["Content-Language"],
contentMD5: decodeBase64String(blobPropertiesInXML["Content-MD5"]),
contentDisposition: blobPropertiesInXML["Content-Disposition"],
cacheControl: blobPropertiesInXML["Cache-Control"],
blobSequenceNumber: blobPropertiesInXML["x-ms-blob-sequence-number"] === undefined
? undefined
: parseFloat(blobPropertiesInXML["x-ms-blob-sequence-number"]),
blobType: blobPropertiesInXML["BlobType"],
leaseStatus: blobPropertiesInXML["LeaseStatus"],
leaseState: blobPropertiesInXML["LeaseState"],
leaseDuration: blobPropertiesInXML["LeaseDuration"],
copyId: blobPropertiesInXML["CopyId"],
copyStatus: blobPropertiesInXML["CopyStatus"],
copySource: blobPropertiesInXML["CopySource"],
copyProgress: blobPropertiesInXML["CopyProgress"],
copyCompletedOn: blobPropertiesInXML["CopyCompletionTime"] === undefined
? undefined
: new Date(blobPropertiesInXML["CopyCompletionTime"]),
copyStatusDescription: blobPropertiesInXML["CopyStatusDescription"],
serverEncrypted: ParseBoolean(blobPropertiesInXML["ServerEncrypted"]),
incrementalCopy: ParseBoolean(blobPropertiesInXML["IncrementalCopy"]),
destinationSnapshot: blobPropertiesInXML["DestinationSnapshot"],
deletedOn: blobPropertiesInXML["DeletedTime"] === undefined
? undefined
: new Date(blobPropertiesInXML["DeletedTime"]),
remainingRetentionDays: blobPropertiesInXML["RemainingRetentionDays"] === undefined
? undefined
: parseFloat(blobPropertiesInXML["RemainingRetentionDays"]),
accessTier: blobPropertiesInXML["AccessTier"],
accessTierInferred: ParseBoolean(blobPropertiesInXML["AccessTierInferred"]),
archiveStatus: blobPropertiesInXML["ArchiveStatus"],
customerProvidedKeySha256: blobPropertiesInXML["CustomerProvidedKeySha256"],
encryptionScope: blobPropertiesInXML["EncryptionScope"],
accessTierChangedOn: blobPropertiesInXML["AccessTierChangeTime"] === undefined
? undefined
: new Date(blobPropertiesInXML["AccessTierChangeTime"]),
tagCount: blobPropertiesInXML["TagCount"] === undefined
? undefined
: parseFloat(blobPropertiesInXML["TagCount"]),
expiresOn: blobPropertiesInXML["Expiry-Time"] === undefined
? undefined
: new Date(blobPropertiesInXML["Expiry-Time"]),
isSealed: ParseBoolean(blobPropertiesInXML["Sealed"]),
rehydratePriority: blobPropertiesInXML["RehydratePriority"],
lastAccessedOn: blobPropertiesInXML["LastAccessTime"] === undefined
? undefined
: new Date(blobPropertiesInXML["LastAccessTime"]),
immutabilityPolicyExpiresOn: blobPropertiesInXML["ImmutabilityPolicyUntilDate"] === undefined
? undefined
: new Date(blobPropertiesInXML["ImmutabilityPolicyUntilDate"]),
immutabilityPolicyMode: blobPropertiesInXML["ImmutabilityPolicyMode"],
legalHold: ParseBoolean(blobPropertiesInXML["LegalHold"]),
};
return {
name: ParseBlobName(blobInXML["Name"]),
deleted: ParseBoolean(blobInXML["Deleted"]),
snapshot: blobInXML["Snapshot"],
versionId: blobInXML["VersionId"],
isCurrentVersion: ParseBoolean(blobInXML["IsCurrentVersion"]),
properties: blobProperties,
metadata: blobInXML["Metadata"],
blobTags: ParseBlobTags(blobInXML["Tags"]),
objectReplicationMetadata: blobInXML["OrMetadata"],
hasVersionsOnly: ParseBoolean(blobInXML["HasVersionsOnly"]),
};
}
function ParseBlobPrefix(blobPrefixInXML) {
return {
name: ParseBlobName(blobPrefixInXML["Name"]),
};
}
function ParseBlobTag(blobTagInXML) {
return {
key: blobTagInXML["Key"],
value: blobTagInXML["Value"],
};
}
function ParseBlobTags(blobTagsInXML) {
if (blobTagsInXML === undefined ||
blobTagsInXML["TagSet"] === undefined ||
blobTagsInXML["TagSet"]["Tag"] === undefined) {
return undefined;
}
const blobTagSet = [];
if (blobTagsInXML["TagSet"]["Tag"] instanceof Array) {
blobTagsInXML["TagSet"]["Tag"].forEach((blobTagInXML) => {
blobTagSet.push(ParseBlobTag(blobTagInXML));
});
}
else {
blobTagSet.push(ParseBlobTag(blobTagsInXML["TagSet"]["Tag"]));
}
return { blobTagSet: blobTagSet };
}
function ProcessBlobItems(blobArrayInXML) {
const blobItems = [];
if (blobArrayInXML instanceof Array) {
blobArrayInXML.forEach((blobInXML) => {
blobItems.push(ParseBlobItem(blobInXML));
});
}
else {
blobItems.push(ParseBlobItem(blobArrayInXML));
}
return blobItems;
}
function ProcessBlobPrefixes(blobPrefixesInXML) {
const blobPrefixes = [];
if (blobPrefixesInXML instanceof Array) {
blobPrefixesInXML.forEach((blobPrefixInXML) => {
blobPrefixes.push(ParseBlobPrefix(blobPrefixInXML));
});
}
else {
blobPrefixes.push(ParseBlobPrefix(blobPrefixesInXML));
}
return blobPrefixes;
}
// Copyright (c) Microsoft Corporation. // Copyright (c) Microsoft Corporation.
/** /**
@ -23598,9 +23977,16 @@ class StorageBrowserPolicy extends coreHttp.BaseRequestPolicy {
* @param request - * @param request -
*/ */
async sendRequest(request) { async sendRequest(request) {
{ if (coreHttp.isNode) {
return this._nextPolicy.sendRequest(request); return this._nextPolicy.sendRequest(request);
} }
if (request.method.toUpperCase() === "GET" || request.method.toUpperCase() === "HEAD") {
request.url = setURLParameter(request.url, URLConstants.Parameters.FORCE_BROWSER_NO_CACHE, new Date().getTime().toString());
}
request.headers.remove(HeaderConstants.COOKIE);
// According to XHR standards, content-length should be fully controlled by browsers
request.headers.remove(HeaderConstants.CONTENT_LENGTH);
return this._nextPolicy.sendRequest(request);
} }
} }
@ -23621,6 +24007,10 @@ class StorageBrowserPolicyFactory {
} }
// Copyright (c) Microsoft Corporation. // Copyright (c) Microsoft Corporation.
/**
* RetryPolicy types.
*/
exports.StorageRetryPolicyType = void 0;
(function (StorageRetryPolicyType) { (function (StorageRetryPolicyType) {
/** /**
* Exponential retry. Retry time delay grows exponentially. * Exponential retry. Retry time delay grows exponentially.
@ -23638,7 +24028,7 @@ const DEFAULT_RETRY_OPTIONS = {
retryDelayInMs: 4 * 1000, retryDelayInMs: 4 * 1000,
retryPolicyType: exports.StorageRetryPolicyType.EXPONENTIAL, retryPolicyType: exports.StorageRetryPolicyType.EXPONENTIAL,
secondaryHost: "", secondaryHost: "",
tryTimeoutInMs: undefined // Use server side default timeout strategy tryTimeoutInMs: undefined, // Use server side default timeout strategy
}; };
const RETRY_ABORT_ERROR = new abortController.AbortError("The operation was aborted."); const RETRY_ABORT_ERROR = new abortController.AbortError("The operation was aborted.");
/** /**
@ -23675,7 +24065,7 @@ class StorageRetryPolicy extends coreHttp.BaseRequestPolicy {
: DEFAULT_RETRY_OPTIONS.maxRetryDelayInMs, : DEFAULT_RETRY_OPTIONS.maxRetryDelayInMs,
secondaryHost: retryOptions.secondaryHost secondaryHost: retryOptions.secondaryHost
? retryOptions.secondaryHost ? retryOptions.secondaryHost
: DEFAULT_RETRY_OPTIONS.secondaryHost : DEFAULT_RETRY_OPTIONS.secondaryHost,
}; };
} }
/** /**
@ -23752,7 +24142,7 @@ class StorageRetryPolicy extends coreHttp.BaseRequestPolicy {
"ENOTFOUND", "ENOTFOUND",
"TIMEOUT", "TIMEOUT",
"EPIPE", "EPIPE",
"REQUEST_SEND_ERROR" // For default xhr based http client provided in ms-rest-js "REQUEST_SEND_ERROR", // For default xhr based http client provided in ms-rest-js
]; ];
if (err) { if (err) {
for (const retriableError of retriableErrors) { for (const retriableError of retriableErrors) {
@ -23938,7 +24328,7 @@ class TelemetryPolicy extends coreHttp.BaseRequestPolicy {
* @param request - * @param request -
*/ */
async sendRequest(request) { async sendRequest(request) {
{ if (coreHttp.isNode) {
if (!request.headers) { if (!request.headers) {
request.headers = new coreHttp.HttpHeaders(); request.headers = new coreHttp.HttpHeaders();
} }
@ -23961,7 +24351,7 @@ class TelemetryPolicyFactory {
*/ */
constructor(telemetry) { constructor(telemetry) {
const userAgentInfo = []; const userAgentInfo = [];
{ if (coreHttp.isNode) {
if (telemetry) { if (telemetry) {
const telemetryString = telemetry.userAgentPrefix || ""; const telemetryString = telemetry.userAgentPrefix || "";
if (telemetryString.length > 0 && userAgentInfo.indexOf(telemetryString) === -1) { if (telemetryString.length > 0 && userAgentInfo.indexOf(telemetryString) === -1) {
@ -23974,7 +24364,7 @@ class TelemetryPolicyFactory {
userAgentInfo.push(libInfo); userAgentInfo.push(libInfo);
} }
// e.g. (NODE-VERSION 4.9.1; Windows_NT 10.0.16299) // e.g. (NODE-VERSION 4.9.1; Windows_NT 10.0.16299)
const runtimeInfo = `(NODE-VERSION ${process.version}; ${os.type()} ${os.release()})`; const runtimeInfo = `(NODE-VERSION ${process.version}; ${os__namespace.type()} ${os__namespace.release()})`;
if (userAgentInfo.indexOf(runtimeInfo) === -1) { if (userAgentInfo.indexOf(runtimeInfo) === -1) {
userAgentInfo.push(runtimeInfo); userAgentInfo.push(runtimeInfo);
} }
@ -23998,6 +24388,247 @@ function getCachedDefaultHttpClient() {
return _defaultHttpClient; return _defaultHttpClient;
} }
// Copyright (c) Microsoft Corporation.
/**
* A set of constants used internally when processing requests.
*/
const Constants = {
DefaultScope: "/.default",
/**
* Defines constants for use with HTTP headers.
*/
HeaderConstants: {
/**
* The Authorization header.
*/
AUTHORIZATION: "authorization",
},
};
// Default options for the cycler if none are provided
const DEFAULT_CYCLER_OPTIONS = {
forcedRefreshWindowInMs: 1000,
retryIntervalInMs: 3000,
refreshWindowInMs: 1000 * 60 * 2, // Start refreshing 2m before expiry
};
/**
* Converts an an unreliable access token getter (which may resolve with null)
* into an AccessTokenGetter by retrying the unreliable getter in a regular
* interval.
*
* @param getAccessToken - a function that produces a promise of an access
* token that may fail by returning null
* @param retryIntervalInMs - the time (in milliseconds) to wait between retry
* attempts
* @param timeoutInMs - the timestamp after which the refresh attempt will fail,
* throwing an exception
* @returns - a promise that, if it resolves, will resolve with an access token
*/
async function beginRefresh(getAccessToken, retryIntervalInMs, timeoutInMs) {
// This wrapper handles exceptions gracefully as long as we haven't exceeded
// the timeout.
async function tryGetAccessToken() {
if (Date.now() < timeoutInMs) {
try {
return await getAccessToken();
}
catch (_a) {
return null;
}
}
else {
const finalToken = await getAccessToken();
// Timeout is up, so throw if it's still null
if (finalToken === null) {
throw new Error("Failed to refresh access token.");
}
return finalToken;
}
}
let token = await tryGetAccessToken();
while (token === null) {
await coreHttp.delay(retryIntervalInMs);
token = await tryGetAccessToken();
}
return token;
}
/**
* Creates a token cycler from a credential, scopes, and optional settings.
*
* A token cycler represents a way to reliably retrieve a valid access token
* from a TokenCredential. It will handle initializing the token, refreshing it
* when it nears expiration, and synchronizes refresh attempts to avoid
* concurrency hazards.
*
* @param credential - the underlying TokenCredential that provides the access
* token
* @param scopes - the scopes to request authorization for
* @param tokenCyclerOptions - optionally override default settings for the cycler
*
* @returns - a function that reliably produces a valid access token
*/
function createTokenCycler(credential, scopes, tokenCyclerOptions) {
let refreshWorker = null;
let token = null;
const options = Object.assign(Object.assign({}, DEFAULT_CYCLER_OPTIONS), tokenCyclerOptions);
/**
* This little holder defines several predicates that we use to construct
* the rules of refreshing the token.
*/
const cycler = {
/**
* Produces true if a refresh job is currently in progress.
*/
get isRefreshing() {
return refreshWorker !== null;
},
/**
* Produces true if the cycler SHOULD refresh (we are within the refresh
* window and not already refreshing)
*/
get shouldRefresh() {
var _a;
return (!cycler.isRefreshing &&
((_a = token === null || token === void 0 ? void 0 : token.expiresOnTimestamp) !== null && _a !== void 0 ? _a : 0) - options.refreshWindowInMs < Date.now());
},
/**
* Produces true if the cycler MUST refresh (null or nearly-expired
* token).
*/
get mustRefresh() {
return (token === null || token.expiresOnTimestamp - options.forcedRefreshWindowInMs < Date.now());
},
};
/**
* Starts a refresh job or returns the existing job if one is already
* running.
*/
function refresh(getTokenOptions) {
var _a;
if (!cycler.isRefreshing) {
// We bind `scopes` here to avoid passing it around a lot
const tryGetAccessToken = () => credential.getToken(scopes, getTokenOptions);
// Take advantage of promise chaining to insert an assignment to `token`
// before the refresh can be considered done.
refreshWorker = beginRefresh(tryGetAccessToken, options.retryIntervalInMs,
// If we don't have a token, then we should timeout immediately
(_a = token === null || token === void 0 ? void 0 : token.expiresOnTimestamp) !== null && _a !== void 0 ? _a : Date.now())
.then((_token) => {
refreshWorker = null;
token = _token;
return token;
})
.catch((reason) => {
// We also should reset the refresher if we enter a failed state. All
// existing awaiters will throw, but subsequent requests will start a
// new retry chain.
refreshWorker = null;
token = null;
throw reason;
});
}
return refreshWorker;
}
return async (tokenOptions) => {
//
// Simple rules:
// - If we MUST refresh, then return the refresh task, blocking
// the pipeline until a token is available.
// - If we SHOULD refresh, then run refresh but don't return it
// (we can still use the cached token).
// - Return the token, since it's fine if we didn't return in
// step 1.
//
if (cycler.mustRefresh)
return refresh(tokenOptions);
if (cycler.shouldRefresh) {
refresh(tokenOptions);
}
return token;
};
}
/**
* We will retrieve the challenge only if the response status code was 401,
* and if the response contained the header "WWW-Authenticate" with a non-empty value.
*/
function getChallenge(response) {
const challenge = response.headers.get("WWW-Authenticate");
if (response.status === 401 && challenge) {
return challenge;
}
return;
}
/**
* Converts: `Bearer a="b" c="d"`.
* Into: `[ { a: 'b', c: 'd' }]`.
*
* @internal
*/
function parseChallenge(challenge) {
const bearerChallenge = challenge.slice("Bearer ".length);
const challengeParts = `${bearerChallenge.trim()} `.split(" ").filter((x) => x);
const keyValuePairs = challengeParts.map((keyValue) => (([key, value]) => ({ [key]: value }))(keyValue.trim().split("=")));
// Key-value pairs to plain object:
return keyValuePairs.reduce((a, b) => (Object.assign(Object.assign({}, a), b)), {});
}
// #endregion
/**
* Creates a new factory for a RequestPolicy that applies a bearer token to
* the requests' `Authorization` headers.
*
* @param credential - The TokenCredential implementation that can supply the bearer token.
* @param scopes - The scopes for which the bearer token applies.
*/
function storageBearerTokenChallengeAuthenticationPolicy(credential, scopes) {
// This simple function encapsulates the entire process of reliably retrieving the token
let getToken = createTokenCycler(credential, scopes);
class StorageBearerTokenChallengeAuthenticationPolicy extends coreHttp.BaseRequestPolicy {
constructor(nextPolicy, options) {
super(nextPolicy, options);
}
async sendRequest(webResource) {
if (!webResource.url.toLowerCase().startsWith("https://")) {
throw new Error("Bearer token authentication is not permitted for non-TLS protected (non-https) URLs.");
}
const getTokenInternal = getToken;
const token = (await getTokenInternal({
abortSignal: webResource.abortSignal,
tracingOptions: {
tracingContext: webResource.tracingContext,
},
})).token;
webResource.headers.set(Constants.HeaderConstants.AUTHORIZATION, `Bearer ${token}`);
const response = await this._nextPolicy.sendRequest(webResource);
if ((response === null || response === void 0 ? void 0 : response.status) === 401) {
const challenge = getChallenge(response);
if (challenge) {
const challengeInfo = parseChallenge(challenge);
const challengeScopes = challengeInfo.resource_id + Constants.DefaultScope;
const parsedAuthUri = coreHttp.URLBuilder.parse(challengeInfo.authorization_uri);
const pathSegments = parsedAuthUri.getPath().split("/");
const tenantId = pathSegments[1];
const getTokenForChallenge = createTokenCycler(credential, challengeScopes);
const tokenForChallenge = (await getTokenForChallenge({
abortSignal: webResource.abortSignal,
tracingOptions: {
tracingContext: webResource.tracingContext,
},
tenantId: tenantId,
})).token;
getToken = getTokenForChallenge;
webResource.headers.set(Constants.HeaderConstants.AUTHORIZATION, `Bearer ${tokenForChallenge}`);
return this._nextPolicy.sendRequest(webResource);
}
}
return response;
}
}
return {
create: (nextPolicy, options) => {
return new StorageBearerTokenChallengeAuthenticationPolicy(nextPolicy, options);
},
};
}
// Copyright (c) Microsoft Corporation. // Copyright (c) Microsoft Corporation.
/** /**
* A helper to decide if a given argument satisfies the Pipeline contract * A helper to decide if a given argument satisfies the Pipeline contract
@ -24043,7 +24674,7 @@ class Pipeline {
toServiceClientOptions() { toServiceClientOptions() {
return { return {
httpClient: this.options.httpClient, httpClient: this.options.httpClient,
requestPolicyFactories: this.factories requestPolicyFactories: this.factories,
}; };
} }
} }
@ -24055,6 +24686,7 @@ class Pipeline {
* @returns A new Pipeline object. * @returns A new Pipeline object.
*/ */
function newPipeline(credential, pipelineOptions = {}) { function newPipeline(credential, pipelineOptions = {}) {
var _a;
if (credential === undefined) { if (credential === undefined) {
credential = new AnonymousCredential(); credential = new AnonymousCredential();
} }
@ -24076,16 +24708,16 @@ function newPipeline(credential, pipelineOptions = {}) {
coreHttp.logPolicy({ coreHttp.logPolicy({
logger: logger.info, logger: logger.info,
allowedHeaderNames: StorageBlobLoggingAllowedHeaderNames, allowedHeaderNames: StorageBlobLoggingAllowedHeaderNames,
allowedQueryParameters: StorageBlobLoggingAllowedQueryParameters allowedQueryParameters: StorageBlobLoggingAllowedQueryParameters,
}) }),
]; ];
{ if (coreHttp.isNode) {
// policies only available in Node.js runtime, not in browsers // policies only available in Node.js runtime, not in browsers
factories.push(coreHttp.proxyPolicy(pipelineOptions.proxyOptions)); factories.push(coreHttp.proxyPolicy(pipelineOptions.proxyOptions));
factories.push(coreHttp.disableResponseDecompressionPolicy()); factories.push(coreHttp.disableResponseDecompressionPolicy());
} }
factories.push(coreHttp.isTokenCredential(credential) factories.push(coreHttp.isTokenCredential(credential)
? attachCredential(coreHttp.bearerTokenAuthenticationPolicy(credential, StorageOAuthScopes), credential) ? attachCredential(storageBearerTokenChallengeAuthenticationPolicy(credential, (_a = pipelineOptions.audience) !== null && _a !== void 0 ? _a : StorageOAuthScopes), credential)
: credential); : credential);
return new Pipeline(factories, pipelineOptions); return new Pipeline(factories, pipelineOptions);
} }
@ -24112,7 +24744,9 @@ class StorageSharedKeyCredentialPolicy extends CredentialPolicy {
*/ */
signRequest(request) { signRequest(request) {
request.headers.set(HeaderConstants.X_MS_DATE, new Date().toUTCString()); request.headers.set(HeaderConstants.X_MS_DATE, new Date().toUTCString());
if (request.body && typeof request.body === "string" && request.body.length > 0) { if (request.body &&
(typeof request.body === "string" || request.body !== undefined) &&
request.body.length > 0) {
request.headers.set(HeaderConstants.CONTENT_LENGTH, Buffer.byteLength(request.body)); request.headers.set(HeaderConstants.CONTENT_LENGTH, Buffer.byteLength(request.body));
} }
const stringToSign = [ const stringToSign = [
@ -24127,7 +24761,7 @@ class StorageSharedKeyCredentialPolicy extends CredentialPolicy {
this.getHeaderValueToSign(request, HeaderConstants.IF_MATCH), this.getHeaderValueToSign(request, HeaderConstants.IF_MATCH),
this.getHeaderValueToSign(request, HeaderConstants.IF_NONE_MATCH), this.getHeaderValueToSign(request, HeaderConstants.IF_NONE_MATCH),
this.getHeaderValueToSign(request, HeaderConstants.IF_UNMODIFIED_SINCE), this.getHeaderValueToSign(request, HeaderConstants.IF_UNMODIFIED_SINCE),
this.getHeaderValueToSign(request, HeaderConstants.RANGE) this.getHeaderValueToSign(request, HeaderConstants.RANGE),
].join("\n") + ].join("\n") +
"\n" + "\n" +
this.getCanonicalizedHeadersString(request) + this.getCanonicalizedHeadersString(request) +
@ -24256,9 +24890,7 @@ class StorageSharedKeyCredential extends Credential {
* @param stringToSign - * @param stringToSign -
*/ */
computeHMACSHA256(stringToSign) { computeHMACSHA256(stringToSign) {
return crypto.createHmac("sha256", this.accountKey) return crypto.createHmac("sha256", this.accountKey).update(stringToSign, "utf8").digest("base64");
.update(stringToSign, "utf8")
.digest("base64");
} }
} }
@ -24270,8 +24902,8 @@ class StorageSharedKeyCredential extends Credential {
* Changes may cause incorrect behavior and will be lost if the code is regenerated. * Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/ */
const packageName = "azure-storage-blob"; const packageName = "azure-storage-blob";
const packageVersion = "12.8.0"; const packageVersion = "12.9.0";
class StorageClientContext extends coreHttp.ServiceClient { class StorageClientContext extends coreHttp__namespace.ServiceClient {
/** /**
* Initializes a new instance of the StorageClientContext class. * Initializes a new instance of the StorageClientContext class.
* @param url The URL of the service account, container, or blob that is the target of the desired * @param url The URL of the service account, container, or blob that is the target of the desired
@ -24287,7 +24919,7 @@ class StorageClientContext extends coreHttp.ServiceClient {
options = {}; options = {};
} }
if (!options.userAgent) { if (!options.userAgent) {
const defaultUserAgent = coreHttp.getDefaultUserAgentValue(); const defaultUserAgent = coreHttp__namespace.getDefaultUserAgentValue();
options.userAgent = `${packageName}/${packageVersion} ${defaultUserAgent}`; options.userAgent = `${packageName}/${packageVersion} ${defaultUserAgent}`;
} }
super(undefined, options); super(undefined, options);
@ -24296,7 +24928,7 @@ class StorageClientContext extends coreHttp.ServiceClient {
// Parameter assignments // Parameter assignments
this.url = url; this.url = url;
// Assigning values to Constant parameters // Assigning values to Constant parameters
this.version = options.version || "2020-10-02"; this.version = options.version || "2021-04-10";
} }
} }
@ -24343,7 +24975,7 @@ class StorageClient {
*/ */
const createSpan = coreTracing.createSpanFunction({ const createSpan = coreTracing.createSpanFunction({
packagePrefix: "Azure.Storage.Blob", packagePrefix: "Azure.Storage.Blob",
namespace: "Microsoft.Storage" namespace: "Microsoft.Storage",
}); });
/** /**
* @internal * @internal
@ -24357,7 +24989,7 @@ function convertTracingToRequestOptionsBase(options) {
return { return {
// By passing spanOptions if they exist at runtime, we're backwards compatible with @azure/core-tracing@preview.13 and earlier. // By passing spanOptions if they exist at runtime, we're backwards compatible with @azure/core-tracing@preview.13 and earlier.
spanOptions: (_a = options === null || options === void 0 ? void 0 : options.tracingOptions) === null || _a === void 0 ? void 0 : _a.spanOptions, spanOptions: (_a = options === null || options === void 0 ? void 0 : options.tracingOptions) === null || _a === void 0 ? void 0 : _a.spanOptions,
tracingContext: (_b = options === null || options === void 0 ? void 0 : options.tracingOptions) === null || _b === void 0 ? void 0 : _b.tracingContext tracingContext: (_b = options === null || options === void 0 ? void 0 : options.tracingOptions) === null || _b === void 0 ? void 0 : _b.tracingContext,
}; };
} }
@ -24414,6 +25046,10 @@ class BlobSASPermissions {
* Specifies SetImmutabilityPolicy access granted. * Specifies SetImmutabilityPolicy access granted.
*/ */
this.setImmutabilityPolicy = false; this.setImmutabilityPolicy = false;
/**
* Specifies that Permanent Delete is permitted.
*/
this.permanentDelete = false;
} }
/** /**
* Creates a {@link BlobSASPermissions} from the specified permissions string. This method will throw an * Creates a {@link BlobSASPermissions} from the specified permissions string. This method will throw an
@ -24455,6 +25091,9 @@ class BlobSASPermissions {
case "i": case "i":
blobSASPermissions.setImmutabilityPolicy = true; blobSASPermissions.setImmutabilityPolicy = true;
break; break;
case "y":
blobSASPermissions.permanentDelete = true;
break;
default: default:
throw new RangeError(`Invalid permission: ${char}`); throw new RangeError(`Invalid permission: ${char}`);
} }
@ -24499,6 +25138,9 @@ class BlobSASPermissions {
if (permissionLike.setImmutabilityPolicy) { if (permissionLike.setImmutabilityPolicy) {
blobSASPermissions.setImmutabilityPolicy = true; blobSASPermissions.setImmutabilityPolicy = true;
} }
if (permissionLike.permanentDelete) {
blobSASPermissions.permanentDelete = true;
}
return blobSASPermissions; return blobSASPermissions;
} }
/** /**
@ -24539,6 +25181,9 @@ class BlobSASPermissions {
if (this.setImmutabilityPolicy) { if (this.setImmutabilityPolicy) {
permissions.push("i"); permissions.push("i");
} }
if (this.permanentDelete) {
permissions.push("y");
}
return permissions.join(""); return permissions.join("");
} }
} }
@ -24598,6 +25243,14 @@ class ContainerSASPermissions {
* Specifies SetImmutabilityPolicy access granted. * Specifies SetImmutabilityPolicy access granted.
*/ */
this.setImmutabilityPolicy = false; this.setImmutabilityPolicy = false;
/**
* Specifies that Permanent Delete is permitted.
*/
this.permanentDelete = false;
/**
* Specifies that Filter Blobs by Tags is permitted.
*/
this.filterByTags = false;
} }
/** /**
* Creates an {@link ContainerSASPermissions} from the specified permissions string. This method will throw an * Creates an {@link ContainerSASPermissions} from the specified permissions string. This method will throw an
@ -24642,6 +25295,12 @@ class ContainerSASPermissions {
case "i": case "i":
containerSASPermissions.setImmutabilityPolicy = true; containerSASPermissions.setImmutabilityPolicy = true;
break; break;
case "y":
containerSASPermissions.permanentDelete = true;
break;
case "f":
containerSASPermissions.filterByTags = true;
break;
default: default:
throw new RangeError(`Invalid permission ${char}`); throw new RangeError(`Invalid permission ${char}`);
} }
@ -24689,6 +25348,12 @@ class ContainerSASPermissions {
if (permissionLike.setImmutabilityPolicy) { if (permissionLike.setImmutabilityPolicy) {
containerSASPermissions.setImmutabilityPolicy = true; containerSASPermissions.setImmutabilityPolicy = true;
} }
if (permissionLike.permanentDelete) {
containerSASPermissions.permanentDelete = true;
}
if (permissionLike.filterByTags) {
containerSASPermissions.filterByTags = true;
}
return containerSASPermissions; return containerSASPermissions;
} }
/** /**
@ -24734,6 +25399,12 @@ class ContainerSASPermissions {
if (this.setImmutabilityPolicy) { if (this.setImmutabilityPolicy) {
permissions.push("i"); permissions.push("i");
} }
if (this.permanentDelete) {
permissions.push("y");
}
if (this.filterByTags) {
permissions.push("f");
}
return permissions.join(""); return permissions.join("");
} }
} }
@ -24763,9 +25434,7 @@ class UserDelegationKeyCredential {
*/ */
computeHMACSHA256(stringToSign) { computeHMACSHA256(stringToSign) {
// console.log(`stringToSign: ${JSON.stringify(stringToSign)}`); // console.log(`stringToSign: ${JSON.stringify(stringToSign)}`);
return crypto.createHmac("sha256", this.key) return crypto.createHmac("sha256", this.key).update(stringToSign, "utf8").digest("base64");
.update(stringToSign, "utf8")
.digest("base64");
} }
} }
@ -24783,6 +25452,10 @@ function ipRangeToString(ipRange) {
} }
// Copyright (c) Microsoft Corporation. // Copyright (c) Microsoft Corporation.
/**
* Protocols for generated SAS.
*/
exports.SASProtocol = void 0;
(function (SASProtocol) { (function (SASProtocol) {
/** /**
* Protocol that allows HTTPS only * Protocol that allows HTTPS only
@ -24803,7 +25476,7 @@ function ipRangeToString(ipRange) {
* NOTE: Instances of this class are immutable. * NOTE: Instances of this class are immutable.
*/ */
class SASQueryParameters { class SASQueryParameters {
constructor(version, signature, permissionsOrOptions, services, resourceTypes, protocol, startsOn, expiresOn, ipRange, identifier, resource, cacheControl, contentDisposition, contentEncoding, contentLanguage, contentType, userDelegationKey, preauthorizedAgentObjectId, correlationId) { constructor(version, signature, permissionsOrOptions, services, resourceTypes, protocol, startsOn, expiresOn, ipRange, identifier, resource, cacheControl, contentDisposition, contentEncoding, contentLanguage, contentType, userDelegationKey, preauthorizedAgentObjectId, correlationId, encryptionScope) {
this.version = version; this.version = version;
this.signature = signature; this.signature = signature;
if (permissionsOrOptions !== undefined && typeof permissionsOrOptions !== "string") { if (permissionsOrOptions !== undefined && typeof permissionsOrOptions !== "string") {
@ -24816,6 +25489,7 @@ class SASQueryParameters {
this.expiresOn = permissionsOrOptions.expiresOn; this.expiresOn = permissionsOrOptions.expiresOn;
this.ipRangeInner = permissionsOrOptions.ipRange; this.ipRangeInner = permissionsOrOptions.ipRange;
this.identifier = permissionsOrOptions.identifier; this.identifier = permissionsOrOptions.identifier;
this.encryptionScope = permissionsOrOptions.encryptionScope;
this.resource = permissionsOrOptions.resource; this.resource = permissionsOrOptions.resource;
this.cacheControl = permissionsOrOptions.cacheControl; this.cacheControl = permissionsOrOptions.cacheControl;
this.contentDisposition = permissionsOrOptions.contentDisposition; this.contentDisposition = permissionsOrOptions.contentDisposition;
@ -24841,6 +25515,7 @@ class SASQueryParameters {
this.protocol = protocol; this.protocol = protocol;
this.startsOn = startsOn; this.startsOn = startsOn;
this.ipRangeInner = ipRange; this.ipRangeInner = ipRange;
this.encryptionScope = encryptionScope;
this.identifier = identifier; this.identifier = identifier;
this.resource = resource; this.resource = resource;
this.cacheControl = cacheControl; this.cacheControl = cacheControl;
@ -24869,7 +25544,7 @@ class SASQueryParameters {
if (this.ipRangeInner) { if (this.ipRangeInner) {
return { return {
end: this.ipRangeInner.end, end: this.ipRangeInner.end,
start: this.ipRangeInner.start start: this.ipRangeInner.start,
}; };
} }
return undefined; return undefined;
@ -24888,6 +25563,7 @@ class SASQueryParameters {
"se", "se",
"sip", "sip",
"si", "si",
"ses",
"skoid", "skoid",
"sktid", "sktid",
"skt", "skt",
@ -24903,7 +25579,7 @@ class SASQueryParameters {
"rscl", "rscl",
"rsct", "rsct",
"saoid", "saoid",
"scid" "scid",
]; ];
const queries = []; const queries = [];
for (const param of params) { for (const param of params) {
@ -24932,6 +25608,9 @@ class SASQueryParameters {
case "si": case "si":
this.tryAppendQueryParameter(queries, param, this.identifier); this.tryAppendQueryParameter(queries, param, this.identifier);
break; break;
case "ses":
this.tryAppendQueryParameter(queries, param, this.encryptionScope);
break;
case "skoid": // Signed object ID case "skoid": // Signed object ID
this.tryAppendQueryParameter(queries, param, this.signedOid); this.tryAppendQueryParameter(queries, param, this.signedOid);
break; break;
@ -25016,6 +25695,15 @@ function generateBlobSASQueryParameters(blobSASSignatureValues, sharedKeyCredent
if (sharedKeyCredential === undefined && userDelegationKeyCredential === undefined) { if (sharedKeyCredential === undefined && userDelegationKeyCredential === undefined) {
throw TypeError("Invalid sharedKeyCredential, userDelegationKey or accountName."); throw TypeError("Invalid sharedKeyCredential, userDelegationKey or accountName.");
} }
// Version 2020-12-06 adds support for encryptionscope in SAS.
if (version >= "2020-12-06") {
if (sharedKeyCredential !== undefined) {
return generateBlobSASQueryParameters20201206(blobSASSignatureValues, sharedKeyCredential);
}
else {
return generateBlobSASQueryParametersUDK20201206(blobSASSignatureValues, userDelegationKeyCredential);
}
}
// Version 2019-12-12 adds support for the blob tags permission. // Version 2019-12-12 adds support for the blob tags permission.
// Version 2018-11-09 adds support for the signed resource and signed blob snapshot time fields. // Version 2018-11-09 adds support for the signed resource and signed blob snapshot time fields.
// https://docs.microsoft.com/en-us/rest/api/storageservices/constructing-a-service-sas#constructing-the-signature-string // https://docs.microsoft.com/en-us/rest/api/storageservices/constructing-a-service-sas#constructing-the-signature-string
@ -25097,7 +25785,7 @@ function generateBlobSASQueryParameters20150405(blobSASSignatureValues, sharedKe
blobSASSignatureValues.contentDisposition ? blobSASSignatureValues.contentDisposition : "", blobSASSignatureValues.contentDisposition ? blobSASSignatureValues.contentDisposition : "",
blobSASSignatureValues.contentEncoding ? blobSASSignatureValues.contentEncoding : "", blobSASSignatureValues.contentEncoding ? blobSASSignatureValues.contentEncoding : "",
blobSASSignatureValues.contentLanguage ? blobSASSignatureValues.contentLanguage : "", blobSASSignatureValues.contentLanguage ? blobSASSignatureValues.contentLanguage : "",
blobSASSignatureValues.contentType ? blobSASSignatureValues.contentType : "" blobSASSignatureValues.contentType ? blobSASSignatureValues.contentType : "",
].join("\n"); ].join("\n");
const signature = sharedKeyCredential.computeHMACSHA256(stringToSign); const signature = sharedKeyCredential.computeHMACSHA256(stringToSign);
return new SASQueryParameters(blobSASSignatureValues.version, signature, verifiedPermissions, undefined, undefined, blobSASSignatureValues.protocol, blobSASSignatureValues.startsOn, blobSASSignatureValues.expiresOn, blobSASSignatureValues.ipRange, blobSASSignatureValues.identifier, resource, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, blobSASSignatureValues.contentLanguage, blobSASSignatureValues.contentType); return new SASQueryParameters(blobSASSignatureValues.version, signature, verifiedPermissions, undefined, undefined, blobSASSignatureValues.protocol, blobSASSignatureValues.startsOn, blobSASSignatureValues.expiresOn, blobSASSignatureValues.ipRange, blobSASSignatureValues.identifier, resource, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, blobSASSignatureValues.contentLanguage, blobSASSignatureValues.contentType);
@ -25166,11 +25854,81 @@ function generateBlobSASQueryParameters20181109(blobSASSignatureValues, sharedKe
blobSASSignatureValues.contentDisposition ? blobSASSignatureValues.contentDisposition : "", blobSASSignatureValues.contentDisposition ? blobSASSignatureValues.contentDisposition : "",
blobSASSignatureValues.contentEncoding ? blobSASSignatureValues.contentEncoding : "", blobSASSignatureValues.contentEncoding ? blobSASSignatureValues.contentEncoding : "",
blobSASSignatureValues.contentLanguage ? blobSASSignatureValues.contentLanguage : "", blobSASSignatureValues.contentLanguage ? blobSASSignatureValues.contentLanguage : "",
blobSASSignatureValues.contentType ? blobSASSignatureValues.contentType : "" blobSASSignatureValues.contentType ? blobSASSignatureValues.contentType : "",
].join("\n"); ].join("\n");
const signature = sharedKeyCredential.computeHMACSHA256(stringToSign); const signature = sharedKeyCredential.computeHMACSHA256(stringToSign);
return new SASQueryParameters(blobSASSignatureValues.version, signature, verifiedPermissions, undefined, undefined, blobSASSignatureValues.protocol, blobSASSignatureValues.startsOn, blobSASSignatureValues.expiresOn, blobSASSignatureValues.ipRange, blobSASSignatureValues.identifier, resource, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, blobSASSignatureValues.contentLanguage, blobSASSignatureValues.contentType); return new SASQueryParameters(blobSASSignatureValues.version, signature, verifiedPermissions, undefined, undefined, blobSASSignatureValues.protocol, blobSASSignatureValues.startsOn, blobSASSignatureValues.expiresOn, blobSASSignatureValues.ipRange, blobSASSignatureValues.identifier, resource, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, blobSASSignatureValues.contentLanguage, blobSASSignatureValues.contentType);
} }
/**
* ONLY AVAILABLE IN NODE.JS RUNTIME.
* IMPLEMENTATION FOR API VERSION FROM 2020-12-06.
*
* Creates an instance of SASQueryParameters.
*
* Only accepts required settings needed to create a SAS. For optional settings please
* set corresponding properties directly, such as permissions, startsOn and identifier.
*
* WARNING: When identifier is not provided, permissions and expiresOn are required.
* You MUST assign value to identifier or expiresOn & permissions manually if you initial with
* this constructor.
*
* @param blobSASSignatureValues -
* @param sharedKeyCredential -
*/
function generateBlobSASQueryParameters20201206(blobSASSignatureValues, sharedKeyCredential) {
blobSASSignatureValues = SASSignatureValuesSanityCheckAndAutofill(blobSASSignatureValues);
if (!blobSASSignatureValues.identifier &&
!(blobSASSignatureValues.permissions && blobSASSignatureValues.expiresOn)) {
throw new RangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when 'identifier' is not provided.");
}
let resource = "c";
let timestamp = blobSASSignatureValues.snapshotTime;
if (blobSASSignatureValues.blobName) {
resource = "b";
if (blobSASSignatureValues.snapshotTime) {
resource = "bs";
}
else if (blobSASSignatureValues.versionId) {
resource = "bv";
timestamp = blobSASSignatureValues.versionId;
}
}
// Calling parse and toString guarantees the proper ordering and throws on invalid characters.
let verifiedPermissions;
if (blobSASSignatureValues.permissions) {
if (blobSASSignatureValues.blobName) {
verifiedPermissions = BlobSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString();
}
else {
verifiedPermissions = ContainerSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString();
}
}
// Signature is generated on the un-url-encoded values.
const stringToSign = [
verifiedPermissions ? verifiedPermissions : "",
blobSASSignatureValues.startsOn
? truncatedISO8061Date(blobSASSignatureValues.startsOn, false)
: "",
blobSASSignatureValues.expiresOn
? truncatedISO8061Date(blobSASSignatureValues.expiresOn, false)
: "",
getCanonicalName(sharedKeyCredential.accountName, blobSASSignatureValues.containerName, blobSASSignatureValues.blobName),
blobSASSignatureValues.identifier,
blobSASSignatureValues.ipRange ? ipRangeToString(blobSASSignatureValues.ipRange) : "",
blobSASSignatureValues.protocol ? blobSASSignatureValues.protocol : "",
blobSASSignatureValues.version,
resource,
timestamp,
blobSASSignatureValues.encryptionScope,
blobSASSignatureValues.cacheControl ? blobSASSignatureValues.cacheControl : "",
blobSASSignatureValues.contentDisposition ? blobSASSignatureValues.contentDisposition : "",
blobSASSignatureValues.contentEncoding ? blobSASSignatureValues.contentEncoding : "",
blobSASSignatureValues.contentLanguage ? blobSASSignatureValues.contentLanguage : "",
blobSASSignatureValues.contentType ? blobSASSignatureValues.contentType : "",
].join("\n");
const signature = sharedKeyCredential.computeHMACSHA256(stringToSign);
return new SASQueryParameters(blobSASSignatureValues.version, signature, verifiedPermissions, undefined, undefined, blobSASSignatureValues.protocol, blobSASSignatureValues.startsOn, blobSASSignatureValues.expiresOn, blobSASSignatureValues.ipRange, blobSASSignatureValues.identifier, resource, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, blobSASSignatureValues.contentLanguage, blobSASSignatureValues.contentType, undefined, undefined, undefined, blobSASSignatureValues.encryptionScope);
}
/** /**
* ONLY AVAILABLE IN NODE.JS RUNTIME. * ONLY AVAILABLE IN NODE.JS RUNTIME.
* IMPLEMENTATION FOR API VERSION FROM 2018-11-09. * IMPLEMENTATION FOR API VERSION FROM 2018-11-09.
@ -25242,7 +26000,7 @@ function generateBlobSASQueryParametersUDK20181109(blobSASSignatureValues, userD
blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentDisposition,
blobSASSignatureValues.contentEncoding, blobSASSignatureValues.contentEncoding,
blobSASSignatureValues.contentLanguage, blobSASSignatureValues.contentLanguage,
blobSASSignatureValues.contentType blobSASSignatureValues.contentType,
].join("\n"); ].join("\n");
const signature = userDelegationKeyCredential.computeHMACSHA256(stringToSign); const signature = userDelegationKeyCredential.computeHMACSHA256(stringToSign);
return new SASQueryParameters(blobSASSignatureValues.version, signature, verifiedPermissions, undefined, undefined, blobSASSignatureValues.protocol, blobSASSignatureValues.startsOn, blobSASSignatureValues.expiresOn, blobSASSignatureValues.ipRange, blobSASSignatureValues.identifier, resource, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, blobSASSignatureValues.contentLanguage, blobSASSignatureValues.contentType, userDelegationKeyCredential.userDelegationKey); return new SASQueryParameters(blobSASSignatureValues.version, signature, verifiedPermissions, undefined, undefined, blobSASSignatureValues.protocol, blobSASSignatureValues.startsOn, blobSASSignatureValues.expiresOn, blobSASSignatureValues.ipRange, blobSASSignatureValues.identifier, resource, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, blobSASSignatureValues.contentLanguage, blobSASSignatureValues.contentType, userDelegationKeyCredential.userDelegationKey);
@ -25321,11 +26079,91 @@ function generateBlobSASQueryParametersUDK20200210(blobSASSignatureValues, userD
blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentDisposition,
blobSASSignatureValues.contentEncoding, blobSASSignatureValues.contentEncoding,
blobSASSignatureValues.contentLanguage, blobSASSignatureValues.contentLanguage,
blobSASSignatureValues.contentType blobSASSignatureValues.contentType,
].join("\n"); ].join("\n");
const signature = userDelegationKeyCredential.computeHMACSHA256(stringToSign); const signature = userDelegationKeyCredential.computeHMACSHA256(stringToSign);
return new SASQueryParameters(blobSASSignatureValues.version, signature, verifiedPermissions, undefined, undefined, blobSASSignatureValues.protocol, blobSASSignatureValues.startsOn, blobSASSignatureValues.expiresOn, blobSASSignatureValues.ipRange, blobSASSignatureValues.identifier, resource, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, blobSASSignatureValues.contentLanguage, blobSASSignatureValues.contentType, userDelegationKeyCredential.userDelegationKey, blobSASSignatureValues.preauthorizedAgentObjectId, blobSASSignatureValues.correlationId); return new SASQueryParameters(blobSASSignatureValues.version, signature, verifiedPermissions, undefined, undefined, blobSASSignatureValues.protocol, blobSASSignatureValues.startsOn, blobSASSignatureValues.expiresOn, blobSASSignatureValues.ipRange, blobSASSignatureValues.identifier, resource, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, blobSASSignatureValues.contentLanguage, blobSASSignatureValues.contentType, userDelegationKeyCredential.userDelegationKey, blobSASSignatureValues.preauthorizedAgentObjectId, blobSASSignatureValues.correlationId);
} }
/**
* ONLY AVAILABLE IN NODE.JS RUNTIME.
* IMPLEMENTATION FOR API VERSION FROM 2020-12-06.
*
* Creates an instance of SASQueryParameters.
*
* Only accepts required settings needed to create a SAS. For optional settings please
* set corresponding properties directly, such as permissions, startsOn.
*
* WARNING: identifier will be ignored, permissions and expiresOn are required.
*
* @param blobSASSignatureValues -
* @param userDelegationKeyCredential -
*/
function generateBlobSASQueryParametersUDK20201206(blobSASSignatureValues, userDelegationKeyCredential) {
blobSASSignatureValues = SASSignatureValuesSanityCheckAndAutofill(blobSASSignatureValues);
// Stored access policies are not supported for a user delegation SAS.
if (!blobSASSignatureValues.permissions || !blobSASSignatureValues.expiresOn) {
throw new RangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when generating user delegation SAS.");
}
let resource = "c";
let timestamp = blobSASSignatureValues.snapshotTime;
if (blobSASSignatureValues.blobName) {
resource = "b";
if (blobSASSignatureValues.snapshotTime) {
resource = "bs";
}
else if (blobSASSignatureValues.versionId) {
resource = "bv";
timestamp = blobSASSignatureValues.versionId;
}
}
// Calling parse and toString guarantees the proper ordering and throws on invalid characters.
let verifiedPermissions;
if (blobSASSignatureValues.permissions) {
if (blobSASSignatureValues.blobName) {
verifiedPermissions = BlobSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString();
}
else {
verifiedPermissions = ContainerSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString();
}
}
// Signature is generated on the un-url-encoded values.
const stringToSign = [
verifiedPermissions ? verifiedPermissions : "",
blobSASSignatureValues.startsOn
? truncatedISO8061Date(blobSASSignatureValues.startsOn, false)
: "",
blobSASSignatureValues.expiresOn
? truncatedISO8061Date(blobSASSignatureValues.expiresOn, false)
: "",
getCanonicalName(userDelegationKeyCredential.accountName, blobSASSignatureValues.containerName, blobSASSignatureValues.blobName),
userDelegationKeyCredential.userDelegationKey.signedObjectId,
userDelegationKeyCredential.userDelegationKey.signedTenantId,
userDelegationKeyCredential.userDelegationKey.signedStartsOn
? truncatedISO8061Date(userDelegationKeyCredential.userDelegationKey.signedStartsOn, false)
: "",
userDelegationKeyCredential.userDelegationKey.signedExpiresOn
? truncatedISO8061Date(userDelegationKeyCredential.userDelegationKey.signedExpiresOn, false)
: "",
userDelegationKeyCredential.userDelegationKey.signedService,
userDelegationKeyCredential.userDelegationKey.signedVersion,
blobSASSignatureValues.preauthorizedAgentObjectId,
undefined,
blobSASSignatureValues.correlationId,
blobSASSignatureValues.ipRange ? ipRangeToString(blobSASSignatureValues.ipRange) : "",
blobSASSignatureValues.protocol ? blobSASSignatureValues.protocol : "",
blobSASSignatureValues.version,
resource,
timestamp,
blobSASSignatureValues.encryptionScope,
blobSASSignatureValues.cacheControl,
blobSASSignatureValues.contentDisposition,
blobSASSignatureValues.contentEncoding,
blobSASSignatureValues.contentLanguage,
blobSASSignatureValues.contentType,
].join("\n");
const signature = userDelegationKeyCredential.computeHMACSHA256(stringToSign);
return new SASQueryParameters(blobSASSignatureValues.version, signature, verifiedPermissions, undefined, undefined, blobSASSignatureValues.protocol, blobSASSignatureValues.startsOn, blobSASSignatureValues.expiresOn, blobSASSignatureValues.ipRange, blobSASSignatureValues.identifier, resource, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, blobSASSignatureValues.contentLanguage, blobSASSignatureValues.contentType, userDelegationKeyCredential.userDelegationKey, blobSASSignatureValues.preauthorizedAgentObjectId, blobSASSignatureValues.correlationId, blobSASSignatureValues.encryptionScope);
}
function getCanonicalName(accountName, containerName, blobName) { function getCanonicalName(accountName, containerName, blobName) {
// Container: "/blob/account/containerName" // Container: "/blob/account/containerName"
// Blob: "/blob/account/containerName/blobName" // Blob: "/blob/account/containerName/blobName"
@ -25359,6 +26197,11 @@ function SASSignatureValuesSanityCheckAndAutofill(blobSASSignatureValues) {
version < "2019-10-10") { version < "2019-10-10") {
throw RangeError("'version' must be >= '2019-10-10' when providing 'x' permission."); throw RangeError("'version' must be >= '2019-10-10' when providing 'x' permission.");
} }
if (blobSASSignatureValues.permissions &&
blobSASSignatureValues.permissions.permanentDelete &&
version < "2019-10-10") {
throw RangeError("'version' must be >= '2019-10-10' when providing 'y' permission.");
}
if (blobSASSignatureValues.permissions && if (blobSASSignatureValues.permissions &&
blobSASSignatureValues.permissions.tag && blobSASSignatureValues.permissions.tag &&
version < "2019-12-12") { version < "2019-12-12") {
@ -25369,10 +26212,18 @@ function SASSignatureValuesSanityCheckAndAutofill(blobSASSignatureValues) {
(blobSASSignatureValues.permissions.move || blobSASSignatureValues.permissions.execute)) { (blobSASSignatureValues.permissions.move || blobSASSignatureValues.permissions.execute)) {
throw RangeError("'version' must be >= '2020-02-10' when providing the 'm' or 'e' permission."); throw RangeError("'version' must be >= '2020-02-10' when providing the 'm' or 'e' permission.");
} }
if (version < "2021-04-10" &&
blobSASSignatureValues.permissions &&
blobSASSignatureValues.permissions.filterByTags) {
throw RangeError("'version' must be >= '2021-04-10' when providing the 'f' permission.");
}
if (version < "2020-02-10" && if (version < "2020-02-10" &&
(blobSASSignatureValues.preauthorizedAgentObjectId || blobSASSignatureValues.correlationId)) { (blobSASSignatureValues.preauthorizedAgentObjectId || blobSASSignatureValues.correlationId)) {
throw RangeError("'version' must be >= '2020-02-10' when providing 'preauthorizedAgentObjectId' or 'correlationId'."); throw RangeError("'version' must be >= '2020-02-10' when providing 'preauthorizedAgentObjectId' or 'correlationId'.");
} }
if (blobSASSignatureValues.encryptionScope && version < "2020-12-06") {
throw RangeError("'version' must be >= '2020-12-06' when provided 'encryptionScope' in SAS.");
}
blobSASSignatureValues.version = version; blobSASSignatureValues.version = version;
return blobSASSignatureValues; return blobSASSignatureValues;
} }
@ -25446,7 +26297,7 @@ class BlobLeaseClient {
catch (e) { catch (e) {
span.setStatus({ span.setStatus({
code: coreTracing.SpanStatusCode.ERROR, code: coreTracing.SpanStatusCode.ERROR,
message: e.message message: e.message,
}); });
throw e; throw e;
} }
@ -25481,7 +26332,7 @@ class BlobLeaseClient {
catch (e) { catch (e) {
span.setStatus({ span.setStatus({
code: coreTracing.SpanStatusCode.ERROR, code: coreTracing.SpanStatusCode.ERROR,
message: e.message message: e.message,
}); });
throw e; throw e;
} }
@ -25514,7 +26365,7 @@ class BlobLeaseClient {
catch (e) { catch (e) {
span.setStatus({ span.setStatus({
code: coreTracing.SpanStatusCode.ERROR, code: coreTracing.SpanStatusCode.ERROR,
message: e.message message: e.message,
}); });
throw e; throw e;
} }
@ -25546,7 +26397,7 @@ class BlobLeaseClient {
catch (e) { catch (e) {
span.setStatus({ span.setStatus({
code: coreTracing.SpanStatusCode.ERROR, code: coreTracing.SpanStatusCode.ERROR,
message: e.message message: e.message,
}); });
throw e; throw e;
} }
@ -25581,7 +26432,7 @@ class BlobLeaseClient {
catch (e) { catch (e) {
span.setStatus({ span.setStatus({
code: coreTracing.SpanStatusCode.ERROR, code: coreTracing.SpanStatusCode.ERROR,
message: e.message message: e.message,
}); });
throw e; throw e;
} }
@ -25661,8 +26512,7 @@ class RetriableReadableStream extends stream.Readable {
}); });
} }
else { else {
this.destroy(new Error(`Data corruption failure: received less data than required and reached maxRetires limitation. Received data offset: ${this this.destroy(new Error(`Data corruption failure: received less data than required and reached maxRetires limitation. Received data offset: ${this.offset - 1}, data needed offset: ${this.end}, retries: ${this.retries}, max retries: ${this.maxRetryRequests}`));
.offset - 1}, data needed offset: ${this.end}, retries: ${this.retries}, max retries: ${this.maxRetryRequests}`));
} }
} }
else { else {
@ -26507,7 +27357,7 @@ class AvroReader {
} }
async initialize(options = {}) { async initialize(options = {}) {
const header = await AvroParser.readFixedBytes(this._headerStream, AVRO_INIT_BYTES.length, { const header = await AvroParser.readFixedBytes(this._headerStream, AVRO_INIT_BYTES.length, {
abortSignal: options.abortSignal abortSignal: options.abortSignal,
}); });
if (!arraysEqual(header, AVRO_INIT_BYTES)) { if (!arraysEqual(header, AVRO_INIT_BYTES)) {
throw new Error("Stream is not an Avro file."); throw new Error("Stream is not an Avro file.");
@ -26515,7 +27365,7 @@ class AvroReader {
// File metadata is written as if defined by the following map schema: // File metadata is written as if defined by the following map schema:
// { "type": "map", "values": "bytes"} // { "type": "map", "values": "bytes"}
this._metadata = await AvroParser.readMap(this._headerStream, AvroParser.readString, { this._metadata = await AvroParser.readMap(this._headerStream, AvroParser.readString, {
abortSignal: options.abortSignal abortSignal: options.abortSignal,
}); });
// Validate codec // Validate codec
const codec = this._metadata[AVRO_CODEC_KEY]; const codec = this._metadata[AVRO_CODEC_KEY];
@ -26524,7 +27374,7 @@ class AvroReader {
} }
// The 16-byte, randomly-generated sync marker for this file. // The 16-byte, randomly-generated sync marker for this file.
this._syncMarker = await AvroParser.readFixedBytes(this._headerStream, AVRO_SYNC_MARKER_SIZE, { this._syncMarker = await AvroParser.readFixedBytes(this._headerStream, AVRO_SYNC_MARKER_SIZE, {
abortSignal: options.abortSignal abortSignal: options.abortSignal,
}); });
// Parse the schema // Parse the schema
const schema = JSON.parse(this._metadata[AVRO_SCHEMA_KEY]); const schema = JSON.parse(this._metadata[AVRO_SCHEMA_KEY]);
@ -26533,7 +27383,7 @@ class AvroReader {
this._blockOffset = this._initialBlockOffset + this._dataStream.position; this._blockOffset = this._initialBlockOffset + this._dataStream.position;
} }
this._itemsRemainingInBlock = await AvroParser.readLong(this._dataStream, { this._itemsRemainingInBlock = await AvroParser.readLong(this._dataStream, {
abortSignal: options.abortSignal abortSignal: options.abortSignal,
}); });
// skip block length // skip block length
await AvroParser.readLong(this._dataStream, { abortSignal: options.abortSignal }); await AvroParser.readLong(this._dataStream, { abortSignal: options.abortSignal });
@ -26555,13 +27405,13 @@ class AvroReader {
} }
while (this.hasNext()) { while (this.hasNext()) {
const result = yield tslib.__await(this._itemType.read(this._dataStream, { const result = yield tslib.__await(this._itemType.read(this._dataStream, {
abortSignal: options.abortSignal abortSignal: options.abortSignal,
})); }));
this._itemsRemainingInBlock--; this._itemsRemainingInBlock--;
this._objectIndex++; this._objectIndex++;
if (this._itemsRemainingInBlock == 0) { if (this._itemsRemainingInBlock == 0) {
const marker = yield tslib.__await(AvroParser.readFixedBytes(this._dataStream, AVRO_SYNC_MARKER_SIZE, { const marker = yield tslib.__await(AvroParser.readFixedBytes(this._dataStream, AVRO_SYNC_MARKER_SIZE, {
abortSignal: options.abortSignal abortSignal: options.abortSignal,
})); }));
this._blockOffset = this._initialBlockOffset + this._dataStream.position; this._blockOffset = this._initialBlockOffset + this._dataStream.position;
this._objectIndex = 0; this._objectIndex = 0;
@ -26570,7 +27420,7 @@ class AvroReader {
} }
try { try {
this._itemsRemainingInBlock = yield tslib.__await(AvroParser.readLong(this._dataStream, { this._itemsRemainingInBlock = yield tslib.__await(AvroParser.readLong(this._dataStream, {
abortSignal: options.abortSignal abortSignal: options.abortSignal,
})); }));
} }
catch (err) { catch (err) {
@ -26769,7 +27619,7 @@ class BlobQuickQueryStream extends stream.Readable {
position, position,
name, name,
isFatal: fatal, isFatal: fatal,
description description,
}); });
} }
break; break;
@ -27145,6 +27995,11 @@ class BlobQueryResponse {
} }
// Copyright (c) Microsoft Corporation. // Copyright (c) Microsoft Corporation.
/**
* Represents the access tier on a blob.
* For detailed information about block blob level tiering see {@link https://docs.microsoft.com/azure/storage/blobs/storage-blob-storage-tiers|Hot, cool and archive storage tiers.}
*/
exports.BlockBlobTier = void 0;
(function (BlockBlobTier) { (function (BlockBlobTier) {
/** /**
* Optimized for storing data that is accessed frequently. * Optimized for storing data that is accessed frequently.
@ -27160,6 +28015,12 @@ class BlobQueryResponse {
*/ */
BlockBlobTier["Archive"] = "Archive"; BlockBlobTier["Archive"] = "Archive";
})(exports.BlockBlobTier || (exports.BlockBlobTier = {})); })(exports.BlockBlobTier || (exports.BlockBlobTier = {}));
/**
* Specifies the page blob tier to set the blob to. This is only applicable to page blobs on premium storage accounts.
* Please see {@link https://docs.microsoft.com/azure/storage/storage-premium-storage#scalability-and-performance-targets|here}
* for detailed information on the corresponding IOPS and throughput per PageBlobTier.
*/
exports.PremiumPageBlobTier = void 0;
(function (PremiumPageBlobTier) { (function (PremiumPageBlobTier) {
/** /**
* P4 Tier. * P4 Tier.
@ -27220,6 +28081,20 @@ function ensureCpkIfSpecified(cpk, isHttps) {
cpk.encryptionAlgorithm = EncryptionAlgorithmAES25; cpk.encryptionAlgorithm = EncryptionAlgorithmAES25;
} }
} }
/**
* Defines the known cloud audiences for Storage.
*/
exports.StorageBlobAudience = void 0;
(function (StorageBlobAudience) {
/**
* The OAuth scope to use to retrieve an AAD token for Azure Storage.
*/
StorageBlobAudience["StorageOAuthScopes"] = "https://storage.azure.com/.default";
/**
* The OAuth scope to use to retrieve an AAD token for Azure Disk.
*/
StorageBlobAudience["DiskComputeOAuthScopes"] = "https://disk.compute.azure.com/.default";
})(exports.StorageBlobAudience || (exports.StorageBlobAudience = {}));
// Copyright (c) Microsoft Corporation. // Copyright (c) Microsoft Corporation.
// Licensed under the MIT license. // Licensed under the MIT license.
@ -27232,16 +28107,16 @@ function ensureCpkIfSpecified(cpk, isHttps) {
function rangeResponseFromModel(response) { function rangeResponseFromModel(response) {
const pageRange = (response._response.parsedBody.pageRange || []).map((x) => ({ const pageRange = (response._response.parsedBody.pageRange || []).map((x) => ({
offset: x.start, offset: x.start,
count: x.end - x.start count: x.end - x.start,
})); }));
const clearRange = (response._response.parsedBody.clearRange || []).map((x) => ({ const clearRange = (response._response.parsedBody.clearRange || []).map((x) => ({
offset: x.start, offset: x.start,
count: x.end - x.start count: x.end - x.start,
})); }));
return Object.assign(Object.assign({}, response), { pageRange, return Object.assign(Object.assign({}, response), { pageRange,
clearRange, _response: Object.assign(Object.assign({}, response._response), { parsedBody: { clearRange, _response: Object.assign(Object.assign({}, response._response), { parsedBody: {
pageRange, pageRange,
clearRange clearRange,
} }) }); } }) });
} }
@ -27254,7 +28129,7 @@ function rangeResponseFromModel(response) {
*/ */
class BlobBeginCopyFromUrlPoller extends coreLro.Poller { class BlobBeginCopyFromUrlPoller extends coreLro.Poller {
constructor(options) { constructor(options) {
const { blobClient, copySource, intervalInMs = 15000, onProgress, resumeFrom, startCopyFromURLOptions } = options; const { blobClient, copySource, intervalInMs = 15000, onProgress, resumeFrom, startCopyFromURLOptions, } = options;
let state; let state;
if (resumeFrom) { if (resumeFrom) {
state = JSON.parse(resumeFrom).state; state = JSON.parse(resumeFrom).state;
@ -27290,7 +28165,7 @@ const cancel = async function cancel(options = {}) {
} }
// if abortCopyFromURL throws, it will bubble up to user's poller.cancelOperation call // if abortCopyFromURL throws, it will bubble up to user's poller.cancelOperation call
await state.blobClient.abortCopyFromURL(copyId, { await state.blobClient.abortCopyFromURL(copyId, {
abortSignal: options.abortSignal abortSignal: options.abortSignal,
}); });
state.isCancelled = true; state.isCancelled = true;
return makeBlobBeginCopyFromURLPollOperation(state); return makeBlobBeginCopyFromURLPollOperation(state);
@ -27368,7 +28243,7 @@ function makeBlobBeginCopyFromURLPollOperation(state) {
state: Object.assign({}, state), state: Object.assign({}, state),
cancel, cancel,
toString, toString,
update update,
}; };
} }
@ -28010,7 +28885,7 @@ async function streamToBuffer2(stream, buffer, encoding) {
*/ */
async function readStreamToLocalFile(rs, file) { async function readStreamToLocalFile(rs, file) {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
const ws = fs.createWriteStream(file); const ws = fs__namespace.createWriteStream(file);
rs.on("error", (err) => { rs.on("error", (err) => {
reject(err); reject(err);
}); });
@ -28026,8 +28901,8 @@ async function readStreamToLocalFile(rs, file) {
* *
* Promisified version of fs.stat(). * Promisified version of fs.stat().
*/ */
const fsStat = util.promisify(fs.stat); const fsStat = util__namespace.promisify(fs__namespace.stat);
const fsCreateReadStream = fs.createReadStream; const fsCreateReadStream = fs__namespace.createReadStream;
/** /**
* A BlobClient represents a URL to an Azure Storage blob; the blob may be a block blob, * A BlobClient represents a URL to an Azure Storage blob; the blob may be a block blob,
@ -28070,12 +28945,17 @@ class BlobClient extends StorageClient {
const blobName = blobNameOrOptions; const blobName = blobNameOrOptions;
const extractedCreds = extractConnectionStringParts(urlOrConnectionString); const extractedCreds = extractConnectionStringParts(urlOrConnectionString);
if (extractedCreds.kind === "AccountConnString") { if (extractedCreds.kind === "AccountConnString") {
{ if (coreHttp.isNode) {
const sharedKeyCredential = new StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey); const sharedKeyCredential = new StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey);
url = appendToURLPath(appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)); url = appendToURLPath(appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName));
if (!options.proxyOptions) {
options.proxyOptions = coreHttp.getDefaultProxySettings(extractedCreds.proxyUri); options.proxyOptions = coreHttp.getDefaultProxySettings(extractedCreds.proxyUri);
}
pipeline = newPipeline(sharedKeyCredential, options); pipeline = newPipeline(sharedKeyCredential, options);
} }
else {
throw new Error("Account connection string is only supported in Node.js environment");
}
} }
else if (extractedCreds.kind === "SASConnString") { else if (extractedCreds.kind === "SASConnString") {
url = url =
@ -28092,10 +28972,8 @@ class BlobClient extends StorageClient {
throw new Error("Expecting non-empty strings for containerName and blobName parameters"); throw new Error("Expecting non-empty strings for containerName and blobName parameters");
} }
super(url, pipeline); super(url, pipeline);
({ ({ blobName: this._name, containerName: this._containerName } =
blobName: this._name, this.getBlobAndContainerNamesFromUrl());
containerName: this._containerName
} = this.getBlobAndContainerNamesFromUrl());
this.blobContext = new Blob$1(this.storageClientContext); this.blobContext = new Blob$1(this.storageClientContext);
this._snapshot = getURLParameter(this.url, URLConstants.Parameters.SNAPSHOT); this._snapshot = getURLParameter(this.url, URLConstants.Parameters.SNAPSHOT);
this._versionId = getURLParameter(this.url, URLConstants.Parameters.VERSIONID); this._versionId = getURLParameter(this.url, URLConstants.Parameters.VERSIONID);
@ -28220,11 +29098,13 @@ class BlobClient extends StorageClient {
const { span, updatedOptions } = createSpan("BlobClient-download", options); const { span, updatedOptions } = createSpan("BlobClient-download", options);
try { try {
const res = await this.blobContext.download(Object.assign({ abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), requestOptions: { const res = await this.blobContext.download(Object.assign({ abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), requestOptions: {
onDownloadProgress: coreHttp.isNode ? undefined : options.onProgress // for Node.js, progress is reported by RetriableReadableStream onDownloadProgress: coreHttp.isNode ? undefined : options.onProgress, // for Node.js, progress is reported by RetriableReadableStream
}, range: offset === 0 && !count ? undefined : rangeToString({ offset, count }), rangeGetContentMD5: options.rangeGetContentMD5, rangeGetContentCRC64: options.rangeGetContentCrc64, snapshot: options.snapshot, cpkInfo: options.customerProvidedKey }, convertTracingToRequestOptionsBase(updatedOptions))); }, range: offset === 0 && !count ? undefined : rangeToString({ offset, count }), rangeGetContentMD5: options.rangeGetContentMD5, rangeGetContentCRC64: options.rangeGetContentCrc64, snapshot: options.snapshot, cpkInfo: options.customerProvidedKey }, convertTracingToRequestOptionsBase(updatedOptions)));
const wrappedRes = Object.assign(Object.assign({}, res), { _response: res._response, objectReplicationDestinationPolicyId: res.objectReplicationPolicyId, objectReplicationSourceProperties: parseObjectReplicationRecord(res.objectReplicationRules) }); const wrappedRes = Object.assign(Object.assign({}, res), { _response: res._response, objectReplicationDestinationPolicyId: res.objectReplicationPolicyId, objectReplicationSourceProperties: parseObjectReplicationRecord(res.objectReplicationRules) });
// Return browser response immediately // Return browser response immediately
if (false) {} if (!coreHttp.isNode) {
return wrappedRes;
}
// We support retrying when download stream unexpected ends in Node.js runtime // We support retrying when download stream unexpected ends in Node.js runtime
// Following code shouldn't be bundled into browser build, however some // Following code shouldn't be bundled into browser build, however some
// bundlers may try to bundle following code and "FileReadResponse.ts". // bundlers may try to bundle following code and "FileReadResponse.ts".
@ -28249,16 +29129,16 @@ class BlobClient extends StorageClient {
ifModifiedSince: options.conditions.ifModifiedSince, ifModifiedSince: options.conditions.ifModifiedSince,
ifNoneMatch: options.conditions.ifNoneMatch, ifNoneMatch: options.conditions.ifNoneMatch,
ifUnmodifiedSince: options.conditions.ifUnmodifiedSince, ifUnmodifiedSince: options.conditions.ifUnmodifiedSince,
ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions,
}, },
range: rangeToString({ range: rangeToString({
count: offset + res.contentLength - start, count: offset + res.contentLength - start,
offset: start offset: start,
}), }),
rangeGetContentMD5: options.rangeGetContentMD5, rangeGetContentMD5: options.rangeGetContentMD5,
rangeGetContentCRC64: options.rangeGetContentCrc64, rangeGetContentCRC64: options.rangeGetContentCrc64,
snapshot: options.snapshot, snapshot: options.snapshot,
cpkInfo: options.customerProvidedKey cpkInfo: options.customerProvidedKey,
}; };
// Debug purpose only // Debug purpose only
// console.log( // console.log(
@ -28269,13 +29149,13 @@ class BlobClient extends StorageClient {
return (await this.blobContext.download(Object.assign({ abortSignal: options.abortSignal }, updatedDownloadOptions))).readableStreamBody; return (await this.blobContext.download(Object.assign({ abortSignal: options.abortSignal }, updatedDownloadOptions))).readableStreamBody;
}, offset, res.contentLength, { }, offset, res.contentLength, {
maxRetryRequests: options.maxRetryRequests, maxRetryRequests: options.maxRetryRequests,
onProgress: options.onProgress onProgress: options.onProgress,
}); });
} }
catch (e) { catch (e) {
span.setStatus({ span.setStatus({
code: coreTracing.SpanStatusCode.ERROR, code: coreTracing.SpanStatusCode.ERROR,
message: e.message message: e.message,
}); });
throw e; throw e;
} }
@ -28300,21 +29180,23 @@ class BlobClient extends StorageClient {
abortSignal: options.abortSignal, abortSignal: options.abortSignal,
customerProvidedKey: options.customerProvidedKey, customerProvidedKey: options.customerProvidedKey,
conditions: options.conditions, conditions: options.conditions,
tracingOptions: updatedOptions.tracingOptions tracingOptions: updatedOptions.tracingOptions,
}); });
return true; return true;
} }
catch (e) { catch (e) {
if (e.statusCode === 404) { if (e.statusCode === 404) {
span.setStatus({ // Expected exception when checking blob existence
code: coreTracing.SpanStatusCode.ERROR,
message: "Expected exception when checking blob existence"
});
return false; return false;
} }
else if (e.statusCode === 409 &&
e.details.errorCode === BlobUsesCustomerSpecifiedEncryptionMsg) {
// Expected exception when checking blob existence
return true;
}
span.setStatus({ span.setStatus({
code: coreTracing.SpanStatusCode.ERROR, code: coreTracing.SpanStatusCode.ERROR,
message: e.message message: e.message,
}); });
throw e; throw e;
} }
@ -28346,7 +29228,7 @@ class BlobClient extends StorageClient {
catch (e) { catch (e) {
span.setStatus({ span.setStatus({
code: coreTracing.SpanStatusCode.ERROR, code: coreTracing.SpanStatusCode.ERROR,
message: e.message message: e.message,
}); });
throw e; throw e;
} }
@ -28373,7 +29255,7 @@ class BlobClient extends StorageClient {
catch (e) { catch (e) {
span.setStatus({ span.setStatus({
code: coreTracing.SpanStatusCode.ERROR, code: coreTracing.SpanStatusCode.ERROR,
message: e.message message: e.message,
}); });
throw e; throw e;
} }
@ -28395,20 +29277,19 @@ class BlobClient extends StorageClient {
const { span, updatedOptions } = createSpan("BlobClient-deleteIfExists", options); const { span, updatedOptions } = createSpan("BlobClient-deleteIfExists", options);
try { try {
const res = await this.delete(updatedOptions); const res = await this.delete(updatedOptions);
return Object.assign(Object.assign({ succeeded: true }, res), { _response: res._response // _response is made non-enumerable return Object.assign(Object.assign({ succeeded: true }, res), { _response: res._response });
});
} }
catch (e) { catch (e) {
if (((_a = e.details) === null || _a === void 0 ? void 0 : _a.errorCode) === "BlobNotFound") { if (((_a = e.details) === null || _a === void 0 ? void 0 : _a.errorCode) === "BlobNotFound") {
span.setStatus({ span.setStatus({
code: coreTracing.SpanStatusCode.ERROR, code: coreTracing.SpanStatusCode.ERROR,
message: "Expected exception when deleting a blob or snapshot only if it exists." message: "Expected exception when deleting a blob or snapshot only if it exists.",
}); });
return Object.assign(Object.assign({ succeeded: false }, (_b = e.response) === null || _b === void 0 ? void 0 : _b.parsedHeaders), { _response: e.response }); return Object.assign(Object.assign({ succeeded: false }, (_b = e.response) === null || _b === void 0 ? void 0 : _b.parsedHeaders), { _response: e.response });
} }
span.setStatus({ span.setStatus({
code: coreTracing.SpanStatusCode.ERROR, code: coreTracing.SpanStatusCode.ERROR,
message: e.message message: e.message,
}); });
throw e; throw e;
} }
@ -28432,7 +29313,7 @@ class BlobClient extends StorageClient {
catch (e) { catch (e) {
span.setStatus({ span.setStatus({
code: coreTracing.SpanStatusCode.ERROR, code: coreTracing.SpanStatusCode.ERROR,
message: e.message message: e.message,
}); });
throw e; throw e;
} }
@ -28466,7 +29347,7 @@ class BlobClient extends StorageClient {
catch (e) { catch (e) {
span.setStatus({ span.setStatus({
code: coreTracing.SpanStatusCode.ERROR, code: coreTracing.SpanStatusCode.ERROR,
message: e.message message: e.message,
}); });
throw e; throw e;
} }
@ -28496,7 +29377,7 @@ class BlobClient extends StorageClient {
catch (e) { catch (e) {
span.setStatus({ span.setStatus({
code: coreTracing.SpanStatusCode.ERROR, code: coreTracing.SpanStatusCode.ERROR,
message: e.message message: e.message,
}); });
throw e; throw e;
} }
@ -28522,7 +29403,7 @@ class BlobClient extends StorageClient {
catch (e) { catch (e) {
span.setStatus({ span.setStatus({
code: coreTracing.SpanStatusCode.ERROR, code: coreTracing.SpanStatusCode.ERROR,
message: e.message message: e.message,
}); });
throw e; throw e;
} }
@ -28546,7 +29427,7 @@ class BlobClient extends StorageClient {
catch (e) { catch (e) {
span.setStatus({ span.setStatus({
code: coreTracing.SpanStatusCode.ERROR, code: coreTracing.SpanStatusCode.ERROR,
message: e.message message: e.message,
}); });
throw e; throw e;
} }
@ -28580,7 +29461,7 @@ class BlobClient extends StorageClient {
catch (e) { catch (e) {
span.setStatus({ span.setStatus({
code: coreTracing.SpanStatusCode.ERROR, code: coreTracing.SpanStatusCode.ERROR,
message: e.message message: e.message,
}); });
throw e; throw e;
} }
@ -28664,7 +29545,7 @@ class BlobClient extends StorageClient {
const client = { const client = {
abortCopyFromURL: (...args) => this.abortCopyFromURL(...args), abortCopyFromURL: (...args) => this.abortCopyFromURL(...args),
getProperties: (...args) => this.getProperties(...args), getProperties: (...args) => this.getProperties(...args),
startCopyFromURL: (...args) => this.startCopyFromURL(...args) startCopyFromURL: (...args) => this.startCopyFromURL(...args),
}; };
const poller = new BlobBeginCopyFromUrlPoller({ const poller = new BlobBeginCopyFromUrlPoller({
blobClient: client, blobClient: client,
@ -28672,7 +29553,7 @@ class BlobClient extends StorageClient {
intervalInMs: options.intervalInMs, intervalInMs: options.intervalInMs,
onProgress: options.onProgress, onProgress: options.onProgress,
resumeFrom: options.resumeFrom, resumeFrom: options.resumeFrom,
startCopyFromURLOptions: options startCopyFromURLOptions: options,
}); });
// Trigger the startCopyFromURL call by calling poll. // Trigger the startCopyFromURL call by calling poll.
// Any errors from this method should be surfaced to the user. // Any errors from this method should be surfaced to the user.
@ -28695,7 +29576,7 @@ class BlobClient extends StorageClient {
catch (e) { catch (e) {
span.setStatus({ span.setStatus({
code: coreTracing.SpanStatusCode.ERROR, code: coreTracing.SpanStatusCode.ERROR,
message: e.message message: e.message,
}); });
throw e; throw e;
} }
@ -28721,13 +29602,13 @@ class BlobClient extends StorageClient {
sourceIfMatch: options.sourceConditions.ifMatch, sourceIfMatch: options.sourceConditions.ifMatch,
sourceIfModifiedSince: options.sourceConditions.ifModifiedSince, sourceIfModifiedSince: options.sourceConditions.ifModifiedSince,
sourceIfNoneMatch: options.sourceConditions.ifNoneMatch, sourceIfNoneMatch: options.sourceConditions.ifNoneMatch,
sourceIfUnmodifiedSince: options.sourceConditions.ifUnmodifiedSince sourceIfUnmodifiedSince: options.sourceConditions.ifUnmodifiedSince,
}, sourceContentMD5: options.sourceContentMD5, copySourceAuthorization: httpAuthorizationToString(options.sourceAuthorization), blobTagsString: toBlobTagsString(options.tags), immutabilityPolicyExpiry: (_b = options.immutabilityPolicy) === null || _b === void 0 ? void 0 : _b.expiriesOn, immutabilityPolicyMode: (_c = options.immutabilityPolicy) === null || _c === void 0 ? void 0 : _c.policyMode, legalHold: options.legalHold }, convertTracingToRequestOptionsBase(updatedOptions))); }, sourceContentMD5: options.sourceContentMD5, copySourceAuthorization: httpAuthorizationToString(options.sourceAuthorization), blobTagsString: toBlobTagsString(options.tags), immutabilityPolicyExpiry: (_b = options.immutabilityPolicy) === null || _b === void 0 ? void 0 : _b.expiriesOn, immutabilityPolicyMode: (_c = options.immutabilityPolicy) === null || _c === void 0 ? void 0 : _c.policyMode, legalHold: options.legalHold, encryptionScope: options.encryptionScope }, convertTracingToRequestOptionsBase(updatedOptions)));
} }
catch (e) { catch (e) {
span.setStatus({ span.setStatus({
code: coreTracing.SpanStatusCode.ERROR, code: coreTracing.SpanStatusCode.ERROR,
message: e.message message: e.message,
}); });
throw e; throw e;
} }
@ -28755,7 +29636,7 @@ class BlobClient extends StorageClient {
catch (e) { catch (e) {
span.setStatus({ span.setStatus({
code: coreTracing.SpanStatusCode.ERROR, code: coreTracing.SpanStatusCode.ERROR,
message: e.message message: e.message,
}); });
throw e; throw e;
} }
@ -28832,7 +29713,7 @@ class BlobClient extends StorageClient {
conditions: options.conditions, conditions: options.conditions,
maxRetryRequests: options.maxRetryRequestsPerBlock, maxRetryRequests: options.maxRetryRequestsPerBlock,
customerProvidedKey: options.customerProvidedKey, customerProvidedKey: options.customerProvidedKey,
tracingOptions: Object.assign(Object.assign({}, options.tracingOptions), convertTracingToRequestOptionsBase(updatedOptions)) tracingOptions: Object.assign(Object.assign({}, options.tracingOptions), convertTracingToRequestOptionsBase(updatedOptions)),
}); });
const stream = response.readableStreamBody; const stream = response.readableStreamBody;
await streamToBuffer(stream, buffer, off - offset, chunkEnd - offset); await streamToBuffer(stream, buffer, off - offset, chunkEnd - offset);
@ -28851,7 +29732,7 @@ class BlobClient extends StorageClient {
catch (e) { catch (e) {
span.setStatus({ span.setStatus({
code: coreTracing.SpanStatusCode.ERROR, code: coreTracing.SpanStatusCode.ERROR,
message: e.message message: e.message,
}); });
throw e; throw e;
} }
@ -28889,7 +29770,7 @@ class BlobClient extends StorageClient {
catch (e) { catch (e) {
span.setStatus({ span.setStatus({
code: coreTracing.SpanStatusCode.ERROR, code: coreTracing.SpanStatusCode.ERROR,
message: e.message message: e.message,
}); });
throw e; throw e;
} }
@ -28970,13 +29851,13 @@ class BlobClient extends StorageClient {
sourceIfModifiedSince: options.sourceConditions.ifModifiedSince, sourceIfModifiedSince: options.sourceConditions.ifModifiedSince,
sourceIfNoneMatch: options.sourceConditions.ifNoneMatch, sourceIfNoneMatch: options.sourceConditions.ifNoneMatch,
sourceIfUnmodifiedSince: options.sourceConditions.ifUnmodifiedSince, sourceIfUnmodifiedSince: options.sourceConditions.ifUnmodifiedSince,
sourceIfTags: options.sourceConditions.tagConditions sourceIfTags: options.sourceConditions.tagConditions,
}, immutabilityPolicyExpiry: (_b = options.immutabilityPolicy) === null || _b === void 0 ? void 0 : _b.expiriesOn, immutabilityPolicyMode: (_c = options.immutabilityPolicy) === null || _c === void 0 ? void 0 : _c.policyMode, legalHold: options.legalHold, rehydratePriority: options.rehydratePriority, tier: toAccessTier(options.tier), blobTagsString: toBlobTagsString(options.tags), sealBlob: options.sealBlob }, convertTracingToRequestOptionsBase(updatedOptions))); }, immutabilityPolicyExpiry: (_b = options.immutabilityPolicy) === null || _b === void 0 ? void 0 : _b.expiriesOn, immutabilityPolicyMode: (_c = options.immutabilityPolicy) === null || _c === void 0 ? void 0 : _c.policyMode, legalHold: options.legalHold, rehydratePriority: options.rehydratePriority, tier: toAccessTier(options.tier), blobTagsString: toBlobTagsString(options.tags), sealBlob: options.sealBlob }, convertTracingToRequestOptionsBase(updatedOptions)));
} }
catch (e) { catch (e) {
span.setStatus({ span.setStatus({
code: coreTracing.SpanStatusCode.ERROR, code: coreTracing.SpanStatusCode.ERROR,
message: e.message message: e.message,
}); });
throw e; throw e;
} }
@ -29017,7 +29898,7 @@ class BlobClient extends StorageClient {
catch (e) { catch (e) {
span.setStatus({ span.setStatus({
code: coreTracing.SpanStatusCode.ERROR, code: coreTracing.SpanStatusCode.ERROR,
message: e.message message: e.message,
}); });
throw e; throw e;
} }
@ -29038,7 +29919,7 @@ class BlobClient extends StorageClient {
catch (e) { catch (e) {
span.setStatus({ span.setStatus({
code: coreTracing.SpanStatusCode.ERROR, code: coreTracing.SpanStatusCode.ERROR,
message: e.message message: e.message,
}); });
throw e; throw e;
} }
@ -29059,7 +29940,7 @@ class BlobClient extends StorageClient {
catch (e) { catch (e) {
span.setStatus({ span.setStatus({
code: coreTracing.SpanStatusCode.ERROR, code: coreTracing.SpanStatusCode.ERROR,
message: e.message message: e.message,
}); });
throw e; throw e;
} }
@ -29110,12 +29991,17 @@ class AppendBlobClient extends BlobClient {
const blobName = blobNameOrOptions; const blobName = blobNameOrOptions;
const extractedCreds = extractConnectionStringParts(urlOrConnectionString); const extractedCreds = extractConnectionStringParts(urlOrConnectionString);
if (extractedCreds.kind === "AccountConnString") { if (extractedCreds.kind === "AccountConnString") {
{ if (coreHttp.isNode) {
const sharedKeyCredential = new StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey); const sharedKeyCredential = new StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey);
url = appendToURLPath(appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)); url = appendToURLPath(appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName));
if (!options.proxyOptions) {
options.proxyOptions = coreHttp.getDefaultProxySettings(extractedCreds.proxyUri); options.proxyOptions = coreHttp.getDefaultProxySettings(extractedCreds.proxyUri);
}
pipeline = newPipeline(sharedKeyCredential, options); pipeline = newPipeline(sharedKeyCredential, options);
} }
else {
throw new Error("Account connection string is only supported in Node.js environment");
}
} }
else if (extractedCreds.kind === "SASConnString") { else if (extractedCreds.kind === "SASConnString") {
url = url =
@ -29170,7 +30056,7 @@ class AppendBlobClient extends BlobClient {
catch (e) { catch (e) {
span.setStatus({ span.setStatus({
code: coreTracing.SpanStatusCode.ERROR, code: coreTracing.SpanStatusCode.ERROR,
message: e.message message: e.message,
}); });
throw e; throw e;
} }
@ -29191,20 +30077,19 @@ class AppendBlobClient extends BlobClient {
const conditions = { ifNoneMatch: ETagAny }; const conditions = { ifNoneMatch: ETagAny };
try { try {
const res = await this.create(Object.assign(Object.assign({}, updatedOptions), { conditions })); const res = await this.create(Object.assign(Object.assign({}, updatedOptions), { conditions }));
return Object.assign(Object.assign({ succeeded: true }, res), { _response: res._response // _response is made non-enumerable return Object.assign(Object.assign({ succeeded: true }, res), { _response: res._response });
});
} }
catch (e) { catch (e) {
if (((_a = e.details) === null || _a === void 0 ? void 0 : _a.errorCode) === "BlobAlreadyExists") { if (((_a = e.details) === null || _a === void 0 ? void 0 : _a.errorCode) === "BlobAlreadyExists") {
span.setStatus({ span.setStatus({
code: coreTracing.SpanStatusCode.ERROR, code: coreTracing.SpanStatusCode.ERROR,
message: "Expected exception when creating a blob only if it does not already exist." message: "Expected exception when creating a blob only if it does not already exist.",
}); });
return Object.assign(Object.assign({ succeeded: false }, (_b = e.response) === null || _b === void 0 ? void 0 : _b.parsedHeaders), { _response: e.response }); return Object.assign(Object.assign({ succeeded: false }, (_b = e.response) === null || _b === void 0 ? void 0 : _b.parsedHeaders), { _response: e.response });
} }
span.setStatus({ span.setStatus({
code: coreTracing.SpanStatusCode.ERROR, code: coreTracing.SpanStatusCode.ERROR,
message: e.message message: e.message,
}); });
throw e; throw e;
} }
@ -29227,7 +30112,7 @@ class AppendBlobClient extends BlobClient {
catch (e) { catch (e) {
span.setStatus({ span.setStatus({
code: coreTracing.SpanStatusCode.ERROR, code: coreTracing.SpanStatusCode.ERROR,
message: e.message message: e.message,
}); });
throw e; throw e;
} }
@ -29266,13 +30151,13 @@ class AppendBlobClient extends BlobClient {
try { try {
ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps);
return await this.appendBlobContext.appendBlock(contentLength, body, Object.assign({ abortSignal: options.abortSignal, appendPositionAccessConditions: options.conditions, leaseAccessConditions: options.conditions, modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), requestOptions: { return await this.appendBlobContext.appendBlock(contentLength, body, Object.assign({ abortSignal: options.abortSignal, appendPositionAccessConditions: options.conditions, leaseAccessConditions: options.conditions, modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), requestOptions: {
onUploadProgress: options.onProgress onUploadProgress: options.onProgress,
}, transactionalContentMD5: options.transactionalContentMD5, transactionalContentCrc64: options.transactionalContentCrc64, cpkInfo: options.customerProvidedKey, encryptionScope: options.encryptionScope }, convertTracingToRequestOptionsBase(updatedOptions))); }, transactionalContentMD5: options.transactionalContentMD5, transactionalContentCrc64: options.transactionalContentCrc64, cpkInfo: options.customerProvidedKey, encryptionScope: options.encryptionScope }, convertTracingToRequestOptionsBase(updatedOptions)));
} }
catch (e) { catch (e) {
span.setStatus({ span.setStatus({
code: coreTracing.SpanStatusCode.ERROR, code: coreTracing.SpanStatusCode.ERROR,
message: e.message message: e.message,
}); });
throw e; throw e;
} }
@ -29305,13 +30190,13 @@ class AppendBlobClient extends BlobClient {
sourceIfMatch: options.sourceConditions.ifMatch, sourceIfMatch: options.sourceConditions.ifMatch,
sourceIfModifiedSince: options.sourceConditions.ifModifiedSince, sourceIfModifiedSince: options.sourceConditions.ifModifiedSince,
sourceIfNoneMatch: options.sourceConditions.ifNoneMatch, sourceIfNoneMatch: options.sourceConditions.ifNoneMatch,
sourceIfUnmodifiedSince: options.sourceConditions.ifUnmodifiedSince sourceIfUnmodifiedSince: options.sourceConditions.ifUnmodifiedSince,
}, copySourceAuthorization: httpAuthorizationToString(options.sourceAuthorization), cpkInfo: options.customerProvidedKey, encryptionScope: options.encryptionScope }, convertTracingToRequestOptionsBase(updatedOptions))); }, copySourceAuthorization: httpAuthorizationToString(options.sourceAuthorization), cpkInfo: options.customerProvidedKey, encryptionScope: options.encryptionScope }, convertTracingToRequestOptionsBase(updatedOptions)));
} }
catch (e) { catch (e) {
span.setStatus({ span.setStatus({
code: coreTracing.SpanStatusCode.ERROR, code: coreTracing.SpanStatusCode.ERROR,
message: e.message message: e.message,
}); });
throw e; throw e;
} }
@ -29362,12 +30247,17 @@ class BlockBlobClient extends BlobClient {
const blobName = blobNameOrOptions; const blobName = blobNameOrOptions;
const extractedCreds = extractConnectionStringParts(urlOrConnectionString); const extractedCreds = extractConnectionStringParts(urlOrConnectionString);
if (extractedCreds.kind === "AccountConnString") { if (extractedCreds.kind === "AccountConnString") {
{ if (coreHttp.isNode) {
const sharedKeyCredential = new StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey); const sharedKeyCredential = new StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey);
url = appendToURLPath(appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)); url = appendToURLPath(appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName));
if (!options.proxyOptions) {
options.proxyOptions = coreHttp.getDefaultProxySettings(extractedCreds.proxyUri); options.proxyOptions = coreHttp.getDefaultProxySettings(extractedCreds.proxyUri);
}
pipeline = newPipeline(sharedKeyCredential, options); pipeline = newPipeline(sharedKeyCredential, options);
} }
else {
throw new Error("Account connection string is only supported in Node.js environment");
}
} }
else if (extractedCreds.kind === "SASConnString") { else if (extractedCreds.kind === "SASConnString") {
url = url =
@ -29433,23 +30323,25 @@ class BlockBlobClient extends BlobClient {
ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps);
const { span, updatedOptions } = createSpan("BlockBlobClient-query", options); const { span, updatedOptions } = createSpan("BlockBlobClient-query", options);
try { try {
if (false) {} if (!coreHttp.isNode) {
throw new Error("This operation currently is only supported in Node.js.");
}
const response = await this._blobContext.query(Object.assign({ abortSignal: options.abortSignal, queryRequest: { const response = await this._blobContext.query(Object.assign({ abortSignal: options.abortSignal, queryRequest: {
queryType: "SQL", queryType: "SQL",
expression: query, expression: query,
inputSerialization: toQuerySerialization(options.inputTextConfiguration), inputSerialization: toQuerySerialization(options.inputTextConfiguration),
outputSerialization: toQuerySerialization(options.outputTextConfiguration) outputSerialization: toQuerySerialization(options.outputTextConfiguration),
}, leaseAccessConditions: options.conditions, modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }) }, convertTracingToRequestOptionsBase(updatedOptions))); }, leaseAccessConditions: options.conditions, modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }) }, convertTracingToRequestOptionsBase(updatedOptions)));
return new BlobQueryResponse(response, { return new BlobQueryResponse(response, {
abortSignal: options.abortSignal, abortSignal: options.abortSignal,
onProgress: options.onProgress, onProgress: options.onProgress,
onError: options.onError onError: options.onError,
}); });
} }
catch (e) { catch (e) {
span.setStatus({ span.setStatus({
code: coreTracing.SpanStatusCode.ERROR, code: coreTracing.SpanStatusCode.ERROR,
message: e.message message: e.message,
}); });
throw e; throw e;
} }
@ -29491,13 +30383,13 @@ class BlockBlobClient extends BlobClient {
try { try {
ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps);
return await this.blockBlobContext.upload(contentLength, body, Object.assign({ abortSignal: options.abortSignal, blobHttpHeaders: options.blobHTTPHeaders, leaseAccessConditions: options.conditions, metadata: options.metadata, modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), requestOptions: { return await this.blockBlobContext.upload(contentLength, body, Object.assign({ abortSignal: options.abortSignal, blobHttpHeaders: options.blobHTTPHeaders, leaseAccessConditions: options.conditions, metadata: options.metadata, modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), requestOptions: {
onUploadProgress: options.onProgress onUploadProgress: options.onProgress,
}, cpkInfo: options.customerProvidedKey, encryptionScope: options.encryptionScope, immutabilityPolicyExpiry: (_b = options.immutabilityPolicy) === null || _b === void 0 ? void 0 : _b.expiriesOn, immutabilityPolicyMode: (_c = options.immutabilityPolicy) === null || _c === void 0 ? void 0 : _c.policyMode, legalHold: options.legalHold, tier: toAccessTier(options.tier), blobTagsString: toBlobTagsString(options.tags) }, convertTracingToRequestOptionsBase(updatedOptions))); }, cpkInfo: options.customerProvidedKey, encryptionScope: options.encryptionScope, immutabilityPolicyExpiry: (_b = options.immutabilityPolicy) === null || _b === void 0 ? void 0 : _b.expiriesOn, immutabilityPolicyMode: (_c = options.immutabilityPolicy) === null || _c === void 0 ? void 0 : _c.policyMode, legalHold: options.legalHold, tier: toAccessTier(options.tier), blobTagsString: toBlobTagsString(options.tags) }, convertTracingToRequestOptionsBase(updatedOptions)));
} }
catch (e) { catch (e) {
span.setStatus({ span.setStatus({
code: coreTracing.SpanStatusCode.ERROR, code: coreTracing.SpanStatusCode.ERROR,
message: e.message message: e.message,
}); });
throw e; throw e;
} }
@ -29534,13 +30426,13 @@ class BlockBlobClient extends BlobClient {
sourceIfModifiedSince: (_b = options.sourceConditions) === null || _b === void 0 ? void 0 : _b.ifModifiedSince, sourceIfModifiedSince: (_b = options.sourceConditions) === null || _b === void 0 ? void 0 : _b.ifModifiedSince,
sourceIfNoneMatch: (_c = options.sourceConditions) === null || _c === void 0 ? void 0 : _c.ifNoneMatch, sourceIfNoneMatch: (_c = options.sourceConditions) === null || _c === void 0 ? void 0 : _c.ifNoneMatch,
sourceIfUnmodifiedSince: (_d = options.sourceConditions) === null || _d === void 0 ? void 0 : _d.ifUnmodifiedSince, sourceIfUnmodifiedSince: (_d = options.sourceConditions) === null || _d === void 0 ? void 0 : _d.ifUnmodifiedSince,
sourceIfTags: (_e = options.sourceConditions) === null || _e === void 0 ? void 0 : _e.tagConditions sourceIfTags: (_e = options.sourceConditions) === null || _e === void 0 ? void 0 : _e.tagConditions,
}, cpkInfo: options.customerProvidedKey, copySourceAuthorization: httpAuthorizationToString(options.sourceAuthorization), tier: toAccessTier(options.tier), blobTagsString: toBlobTagsString(options.tags) }), convertTracingToRequestOptionsBase(updatedOptions))); }, cpkInfo: options.customerProvidedKey, copySourceAuthorization: httpAuthorizationToString(options.sourceAuthorization), tier: toAccessTier(options.tier), blobTagsString: toBlobTagsString(options.tags) }), convertTracingToRequestOptionsBase(updatedOptions)));
} }
catch (e) { catch (e) {
span.setStatus({ span.setStatus({
code: coreTracing.SpanStatusCode.ERROR, code: coreTracing.SpanStatusCode.ERROR,
message: e.message message: e.message,
}); });
throw e; throw e;
} }
@ -29564,13 +30456,13 @@ class BlockBlobClient extends BlobClient {
try { try {
ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps);
return await this.blockBlobContext.stageBlock(blockId, contentLength, body, Object.assign({ abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, requestOptions: { return await this.blockBlobContext.stageBlock(blockId, contentLength, body, Object.assign({ abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, requestOptions: {
onUploadProgress: options.onProgress onUploadProgress: options.onProgress,
}, transactionalContentMD5: options.transactionalContentMD5, transactionalContentCrc64: options.transactionalContentCrc64, cpkInfo: options.customerProvidedKey, encryptionScope: options.encryptionScope }, convertTracingToRequestOptionsBase(updatedOptions))); }, transactionalContentMD5: options.transactionalContentMD5, transactionalContentCrc64: options.transactionalContentCrc64, cpkInfo: options.customerProvidedKey, encryptionScope: options.encryptionScope }, convertTracingToRequestOptionsBase(updatedOptions)));
} }
catch (e) { catch (e) {
span.setStatus({ span.setStatus({
code: coreTracing.SpanStatusCode.ERROR, code: coreTracing.SpanStatusCode.ERROR,
message: e.message message: e.message,
}); });
throw e; throw e;
} }
@ -29608,7 +30500,7 @@ class BlockBlobClient extends BlobClient {
catch (e) { catch (e) {
span.setStatus({ span.setStatus({
code: coreTracing.SpanStatusCode.ERROR, code: coreTracing.SpanStatusCode.ERROR,
message: e.message message: e.message,
}); });
throw e; throw e;
} }
@ -29639,7 +30531,7 @@ class BlockBlobClient extends BlobClient {
catch (e) { catch (e) {
span.setStatus({ span.setStatus({
code: coreTracing.SpanStatusCode.ERROR, code: coreTracing.SpanStatusCode.ERROR,
message: e.message message: e.message,
}); });
throw e; throw e;
} }
@ -29673,7 +30565,7 @@ class BlockBlobClient extends BlobClient {
catch (e) { catch (e) {
span.setStatus({ span.setStatus({
code: coreTracing.SpanStatusCode.ERROR, code: coreTracing.SpanStatusCode.ERROR,
message: e.message message: e.message,
}); });
throw e; throw e;
} }
@ -29700,7 +30592,7 @@ class BlockBlobClient extends BlobClient {
async uploadData(data, options = {}) { async uploadData(data, options = {}) {
const { span, updatedOptions } = createSpan("BlockBlobClient-uploadData", options); const { span, updatedOptions } = createSpan("BlockBlobClient-uploadData", options);
try { try {
if (true) { if (coreHttp.isNode) {
let buffer; let buffer;
if (data instanceof Buffer) { if (data instanceof Buffer) {
buffer = data; buffer = data;
@ -29714,12 +30606,15 @@ class BlockBlobClient extends BlobClient {
} }
return this.uploadSeekableInternal((offset, size) => buffer.slice(offset, offset + size), buffer.byteLength, updatedOptions); return this.uploadSeekableInternal((offset, size) => buffer.slice(offset, offset + size), buffer.byteLength, updatedOptions);
} }
else {} else {
const browserBlob = new Blob([data]);
return this.uploadSeekableInternal((offset, size) => browserBlob.slice(offset, offset + size), browserBlob.size, updatedOptions);
}
} }
catch (e) { catch (e) {
span.setStatus({ span.setStatus({
code: coreTracing.SpanStatusCode.ERROR, code: coreTracing.SpanStatusCode.ERROR,
message: e.message message: e.message,
}); });
throw e; throw e;
} }
@ -29755,7 +30650,7 @@ class BlockBlobClient extends BlobClient {
catch (e) { catch (e) {
span.setStatus({ span.setStatus({
code: coreTracing.SpanStatusCode.ERROR, code: coreTracing.SpanStatusCode.ERROR,
message: e.message message: e.message,
}); });
throw e; throw e;
} }
@ -29768,7 +30663,7 @@ class BlockBlobClient extends BlobClient {
* Uploads data to block blob. Requires a bodyFactory as the data source, * Uploads data to block blob. Requires a bodyFactory as the data source,
* which need to return a {@link HttpRequestBody} object with the offset and size provided. * which need to return a {@link HttpRequestBody} object with the offset and size provided.
* *
* When data length is no more than the specifiled {@link BlockBlobParallelUploadOptions.maxSingleShotSize} (default is * When data length is no more than the specified {@link BlockBlobParallelUploadOptions.maxSingleShotSize} (default is
* {@link BLOCK_BLOB_MAX_UPLOAD_BLOB_BYTES}), this method will use 1 {@link upload} call to finish the upload. * {@link BLOCK_BLOB_MAX_UPLOAD_BLOB_BYTES}), this method will use 1 {@link upload} call to finish the upload.
* Otherwise, this method will call {@link stageBlock} to upload blocks, and finally call {@link commitBlockList} * Otherwise, this method will call {@link stageBlock} to upload blocks, and finally call {@link commitBlockList}
* to commit the block list. * to commit the block list.
@ -29834,14 +30729,14 @@ class BlockBlobClient extends BlobClient {
abortSignal: options.abortSignal, abortSignal: options.abortSignal,
conditions: options.conditions, conditions: options.conditions,
encryptionScope: options.encryptionScope, encryptionScope: options.encryptionScope,
tracingOptions: updatedOptions.tracingOptions tracingOptions: updatedOptions.tracingOptions,
}); });
// Update progress after block is successfully uploaded to server, in case of block trying // Update progress after block is successfully uploaded to server, in case of block trying
// TODO: Hook with convenience layer progress event in finer level // TODO: Hook with convenience layer progress event in finer level
transferProgress += contentLength; transferProgress += contentLength;
if (options.onProgress) { if (options.onProgress) {
options.onProgress({ options.onProgress({
loadedBytes: transferProgress loadedBytes: transferProgress,
}); });
} }
}); });
@ -29852,7 +30747,7 @@ class BlockBlobClient extends BlobClient {
catch (e) { catch (e) {
span.setStatus({ span.setStatus({
code: coreTracing.SpanStatusCode.ERROR, code: coreTracing.SpanStatusCode.ERROR,
message: e.message message: e.message,
}); });
throw e; throw e;
} }
@ -29881,14 +30776,14 @@ class BlockBlobClient extends BlobClient {
return () => fsCreateReadStream(filePath, { return () => fsCreateReadStream(filePath, {
autoClose: true, autoClose: true,
end: count ? offset + count - 1 : Infinity, end: count ? offset + count - 1 : Infinity,
start: offset start: offset,
}); });
}, size, Object.assign(Object.assign({}, options), { tracingOptions: Object.assign(Object.assign({}, options.tracingOptions), convertTracingToRequestOptionsBase(updatedOptions)) })); }, size, Object.assign(Object.assign({}, options), { tracingOptions: Object.assign(Object.assign({}, options.tracingOptions), convertTracingToRequestOptionsBase(updatedOptions)) }));
} }
catch (e) { catch (e) {
span.setStatus({ span.setStatus({
code: coreTracing.SpanStatusCode.ERROR, code: coreTracing.SpanStatusCode.ERROR,
message: e.message message: e.message,
}); });
throw e; throw e;
} }
@ -29932,7 +30827,7 @@ class BlockBlobClient extends BlobClient {
await this.stageBlock(blockID, body, length, { await this.stageBlock(blockID, body, length, {
conditions: options.conditions, conditions: options.conditions,
encryptionScope: options.encryptionScope, encryptionScope: options.encryptionScope,
tracingOptions: updatedOptions.tracingOptions tracingOptions: updatedOptions.tracingOptions,
}); });
// Update progress after block is successfully uploaded to server, in case of block trying // Update progress after block is successfully uploaded to server, in case of block trying
transferProgress += length; transferProgress += length;
@ -29951,7 +30846,7 @@ class BlockBlobClient extends BlobClient {
catch (e) { catch (e) {
span.setStatus({ span.setStatus({
code: coreTracing.SpanStatusCode.ERROR, code: coreTracing.SpanStatusCode.ERROR,
message: e.message message: e.message,
}); });
throw e; throw e;
} }
@ -30002,12 +30897,17 @@ class PageBlobClient extends BlobClient {
const blobName = blobNameOrOptions; const blobName = blobNameOrOptions;
const extractedCreds = extractConnectionStringParts(urlOrConnectionString); const extractedCreds = extractConnectionStringParts(urlOrConnectionString);
if (extractedCreds.kind === "AccountConnString") { if (extractedCreds.kind === "AccountConnString") {
{ if (coreHttp.isNode) {
const sharedKeyCredential = new StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey); const sharedKeyCredential = new StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey);
url = appendToURLPath(appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)); url = appendToURLPath(appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName));
if (!options.proxyOptions) {
options.proxyOptions = coreHttp.getDefaultProxySettings(extractedCreds.proxyUri); options.proxyOptions = coreHttp.getDefaultProxySettings(extractedCreds.proxyUri);
}
pipeline = newPipeline(sharedKeyCredential, options); pipeline = newPipeline(sharedKeyCredential, options);
} }
else {
throw new Error("Account connection string is only supported in Node.js environment");
}
} }
else if (extractedCreds.kind === "SASConnString") { else if (extractedCreds.kind === "SASConnString") {
url = url =
@ -30057,7 +30957,7 @@ class PageBlobClient extends BlobClient {
catch (e) { catch (e) {
span.setStatus({ span.setStatus({
code: coreTracing.SpanStatusCode.ERROR, code: coreTracing.SpanStatusCode.ERROR,
message: e.message message: e.message,
}); });
throw e; throw e;
} }
@ -30080,20 +30980,19 @@ class PageBlobClient extends BlobClient {
try { try {
const conditions = { ifNoneMatch: ETagAny }; const conditions = { ifNoneMatch: ETagAny };
const res = await this.create(size, Object.assign(Object.assign({}, options), { conditions, tracingOptions: updatedOptions.tracingOptions })); const res = await this.create(size, Object.assign(Object.assign({}, options), { conditions, tracingOptions: updatedOptions.tracingOptions }));
return Object.assign(Object.assign({ succeeded: true }, res), { _response: res._response // _response is made non-enumerable return Object.assign(Object.assign({ succeeded: true }, res), { _response: res._response });
});
} }
catch (e) { catch (e) {
if (((_a = e.details) === null || _a === void 0 ? void 0 : _a.errorCode) === "BlobAlreadyExists") { if (((_a = e.details) === null || _a === void 0 ? void 0 : _a.errorCode) === "BlobAlreadyExists") {
span.setStatus({ span.setStatus({
code: coreTracing.SpanStatusCode.ERROR, code: coreTracing.SpanStatusCode.ERROR,
message: "Expected exception when creating a blob only if it does not already exist." message: "Expected exception when creating a blob only if it does not already exist.",
}); });
return Object.assign(Object.assign({ succeeded: false }, (_b = e.response) === null || _b === void 0 ? void 0 : _b.parsedHeaders), { _response: e.response }); return Object.assign(Object.assign({ succeeded: false }, (_b = e.response) === null || _b === void 0 ? void 0 : _b.parsedHeaders), { _response: e.response });
} }
span.setStatus({ span.setStatus({
code: coreTracing.SpanStatusCode.ERROR, code: coreTracing.SpanStatusCode.ERROR,
message: e.message message: e.message,
}); });
throw e; throw e;
} }
@ -30118,13 +31017,13 @@ class PageBlobClient extends BlobClient {
try { try {
ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps);
return await this.pageBlobContext.uploadPages(count, body, Object.assign({ abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), requestOptions: { return await this.pageBlobContext.uploadPages(count, body, Object.assign({ abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), requestOptions: {
onUploadProgress: options.onProgress onUploadProgress: options.onProgress,
}, range: rangeToString({ offset, count }), sequenceNumberAccessConditions: options.conditions, transactionalContentMD5: options.transactionalContentMD5, transactionalContentCrc64: options.transactionalContentCrc64, cpkInfo: options.customerProvidedKey, encryptionScope: options.encryptionScope }, convertTracingToRequestOptionsBase(updatedOptions))); }, range: rangeToString({ offset, count }), sequenceNumberAccessConditions: options.conditions, transactionalContentMD5: options.transactionalContentMD5, transactionalContentCrc64: options.transactionalContentCrc64, cpkInfo: options.customerProvidedKey, encryptionScope: options.encryptionScope }, convertTracingToRequestOptionsBase(updatedOptions)));
} }
catch (e) { catch (e) {
span.setStatus({ span.setStatus({
code: coreTracing.SpanStatusCode.ERROR, code: coreTracing.SpanStatusCode.ERROR,
message: e.message message: e.message,
}); });
throw e; throw e;
} }
@ -30154,13 +31053,13 @@ class PageBlobClient extends BlobClient {
sourceIfMatch: options.sourceConditions.ifMatch, sourceIfMatch: options.sourceConditions.ifMatch,
sourceIfModifiedSince: options.sourceConditions.ifModifiedSince, sourceIfModifiedSince: options.sourceConditions.ifModifiedSince,
sourceIfNoneMatch: options.sourceConditions.ifNoneMatch, sourceIfNoneMatch: options.sourceConditions.ifNoneMatch,
sourceIfUnmodifiedSince: options.sourceConditions.ifUnmodifiedSince sourceIfUnmodifiedSince: options.sourceConditions.ifUnmodifiedSince,
}, cpkInfo: options.customerProvidedKey, encryptionScope: options.encryptionScope, copySourceAuthorization: httpAuthorizationToString(options.sourceAuthorization) }, convertTracingToRequestOptionsBase(updatedOptions))); }, cpkInfo: options.customerProvidedKey, encryptionScope: options.encryptionScope, copySourceAuthorization: httpAuthorizationToString(options.sourceAuthorization) }, convertTracingToRequestOptionsBase(updatedOptions)));
} }
catch (e) { catch (e) {
span.setStatus({ span.setStatus({
code: coreTracing.SpanStatusCode.ERROR, code: coreTracing.SpanStatusCode.ERROR,
message: e.message message: e.message,
}); });
throw e; throw e;
} }
@ -30187,7 +31086,7 @@ class PageBlobClient extends BlobClient {
catch (e) { catch (e) {
span.setStatus({ span.setStatus({
code: coreTracing.SpanStatusCode.ERROR, code: coreTracing.SpanStatusCode.ERROR,
message: e.message message: e.message,
}); });
throw e; throw e;
} }
@ -30216,7 +31115,7 @@ class PageBlobClient extends BlobClient {
catch (e) { catch (e) {
span.setStatus({ span.setStatus({
code: coreTracing.SpanStatusCode.ERROR, code: coreTracing.SpanStatusCode.ERROR,
message: e.message message: e.message,
}); });
throw e; throw e;
} }
@ -30246,7 +31145,7 @@ class PageBlobClient extends BlobClient {
catch (e) { catch (e) {
span.setStatus({ span.setStatus({
code: coreTracing.SpanStatusCode.ERROR, code: coreTracing.SpanStatusCode.ERROR,
message: e.message message: e.message,
}); });
throw e; throw e;
} }
@ -30276,7 +31175,7 @@ class PageBlobClient extends BlobClient {
catch (e) { catch (e) {
span.setStatus({ span.setStatus({
code: coreTracing.SpanStatusCode.ERROR, code: coreTracing.SpanStatusCode.ERROR,
message: e.message message: e.message,
}); });
throw e; throw e;
} }
@ -30302,7 +31201,7 @@ class PageBlobClient extends BlobClient {
catch (e) { catch (e) {
span.setStatus({ span.setStatus({
code: coreTracing.SpanStatusCode.ERROR, code: coreTracing.SpanStatusCode.ERROR,
message: e.message message: e.message,
}); });
throw e; throw e;
} }
@ -30329,7 +31228,7 @@ class PageBlobClient extends BlobClient {
catch (e) { catch (e) {
span.setStatus({ span.setStatus({
code: coreTracing.SpanStatusCode.ERROR, code: coreTracing.SpanStatusCode.ERROR,
message: e.message message: e.message,
}); });
throw e; throw e;
} }
@ -30359,7 +31258,7 @@ class PageBlobClient extends BlobClient {
catch (e) { catch (e) {
span.setStatus({ span.setStatus({
code: coreTracing.SpanStatusCode.ERROR, code: coreTracing.SpanStatusCode.ERROR,
message: e.message message: e.message,
}); });
throw e; throw e;
} }
@ -30507,7 +31406,7 @@ class BatchResponseParser {
return { return {
subResponses: deserializedSubResponses, subResponses: deserializedSubResponses,
subResponsesSucceededCount: subResponsesSucceededCount, subResponsesSucceededCount: subResponsesSucceededCount,
subResponsesFailedCount: subResponsesFailedCount subResponsesFailedCount: subResponsesFailedCount,
}; };
} }
} }
@ -30654,7 +31553,7 @@ class BlobBatch {
this.setBatchType("delete"); this.setBatchType("delete");
await this.addSubRequestInternal({ await this.addSubRequestInternal({
url: url, url: url,
credential: credential credential: credential,
}, async () => { }, async () => {
await new BlobClient(url, this.batchRequest.createPipeline(credential)).delete(updatedOptions); await new BlobClient(url, this.batchRequest.createPipeline(credential)).delete(updatedOptions);
}); });
@ -30662,7 +31561,7 @@ class BlobBatch {
catch (e) { catch (e) {
span.setStatus({ span.setStatus({
code: coreTracing.SpanStatusCode.ERROR, code: coreTracing.SpanStatusCode.ERROR,
message: e.message message: e.message,
}); });
throw e; throw e;
} }
@ -30701,7 +31600,7 @@ class BlobBatch {
this.setBatchType("setAccessTier"); this.setBatchType("setAccessTier");
await this.addSubRequestInternal({ await this.addSubRequestInternal({
url: url, url: url,
credential: credential credential: credential,
}, async () => { }, async () => {
await new BlobClient(url, this.batchRequest.createPipeline(credential)).setAccessTier(tier, updatedOptions); await new BlobClient(url, this.batchRequest.createPipeline(credential)).setAccessTier(tier, updatedOptions);
}); });
@ -30709,7 +31608,7 @@ class BlobBatch {
catch (e) { catch (e) {
span.setStatus({ span.setStatus({
code: coreTracing.SpanStatusCode.ERROR, code: coreTracing.SpanStatusCode.ERROR,
message: e.message message: e.message,
}); });
throw e; throw e;
} }
@ -30766,7 +31665,7 @@ class InnerBatchRequest {
this.subRequestPrefix, this.subRequestPrefix,
`${HeaderConstants.CONTENT_ID}: ${this.operationCount}`, `${HeaderConstants.CONTENT_ID}: ${this.operationCount}`,
"", "",
`${request.method.toString()} ${getURLPathAndQuery(request.url)} ${HTTP_VERSION_1_1}${HTTP_LINE_ENDING}` // sub request start line with method `${request.method.toString()} ${getURLPathAndQuery(request.url)} ${HTTP_VERSION_1_1}${HTTP_LINE_ENDING}`, // sub request start line with method
].join(HTTP_LINE_ENDING); ].join(HTTP_LINE_ENDING);
for (const header of request.headers.headersArray()) { for (const header of request.headers.headersArray()) {
this.body += `${header.name}: ${header.value}${HTTP_LINE_ENDING}`; this.body += `${header.name}: ${header.value}${HTTP_LINE_ENDING}`;
@ -30806,7 +31705,7 @@ class BatchRequestAssemblePolicy extends coreHttp.BaseRequestPolicy {
this.dummyResponse = { this.dummyResponse = {
request: new coreHttp.WebResource(), request: new coreHttp.WebResource(),
status: 200, status: 200,
headers: new coreHttp.HttpHeaders() headers: new coreHttp.HttpHeaders(),
}; };
this.batchRequest = batchRequest; this.batchRequest = batchRequest;
} }
@ -30973,14 +31872,14 @@ class BlobBatchClient {
version: rawBatchResponse.version, version: rawBatchResponse.version,
subResponses: responseSummary.subResponses, subResponses: responseSummary.subResponses,
subResponsesSucceededCount: responseSummary.subResponsesSucceededCount, subResponsesSucceededCount: responseSummary.subResponsesSucceededCount,
subResponsesFailedCount: responseSummary.subResponsesFailedCount subResponsesFailedCount: responseSummary.subResponsesFailedCount,
}; };
return res; return res;
} }
catch (e) { catch (e) {
span.setStatus({ span.setStatus({
code: coreTracing.SpanStatusCode.ERROR, code: coreTracing.SpanStatusCode.ERROR,
message: e.message message: e.message,
}); });
throw e; throw e;
} }
@ -31026,12 +31925,17 @@ class ContainerClient extends StorageClient {
const containerName = credentialOrPipelineOrContainerName; const containerName = credentialOrPipelineOrContainerName;
const extractedCreds = extractConnectionStringParts(urlOrConnectionString); const extractedCreds = extractConnectionStringParts(urlOrConnectionString);
if (extractedCreds.kind === "AccountConnString") { if (extractedCreds.kind === "AccountConnString") {
{ if (coreHttp.isNode) {
const sharedKeyCredential = new StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey); const sharedKeyCredential = new StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey);
url = appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)); url = appendToURLPath(extractedCreds.url, encodeURIComponent(containerName));
if (!options.proxyOptions) {
options.proxyOptions = coreHttp.getDefaultProxySettings(extractedCreds.proxyUri); options.proxyOptions = coreHttp.getDefaultProxySettings(extractedCreds.proxyUri);
}
pipeline = newPipeline(sharedKeyCredential, options); pipeline = newPipeline(sharedKeyCredential, options);
} }
else {
throw new Error("Account connection string is only supported in Node.js environment");
}
} }
else if (extractedCreds.kind === "SASConnString") { else if (extractedCreds.kind === "SASConnString") {
url = url =
@ -31083,7 +31987,7 @@ class ContainerClient extends StorageClient {
catch (e) { catch (e) {
span.setStatus({ span.setStatus({
code: coreTracing.SpanStatusCode.ERROR, code: coreTracing.SpanStatusCode.ERROR,
message: e.message message: e.message,
}); });
throw e; throw e;
} }
@ -31103,20 +32007,19 @@ class ContainerClient extends StorageClient {
const { span, updatedOptions } = createSpan("ContainerClient-createIfNotExists", options); const { span, updatedOptions } = createSpan("ContainerClient-createIfNotExists", options);
try { try {
const res = await this.create(updatedOptions); const res = await this.create(updatedOptions);
return Object.assign(Object.assign({ succeeded: true }, res), { _response: res._response // _response is made non-enumerable return Object.assign(Object.assign({ succeeded: true }, res), { _response: res._response });
});
} }
catch (e) { catch (e) {
if (((_a = e.details) === null || _a === void 0 ? void 0 : _a.errorCode) === "ContainerAlreadyExists") { if (((_a = e.details) === null || _a === void 0 ? void 0 : _a.errorCode) === "ContainerAlreadyExists") {
span.setStatus({ span.setStatus({
code: coreTracing.SpanStatusCode.ERROR, code: coreTracing.SpanStatusCode.ERROR,
message: "Expected exception when creating a container only if it does not already exist." message: "Expected exception when creating a container only if it does not already exist.",
}); });
return Object.assign(Object.assign({ succeeded: false }, (_b = e.response) === null || _b === void 0 ? void 0 : _b.parsedHeaders), { _response: e.response }); return Object.assign(Object.assign({ succeeded: false }, (_b = e.response) === null || _b === void 0 ? void 0 : _b.parsedHeaders), { _response: e.response });
} }
span.setStatus({ span.setStatus({
code: coreTracing.SpanStatusCode.ERROR, code: coreTracing.SpanStatusCode.ERROR,
message: e.message message: e.message,
}); });
throw e; throw e;
} }
@ -31138,7 +32041,7 @@ class ContainerClient extends StorageClient {
try { try {
await this.getProperties({ await this.getProperties({
abortSignal: options.abortSignal, abortSignal: options.abortSignal,
tracingOptions: updatedOptions.tracingOptions tracingOptions: updatedOptions.tracingOptions,
}); });
return true; return true;
} }
@ -31146,13 +32049,13 @@ class ContainerClient extends StorageClient {
if (e.statusCode === 404) { if (e.statusCode === 404) {
span.setStatus({ span.setStatus({
code: coreTracing.SpanStatusCode.ERROR, code: coreTracing.SpanStatusCode.ERROR,
message: "Expected exception when checking container existence" message: "Expected exception when checking container existence",
}); });
return false; return false;
} }
span.setStatus({ span.setStatus({
code: coreTracing.SpanStatusCode.ERROR, code: coreTracing.SpanStatusCode.ERROR,
message: e.message message: e.message,
}); });
throw e; throw e;
} }
@ -31226,7 +32129,7 @@ class ContainerClient extends StorageClient {
catch (e) { catch (e) {
span.setStatus({ span.setStatus({
code: coreTracing.SpanStatusCode.ERROR, code: coreTracing.SpanStatusCode.ERROR,
message: e.message message: e.message,
}); });
throw e; throw e;
} }
@ -31252,7 +32155,7 @@ class ContainerClient extends StorageClient {
catch (e) { catch (e) {
span.setStatus({ span.setStatus({
code: coreTracing.SpanStatusCode.ERROR, code: coreTracing.SpanStatusCode.ERROR,
message: e.message message: e.message,
}); });
throw e; throw e;
} }
@ -31272,20 +32175,19 @@ class ContainerClient extends StorageClient {
const { span, updatedOptions } = createSpan("ContainerClient-deleteIfExists", options); const { span, updatedOptions } = createSpan("ContainerClient-deleteIfExists", options);
try { try {
const res = await this.delete(updatedOptions); const res = await this.delete(updatedOptions);
return Object.assign(Object.assign({ succeeded: true }, res), { _response: res._response // _response is made non-enumerable return Object.assign(Object.assign({ succeeded: true }, res), { _response: res._response });
});
} }
catch (e) { catch (e) {
if (((_a = e.details) === null || _a === void 0 ? void 0 : _a.errorCode) === "ContainerNotFound") { if (((_a = e.details) === null || _a === void 0 ? void 0 : _a.errorCode) === "ContainerNotFound") {
span.setStatus({ span.setStatus({
code: coreTracing.SpanStatusCode.ERROR, code: coreTracing.SpanStatusCode.ERROR,
message: "Expected exception when deleting a container only if it exists." message: "Expected exception when deleting a container only if it exists.",
}); });
return Object.assign(Object.assign({ succeeded: false }, (_b = e.response) === null || _b === void 0 ? void 0 : _b.parsedHeaders), { _response: e.response }); return Object.assign(Object.assign({ succeeded: false }, (_b = e.response) === null || _b === void 0 ? void 0 : _b.parsedHeaders), { _response: e.response });
} }
span.setStatus({ span.setStatus({
code: coreTracing.SpanStatusCode.ERROR, code: coreTracing.SpanStatusCode.ERROR,
message: e.message message: e.message,
}); });
throw e; throw e;
} }
@ -31319,7 +32221,7 @@ class ContainerClient extends StorageClient {
catch (e) { catch (e) {
span.setStatus({ span.setStatus({
code: coreTracing.SpanStatusCode.ERROR, code: coreTracing.SpanStatusCode.ERROR,
message: e.message message: e.message,
}); });
throw e; throw e;
} }
@ -31355,13 +32257,13 @@ class ContainerClient extends StorageClient {
requestId: response.requestId, requestId: response.requestId,
clientRequestId: response.clientRequestId, clientRequestId: response.clientRequestId,
signedIdentifiers: [], signedIdentifiers: [],
version: response.version version: response.version,
}; };
for (const identifier of response) { for (const identifier of response) {
let accessPolicy = undefined; let accessPolicy = undefined;
if (identifier.accessPolicy) { if (identifier.accessPolicy) {
accessPolicy = { accessPolicy = {
permissions: identifier.accessPolicy.permissions permissions: identifier.accessPolicy.permissions,
}; };
if (identifier.accessPolicy.expiresOn) { if (identifier.accessPolicy.expiresOn) {
accessPolicy.expiresOn = new Date(identifier.accessPolicy.expiresOn); accessPolicy.expiresOn = new Date(identifier.accessPolicy.expiresOn);
@ -31372,7 +32274,7 @@ class ContainerClient extends StorageClient {
} }
res.signedIdentifiers.push({ res.signedIdentifiers.push({
accessPolicy, accessPolicy,
id: identifier.id id: identifier.id,
}); });
} }
return res; return res;
@ -31380,7 +32282,7 @@ class ContainerClient extends StorageClient {
catch (e) { catch (e) {
span.setStatus({ span.setStatus({
code: coreTracing.SpanStatusCode.ERROR, code: coreTracing.SpanStatusCode.ERROR,
message: e.message message: e.message,
}); });
throw e; throw e;
} }
@ -31419,9 +32321,9 @@ class ContainerClient extends StorageClient {
permissions: identifier.accessPolicy.permissions, permissions: identifier.accessPolicy.permissions,
startsOn: identifier.accessPolicy.startsOn startsOn: identifier.accessPolicy.startsOn
? truncatedISO8061Date(identifier.accessPolicy.startsOn) ? truncatedISO8061Date(identifier.accessPolicy.startsOn)
: "" : "",
}, },
id: identifier.id id: identifier.id,
}); });
} }
return await this.containerContext.setAccessPolicy(Object.assign({ abortSignal: options.abortSignal, access, containerAcl: acl, leaseAccessConditions: options.conditions, modifiedAccessConditions: options.conditions }, convertTracingToRequestOptionsBase(updatedOptions))); return await this.containerContext.setAccessPolicy(Object.assign({ abortSignal: options.abortSignal, access, containerAcl: acl, leaseAccessConditions: options.conditions, modifiedAccessConditions: options.conditions }, convertTracingToRequestOptionsBase(updatedOptions)));
@ -31429,7 +32331,7 @@ class ContainerClient extends StorageClient {
catch (e) { catch (e) {
span.setStatus({ span.setStatus({
code: coreTracing.SpanStatusCode.ERROR, code: coreTracing.SpanStatusCode.ERROR,
message: e.message message: e.message,
}); });
throw e; throw e;
} }
@ -31475,13 +32377,13 @@ class ContainerClient extends StorageClient {
const response = await blockBlobClient.upload(body, contentLength, updatedOptions); const response = await blockBlobClient.upload(body, contentLength, updatedOptions);
return { return {
blockBlobClient, blockBlobClient,
response response,
}; };
} }
catch (e) { catch (e) {
span.setStatus({ span.setStatus({
code: coreTracing.SpanStatusCode.ERROR, code: coreTracing.SpanStatusCode.ERROR,
message: e.message message: e.message,
}); });
throw e; throw e;
} }
@ -31512,7 +32414,7 @@ class ContainerClient extends StorageClient {
catch (e) { catch (e) {
span.setStatus({ span.setStatus({
code: coreTracing.SpanStatusCode.ERROR, code: coreTracing.SpanStatusCode.ERROR,
message: e.message message: e.message,
}); });
throw e; throw e;
} }
@ -31534,8 +32436,12 @@ class ContainerClient extends StorageClient {
const { span, updatedOptions } = createSpan("ContainerClient-listBlobFlatSegment", options); const { span, updatedOptions } = createSpan("ContainerClient-listBlobFlatSegment", options);
try { try {
const response = await this.containerContext.listBlobFlatSegment(Object.assign(Object.assign({ marker }, options), convertTracingToRequestOptionsBase(updatedOptions))); const response = await this.containerContext.listBlobFlatSegment(Object.assign(Object.assign({ marker }, options), convertTracingToRequestOptionsBase(updatedOptions)));
const wrappedResponse = Object.assign(Object.assign({}, response), { _response: response._response, segment: Object.assign(Object.assign({}, response.segment), { blobItems: response.segment.blobItems.map((blobItemInteral) => { response.segment.blobItems = [];
const blobItem = Object.assign(Object.assign({}, blobItemInteral), { tags: toTags(blobItemInteral.blobTags), objectReplicationSourceProperties: parseObjectReplicationRecord(blobItemInteral.objectReplicationMetadata) }); if (response.segment["Blob"] !== undefined) {
response.segment.blobItems = ProcessBlobItems(response.segment["Blob"]);
}
const wrappedResponse = Object.assign(Object.assign({}, response), { _response: Object.assign(Object.assign({}, response._response), { parsedBody: ConvertInternalResponseOfListBlobFlat(response._response.parsedBody) }), segment: Object.assign(Object.assign({}, response.segment), { blobItems: response.segment.blobItems.map((blobItemInteral) => {
const blobItem = Object.assign(Object.assign({}, blobItemInteral), { name: BlobNameToString(blobItemInteral.name), tags: toTags(blobItemInteral.blobTags), objectReplicationSourceProperties: parseObjectReplicationRecord(blobItemInteral.objectReplicationMetadata) });
return blobItem; return blobItem;
}) }) }); }) }) });
return wrappedResponse; return wrappedResponse;
@ -31543,7 +32449,7 @@ class ContainerClient extends StorageClient {
catch (e) { catch (e) {
span.setStatus({ span.setStatus({
code: coreTracing.SpanStatusCode.ERROR, code: coreTracing.SpanStatusCode.ERROR,
message: e.message message: e.message,
}); });
throw e; throw e;
} }
@ -31563,19 +32469,33 @@ class ContainerClient extends StorageClient {
* @param options - Options to Container List Blob Hierarchy Segment operation. * @param options - Options to Container List Blob Hierarchy Segment operation.
*/ */
async listBlobHierarchySegment(delimiter, marker, options = {}) { async listBlobHierarchySegment(delimiter, marker, options = {}) {
var _a;
const { span, updatedOptions } = createSpan("ContainerClient-listBlobHierarchySegment", options); const { span, updatedOptions } = createSpan("ContainerClient-listBlobHierarchySegment", options);
try { try {
const response = await this.containerContext.listBlobHierarchySegment(delimiter, Object.assign(Object.assign({ marker }, options), convertTracingToRequestOptionsBase(updatedOptions))); const response = await this.containerContext.listBlobHierarchySegment(delimiter, Object.assign(Object.assign({ marker }, options), convertTracingToRequestOptionsBase(updatedOptions)));
const wrappedResponse = Object.assign(Object.assign({}, response), { _response: response._response, segment: Object.assign(Object.assign({}, response.segment), { blobItems: response.segment.blobItems.map((blobItemInteral) => { response.segment.blobItems = [];
const blobItem = Object.assign(Object.assign({}, blobItemInteral), { tags: toTags(blobItemInteral.blobTags), objectReplicationSourceProperties: parseObjectReplicationRecord(blobItemInteral.objectReplicationMetadata) }); if (response.segment["Blob"] !== undefined) {
response.segment.blobItems = ProcessBlobItems(response.segment["Blob"]);
}
response.segment.blobPrefixes = [];
if (response.segment["BlobPrefix"] !== undefined) {
response.segment.blobPrefixes = ProcessBlobPrefixes(response.segment["BlobPrefix"]);
}
const wrappedResponse = Object.assign(Object.assign({}, response), { _response: Object.assign(Object.assign({}, response._response), { parsedBody: ConvertInternalResponseOfListBlobHierarchy(response._response.parsedBody) }), segment: Object.assign(Object.assign({}, response.segment), { blobItems: response.segment.blobItems.map((blobItemInteral) => {
const blobItem = Object.assign(Object.assign({}, blobItemInteral), { name: BlobNameToString(blobItemInteral.name), tags: toTags(blobItemInteral.blobTags), objectReplicationSourceProperties: parseObjectReplicationRecord(blobItemInteral.objectReplicationMetadata) });
return blobItem; return blobItem;
}), blobPrefixes: (_a = response.segment.blobPrefixes) === null || _a === void 0 ? void 0 : _a.map((blobPrefixInternal) => {
const blobPrefix = {
name: BlobNameToString(blobPrefixInternal.name),
};
return blobPrefix;
}) }) }); }) }) });
return wrappedResponse; return wrappedResponse;
} }
catch (e) { catch (e) {
span.setStatus({ span.setStatus({
code: coreTracing.SpanStatusCode.ERROR, code: coreTracing.SpanStatusCode.ERROR,
message: e.message message: e.message,
}); });
throw e; throw e;
} }
@ -31757,7 +32677,7 @@ class ContainerClient extends StorageClient {
*/ */
byPage: (settings = {}) => { byPage: (settings = {}) => {
return this.listSegments(settings.continuationToken, Object.assign({ maxPageSize: settings.maxPageSize }, updatedOptions)); return this.listSegments(settings.continuationToken, Object.assign({ maxPageSize: settings.maxPageSize }, updatedOptions));
} },
}; };
} }
/** /**
@ -31831,7 +32751,7 @@ class ContainerClient extends StorageClient {
* if (item.kind === "prefix") { * if (item.kind === "prefix") {
* console.log(`\tBlobPrefix: ${item.name}`); * console.log(`\tBlobPrefix: ${item.name}`);
* } else { * } else {
* console.log(`\tBlobItem: name - ${item.name}, last modified - ${item.properties.lastModified}`); * console.log(`\tBlobItem: name - ${item.name}`);
* } * }
* } * }
* ``` * ```
@ -31846,7 +32766,7 @@ class ContainerClient extends StorageClient {
* if (item.kind === "prefix") { * if (item.kind === "prefix") {
* console.log(`\tBlobPrefix: ${item.name}`); * console.log(`\tBlobPrefix: ${item.name}`);
* } else { * } else {
* console.log(`\tBlobItem: name - ${item.name}, last modified - ${item.properties.lastModified}`); * console.log(`\tBlobItem: name - ${item.name}`);
* } * }
* entity = await iter.next(); * entity = await iter.next();
* } * }
@ -31864,7 +32784,7 @@ class ContainerClient extends StorageClient {
* } * }
* } * }
* for (const blob of response.segment.blobItems) { * for (const blob of response.segment.blobItems) {
* console.log(`\tBlobItem: name - ${blob.name}, last modified - ${blob.properties.lastModified}`); * console.log(`\tBlobItem: name - ${blob.name}`);
* } * }
* } * }
* ``` * ```
@ -31875,7 +32795,9 @@ class ContainerClient extends StorageClient {
* console.log("Listing blobs by hierarchy by page, specifying a prefix and a max page size"); * console.log("Listing blobs by hierarchy by page, specifying a prefix and a max page size");
* *
* let i = 1; * let i = 1;
* for await (const response of containerClient.listBlobsByHierarchy("/", { prefix: "prefix2/sub1/"}).byPage({ maxPageSize: 2 })) { * for await (const response of containerClient
* .listBlobsByHierarchy("/", { prefix: "prefix2/sub1/" })
* .byPage({ maxPageSize: 2 })) {
* console.log(`Page ${i++}`); * console.log(`Page ${i++}`);
* const segment = response.segment; * const segment = response.segment;
* *
@ -31886,7 +32808,7 @@ class ContainerClient extends StorageClient {
* } * }
* *
* for (const blob of response.segment.blobItems) { * for (const blob of response.segment.blobItems) {
* console.log(`\tBlobItem: name - ${blob.name}, last modified - ${blob.properties.lastModified}`); * console.log(`\tBlobItem: name - ${blob.name}`);
* } * }
* } * }
* ``` * ```
@ -31953,7 +32875,208 @@ class ContainerClient extends StorageClient {
*/ */
byPage: (settings = {}) => { byPage: (settings = {}) => {
return this.listHierarchySegments(delimiter, settings.continuationToken, Object.assign({ maxPageSize: settings.maxPageSize }, updatedOptions)); return this.listHierarchySegments(delimiter, settings.continuationToken, Object.assign({ maxPageSize: settings.maxPageSize }, updatedOptions));
},
};
} }
/**
* The Filter Blobs operation enables callers to list blobs in the container whose tags
* match a given search expression.
*
* @param tagFilterSqlExpression - The where parameter enables the caller to query blobs whose tags match a given expression.
* The given expression must evaluate to true for a blob to be returned in the results.
* The[OData - ABNF] filter syntax rule defines the formal grammar for the value of the where query parameter;
* however, only a subset of the OData filter syntax is supported in the Blob service.
* @param marker - A string value that identifies the portion of
* the list of blobs to be returned with the next listing operation. The
* operation returns the continuationToken value within the response body if the
* listing operation did not return all blobs remaining to be listed
* with the current page. The continuationToken value can be used as the value for
* the marker parameter in a subsequent call to request the next page of list
* items. The marker value is opaque to the client.
* @param options - Options to find blobs by tags.
*/
async findBlobsByTagsSegment(tagFilterSqlExpression, marker, options = {}) {
const { span, updatedOptions } = createSpan("ContainerClient-findBlobsByTagsSegment", options);
try {
const response = await this.containerContext.filterBlobs(Object.assign({ abortSignal: options.abortSignal, where: tagFilterSqlExpression, marker, maxPageSize: options.maxPageSize }, convertTracingToRequestOptionsBase(updatedOptions)));
const wrappedResponse = Object.assign(Object.assign({}, response), { _response: response._response, blobs: response.blobs.map((blob) => {
var _a;
let tagValue = "";
if (((_a = blob.tags) === null || _a === void 0 ? void 0 : _a.blobTagSet.length) === 1) {
tagValue = blob.tags.blobTagSet[0].value;
}
return Object.assign(Object.assign({}, blob), { tags: toTags(blob.tags), tagValue });
}) });
return wrappedResponse;
}
catch (e) {
span.setStatus({
code: coreTracing.SpanStatusCode.ERROR,
message: e.message,
});
throw e;
}
finally {
span.end();
}
}
/**
* Returns an AsyncIterableIterator for ContainerFindBlobsByTagsSegmentResponse.
*
* @param tagFilterSqlExpression - The where parameter enables the caller to query blobs whose tags match a given expression.
* The given expression must evaluate to true for a blob to be returned in the results.
* The[OData - ABNF] filter syntax rule defines the formal grammar for the value of the where query parameter;
* however, only a subset of the OData filter syntax is supported in the Blob service.
* @param marker - A string value that identifies the portion of
* the list of blobs to be returned with the next listing operation. The
* operation returns the continuationToken value within the response body if the
* listing operation did not return all blobs remaining to be listed
* with the current page. The continuationToken value can be used as the value for
* the marker parameter in a subsequent call to request the next page of list
* items. The marker value is opaque to the client.
* @param options - Options to find blobs by tags.
*/
findBlobsByTagsSegments(tagFilterSqlExpression, marker, options = {}) {
return tslib.__asyncGenerator(this, arguments, function* findBlobsByTagsSegments_1() {
let response;
if (!!marker || marker === undefined) {
do {
response = yield tslib.__await(this.findBlobsByTagsSegment(tagFilterSqlExpression, marker, options));
response.blobs = response.blobs || [];
marker = response.continuationToken;
yield yield tslib.__await(response);
} while (marker);
}
});
}
/**
* Returns an AsyncIterableIterator for blobs.
*
* @param tagFilterSqlExpression - The where parameter enables the caller to query blobs whose tags match a given expression.
* The given expression must evaluate to true for a blob to be returned in the results.
* The[OData - ABNF] filter syntax rule defines the formal grammar for the value of the where query parameter;
* however, only a subset of the OData filter syntax is supported in the Blob service.
* @param options - Options to findBlobsByTagsItems.
*/
findBlobsByTagsItems(tagFilterSqlExpression, options = {}) {
return tslib.__asyncGenerator(this, arguments, function* findBlobsByTagsItems_1() {
var e_3, _a;
let marker;
try {
for (var _b = tslib.__asyncValues(this.findBlobsByTagsSegments(tagFilterSqlExpression, marker, options)), _c; _c = yield tslib.__await(_b.next()), !_c.done;) {
const segment = _c.value;
yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(segment.blobs)));
}
}
catch (e_3_1) { e_3 = { error: e_3_1 }; }
finally {
try {
if (_c && !_c.done && (_a = _b.return)) yield tslib.__await(_a.call(_b));
}
finally { if (e_3) throw e_3.error; }
}
});
}
/**
* Returns an async iterable iterator to find all blobs with specified tag
* under the specified container.
*
* .byPage() returns an async iterable iterator to list the blobs in pages.
*
* Example using `for await` syntax:
*
* ```js
* let i = 1;
* for await (const blob of containerClient.findBlobsByTags("tagkey='tagvalue'")) {
* console.log(`Blob ${i++}: ${blob.name}`);
* }
* ```
*
* Example using `iter.next()`:
*
* ```js
* let i = 1;
* const iter = containerClient.findBlobsByTags("tagkey='tagvalue'");
* let blobItem = await iter.next();
* while (!blobItem.done) {
* console.log(`Blob ${i++}: ${blobItem.value.name}`);
* blobItem = await iter.next();
* }
* ```
*
* Example using `byPage()`:
*
* ```js
* // passing optional maxPageSize in the page settings
* let i = 1;
* for await (const response of containerClient.findBlobsByTags("tagkey='tagvalue'").byPage({ maxPageSize: 20 })) {
* if (response.blobs) {
* for (const blob of response.blobs) {
* console.log(`Blob ${i++}: ${blob.name}`);
* }
* }
* }
* ```
*
* Example using paging with a marker:
*
* ```js
* let i = 1;
* let iterator = containerClient.findBlobsByTags("tagkey='tagvalue'").byPage({ maxPageSize: 2 });
* let response = (await iterator.next()).value;
*
* // Prints 2 blob names
* if (response.blobs) {
* for (const blob of response.blobs) {
* console.log(`Blob ${i++}: ${blob.name}`);
* }
* }
*
* // Gets next marker
* let marker = response.continuationToken;
* // Passing next marker as continuationToken
* iterator = containerClient
* .findBlobsByTags("tagkey='tagvalue'")
* .byPage({ continuationToken: marker, maxPageSize: 10 });
* response = (await iterator.next()).value;
*
* // Prints blob names
* if (response.blobs) {
* for (const blob of response.blobs) {
* console.log(`Blob ${i++}: ${blob.name}`);
* }
* }
* ```
*
* @param tagFilterSqlExpression - The where parameter enables the caller to query blobs whose tags match a given expression.
* The given expression must evaluate to true for a blob to be returned in the results.
* The[OData - ABNF] filter syntax rule defines the formal grammar for the value of the where query parameter;
* however, only a subset of the OData filter syntax is supported in the Blob service.
* @param options - Options to find blobs by tags.
*/
findBlobsByTags(tagFilterSqlExpression, options = {}) {
// AsyncIterableIterator to iterate over blobs
const listSegmentOptions = Object.assign({}, options);
const iter = this.findBlobsByTagsItems(tagFilterSqlExpression, listSegmentOptions);
return {
/**
* The next method, part of the iteration protocol
*/
next() {
return iter.next();
},
/**
* The connection to the async iterator, part of the iteration protocol
*/
[Symbol.asyncIterator]() {
return this;
},
/**
* Return an AsyncIterableIterator that works a page at a time
*/
byPage: (settings = {}) => {
return this.findBlobsByTagsSegments(tagFilterSqlExpression, settings.continuationToken, Object.assign({ maxPageSize: settings.maxPageSize }, listSegmentOptions));
},
}; };
} }
getContainerNameFromUrl() { getContainerNameFromUrl() {
@ -32086,6 +33209,10 @@ class AccountSASPermissions {
* Permission to set immutability policy. * Permission to set immutability policy.
*/ */
this.setImmutabilityPolicy = false; this.setImmutabilityPolicy = false;
/**
* Specifies that Permanent Delete is permitted.
*/
this.permanentDelete = false;
} }
/** /**
* Parse initializes the AccountSASPermissions fields from a string. * Parse initializes the AccountSASPermissions fields from a string.
@ -32132,6 +33259,9 @@ class AccountSASPermissions {
case "i": case "i":
accountSASPermissions.setImmutabilityPolicy = true; accountSASPermissions.setImmutabilityPolicy = true;
break; break;
case "y":
accountSASPermissions.permanentDelete = true;
break;
default: default:
throw new RangeError(`Invalid permission character: ${c}`); throw new RangeError(`Invalid permission character: ${c}`);
} }
@ -32182,6 +33312,9 @@ class AccountSASPermissions {
if (permissionLike.setImmutabilityPolicy) { if (permissionLike.setImmutabilityPolicy) {
accountSASPermissions.setImmutabilityPolicy = true; accountSASPermissions.setImmutabilityPolicy = true;
} }
if (permissionLike.permanentDelete) {
accountSASPermissions.permanentDelete = true;
}
return accountSASPermissions; return accountSASPermissions;
} }
/** /**
@ -32235,6 +33368,9 @@ class AccountSASPermissions {
if (this.setImmutabilityPolicy) { if (this.setImmutabilityPolicy) {
permissions.push("i"); permissions.push("i");
} }
if (this.permanentDelete) {
permissions.push("y");
}
return permissions.join(""); return permissions.join("");
} }
} }
@ -32417,6 +33553,11 @@ function generateAccountSASQueryParameters(accountSASSignatureValues, sharedKeyC
version < "2019-10-10") { version < "2019-10-10") {
throw RangeError("'version' must be >= '2019-10-10' when provided 'x' permission."); throw RangeError("'version' must be >= '2019-10-10' when provided 'x' permission.");
} }
if (accountSASSignatureValues.permissions &&
accountSASSignatureValues.permissions.permanentDelete &&
version < "2019-10-10") {
throw RangeError("'version' must be >= '2019-10-10' when provided 'y' permission.");
}
if (accountSASSignatureValues.permissions && if (accountSASSignatureValues.permissions &&
accountSASSignatureValues.permissions.tag && accountSASSignatureValues.permissions.tag &&
version < "2019-12-12") { version < "2019-12-12") {
@ -32427,10 +33568,15 @@ function generateAccountSASQueryParameters(accountSASSignatureValues, sharedKeyC
version < "2019-12-12") { version < "2019-12-12") {
throw RangeError("'version' must be >= '2019-12-12' when provided 'f' permission."); throw RangeError("'version' must be >= '2019-12-12' when provided 'f' permission.");
} }
if (accountSASSignatureValues.encryptionScope && version < "2020-12-06") {
throw RangeError("'version' must be >= '2020-12-06' when provided 'encryptionScope' in SAS.");
}
const parsedPermissions = AccountSASPermissions.parse(accountSASSignatureValues.permissions.toString()); const parsedPermissions = AccountSASPermissions.parse(accountSASSignatureValues.permissions.toString());
const parsedServices = AccountSASServices.parse(accountSASSignatureValues.services).toString(); const parsedServices = AccountSASServices.parse(accountSASSignatureValues.services).toString();
const parsedResourceTypes = AccountSASResourceTypes.parse(accountSASSignatureValues.resourceTypes).toString(); const parsedResourceTypes = AccountSASResourceTypes.parse(accountSASSignatureValues.resourceTypes).toString();
const stringToSign = [ let stringToSign;
if (version >= "2020-12-06") {
stringToSign = [
sharedKeyCredential.accountName, sharedKeyCredential.accountName,
parsedPermissions, parsedPermissions,
parsedServices, parsedServices,
@ -32442,10 +33588,28 @@ function generateAccountSASQueryParameters(accountSASSignatureValues, sharedKeyC
accountSASSignatureValues.ipRange ? ipRangeToString(accountSASSignatureValues.ipRange) : "", accountSASSignatureValues.ipRange ? ipRangeToString(accountSASSignatureValues.ipRange) : "",
accountSASSignatureValues.protocol ? accountSASSignatureValues.protocol : "", accountSASSignatureValues.protocol ? accountSASSignatureValues.protocol : "",
version, version,
"" // Account SAS requires an additional newline character accountSASSignatureValues.encryptionScope ? accountSASSignatureValues.encryptionScope : "",
"", // Account SAS requires an additional newline character
].join("\n"); ].join("\n");
}
else {
stringToSign = [
sharedKeyCredential.accountName,
parsedPermissions,
parsedServices,
parsedResourceTypes,
accountSASSignatureValues.startsOn
? truncatedISO8061Date(accountSASSignatureValues.startsOn, false)
: "",
truncatedISO8061Date(accountSASSignatureValues.expiresOn, false),
accountSASSignatureValues.ipRange ? ipRangeToString(accountSASSignatureValues.ipRange) : "",
accountSASSignatureValues.protocol ? accountSASSignatureValues.protocol : "",
version,
"", // Account SAS requires an additional newline character
].join("\n");
}
const signature = sharedKeyCredential.computeHMACSHA256(stringToSign); const signature = sharedKeyCredential.computeHMACSHA256(stringToSign);
return new SASQueryParameters(version, signature, parsedPermissions.toString(), parsedServices, parsedResourceTypes, accountSASSignatureValues.protocol, accountSASSignatureValues.startsOn, accountSASSignatureValues.expiresOn, accountSASSignatureValues.ipRange); return new SASQueryParameters(version, signature, parsedPermissions.toString(), parsedServices, parsedResourceTypes, accountSASSignatureValues.protocol, accountSASSignatureValues.startsOn, accountSASSignatureValues.expiresOn, accountSASSignatureValues.ipRange, undefined, undefined, undefined, undefined, undefined, undefined, undefined, undefined, undefined, undefined, accountSASSignatureValues.encryptionScope);
} }
/** /**
@ -32492,12 +33656,17 @@ class BlobServiceClient extends StorageClient {
options = options || {}; options = options || {};
const extractedCreds = extractConnectionStringParts(connectionString); const extractedCreds = extractConnectionStringParts(connectionString);
if (extractedCreds.kind === "AccountConnString") { if (extractedCreds.kind === "AccountConnString") {
{ if (coreHttp.isNode) {
const sharedKeyCredential = new StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey); const sharedKeyCredential = new StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey);
if (!options.proxyOptions) {
options.proxyOptions = coreHttp.getDefaultProxySettings(extractedCreds.proxyUri); options.proxyOptions = coreHttp.getDefaultProxySettings(extractedCreds.proxyUri);
}
const pipeline = newPipeline(sharedKeyCredential, options); const pipeline = newPipeline(sharedKeyCredential, options);
return new BlobServiceClient(extractedCreds.url, pipeline); return new BlobServiceClient(extractedCreds.url, pipeline);
} }
else {
throw new Error("Account connection string is only supported in Node.js environment");
}
} }
else if (extractedCreds.kind === "SASConnString") { else if (extractedCreds.kind === "SASConnString") {
const pipeline = newPipeline(new AnonymousCredential(), options); const pipeline = newPipeline(new AnonymousCredential(), options);
@ -32536,13 +33705,13 @@ class BlobServiceClient extends StorageClient {
const containerCreateResponse = await containerClient.create(updatedOptions); const containerCreateResponse = await containerClient.create(updatedOptions);
return { return {
containerClient, containerClient,
containerCreateResponse containerCreateResponse,
}; };
} }
catch (e) { catch (e) {
span.setStatus({ span.setStatus({
code: coreTracing.SpanStatusCode.ERROR, code: coreTracing.SpanStatusCode.ERROR,
message: e.message message: e.message,
}); });
throw e; throw e;
} }
@ -32566,7 +33735,7 @@ class BlobServiceClient extends StorageClient {
catch (e) { catch (e) {
span.setStatus({ span.setStatus({
code: coreTracing.SpanStatusCode.ERROR, code: coreTracing.SpanStatusCode.ERROR,
message: e.message message: e.message,
}); });
throw e; throw e;
} }
@ -32596,7 +33765,7 @@ class BlobServiceClient extends StorageClient {
catch (e) { catch (e) {
span.setStatus({ span.setStatus({
code: coreTracing.SpanStatusCode.ERROR, code: coreTracing.SpanStatusCode.ERROR,
message: e.message message: e.message,
}); });
throw e; throw e;
} }
@ -32626,7 +33795,7 @@ class BlobServiceClient extends StorageClient {
catch (e) { catch (e) {
span.setStatus({ span.setStatus({
code: coreTracing.SpanStatusCode.ERROR, code: coreTracing.SpanStatusCode.ERROR,
message: e.message message: e.message,
}); });
throw e; throw e;
} }
@ -32650,7 +33819,7 @@ class BlobServiceClient extends StorageClient {
catch (e) { catch (e) {
span.setStatus({ span.setStatus({
code: coreTracing.SpanStatusCode.ERROR, code: coreTracing.SpanStatusCode.ERROR,
message: e.message message: e.message,
}); });
throw e; throw e;
} }
@ -32675,7 +33844,7 @@ class BlobServiceClient extends StorageClient {
catch (e) { catch (e) {
span.setStatus({ span.setStatus({
code: coreTracing.SpanStatusCode.ERROR, code: coreTracing.SpanStatusCode.ERROR,
message: e.message message: e.message,
}); });
throw e; throw e;
} }
@ -32700,7 +33869,7 @@ class BlobServiceClient extends StorageClient {
catch (e) { catch (e) {
span.setStatus({ span.setStatus({
code: coreTracing.SpanStatusCode.ERROR, code: coreTracing.SpanStatusCode.ERROR,
message: e.message message: e.message,
}); });
throw e; throw e;
} }
@ -32726,7 +33895,7 @@ class BlobServiceClient extends StorageClient {
catch (e) { catch (e) {
span.setStatus({ span.setStatus({
code: coreTracing.SpanStatusCode.ERROR, code: coreTracing.SpanStatusCode.ERROR,
message: e.message message: e.message,
}); });
throw e; throw e;
} }
@ -32756,7 +33925,7 @@ class BlobServiceClient extends StorageClient {
catch (e) { catch (e) {
span.setStatus({ span.setStatus({
code: coreTracing.SpanStatusCode.ERROR, code: coreTracing.SpanStatusCode.ERROR,
message: e.message message: e.message,
}); });
throw e; throw e;
} }
@ -32799,7 +33968,7 @@ class BlobServiceClient extends StorageClient {
catch (e) { catch (e) {
span.setStatus({ span.setStatus({
code: coreTracing.SpanStatusCode.ERROR, code: coreTracing.SpanStatusCode.ERROR,
message: e.message message: e.message,
}); });
throw e; throw e;
} }
@ -32965,7 +34134,7 @@ class BlobServiceClient extends StorageClient {
*/ */
byPage: (settings = {}) => { byPage: (settings = {}) => {
return this.findBlobsByTagsSegments(tagFilterSqlExpression, settings.continuationToken, Object.assign({ maxPageSize: settings.maxPageSize }, listSegmentOptions)); return this.findBlobsByTagsSegments(tagFilterSqlExpression, settings.continuationToken, Object.assign({ maxPageSize: settings.maxPageSize }, listSegmentOptions));
} },
}; };
} }
/** /**
@ -33103,6 +34272,9 @@ class BlobServiceClient extends StorageClient {
if (options.includeMetadata) { if (options.includeMetadata) {
include.push("metadata"); include.push("metadata");
} }
if (options.includeSystem) {
include.push("system");
}
// AsyncIterableIterator to iterate over containers // AsyncIterableIterator to iterate over containers
const listSegmentOptions = Object.assign(Object.assign({}, options), (include.length > 0 ? { include } : {})); const listSegmentOptions = Object.assign(Object.assign({}, options), (include.length > 0 ? { include } : {}));
const iter = this.listItems(listSegmentOptions); const iter = this.listItems(listSegmentOptions);
@ -33124,7 +34296,7 @@ class BlobServiceClient extends StorageClient {
*/ */
byPage: (settings = {}) => { byPage: (settings = {}) => {
return this.listSegments(settings.continuationToken, Object.assign({ maxPageSize: settings.maxPageSize }, listSegmentOptions)); return this.listSegments(settings.continuationToken, Object.assign({ maxPageSize: settings.maxPageSize }, listSegmentOptions));
} },
}; };
} }
/** /**
@ -33143,7 +34315,7 @@ class BlobServiceClient extends StorageClient {
try { try {
const response = await this.serviceContext.getUserDelegationKey({ const response = await this.serviceContext.getUserDelegationKey({
startsOn: truncatedISO8061Date(startsOn, false), startsOn: truncatedISO8061Date(startsOn, false),
expiresOn: truncatedISO8061Date(expiresOn, false) expiresOn: truncatedISO8061Date(expiresOn, false),
}, Object.assign({ abortSignal: options.abortSignal }, convertTracingToRequestOptionsBase(updatedOptions))); }, Object.assign({ abortSignal: options.abortSignal }, convertTracingToRequestOptionsBase(updatedOptions)));
const userDelegationKey = { const userDelegationKey = {
signedObjectId: response.signedObjectId, signedObjectId: response.signedObjectId,
@ -33152,7 +34324,7 @@ class BlobServiceClient extends StorageClient {
signedExpiresOn: new Date(response.signedExpiresOn), signedExpiresOn: new Date(response.signedExpiresOn),
signedService: response.signedService, signedService: response.signedService,
signedVersion: response.signedVersion, signedVersion: response.signedVersion,
value: response.value value: response.value,
}; };
const res = Object.assign({ _response: response._response, requestId: response.requestId, clientRequestId: response.clientRequestId, version: response.version, date: response.date, errorCode: response.errorCode }, userDelegationKey); const res = Object.assign({ _response: response._response, requestId: response.requestId, clientRequestId: response.clientRequestId, version: response.version, date: response.date, errorCode: response.errorCode }, userDelegationKey);
return res; return res;
@ -33160,7 +34332,7 @@ class BlobServiceClient extends StorageClient {
catch (e) { catch (e) {
span.setStatus({ span.setStatus({
code: coreTracing.SpanStatusCode.ERROR, code: coreTracing.SpanStatusCode.ERROR,
message: e.message message: e.message,
}); });
throw e; throw e;
} }
@ -33209,39 +34381,27 @@ class BlobServiceClient extends StorageClient {
Object.defineProperty(exports, 'BaseRequestPolicy', { Object.defineProperty(exports, 'BaseRequestPolicy', {
enumerable: true, enumerable: true,
get: function () { get: function () { return coreHttp.BaseRequestPolicy; }
return coreHttp.BaseRequestPolicy;
}
}); });
Object.defineProperty(exports, 'HttpHeaders', { Object.defineProperty(exports, 'HttpHeaders', {
enumerable: true, enumerable: true,
get: function () { get: function () { return coreHttp.HttpHeaders; }
return coreHttp.HttpHeaders;
}
}); });
Object.defineProperty(exports, 'RequestPolicyOptions', { Object.defineProperty(exports, 'RequestPolicyOptions', {
enumerable: true, enumerable: true,
get: function () { get: function () { return coreHttp.RequestPolicyOptions; }
return coreHttp.RequestPolicyOptions;
}
}); });
Object.defineProperty(exports, 'RestError', { Object.defineProperty(exports, 'RestError', {
enumerable: true, enumerable: true,
get: function () { get: function () { return coreHttp.RestError; }
return coreHttp.RestError;
}
}); });
Object.defineProperty(exports, 'WebResource', { Object.defineProperty(exports, 'WebResource', {
enumerable: true, enumerable: true,
get: function () { get: function () { return coreHttp.WebResource; }
return coreHttp.WebResource;
}
}); });
Object.defineProperty(exports, 'deserializationPolicy', { Object.defineProperty(exports, 'deserializationPolicy', {
enumerable: true, enumerable: true,
get: function () { get: function () { return coreHttp.deserializationPolicy; }
return coreHttp.deserializationPolicy;
}
}); });
exports.AccountSASPermissions = AccountSASPermissions; exports.AccountSASPermissions = AccountSASPermissions;
exports.AccountSASResourceTypes = AccountSASResourceTypes; exports.AccountSASResourceTypes = AccountSASResourceTypes;
@ -35133,9 +36293,9 @@ var ProxyTracerProvider = /** @class */ (function () {
/** /**
* Get a {@link ProxyTracer} * Get a {@link ProxyTracer}
*/ */
ProxyTracerProvider.prototype.getTracer = function (name, version) { ProxyTracerProvider.prototype.getTracer = function (name, version, options) {
var _a; var _a;
return ((_a = this.getDelegateTracer(name, version)) !== null && _a !== void 0 ? _a : new ProxyTracer_1.ProxyTracer(this, name, version)); return ((_a = this.getDelegateTracer(name, version, options)) !== null && _a !== void 0 ? _a : new ProxyTracer_1.ProxyTracer(this, name, version, options));
}; };
ProxyTracerProvider.prototype.getDelegate = function () { ProxyTracerProvider.prototype.getDelegate = function () {
var _a; var _a;
@ -35147,9 +36307,9 @@ var ProxyTracerProvider = /** @class */ (function () {
ProxyTracerProvider.prototype.setDelegate = function (delegate) { ProxyTracerProvider.prototype.setDelegate = function (delegate) {
this._delegate = delegate; this._delegate = delegate;
}; };
ProxyTracerProvider.prototype.getDelegateTracer = function (name, version) { ProxyTracerProvider.prototype.getDelegateTracer = function (name, version, options) {
var _a; var _a;
return (_a = this._delegate) === null || _a === void 0 ? void 0 : _a.getTracer(name, version); return (_a = this._delegate) === null || _a === void 0 ? void 0 : _a.getTracer(name, version, options);
}; };
return ProxyTracerProvider; return ProxyTracerProvider;
}()); }());
@ -35188,10 +36348,11 @@ var NOOP_TRACER = new NoopTracer_1.NoopTracer();
* Proxy tracer provided by the proxy tracer provider * Proxy tracer provided by the proxy tracer provider
*/ */
var ProxyTracer = /** @class */ (function () { var ProxyTracer = /** @class */ (function () {
function ProxyTracer(_provider, name, version) { function ProxyTracer(_provider, name, version, options) {
this._provider = _provider; this._provider = _provider;
this.name = name; this.name = name;
this.version = version; this.version = version;
this.options = options;
} }
ProxyTracer.prototype.startSpan = function (name, options, context) { ProxyTracer.prototype.startSpan = function (name, options, context) {
return this._getTracer().startSpan(name, options, context); return this._getTracer().startSpan(name, options, context);
@ -35208,7 +36369,7 @@ var ProxyTracer = /** @class */ (function () {
if (this._delegate) { if (this._delegate) {
return this._delegate; return this._delegate;
} }
var tracer = this._provider.getDelegateTracer(this.name, this.version); var tracer = this._provider.getDelegateTracer(this.name, this.version, this.options);
if (!tracer) { if (!tracer) {
return NOOP_TRACER; return NOOP_TRACER;
} }
@ -36208,12 +37369,13 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
}; };
Object.defineProperty(exports, "__esModule", { value: true }); Object.defineProperty(exports, "__esModule", { value: true });
exports.diag = exports.propagation = exports.trace = exports.context = exports.INVALID_SPAN_CONTEXT = exports.INVALID_TRACEID = exports.INVALID_SPANID = exports.isValidSpanId = exports.isValidTraceId = exports.isSpanContextValid = exports.baggageEntryMetadataFromString = void 0; exports.diag = exports.propagation = exports.trace = exports.context = exports.INVALID_SPAN_CONTEXT = exports.INVALID_TRACEID = exports.INVALID_SPANID = exports.isValidSpanId = exports.isValidTraceId = exports.isSpanContextValid = exports.createTraceState = exports.baggageEntryMetadataFromString = void 0;
__exportStar(__webpack_require__(880), exports); __exportStar(__webpack_require__(880), exports);
var utils_1 = __webpack_require__(112); var utils_1 = __webpack_require__(112);
Object.defineProperty(exports, "baggageEntryMetadataFromString", { enumerable: true, get: function () { return utils_1.baggageEntryMetadataFromString; } }); Object.defineProperty(exports, "baggageEntryMetadataFromString", { enumerable: true, get: function () { return utils_1.baggageEntryMetadataFromString; } });
__exportStar(__webpack_require__(452), exports); __exportStar(__webpack_require__(452), exports);
__exportStar(__webpack_require__(158), exports); __exportStar(__webpack_require__(158), exports);
__exportStar(__webpack_require__(907), exports);
__exportStar(__webpack_require__(893), exports); __exportStar(__webpack_require__(893), exports);
__exportStar(__webpack_require__(881), exports); __exportStar(__webpack_require__(881), exports);
__exportStar(__webpack_require__(906), exports); __exportStar(__webpack_require__(906), exports);
@ -36229,8 +37391,11 @@ __exportStar(__webpack_require__(220), exports);
__exportStar(__webpack_require__(932), exports); __exportStar(__webpack_require__(932), exports);
__exportStar(__webpack_require__(975), exports); __exportStar(__webpack_require__(975), exports);
__exportStar(__webpack_require__(207), exports); __exportStar(__webpack_require__(207), exports);
var utils_2 = __webpack_require__(42);
Object.defineProperty(exports, "createTraceState", { enumerable: true, get: function () { return utils_2.createTraceState; } });
__exportStar(__webpack_require__(694), exports); __exportStar(__webpack_require__(694), exports);
__exportStar(__webpack_require__(695), exports); __exportStar(__webpack_require__(695), exports);
__exportStar(__webpack_require__(743), exports);
var spancontext_utils_1 = __webpack_require__(629); var spancontext_utils_1 = __webpack_require__(629);
Object.defineProperty(exports, "isSpanContextValid", { enumerable: true, get: function () { return spancontext_utils_1.isSpanContextValid; } }); Object.defineProperty(exports, "isSpanContextValid", { enumerable: true, get: function () { return spancontext_utils_1.isSpanContextValid; } });
Object.defineProperty(exports, "isValidTraceId", { enumerable: true, get: function () { return spancontext_utils_1.isValidTraceId; } }); Object.defineProperty(exports, "isValidTraceId", { enumerable: true, get: function () { return spancontext_utils_1.isValidTraceId; } });
@ -39151,7 +40316,7 @@ function defer(fn)
Object.defineProperty(exports, '__esModule', { value: true }); Object.defineProperty(exports, '__esModule', { value: true });
__webpack_require__(71); __webpack_require__(97);
var tslib = __webpack_require__(671); var tslib = __webpack_require__(671);
// Copyright (c) Microsoft Corporation. // Copyright (c) Microsoft Corporation.
@ -40952,7 +42117,58 @@ Object.defineProperty(exports, "__esModule", { value: true });
/* 587 */, /* 587 */,
/* 588 */, /* 588 */,
/* 589 */, /* 589 */,
/* 590 */, /* 590 */
/***/ (function(__unusedmodule, exports) {
"use strict";
/*
* Copyright The OpenTelemetry Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.validateValue = exports.validateKey = void 0;
var VALID_KEY_CHAR_RANGE = '[_0-9a-z-*/]';
var VALID_KEY = "[a-z]" + VALID_KEY_CHAR_RANGE + "{0,255}";
var VALID_VENDOR_KEY = "[a-z0-9]" + VALID_KEY_CHAR_RANGE + "{0,240}@[a-z]" + VALID_KEY_CHAR_RANGE + "{0,13}";
var VALID_KEY_REGEX = new RegExp("^(?:" + VALID_KEY + "|" + VALID_VENDOR_KEY + ")$");
var VALID_VALUE_BASE_REGEX = /^[ -~]{0,255}[!-~]$/;
var INVALID_VALUE_COMMA_EQUAL_REGEX = /,|=/;
/**
* Key is opaque string up to 256 characters printable. It MUST begin with a
* lowercase letter, and can only contain lowercase letters a-z, digits 0-9,
* underscores _, dashes -, asterisks *, and forward slashes /.
* For multi-tenant vendor scenarios, an at sign (@) can be used to prefix the
* vendor name. Vendors SHOULD set the tenant ID at the beginning of the key.
* see https://www.w3.org/TR/trace-context/#key
*/
function validateKey(key) {
return VALID_KEY_REGEX.test(key);
}
exports.validateKey = validateKey;
/**
* Value is opaque string up to 256 characters printable ASCII RFC0020
* characters (i.e., the range 0x20 to 0x7E) except comma , and =.
*/
function validateValue(value) {
return (VALID_VALUE_BASE_REGEX.test(value) &&
!INVALID_VALUE_COMMA_EQUAL_REGEX.test(value));
}
exports.validateValue = validateValue;
//# sourceMappingURL=tracestate-validators.js.map
/***/ }),
/* 591 */, /* 591 */,
/* 592 */, /* 592 */,
/* 593 */, /* 593 */,
@ -46098,7 +47314,30 @@ exports.OidcClient = OidcClient;
//# sourceMappingURL=oidc-utils.js.map //# sourceMappingURL=oidc-utils.js.map
/***/ }), /***/ }),
/* 743 */, /* 743 */
/***/ (function(__unusedmodule, exports) {
"use strict";
/*
* Copyright The OpenTelemetry Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
Object.defineProperty(exports, "__esModule", { value: true });
//# sourceMappingURL=tracer_options.js.map
/***/ }),
/* 744 */, /* 744 */,
/* 745 */, /* 745 */,
/* 746 */, /* 746 */,
@ -46195,7 +47434,117 @@ function async(callback)
/* 753 */, /* 753 */,
/* 754 */, /* 754 */,
/* 755 */, /* 755 */,
/* 756 */, /* 756 */
/***/ (function(__unusedmodule, exports, __webpack_require__) {
"use strict";
/*
* Copyright The OpenTelemetry Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.TraceStateImpl = void 0;
var tracestate_validators_1 = __webpack_require__(590);
var MAX_TRACE_STATE_ITEMS = 32;
var MAX_TRACE_STATE_LEN = 512;
var LIST_MEMBERS_SEPARATOR = ',';
var LIST_MEMBER_KEY_VALUE_SPLITTER = '=';
/**
* TraceState must be a class and not a simple object type because of the spec
* requirement (https://www.w3.org/TR/trace-context/#tracestate-field).
*
* Here is the list of allowed mutations:
* - New key-value pair should be added into the beginning of the list
* - The value of any key can be updated. Modified keys MUST be moved to the
* beginning of the list.
*/
var TraceStateImpl = /** @class */ (function () {
function TraceStateImpl(rawTraceState) {
this._internalState = new Map();
if (rawTraceState)
this._parse(rawTraceState);
}
TraceStateImpl.prototype.set = function (key, value) {
// TODO: Benchmark the different approaches(map vs list) and
// use the faster one.
var traceState = this._clone();
if (traceState._internalState.has(key)) {
traceState._internalState.delete(key);
}
traceState._internalState.set(key, value);
return traceState;
};
TraceStateImpl.prototype.unset = function (key) {
var traceState = this._clone();
traceState._internalState.delete(key);
return traceState;
};
TraceStateImpl.prototype.get = function (key) {
return this._internalState.get(key);
};
TraceStateImpl.prototype.serialize = function () {
var _this = this;
return this._keys()
.reduce(function (agg, key) {
agg.push(key + LIST_MEMBER_KEY_VALUE_SPLITTER + _this.get(key));
return agg;
}, [])
.join(LIST_MEMBERS_SEPARATOR);
};
TraceStateImpl.prototype._parse = function (rawTraceState) {
if (rawTraceState.length > MAX_TRACE_STATE_LEN)
return;
this._internalState = rawTraceState
.split(LIST_MEMBERS_SEPARATOR)
.reverse() // Store in reverse so new keys (.set(...)) will be placed at the beginning
.reduce(function (agg, part) {
var listMember = part.trim(); // Optional Whitespace (OWS) handling
var i = listMember.indexOf(LIST_MEMBER_KEY_VALUE_SPLITTER);
if (i !== -1) {
var key = listMember.slice(0, i);
var value = listMember.slice(i + 1, part.length);
if (tracestate_validators_1.validateKey(key) && tracestate_validators_1.validateValue(value)) {
agg.set(key, value);
}
else {
// TODO: Consider to add warning log
}
}
return agg;
}, new Map());
// Because of the reverse() requirement, trunc must be done after map is created
if (this._internalState.size > MAX_TRACE_STATE_ITEMS) {
this._internalState = new Map(Array.from(this._internalState.entries())
.reverse() // Use reverse same as original tracestate parse chain
.slice(0, MAX_TRACE_STATE_ITEMS));
}
};
TraceStateImpl.prototype._keys = function () {
return Array.from(this._internalState.keys()).reverse();
};
TraceStateImpl.prototype._clone = function () {
var traceState = new TraceStateImpl();
traceState._internalState = new Map(this._internalState);
return traceState;
};
return TraceStateImpl;
}());
exports.TraceStateImpl = TraceStateImpl;
//# sourceMappingURL=tracestate-impl.js.map
/***/ }),
/* 757 */, /* 757 */,
/* 758 */, /* 758 */,
/* 759 */, /* 759 */,
@ -48288,7 +49637,7 @@ module.exports = v4;
Object.defineProperty(exports, "__esModule", { value: true }); Object.defineProperty(exports, "__esModule", { value: true });
exports.VERSION = void 0; exports.VERSION = void 0;
// this is autogenerated file, see scripts/version-update.js // this is autogenerated file, see scripts/version-update.js
exports.VERSION = '1.0.4'; exports.VERSION = '1.1.0';
//# sourceMappingURL=version.js.map //# sourceMappingURL=version.js.map
/***/ }), /***/ }),
@ -49579,7 +50928,6 @@ class Poller {
}); });
} }
/** /**
* @internal
* Starts a loop that will break only if the poller is done * Starts a loop that will break only if the poller is done
* or if the poller is stopped. * or if the poller is stopped.
*/ */
@ -49593,7 +50941,6 @@ class Poller {
} }
} }
/** /**
* @internal
* pollOnce does one polling, by calling to the update method of the underlying * pollOnce does one polling, by calling to the update method of the underlying
* poll operation to make any relevant change effective. * poll operation to make any relevant change effective.
* *
@ -49627,7 +50974,6 @@ class Poller {
} }
} }
/** /**
* @internal
* fireProgress calls the functions passed in via onProgress the method of the poller. * fireProgress calls the functions passed in via onProgress the method of the poller.
* *
* It loops over all of the callbacks received from onProgress, and executes them, sending them * It loops over all of the callbacks received from onProgress, and executes them, sending them
@ -49641,7 +50987,6 @@ class Poller {
} }
} }
/** /**
* @internal
* Invokes the underlying operation's cancel method, and rejects the * Invokes the underlying operation's cancel method, and rejects the
* pollUntilDone promise. * pollUntilDone promise.
*/ */
@ -49815,7 +51160,7 @@ class Poller {
*/ */
function getPollingUrl(rawResponse, defaultPath) { function getPollingUrl(rawResponse, defaultPath) {
var _a, _b, _c; var _a, _b, _c;
return ((_c = (_b = (_a = getAzureAsyncOperation(rawResponse)) !== null && _a !== void 0 ? _a : getLocation(rawResponse)) !== null && _b !== void 0 ? _b : getOperationLocation(rawResponse)) !== null && _c !== void 0 ? _c : defaultPath); return ((_c = (_b = (_a = getAzureAsyncOperation(rawResponse)) !== null && _a !== void 0 ? _a : getOperationLocation(rawResponse)) !== null && _b !== void 0 ? _b : getLocation(rawResponse)) !== null && _c !== void 0 ? _c : defaultPath);
} }
function getLocation(rawResponse) { function getLocation(rawResponse) {
return rawResponse.headers["location"]; return rawResponse.headers["location"];
@ -49826,19 +51171,29 @@ function getOperationLocation(rawResponse) {
function getAzureAsyncOperation(rawResponse) { function getAzureAsyncOperation(rawResponse) {
return rawResponse.headers["azure-asyncoperation"]; return rawResponse.headers["azure-asyncoperation"];
} }
function findResourceLocation(requestMethod, rawResponse, requestPath) {
switch (requestMethod) {
case "PUT": {
return requestPath;
}
case "POST":
case "PATCH": {
return getLocation(rawResponse);
}
default: {
return undefined;
}
}
}
function inferLroMode(requestPath, requestMethod, rawResponse) { function inferLroMode(requestPath, requestMethod, rawResponse) {
if (getAzureAsyncOperation(rawResponse) !== undefined) { if (getAzureAsyncOperation(rawResponse) !== undefined ||
getOperationLocation(rawResponse) !== undefined) {
return { return {
mode: "AzureAsync", mode: "Location",
resourceLocation: requestMethod === "PUT" resourceLocation: findResourceLocation(requestMethod, rawResponse, requestPath),
? requestPath
: requestMethod === "POST" || requestMethod === "PATCH"
? getLocation(rawResponse)
: undefined,
}; };
} }
else if (getLocation(rawResponse) !== undefined || else if (getLocation(rawResponse) !== undefined) {
getOperationLocation(rawResponse) !== undefined) {
return { return {
mode: "Location", mode: "Location",
}; };
@ -49908,13 +51263,13 @@ function processBodyPollingOperationResult(response) {
const logger = logger$1.createClientLogger("core-lro"); const logger = logger$1.createClientLogger("core-lro");
// Copyright (c) Microsoft Corporation. // Copyright (c) Microsoft Corporation.
function getResponseStatus(rawResponse) { function isPollingDone(rawResponse) {
var _a; var _a;
if (isUnexpectedPollingResponse(rawResponse) || rawResponse.statusCode === 202) {
return false;
}
const { status } = (_a = rawResponse.body) !== null && _a !== void 0 ? _a : {}; const { status } = (_a = rawResponse.body) !== null && _a !== void 0 ? _a : {};
return typeof status === "string" ? status.toLowerCase() : "succeeded"; const state = typeof status === "string" ? status.toLowerCase() : "succeeded";
}
function isAzureAsyncPollingDone(rawResponse) {
const state = getResponseStatus(rawResponse);
if (isUnexpectedPollingResponse(rawResponse) || failureStates.includes(state)) { if (isUnexpectedPollingResponse(rawResponse) || failureStates.includes(state)) {
throw new Error(`The long running operation has failed. The provisioning state: ${state}.`); throw new Error(`The long running operation has failed. The provisioning state: ${state}.`);
} }
@ -49934,9 +51289,9 @@ async function sendFinalRequest(lro, resourceLocation, lroResourceLocationConfig
return lro.sendPollRequest(resourceLocation !== null && resourceLocation !== void 0 ? resourceLocation : lro.requestPath); return lro.sendPollRequest(resourceLocation !== null && resourceLocation !== void 0 ? resourceLocation : lro.requestPath);
} }
} }
function processAzureAsyncOperationResult(lro, resourceLocation, lroResourceLocationConfig) { function processLocationPollingOperationResult(lro, resourceLocation, lroResourceLocationConfig) {
return (response) => { return (response) => {
if (isAzureAsyncPollingDone(response.rawResponse)) { if (isPollingDone(response.rawResponse)) {
if (resourceLocation === undefined) { if (resourceLocation === undefined) {
return Object.assign(Object.assign({}, response), { done: true }); return Object.assign(Object.assign({}, response), { done: true });
} }
@ -49951,14 +51306,6 @@ function processAzureAsyncOperationResult(lro, resourceLocation, lroResourceLoca
}; };
} }
// Copyright (c) Microsoft Corporation.
function isLocationPollingDone(rawResponse) {
return !isUnexpectedPollingResponse(rawResponse) && rawResponse.statusCode !== 202;
}
function processLocationPollingOperationResult(response) {
return Object.assign(Object.assign({}, response), { done: isLocationPollingDone(response.rawResponse) });
}
// Copyright (c) Microsoft Corporation. // Copyright (c) Microsoft Corporation.
// Licensed under the MIT license. // Licensed under the MIT license.
function processPassthroughOperationResult(response) { function processPassthroughOperationResult(response) {
@ -49971,11 +51318,8 @@ function processPassthroughOperationResult(response) {
*/ */
function createGetLroStatusFromResponse(lroPrimitives, config, lroResourceLocationConfig) { function createGetLroStatusFromResponse(lroPrimitives, config, lroResourceLocationConfig) {
switch (config.mode) { switch (config.mode) {
case "AzureAsync": {
return processAzureAsyncOperationResult(lroPrimitives, config.resourceLocation, lroResourceLocationConfig);
}
case "Location": { case "Location": {
return processLocationPollingOperationResult; return processLocationPollingOperationResult(lroPrimitives, config.resourceLocation, lroResourceLocationConfig);
} }
case "Body": { case "Body": {
return processBodyPollingOperationResult; return processBodyPollingOperationResult;
@ -50516,7 +51860,30 @@ Object.defineProperty(exports, "__esModule", { value: true });
//# sourceMappingURL=attributes.js.map //# sourceMappingURL=attributes.js.map
/***/ }), /***/ }),
/* 907 */, /* 907 */
/***/ (function(__unusedmodule, exports) {
"use strict";
/*
* Copyright The OpenTelemetry Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
Object.defineProperty(exports, "__esModule", { value: true });
//# sourceMappingURL=Attributes.js.map
/***/ }),
/* 908 */, /* 908 */,
/* 909 */, /* 909 */,
/* 910 */ /* 910 */
@ -53431,7 +54798,7 @@ var FormData = __webpack_require__(790);
var node_fetch = __webpack_require__(454); var node_fetch = __webpack_require__(454);
var coreTracing = __webpack_require__(263); var coreTracing = __webpack_require__(263);
var url = __webpack_require__(835); var url = __webpack_require__(835);
__webpack_require__(71); __webpack_require__(97);
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; } function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }

291
package-lock.json generated
View File

@ -1,13 +1,13 @@
{ {
"name": "cache", "name": "cache",
"version": "2.1.7", "version": "3.0.0",
"lockfileVersion": 1, "lockfileVersion": 1,
"requires": true, "requires": true,
"dependencies": { "dependencies": {
"@actions/cache": { "@actions/cache": {
"version": "1.0.9", "version": "1.0.10",
"resolved": "https://registry.npmjs.org/@actions/cache/-/cache-1.0.9.tgz", "resolved": "https://registry.npmjs.org/@actions/cache/-/cache-1.0.10.tgz",
"integrity": "sha512-VzqeDyW3kIDdARNQphd1FrzZCiJRuv98aXwM3R+BLe2UvdZXdRqjC/rrytSm4Nv4OJuI8NA1pbhkXIf+a4LFtw==", "integrity": "sha512-8l9A54RXsPHbHs4Tu0DGqTyE5cguvq3xO9H0ohbLa5zbL2Z4dh9lxnjQn2xojsPQr4WnEVgbaVZpc1tlhehQGw==",
"requires": { "requires": {
"@actions/core": "^1.2.6", "@actions/core": "^1.2.6",
"@actions/exec": "^1.0.1", "@actions/exec": "^1.0.1",
@ -29,9 +29,9 @@
} }
}, },
"@actions/exec": { "@actions/exec": {
"version": "1.1.0", "version": "1.1.1",
"resolved": "https://registry.npmjs.org/@actions/exec/-/exec-1.1.0.tgz", "resolved": "https://registry.npmjs.org/@actions/exec/-/exec-1.1.1.tgz",
"integrity": "sha512-LImpN9AY0J1R1mEYJjVJfSZWU4zYOlEcwSTgPve1rFQqK5AwrEs6uWW5Rv70gbDIQIAUwI86z6B+9mPK4w9Sbg==", "integrity": "sha512-+sCcHHbVdk93a0XT19ECtO/gIXoxvdsgQLzb2fE2/5sIZmWQuluYyjPQtrtTHdU1YzTZ7bAPN4sITq2xi1679w==",
"requires": { "requires": {
"@actions/io": "^1.0.1" "@actions/io": "^1.0.1"
} }
@ -54,9 +54,9 @@
} }
}, },
"@actions/io": { "@actions/io": {
"version": "1.1.1", "version": "1.1.2",
"resolved": "https://registry.npmjs.org/@actions/io/-/io-1.1.1.tgz", "resolved": "https://registry.npmjs.org/@actions/io/-/io-1.1.2.tgz",
"integrity": "sha512-Qi4JoKXjmE0O67wAOH6y0n26QXhMKMFo7GD/4IXNVcrtLjUlGjGuVys6pQgwF3ArfGTQu0XpqaNr0YhED2RaRA==" "integrity": "sha512-d+RwPlMp+2qmBfeLYPLXuSRykDIFEwdTA0MMxzS9kh4kvP1ftrc/9fzy6pX6qAjthdXruHQ6/6kjT/DNo5ALuw=="
}, },
"@ampproject/remapping": { "@ampproject/remapping": {
"version": "2.1.1", "version": "2.1.1",
@ -83,9 +83,9 @@
} }
}, },
"@azure/core-asynciterator-polyfill": { "@azure/core-asynciterator-polyfill": {
"version": "1.0.0", "version": "1.0.2",
"resolved": "https://registry.npmjs.org/@azure/core-asynciterator-polyfill/-/core-asynciterator-polyfill-1.0.0.tgz", "resolved": "https://registry.npmjs.org/@azure/core-asynciterator-polyfill/-/core-asynciterator-polyfill-1.0.2.tgz",
"integrity": "sha512-kmv8CGrPfN9SwMwrkiBK9VTQYxdFQEGe0BmQk+M8io56P9KNzpAxcWE/1fxJj7uouwN4kXF0BHW8DNlgx+wtCg==" "integrity": "sha512-3rkP4LnnlWawl0LZptJOdXNrT/fHp2eQMadoasa6afspXdpGrtPZuAQc2PD0cpgyuoXtUWyC3tv7xfntjGS5Dw=="
}, },
"@azure/core-auth": { "@azure/core-auth": {
"version": "1.3.2", "version": "1.3.2",
@ -158,9 +158,9 @@
} }
}, },
"@azure/core-lro": { "@azure/core-lro": {
"version": "2.2.3", "version": "2.2.4",
"resolved": "https://registry.npmjs.org/@azure/core-lro/-/core-lro-2.2.3.tgz", "resolved": "https://registry.npmjs.org/@azure/core-lro/-/core-lro-2.2.4.tgz",
"integrity": "sha512-UMdlR9NsqDCLTba3EUbRjfMF4gDmWvld196JmUjbz9WWhJ2XT00OR5MXeWiR+vmGT+ETiO4hHFCi2/eGO5YVtg==", "integrity": "sha512-e1I2v2CZM0mQo8+RSix0x091Av493e4bnT22ds2fcQGslTHzM2oTbswkB65nP4iEpCxBrFxOSDPKExmTmjCVtQ==",
"requires": { "requires": {
"@azure/abort-controller": "^1.0.0", "@azure/abort-controller": "^1.0.0",
"@azure/core-tracing": "1.0.0-preview.13", "@azure/core-tracing": "1.0.0-preview.13",
@ -223,14 +223,14 @@
} }
}, },
"@azure/ms-rest-js": { "@azure/ms-rest-js": {
"version": "2.6.0", "version": "2.6.1",
"resolved": "https://registry.npmjs.org/@azure/ms-rest-js/-/ms-rest-js-2.6.0.tgz", "resolved": "https://registry.npmjs.org/@azure/ms-rest-js/-/ms-rest-js-2.6.1.tgz",
"integrity": "sha512-4C5FCtvEzWudblB+h92/TYYPiq7tuElX8icVYToxOdggnYqeec4Se14mjse5miInKtZahiFHdl8lZA/jziEc5g==", "integrity": "sha512-LLi4jRe/qy5IM8U2CkoDgSZp2OH+MgDe2wePmhz8uY84Svc53EhHaamVyoU6BjjHBxvCRh1vcD1urJDccrxqIw==",
"requires": { "requires": {
"@azure/core-auth": "^1.1.4", "@azure/core-auth": "^1.1.4",
"abort-controller": "^3.0.0", "abort-controller": "^3.0.0",
"form-data": "^2.5.0", "form-data": "^2.5.0",
"node-fetch": "^2.6.0", "node-fetch": "^2.6.7",
"tough-cookie": "^3.0.1", "tough-cookie": "^3.0.1",
"tslib": "^1.10.0", "tslib": "^1.10.0",
"tunnel": "0.0.6", "tunnel": "0.0.6",
@ -246,9 +246,9 @@
} }
}, },
"@azure/storage-blob": { "@azure/storage-blob": {
"version": "12.8.0", "version": "12.9.0",
"resolved": "https://registry.npmjs.org/@azure/storage-blob/-/storage-blob-12.8.0.tgz", "resolved": "https://registry.npmjs.org/@azure/storage-blob/-/storage-blob-12.9.0.tgz",
"integrity": "sha512-c8+Wz19xauW0bGkTCoqZH4dYfbtBniPiGiRQOn1ca6G5jsjr4azwaTk9gwjVY8r3vY2Taf95eivLzipfIfiS4A==", "integrity": "sha512-ank38FdCLfJ+EoeMzCz3hkYJuZAd63ARvDKkxZYRDb+beBYf+/+gx8jNTqkq/hfyUl4dJQ/a7tECU0Y0F98CHg==",
"requires": { "requires": {
"@azure/abort-controller": "^1.0.0", "@azure/abort-controller": "^1.0.0",
"@azure/core-http": "^2.0.0", "@azure/core-http": "^2.0.0",
@ -692,34 +692,26 @@
"dev": true "dev": true
}, },
"@eslint/eslintrc": { "@eslint/eslintrc": {
"version": "1.1.0", "version": "1.2.1",
"resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.1.0.tgz", "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.2.1.tgz",
"integrity": "sha512-C1DfL7XX4nPqGd6jcP01W9pVM1HYCuUkFk1432D7F0v3JSlUIeOYn9oCoi3eoLZ+iwBSb29BMFxxny0YrrEZqg==", "integrity": "sha512-bxvbYnBPN1Gibwyp6NrpnFzA3YtRL3BBAyEAFVIpNTm2Rn4Vy87GA5M4aSn3InRrlsbX5N0GW7XIx+U4SAEKdQ==",
"dev": true, "dev": true,
"requires": { "requires": {
"ajv": "^6.12.4", "ajv": "^6.12.4",
"debug": "^4.3.2", "debug": "^4.3.2",
"espree": "^9.3.1", "espree": "^9.3.1",
"globals": "^13.9.0", "globals": "^13.9.0",
"ignore": "^4.0.6", "ignore": "^5.2.0",
"import-fresh": "^3.2.1", "import-fresh": "^3.2.1",
"js-yaml": "^4.1.0", "js-yaml": "^4.1.0",
"minimatch": "^3.0.4", "minimatch": "^3.0.4",
"strip-json-comments": "^3.1.1" "strip-json-comments": "^3.1.1"
},
"dependencies": {
"ignore": {
"version": "4.0.6",
"resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz",
"integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==",
"dev": true
}
} }
}, },
"@humanwhocodes/config-array": { "@humanwhocodes/config-array": {
"version": "0.9.3", "version": "0.9.5",
"resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.9.3.tgz", "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.9.5.tgz",
"integrity": "sha512-3xSMlXHh03hCcCmFc0rbKp3Ivt2PFEJnQUJDDMTJQ2wkECZWdq4GePs2ctc5H8zV+cHPaq8k2vU8mrQjA6iHdQ==", "integrity": "sha512-ObyMyWxZiCu/yTisA7uzx81s40xR2fD5Cg/2Kq7G02ajkNubJf6BopgDTmDyc3U7sXpNKM8cYOw7s7Tyr+DnCw==",
"dev": true, "dev": true,
"requires": { "requires": {
"@humanwhocodes/object-schema": "^1.2.1", "@humanwhocodes/object-schema": "^1.2.1",
@ -1194,9 +1186,9 @@
} }
}, },
"@opentelemetry/api": { "@opentelemetry/api": {
"version": "1.0.4", "version": "1.1.0",
"resolved": "https://registry.npmjs.org/@opentelemetry/api/-/api-1.0.4.tgz", "resolved": "https://registry.npmjs.org/@opentelemetry/api/-/api-1.1.0.tgz",
"integrity": "sha512-BuJuXRSJNQ3QoKA6GWWDyuLpOUck+9hAXNMCnrloc1aWVoy6Xq6t9PUV08aBZ4Lutqq2LEHM486bpZqoViScog==" "integrity": "sha512-hf+3bwuBwtXsugA2ULBc95qxrOqP2pOekLz34BJhcAKawt94vfeNyUKpYc0lZQ/3sCP6LqRa7UAdHA7i5UODzQ=="
}, },
"@sinonjs/commons": { "@sinonjs/commons": {
"version": "1.8.3", "version": "1.8.3",
@ -1297,19 +1289,19 @@
} }
}, },
"@types/jest": { "@types/jest": {
"version": "27.4.0", "version": "27.4.1",
"resolved": "https://registry.npmjs.org/@types/jest/-/jest-27.4.0.tgz", "resolved": "https://registry.npmjs.org/@types/jest/-/jest-27.4.1.tgz",
"integrity": "sha512-gHl8XuC1RZ8H2j5sHv/JqsaxXkDDM9iDOgu0Wp8sjs4u/snb2PVehyWXJPr+ORA0RPpgw231mnutWI1+0hgjIQ==", "integrity": "sha512-23iPJADSmicDVrWk+HT58LMJtzLAnB2AgIzplQuq/bSrGaxCrlvRFjGbXmamnnk/mAmCdLStiGqggu28ocUyiw==",
"dev": true, "dev": true,
"requires": { "requires": {
"jest-diff": "^27.0.0", "jest-matcher-utils": "^27.0.0",
"pretty-format": "^27.0.0" "pretty-format": "^27.0.0"
} }
}, },
"@types/json-schema": { "@types/json-schema": {
"version": "7.0.9", "version": "7.0.10",
"resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.9.tgz", "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.10.tgz",
"integrity": "sha512-qcUXuemtEu+E5wZSJHNxUXeCZhAfXKQ41D+duX+VYPde7xyEVZci+/oXKJL13tnRs9lR2pr4fod59GT6/X1/yQ==", "integrity": "sha512-BLO9bBq59vW3fxCpD4o0N4U+DXsvwvIcl+jofw0frQo/GrBFC+/jRZj1E7kgp6dvTyNmA4y6JCV5Id/r3mNP5A==",
"dev": true "dev": true
}, },
"@types/json5": { "@types/json5": {
@ -1328,14 +1320,14 @@
} }
}, },
"@types/node": { "@types/node": {
"version": "16.11.25", "version": "16.11.26",
"resolved": "https://registry.npmjs.org/@types/node/-/node-16.11.25.tgz", "resolved": "https://registry.npmjs.org/@types/node/-/node-16.11.26.tgz",
"integrity": "sha512-NrTwfD7L1RTc2qrHQD4RTTy4p0CO2LatKBEKEds3CaVuhoM/+DJzmWZl5f+ikR8cm8F5mfJxK+9rQq07gRiSjQ==" "integrity": "sha512-GZ7bu5A6+4DtG7q9GsoHXy3ALcgeIHP4NnL0Vv2wu0uUB/yQex26v0tf6/na1mm0+bS9Uw+0DFex7aaKr2qawQ=="
}, },
"@types/node-fetch": { "@types/node-fetch": {
"version": "2.5.12", "version": "2.6.1",
"resolved": "https://registry.npmjs.org/@types/node-fetch/-/node-fetch-2.5.12.tgz", "resolved": "https://registry.npmjs.org/@types/node-fetch/-/node-fetch-2.6.1.tgz",
"integrity": "sha512-MKgC4dlq4kKNa/mYrwpKfzQMB5X3ee5U6fSprkKpToBqBmX4nFZL9cW5jl6sWn+xpRJ7ypWh2yyqqr8UUCstSw==", "integrity": "sha512-oMqjURCaxoSIsHSr1E47QHzbmzNR5rK8McHuNb11BOM9cHcIK3Avy0s/b2JlXHoQGTYS3NsvWzV1M0iK7l0wbA==",
"requires": { "requires": {
"@types/node": "*", "@types/node": "*",
"form-data": "^3.0.0" "form-data": "^3.0.0"
@ -1389,14 +1381,14 @@
"dev": true "dev": true
}, },
"@typescript-eslint/eslint-plugin": { "@typescript-eslint/eslint-plugin": {
"version": "5.12.0", "version": "5.15.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.12.0.tgz", "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.15.0.tgz",
"integrity": "sha512-fwCMkDimwHVeIOKeBHiZhRUfJXU8n6xW1FL9diDxAyGAFvKcH4csy0v7twivOQdQdA0KC8TDr7GGRd3L4Lv0rQ==", "integrity": "sha512-u6Db5JfF0Esn3tiAKELvoU5TpXVSkOpZ78cEGn/wXtT2RVqs2vkt4ge6N8cRCyw7YVKhmmLDbwI2pg92mlv7cA==",
"dev": true, "dev": true,
"requires": { "requires": {
"@typescript-eslint/scope-manager": "5.12.0", "@typescript-eslint/scope-manager": "5.15.0",
"@typescript-eslint/type-utils": "5.12.0", "@typescript-eslint/type-utils": "5.15.0",
"@typescript-eslint/utils": "5.12.0", "@typescript-eslint/utils": "5.15.0",
"debug": "^4.3.2", "debug": "^4.3.2",
"functional-red-black-tree": "^1.0.1", "functional-red-black-tree": "^1.0.1",
"ignore": "^5.1.8", "ignore": "^5.1.8",
@ -1417,52 +1409,52 @@
} }
}, },
"@typescript-eslint/parser": { "@typescript-eslint/parser": {
"version": "5.12.0", "version": "5.15.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.12.0.tgz", "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.15.0.tgz",
"integrity": "sha512-MfSwg9JMBojMUoGjUmX+D2stoQj1CBYTCP0qnnVtu9A+YQXVKNtLjasYh+jozOcrb/wau8TCfWOkQTiOAruBog==", "integrity": "sha512-NGAYP/+RDM2sVfmKiKOCgJYPstAO40vPAgACoWPO/+yoYKSgAXIFaBKsV8P0Cc7fwKgvj27SjRNX4L7f4/jCKQ==",
"dev": true, "dev": true,
"requires": { "requires": {
"@typescript-eslint/scope-manager": "5.12.0", "@typescript-eslint/scope-manager": "5.15.0",
"@typescript-eslint/types": "5.12.0", "@typescript-eslint/types": "5.15.0",
"@typescript-eslint/typescript-estree": "5.12.0", "@typescript-eslint/typescript-estree": "5.15.0",
"debug": "^4.3.2" "debug": "^4.3.2"
} }
}, },
"@typescript-eslint/scope-manager": { "@typescript-eslint/scope-manager": {
"version": "5.12.0", "version": "5.15.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.12.0.tgz", "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.15.0.tgz",
"integrity": "sha512-GAMobtIJI8FGf1sLlUWNUm2IOkIjvn7laFWyRx7CLrv6nLBI7su+B7lbStqVlK5NdLvHRFiJo2HhiDF7Ki01WQ==", "integrity": "sha512-EFiZcSKrHh4kWk0pZaa+YNJosvKE50EnmN4IfgjkA3bTHElPtYcd2U37QQkNTqwMCS7LXeDeZzEqnsOH8chjSg==",
"dev": true, "dev": true,
"requires": { "requires": {
"@typescript-eslint/types": "5.12.0", "@typescript-eslint/types": "5.15.0",
"@typescript-eslint/visitor-keys": "5.12.0" "@typescript-eslint/visitor-keys": "5.15.0"
} }
}, },
"@typescript-eslint/type-utils": { "@typescript-eslint/type-utils": {
"version": "5.12.0", "version": "5.15.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.12.0.tgz", "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.15.0.tgz",
"integrity": "sha512-9j9rli3zEBV+ae7rlbBOotJcI6zfc6SHFMdKI9M3Nc0sy458LJ79Os+TPWeBBL96J9/e36rdJOfCuyRSgFAA0Q==", "integrity": "sha512-KGeDoEQ7gHieLydujGEFLyLofipe9PIzfvA/41urz4hv+xVxPEbmMQonKSynZ0Ks2xDhJQ4VYjB3DnRiywvKDA==",
"dev": true, "dev": true,
"requires": { "requires": {
"@typescript-eslint/utils": "5.12.0", "@typescript-eslint/utils": "5.15.0",
"debug": "^4.3.2", "debug": "^4.3.2",
"tsutils": "^3.21.0" "tsutils": "^3.21.0"
} }
}, },
"@typescript-eslint/types": { "@typescript-eslint/types": {
"version": "5.12.0", "version": "5.15.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.12.0.tgz", "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.15.0.tgz",
"integrity": "sha512-JowqbwPf93nvf8fZn5XrPGFBdIK8+yx5UEGs2QFAYFI8IWYfrzz+6zqlurGr2ctShMaJxqwsqmra3WXWjH1nRQ==", "integrity": "sha512-yEiTN4MDy23vvsIksrShjNwQl2vl6kJeG9YkVJXjXZnkJElzVK8nfPsWKYxcsGWG8GhurYXP4/KGj3aZAxbeOA==",
"dev": true "dev": true
}, },
"@typescript-eslint/typescript-estree": { "@typescript-eslint/typescript-estree": {
"version": "5.12.0", "version": "5.15.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.12.0.tgz", "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.15.0.tgz",
"integrity": "sha512-Dd9gVeOqt38QHR0BEA8oRaT65WYqPYbIc5tRFQPkfLquVEFPD1HAtbZT98TLBkEcCkvwDYOAvuSvAD9DnQhMfQ==", "integrity": "sha512-Hb0e3dGc35b75xLzixM3cSbG1sSbrTBQDfIScqdyvrfJZVEi4XWAT+UL/HMxEdrJNB8Yk28SKxPLtAhfCbBInA==",
"dev": true, "dev": true,
"requires": { "requires": {
"@typescript-eslint/types": "5.12.0", "@typescript-eslint/types": "5.15.0",
"@typescript-eslint/visitor-keys": "5.12.0", "@typescript-eslint/visitor-keys": "5.15.0",
"debug": "^4.3.2", "debug": "^4.3.2",
"globby": "^11.0.4", "globby": "^11.0.4",
"is-glob": "^4.0.3", "is-glob": "^4.0.3",
@ -1482,26 +1474,26 @@
} }
}, },
"@typescript-eslint/utils": { "@typescript-eslint/utils": {
"version": "5.12.0", "version": "5.15.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.12.0.tgz", "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.15.0.tgz",
"integrity": "sha512-k4J2WovnMPGI4PzKgDtQdNrCnmBHpMUFy21qjX2CoPdoBcSBIMvVBr9P2YDP8jOqZOeK3ThOL6VO/sy6jtnvzw==", "integrity": "sha512-081rWu2IPKOgTOhHUk/QfxuFog8m4wxW43sXNOMSCdh578tGJ1PAaWPsj42LOa7pguh173tNlMigsbrHvh/mtA==",
"dev": true, "dev": true,
"requires": { "requires": {
"@types/json-schema": "^7.0.9", "@types/json-schema": "^7.0.9",
"@typescript-eslint/scope-manager": "5.12.0", "@typescript-eslint/scope-manager": "5.15.0",
"@typescript-eslint/types": "5.12.0", "@typescript-eslint/types": "5.15.0",
"@typescript-eslint/typescript-estree": "5.12.0", "@typescript-eslint/typescript-estree": "5.15.0",
"eslint-scope": "^5.1.1", "eslint-scope": "^5.1.1",
"eslint-utils": "^3.0.0" "eslint-utils": "^3.0.0"
} }
}, },
"@typescript-eslint/visitor-keys": { "@typescript-eslint/visitor-keys": {
"version": "5.12.0", "version": "5.15.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.12.0.tgz", "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.15.0.tgz",
"integrity": "sha512-cFwTlgnMV6TgezQynx2c/4/tx9Tufbuo9LPzmWqyRC3QC4qTGkAG1C6pBr0/4I10PAI/FlYunI3vJjIcu+ZHMg==", "integrity": "sha512-+vX5FKtgvyHbmIJdxMJ2jKm9z2BIlXJiuewI8dsDYMp5LzPUcuTT78Ya5iwvQg3VqSVdmxyM8Anj1Jeq7733ZQ==",
"dev": true, "dev": true,
"requires": { "requires": {
"@typescript-eslint/types": "5.12.0", "@typescript-eslint/types": "5.15.0",
"eslint-visitor-keys": "^3.0.0" "eslint-visitor-keys": "^3.0.0"
} }
}, },
@ -2024,12 +2016,6 @@
"integrity": "sha512-TLz+x/vEXm/Y7P7wn1EJFNLxYpUD4TgMosxY6fAVJUnJMbupHBOncxyWUG9OpTaH9EBD7uFI5LfEgmMOc54DsA==", "integrity": "sha512-TLz+x/vEXm/Y7P7wn1EJFNLxYpUD4TgMosxY6fAVJUnJMbupHBOncxyWUG9OpTaH9EBD7uFI5LfEgmMOc54DsA==",
"dev": true "dev": true
}, },
"diff-sequences": {
"version": "27.4.0",
"resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-27.4.0.tgz",
"integrity": "sha512-YqiQzkrsmHMH5uuh8OdQFU9/ZpADnwzml8z0O5HvRNda+5UZsaX/xN+AAxfR2hWq1Y7HZnAzO9J5lJXOuDz2Ww==",
"dev": true
},
"dir-glob": { "dir-glob": {
"version": "3.0.1", "version": "3.0.1",
"resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz", "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz",
@ -2204,12 +2190,12 @@
} }
}, },
"eslint": { "eslint": {
"version": "8.9.0", "version": "8.11.0",
"resolved": "https://registry.npmjs.org/eslint/-/eslint-8.9.0.tgz", "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.11.0.tgz",
"integrity": "sha512-PB09IGwv4F4b0/atrbcMFboF/giawbBLVC7fyDamk5Wtey4Jh2K+rYaBhCAbUyEI4QzB1ly09Uglc9iCtFaG2Q==", "integrity": "sha512-/KRpd9mIRg2raGxHRGwW9ZywYNAClZrHjdueHcrVDuO3a6bj83eoTirCCk0M0yPwOjWYKHwRVRid+xK4F/GHgA==",
"dev": true, "dev": true,
"requires": { "requires": {
"@eslint/eslintrc": "^1.1.0", "@eslint/eslintrc": "^1.2.1",
"@humanwhocodes/config-array": "^0.9.2", "@humanwhocodes/config-array": "^0.9.2",
"ajv": "^6.10.0", "ajv": "^6.10.0",
"chalk": "^4.0.0", "chalk": "^4.0.0",
@ -2274,9 +2260,9 @@
} }
}, },
"eslint-config-prettier": { "eslint-config-prettier": {
"version": "8.3.0", "version": "8.5.0",
"resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-8.3.0.tgz", "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-8.5.0.tgz",
"integrity": "sha512-BgZuLUSeKzvlL/VUjx/Yb787VQ26RU3gGjA3iiFvdsp/2bMfVIWUVP7tjxtjS0e+HP409cPlPvNkQloz8C91ew==", "integrity": "sha512-obmWKLUNCnhtQRKc+tmnYuQl0pFU1ibYJQ5BGhTVB08bHe9wC8qUeG7c08dj9XX+AuPj1YSGSQIHl1pnDHZR0Q==",
"dev": true "dev": true
}, },
"eslint-import-resolver-node": { "eslint-import-resolver-node": {
@ -2369,9 +2355,9 @@
} }
}, },
"eslint-plugin-jest": { "eslint-plugin-jest": {
"version": "26.1.0", "version": "26.1.2",
"resolved": "https://registry.npmjs.org/eslint-plugin-jest/-/eslint-plugin-jest-26.1.0.tgz", "resolved": "https://registry.npmjs.org/eslint-plugin-jest/-/eslint-plugin-jest-26.1.2.tgz",
"integrity": "sha512-vjF6RvcKm4xZSJgCmXb9fXmhzTva+I9jtj9Qv5JeZQTRocU7WT1g3Kx0cZ+00SekPe2DtSWDawHtSj4RaxFhXQ==", "integrity": "sha512-1bXCoRODPkGN06n9KAMls4Jm0eyS+0Q/LWcIxhqWR2ycV0Z7lnx2c10idk4dtFIJY5xStgiIr5snC6/rxcXpbw==",
"dev": true, "dev": true,
"requires": { "requires": {
"@typescript-eslint/utils": "^5.10.0" "@typescript-eslint/utils": "^5.10.0"
@ -2743,9 +2729,9 @@
} }
}, },
"globals": { "globals": {
"version": "13.12.1", "version": "13.13.0",
"resolved": "https://registry.npmjs.org/globals/-/globals-13.12.1.tgz", "resolved": "https://registry.npmjs.org/globals/-/globals-13.13.0.tgz",
"integrity": "sha512-317dFlgY2pdJZ9rspXDks7073GpDmXdfbM3vYYp0HAMKGDh1FfWPleI2ljVNLQX5M5lXcAslTcPTrOrMEFOjyw==", "integrity": "sha512-EQ7Q18AJlPwp3vUDL4mKA0KXrXyNIQyWon6T6XQiBQF0XHvRsiCSrWmmeATpUzdJN2HhWZU6Pdl0a9zdep5p6A==",
"dev": true, "dev": true,
"requires": { "requires": {
"type-fest": "^0.20.2" "type-fest": "^0.20.2"
@ -3344,69 +3330,6 @@
} }
} }
}, },
"jest-diff": {
"version": "27.4.6",
"resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-27.4.6.tgz",
"integrity": "sha512-zjaB0sh0Lb13VyPsd92V7HkqF6yKRH9vm33rwBt7rPYrpQvS1nCvlIy2pICbKta+ZjWngYLNn4cCK4nyZkjS/w==",
"dev": true,
"requires": {
"chalk": "^4.0.0",
"diff-sequences": "^27.4.0",
"jest-get-type": "^27.4.0",
"pretty-format": "^27.4.6"
},
"dependencies": {
"ansi-styles": {
"version": "4.3.0",
"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
"integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
"dev": true,
"requires": {
"color-convert": "^2.0.1"
}
},
"chalk": {
"version": "4.1.2",
"resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",
"integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
"dev": true,
"requires": {
"ansi-styles": "^4.1.0",
"supports-color": "^7.1.0"
}
},
"color-convert": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
"integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
"dev": true,
"requires": {
"color-name": "~1.1.4"
}
},
"color-name": {
"version": "1.1.4",
"resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
"integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
"dev": true
},
"has-flag": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
"integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
"dev": true
},
"supports-color": {
"version": "7.2.0",
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
"integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
"dev": true,
"requires": {
"has-flag": "^4.0.0"
}
}
}
},
"jest-docblock": { "jest-docblock": {
"version": "27.5.1", "version": "27.5.1",
"resolved": "https://registry.npmjs.org/jest-docblock/-/jest-docblock-27.5.1.tgz", "resolved": "https://registry.npmjs.org/jest-docblock/-/jest-docblock-27.5.1.tgz",
@ -3547,12 +3470,6 @@
} }
} }
}, },
"jest-get-type": {
"version": "27.4.0",
"resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-27.4.0.tgz",
"integrity": "sha512-tk9o+ld5TWq41DkK14L4wox4s2D9MtTpKaAVzXfr5CUKm5ZK2ExcaFE0qls2W71zE/6R2TxxrK9w2r6svAFDBQ==",
"dev": true
},
"jest-haste-map": { "jest-haste-map": {
"version": "27.5.1", "version": "27.5.1",
"resolved": "https://registry.npmjs.org/jest-haste-map/-/jest-haste-map-27.5.1.tgz", "resolved": "https://registry.npmjs.org/jest-haste-map/-/jest-haste-map-27.5.1.tgz",
@ -4886,9 +4803,9 @@
"dev": true "dev": true
}, },
"prettier": { "prettier": {
"version": "2.5.1", "version": "2.6.0",
"resolved": "https://registry.npmjs.org/prettier/-/prettier-2.5.1.tgz", "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.6.0.tgz",
"integrity": "sha512-vBZcPRUR5MZJwoyi3ZoyQlc1rXeEck8KgeC9AwwOn+exuxLxq5toTRDTSaVrXHxelDMHy9zlicw8u66yxoSUFg==", "integrity": "sha512-m2FgJibYrBGGgQXNzfd0PuDGShJgRavjUoRCw1mZERIWVSXF0iLzLm+aOqTAbLnC3n6JzUhAA8uZnFVghHJ86A==",
"dev": true "dev": true
}, },
"prettier-linter-helpers": { "prettier-linter-helpers": {
@ -4901,9 +4818,9 @@
} }
}, },
"pretty-format": { "pretty-format": {
"version": "27.4.6", "version": "27.5.1",
"resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-27.4.6.tgz", "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-27.5.1.tgz",
"integrity": "sha512-NblstegA1y/RJW2VyML+3LlpFjzx62cUrtBIKIWDXEDkjNeleA7Od7nrzcs/VLQvAeV4CgSYhrN39DRN88Qi/g==", "integrity": "sha512-Qb1gy5OrP5+zDf2Bvnzdl3jsTf1qXVMazbvCoKhtKqVs4/YK4ozX4gKQJJVyNe+cajNPn0KoC0MC3FUmaHWEmQ==",
"dev": true, "dev": true,
"requires": { "requires": {
"ansi-regex": "^5.0.1", "ansi-regex": "^5.0.1",

View File

@ -1,6 +1,6 @@
{ {
"name": "cache", "name": "cache",
"version": "2.1.7", "version": "3.0.0",
"private": true, "private": true,
"description": "Cache dependencies and build outputs", "description": "Cache dependencies and build outputs",
"main": "dist/restore/index.js", "main": "dist/restore/index.js",
@ -23,28 +23,28 @@
"author": "GitHub", "author": "GitHub",
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"@actions/cache": "^1.0.9", "@actions/cache": "^1.0.10",
"@actions/core": "^1.2.6", "@actions/core": "^1.2.6",
"@actions/exec": "^1.0.1", "@actions/exec": "^1.1.1",
"@actions/io": "^1.1.0" "@actions/io": "^1.1.2"
}, },
"devDependencies": { "devDependencies": {
"@types/jest": "^27.4.0", "@types/jest": "^27.4.1",
"@types/nock": "^11.1.0", "@types/nock": "^11.1.0",
"@types/node": "^16.11.25", "@types/node": "^16.11.26",
"@typescript-eslint/eslint-plugin": "^5.12.0", "@typescript-eslint/eslint-plugin": "^5.15.0",
"@typescript-eslint/parser": "^5.12.0", "@typescript-eslint/parser": "^5.15.0",
"@zeit/ncc": "^0.20.5", "@zeit/ncc": "^0.20.5",
"eslint": "^8.9.0", "eslint": "^8.11.0",
"eslint-config-prettier": "^8.3.0", "eslint-config-prettier": "^8.5.0",
"eslint-plugin-import": "^2.25.4", "eslint-plugin-import": "^2.25.4",
"eslint-plugin-jest": "^26.1.0", "eslint-plugin-jest": "^26.1.2",
"eslint-plugin-prettier": "^4.0.0", "eslint-plugin-prettier": "^4.0.0",
"eslint-plugin-simple-import-sort": "^7.0.0", "eslint-plugin-simple-import-sort": "^7.0.0",
"jest": "^27.5.1", "jest": "^27.5.1",
"jest-circus": "^27.5.1", "jest-circus": "^27.5.1",
"nock": "^11.7.0", "nock": "^11.7.0",
"prettier": "^2.5.1", "prettier": "^2.6.0",
"ts-jest": "^27.1.3", "ts-jest": "^27.1.3",
"typescript": "^3.9.9" "typescript": "^3.9.9"
} }