@azure/storage-blob 12.9.0-alpha.20211214.3 → 12.9.0-alpha.20220104.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +10 -0
- package/dist/index.js +215 -225
- package/dist/index.js.map +1 -1
- package/dist-esm/storage-blob/src/BatchResponseParser.js +2 -2
- package/dist-esm/storage-blob/src/BatchResponseParser.js.map +1 -1
- package/dist-esm/storage-blob/src/BlobBatch.js +8 -8
- package/dist-esm/storage-blob/src/BlobBatch.js.map +1 -1
- package/dist-esm/storage-blob/src/BlobBatchClient.js +2 -2
- package/dist-esm/storage-blob/src/BlobBatchClient.js.map +1 -1
- package/dist-esm/storage-blob/src/BlobDownloadResponse.js +1 -1
- package/dist-esm/storage-blob/src/BlobDownloadResponse.js.map +1 -1
- package/dist-esm/storage-blob/src/BlobLeaseClient.js +5 -5
- package/dist-esm/storage-blob/src/BlobLeaseClient.js.map +1 -1
- package/dist-esm/storage-blob/src/BlobQueryResponse.browser.js.map +1 -1
- package/dist-esm/storage-blob/src/BlobQueryResponse.js.map +1 -1
- package/dist-esm/storage-blob/src/BlobServiceClient.js +19 -19
- package/dist-esm/storage-blob/src/BlobServiceClient.js.map +1 -1
- package/dist-esm/storage-blob/src/Clients.js +88 -93
- package/dist-esm/storage-blob/src/Clients.js.map +1 -1
- package/dist-esm/storage-blob/src/ContainerClient.js +38 -38
- package/dist-esm/storage-blob/src/ContainerClient.js.map +1 -1
- package/dist-esm/storage-blob/src/PageBlobRangeResponse.js +3 -3
- package/dist-esm/storage-blob/src/PageBlobRangeResponse.js.map +1 -1
- package/dist-esm/storage-blob/src/Pipeline.js +6 -6
- package/dist-esm/storage-blob/src/Pipeline.js.map +1 -1
- package/dist-esm/storage-blob/src/TelemetryPolicyFactory.js +1 -1
- package/dist-esm/storage-blob/src/TelemetryPolicyFactory.js.map +1 -1
- package/dist-esm/storage-blob/src/credentials/StorageSharedKeyCredential.js +1 -3
- package/dist-esm/storage-blob/src/credentials/StorageSharedKeyCredential.js.map +1 -1
- package/dist-esm/storage-blob/src/credentials/UserDelegationKeyCredential.js +1 -3
- package/dist-esm/storage-blob/src/credentials/UserDelegationKeyCredential.js.map +1 -1
- package/dist-esm/storage-blob/src/generated/src/storageClientContext.js +1 -1
- package/dist-esm/storage-blob/src/generated/src/storageClientContext.js.map +1 -1
- package/dist-esm/storage-blob/src/generatedModels.js.map +1 -1
- package/dist-esm/storage-blob/src/index.browser.js +1 -1
- package/dist-esm/storage-blob/src/index.browser.js.map +1 -1
- package/dist-esm/storage-blob/src/index.js +1 -1
- package/dist-esm/storage-blob/src/index.js.map +1 -1
- package/dist-esm/storage-blob/src/models.js.map +1 -1
- package/dist-esm/storage-blob/src/policies/StorageBrowserPolicy.js +1 -1
- package/dist-esm/storage-blob/src/policies/StorageBrowserPolicy.js.map +1 -1
- package/dist-esm/storage-blob/src/policies/StorageRetryPolicy.js +5 -5
- package/dist-esm/storage-blob/src/policies/StorageRetryPolicy.js.map +1 -1
- package/dist-esm/storage-blob/src/policies/StorageSharedKeyCredentialPolicy.js +1 -1
- package/dist-esm/storage-blob/src/policies/StorageSharedKeyCredentialPolicy.js.map +1 -1
- package/dist-esm/storage-blob/src/policies/TelemetryPolicy.js +1 -1
- package/dist-esm/storage-blob/src/policies/TelemetryPolicy.js.map +1 -1
- package/dist-esm/storage-blob/src/pollers/BlobStartCopyFromUrlPoller.js +3 -3
- package/dist-esm/storage-blob/src/pollers/BlobStartCopyFromUrlPoller.js.map +1 -1
- package/dist-esm/storage-blob/src/sas/AccountSASSignatureValues.js +2 -2
- package/dist-esm/storage-blob/src/sas/AccountSASSignatureValues.js.map +1 -1
- package/dist-esm/storage-blob/src/sas/BlobSASSignatureValues.js +6 -6
- package/dist-esm/storage-blob/src/sas/BlobSASSignatureValues.js.map +1 -1
- package/dist-esm/storage-blob/src/sas/SASQueryParameters.js +2 -2
- package/dist-esm/storage-blob/src/sas/SASQueryParameters.js.map +1 -1
- package/dist-esm/storage-blob/src/utils/Batch.js.map +1 -1
- package/dist-esm/storage-blob/src/utils/BlobQuickQueryStream.js +1 -1
- package/dist-esm/storage-blob/src/utils/BlobQuickQueryStream.js.map +1 -1
- package/dist-esm/storage-blob/src/utils/Mutex.js.map +1 -1
- package/dist-esm/storage-blob/src/utils/RetriableReadableStream.js +1 -2
- package/dist-esm/storage-blob/src/utils/RetriableReadableStream.js.map +1 -1
- package/dist-esm/storage-blob/src/utils/constants.js +7 -7
- package/dist-esm/storage-blob/src/utils/constants.js.map +1 -1
- package/dist-esm/storage-blob/src/utils/tracing.js +2 -2
- package/dist-esm/storage-blob/src/utils/tracing.js.map +1 -1
- package/dist-esm/storage-blob/src/utils/utils.common.js +25 -25
- package/dist-esm/storage-blob/src/utils/utils.common.js.map +1 -1
- package/dist-esm/storage-internal-avro/src/AvroParser.js.map +1 -1
- package/dist-esm/storage-internal-avro/src/AvroReader.js +8 -8
- package/dist-esm/storage-internal-avro/src/AvroReader.js.map +1 -1
- package/package.json +5 -3
- package/typings/3.1/storage-blob.d.ts +7 -5
- package/typings/latest/storage-blob.d.ts +7 -5
package/dist/index.js
CHANGED
@@ -13183,7 +13183,7 @@ const logger = logger$1.createClientLogger("storage-blob");
|
|
13183
13183
|
|
13184
13184
|
// Copyright (c) Microsoft Corporation.
|
13185
13185
|
// Licensed under the MIT license.
|
13186
|
-
const SDK_VERSION = "12.9.0-beta.
|
13186
|
+
const SDK_VERSION = "12.9.0-beta.3";
|
13187
13187
|
const SERVICE_VERSION = "2021-02-12";
|
13188
13188
|
const BLOCK_BLOB_MAX_UPLOAD_BLOB_BYTES = 256 * 1024 * 1024; // 256MB
|
13189
13189
|
const BLOCK_BLOB_MAX_STAGE_BLOCK_BYTES = 4000 * 1024 * 1024; // 4000MB
|
@@ -13201,15 +13201,15 @@ const URLConstants = {
|
|
13201
13201
|
SIGNATURE: "sig",
|
13202
13202
|
SNAPSHOT: "snapshot",
|
13203
13203
|
VERSIONID: "versionid",
|
13204
|
-
TIMEOUT: "timeout"
|
13205
|
-
}
|
13204
|
+
TIMEOUT: "timeout",
|
13205
|
+
},
|
13206
13206
|
};
|
13207
13207
|
const HTTPURLConnection = {
|
13208
13208
|
HTTP_ACCEPTED: 202,
|
13209
13209
|
HTTP_CONFLICT: 409,
|
13210
13210
|
HTTP_NOT_FOUND: 404,
|
13211
13211
|
HTTP_PRECON_FAILED: 412,
|
13212
|
-
HTTP_RANGE_NOT_SATISFIABLE: 416
|
13212
|
+
HTTP_RANGE_NOT_SATISFIABLE: 416,
|
13213
13213
|
};
|
13214
13214
|
const HeaderConstants = {
|
13215
13215
|
AUTHORIZATION: "Authorization",
|
@@ -13234,7 +13234,7 @@ const HeaderConstants = {
|
|
13234
13234
|
X_MS_COPY_SOURCE: "x-ms-copy-source",
|
13235
13235
|
X_MS_DATE: "x-ms-date",
|
13236
13236
|
X_MS_ERROR_CODE: "x-ms-error-code",
|
13237
|
-
X_MS_VERSION: "x-ms-version"
|
13237
|
+
X_MS_VERSION: "x-ms-version",
|
13238
13238
|
};
|
13239
13239
|
const ETagNone = "";
|
13240
13240
|
const ETagAny = "*";
|
@@ -13339,7 +13339,7 @@ const StorageBlobLoggingAllowedHeaderNames = [
|
|
13339
13339
|
"x-ms-tag-count",
|
13340
13340
|
"x-ms-encryption-key-sha256",
|
13341
13341
|
"x-ms-if-tags",
|
13342
|
-
"x-ms-source-if-tags"
|
13342
|
+
"x-ms-source-if-tags",
|
13343
13343
|
];
|
13344
13344
|
const StorageBlobLoggingAllowedQueryParameters = [
|
13345
13345
|
"comp",
|
@@ -13374,7 +13374,7 @@ const StorageBlobLoggingAllowedQueryParameters = [
|
|
13374
13374
|
"skt",
|
13375
13375
|
"sktid",
|
13376
13376
|
"skv",
|
13377
|
-
"snapshot"
|
13377
|
+
"snapshot",
|
13378
13378
|
];
|
13379
13379
|
|
13380
13380
|
// Copyright (c) Microsoft Corporation.
|
@@ -13515,7 +13515,7 @@ function extractConnectionStringParts(connectionString) {
|
|
13515
13515
|
url: blobEndpoint,
|
13516
13516
|
accountName,
|
13517
13517
|
accountKey,
|
13518
|
-
proxyUri
|
13518
|
+
proxyUri,
|
13519
13519
|
};
|
13520
13520
|
}
|
13521
13521
|
else {
|
@@ -13847,14 +13847,14 @@ function toBlobTags(tags) {
|
|
13847
13847
|
return undefined;
|
13848
13848
|
}
|
13849
13849
|
const res = {
|
13850
|
-
blobTagSet: []
|
13850
|
+
blobTagSet: [],
|
13851
13851
|
};
|
13852
13852
|
for (const key in tags) {
|
13853
13853
|
if (Object.prototype.hasOwnProperty.call(tags, key)) {
|
13854
13854
|
const value = tags[key];
|
13855
13855
|
res.blobTagSet.push({
|
13856
13856
|
key,
|
13857
|
-
value
|
13857
|
+
value,
|
13858
13858
|
});
|
13859
13859
|
}
|
13860
13860
|
}
|
@@ -13894,33 +13894,33 @@ function toQuerySerialization(textConfiguration) {
|
|
13894
13894
|
fieldQuote: textConfiguration.fieldQuote || "",
|
13895
13895
|
recordSeparator: textConfiguration.recordSeparator,
|
13896
13896
|
escapeChar: textConfiguration.escapeCharacter || "",
|
13897
|
-
headersPresent: textConfiguration.hasHeaders || false
|
13898
|
-
}
|
13899
|
-
}
|
13897
|
+
headersPresent: textConfiguration.hasHeaders || false,
|
13898
|
+
},
|
13899
|
+
},
|
13900
13900
|
};
|
13901
13901
|
case "json":
|
13902
13902
|
return {
|
13903
13903
|
format: {
|
13904
13904
|
type: "json",
|
13905
13905
|
jsonTextConfiguration: {
|
13906
|
-
recordSeparator: textConfiguration.recordSeparator
|
13907
|
-
}
|
13908
|
-
}
|
13906
|
+
recordSeparator: textConfiguration.recordSeparator,
|
13907
|
+
},
|
13908
|
+
},
|
13909
13909
|
};
|
13910
13910
|
case "arrow":
|
13911
13911
|
return {
|
13912
13912
|
format: {
|
13913
13913
|
type: "arrow",
|
13914
13914
|
arrowConfiguration: {
|
13915
|
-
schema: textConfiguration.schema
|
13916
|
-
}
|
13917
|
-
}
|
13915
|
+
schema: textConfiguration.schema,
|
13916
|
+
},
|
13917
|
+
},
|
13918
13918
|
};
|
13919
13919
|
case "parquet":
|
13920
13920
|
return {
|
13921
13921
|
format: {
|
13922
|
-
type: "parquet"
|
13923
|
-
}
|
13922
|
+
type: "parquet",
|
13923
|
+
},
|
13924
13924
|
};
|
13925
13925
|
default:
|
13926
13926
|
throw Error("Invalid BlobQueryTextConfiguration.");
|
@@ -13944,7 +13944,7 @@ function parseObjectReplicationRecord(objectReplicationRecord) {
|
|
13944
13944
|
}
|
13945
13945
|
const rule = {
|
13946
13946
|
ruleId: ids[1],
|
13947
|
-
replicationStatus: objectReplicationRecord[key]
|
13947
|
+
replicationStatus: objectReplicationRecord[key],
|
13948
13948
|
};
|
13949
13949
|
const policyIndex = orProperties.findIndex((policy) => policy.policyId === ids[0]);
|
13950
13950
|
if (policyIndex > -1) {
|
@@ -13953,7 +13953,7 @@ function parseObjectReplicationRecord(objectReplicationRecord) {
|
|
13953
13953
|
else {
|
13954
13954
|
orProperties.push({
|
13955
13955
|
policyId: ids[0],
|
13956
|
-
rules: [rule]
|
13956
|
+
rules: [rule],
|
13957
13957
|
});
|
13958
13958
|
}
|
13959
13959
|
}
|
@@ -13985,7 +13985,7 @@ function ConvertInternalResponseOfListBlobFlat(internalResponse) {
|
|
13985
13985
|
blobItems: internalResponse.segment.blobItems.map((blobItemInteral) => {
|
13986
13986
|
const blobItem = Object.assign(Object.assign({}, blobItemInteral), { name: BlobNameToString(blobItemInteral.name) });
|
13987
13987
|
return blobItem;
|
13988
|
-
})
|
13988
|
+
}),
|
13989
13989
|
} });
|
13990
13990
|
}
|
13991
13991
|
function ConvertInternalResponseOfListBlobHierarchy(internalResponse) {
|
@@ -13993,14 +13993,14 @@ function ConvertInternalResponseOfListBlobHierarchy(internalResponse) {
|
|
13993
13993
|
return Object.assign(Object.assign({}, internalResponse), { segment: {
|
13994
13994
|
blobPrefixes: (_a = internalResponse.segment.blobPrefixes) === null || _a === void 0 ? void 0 : _a.map((blobPrefixInternal) => {
|
13995
13995
|
const blobPrefix = {
|
13996
|
-
name: BlobNameToString(blobPrefixInternal.name)
|
13996
|
+
name: BlobNameToString(blobPrefixInternal.name),
|
13997
13997
|
};
|
13998
13998
|
return blobPrefix;
|
13999
13999
|
}),
|
14000
14000
|
blobItems: internalResponse.segment.blobItems.map((blobItemInteral) => {
|
14001
14001
|
const blobItem = Object.assign(Object.assign({}, blobItemInteral), { name: BlobNameToString(blobItemInteral.name) });
|
14002
14002
|
return blobItem;
|
14003
|
-
})
|
14003
|
+
}),
|
14004
14004
|
} });
|
14005
14005
|
}
|
14006
14006
|
function decodeBase64String(value) {
|
@@ -14021,13 +14021,13 @@ function ParseBlobName(blobNameInXML) {
|
|
14021
14021
|
if (blobNameInXML["$"] !== undefined && blobNameInXML["#"] !== undefined) {
|
14022
14022
|
return {
|
14023
14023
|
encoded: ParseBoolean(blobNameInXML["$"]["Encoded"]),
|
14024
|
-
content: blobNameInXML["#"]
|
14024
|
+
content: blobNameInXML["#"],
|
14025
14025
|
};
|
14026
14026
|
}
|
14027
14027
|
else {
|
14028
14028
|
return {
|
14029
14029
|
encoded: false,
|
14030
|
-
content: blobNameInXML
|
14030
|
+
content: blobNameInXML,
|
14031
14031
|
};
|
14032
14032
|
}
|
14033
14033
|
}
|
@@ -14093,7 +14093,7 @@ function ParseBlobItem(blobInXML) {
|
|
14093
14093
|
? undefined
|
14094
14094
|
: new Date(blobPropertiesInXML["ImmutabilityPolicyUntilDate"]),
|
14095
14095
|
immutabilityPolicyMode: blobPropertiesInXML["ImmutabilityPolicyMode"],
|
14096
|
-
legalHold: ParseBoolean(blobPropertiesInXML["LegalHold"])
|
14096
|
+
legalHold: ParseBoolean(blobPropertiesInXML["LegalHold"]),
|
14097
14097
|
};
|
14098
14098
|
return {
|
14099
14099
|
name: ParseBlobName(blobInXML["Name"]),
|
@@ -14105,18 +14105,18 @@ function ParseBlobItem(blobInXML) {
|
|
14105
14105
|
metadata: blobInXML["Metadata"],
|
14106
14106
|
blobTags: ParseBlobTags(blobInXML["Tags"]),
|
14107
14107
|
objectReplicationMetadata: blobInXML["OrMetadata"],
|
14108
|
-
hasVersionsOnly: ParseBoolean(blobInXML["HasVersionsOnly"])
|
14108
|
+
hasVersionsOnly: ParseBoolean(blobInXML["HasVersionsOnly"]),
|
14109
14109
|
};
|
14110
14110
|
}
|
14111
14111
|
function ParseBlobPrefix(blobPrefixInXML) {
|
14112
14112
|
return {
|
14113
|
-
name: ParseBlobName(blobPrefixInXML["Name"])
|
14113
|
+
name: ParseBlobName(blobPrefixInXML["Name"]),
|
14114
14114
|
};
|
14115
14115
|
}
|
14116
14116
|
function ParseBlobTag(blobTagInXML) {
|
14117
14117
|
return {
|
14118
14118
|
key: blobTagInXML["Key"],
|
14119
|
-
value: blobTagInXML["Value"]
|
14119
|
+
value: blobTagInXML["Value"],
|
14120
14120
|
};
|
14121
14121
|
}
|
14122
14122
|
function ParseBlobTags(blobTagsInXML) {
|
@@ -14230,7 +14230,7 @@ const DEFAULT_RETRY_OPTIONS = {
|
|
14230
14230
|
retryDelayInMs: 4 * 1000,
|
14231
14231
|
retryPolicyType: exports.StorageRetryPolicyType.EXPONENTIAL,
|
14232
14232
|
secondaryHost: "",
|
14233
|
-
tryTimeoutInMs: undefined // Use server side default timeout strategy
|
14233
|
+
tryTimeoutInMs: undefined, // Use server side default timeout strategy
|
14234
14234
|
};
|
14235
14235
|
const RETRY_ABORT_ERROR = new abortController.AbortError("The operation was aborted.");
|
14236
14236
|
/**
|
@@ -14267,7 +14267,7 @@ class StorageRetryPolicy extends coreHttp.BaseRequestPolicy {
|
|
14267
14267
|
: DEFAULT_RETRY_OPTIONS.maxRetryDelayInMs,
|
14268
14268
|
secondaryHost: retryOptions.secondaryHost
|
14269
14269
|
? retryOptions.secondaryHost
|
14270
|
-
: DEFAULT_RETRY_OPTIONS.secondaryHost
|
14270
|
+
: DEFAULT_RETRY_OPTIONS.secondaryHost,
|
14271
14271
|
};
|
14272
14272
|
}
|
14273
14273
|
/**
|
@@ -14344,7 +14344,7 @@ class StorageRetryPolicy extends coreHttp.BaseRequestPolicy {
|
|
14344
14344
|
"ENOTFOUND",
|
14345
14345
|
"TIMEOUT",
|
14346
14346
|
"EPIPE",
|
14347
|
-
"REQUEST_SEND_ERROR" // For default xhr based http client provided in ms-rest-js
|
14347
|
+
"REQUEST_SEND_ERROR", // For default xhr based http client provided in ms-rest-js
|
14348
14348
|
];
|
14349
14349
|
if (err) {
|
14350
14350
|
for (const retriableError of retriableErrors) {
|
@@ -14635,7 +14635,7 @@ class Pipeline {
|
|
14635
14635
|
toServiceClientOptions() {
|
14636
14636
|
return {
|
14637
14637
|
httpClient: this.options.httpClient,
|
14638
|
-
requestPolicyFactories: this.factories
|
14638
|
+
requestPolicyFactories: this.factories,
|
14639
14639
|
};
|
14640
14640
|
}
|
14641
14641
|
}
|
@@ -14668,8 +14668,8 @@ function newPipeline(credential, pipelineOptions = {}) {
|
|
14668
14668
|
coreHttp.logPolicy({
|
14669
14669
|
logger: logger.info,
|
14670
14670
|
allowedHeaderNames: StorageBlobLoggingAllowedHeaderNames,
|
14671
|
-
allowedQueryParameters: StorageBlobLoggingAllowedQueryParameters
|
14672
|
-
})
|
14671
|
+
allowedQueryParameters: StorageBlobLoggingAllowedQueryParameters,
|
14672
|
+
}),
|
14673
14673
|
];
|
14674
14674
|
{
|
14675
14675
|
// policies only available in Node.js runtime, not in browsers
|
@@ -14719,7 +14719,7 @@ class StorageSharedKeyCredentialPolicy extends CredentialPolicy {
|
|
14719
14719
|
this.getHeaderValueToSign(request, HeaderConstants.IF_MATCH),
|
14720
14720
|
this.getHeaderValueToSign(request, HeaderConstants.IF_NONE_MATCH),
|
14721
14721
|
this.getHeaderValueToSign(request, HeaderConstants.IF_UNMODIFIED_SINCE),
|
14722
|
-
this.getHeaderValueToSign(request, HeaderConstants.RANGE)
|
14722
|
+
this.getHeaderValueToSign(request, HeaderConstants.RANGE),
|
14723
14723
|
].join("\n") +
|
14724
14724
|
"\n" +
|
14725
14725
|
this.getCanonicalizedHeadersString(request) +
|
@@ -14848,9 +14848,7 @@ class StorageSharedKeyCredential extends Credential {
|
|
14848
14848
|
* @param stringToSign -
|
14849
14849
|
*/
|
14850
14850
|
computeHMACSHA256(stringToSign) {
|
14851
|
-
return crypto.createHmac("sha256", this.accountKey)
|
14852
|
-
.update(stringToSign, "utf8")
|
14853
|
-
.digest("base64");
|
14851
|
+
return crypto.createHmac("sha256", this.accountKey).update(stringToSign, "utf8").digest("base64");
|
14854
14852
|
}
|
14855
14853
|
}
|
14856
14854
|
|
@@ -14862,7 +14860,7 @@ class StorageSharedKeyCredential extends Credential {
|
|
14862
14860
|
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
14863
14861
|
*/
|
14864
14862
|
const packageName = "azure-storage-blob";
|
14865
|
-
const packageVersion = "12.9.0-beta.
|
14863
|
+
const packageVersion = "12.9.0-beta.3";
|
14866
14864
|
class StorageClientContext extends coreHttp.ServiceClient {
|
14867
14865
|
/**
|
14868
14866
|
* Initializes a new instance of the StorageClientContext class.
|
@@ -14935,7 +14933,7 @@ class StorageClient {
|
|
14935
14933
|
*/
|
14936
14934
|
const createSpan = coreTracing.createSpanFunction({
|
14937
14935
|
packagePrefix: "Azure.Storage.Blob",
|
14938
|
-
namespace: "Microsoft.Storage"
|
14936
|
+
namespace: "Microsoft.Storage",
|
14939
14937
|
});
|
14940
14938
|
/**
|
14941
14939
|
* @internal
|
@@ -14949,7 +14947,7 @@ function convertTracingToRequestOptionsBase(options) {
|
|
14949
14947
|
return {
|
14950
14948
|
// By passing spanOptions if they exist at runtime, we're backwards compatible with @azure/core-tracing@preview.13 and earlier.
|
14951
14949
|
spanOptions: (_a = options === null || options === void 0 ? void 0 : options.tracingOptions) === null || _a === void 0 ? void 0 : _a.spanOptions,
|
14952
|
-
tracingContext: (_b = options === null || options === void 0 ? void 0 : options.tracingOptions) === null || _b === void 0 ? void 0 : _b.tracingContext
|
14950
|
+
tracingContext: (_b = options === null || options === void 0 ? void 0 : options.tracingOptions) === null || _b === void 0 ? void 0 : _b.tracingContext,
|
14953
14951
|
};
|
14954
14952
|
}
|
14955
14953
|
|
@@ -15381,9 +15379,7 @@ class UserDelegationKeyCredential {
|
|
15381
15379
|
*/
|
15382
15380
|
computeHMACSHA256(stringToSign) {
|
15383
15381
|
// console.log(`stringToSign: ${JSON.stringify(stringToSign)}`);
|
15384
|
-
return crypto.createHmac("sha256", this.key)
|
15385
|
-
.update(stringToSign, "utf8")
|
15386
|
-
.digest("base64");
|
15382
|
+
return crypto.createHmac("sha256", this.key).update(stringToSign, "utf8").digest("base64");
|
15387
15383
|
}
|
15388
15384
|
}
|
15389
15385
|
|
@@ -15489,7 +15485,7 @@ class SASQueryParameters {
|
|
15489
15485
|
if (this.ipRangeInner) {
|
15490
15486
|
return {
|
15491
15487
|
end: this.ipRangeInner.end,
|
15492
|
-
start: this.ipRangeInner.start
|
15488
|
+
start: this.ipRangeInner.start,
|
15493
15489
|
};
|
15494
15490
|
}
|
15495
15491
|
return undefined;
|
@@ -15524,7 +15520,7 @@ class SASQueryParameters {
|
|
15524
15520
|
"rscl",
|
15525
15521
|
"rsct",
|
15526
15522
|
"saoid",
|
15527
|
-
"scid"
|
15523
|
+
"scid",
|
15528
15524
|
];
|
15529
15525
|
const queries = [];
|
15530
15526
|
for (const param of params) {
|
@@ -15730,7 +15726,7 @@ function generateBlobSASQueryParameters20150405(blobSASSignatureValues, sharedKe
|
|
15730
15726
|
blobSASSignatureValues.contentDisposition ? blobSASSignatureValues.contentDisposition : "",
|
15731
15727
|
blobSASSignatureValues.contentEncoding ? blobSASSignatureValues.contentEncoding : "",
|
15732
15728
|
blobSASSignatureValues.contentLanguage ? blobSASSignatureValues.contentLanguage : "",
|
15733
|
-
blobSASSignatureValues.contentType ? blobSASSignatureValues.contentType : ""
|
15729
|
+
blobSASSignatureValues.contentType ? blobSASSignatureValues.contentType : "",
|
15734
15730
|
].join("\n");
|
15735
15731
|
const signature = sharedKeyCredential.computeHMACSHA256(stringToSign);
|
15736
15732
|
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);
|
@@ -15799,7 +15795,7 @@ function generateBlobSASQueryParameters20181109(blobSASSignatureValues, sharedKe
|
|
15799
15795
|
blobSASSignatureValues.contentDisposition ? blobSASSignatureValues.contentDisposition : "",
|
15800
15796
|
blobSASSignatureValues.contentEncoding ? blobSASSignatureValues.contentEncoding : "",
|
15801
15797
|
blobSASSignatureValues.contentLanguage ? blobSASSignatureValues.contentLanguage : "",
|
15802
|
-
blobSASSignatureValues.contentType ? blobSASSignatureValues.contentType : ""
|
15798
|
+
blobSASSignatureValues.contentType ? blobSASSignatureValues.contentType : "",
|
15803
15799
|
].join("\n");
|
15804
15800
|
const signature = sharedKeyCredential.computeHMACSHA256(stringToSign);
|
15805
15801
|
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);
|
@@ -15869,7 +15865,7 @@ function generateBlobSASQueryParameters20201206(blobSASSignatureValues, sharedKe
|
|
15869
15865
|
blobSASSignatureValues.contentDisposition ? blobSASSignatureValues.contentDisposition : "",
|
15870
15866
|
blobSASSignatureValues.contentEncoding ? blobSASSignatureValues.contentEncoding : "",
|
15871
15867
|
blobSASSignatureValues.contentLanguage ? blobSASSignatureValues.contentLanguage : "",
|
15872
|
-
blobSASSignatureValues.contentType ? blobSASSignatureValues.contentType : ""
|
15868
|
+
blobSASSignatureValues.contentType ? blobSASSignatureValues.contentType : "",
|
15873
15869
|
].join("\n");
|
15874
15870
|
const signature = sharedKeyCredential.computeHMACSHA256(stringToSign);
|
15875
15871
|
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);
|
@@ -15945,7 +15941,7 @@ function generateBlobSASQueryParametersUDK20181109(blobSASSignatureValues, userD
|
|
15945
15941
|
blobSASSignatureValues.contentDisposition,
|
15946
15942
|
blobSASSignatureValues.contentEncoding,
|
15947
15943
|
blobSASSignatureValues.contentLanguage,
|
15948
|
-
blobSASSignatureValues.contentType
|
15944
|
+
blobSASSignatureValues.contentType,
|
15949
15945
|
].join("\n");
|
15950
15946
|
const signature = userDelegationKeyCredential.computeHMACSHA256(stringToSign);
|
15951
15947
|
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);
|
@@ -16024,7 +16020,7 @@ function generateBlobSASQueryParametersUDK20200210(blobSASSignatureValues, userD
|
|
16024
16020
|
blobSASSignatureValues.contentDisposition,
|
16025
16021
|
blobSASSignatureValues.contentEncoding,
|
16026
16022
|
blobSASSignatureValues.contentLanguage,
|
16027
|
-
blobSASSignatureValues.contentType
|
16023
|
+
blobSASSignatureValues.contentType,
|
16028
16024
|
].join("\n");
|
16029
16025
|
const signature = userDelegationKeyCredential.computeHMACSHA256(stringToSign);
|
16030
16026
|
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);
|
@@ -16104,7 +16100,7 @@ function generateBlobSASQueryParametersUDK20201206(blobSASSignatureValues, userD
|
|
16104
16100
|
blobSASSignatureValues.contentDisposition,
|
16105
16101
|
blobSASSignatureValues.contentEncoding,
|
16106
16102
|
blobSASSignatureValues.contentLanguage,
|
16107
|
-
blobSASSignatureValues.contentType
|
16103
|
+
blobSASSignatureValues.contentType,
|
16108
16104
|
].join("\n");
|
16109
16105
|
const signature = userDelegationKeyCredential.computeHMACSHA256(stringToSign);
|
16110
16106
|
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);
|
@@ -16237,7 +16233,7 @@ class BlobLeaseClient {
|
|
16237
16233
|
catch (e) {
|
16238
16234
|
span.setStatus({
|
16239
16235
|
code: coreTracing.SpanStatusCode.ERROR,
|
16240
|
-
message: e.message
|
16236
|
+
message: e.message,
|
16241
16237
|
});
|
16242
16238
|
throw e;
|
16243
16239
|
}
|
@@ -16272,7 +16268,7 @@ class BlobLeaseClient {
|
|
16272
16268
|
catch (e) {
|
16273
16269
|
span.setStatus({
|
16274
16270
|
code: coreTracing.SpanStatusCode.ERROR,
|
16275
|
-
message: e.message
|
16271
|
+
message: e.message,
|
16276
16272
|
});
|
16277
16273
|
throw e;
|
16278
16274
|
}
|
@@ -16305,7 +16301,7 @@ class BlobLeaseClient {
|
|
16305
16301
|
catch (e) {
|
16306
16302
|
span.setStatus({
|
16307
16303
|
code: coreTracing.SpanStatusCode.ERROR,
|
16308
|
-
message: e.message
|
16304
|
+
message: e.message,
|
16309
16305
|
});
|
16310
16306
|
throw e;
|
16311
16307
|
}
|
@@ -16337,7 +16333,7 @@ class BlobLeaseClient {
|
|
16337
16333
|
catch (e) {
|
16338
16334
|
span.setStatus({
|
16339
16335
|
code: coreTracing.SpanStatusCode.ERROR,
|
16340
|
-
message: e.message
|
16336
|
+
message: e.message,
|
16341
16337
|
});
|
16342
16338
|
throw e;
|
16343
16339
|
}
|
@@ -16372,7 +16368,7 @@ class BlobLeaseClient {
|
|
16372
16368
|
catch (e) {
|
16373
16369
|
span.setStatus({
|
16374
16370
|
code: coreTracing.SpanStatusCode.ERROR,
|
16375
|
-
message: e.message
|
16371
|
+
message: e.message,
|
16376
16372
|
});
|
16377
16373
|
throw e;
|
16378
16374
|
}
|
@@ -16452,8 +16448,7 @@ class RetriableReadableStream extends stream.Readable {
|
|
16452
16448
|
});
|
16453
16449
|
}
|
16454
16450
|
else {
|
16455
|
-
this.destroy(new Error(`Data corruption failure: received less data than required and reached maxRetires limitation. Received data offset: ${this
|
16456
|
-
.offset - 1}, data needed offset: ${this.end}, retries: ${this.retries}, max retries: ${this.maxRetryRequests}`));
|
16451
|
+
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}`));
|
16457
16452
|
}
|
16458
16453
|
}
|
16459
16454
|
else {
|
@@ -17298,7 +17293,7 @@ class AvroReader {
|
|
17298
17293
|
}
|
17299
17294
|
async initialize(options = {}) {
|
17300
17295
|
const header = await AvroParser.readFixedBytes(this._headerStream, AVRO_INIT_BYTES.length, {
|
17301
|
-
abortSignal: options.abortSignal
|
17296
|
+
abortSignal: options.abortSignal,
|
17302
17297
|
});
|
17303
17298
|
if (!arraysEqual(header, AVRO_INIT_BYTES)) {
|
17304
17299
|
throw new Error("Stream is not an Avro file.");
|
@@ -17306,7 +17301,7 @@ class AvroReader {
|
|
17306
17301
|
// File metadata is written as if defined by the following map schema:
|
17307
17302
|
// { "type": "map", "values": "bytes"}
|
17308
17303
|
this._metadata = await AvroParser.readMap(this._headerStream, AvroParser.readString, {
|
17309
|
-
abortSignal: options.abortSignal
|
17304
|
+
abortSignal: options.abortSignal,
|
17310
17305
|
});
|
17311
17306
|
// Validate codec
|
17312
17307
|
const codec = this._metadata[AVRO_CODEC_KEY];
|
@@ -17315,7 +17310,7 @@ class AvroReader {
|
|
17315
17310
|
}
|
17316
17311
|
// The 16-byte, randomly-generated sync marker for this file.
|
17317
17312
|
this._syncMarker = await AvroParser.readFixedBytes(this._headerStream, AVRO_SYNC_MARKER_SIZE, {
|
17318
|
-
abortSignal: options.abortSignal
|
17313
|
+
abortSignal: options.abortSignal,
|
17319
17314
|
});
|
17320
17315
|
// Parse the schema
|
17321
17316
|
const schema = JSON.parse(this._metadata[AVRO_SCHEMA_KEY]);
|
@@ -17324,7 +17319,7 @@ class AvroReader {
|
|
17324
17319
|
this._blockOffset = this._initialBlockOffset + this._dataStream.position;
|
17325
17320
|
}
|
17326
17321
|
this._itemsRemainingInBlock = await AvroParser.readLong(this._dataStream, {
|
17327
|
-
abortSignal: options.abortSignal
|
17322
|
+
abortSignal: options.abortSignal,
|
17328
17323
|
});
|
17329
17324
|
// skip block length
|
17330
17325
|
await AvroParser.readLong(this._dataStream, { abortSignal: options.abortSignal });
|
@@ -17346,13 +17341,13 @@ class AvroReader {
|
|
17346
17341
|
}
|
17347
17342
|
while (this.hasNext()) {
|
17348
17343
|
const result = yield tslib.__await(this._itemType.read(this._dataStream, {
|
17349
|
-
abortSignal: options.abortSignal
|
17344
|
+
abortSignal: options.abortSignal,
|
17350
17345
|
}));
|
17351
17346
|
this._itemsRemainingInBlock--;
|
17352
17347
|
this._objectIndex++;
|
17353
17348
|
if (this._itemsRemainingInBlock == 0) {
|
17354
17349
|
const marker = yield tslib.__await(AvroParser.readFixedBytes(this._dataStream, AVRO_SYNC_MARKER_SIZE, {
|
17355
|
-
abortSignal: options.abortSignal
|
17350
|
+
abortSignal: options.abortSignal,
|
17356
17351
|
}));
|
17357
17352
|
this._blockOffset = this._initialBlockOffset + this._dataStream.position;
|
17358
17353
|
this._objectIndex = 0;
|
@@ -17361,7 +17356,7 @@ class AvroReader {
|
|
17361
17356
|
}
|
17362
17357
|
try {
|
17363
17358
|
this._itemsRemainingInBlock = yield tslib.__await(AvroParser.readLong(this._dataStream, {
|
17364
|
-
abortSignal: options.abortSignal
|
17359
|
+
abortSignal: options.abortSignal,
|
17365
17360
|
}));
|
17366
17361
|
}
|
17367
17362
|
catch (err) {
|
@@ -17560,7 +17555,7 @@ class BlobQuickQueryStream extends stream.Readable {
|
|
17560
17555
|
position,
|
17561
17556
|
name,
|
17562
17557
|
isFatal: fatal,
|
17563
|
-
description
|
17558
|
+
description,
|
17564
17559
|
});
|
17565
17560
|
}
|
17566
17561
|
break;
|
@@ -18023,16 +18018,16 @@ function ensureCpkIfSpecified(cpk, isHttps) {
|
|
18023
18018
|
function rangeResponseFromModel(response) {
|
18024
18019
|
const pageRange = (response._response.parsedBody.pageRange || []).map((x) => ({
|
18025
18020
|
offset: x.start,
|
18026
|
-
count: x.end - x.start
|
18021
|
+
count: x.end - x.start,
|
18027
18022
|
}));
|
18028
18023
|
const clearRange = (response._response.parsedBody.clearRange || []).map((x) => ({
|
18029
18024
|
offset: x.start,
|
18030
|
-
count: x.end - x.start
|
18025
|
+
count: x.end - x.start,
|
18031
18026
|
}));
|
18032
18027
|
return Object.assign(Object.assign({}, response), { pageRange,
|
18033
18028
|
clearRange, _response: Object.assign(Object.assign({}, response._response), { parsedBody: {
|
18034
18029
|
pageRange,
|
18035
|
-
clearRange
|
18030
|
+
clearRange,
|
18036
18031
|
} }) });
|
18037
18032
|
}
|
18038
18033
|
|
@@ -18045,7 +18040,7 @@ function rangeResponseFromModel(response) {
|
|
18045
18040
|
*/
|
18046
18041
|
class BlobBeginCopyFromUrlPoller extends coreLro.Poller {
|
18047
18042
|
constructor(options) {
|
18048
|
-
const { blobClient, copySource, intervalInMs = 15000, onProgress, resumeFrom, startCopyFromURLOptions } = options;
|
18043
|
+
const { blobClient, copySource, intervalInMs = 15000, onProgress, resumeFrom, startCopyFromURLOptions, } = options;
|
18049
18044
|
let state;
|
18050
18045
|
if (resumeFrom) {
|
18051
18046
|
state = JSON.parse(resumeFrom).state;
|
@@ -18081,7 +18076,7 @@ const cancel = async function cancel(options = {}) {
|
|
18081
18076
|
}
|
18082
18077
|
// if abortCopyFromURL throws, it will bubble up to user's poller.cancelOperation call
|
18083
18078
|
await state.blobClient.abortCopyFromURL(copyId, {
|
18084
|
-
abortSignal: options.abortSignal
|
18079
|
+
abortSignal: options.abortSignal,
|
18085
18080
|
});
|
18086
18081
|
state.isCancelled = true;
|
18087
18082
|
return makeBlobBeginCopyFromURLPollOperation(state);
|
@@ -18159,7 +18154,7 @@ function makeBlobBeginCopyFromURLPollOperation(state) {
|
|
18159
18154
|
state: Object.assign({}, state),
|
18160
18155
|
cancel,
|
18161
18156
|
toString,
|
18162
|
-
update
|
18157
|
+
update,
|
18163
18158
|
};
|
18164
18159
|
}
|
18165
18160
|
|
@@ -18883,10 +18878,8 @@ class BlobClient extends StorageClient {
|
|
18883
18878
|
throw new Error("Expecting non-empty strings for containerName and blobName parameters");
|
18884
18879
|
}
|
18885
18880
|
super(url, pipeline);
|
18886
|
-
({
|
18887
|
-
|
18888
|
-
containerName: this._containerName
|
18889
|
-
} = this.getBlobAndContainerNamesFromUrl());
|
18881
|
+
({ blobName: this._name, containerName: this._containerName } =
|
18882
|
+
this.getBlobAndContainerNamesFromUrl());
|
18890
18883
|
this.blobContext = new Blob$1(this.storageClientContext);
|
18891
18884
|
this._snapshot = getURLParameter(this.url, URLConstants.Parameters.SNAPSHOT);
|
18892
18885
|
this._versionId = getURLParameter(this.url, URLConstants.Parameters.VERSIONID);
|
@@ -19011,7 +19004,7 @@ class BlobClient extends StorageClient {
|
|
19011
19004
|
const { span, updatedOptions } = createSpan("BlobClient-download", options);
|
19012
19005
|
try {
|
19013
19006
|
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: {
|
19014
|
-
onDownloadProgress: coreHttp.isNode ? undefined : options.onProgress // for Node.js, progress is reported by RetriableReadableStream
|
19007
|
+
onDownloadProgress: coreHttp.isNode ? undefined : options.onProgress, // for Node.js, progress is reported by RetriableReadableStream
|
19015
19008
|
}, range: offset === 0 && !count ? undefined : rangeToString({ offset, count }), rangeGetContentMD5: options.rangeGetContentMD5, rangeGetContentCRC64: options.rangeGetContentCrc64, snapshot: options.snapshot, cpkInfo: options.customerProvidedKey }, convertTracingToRequestOptionsBase(updatedOptions)));
|
19016
19009
|
const wrappedRes = Object.assign(Object.assign({}, res), { _response: res._response, objectReplicationDestinationPolicyId: res.objectReplicationPolicyId, objectReplicationSourceProperties: parseObjectReplicationRecord(res.objectReplicationRules) });
|
19017
19010
|
// Return browser response immediately
|
@@ -19042,16 +19035,16 @@ class BlobClient extends StorageClient {
|
|
19042
19035
|
ifModifiedSince: options.conditions.ifModifiedSince,
|
19043
19036
|
ifNoneMatch: options.conditions.ifNoneMatch,
|
19044
19037
|
ifUnmodifiedSince: options.conditions.ifUnmodifiedSince,
|
19045
|
-
ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions
|
19038
|
+
ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions,
|
19046
19039
|
},
|
19047
19040
|
range: rangeToString({
|
19048
19041
|
count: offset + res.contentLength - start,
|
19049
|
-
offset: start
|
19042
|
+
offset: start,
|
19050
19043
|
}),
|
19051
19044
|
rangeGetContentMD5: options.rangeGetContentMD5,
|
19052
19045
|
rangeGetContentCRC64: options.rangeGetContentCrc64,
|
19053
19046
|
snapshot: options.snapshot,
|
19054
|
-
cpkInfo: options.customerProvidedKey
|
19047
|
+
cpkInfo: options.customerProvidedKey,
|
19055
19048
|
};
|
19056
19049
|
// Debug purpose only
|
19057
19050
|
// console.log(
|
@@ -19062,13 +19055,13 @@ class BlobClient extends StorageClient {
|
|
19062
19055
|
return (await this.blobContext.download(Object.assign({ abortSignal: options.abortSignal }, updatedDownloadOptions))).readableStreamBody;
|
19063
19056
|
}, offset, res.contentLength, {
|
19064
19057
|
maxRetryRequests: options.maxRetryRequests,
|
19065
|
-
onProgress: options.onProgress
|
19058
|
+
onProgress: options.onProgress,
|
19066
19059
|
});
|
19067
19060
|
}
|
19068
19061
|
catch (e) {
|
19069
19062
|
span.setStatus({
|
19070
19063
|
code: coreTracing.SpanStatusCode.ERROR,
|
19071
|
-
message: e.message
|
19064
|
+
message: e.message,
|
19072
19065
|
});
|
19073
19066
|
throw e;
|
19074
19067
|
}
|
@@ -19093,7 +19086,7 @@ class BlobClient extends StorageClient {
|
|
19093
19086
|
abortSignal: options.abortSignal,
|
19094
19087
|
customerProvidedKey: options.customerProvidedKey,
|
19095
19088
|
conditions: options.conditions,
|
19096
|
-
tracingOptions: updatedOptions.tracingOptions
|
19089
|
+
tracingOptions: updatedOptions.tracingOptions,
|
19097
19090
|
});
|
19098
19091
|
return true;
|
19099
19092
|
}
|
@@ -19101,13 +19094,13 @@ class BlobClient extends StorageClient {
|
|
19101
19094
|
if (e.statusCode === 404) {
|
19102
19095
|
span.setStatus({
|
19103
19096
|
code: coreTracing.SpanStatusCode.ERROR,
|
19104
|
-
message: "Expected exception when checking blob existence"
|
19097
|
+
message: "Expected exception when checking blob existence",
|
19105
19098
|
});
|
19106
19099
|
return false;
|
19107
19100
|
}
|
19108
19101
|
span.setStatus({
|
19109
19102
|
code: coreTracing.SpanStatusCode.ERROR,
|
19110
|
-
message: e.message
|
19103
|
+
message: e.message,
|
19111
19104
|
});
|
19112
19105
|
throw e;
|
19113
19106
|
}
|
@@ -19139,7 +19132,7 @@ class BlobClient extends StorageClient {
|
|
19139
19132
|
catch (e) {
|
19140
19133
|
span.setStatus({
|
19141
19134
|
code: coreTracing.SpanStatusCode.ERROR,
|
19142
|
-
message: e.message
|
19135
|
+
message: e.message,
|
19143
19136
|
});
|
19144
19137
|
throw e;
|
19145
19138
|
}
|
@@ -19166,7 +19159,7 @@ class BlobClient extends StorageClient {
|
|
19166
19159
|
catch (e) {
|
19167
19160
|
span.setStatus({
|
19168
19161
|
code: coreTracing.SpanStatusCode.ERROR,
|
19169
|
-
message: e.message
|
19162
|
+
message: e.message,
|
19170
19163
|
});
|
19171
19164
|
throw e;
|
19172
19165
|
}
|
@@ -19188,20 +19181,19 @@ class BlobClient extends StorageClient {
|
|
19188
19181
|
const { span, updatedOptions } = createSpan("BlobClient-deleteIfExists", options);
|
19189
19182
|
try {
|
19190
19183
|
const res = await this.delete(updatedOptions);
|
19191
|
-
return Object.assign(Object.assign({ succeeded: true }, res), { _response: res._response
|
19192
|
-
});
|
19184
|
+
return Object.assign(Object.assign({ succeeded: true }, res), { _response: res._response });
|
19193
19185
|
}
|
19194
19186
|
catch (e) {
|
19195
19187
|
if (((_a = e.details) === null || _a === void 0 ? void 0 : _a.errorCode) === "BlobNotFound") {
|
19196
19188
|
span.setStatus({
|
19197
19189
|
code: coreTracing.SpanStatusCode.ERROR,
|
19198
|
-
message: "Expected exception when deleting a blob or snapshot only if it exists."
|
19190
|
+
message: "Expected exception when deleting a blob or snapshot only if it exists.",
|
19199
19191
|
});
|
19200
19192
|
return Object.assign(Object.assign({ succeeded: false }, (_b = e.response) === null || _b === void 0 ? void 0 : _b.parsedHeaders), { _response: e.response });
|
19201
19193
|
}
|
19202
19194
|
span.setStatus({
|
19203
19195
|
code: coreTracing.SpanStatusCode.ERROR,
|
19204
|
-
message: e.message
|
19196
|
+
message: e.message,
|
19205
19197
|
});
|
19206
19198
|
throw e;
|
19207
19199
|
}
|
@@ -19225,7 +19217,7 @@ class BlobClient extends StorageClient {
|
|
19225
19217
|
catch (e) {
|
19226
19218
|
span.setStatus({
|
19227
19219
|
code: coreTracing.SpanStatusCode.ERROR,
|
19228
|
-
message: e.message
|
19220
|
+
message: e.message,
|
19229
19221
|
});
|
19230
19222
|
throw e;
|
19231
19223
|
}
|
@@ -19259,7 +19251,7 @@ class BlobClient extends StorageClient {
|
|
19259
19251
|
catch (e) {
|
19260
19252
|
span.setStatus({
|
19261
19253
|
code: coreTracing.SpanStatusCode.ERROR,
|
19262
|
-
message: e.message
|
19254
|
+
message: e.message,
|
19263
19255
|
});
|
19264
19256
|
throw e;
|
19265
19257
|
}
|
@@ -19289,7 +19281,7 @@ class BlobClient extends StorageClient {
|
|
19289
19281
|
catch (e) {
|
19290
19282
|
span.setStatus({
|
19291
19283
|
code: coreTracing.SpanStatusCode.ERROR,
|
19292
|
-
message: e.message
|
19284
|
+
message: e.message,
|
19293
19285
|
});
|
19294
19286
|
throw e;
|
19295
19287
|
}
|
@@ -19315,7 +19307,7 @@ class BlobClient extends StorageClient {
|
|
19315
19307
|
catch (e) {
|
19316
19308
|
span.setStatus({
|
19317
19309
|
code: coreTracing.SpanStatusCode.ERROR,
|
19318
|
-
message: e.message
|
19310
|
+
message: e.message,
|
19319
19311
|
});
|
19320
19312
|
throw e;
|
19321
19313
|
}
|
@@ -19339,7 +19331,7 @@ class BlobClient extends StorageClient {
|
|
19339
19331
|
catch (e) {
|
19340
19332
|
span.setStatus({
|
19341
19333
|
code: coreTracing.SpanStatusCode.ERROR,
|
19342
|
-
message: e.message
|
19334
|
+
message: e.message,
|
19343
19335
|
});
|
19344
19336
|
throw e;
|
19345
19337
|
}
|
@@ -19373,7 +19365,7 @@ class BlobClient extends StorageClient {
|
|
19373
19365
|
catch (e) {
|
19374
19366
|
span.setStatus({
|
19375
19367
|
code: coreTracing.SpanStatusCode.ERROR,
|
19376
|
-
message: e.message
|
19368
|
+
message: e.message,
|
19377
19369
|
});
|
19378
19370
|
throw e;
|
19379
19371
|
}
|
@@ -19457,7 +19449,7 @@ class BlobClient extends StorageClient {
|
|
19457
19449
|
const client = {
|
19458
19450
|
abortCopyFromURL: (...args) => this.abortCopyFromURL(...args),
|
19459
19451
|
getProperties: (...args) => this.getProperties(...args),
|
19460
|
-
startCopyFromURL: (...args) => this.startCopyFromURL(...args)
|
19452
|
+
startCopyFromURL: (...args) => this.startCopyFromURL(...args),
|
19461
19453
|
};
|
19462
19454
|
const poller = new BlobBeginCopyFromUrlPoller({
|
19463
19455
|
blobClient: client,
|
@@ -19465,7 +19457,7 @@ class BlobClient extends StorageClient {
|
|
19465
19457
|
intervalInMs: options.intervalInMs,
|
19466
19458
|
onProgress: options.onProgress,
|
19467
19459
|
resumeFrom: options.resumeFrom,
|
19468
|
-
startCopyFromURLOptions: options
|
19460
|
+
startCopyFromURLOptions: options,
|
19469
19461
|
});
|
19470
19462
|
// Trigger the startCopyFromURL call by calling poll.
|
19471
19463
|
// Any errors from this method should be surfaced to the user.
|
@@ -19488,7 +19480,7 @@ class BlobClient extends StorageClient {
|
|
19488
19480
|
catch (e) {
|
19489
19481
|
span.setStatus({
|
19490
19482
|
code: coreTracing.SpanStatusCode.ERROR,
|
19491
|
-
message: e.message
|
19483
|
+
message: e.message,
|
19492
19484
|
});
|
19493
19485
|
throw e;
|
19494
19486
|
}
|
@@ -19514,13 +19506,13 @@ class BlobClient extends StorageClient {
|
|
19514
19506
|
sourceIfMatch: options.sourceConditions.ifMatch,
|
19515
19507
|
sourceIfModifiedSince: options.sourceConditions.ifModifiedSince,
|
19516
19508
|
sourceIfNoneMatch: options.sourceConditions.ifNoneMatch,
|
19517
|
-
sourceIfUnmodifiedSince: options.sourceConditions.ifUnmodifiedSince
|
19509
|
+
sourceIfUnmodifiedSince: options.sourceConditions.ifUnmodifiedSince,
|
19518
19510
|
}, 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)));
|
19519
19511
|
}
|
19520
19512
|
catch (e) {
|
19521
19513
|
span.setStatus({
|
19522
19514
|
code: coreTracing.SpanStatusCode.ERROR,
|
19523
|
-
message: e.message
|
19515
|
+
message: e.message,
|
19524
19516
|
});
|
19525
19517
|
throw e;
|
19526
19518
|
}
|
@@ -19548,7 +19540,7 @@ class BlobClient extends StorageClient {
|
|
19548
19540
|
catch (e) {
|
19549
19541
|
span.setStatus({
|
19550
19542
|
code: coreTracing.SpanStatusCode.ERROR,
|
19551
|
-
message: e.message
|
19543
|
+
message: e.message,
|
19552
19544
|
});
|
19553
19545
|
throw e;
|
19554
19546
|
}
|
@@ -19625,7 +19617,7 @@ class BlobClient extends StorageClient {
|
|
19625
19617
|
conditions: options.conditions,
|
19626
19618
|
maxRetryRequests: options.maxRetryRequestsPerBlock,
|
19627
19619
|
customerProvidedKey: options.customerProvidedKey,
|
19628
|
-
tracingOptions: Object.assign(Object.assign({}, options.tracingOptions), convertTracingToRequestOptionsBase(updatedOptions))
|
19620
|
+
tracingOptions: Object.assign(Object.assign({}, options.tracingOptions), convertTracingToRequestOptionsBase(updatedOptions)),
|
19629
19621
|
});
|
19630
19622
|
const stream = response.readableStreamBody;
|
19631
19623
|
await streamToBuffer(stream, buffer, off - offset, chunkEnd - offset);
|
@@ -19644,7 +19636,7 @@ class BlobClient extends StorageClient {
|
|
19644
19636
|
catch (e) {
|
19645
19637
|
span.setStatus({
|
19646
19638
|
code: coreTracing.SpanStatusCode.ERROR,
|
19647
|
-
message: e.message
|
19639
|
+
message: e.message,
|
19648
19640
|
});
|
19649
19641
|
throw e;
|
19650
19642
|
}
|
@@ -19682,7 +19674,7 @@ class BlobClient extends StorageClient {
|
|
19682
19674
|
catch (e) {
|
19683
19675
|
span.setStatus({
|
19684
19676
|
code: coreTracing.SpanStatusCode.ERROR,
|
19685
|
-
message: e.message
|
19677
|
+
message: e.message,
|
19686
19678
|
});
|
19687
19679
|
throw e;
|
19688
19680
|
}
|
@@ -19763,13 +19755,13 @@ class BlobClient extends StorageClient {
|
|
19763
19755
|
sourceIfModifiedSince: options.sourceConditions.ifModifiedSince,
|
19764
19756
|
sourceIfNoneMatch: options.sourceConditions.ifNoneMatch,
|
19765
19757
|
sourceIfUnmodifiedSince: options.sourceConditions.ifUnmodifiedSince,
|
19766
|
-
sourceIfTags: options.sourceConditions.tagConditions
|
19758
|
+
sourceIfTags: options.sourceConditions.tagConditions,
|
19767
19759
|
}, 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)));
|
19768
19760
|
}
|
19769
19761
|
catch (e) {
|
19770
19762
|
span.setStatus({
|
19771
19763
|
code: coreTracing.SpanStatusCode.ERROR,
|
19772
|
-
message: e.message
|
19764
|
+
message: e.message,
|
19773
19765
|
});
|
19774
19766
|
throw e;
|
19775
19767
|
}
|
@@ -19810,7 +19802,7 @@ class BlobClient extends StorageClient {
|
|
19810
19802
|
catch (e) {
|
19811
19803
|
span.setStatus({
|
19812
19804
|
code: coreTracing.SpanStatusCode.ERROR,
|
19813
|
-
message: e.message
|
19805
|
+
message: e.message,
|
19814
19806
|
});
|
19815
19807
|
throw e;
|
19816
19808
|
}
|
@@ -19831,7 +19823,7 @@ class BlobClient extends StorageClient {
|
|
19831
19823
|
catch (e) {
|
19832
19824
|
span.setStatus({
|
19833
19825
|
code: coreTracing.SpanStatusCode.ERROR,
|
19834
|
-
message: e.message
|
19826
|
+
message: e.message,
|
19835
19827
|
});
|
19836
19828
|
throw e;
|
19837
19829
|
}
|
@@ -19852,7 +19844,7 @@ class BlobClient extends StorageClient {
|
|
19852
19844
|
catch (e) {
|
19853
19845
|
span.setStatus({
|
19854
19846
|
code: coreTracing.SpanStatusCode.ERROR,
|
19855
|
-
message: e.message
|
19847
|
+
message: e.message,
|
19856
19848
|
});
|
19857
19849
|
throw e;
|
19858
19850
|
}
|
@@ -19963,7 +19955,7 @@ class AppendBlobClient extends BlobClient {
|
|
19963
19955
|
catch (e) {
|
19964
19956
|
span.setStatus({
|
19965
19957
|
code: coreTracing.SpanStatusCode.ERROR,
|
19966
|
-
message: e.message
|
19958
|
+
message: e.message,
|
19967
19959
|
});
|
19968
19960
|
throw e;
|
19969
19961
|
}
|
@@ -19984,20 +19976,19 @@ class AppendBlobClient extends BlobClient {
|
|
19984
19976
|
const conditions = { ifNoneMatch: ETagAny };
|
19985
19977
|
try {
|
19986
19978
|
const res = await this.create(Object.assign(Object.assign({}, updatedOptions), { conditions }));
|
19987
|
-
return Object.assign(Object.assign({ succeeded: true }, res), { _response: res._response
|
19988
|
-
});
|
19979
|
+
return Object.assign(Object.assign({ succeeded: true }, res), { _response: res._response });
|
19989
19980
|
}
|
19990
19981
|
catch (e) {
|
19991
19982
|
if (((_a = e.details) === null || _a === void 0 ? void 0 : _a.errorCode) === "BlobAlreadyExists") {
|
19992
19983
|
span.setStatus({
|
19993
19984
|
code: coreTracing.SpanStatusCode.ERROR,
|
19994
|
-
message: "Expected exception when creating a blob only if it does not already exist."
|
19985
|
+
message: "Expected exception when creating a blob only if it does not already exist.",
|
19995
19986
|
});
|
19996
19987
|
return Object.assign(Object.assign({ succeeded: false }, (_b = e.response) === null || _b === void 0 ? void 0 : _b.parsedHeaders), { _response: e.response });
|
19997
19988
|
}
|
19998
19989
|
span.setStatus({
|
19999
19990
|
code: coreTracing.SpanStatusCode.ERROR,
|
20000
|
-
message: e.message
|
19991
|
+
message: e.message,
|
20001
19992
|
});
|
20002
19993
|
throw e;
|
20003
19994
|
}
|
@@ -20020,7 +20011,7 @@ class AppendBlobClient extends BlobClient {
|
|
20020
20011
|
catch (e) {
|
20021
20012
|
span.setStatus({
|
20022
20013
|
code: coreTracing.SpanStatusCode.ERROR,
|
20023
|
-
message: e.message
|
20014
|
+
message: e.message,
|
20024
20015
|
});
|
20025
20016
|
throw e;
|
20026
20017
|
}
|
@@ -20059,13 +20050,13 @@ class AppendBlobClient extends BlobClient {
|
|
20059
20050
|
try {
|
20060
20051
|
ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps);
|
20061
20052
|
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: {
|
20062
|
-
onUploadProgress: options.onProgress
|
20053
|
+
onUploadProgress: options.onProgress,
|
20063
20054
|
}, transactionalContentMD5: options.transactionalContentMD5, transactionalContentCrc64: options.transactionalContentCrc64, cpkInfo: options.customerProvidedKey, encryptionScope: options.encryptionScope }, convertTracingToRequestOptionsBase(updatedOptions)));
|
20064
20055
|
}
|
20065
20056
|
catch (e) {
|
20066
20057
|
span.setStatus({
|
20067
20058
|
code: coreTracing.SpanStatusCode.ERROR,
|
20068
|
-
message: e.message
|
20059
|
+
message: e.message,
|
20069
20060
|
});
|
20070
20061
|
throw e;
|
20071
20062
|
}
|
@@ -20098,13 +20089,13 @@ class AppendBlobClient extends BlobClient {
|
|
20098
20089
|
sourceIfMatch: options.sourceConditions.ifMatch,
|
20099
20090
|
sourceIfModifiedSince: options.sourceConditions.ifModifiedSince,
|
20100
20091
|
sourceIfNoneMatch: options.sourceConditions.ifNoneMatch,
|
20101
|
-
sourceIfUnmodifiedSince: options.sourceConditions.ifUnmodifiedSince
|
20092
|
+
sourceIfUnmodifiedSince: options.sourceConditions.ifUnmodifiedSince,
|
20102
20093
|
}, copySourceAuthorization: httpAuthorizationToString(options.sourceAuthorization), cpkInfo: options.customerProvidedKey, encryptionScope: options.encryptionScope }, convertTracingToRequestOptionsBase(updatedOptions)));
|
20103
20094
|
}
|
20104
20095
|
catch (e) {
|
20105
20096
|
span.setStatus({
|
20106
20097
|
code: coreTracing.SpanStatusCode.ERROR,
|
20107
|
-
message: e.message
|
20098
|
+
message: e.message,
|
20108
20099
|
});
|
20109
20100
|
throw e;
|
20110
20101
|
}
|
@@ -20233,18 +20224,18 @@ class BlockBlobClient extends BlobClient {
|
|
20233
20224
|
queryType: "SQL",
|
20234
20225
|
expression: query,
|
20235
20226
|
inputSerialization: toQuerySerialization(options.inputTextConfiguration),
|
20236
|
-
outputSerialization: toQuerySerialization(options.outputTextConfiguration)
|
20227
|
+
outputSerialization: toQuerySerialization(options.outputTextConfiguration),
|
20237
20228
|
}, leaseAccessConditions: options.conditions, modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }) }, convertTracingToRequestOptionsBase(updatedOptions)));
|
20238
20229
|
return new BlobQueryResponse(response, {
|
20239
20230
|
abortSignal: options.abortSignal,
|
20240
20231
|
onProgress: options.onProgress,
|
20241
|
-
onError: options.onError
|
20232
|
+
onError: options.onError,
|
20242
20233
|
});
|
20243
20234
|
}
|
20244
20235
|
catch (e) {
|
20245
20236
|
span.setStatus({
|
20246
20237
|
code: coreTracing.SpanStatusCode.ERROR,
|
20247
|
-
message: e.message
|
20238
|
+
message: e.message,
|
20248
20239
|
});
|
20249
20240
|
throw e;
|
20250
20241
|
}
|
@@ -20286,13 +20277,13 @@ class BlockBlobClient extends BlobClient {
|
|
20286
20277
|
try {
|
20287
20278
|
ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps);
|
20288
20279
|
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: {
|
20289
|
-
onUploadProgress: options.onProgress
|
20280
|
+
onUploadProgress: options.onProgress,
|
20290
20281
|
}, 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)));
|
20291
20282
|
}
|
20292
20283
|
catch (e) {
|
20293
20284
|
span.setStatus({
|
20294
20285
|
code: coreTracing.SpanStatusCode.ERROR,
|
20295
|
-
message: e.message
|
20286
|
+
message: e.message,
|
20296
20287
|
});
|
20297
20288
|
throw e;
|
20298
20289
|
}
|
@@ -20329,13 +20320,13 @@ class BlockBlobClient extends BlobClient {
|
|
20329
20320
|
sourceIfModifiedSince: (_b = options.sourceConditions) === null || _b === void 0 ? void 0 : _b.ifModifiedSince,
|
20330
20321
|
sourceIfNoneMatch: (_c = options.sourceConditions) === null || _c === void 0 ? void 0 : _c.ifNoneMatch,
|
20331
20322
|
sourceIfUnmodifiedSince: (_d = options.sourceConditions) === null || _d === void 0 ? void 0 : _d.ifUnmodifiedSince,
|
20332
|
-
sourceIfTags: (_e = options.sourceConditions) === null || _e === void 0 ? void 0 : _e.tagConditions
|
20323
|
+
sourceIfTags: (_e = options.sourceConditions) === null || _e === void 0 ? void 0 : _e.tagConditions,
|
20333
20324
|
}, cpkInfo: options.customerProvidedKey, copySourceAuthorization: httpAuthorizationToString(options.sourceAuthorization), tier: toAccessTier(options.tier), blobTagsString: toBlobTagsString(options.tags) }), convertTracingToRequestOptionsBase(updatedOptions)));
|
20334
20325
|
}
|
20335
20326
|
catch (e) {
|
20336
20327
|
span.setStatus({
|
20337
20328
|
code: coreTracing.SpanStatusCode.ERROR,
|
20338
|
-
message: e.message
|
20329
|
+
message: e.message,
|
20339
20330
|
});
|
20340
20331
|
throw e;
|
20341
20332
|
}
|
@@ -20359,13 +20350,13 @@ class BlockBlobClient extends BlobClient {
|
|
20359
20350
|
try {
|
20360
20351
|
ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps);
|
20361
20352
|
return await this.blockBlobContext.stageBlock(blockId, contentLength, body, Object.assign({ abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, requestOptions: {
|
20362
|
-
onUploadProgress: options.onProgress
|
20353
|
+
onUploadProgress: options.onProgress,
|
20363
20354
|
}, transactionalContentMD5: options.transactionalContentMD5, transactionalContentCrc64: options.transactionalContentCrc64, cpkInfo: options.customerProvidedKey, encryptionScope: options.encryptionScope }, convertTracingToRequestOptionsBase(updatedOptions)));
|
20364
20355
|
}
|
20365
20356
|
catch (e) {
|
20366
20357
|
span.setStatus({
|
20367
20358
|
code: coreTracing.SpanStatusCode.ERROR,
|
20368
|
-
message: e.message
|
20359
|
+
message: e.message,
|
20369
20360
|
});
|
20370
20361
|
throw e;
|
20371
20362
|
}
|
@@ -20403,7 +20394,7 @@ class BlockBlobClient extends BlobClient {
|
|
20403
20394
|
catch (e) {
|
20404
20395
|
span.setStatus({
|
20405
20396
|
code: coreTracing.SpanStatusCode.ERROR,
|
20406
|
-
message: e.message
|
20397
|
+
message: e.message,
|
20407
20398
|
});
|
20408
20399
|
throw e;
|
20409
20400
|
}
|
@@ -20434,7 +20425,7 @@ class BlockBlobClient extends BlobClient {
|
|
20434
20425
|
catch (e) {
|
20435
20426
|
span.setStatus({
|
20436
20427
|
code: coreTracing.SpanStatusCode.ERROR,
|
20437
|
-
message: e.message
|
20428
|
+
message: e.message,
|
20438
20429
|
});
|
20439
20430
|
throw e;
|
20440
20431
|
}
|
@@ -20468,7 +20459,7 @@ class BlockBlobClient extends BlobClient {
|
|
20468
20459
|
catch (e) {
|
20469
20460
|
span.setStatus({
|
20470
20461
|
code: coreTracing.SpanStatusCode.ERROR,
|
20471
|
-
message: e.message
|
20462
|
+
message: e.message,
|
20472
20463
|
});
|
20473
20464
|
throw e;
|
20474
20465
|
}
|
@@ -20517,7 +20508,7 @@ class BlockBlobClient extends BlobClient {
|
|
20517
20508
|
catch (e) {
|
20518
20509
|
span.setStatus({
|
20519
20510
|
code: coreTracing.SpanStatusCode.ERROR,
|
20520
|
-
message: e.message
|
20511
|
+
message: e.message,
|
20521
20512
|
});
|
20522
20513
|
throw e;
|
20523
20514
|
}
|
@@ -20553,7 +20544,7 @@ class BlockBlobClient extends BlobClient {
|
|
20553
20544
|
catch (e) {
|
20554
20545
|
span.setStatus({
|
20555
20546
|
code: coreTracing.SpanStatusCode.ERROR,
|
20556
|
-
message: e.message
|
20547
|
+
message: e.message,
|
20557
20548
|
});
|
20558
20549
|
throw e;
|
20559
20550
|
}
|
@@ -20632,14 +20623,14 @@ class BlockBlobClient extends BlobClient {
|
|
20632
20623
|
abortSignal: options.abortSignal,
|
20633
20624
|
conditions: options.conditions,
|
20634
20625
|
encryptionScope: options.encryptionScope,
|
20635
|
-
tracingOptions: updatedOptions.tracingOptions
|
20626
|
+
tracingOptions: updatedOptions.tracingOptions,
|
20636
20627
|
});
|
20637
20628
|
// Update progress after block is successfully uploaded to server, in case of block trying
|
20638
20629
|
// TODO: Hook with convenience layer progress event in finer level
|
20639
20630
|
transferProgress += contentLength;
|
20640
20631
|
if (options.onProgress) {
|
20641
20632
|
options.onProgress({
|
20642
|
-
loadedBytes: transferProgress
|
20633
|
+
loadedBytes: transferProgress,
|
20643
20634
|
});
|
20644
20635
|
}
|
20645
20636
|
});
|
@@ -20650,7 +20641,7 @@ class BlockBlobClient extends BlobClient {
|
|
20650
20641
|
catch (e) {
|
20651
20642
|
span.setStatus({
|
20652
20643
|
code: coreTracing.SpanStatusCode.ERROR,
|
20653
|
-
message: e.message
|
20644
|
+
message: e.message,
|
20654
20645
|
});
|
20655
20646
|
throw e;
|
20656
20647
|
}
|
@@ -20679,14 +20670,14 @@ class BlockBlobClient extends BlobClient {
|
|
20679
20670
|
return () => fsCreateReadStream(filePath, {
|
20680
20671
|
autoClose: true,
|
20681
20672
|
end: count ? offset + count - 1 : Infinity,
|
20682
|
-
start: offset
|
20673
|
+
start: offset,
|
20683
20674
|
});
|
20684
20675
|
}, size, Object.assign(Object.assign({}, options), { tracingOptions: Object.assign(Object.assign({}, options.tracingOptions), convertTracingToRequestOptionsBase(updatedOptions)) }));
|
20685
20676
|
}
|
20686
20677
|
catch (e) {
|
20687
20678
|
span.setStatus({
|
20688
20679
|
code: coreTracing.SpanStatusCode.ERROR,
|
20689
|
-
message: e.message
|
20680
|
+
message: e.message,
|
20690
20681
|
});
|
20691
20682
|
throw e;
|
20692
20683
|
}
|
@@ -20730,7 +20721,7 @@ class BlockBlobClient extends BlobClient {
|
|
20730
20721
|
await this.stageBlock(blockID, body, length, {
|
20731
20722
|
conditions: options.conditions,
|
20732
20723
|
encryptionScope: options.encryptionScope,
|
20733
|
-
tracingOptions: updatedOptions.tracingOptions
|
20724
|
+
tracingOptions: updatedOptions.tracingOptions,
|
20734
20725
|
});
|
20735
20726
|
// Update progress after block is successfully uploaded to server, in case of block trying
|
20736
20727
|
transferProgress += length;
|
@@ -20749,7 +20740,7 @@ class BlockBlobClient extends BlobClient {
|
|
20749
20740
|
catch (e) {
|
20750
20741
|
span.setStatus({
|
20751
20742
|
code: coreTracing.SpanStatusCode.ERROR,
|
20752
|
-
message: e.message
|
20743
|
+
message: e.message,
|
20753
20744
|
});
|
20754
20745
|
throw e;
|
20755
20746
|
}
|
@@ -20855,7 +20846,7 @@ class PageBlobClient extends BlobClient {
|
|
20855
20846
|
catch (e) {
|
20856
20847
|
span.setStatus({
|
20857
20848
|
code: coreTracing.SpanStatusCode.ERROR,
|
20858
|
-
message: e.message
|
20849
|
+
message: e.message,
|
20859
20850
|
});
|
20860
20851
|
throw e;
|
20861
20852
|
}
|
@@ -20878,20 +20869,19 @@ class PageBlobClient extends BlobClient {
|
|
20878
20869
|
try {
|
20879
20870
|
const conditions = { ifNoneMatch: ETagAny };
|
20880
20871
|
const res = await this.create(size, Object.assign(Object.assign({}, options), { conditions, tracingOptions: updatedOptions.tracingOptions }));
|
20881
|
-
return Object.assign(Object.assign({ succeeded: true }, res), { _response: res._response
|
20882
|
-
});
|
20872
|
+
return Object.assign(Object.assign({ succeeded: true }, res), { _response: res._response });
|
20883
20873
|
}
|
20884
20874
|
catch (e) {
|
20885
20875
|
if (((_a = e.details) === null || _a === void 0 ? void 0 : _a.errorCode) === "BlobAlreadyExists") {
|
20886
20876
|
span.setStatus({
|
20887
20877
|
code: coreTracing.SpanStatusCode.ERROR,
|
20888
|
-
message: "Expected exception when creating a blob only if it does not already exist."
|
20878
|
+
message: "Expected exception when creating a blob only if it does not already exist.",
|
20889
20879
|
});
|
20890
20880
|
return Object.assign(Object.assign({ succeeded: false }, (_b = e.response) === null || _b === void 0 ? void 0 : _b.parsedHeaders), { _response: e.response });
|
20891
20881
|
}
|
20892
20882
|
span.setStatus({
|
20893
20883
|
code: coreTracing.SpanStatusCode.ERROR,
|
20894
|
-
message: e.message
|
20884
|
+
message: e.message,
|
20895
20885
|
});
|
20896
20886
|
throw e;
|
20897
20887
|
}
|
@@ -20916,13 +20906,13 @@ class PageBlobClient extends BlobClient {
|
|
20916
20906
|
try {
|
20917
20907
|
ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps);
|
20918
20908
|
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: {
|
20919
|
-
onUploadProgress: options.onProgress
|
20909
|
+
onUploadProgress: options.onProgress,
|
20920
20910
|
}, range: rangeToString({ offset, count }), sequenceNumberAccessConditions: options.conditions, transactionalContentMD5: options.transactionalContentMD5, transactionalContentCrc64: options.transactionalContentCrc64, cpkInfo: options.customerProvidedKey, encryptionScope: options.encryptionScope }, convertTracingToRequestOptionsBase(updatedOptions)));
|
20921
20911
|
}
|
20922
20912
|
catch (e) {
|
20923
20913
|
span.setStatus({
|
20924
20914
|
code: coreTracing.SpanStatusCode.ERROR,
|
20925
|
-
message: e.message
|
20915
|
+
message: e.message,
|
20926
20916
|
});
|
20927
20917
|
throw e;
|
20928
20918
|
}
|
@@ -20952,13 +20942,13 @@ class PageBlobClient extends BlobClient {
|
|
20952
20942
|
sourceIfMatch: options.sourceConditions.ifMatch,
|
20953
20943
|
sourceIfModifiedSince: options.sourceConditions.ifModifiedSince,
|
20954
20944
|
sourceIfNoneMatch: options.sourceConditions.ifNoneMatch,
|
20955
|
-
sourceIfUnmodifiedSince: options.sourceConditions.ifUnmodifiedSince
|
20945
|
+
sourceIfUnmodifiedSince: options.sourceConditions.ifUnmodifiedSince,
|
20956
20946
|
}, cpkInfo: options.customerProvidedKey, encryptionScope: options.encryptionScope, copySourceAuthorization: httpAuthorizationToString(options.sourceAuthorization) }, convertTracingToRequestOptionsBase(updatedOptions)));
|
20957
20947
|
}
|
20958
20948
|
catch (e) {
|
20959
20949
|
span.setStatus({
|
20960
20950
|
code: coreTracing.SpanStatusCode.ERROR,
|
20961
|
-
message: e.message
|
20951
|
+
message: e.message,
|
20962
20952
|
});
|
20963
20953
|
throw e;
|
20964
20954
|
}
|
@@ -20985,7 +20975,7 @@ class PageBlobClient extends BlobClient {
|
|
20985
20975
|
catch (e) {
|
20986
20976
|
span.setStatus({
|
20987
20977
|
code: coreTracing.SpanStatusCode.ERROR,
|
20988
|
-
message: e.message
|
20978
|
+
message: e.message,
|
20989
20979
|
});
|
20990
20980
|
throw e;
|
20991
20981
|
}
|
@@ -21014,7 +21004,7 @@ class PageBlobClient extends BlobClient {
|
|
21014
21004
|
catch (e) {
|
21015
21005
|
span.setStatus({
|
21016
21006
|
code: coreTracing.SpanStatusCode.ERROR,
|
21017
|
-
message: e.message
|
21007
|
+
message: e.message,
|
21018
21008
|
});
|
21019
21009
|
throw e;
|
21020
21010
|
}
|
@@ -21044,7 +21034,7 @@ class PageBlobClient extends BlobClient {
|
|
21044
21034
|
catch (e) {
|
21045
21035
|
span.setStatus({
|
21046
21036
|
code: coreTracing.SpanStatusCode.ERROR,
|
21047
|
-
message: e.message
|
21037
|
+
message: e.message,
|
21048
21038
|
});
|
21049
21039
|
throw e;
|
21050
21040
|
}
|
@@ -21074,7 +21064,7 @@ class PageBlobClient extends BlobClient {
|
|
21074
21064
|
catch (e) {
|
21075
21065
|
span.setStatus({
|
21076
21066
|
code: coreTracing.SpanStatusCode.ERROR,
|
21077
|
-
message: e.message
|
21067
|
+
message: e.message,
|
21078
21068
|
});
|
21079
21069
|
throw e;
|
21080
21070
|
}
|
@@ -21100,7 +21090,7 @@ class PageBlobClient extends BlobClient {
|
|
21100
21090
|
catch (e) {
|
21101
21091
|
span.setStatus({
|
21102
21092
|
code: coreTracing.SpanStatusCode.ERROR,
|
21103
|
-
message: e.message
|
21093
|
+
message: e.message,
|
21104
21094
|
});
|
21105
21095
|
throw e;
|
21106
21096
|
}
|
@@ -21127,7 +21117,7 @@ class PageBlobClient extends BlobClient {
|
|
21127
21117
|
catch (e) {
|
21128
21118
|
span.setStatus({
|
21129
21119
|
code: coreTracing.SpanStatusCode.ERROR,
|
21130
|
-
message: e.message
|
21120
|
+
message: e.message,
|
21131
21121
|
});
|
21132
21122
|
throw e;
|
21133
21123
|
}
|
@@ -21157,7 +21147,7 @@ class PageBlobClient extends BlobClient {
|
|
21157
21147
|
catch (e) {
|
21158
21148
|
span.setStatus({
|
21159
21149
|
code: coreTracing.SpanStatusCode.ERROR,
|
21160
|
-
message: e.message
|
21150
|
+
message: e.message,
|
21161
21151
|
});
|
21162
21152
|
throw e;
|
21163
21153
|
}
|
@@ -21305,7 +21295,7 @@ class BatchResponseParser {
|
|
21305
21295
|
return {
|
21306
21296
|
subResponses: deserializedSubResponses,
|
21307
21297
|
subResponsesSucceededCount: subResponsesSucceededCount,
|
21308
|
-
subResponsesFailedCount: subResponsesFailedCount
|
21298
|
+
subResponsesFailedCount: subResponsesFailedCount,
|
21309
21299
|
};
|
21310
21300
|
}
|
21311
21301
|
}
|
@@ -21452,7 +21442,7 @@ class BlobBatch {
|
|
21452
21442
|
this.setBatchType("delete");
|
21453
21443
|
await this.addSubRequestInternal({
|
21454
21444
|
url: url,
|
21455
|
-
credential: credential
|
21445
|
+
credential: credential,
|
21456
21446
|
}, async () => {
|
21457
21447
|
await new BlobClient(url, this.batchRequest.createPipeline(credential)).delete(updatedOptions);
|
21458
21448
|
});
|
@@ -21460,7 +21450,7 @@ class BlobBatch {
|
|
21460
21450
|
catch (e) {
|
21461
21451
|
span.setStatus({
|
21462
21452
|
code: coreTracing.SpanStatusCode.ERROR,
|
21463
|
-
message: e.message
|
21453
|
+
message: e.message,
|
21464
21454
|
});
|
21465
21455
|
throw e;
|
21466
21456
|
}
|
@@ -21499,7 +21489,7 @@ class BlobBatch {
|
|
21499
21489
|
this.setBatchType("setAccessTier");
|
21500
21490
|
await this.addSubRequestInternal({
|
21501
21491
|
url: url,
|
21502
|
-
credential: credential
|
21492
|
+
credential: credential,
|
21503
21493
|
}, async () => {
|
21504
21494
|
await new BlobClient(url, this.batchRequest.createPipeline(credential)).setAccessTier(tier, updatedOptions);
|
21505
21495
|
});
|
@@ -21507,7 +21497,7 @@ class BlobBatch {
|
|
21507
21497
|
catch (e) {
|
21508
21498
|
span.setStatus({
|
21509
21499
|
code: coreTracing.SpanStatusCode.ERROR,
|
21510
|
-
message: e.message
|
21500
|
+
message: e.message,
|
21511
21501
|
});
|
21512
21502
|
throw e;
|
21513
21503
|
}
|
@@ -21564,7 +21554,7 @@ class InnerBatchRequest {
|
|
21564
21554
|
this.subRequestPrefix,
|
21565
21555
|
`${HeaderConstants.CONTENT_ID}: ${this.operationCount}`,
|
21566
21556
|
"",
|
21567
|
-
`${request.method.toString()} ${getURLPathAndQuery(request.url)} ${HTTP_VERSION_1_1}${HTTP_LINE_ENDING}
|
21557
|
+
`${request.method.toString()} ${getURLPathAndQuery(request.url)} ${HTTP_VERSION_1_1}${HTTP_LINE_ENDING}`, // sub request start line with method
|
21568
21558
|
].join(HTTP_LINE_ENDING);
|
21569
21559
|
for (const header of request.headers.headersArray()) {
|
21570
21560
|
this.body += `${header.name}: ${header.value}${HTTP_LINE_ENDING}`;
|
@@ -21604,7 +21594,7 @@ class BatchRequestAssemblePolicy extends coreHttp.BaseRequestPolicy {
|
|
21604
21594
|
this.dummyResponse = {
|
21605
21595
|
request: new coreHttp.WebResource(),
|
21606
21596
|
status: 200,
|
21607
|
-
headers: new coreHttp.HttpHeaders()
|
21597
|
+
headers: new coreHttp.HttpHeaders(),
|
21608
21598
|
};
|
21609
21599
|
this.batchRequest = batchRequest;
|
21610
21600
|
}
|
@@ -21771,14 +21761,14 @@ class BlobBatchClient {
|
|
21771
21761
|
version: rawBatchResponse.version,
|
21772
21762
|
subResponses: responseSummary.subResponses,
|
21773
21763
|
subResponsesSucceededCount: responseSummary.subResponsesSucceededCount,
|
21774
|
-
subResponsesFailedCount: responseSummary.subResponsesFailedCount
|
21764
|
+
subResponsesFailedCount: responseSummary.subResponsesFailedCount,
|
21775
21765
|
};
|
21776
21766
|
return res;
|
21777
21767
|
}
|
21778
21768
|
catch (e) {
|
21779
21769
|
span.setStatus({
|
21780
21770
|
code: coreTracing.SpanStatusCode.ERROR,
|
21781
|
-
message: e.message
|
21771
|
+
message: e.message,
|
21782
21772
|
});
|
21783
21773
|
throw e;
|
21784
21774
|
}
|
@@ -21881,7 +21871,7 @@ class ContainerClient extends StorageClient {
|
|
21881
21871
|
catch (e) {
|
21882
21872
|
span.setStatus({
|
21883
21873
|
code: coreTracing.SpanStatusCode.ERROR,
|
21884
|
-
message: e.message
|
21874
|
+
message: e.message,
|
21885
21875
|
});
|
21886
21876
|
throw e;
|
21887
21877
|
}
|
@@ -21901,20 +21891,19 @@ class ContainerClient extends StorageClient {
|
|
21901
21891
|
const { span, updatedOptions } = createSpan("ContainerClient-createIfNotExists", options);
|
21902
21892
|
try {
|
21903
21893
|
const res = await this.create(updatedOptions);
|
21904
|
-
return Object.assign(Object.assign({ succeeded: true }, res), { _response: res._response
|
21905
|
-
});
|
21894
|
+
return Object.assign(Object.assign({ succeeded: true }, res), { _response: res._response });
|
21906
21895
|
}
|
21907
21896
|
catch (e) {
|
21908
21897
|
if (((_a = e.details) === null || _a === void 0 ? void 0 : _a.errorCode) === "ContainerAlreadyExists") {
|
21909
21898
|
span.setStatus({
|
21910
21899
|
code: coreTracing.SpanStatusCode.ERROR,
|
21911
|
-
message: "Expected exception when creating a container only if it does not already exist."
|
21900
|
+
message: "Expected exception when creating a container only if it does not already exist.",
|
21912
21901
|
});
|
21913
21902
|
return Object.assign(Object.assign({ succeeded: false }, (_b = e.response) === null || _b === void 0 ? void 0 : _b.parsedHeaders), { _response: e.response });
|
21914
21903
|
}
|
21915
21904
|
span.setStatus({
|
21916
21905
|
code: coreTracing.SpanStatusCode.ERROR,
|
21917
|
-
message: e.message
|
21906
|
+
message: e.message,
|
21918
21907
|
});
|
21919
21908
|
throw e;
|
21920
21909
|
}
|
@@ -21936,7 +21925,7 @@ class ContainerClient extends StorageClient {
|
|
21936
21925
|
try {
|
21937
21926
|
await this.getProperties({
|
21938
21927
|
abortSignal: options.abortSignal,
|
21939
|
-
tracingOptions: updatedOptions.tracingOptions
|
21928
|
+
tracingOptions: updatedOptions.tracingOptions,
|
21940
21929
|
});
|
21941
21930
|
return true;
|
21942
21931
|
}
|
@@ -21944,13 +21933,13 @@ class ContainerClient extends StorageClient {
|
|
21944
21933
|
if (e.statusCode === 404) {
|
21945
21934
|
span.setStatus({
|
21946
21935
|
code: coreTracing.SpanStatusCode.ERROR,
|
21947
|
-
message: "Expected exception when checking container existence"
|
21936
|
+
message: "Expected exception when checking container existence",
|
21948
21937
|
});
|
21949
21938
|
return false;
|
21950
21939
|
}
|
21951
21940
|
span.setStatus({
|
21952
21941
|
code: coreTracing.SpanStatusCode.ERROR,
|
21953
|
-
message: e.message
|
21942
|
+
message: e.message,
|
21954
21943
|
});
|
21955
21944
|
throw e;
|
21956
21945
|
}
|
@@ -22024,7 +22013,7 @@ class ContainerClient extends StorageClient {
|
|
22024
22013
|
catch (e) {
|
22025
22014
|
span.setStatus({
|
22026
22015
|
code: coreTracing.SpanStatusCode.ERROR,
|
22027
|
-
message: e.message
|
22016
|
+
message: e.message,
|
22028
22017
|
});
|
22029
22018
|
throw e;
|
22030
22019
|
}
|
@@ -22050,7 +22039,7 @@ class ContainerClient extends StorageClient {
|
|
22050
22039
|
catch (e) {
|
22051
22040
|
span.setStatus({
|
22052
22041
|
code: coreTracing.SpanStatusCode.ERROR,
|
22053
|
-
message: e.message
|
22042
|
+
message: e.message,
|
22054
22043
|
});
|
22055
22044
|
throw e;
|
22056
22045
|
}
|
@@ -22070,20 +22059,19 @@ class ContainerClient extends StorageClient {
|
|
22070
22059
|
const { span, updatedOptions } = createSpan("ContainerClient-deleteIfExists", options);
|
22071
22060
|
try {
|
22072
22061
|
const res = await this.delete(updatedOptions);
|
22073
|
-
return Object.assign(Object.assign({ succeeded: true }, res), { _response: res._response
|
22074
|
-
});
|
22062
|
+
return Object.assign(Object.assign({ succeeded: true }, res), { _response: res._response });
|
22075
22063
|
}
|
22076
22064
|
catch (e) {
|
22077
22065
|
if (((_a = e.details) === null || _a === void 0 ? void 0 : _a.errorCode) === "ContainerNotFound") {
|
22078
22066
|
span.setStatus({
|
22079
22067
|
code: coreTracing.SpanStatusCode.ERROR,
|
22080
|
-
message: "Expected exception when deleting a container only if it exists."
|
22068
|
+
message: "Expected exception when deleting a container only if it exists.",
|
22081
22069
|
});
|
22082
22070
|
return Object.assign(Object.assign({ succeeded: false }, (_b = e.response) === null || _b === void 0 ? void 0 : _b.parsedHeaders), { _response: e.response });
|
22083
22071
|
}
|
22084
22072
|
span.setStatus({
|
22085
22073
|
code: coreTracing.SpanStatusCode.ERROR,
|
22086
|
-
message: e.message
|
22074
|
+
message: e.message,
|
22087
22075
|
});
|
22088
22076
|
throw e;
|
22089
22077
|
}
|
@@ -22117,7 +22105,7 @@ class ContainerClient extends StorageClient {
|
|
22117
22105
|
catch (e) {
|
22118
22106
|
span.setStatus({
|
22119
22107
|
code: coreTracing.SpanStatusCode.ERROR,
|
22120
|
-
message: e.message
|
22108
|
+
message: e.message,
|
22121
22109
|
});
|
22122
22110
|
throw e;
|
22123
22111
|
}
|
@@ -22153,13 +22141,13 @@ class ContainerClient extends StorageClient {
|
|
22153
22141
|
requestId: response.requestId,
|
22154
22142
|
clientRequestId: response.clientRequestId,
|
22155
22143
|
signedIdentifiers: [],
|
22156
|
-
version: response.version
|
22144
|
+
version: response.version,
|
22157
22145
|
};
|
22158
22146
|
for (const identifier of response) {
|
22159
22147
|
let accessPolicy = undefined;
|
22160
22148
|
if (identifier.accessPolicy) {
|
22161
22149
|
accessPolicy = {
|
22162
|
-
permissions: identifier.accessPolicy.permissions
|
22150
|
+
permissions: identifier.accessPolicy.permissions,
|
22163
22151
|
};
|
22164
22152
|
if (identifier.accessPolicy.expiresOn) {
|
22165
22153
|
accessPolicy.expiresOn = new Date(identifier.accessPolicy.expiresOn);
|
@@ -22170,7 +22158,7 @@ class ContainerClient extends StorageClient {
|
|
22170
22158
|
}
|
22171
22159
|
res.signedIdentifiers.push({
|
22172
22160
|
accessPolicy,
|
22173
|
-
id: identifier.id
|
22161
|
+
id: identifier.id,
|
22174
22162
|
});
|
22175
22163
|
}
|
22176
22164
|
return res;
|
@@ -22178,7 +22166,7 @@ class ContainerClient extends StorageClient {
|
|
22178
22166
|
catch (e) {
|
22179
22167
|
span.setStatus({
|
22180
22168
|
code: coreTracing.SpanStatusCode.ERROR,
|
22181
|
-
message: e.message
|
22169
|
+
message: e.message,
|
22182
22170
|
});
|
22183
22171
|
throw e;
|
22184
22172
|
}
|
@@ -22217,9 +22205,9 @@ class ContainerClient extends StorageClient {
|
|
22217
22205
|
permissions: identifier.accessPolicy.permissions,
|
22218
22206
|
startsOn: identifier.accessPolicy.startsOn
|
22219
22207
|
? truncatedISO8061Date(identifier.accessPolicy.startsOn)
|
22220
|
-
: ""
|
22208
|
+
: "",
|
22221
22209
|
},
|
22222
|
-
id: identifier.id
|
22210
|
+
id: identifier.id,
|
22223
22211
|
});
|
22224
22212
|
}
|
22225
22213
|
return await this.containerContext.setAccessPolicy(Object.assign({ abortSignal: options.abortSignal, access, containerAcl: acl, leaseAccessConditions: options.conditions, modifiedAccessConditions: options.conditions }, convertTracingToRequestOptionsBase(updatedOptions)));
|
@@ -22227,7 +22215,7 @@ class ContainerClient extends StorageClient {
|
|
22227
22215
|
catch (e) {
|
22228
22216
|
span.setStatus({
|
22229
22217
|
code: coreTracing.SpanStatusCode.ERROR,
|
22230
|
-
message: e.message
|
22218
|
+
message: e.message,
|
22231
22219
|
});
|
22232
22220
|
throw e;
|
22233
22221
|
}
|
@@ -22273,13 +22261,13 @@ class ContainerClient extends StorageClient {
|
|
22273
22261
|
const response = await blockBlobClient.upload(body, contentLength, updatedOptions);
|
22274
22262
|
return {
|
22275
22263
|
blockBlobClient,
|
22276
|
-
response
|
22264
|
+
response,
|
22277
22265
|
};
|
22278
22266
|
}
|
22279
22267
|
catch (e) {
|
22280
22268
|
span.setStatus({
|
22281
22269
|
code: coreTracing.SpanStatusCode.ERROR,
|
22282
|
-
message: e.message
|
22270
|
+
message: e.message,
|
22283
22271
|
});
|
22284
22272
|
throw e;
|
22285
22273
|
}
|
@@ -22310,7 +22298,7 @@ class ContainerClient extends StorageClient {
|
|
22310
22298
|
catch (e) {
|
22311
22299
|
span.setStatus({
|
22312
22300
|
code: coreTracing.SpanStatusCode.ERROR,
|
22313
|
-
message: e.message
|
22301
|
+
message: e.message,
|
22314
22302
|
});
|
22315
22303
|
throw e;
|
22316
22304
|
}
|
@@ -22345,7 +22333,7 @@ class ContainerClient extends StorageClient {
|
|
22345
22333
|
catch (e) {
|
22346
22334
|
span.setStatus({
|
22347
22335
|
code: coreTracing.SpanStatusCode.ERROR,
|
22348
|
-
message: e.message
|
22336
|
+
message: e.message,
|
22349
22337
|
});
|
22350
22338
|
throw e;
|
22351
22339
|
}
|
@@ -22382,7 +22370,7 @@ class ContainerClient extends StorageClient {
|
|
22382
22370
|
return blobItem;
|
22383
22371
|
}), blobPrefixes: (_a = response.segment.blobPrefixes) === null || _a === void 0 ? void 0 : _a.map((blobPrefixInternal) => {
|
22384
22372
|
const blobPrefix = {
|
22385
|
-
name: BlobNameToString(blobPrefixInternal.name)
|
22373
|
+
name: BlobNameToString(blobPrefixInternal.name),
|
22386
22374
|
};
|
22387
22375
|
return blobPrefix;
|
22388
22376
|
}) }) });
|
@@ -22391,7 +22379,7 @@ class ContainerClient extends StorageClient {
|
|
22391
22379
|
catch (e) {
|
22392
22380
|
span.setStatus({
|
22393
22381
|
code: coreTracing.SpanStatusCode.ERROR,
|
22394
|
-
message: e.message
|
22382
|
+
message: e.message,
|
22395
22383
|
});
|
22396
22384
|
throw e;
|
22397
22385
|
}
|
@@ -22573,7 +22561,7 @@ class ContainerClient extends StorageClient {
|
|
22573
22561
|
*/
|
22574
22562
|
byPage: (settings = {}) => {
|
22575
22563
|
return this.listSegments(settings.continuationToken, Object.assign({ maxPageSize: settings.maxPageSize }, updatedOptions));
|
22576
|
-
}
|
22564
|
+
},
|
22577
22565
|
};
|
22578
22566
|
}
|
22579
22567
|
/**
|
@@ -22647,7 +22635,7 @@ class ContainerClient extends StorageClient {
|
|
22647
22635
|
* if (item.kind === "prefix") {
|
22648
22636
|
* console.log(`\tBlobPrefix: ${item.name}`);
|
22649
22637
|
* } else {
|
22650
|
-
* console.log(`\tBlobItem: name - ${item.name}
|
22638
|
+
* console.log(`\tBlobItem: name - ${item.name}`);
|
22651
22639
|
* }
|
22652
22640
|
* }
|
22653
22641
|
* ```
|
@@ -22662,7 +22650,7 @@ class ContainerClient extends StorageClient {
|
|
22662
22650
|
* if (item.kind === "prefix") {
|
22663
22651
|
* console.log(`\tBlobPrefix: ${item.name}`);
|
22664
22652
|
* } else {
|
22665
|
-
* console.log(`\tBlobItem: name - ${item.name}
|
22653
|
+
* console.log(`\tBlobItem: name - ${item.name}`);
|
22666
22654
|
* }
|
22667
22655
|
* entity = await iter.next();
|
22668
22656
|
* }
|
@@ -22680,7 +22668,7 @@ class ContainerClient extends StorageClient {
|
|
22680
22668
|
* }
|
22681
22669
|
* }
|
22682
22670
|
* for (const blob of response.segment.blobItems) {
|
22683
|
-
* console.log(`\tBlobItem: name - ${blob.name}
|
22671
|
+
* console.log(`\tBlobItem: name - ${blob.name}`);
|
22684
22672
|
* }
|
22685
22673
|
* }
|
22686
22674
|
* ```
|
@@ -22691,7 +22679,9 @@ class ContainerClient extends StorageClient {
|
|
22691
22679
|
* console.log("Listing blobs by hierarchy by page, specifying a prefix and a max page size");
|
22692
22680
|
*
|
22693
22681
|
* let i = 1;
|
22694
|
-
* for await (const response of containerClient
|
22682
|
+
* for await (const response of containerClient
|
22683
|
+
* .listBlobsByHierarchy("/", { prefix: "prefix2/sub1/" })
|
22684
|
+
* .byPage({ maxPageSize: 2 })) {
|
22695
22685
|
* console.log(`Page ${i++}`);
|
22696
22686
|
* const segment = response.segment;
|
22697
22687
|
*
|
@@ -22702,7 +22692,7 @@ class ContainerClient extends StorageClient {
|
|
22702
22692
|
* }
|
22703
22693
|
*
|
22704
22694
|
* for (const blob of response.segment.blobItems) {
|
22705
|
-
* console.log(`\tBlobItem: name - ${blob.name}
|
22695
|
+
* console.log(`\tBlobItem: name - ${blob.name}`);
|
22706
22696
|
* }
|
22707
22697
|
* }
|
22708
22698
|
* ```
|
@@ -22769,7 +22759,7 @@ class ContainerClient extends StorageClient {
|
|
22769
22759
|
*/
|
22770
22760
|
byPage: (settings = {}) => {
|
22771
22761
|
return this.listHierarchySegments(delimiter, settings.continuationToken, Object.assign({ maxPageSize: settings.maxPageSize }, updatedOptions));
|
22772
|
-
}
|
22762
|
+
},
|
22773
22763
|
};
|
22774
22764
|
}
|
22775
22765
|
getContainerNameFromUrl() {
|
@@ -23282,7 +23272,7 @@ function generateAccountSASQueryParameters(accountSASSignatureValues, sharedKeyC
|
|
23282
23272
|
accountSASSignatureValues.protocol ? accountSASSignatureValues.protocol : "",
|
23283
23273
|
version,
|
23284
23274
|
accountSASSignatureValues.encryptionScope ? accountSASSignatureValues.encryptionScope : "",
|
23285
|
-
"" // Account SAS requires an additional newline character
|
23275
|
+
"", // Account SAS requires an additional newline character
|
23286
23276
|
].join("\n");
|
23287
23277
|
}
|
23288
23278
|
else {
|
@@ -23298,7 +23288,7 @@ function generateAccountSASQueryParameters(accountSASSignatureValues, sharedKeyC
|
|
23298
23288
|
accountSASSignatureValues.ipRange ? ipRangeToString(accountSASSignatureValues.ipRange) : "",
|
23299
23289
|
accountSASSignatureValues.protocol ? accountSASSignatureValues.protocol : "",
|
23300
23290
|
version,
|
23301
|
-
"" // Account SAS requires an additional newline character
|
23291
|
+
"", // Account SAS requires an additional newline character
|
23302
23292
|
].join("\n");
|
23303
23293
|
}
|
23304
23294
|
const signature = sharedKeyCredential.computeHMACSHA256(stringToSign);
|
@@ -23393,13 +23383,13 @@ class BlobServiceClient extends StorageClient {
|
|
23393
23383
|
const containerCreateResponse = await containerClient.create(updatedOptions);
|
23394
23384
|
return {
|
23395
23385
|
containerClient,
|
23396
|
-
containerCreateResponse
|
23386
|
+
containerCreateResponse,
|
23397
23387
|
};
|
23398
23388
|
}
|
23399
23389
|
catch (e) {
|
23400
23390
|
span.setStatus({
|
23401
23391
|
code: coreTracing.SpanStatusCode.ERROR,
|
23402
|
-
message: e.message
|
23392
|
+
message: e.message,
|
23403
23393
|
});
|
23404
23394
|
throw e;
|
23405
23395
|
}
|
@@ -23423,7 +23413,7 @@ class BlobServiceClient extends StorageClient {
|
|
23423
23413
|
catch (e) {
|
23424
23414
|
span.setStatus({
|
23425
23415
|
code: coreTracing.SpanStatusCode.ERROR,
|
23426
|
-
message: e.message
|
23416
|
+
message: e.message,
|
23427
23417
|
});
|
23428
23418
|
throw e;
|
23429
23419
|
}
|
@@ -23453,7 +23443,7 @@ class BlobServiceClient extends StorageClient {
|
|
23453
23443
|
catch (e) {
|
23454
23444
|
span.setStatus({
|
23455
23445
|
code: coreTracing.SpanStatusCode.ERROR,
|
23456
|
-
message: e.message
|
23446
|
+
message: e.message,
|
23457
23447
|
});
|
23458
23448
|
throw e;
|
23459
23449
|
}
|
@@ -23483,7 +23473,7 @@ class BlobServiceClient extends StorageClient {
|
|
23483
23473
|
catch (e) {
|
23484
23474
|
span.setStatus({
|
23485
23475
|
code: coreTracing.SpanStatusCode.ERROR,
|
23486
|
-
message: e.message
|
23476
|
+
message: e.message,
|
23487
23477
|
});
|
23488
23478
|
throw e;
|
23489
23479
|
}
|
@@ -23507,7 +23497,7 @@ class BlobServiceClient extends StorageClient {
|
|
23507
23497
|
catch (e) {
|
23508
23498
|
span.setStatus({
|
23509
23499
|
code: coreTracing.SpanStatusCode.ERROR,
|
23510
|
-
message: e.message
|
23500
|
+
message: e.message,
|
23511
23501
|
});
|
23512
23502
|
throw e;
|
23513
23503
|
}
|
@@ -23532,7 +23522,7 @@ class BlobServiceClient extends StorageClient {
|
|
23532
23522
|
catch (e) {
|
23533
23523
|
span.setStatus({
|
23534
23524
|
code: coreTracing.SpanStatusCode.ERROR,
|
23535
|
-
message: e.message
|
23525
|
+
message: e.message,
|
23536
23526
|
});
|
23537
23527
|
throw e;
|
23538
23528
|
}
|
@@ -23557,7 +23547,7 @@ class BlobServiceClient extends StorageClient {
|
|
23557
23547
|
catch (e) {
|
23558
23548
|
span.setStatus({
|
23559
23549
|
code: coreTracing.SpanStatusCode.ERROR,
|
23560
|
-
message: e.message
|
23550
|
+
message: e.message,
|
23561
23551
|
});
|
23562
23552
|
throw e;
|
23563
23553
|
}
|
@@ -23583,7 +23573,7 @@ class BlobServiceClient extends StorageClient {
|
|
23583
23573
|
catch (e) {
|
23584
23574
|
span.setStatus({
|
23585
23575
|
code: coreTracing.SpanStatusCode.ERROR,
|
23586
|
-
message: e.message
|
23576
|
+
message: e.message,
|
23587
23577
|
});
|
23588
23578
|
throw e;
|
23589
23579
|
}
|
@@ -23613,7 +23603,7 @@ class BlobServiceClient extends StorageClient {
|
|
23613
23603
|
catch (e) {
|
23614
23604
|
span.setStatus({
|
23615
23605
|
code: coreTracing.SpanStatusCode.ERROR,
|
23616
|
-
message: e.message
|
23606
|
+
message: e.message,
|
23617
23607
|
});
|
23618
23608
|
throw e;
|
23619
23609
|
}
|
@@ -23656,7 +23646,7 @@ class BlobServiceClient extends StorageClient {
|
|
23656
23646
|
catch (e) {
|
23657
23647
|
span.setStatus({
|
23658
23648
|
code: coreTracing.SpanStatusCode.ERROR,
|
23659
|
-
message: e.message
|
23649
|
+
message: e.message,
|
23660
23650
|
});
|
23661
23651
|
throw e;
|
23662
23652
|
}
|
@@ -23822,7 +23812,7 @@ class BlobServiceClient extends StorageClient {
|
|
23822
23812
|
*/
|
23823
23813
|
byPage: (settings = {}) => {
|
23824
23814
|
return this.findBlobsByTagsSegments(tagFilterSqlExpression, settings.continuationToken, Object.assign({ maxPageSize: settings.maxPageSize }, listSegmentOptions));
|
23825
|
-
}
|
23815
|
+
},
|
23826
23816
|
};
|
23827
23817
|
}
|
23828
23818
|
/**
|
@@ -23984,7 +23974,7 @@ class BlobServiceClient extends StorageClient {
|
|
23984
23974
|
*/
|
23985
23975
|
byPage: (settings = {}) => {
|
23986
23976
|
return this.listSegments(settings.continuationToken, Object.assign({ maxPageSize: settings.maxPageSize }, listSegmentOptions));
|
23987
|
-
}
|
23977
|
+
},
|
23988
23978
|
};
|
23989
23979
|
}
|
23990
23980
|
/**
|
@@ -24003,7 +23993,7 @@ class BlobServiceClient extends StorageClient {
|
|
24003
23993
|
try {
|
24004
23994
|
const response = await this.serviceContext.getUserDelegationKey({
|
24005
23995
|
startsOn: truncatedISO8061Date(startsOn, false),
|
24006
|
-
expiresOn: truncatedISO8061Date(expiresOn, false)
|
23996
|
+
expiresOn: truncatedISO8061Date(expiresOn, false),
|
24007
23997
|
}, Object.assign({ abortSignal: options.abortSignal }, convertTracingToRequestOptionsBase(updatedOptions)));
|
24008
23998
|
const userDelegationKey = {
|
24009
23999
|
signedObjectId: response.signedObjectId,
|
@@ -24012,7 +24002,7 @@ class BlobServiceClient extends StorageClient {
|
|
24012
24002
|
signedExpiresOn: new Date(response.signedExpiresOn),
|
24013
24003
|
signedService: response.signedService,
|
24014
24004
|
signedVersion: response.signedVersion,
|
24015
|
-
value: response.value
|
24005
|
+
value: response.value,
|
24016
24006
|
};
|
24017
24007
|
const res = Object.assign({ _response: response._response, requestId: response.requestId, clientRequestId: response.clientRequestId, version: response.version, date: response.date, errorCode: response.errorCode }, userDelegationKey);
|
24018
24008
|
return res;
|
@@ -24020,7 +24010,7 @@ class BlobServiceClient extends StorageClient {
|
|
24020
24010
|
catch (e) {
|
24021
24011
|
span.setStatus({
|
24022
24012
|
code: coreTracing.SpanStatusCode.ERROR,
|
24023
|
-
message: e.message
|
24013
|
+
message: e.message,
|
24024
24014
|
});
|
24025
24015
|
throw e;
|
24026
24016
|
}
|