@azure/storage-blob 12.20.0-alpha.20230320.1 → 12.20.0-alpha.20230418.1
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/dist/index.js +214 -177
- package/dist/index.js.map +1 -1
- package/dist-esm/storage-blob/src/BlobBatch.js +0 -2
- 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 +13 -13
- package/dist-esm/storage-blob/src/BlobDownloadResponse.js.map +1 -1
- package/dist-esm/storage-blob/src/BlobLeaseClient.js +16 -16
- package/dist-esm/storage-blob/src/BlobLeaseClient.js.map +1 -1
- package/dist-esm/storage-blob/src/BlobQueryResponse.browser.js +9 -9
- package/dist-esm/storage-blob/src/BlobQueryResponse.browser.js.map +1 -1
- package/dist-esm/storage-blob/src/BlobQueryResponse.js +10 -10
- package/dist-esm/storage-blob/src/BlobQueryResponse.js.map +1 -1
- package/dist-esm/storage-blob/src/BlobServiceClient.js +44 -30
- package/dist-esm/storage-blob/src/BlobServiceClient.js.map +1 -1
- package/dist-esm/storage-blob/src/Clients.js +36 -22
- package/dist-esm/storage-blob/src/Clients.js.map +1 -1
- package/dist-esm/storage-blob/src/ContainerClient.js +47 -26
- package/dist-esm/storage-blob/src/ContainerClient.js.map +1 -1
- package/dist-esm/storage-blob/src/Pipeline.js +0 -2
- package/dist-esm/storage-blob/src/Pipeline.js.map +1 -1
- package/dist-esm/storage-blob/src/StorageClient.js +2 -2
- package/dist-esm/storage-blob/src/StorageClient.js.map +1 -1
- package/dist-esm/storage-blob/src/StorageContextClient.js +17 -0
- package/dist-esm/storage-blob/src/StorageContextClient.js.map +1 -0
- package/dist-esm/storage-blob/src/sas/SASQueryParameters.js +14 -14
- package/dist-esm/storage-blob/src/sas/SASQueryParameters.js.map +1 -1
- package/dist-esm/storage-blob/src/utils/Mutex.js +2 -1
- package/dist-esm/storage-blob/src/utils/Mutex.js.map +1 -1
- package/dist-esm/storage-common/src/PooledBuffer.js +6 -6
- package/dist-esm/storage-common/src/PooledBuffer.js.map +1 -1
- package/dist-esm/storage-internal-avro/src/AvroReadableFromStream.js +5 -5
- package/dist-esm/storage-internal-avro/src/AvroReadableFromStream.js.map +1 -1
- package/dist-esm/storage-internal-avro/src/AvroReader.js +6 -6
- package/dist-esm/storage-internal-avro/src/AvroReader.js.map +1 -1
- package/package.json +2 -2
- package/dist-esm/storage-blob/src/policies/PathParameterWorkaroundPolicy.js +0 -25
- package/dist-esm/storage-blob/src/policies/PathParameterWorkaroundPolicy.js.map +0 -1
package/dist/index.js
CHANGED
@@ -1817,31 +1817,6 @@ function storageSharedKeyCredentialPolicy(options) {
|
|
1817
1817
|
};
|
1818
1818
|
}
|
1819
1819
|
|
1820
|
-
// Copyright (c) Microsoft Corporation.
|
1821
|
-
// Licensed under the MIT license.
|
1822
|
-
/**
|
1823
|
-
* The programmatic identifier of the pathParameterWorkaroundPolicy.
|
1824
|
-
*/
|
1825
|
-
const pathParameterWorkaroundPolicyName = "pathParameterWorkaroundPolicy";
|
1826
|
-
/**
|
1827
|
-
* pathParameterWorkaroundPolicy works around a generator issue with path parameters being
|
1828
|
-
* left in the URL.
|
1829
|
-
*/
|
1830
|
-
function pathParameterWorkaroundPolicy() {
|
1831
|
-
return {
|
1832
|
-
name: pathParameterWorkaroundPolicyName,
|
1833
|
-
async sendRequest(request, next) {
|
1834
|
-
if (request.url.includes("/%7BcontainerName%7D/%7Bblob%7D")) {
|
1835
|
-
request.url = request.url.replace("/%7BcontainerName%7D/%7Bblob%7D", "");
|
1836
|
-
}
|
1837
|
-
else if (request.url.includes("/%7BcontainerName%7D")) {
|
1838
|
-
request.url = request.url.replace("/%7BcontainerName%7D", "");
|
1839
|
-
}
|
1840
|
-
return next(request);
|
1841
|
-
},
|
1842
|
-
};
|
1843
|
-
}
|
1844
|
-
|
1845
1820
|
// Copyright (c) Microsoft Corporation.
|
1846
1821
|
/**
|
1847
1822
|
* StorageBrowserPolicy will handle differences between Node.js and browser runtime, including:
|
@@ -2028,7 +2003,6 @@ function getCoreClientOptions(pipeline) {
|
|
2028
2003
|
} }));
|
2029
2004
|
corePipeline.removePolicy({ phase: "Retry" });
|
2030
2005
|
corePipeline.removePolicy({ name: coreRestPipeline.decompressResponsePolicyName });
|
2031
|
-
corePipeline.addPolicy(pathParameterWorkaroundPolicy());
|
2032
2006
|
corePipeline.addPolicy(storageRetryPolicy(restOptions.retryOptions), { phase: "Retry" });
|
2033
2007
|
corePipeline.addPolicy(storageBrowserPolicy());
|
2034
2008
|
const downlevelResults = processDownlevelPipeline(pipeline);
|
@@ -15216,6 +15190,21 @@ class StorageClient$1 extends coreHttpCompat__namespace.ExtendedServiceClient {
|
|
15216
15190
|
}
|
15217
15191
|
}
|
15218
15192
|
|
15193
|
+
// Copyright (c) Microsoft Corporation.
|
15194
|
+
/**
|
15195
|
+
* @internal
|
15196
|
+
*/
|
15197
|
+
class StorageContextClient extends StorageClient$1 {
|
15198
|
+
async sendOperationRequest(operationArguments, operationSpec) {
|
15199
|
+
const operationSpecToSend = Object.assign({}, operationSpec);
|
15200
|
+
if (operationSpecToSend.path === "/{containerName}" ||
|
15201
|
+
operationSpecToSend.path === "/{containerName}/{blob}") {
|
15202
|
+
operationSpecToSend.path = "";
|
15203
|
+
}
|
15204
|
+
return super.sendOperationRequest(operationArguments, operationSpecToSend);
|
15205
|
+
}
|
15206
|
+
}
|
15207
|
+
|
15219
15208
|
// Copyright (c) Microsoft Corporation.
|
15220
15209
|
/**
|
15221
15210
|
* A StorageClient represents a based URL class for {@link BlobServiceClient}, {@link ContainerClient}
|
@@ -15232,7 +15221,7 @@ class StorageClient {
|
|
15232
15221
|
this.url = escapeURLPath(url);
|
15233
15222
|
this.accountName = getAccountNameFromUrl(url);
|
15234
15223
|
this.pipeline = pipeline;
|
15235
|
-
this.storageClientContext = new
|
15224
|
+
this.storageClientContext = new StorageContextClient(this.url, getCoreClientOptions(pipeline));
|
15236
15225
|
this.isHttps = iEqual(getURLScheme(this.url) || "", "https");
|
15237
15226
|
this.credential = getCredentialFromPipeline(pipeline);
|
15238
15227
|
// Override protocol layer's default content-type
|
@@ -15735,6 +15724,20 @@ exports.SASProtocol = void 0;
|
|
15735
15724
|
* NOTE: Instances of this class are immutable.
|
15736
15725
|
*/
|
15737
15726
|
class SASQueryParameters {
|
15727
|
+
/**
|
15728
|
+
* Optional. IP range allowed for this SAS.
|
15729
|
+
*
|
15730
|
+
* @readonly
|
15731
|
+
*/
|
15732
|
+
get ipRange() {
|
15733
|
+
if (this.ipRangeInner) {
|
15734
|
+
return {
|
15735
|
+
end: this.ipRangeInner.end,
|
15736
|
+
start: this.ipRangeInner.start,
|
15737
|
+
};
|
15738
|
+
}
|
15739
|
+
return undefined;
|
15740
|
+
}
|
15738
15741
|
constructor(version, signature, permissionsOrOptions, services, resourceTypes, protocol, startsOn, expiresOn, ipRange, identifier, resource, cacheControl, contentDisposition, contentEncoding, contentLanguage, contentType, userDelegationKey, preauthorizedAgentObjectId, correlationId, encryptionScope) {
|
15739
15742
|
this.version = version;
|
15740
15743
|
this.signature = signature;
|
@@ -15794,20 +15797,6 @@ class SASQueryParameters {
|
|
15794
15797
|
}
|
15795
15798
|
}
|
15796
15799
|
}
|
15797
|
-
/**
|
15798
|
-
* Optional. IP range allowed for this SAS.
|
15799
|
-
*
|
15800
|
-
* @readonly
|
15801
|
-
*/
|
15802
|
-
get ipRange() {
|
15803
|
-
if (this.ipRangeInner) {
|
15804
|
-
return {
|
15805
|
-
end: this.ipRangeInner.end,
|
15806
|
-
start: this.ipRangeInner.start,
|
15807
|
-
};
|
15808
|
-
}
|
15809
|
-
return undefined;
|
15810
|
-
}
|
15811
15800
|
/**
|
15812
15801
|
* Encodes all SAS query parameters into a string that can be appended to a URL.
|
15813
15802
|
*
|
@@ -16492,6 +16481,22 @@ function SASSignatureValuesSanityCheckAndAutofill(blobSASSignatureValues) {
|
|
16492
16481
|
* A client that manages leases for a {@link ContainerClient} or a {@link BlobClient}.
|
16493
16482
|
*/
|
16494
16483
|
class BlobLeaseClient {
|
16484
|
+
/**
|
16485
|
+
* Gets the lease Id.
|
16486
|
+
*
|
16487
|
+
* @readonly
|
16488
|
+
*/
|
16489
|
+
get leaseId() {
|
16490
|
+
return this._leaseId;
|
16491
|
+
}
|
16492
|
+
/**
|
16493
|
+
* Gets the url.
|
16494
|
+
*
|
16495
|
+
* @readonly
|
16496
|
+
*/
|
16497
|
+
get url() {
|
16498
|
+
return this._url;
|
16499
|
+
}
|
16495
16500
|
/**
|
16496
16501
|
* Creates an instance of BlobLeaseClient.
|
16497
16502
|
* @param client - The client to make the lease operation requests.
|
@@ -16513,22 +16518,6 @@ class BlobLeaseClient {
|
|
16513
16518
|
}
|
16514
16519
|
this._leaseId = leaseId;
|
16515
16520
|
}
|
16516
|
-
/**
|
16517
|
-
* Gets the lease Id.
|
16518
|
-
*
|
16519
|
-
* @readonly
|
16520
|
-
*/
|
16521
|
-
get leaseId() {
|
16522
|
-
return this._leaseId;
|
16523
|
-
}
|
16524
|
-
/**
|
16525
|
-
* Gets the url.
|
16526
|
-
*
|
16527
|
-
* @readonly
|
16528
|
-
*/
|
16529
|
-
get url() {
|
16530
|
-
return this._url;
|
16531
|
-
}
|
16532
16521
|
/**
|
16533
16522
|
* Establishes and manages a lock on a container for delete operations, or on a blob
|
16534
16523
|
* for write and delete operations.
|
@@ -16802,19 +16791,6 @@ class RetriableReadableStream extends stream.Readable {
|
|
16802
16791
|
* Readable stream.
|
16803
16792
|
*/
|
16804
16793
|
class BlobDownloadResponse {
|
16805
|
-
/**
|
16806
|
-
* Creates an instance of BlobDownloadResponse.
|
16807
|
-
*
|
16808
|
-
* @param originalResponse -
|
16809
|
-
* @param getter -
|
16810
|
-
* @param offset -
|
16811
|
-
* @param count -
|
16812
|
-
* @param options -
|
16813
|
-
*/
|
16814
|
-
constructor(originalResponse, getter, offset, count, options = {}) {
|
16815
|
-
this.originalResponse = originalResponse;
|
16816
|
-
this.blobDownloadStream = new RetriableReadableStream(this.originalResponse.readableStreamBody, getter, offset, count, options);
|
16817
|
-
}
|
16818
16794
|
/**
|
16819
16795
|
* Indicates that the service supports
|
16820
16796
|
* requests for partial file content.
|
@@ -17240,6 +17216,19 @@ class BlobDownloadResponse {
|
|
17240
17216
|
get _response() {
|
17241
17217
|
return this.originalResponse._response;
|
17242
17218
|
}
|
17219
|
+
/**
|
17220
|
+
* Creates an instance of BlobDownloadResponse.
|
17221
|
+
*
|
17222
|
+
* @param originalResponse -
|
17223
|
+
* @param getter -
|
17224
|
+
* @param offset -
|
17225
|
+
* @param count -
|
17226
|
+
* @param options -
|
17227
|
+
*/
|
17228
|
+
constructor(originalResponse, getter, offset, count, options = {}) {
|
17229
|
+
this.originalResponse = originalResponse;
|
17230
|
+
this.blobDownloadStream = new RetriableReadableStream(this.originalResponse.readableStreamBody, getter, offset, count, options);
|
17231
|
+
}
|
17243
17232
|
}
|
17244
17233
|
|
17245
17234
|
// Copyright (c) Microsoft Corporation.
|
@@ -17580,6 +17569,12 @@ function arraysEqual(a, b) {
|
|
17580
17569
|
|
17581
17570
|
// Copyright (c) Microsoft Corporation.
|
17582
17571
|
class AvroReader {
|
17572
|
+
get blockOffset() {
|
17573
|
+
return this._blockOffset;
|
17574
|
+
}
|
17575
|
+
get objectIndex() {
|
17576
|
+
return this._objectIndex;
|
17577
|
+
}
|
17583
17578
|
constructor(dataStream, headerStream, currentBlockOffset, indexWithinCurrentBlock) {
|
17584
17579
|
this._dataStream = dataStream;
|
17585
17580
|
this._headerStream = headerStream || dataStream;
|
@@ -17588,12 +17583,6 @@ class AvroReader {
|
|
17588
17583
|
this._objectIndex = indexWithinCurrentBlock || 0;
|
17589
17584
|
this._initialBlockOffset = currentBlockOffset || 0;
|
17590
17585
|
}
|
17591
|
-
get blockOffset() {
|
17592
|
-
return this._blockOffset;
|
17593
|
-
}
|
17594
|
-
get objectIndex() {
|
17595
|
-
return this._objectIndex;
|
17596
|
-
}
|
17597
17586
|
async initialize(options = {}) {
|
17598
17587
|
const header = await AvroParser.readFixedBytes(this._headerStream, AVRO_INIT_BYTES.length, {
|
17599
17588
|
abortSignal: options.abortSignal,
|
@@ -17685,17 +17674,17 @@ class AvroReadable {
|
|
17685
17674
|
// Copyright (c) Microsoft Corporation.
|
17686
17675
|
const ABORT_ERROR = new abortController.AbortError("Reading from the avro stream was aborted.");
|
17687
17676
|
class AvroReadableFromStream extends AvroReadable {
|
17688
|
-
constructor(readable) {
|
17689
|
-
super();
|
17690
|
-
this._readable = readable;
|
17691
|
-
this._position = 0;
|
17692
|
-
}
|
17693
17677
|
toUint8Array(data) {
|
17694
17678
|
if (typeof data === "string") {
|
17695
17679
|
return Buffer.from(data);
|
17696
17680
|
}
|
17697
17681
|
return data;
|
17698
17682
|
}
|
17683
|
+
constructor(readable) {
|
17684
|
+
super();
|
17685
|
+
this._readable = readable;
|
17686
|
+
this._position = 0;
|
17687
|
+
}
|
17699
17688
|
get position() {
|
17700
17689
|
return this._position;
|
17701
17690
|
}
|
@@ -17879,16 +17868,6 @@ class BlobQuickQueryStream extends stream.Readable {
|
|
17879
17868
|
* parse avor data returned by blob query.
|
17880
17869
|
*/
|
17881
17870
|
class BlobQueryResponse {
|
17882
|
-
/**
|
17883
|
-
* Creates an instance of BlobQueryResponse.
|
17884
|
-
*
|
17885
|
-
* @param originalResponse -
|
17886
|
-
* @param options -
|
17887
|
-
*/
|
17888
|
-
constructor(originalResponse, options = {}) {
|
17889
|
-
this.originalResponse = originalResponse;
|
17890
|
-
this.blobDownloadStream = new BlobQuickQueryStream(this.originalResponse.readableStreamBody, options);
|
17891
|
-
}
|
17892
17871
|
/**
|
17893
17872
|
* Indicates that the service supports
|
17894
17873
|
* requests for partial file content.
|
@@ -18233,6 +18212,16 @@ class BlobQueryResponse {
|
|
18233
18212
|
get _response() {
|
18234
18213
|
return this.originalResponse._response;
|
18235
18214
|
}
|
18215
|
+
/**
|
18216
|
+
* Creates an instance of BlobQueryResponse.
|
18217
|
+
*
|
18218
|
+
* @param originalResponse -
|
18219
|
+
* @param options -
|
18220
|
+
*/
|
18221
|
+
constructor(originalResponse, options = {}) {
|
18222
|
+
this.originalResponse = originalResponse;
|
18223
|
+
this.blobDownloadStream = new BlobQuickQueryStream(this.originalResponse.readableStreamBody, options);
|
18224
|
+
}
|
18236
18225
|
}
|
18237
18226
|
|
18238
18227
|
// Copyright (c) Microsoft Corporation.
|
@@ -18727,6 +18716,12 @@ const maxBufferLength = require("buffer").constants.MAX_LENGTH;
|
|
18727
18716
|
* assembled from all the data in the internal "buffer".
|
18728
18717
|
*/
|
18729
18718
|
class PooledBuffer {
|
18719
|
+
/**
|
18720
|
+
* The size of the data contained in the pooled buffers.
|
18721
|
+
*/
|
18722
|
+
get size() {
|
18723
|
+
return this._size;
|
18724
|
+
}
|
18730
18725
|
constructor(capacity, buffers, totalLength) {
|
18731
18726
|
/**
|
18732
18727
|
* Internal buffers used to keep the data.
|
@@ -18748,12 +18743,6 @@ class PooledBuffer {
|
|
18748
18743
|
this.fill(buffers, totalLength);
|
18749
18744
|
}
|
18750
18745
|
}
|
18751
|
-
/**
|
18752
|
-
* The size of the data contained in the pooled buffers.
|
18753
|
-
*/
|
18754
|
-
get size() {
|
18755
|
-
return this._size;
|
18756
|
-
}
|
18757
18746
|
/**
|
18758
18747
|
* Fill the internal buffers with data in the input buffers serially
|
18759
18748
|
* with respect to the total length and the total capacity of the internal buffers.
|
@@ -19160,6 +19149,18 @@ const fsCreateReadStream = fs__namespace.createReadStream;
|
|
19160
19149
|
* append blob, or page blob.
|
19161
19150
|
*/
|
19162
19151
|
class BlobClient extends StorageClient {
|
19152
|
+
/**
|
19153
|
+
* The name of the blob.
|
19154
|
+
*/
|
19155
|
+
get name() {
|
19156
|
+
return this._name;
|
19157
|
+
}
|
19158
|
+
/**
|
19159
|
+
* The name of the storage container the blob is associated with.
|
19160
|
+
*/
|
19161
|
+
get containerName() {
|
19162
|
+
return this._containerName;
|
19163
|
+
}
|
19163
19164
|
constructor(urlOrConnectionString, credentialOrPipelineOrContainerName, blobNameOrOptions,
|
19164
19165
|
// Legacy, no fix for eslint error without breaking. Disable it for this interface.
|
19165
19166
|
/* eslint-disable-next-line @azure/azure-sdk/ts-naming-options*/
|
@@ -19229,18 +19230,6 @@ class BlobClient extends StorageClient {
|
|
19229
19230
|
this._snapshot = getURLParameter(this.url, URLConstants.Parameters.SNAPSHOT);
|
19230
19231
|
this._versionId = getURLParameter(this.url, URLConstants.Parameters.VERSIONID);
|
19231
19232
|
}
|
19232
|
-
/**
|
19233
|
-
* The name of the blob.
|
19234
|
-
*/
|
19235
|
-
get name() {
|
19236
|
-
return this._name;
|
19237
|
-
}
|
19238
|
-
/**
|
19239
|
-
* The name of the storage container the blob is associated with.
|
19240
|
-
*/
|
19241
|
-
get containerName() {
|
19242
|
-
return this._containerName;
|
19243
|
-
}
|
19244
19233
|
/**
|
19245
19234
|
* Creates a new BlobClient object identical to the source but with the specified snapshot timestamp.
|
19246
19235
|
* Provide "" will remove the snapshot and return a Client to the base blob.
|
@@ -21230,18 +21219,25 @@ class PageBlobClient extends BlobClient {
|
|
21230
21219
|
*/
|
21231
21220
|
listPageRangeItems(offset = 0, count, options = {}) {
|
21232
21221
|
return tslib.__asyncGenerator(this, arguments, function* listPageRangeItems_1() {
|
21233
|
-
var e_1,
|
21222
|
+
var _a, e_1, _b, _c;
|
21234
21223
|
let marker;
|
21235
21224
|
try {
|
21236
|
-
for (var
|
21237
|
-
|
21238
|
-
|
21225
|
+
for (var _d = true, _e = tslib.__asyncValues(this.listPageRangeItemSegments(offset, count, marker, options)), _f; _f = yield tslib.__await(_e.next()), _a = _f.done, !_a;) {
|
21226
|
+
_c = _f.value;
|
21227
|
+
_d = false;
|
21228
|
+
try {
|
21229
|
+
const getPageRangesSegment = _c;
|
21230
|
+
yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(ExtractPageRangeInfoItems(getPageRangesSegment))));
|
21231
|
+
}
|
21232
|
+
finally {
|
21233
|
+
_d = true;
|
21234
|
+
}
|
21239
21235
|
}
|
21240
21236
|
}
|
21241
21237
|
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
21242
21238
|
finally {
|
21243
21239
|
try {
|
21244
|
-
if (
|
21240
|
+
if (!_d && !_a && (_b = _e.return)) yield tslib.__await(_b.call(_e));
|
21245
21241
|
}
|
21246
21242
|
finally { if (e_1) throw e_1.error; }
|
21247
21243
|
}
|
@@ -21438,18 +21434,25 @@ class PageBlobClient extends BlobClient {
|
|
21438
21434
|
*/
|
21439
21435
|
listPageRangeDiffItems(offset, count, prevSnapshotOrUrl, options) {
|
21440
21436
|
return tslib.__asyncGenerator(this, arguments, function* listPageRangeDiffItems_1() {
|
21441
|
-
var e_2,
|
21437
|
+
var _a, e_2, _b, _c;
|
21442
21438
|
let marker;
|
21443
21439
|
try {
|
21444
|
-
for (var
|
21445
|
-
|
21446
|
-
|
21440
|
+
for (var _d = true, _e = tslib.__asyncValues(this.listPageRangeDiffItemSegments(offset, count, prevSnapshotOrUrl, marker, options)), _f; _f = yield tslib.__await(_e.next()), _a = _f.done, !_a;) {
|
21441
|
+
_c = _f.value;
|
21442
|
+
_d = false;
|
21443
|
+
try {
|
21444
|
+
const getPageRangesSegment = _c;
|
21445
|
+
yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(ExtractPageRangeInfoItems(getPageRangesSegment))));
|
21446
|
+
}
|
21447
|
+
finally {
|
21448
|
+
_d = true;
|
21449
|
+
}
|
21447
21450
|
}
|
21448
21451
|
}
|
21449
21452
|
catch (e_2_1) { e_2 = { error: e_2_1 }; }
|
21450
21453
|
finally {
|
21451
21454
|
try {
|
21452
|
-
if (
|
21455
|
+
if (!_d && !_a && (_b = _e.return)) yield tslib.__await(_b.call(_e));
|
21453
21456
|
}
|
21454
21457
|
finally { if (e_2) throw e_2.error; }
|
21455
21458
|
}
|
@@ -22010,7 +22013,6 @@ class InnerBatchRequest {
|
|
22010
22013
|
},
|
22011
22014
|
},
|
22012
22015
|
}), { phase: "Serialize" });
|
22013
|
-
corePipeline.addPolicy(pathParameterWorkaroundPolicy());
|
22014
22016
|
// Use batch header filter policy to exclude unnecessary headers
|
22015
22017
|
corePipeline.addPolicy(batchHeaderFilterPolicy());
|
22016
22018
|
// Use batch assemble policy to assemble request and intercept request from going to wire
|
@@ -22127,7 +22129,7 @@ class BlobBatchClient {
|
|
22127
22129
|
else {
|
22128
22130
|
pipeline = newPipeline(credentialOrPipeline, options);
|
22129
22131
|
}
|
22130
|
-
const storageClientContext = new
|
22132
|
+
const storageClientContext = new StorageContextClient(url, getCoreClientOptions(pipeline));
|
22131
22133
|
const path = getURLPath(url);
|
22132
22134
|
if (path && path !== "/") {
|
22133
22135
|
// Container scoped.
|
@@ -22240,6 +22242,12 @@ class BlobBatchClient {
|
|
22240
22242
|
* A ContainerClient represents a URL to the Azure Storage container allowing you to manipulate its blobs.
|
22241
22243
|
*/
|
22242
22244
|
class ContainerClient extends StorageClient {
|
22245
|
+
/**
|
22246
|
+
* The name of the container.
|
22247
|
+
*/
|
22248
|
+
get containerName() {
|
22249
|
+
return this._containerName;
|
22250
|
+
}
|
22243
22251
|
constructor(urlOrConnectionString, credentialOrPipelineOrContainerName,
|
22244
22252
|
// Legacy, no fix for eslint error without breaking. Disable it for this interface.
|
22245
22253
|
/* eslint-disable-next-line @azure/azure-sdk/ts-naming-options*/
|
@@ -22302,12 +22310,6 @@ class ContainerClient extends StorageClient {
|
|
22302
22310
|
this._containerName = this.getContainerNameFromUrl();
|
22303
22311
|
this.containerContext = this.storageClientContext.container;
|
22304
22312
|
}
|
22305
|
-
/**
|
22306
|
-
* The name of the container.
|
22307
|
-
*/
|
22308
|
-
get containerName() {
|
22309
|
-
return this._containerName;
|
22310
|
-
}
|
22311
22313
|
/**
|
22312
22314
|
* Creates a new container under the specified account. If the container with
|
22313
22315
|
* the same name already exists, the operation fails.
|
@@ -22753,18 +22755,25 @@ class ContainerClient extends StorageClient {
|
|
22753
22755
|
*/
|
22754
22756
|
listItems(options = {}) {
|
22755
22757
|
return tslib.__asyncGenerator(this, arguments, function* listItems_1() {
|
22756
|
-
var e_1,
|
22758
|
+
var _a, e_1, _b, _c;
|
22757
22759
|
let marker;
|
22758
22760
|
try {
|
22759
|
-
for (var
|
22760
|
-
|
22761
|
-
|
22761
|
+
for (var _d = true, _e = tslib.__asyncValues(this.listSegments(marker, options)), _f; _f = yield tslib.__await(_e.next()), _a = _f.done, !_a;) {
|
22762
|
+
_c = _f.value;
|
22763
|
+
_d = false;
|
22764
|
+
try {
|
22765
|
+
const listBlobsFlatSegmentResponse = _c;
|
22766
|
+
yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(listBlobsFlatSegmentResponse.segment.blobItems)));
|
22767
|
+
}
|
22768
|
+
finally {
|
22769
|
+
_d = true;
|
22770
|
+
}
|
22762
22771
|
}
|
22763
22772
|
}
|
22764
22773
|
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
22765
22774
|
finally {
|
22766
22775
|
try {
|
22767
|
-
if (
|
22776
|
+
if (!_d && !_a && (_b = _e.return)) yield tslib.__await(_b.call(_e));
|
22768
22777
|
}
|
22769
22778
|
finally { if (e_1) throw e_1.error; }
|
22770
22779
|
}
|
@@ -22932,26 +22941,33 @@ class ContainerClient extends StorageClient {
|
|
22932
22941
|
*/
|
22933
22942
|
listItemsByHierarchy(delimiter, options = {}) {
|
22934
22943
|
return tslib.__asyncGenerator(this, arguments, function* listItemsByHierarchy_1() {
|
22935
|
-
var e_2,
|
22944
|
+
var _a, e_2, _b, _c;
|
22936
22945
|
let marker;
|
22937
22946
|
try {
|
22938
|
-
for (var
|
22939
|
-
|
22940
|
-
|
22941
|
-
|
22942
|
-
|
22943
|
-
|
22947
|
+
for (var _d = true, _e = tslib.__asyncValues(this.listHierarchySegments(delimiter, marker, options)), _f; _f = yield tslib.__await(_e.next()), _a = _f.done, !_a;) {
|
22948
|
+
_c = _f.value;
|
22949
|
+
_d = false;
|
22950
|
+
try {
|
22951
|
+
const listBlobsHierarchySegmentResponse = _c;
|
22952
|
+
const segment = listBlobsHierarchySegmentResponse.segment;
|
22953
|
+
if (segment.blobPrefixes) {
|
22954
|
+
for (const prefix of segment.blobPrefixes) {
|
22955
|
+
yield yield tslib.__await(Object.assign({ kind: "prefix" }, prefix));
|
22956
|
+
}
|
22957
|
+
}
|
22958
|
+
for (const blob of segment.blobItems) {
|
22959
|
+
yield yield tslib.__await(Object.assign({ kind: "blob" }, blob));
|
22944
22960
|
}
|
22945
22961
|
}
|
22946
|
-
|
22947
|
-
|
22962
|
+
finally {
|
22963
|
+
_d = true;
|
22948
22964
|
}
|
22949
22965
|
}
|
22950
22966
|
}
|
22951
22967
|
catch (e_2_1) { e_2 = { error: e_2_1 }; }
|
22952
22968
|
finally {
|
22953
22969
|
try {
|
22954
|
-
if (
|
22970
|
+
if (!_d && !_a && (_b = _e.return)) yield tslib.__await(_b.call(_e));
|
22955
22971
|
}
|
22956
22972
|
finally { if (e_2) throw e_2.error; }
|
22957
22973
|
}
|
@@ -23174,18 +23190,25 @@ class ContainerClient extends StorageClient {
|
|
23174
23190
|
*/
|
23175
23191
|
findBlobsByTagsItems(tagFilterSqlExpression, options = {}) {
|
23176
23192
|
return tslib.__asyncGenerator(this, arguments, function* findBlobsByTagsItems_1() {
|
23177
|
-
var e_3,
|
23193
|
+
var _a, e_3, _b, _c;
|
23178
23194
|
let marker;
|
23179
23195
|
try {
|
23180
|
-
for (var
|
23181
|
-
|
23182
|
-
|
23196
|
+
for (var _d = true, _e = tslib.__asyncValues(this.findBlobsByTagsSegments(tagFilterSqlExpression, marker, options)), _f; _f = yield tslib.__await(_e.next()), _a = _f.done, !_a;) {
|
23197
|
+
_c = _f.value;
|
23198
|
+
_d = false;
|
23199
|
+
try {
|
23200
|
+
const segment = _c;
|
23201
|
+
yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(segment.blobs)));
|
23202
|
+
}
|
23203
|
+
finally {
|
23204
|
+
_d = true;
|
23205
|
+
}
|
23183
23206
|
}
|
23184
23207
|
}
|
23185
23208
|
catch (e_3_1) { e_3 = { error: e_3_1 }; }
|
23186
23209
|
finally {
|
23187
23210
|
try {
|
23188
|
-
if (
|
23211
|
+
if (!_d && !_a && (_b = _e.return)) yield tslib.__await(_b.call(_e));
|
23189
23212
|
}
|
23190
23213
|
finally { if (e_3) throw e_3.error; }
|
23191
23214
|
}
|
@@ -23831,26 +23854,6 @@ function generateAccountSASQueryParameters(accountSASSignatureValues, sharedKeyC
|
|
23831
23854
|
* to manipulate blob containers.
|
23832
23855
|
*/
|
23833
23856
|
class BlobServiceClient extends StorageClient {
|
23834
|
-
constructor(url, credentialOrPipeline,
|
23835
|
-
// Legacy, no fix for eslint error without breaking. Disable it for this interface.
|
23836
|
-
/* eslint-disable-next-line @azure/azure-sdk/ts-naming-options*/
|
23837
|
-
options) {
|
23838
|
-
let pipeline;
|
23839
|
-
if (isPipelineLike(credentialOrPipeline)) {
|
23840
|
-
pipeline = credentialOrPipeline;
|
23841
|
-
}
|
23842
|
-
else if ((coreUtil.isNode && credentialOrPipeline instanceof StorageSharedKeyCredential) ||
|
23843
|
-
credentialOrPipeline instanceof AnonymousCredential ||
|
23844
|
-
coreAuth.isTokenCredential(credentialOrPipeline)) {
|
23845
|
-
pipeline = newPipeline(credentialOrPipeline, options);
|
23846
|
-
}
|
23847
|
-
else {
|
23848
|
-
// The second parameter is undefined. Use anonymous credential
|
23849
|
-
pipeline = newPipeline(new AnonymousCredential(), options);
|
23850
|
-
}
|
23851
|
-
super(url, pipeline);
|
23852
|
-
this.serviceContext = this.storageClientContext.service;
|
23853
|
-
}
|
23854
23857
|
/**
|
23855
23858
|
*
|
23856
23859
|
* Creates an instance of BlobServiceClient from connection string.
|
@@ -23890,6 +23893,26 @@ class BlobServiceClient extends StorageClient {
|
|
23890
23893
|
throw new Error("Connection string must be either an Account connection string or a SAS connection string");
|
23891
23894
|
}
|
23892
23895
|
}
|
23896
|
+
constructor(url, credentialOrPipeline,
|
23897
|
+
// Legacy, no fix for eslint error without breaking. Disable it for this interface.
|
23898
|
+
/* eslint-disable-next-line @azure/azure-sdk/ts-naming-options*/
|
23899
|
+
options) {
|
23900
|
+
let pipeline;
|
23901
|
+
if (isPipelineLike(credentialOrPipeline)) {
|
23902
|
+
pipeline = credentialOrPipeline;
|
23903
|
+
}
|
23904
|
+
else if ((coreUtil.isNode && credentialOrPipeline instanceof StorageSharedKeyCredential) ||
|
23905
|
+
credentialOrPipeline instanceof AnonymousCredential ||
|
23906
|
+
coreAuth.isTokenCredential(credentialOrPipeline)) {
|
23907
|
+
pipeline = newPipeline(credentialOrPipeline, options);
|
23908
|
+
}
|
23909
|
+
else {
|
23910
|
+
// The second parameter is undefined. Use anonymous credential
|
23911
|
+
pipeline = newPipeline(new AnonymousCredential(), options);
|
23912
|
+
}
|
23913
|
+
super(url, pipeline);
|
23914
|
+
this.serviceContext = this.storageClientContext.service;
|
23915
|
+
}
|
23893
23916
|
/**
|
23894
23917
|
* Creates a {@link ContainerClient} object
|
23895
23918
|
*
|
@@ -24141,18 +24164,25 @@ class BlobServiceClient extends StorageClient {
|
|
24141
24164
|
*/
|
24142
24165
|
findBlobsByTagsItems(tagFilterSqlExpression, options = {}) {
|
24143
24166
|
return tslib.__asyncGenerator(this, arguments, function* findBlobsByTagsItems_1() {
|
24144
|
-
var e_1,
|
24167
|
+
var _a, e_1, _b, _c;
|
24145
24168
|
let marker;
|
24146
24169
|
try {
|
24147
|
-
for (var
|
24148
|
-
|
24149
|
-
|
24170
|
+
for (var _d = true, _e = tslib.__asyncValues(this.findBlobsByTagsSegments(tagFilterSqlExpression, marker, options)), _f; _f = yield tslib.__await(_e.next()), _a = _f.done, !_a;) {
|
24171
|
+
_c = _f.value;
|
24172
|
+
_d = false;
|
24173
|
+
try {
|
24174
|
+
const segment = _c;
|
24175
|
+
yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(segment.blobs)));
|
24176
|
+
}
|
24177
|
+
finally {
|
24178
|
+
_d = true;
|
24179
|
+
}
|
24150
24180
|
}
|
24151
24181
|
}
|
24152
24182
|
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
24153
24183
|
finally {
|
24154
24184
|
try {
|
24155
|
-
if (
|
24185
|
+
if (!_d && !_a && (_b = _e.return)) yield tslib.__await(_b.call(_e));
|
24156
24186
|
}
|
24157
24187
|
finally { if (e_1) throw e_1.error; }
|
24158
24188
|
}
|
@@ -24295,18 +24325,25 @@ class BlobServiceClient extends StorageClient {
|
|
24295
24325
|
*/
|
24296
24326
|
listItems(options = {}) {
|
24297
24327
|
return tslib.__asyncGenerator(this, arguments, function* listItems_1() {
|
24298
|
-
var e_2,
|
24328
|
+
var _a, e_2, _b, _c;
|
24299
24329
|
let marker;
|
24300
24330
|
try {
|
24301
|
-
for (var
|
24302
|
-
|
24303
|
-
|
24331
|
+
for (var _d = true, _e = tslib.__asyncValues(this.listSegments(marker, options)), _f; _f = yield tslib.__await(_e.next()), _a = _f.done, !_a;) {
|
24332
|
+
_c = _f.value;
|
24333
|
+
_d = false;
|
24334
|
+
try {
|
24335
|
+
const segment = _c;
|
24336
|
+
yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(segment.containerItems)));
|
24337
|
+
}
|
24338
|
+
finally {
|
24339
|
+
_d = true;
|
24340
|
+
}
|
24304
24341
|
}
|
24305
24342
|
}
|
24306
24343
|
catch (e_2_1) { e_2 = { error: e_2_1 }; }
|
24307
24344
|
finally {
|
24308
24345
|
try {
|
24309
|
-
if (
|
24346
|
+
if (!_d && !_a && (_b = _e.return)) yield tslib.__await(_b.call(_e));
|
24310
24347
|
}
|
24311
24348
|
finally { if (e_2) throw e_2.error; }
|
24312
24349
|
}
|