@azure/storage-blob 12.20.0-alpha.20230410.3 → 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.
Files changed (27) hide show
  1. package/dist/index.js +197 -148
  2. package/dist/index.js.map +1 -1
  3. package/dist-esm/storage-blob/src/BlobDownloadResponse.js +13 -13
  4. package/dist-esm/storage-blob/src/BlobDownloadResponse.js.map +1 -1
  5. package/dist-esm/storage-blob/src/BlobLeaseClient.js +16 -16
  6. package/dist-esm/storage-blob/src/BlobLeaseClient.js.map +1 -1
  7. package/dist-esm/storage-blob/src/BlobQueryResponse.browser.js +9 -9
  8. package/dist-esm/storage-blob/src/BlobQueryResponse.browser.js.map +1 -1
  9. package/dist-esm/storage-blob/src/BlobQueryResponse.js +10 -10
  10. package/dist-esm/storage-blob/src/BlobQueryResponse.js.map +1 -1
  11. package/dist-esm/storage-blob/src/BlobServiceClient.js +44 -30
  12. package/dist-esm/storage-blob/src/BlobServiceClient.js.map +1 -1
  13. package/dist-esm/storage-blob/src/Clients.js +36 -22
  14. package/dist-esm/storage-blob/src/Clients.js.map +1 -1
  15. package/dist-esm/storage-blob/src/ContainerClient.js +47 -26
  16. package/dist-esm/storage-blob/src/ContainerClient.js.map +1 -1
  17. package/dist-esm/storage-blob/src/sas/SASQueryParameters.js +14 -14
  18. package/dist-esm/storage-blob/src/sas/SASQueryParameters.js.map +1 -1
  19. package/dist-esm/storage-blob/src/utils/Mutex.js +2 -1
  20. package/dist-esm/storage-blob/src/utils/Mutex.js.map +1 -1
  21. package/dist-esm/storage-common/src/PooledBuffer.js +6 -6
  22. package/dist-esm/storage-common/src/PooledBuffer.js.map +1 -1
  23. package/dist-esm/storage-internal-avro/src/AvroReadableFromStream.js +5 -5
  24. package/dist-esm/storage-internal-avro/src/AvroReadableFromStream.js.map +1 -1
  25. package/dist-esm/storage-internal-avro/src/AvroReader.js +6 -6
  26. package/dist-esm/storage-internal-avro/src/AvroReader.js.map +1 -1
  27. package/package.json +2 -2
package/dist/index.js CHANGED
@@ -15724,6 +15724,20 @@ exports.SASProtocol = void 0;
15724
15724
  * NOTE: Instances of this class are immutable.
15725
15725
  */
15726
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
+ }
15727
15741
  constructor(version, signature, permissionsOrOptions, services, resourceTypes, protocol, startsOn, expiresOn, ipRange, identifier, resource, cacheControl, contentDisposition, contentEncoding, contentLanguage, contentType, userDelegationKey, preauthorizedAgentObjectId, correlationId, encryptionScope) {
15728
15742
  this.version = version;
15729
15743
  this.signature = signature;
@@ -15783,20 +15797,6 @@ class SASQueryParameters {
15783
15797
  }
15784
15798
  }
15785
15799
  }
15786
- /**
15787
- * Optional. IP range allowed for this SAS.
15788
- *
15789
- * @readonly
15790
- */
15791
- get ipRange() {
15792
- if (this.ipRangeInner) {
15793
- return {
15794
- end: this.ipRangeInner.end,
15795
- start: this.ipRangeInner.start,
15796
- };
15797
- }
15798
- return undefined;
15799
- }
15800
15800
  /**
15801
15801
  * Encodes all SAS query parameters into a string that can be appended to a URL.
15802
15802
  *
@@ -16481,6 +16481,22 @@ function SASSignatureValuesSanityCheckAndAutofill(blobSASSignatureValues) {
16481
16481
  * A client that manages leases for a {@link ContainerClient} or a {@link BlobClient}.
16482
16482
  */
16483
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
+ }
16484
16500
  /**
16485
16501
  * Creates an instance of BlobLeaseClient.
16486
16502
  * @param client - The client to make the lease operation requests.
@@ -16502,22 +16518,6 @@ class BlobLeaseClient {
16502
16518
  }
16503
16519
  this._leaseId = leaseId;
16504
16520
  }
16505
- /**
16506
- * Gets the lease Id.
16507
- *
16508
- * @readonly
16509
- */
16510
- get leaseId() {
16511
- return this._leaseId;
16512
- }
16513
- /**
16514
- * Gets the url.
16515
- *
16516
- * @readonly
16517
- */
16518
- get url() {
16519
- return this._url;
16520
- }
16521
16521
  /**
16522
16522
  * Establishes and manages a lock on a container for delete operations, or on a blob
16523
16523
  * for write and delete operations.
@@ -16791,19 +16791,6 @@ class RetriableReadableStream extends stream.Readable {
16791
16791
  * Readable stream.
16792
16792
  */
16793
16793
  class BlobDownloadResponse {
16794
- /**
16795
- * Creates an instance of BlobDownloadResponse.
16796
- *
16797
- * @param originalResponse -
16798
- * @param getter -
16799
- * @param offset -
16800
- * @param count -
16801
- * @param options -
16802
- */
16803
- constructor(originalResponse, getter, offset, count, options = {}) {
16804
- this.originalResponse = originalResponse;
16805
- this.blobDownloadStream = new RetriableReadableStream(this.originalResponse.readableStreamBody, getter, offset, count, options);
16806
- }
16807
16794
  /**
16808
16795
  * Indicates that the service supports
16809
16796
  * requests for partial file content.
@@ -17229,6 +17216,19 @@ class BlobDownloadResponse {
17229
17216
  get _response() {
17230
17217
  return this.originalResponse._response;
17231
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
+ }
17232
17232
  }
17233
17233
 
17234
17234
  // Copyright (c) Microsoft Corporation.
@@ -17569,6 +17569,12 @@ function arraysEqual(a, b) {
17569
17569
 
17570
17570
  // Copyright (c) Microsoft Corporation.
17571
17571
  class AvroReader {
17572
+ get blockOffset() {
17573
+ return this._blockOffset;
17574
+ }
17575
+ get objectIndex() {
17576
+ return this._objectIndex;
17577
+ }
17572
17578
  constructor(dataStream, headerStream, currentBlockOffset, indexWithinCurrentBlock) {
17573
17579
  this._dataStream = dataStream;
17574
17580
  this._headerStream = headerStream || dataStream;
@@ -17577,12 +17583,6 @@ class AvroReader {
17577
17583
  this._objectIndex = indexWithinCurrentBlock || 0;
17578
17584
  this._initialBlockOffset = currentBlockOffset || 0;
17579
17585
  }
17580
- get blockOffset() {
17581
- return this._blockOffset;
17582
- }
17583
- get objectIndex() {
17584
- return this._objectIndex;
17585
- }
17586
17586
  async initialize(options = {}) {
17587
17587
  const header = await AvroParser.readFixedBytes(this._headerStream, AVRO_INIT_BYTES.length, {
17588
17588
  abortSignal: options.abortSignal,
@@ -17674,17 +17674,17 @@ class AvroReadable {
17674
17674
  // Copyright (c) Microsoft Corporation.
17675
17675
  const ABORT_ERROR = new abortController.AbortError("Reading from the avro stream was aborted.");
17676
17676
  class AvroReadableFromStream extends AvroReadable {
17677
- constructor(readable) {
17678
- super();
17679
- this._readable = readable;
17680
- this._position = 0;
17681
- }
17682
17677
  toUint8Array(data) {
17683
17678
  if (typeof data === "string") {
17684
17679
  return Buffer.from(data);
17685
17680
  }
17686
17681
  return data;
17687
17682
  }
17683
+ constructor(readable) {
17684
+ super();
17685
+ this._readable = readable;
17686
+ this._position = 0;
17687
+ }
17688
17688
  get position() {
17689
17689
  return this._position;
17690
17690
  }
@@ -17868,16 +17868,6 @@ class BlobQuickQueryStream extends stream.Readable {
17868
17868
  * parse avor data returned by blob query.
17869
17869
  */
17870
17870
  class BlobQueryResponse {
17871
- /**
17872
- * Creates an instance of BlobQueryResponse.
17873
- *
17874
- * @param originalResponse -
17875
- * @param options -
17876
- */
17877
- constructor(originalResponse, options = {}) {
17878
- this.originalResponse = originalResponse;
17879
- this.blobDownloadStream = new BlobQuickQueryStream(this.originalResponse.readableStreamBody, options);
17880
- }
17881
17871
  /**
17882
17872
  * Indicates that the service supports
17883
17873
  * requests for partial file content.
@@ -18222,6 +18212,16 @@ class BlobQueryResponse {
18222
18212
  get _response() {
18223
18213
  return this.originalResponse._response;
18224
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
+ }
18225
18225
  }
18226
18226
 
18227
18227
  // Copyright (c) Microsoft Corporation.
@@ -18716,6 +18716,12 @@ const maxBufferLength = require("buffer").constants.MAX_LENGTH;
18716
18716
  * assembled from all the data in the internal "buffer".
18717
18717
  */
18718
18718
  class PooledBuffer {
18719
+ /**
18720
+ * The size of the data contained in the pooled buffers.
18721
+ */
18722
+ get size() {
18723
+ return this._size;
18724
+ }
18719
18725
  constructor(capacity, buffers, totalLength) {
18720
18726
  /**
18721
18727
  * Internal buffers used to keep the data.
@@ -18737,12 +18743,6 @@ class PooledBuffer {
18737
18743
  this.fill(buffers, totalLength);
18738
18744
  }
18739
18745
  }
18740
- /**
18741
- * The size of the data contained in the pooled buffers.
18742
- */
18743
- get size() {
18744
- return this._size;
18745
- }
18746
18746
  /**
18747
18747
  * Fill the internal buffers with data in the input buffers serially
18748
18748
  * with respect to the total length and the total capacity of the internal buffers.
@@ -19149,6 +19149,18 @@ const fsCreateReadStream = fs__namespace.createReadStream;
19149
19149
  * append blob, or page blob.
19150
19150
  */
19151
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
+ }
19152
19164
  constructor(urlOrConnectionString, credentialOrPipelineOrContainerName, blobNameOrOptions,
19153
19165
  // Legacy, no fix for eslint error without breaking. Disable it for this interface.
19154
19166
  /* eslint-disable-next-line @azure/azure-sdk/ts-naming-options*/
@@ -19218,18 +19230,6 @@ class BlobClient extends StorageClient {
19218
19230
  this._snapshot = getURLParameter(this.url, URLConstants.Parameters.SNAPSHOT);
19219
19231
  this._versionId = getURLParameter(this.url, URLConstants.Parameters.VERSIONID);
19220
19232
  }
19221
- /**
19222
- * The name of the blob.
19223
- */
19224
- get name() {
19225
- return this._name;
19226
- }
19227
- /**
19228
- * The name of the storage container the blob is associated with.
19229
- */
19230
- get containerName() {
19231
- return this._containerName;
19232
- }
19233
19233
  /**
19234
19234
  * Creates a new BlobClient object identical to the source but with the specified snapshot timestamp.
19235
19235
  * Provide "" will remove the snapshot and return a Client to the base blob.
@@ -21219,18 +21219,25 @@ class PageBlobClient extends BlobClient {
21219
21219
  */
21220
21220
  listPageRangeItems(offset = 0, count, options = {}) {
21221
21221
  return tslib.__asyncGenerator(this, arguments, function* listPageRangeItems_1() {
21222
- var e_1, _a;
21222
+ var _a, e_1, _b, _c;
21223
21223
  let marker;
21224
21224
  try {
21225
- for (var _b = tslib.__asyncValues(this.listPageRangeItemSegments(offset, count, marker, options)), _c; _c = yield tslib.__await(_b.next()), !_c.done;) {
21226
- const getPageRangesSegment = _c.value;
21227
- yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(ExtractPageRangeInfoItems(getPageRangesSegment))));
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
+ }
21228
21235
  }
21229
21236
  }
21230
21237
  catch (e_1_1) { e_1 = { error: e_1_1 }; }
21231
21238
  finally {
21232
21239
  try {
21233
- if (_c && !_c.done && (_a = _b.return)) yield tslib.__await(_a.call(_b));
21240
+ if (!_d && !_a && (_b = _e.return)) yield tslib.__await(_b.call(_e));
21234
21241
  }
21235
21242
  finally { if (e_1) throw e_1.error; }
21236
21243
  }
@@ -21427,18 +21434,25 @@ class PageBlobClient extends BlobClient {
21427
21434
  */
21428
21435
  listPageRangeDiffItems(offset, count, prevSnapshotOrUrl, options) {
21429
21436
  return tslib.__asyncGenerator(this, arguments, function* listPageRangeDiffItems_1() {
21430
- var e_2, _a;
21437
+ var _a, e_2, _b, _c;
21431
21438
  let marker;
21432
21439
  try {
21433
- for (var _b = tslib.__asyncValues(this.listPageRangeDiffItemSegments(offset, count, prevSnapshotOrUrl, marker, options)), _c; _c = yield tslib.__await(_b.next()), !_c.done;) {
21434
- const getPageRangesSegment = _c.value;
21435
- yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(ExtractPageRangeInfoItems(getPageRangesSegment))));
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
+ }
21436
21450
  }
21437
21451
  }
21438
21452
  catch (e_2_1) { e_2 = { error: e_2_1 }; }
21439
21453
  finally {
21440
21454
  try {
21441
- if (_c && !_c.done && (_a = _b.return)) yield tslib.__await(_a.call(_b));
21455
+ if (!_d && !_a && (_b = _e.return)) yield tslib.__await(_b.call(_e));
21442
21456
  }
21443
21457
  finally { if (e_2) throw e_2.error; }
21444
21458
  }
@@ -22228,6 +22242,12 @@ class BlobBatchClient {
22228
22242
  * A ContainerClient represents a URL to the Azure Storage container allowing you to manipulate its blobs.
22229
22243
  */
22230
22244
  class ContainerClient extends StorageClient {
22245
+ /**
22246
+ * The name of the container.
22247
+ */
22248
+ get containerName() {
22249
+ return this._containerName;
22250
+ }
22231
22251
  constructor(urlOrConnectionString, credentialOrPipelineOrContainerName,
22232
22252
  // Legacy, no fix for eslint error without breaking. Disable it for this interface.
22233
22253
  /* eslint-disable-next-line @azure/azure-sdk/ts-naming-options*/
@@ -22290,12 +22310,6 @@ class ContainerClient extends StorageClient {
22290
22310
  this._containerName = this.getContainerNameFromUrl();
22291
22311
  this.containerContext = this.storageClientContext.container;
22292
22312
  }
22293
- /**
22294
- * The name of the container.
22295
- */
22296
- get containerName() {
22297
- return this._containerName;
22298
- }
22299
22313
  /**
22300
22314
  * Creates a new container under the specified account. If the container with
22301
22315
  * the same name already exists, the operation fails.
@@ -22741,18 +22755,25 @@ class ContainerClient extends StorageClient {
22741
22755
  */
22742
22756
  listItems(options = {}) {
22743
22757
  return tslib.__asyncGenerator(this, arguments, function* listItems_1() {
22744
- var e_1, _a;
22758
+ var _a, e_1, _b, _c;
22745
22759
  let marker;
22746
22760
  try {
22747
- for (var _b = tslib.__asyncValues(this.listSegments(marker, options)), _c; _c = yield tslib.__await(_b.next()), !_c.done;) {
22748
- const listBlobsFlatSegmentResponse = _c.value;
22749
- yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(listBlobsFlatSegmentResponse.segment.blobItems)));
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
+ }
22750
22771
  }
22751
22772
  }
22752
22773
  catch (e_1_1) { e_1 = { error: e_1_1 }; }
22753
22774
  finally {
22754
22775
  try {
22755
- if (_c && !_c.done && (_a = _b.return)) yield tslib.__await(_a.call(_b));
22776
+ if (!_d && !_a && (_b = _e.return)) yield tslib.__await(_b.call(_e));
22756
22777
  }
22757
22778
  finally { if (e_1) throw e_1.error; }
22758
22779
  }
@@ -22920,26 +22941,33 @@ class ContainerClient extends StorageClient {
22920
22941
  */
22921
22942
  listItemsByHierarchy(delimiter, options = {}) {
22922
22943
  return tslib.__asyncGenerator(this, arguments, function* listItemsByHierarchy_1() {
22923
- var e_2, _a;
22944
+ var _a, e_2, _b, _c;
22924
22945
  let marker;
22925
22946
  try {
22926
- for (var _b = tslib.__asyncValues(this.listHierarchySegments(delimiter, marker, options)), _c; _c = yield tslib.__await(_b.next()), !_c.done;) {
22927
- const listBlobsHierarchySegmentResponse = _c.value;
22928
- const segment = listBlobsHierarchySegmentResponse.segment;
22929
- if (segment.blobPrefixes) {
22930
- for (const prefix of segment.blobPrefixes) {
22931
- yield yield tslib.__await(Object.assign({ kind: "prefix" }, prefix));
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));
22932
22960
  }
22933
22961
  }
22934
- for (const blob of segment.blobItems) {
22935
- yield yield tslib.__await(Object.assign({ kind: "blob" }, blob));
22962
+ finally {
22963
+ _d = true;
22936
22964
  }
22937
22965
  }
22938
22966
  }
22939
22967
  catch (e_2_1) { e_2 = { error: e_2_1 }; }
22940
22968
  finally {
22941
22969
  try {
22942
- if (_c && !_c.done && (_a = _b.return)) yield tslib.__await(_a.call(_b));
22970
+ if (!_d && !_a && (_b = _e.return)) yield tslib.__await(_b.call(_e));
22943
22971
  }
22944
22972
  finally { if (e_2) throw e_2.error; }
22945
22973
  }
@@ -23162,18 +23190,25 @@ class ContainerClient extends StorageClient {
23162
23190
  */
23163
23191
  findBlobsByTagsItems(tagFilterSqlExpression, options = {}) {
23164
23192
  return tslib.__asyncGenerator(this, arguments, function* findBlobsByTagsItems_1() {
23165
- var e_3, _a;
23193
+ var _a, e_3, _b, _c;
23166
23194
  let marker;
23167
23195
  try {
23168
- for (var _b = tslib.__asyncValues(this.findBlobsByTagsSegments(tagFilterSqlExpression, marker, options)), _c; _c = yield tslib.__await(_b.next()), !_c.done;) {
23169
- const segment = _c.value;
23170
- yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(segment.blobs)));
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
+ }
23171
23206
  }
23172
23207
  }
23173
23208
  catch (e_3_1) { e_3 = { error: e_3_1 }; }
23174
23209
  finally {
23175
23210
  try {
23176
- if (_c && !_c.done && (_a = _b.return)) yield tslib.__await(_a.call(_b));
23211
+ if (!_d && !_a && (_b = _e.return)) yield tslib.__await(_b.call(_e));
23177
23212
  }
23178
23213
  finally { if (e_3) throw e_3.error; }
23179
23214
  }
@@ -23819,26 +23854,6 @@ function generateAccountSASQueryParameters(accountSASSignatureValues, sharedKeyC
23819
23854
  * to manipulate blob containers.
23820
23855
  */
23821
23856
  class BlobServiceClient extends StorageClient {
23822
- constructor(url, credentialOrPipeline,
23823
- // Legacy, no fix for eslint error without breaking. Disable it for this interface.
23824
- /* eslint-disable-next-line @azure/azure-sdk/ts-naming-options*/
23825
- options) {
23826
- let pipeline;
23827
- if (isPipelineLike(credentialOrPipeline)) {
23828
- pipeline = credentialOrPipeline;
23829
- }
23830
- else if ((coreUtil.isNode && credentialOrPipeline instanceof StorageSharedKeyCredential) ||
23831
- credentialOrPipeline instanceof AnonymousCredential ||
23832
- coreAuth.isTokenCredential(credentialOrPipeline)) {
23833
- pipeline = newPipeline(credentialOrPipeline, options);
23834
- }
23835
- else {
23836
- // The second parameter is undefined. Use anonymous credential
23837
- pipeline = newPipeline(new AnonymousCredential(), options);
23838
- }
23839
- super(url, pipeline);
23840
- this.serviceContext = this.storageClientContext.service;
23841
- }
23842
23857
  /**
23843
23858
  *
23844
23859
  * Creates an instance of BlobServiceClient from connection string.
@@ -23878,6 +23893,26 @@ class BlobServiceClient extends StorageClient {
23878
23893
  throw new Error("Connection string must be either an Account connection string or a SAS connection string");
23879
23894
  }
23880
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
+ }
23881
23916
  /**
23882
23917
  * Creates a {@link ContainerClient} object
23883
23918
  *
@@ -24129,18 +24164,25 @@ class BlobServiceClient extends StorageClient {
24129
24164
  */
24130
24165
  findBlobsByTagsItems(tagFilterSqlExpression, options = {}) {
24131
24166
  return tslib.__asyncGenerator(this, arguments, function* findBlobsByTagsItems_1() {
24132
- var e_1, _a;
24167
+ var _a, e_1, _b, _c;
24133
24168
  let marker;
24134
24169
  try {
24135
- for (var _b = tslib.__asyncValues(this.findBlobsByTagsSegments(tagFilterSqlExpression, marker, options)), _c; _c = yield tslib.__await(_b.next()), !_c.done;) {
24136
- const segment = _c.value;
24137
- yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(segment.blobs)));
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
+ }
24138
24180
  }
24139
24181
  }
24140
24182
  catch (e_1_1) { e_1 = { error: e_1_1 }; }
24141
24183
  finally {
24142
24184
  try {
24143
- if (_c && !_c.done && (_a = _b.return)) yield tslib.__await(_a.call(_b));
24185
+ if (!_d && !_a && (_b = _e.return)) yield tslib.__await(_b.call(_e));
24144
24186
  }
24145
24187
  finally { if (e_1) throw e_1.error; }
24146
24188
  }
@@ -24283,18 +24325,25 @@ class BlobServiceClient extends StorageClient {
24283
24325
  */
24284
24326
  listItems(options = {}) {
24285
24327
  return tslib.__asyncGenerator(this, arguments, function* listItems_1() {
24286
- var e_2, _a;
24328
+ var _a, e_2, _b, _c;
24287
24329
  let marker;
24288
24330
  try {
24289
- for (var _b = tslib.__asyncValues(this.listSegments(marker, options)), _c; _c = yield tslib.__await(_b.next()), !_c.done;) {
24290
- const segment = _c.value;
24291
- yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(segment.containerItems)));
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
+ }
24292
24341
  }
24293
24342
  }
24294
24343
  catch (e_2_1) { e_2 = { error: e_2_1 }; }
24295
24344
  finally {
24296
24345
  try {
24297
- if (_c && !_c.done && (_a = _b.return)) yield tslib.__await(_a.call(_b));
24346
+ if (!_d && !_a && (_b = _e.return)) yield tslib.__await(_b.call(_e));
24298
24347
  }
24299
24348
  finally { if (e_2) throw e_2.error; }
24300
24349
  }