@azure/storage-file-share 12.23.0-alpha.20240108.2 → 12.23.0-alpha.20240112.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 (71) hide show
  1. package/dist/index.js +471 -270
  2. package/dist/index.js.map +1 -1
  3. package/dist-esm/storage-blob/src/BatchResponseParser.js.map +1 -1
  4. package/dist-esm/storage-blob/src/BatchUtils.browser.js.map +1 -1
  5. package/dist-esm/storage-blob/src/BatchUtils.js.map +1 -1
  6. package/dist-esm/storage-blob/src/BlobBatch.js.map +1 -1
  7. package/dist-esm/storage-blob/src/BlobBatchClient.js +3 -1
  8. package/dist-esm/storage-blob/src/BlobBatchClient.js.map +1 -1
  9. package/dist-esm/storage-blob/src/BlobDownloadResponse.js.map +1 -1
  10. package/dist-esm/storage-blob/src/BlobLeaseClient.js +35 -30
  11. package/dist-esm/storage-blob/src/BlobLeaseClient.js.map +1 -1
  12. package/dist-esm/storage-blob/src/BlobQueryResponse.browser.js.map +1 -1
  13. package/dist-esm/storage-blob/src/BlobQueryResponse.js.map +1 -1
  14. package/dist-esm/storage-blob/src/BlobServiceClient.js +80 -81
  15. package/dist-esm/storage-blob/src/BlobServiceClient.js.map +1 -1
  16. package/dist-esm/storage-blob/src/Clients.js +302 -193
  17. package/dist-esm/storage-blob/src/Clients.js.map +1 -1
  18. package/dist-esm/storage-blob/src/ContainerClient.js +165 -132
  19. package/dist-esm/storage-blob/src/ContainerClient.js.map +1 -1
  20. package/dist-esm/storage-blob/src/PageBlobRangeResponse.js +10 -3
  21. package/dist-esm/storage-blob/src/PageBlobRangeResponse.js.map +1 -1
  22. package/dist-esm/storage-blob/src/Pipeline.js +19 -10
  23. package/dist-esm/storage-blob/src/Pipeline.js.map +1 -1
  24. package/dist-esm/storage-blob/src/Range.js.map +1 -1
  25. package/dist-esm/storage-blob/src/StorageContextClient.js +1 -1
  26. package/dist-esm/storage-blob/src/StorageContextClient.js.map +1 -1
  27. package/dist-esm/storage-blob/src/credentials/AnonymousCredential.js.map +1 -1
  28. package/dist-esm/storage-blob/src/credentials/Credential.js.map +1 -1
  29. package/dist-esm/storage-blob/src/credentials/StorageSharedKeyCredential.js.map +1 -1
  30. package/dist-esm/storage-blob/src/generated/src/storageClient.js +7 -3
  31. package/dist-esm/storage-blob/src/generated/src/storageClient.js.map +1 -1
  32. package/dist-esm/storage-blob/src/models.js.map +1 -1
  33. package/dist-esm/storage-blob/src/policies/RequestPolicy.js.map +1 -1
  34. package/dist-esm/storage-blob/src/policies/StorageBrowserPolicy.js.map +1 -1
  35. package/dist-esm/storage-blob/src/policies/StorageBrowserPolicyV2.js.map +1 -1
  36. package/dist-esm/storage-blob/src/policies/StorageRetryPolicy.js +1 -1
  37. package/dist-esm/storage-blob/src/policies/StorageRetryPolicy.js.map +1 -1
  38. package/dist-esm/storage-blob/src/policies/StorageRetryPolicyV2.js +10 -12
  39. package/dist-esm/storage-blob/src/policies/StorageRetryPolicyV2.js.map +1 -1
  40. package/dist-esm/storage-blob/src/policies/StorageSharedKeyCredentialPolicy.js.map +1 -1
  41. package/dist-esm/storage-blob/src/policies/StorageSharedKeyCredentialPolicyV2.browser.js.map +1 -1
  42. package/dist-esm/storage-blob/src/policies/StorageSharedKeyCredentialPolicyV2.js.map +1 -1
  43. package/dist-esm/storage-blob/src/pollers/BlobStartCopyFromUrlPoller.js +6 -3
  44. package/dist-esm/storage-blob/src/pollers/BlobStartCopyFromUrlPoller.js.map +1 -1
  45. package/dist-esm/storage-blob/src/sas/AccountSASSignatureValues.js.map +1 -1
  46. package/dist-esm/storage-blob/src/sas/BlobSASSignatureValues.js.map +1 -1
  47. package/dist-esm/storage-blob/src/sas/SASQueryParameters.js.map +1 -1
  48. package/dist-esm/storage-blob/src/utils/RetriableReadableStream.js.map +1 -1
  49. package/dist-esm/storage-blob/src/utils/utils.common.js +24 -11
  50. package/dist-esm/storage-blob/src/utils/utils.common.js.map +1 -1
  51. package/dist-esm/storage-blob/src/utils/utils.node.js.map +1 -1
  52. package/dist-esm/storage-file-share/src/AccountSASSignatureValues.js.map +1 -1
  53. package/dist-esm/storage-file-share/src/Clients.js +366 -194
  54. package/dist-esm/storage-file-share/src/Clients.js.map +1 -1
  55. package/dist-esm/storage-file-share/src/FileDownloadResponse.js.map +1 -1
  56. package/dist-esm/storage-file-share/src/FileSASSignatureValues.js.map +1 -1
  57. package/dist-esm/storage-file-share/src/Range.js.map +1 -1
  58. package/dist-esm/storage-file-share/src/SASQueryParameters.js.map +1 -1
  59. package/dist-esm/storage-file-share/src/ShareServiceClient.js +42 -43
  60. package/dist-esm/storage-file-share/src/ShareServiceClient.js.map +1 -1
  61. package/dist-esm/storage-file-share/src/StorageContextClient.js +1 -1
  62. package/dist-esm/storage-file-share/src/StorageContextClient.js.map +1 -1
  63. package/dist-esm/storage-file-share/src/generated/src/storageClient.js +7 -3
  64. package/dist-esm/storage-file-share/src/generated/src/storageClient.js.map +1 -1
  65. package/dist-esm/storage-file-share/src/models.js.map +1 -1
  66. package/dist-esm/storage-file-share/src/utils/BufferScheduler.js.map +1 -1
  67. package/dist-esm/storage-file-share/src/utils/RetriableReadableStream.js.map +1 -1
  68. package/dist-esm/storage-file-share/src/utils/utils.common.js +26 -10
  69. package/dist-esm/storage-file-share/src/utils/utils.common.js.map +1 -1
  70. package/dist-esm/storage-file-share/src/utils/utils.node.js.map +1 -1
  71. package/package.json +3 -4
@@ -1,4 +1,3 @@
1
- import { __asyncDelegator, __asyncGenerator, __asyncValues, __await } from "tslib";
2
1
  import { getDefaultProxySettings, } from "@azure/core-rest-pipeline";
3
2
  import { isNode } from "@azure/core-util";
4
3
  import { isTokenCredential } from "@azure/core-auth";
@@ -116,14 +115,21 @@ export class ContainerClient extends StorageClient {
116
115
  */
117
116
  async createIfNotExists(options = {}) {
118
117
  return tracingClient.withSpan("ContainerClient-createIfNotExists", options, async (updatedOptions) => {
119
- var _a, _b;
120
118
  try {
121
119
  const res = await this.create(updatedOptions);
122
- return Object.assign(Object.assign({ succeeded: true }, res), { _response: res._response });
120
+ return {
121
+ succeeded: true,
122
+ ...res,
123
+ _response: res._response, // _response is made non-enumerable
124
+ };
123
125
  }
124
126
  catch (e) {
125
- if (((_a = e.details) === null || _a === void 0 ? void 0 : _a.errorCode) === "ContainerAlreadyExists") {
126
- return Object.assign(Object.assign({ succeeded: false }, (_b = e.response) === null || _b === void 0 ? void 0 : _b.parsedHeaders), { _response: e.response });
127
+ if (e.details?.errorCode === "ContainerAlreadyExists") {
128
+ return {
129
+ succeeded: false,
130
+ ...e.response?.parsedHeaders,
131
+ _response: e.response,
132
+ };
127
133
  }
128
134
  else {
129
135
  throw e;
@@ -217,7 +223,11 @@ export class ContainerClient extends StorageClient {
217
223
  options.conditions = {};
218
224
  }
219
225
  return tracingClient.withSpan("ContainerClient-getProperties", options, async (updatedOptions) => {
220
- return assertResponse(await this.containerContext.getProperties(Object.assign(Object.assign({ abortSignal: options.abortSignal }, options.conditions), { tracingOptions: updatedOptions.tracingOptions })));
226
+ return assertResponse(await this.containerContext.getProperties({
227
+ abortSignal: options.abortSignal,
228
+ ...options.conditions,
229
+ tracingOptions: updatedOptions.tracingOptions,
230
+ }));
221
231
  });
222
232
  }
223
233
  /**
@@ -249,14 +259,21 @@ export class ContainerClient extends StorageClient {
249
259
  */
250
260
  async deleteIfExists(options = {}) {
251
261
  return tracingClient.withSpan("ContainerClient-deleteIfExists", options, async (updatedOptions) => {
252
- var _a, _b;
253
262
  try {
254
263
  const res = await this.delete(updatedOptions);
255
- return Object.assign(Object.assign({ succeeded: true }, res), { _response: res._response });
264
+ return {
265
+ succeeded: true,
266
+ ...res,
267
+ _response: res._response,
268
+ };
256
269
  }
257
270
  catch (e) {
258
- if (((_a = e.details) === null || _a === void 0 ? void 0 : _a.errorCode) === "ContainerNotFound") {
259
- return Object.assign(Object.assign({ succeeded: false }, (_b = e.response) === null || _b === void 0 ? void 0 : _b.parsedHeaders), { _response: e.response });
271
+ if (e.details?.errorCode === "ContainerNotFound") {
272
+ return {
273
+ succeeded: false,
274
+ ...e.response?.parsedHeaders,
275
+ _response: e.response,
276
+ };
260
277
  }
261
278
  throw e;
262
279
  }
@@ -463,11 +480,30 @@ export class ContainerClient extends StorageClient {
463
480
  */
464
481
  async listBlobFlatSegment(marker, options = {}) {
465
482
  return tracingClient.withSpan("ContainerClient-listBlobFlatSegment", options, async (updatedOptions) => {
466
- const response = assertResponse(await this.containerContext.listBlobFlatSegment(Object.assign(Object.assign({ marker }, options), { tracingOptions: updatedOptions.tracingOptions })));
467
- const wrappedResponse = Object.assign(Object.assign({}, response), { _response: Object.assign(Object.assign({}, response._response), { parsedBody: ConvertInternalResponseOfListBlobFlat(response._response.parsedBody) }), segment: Object.assign(Object.assign({}, response.segment), { blobItems: response.segment.blobItems.map((blobItemInternal) => {
468
- const blobItem = Object.assign(Object.assign({}, blobItemInternal), { name: BlobNameToString(blobItemInternal.name), tags: toTags(blobItemInternal.blobTags), objectReplicationSourceProperties: parseObjectReplicationRecord(blobItemInternal.objectReplicationMetadata) });
483
+ const response = assertResponse(await this.containerContext.listBlobFlatSegment({
484
+ marker,
485
+ ...options,
486
+ tracingOptions: updatedOptions.tracingOptions,
487
+ }));
488
+ const wrappedResponse = {
489
+ ...response,
490
+ _response: {
491
+ ...response._response,
492
+ parsedBody: ConvertInternalResponseOfListBlobFlat(response._response.parsedBody),
493
+ },
494
+ segment: {
495
+ ...response.segment,
496
+ blobItems: response.segment.blobItems.map((blobItemInternal) => {
497
+ const blobItem = {
498
+ ...blobItemInternal,
499
+ name: BlobNameToString(blobItemInternal.name),
500
+ tags: toTags(blobItemInternal.blobTags),
501
+ objectReplicationSourceProperties: parseObjectReplicationRecord(blobItemInternal.objectReplicationMetadata),
502
+ };
469
503
  return blobItem;
470
- }) }) });
504
+ }),
505
+ },
506
+ };
471
507
  return wrappedResponse;
472
508
  });
473
509
  }
@@ -484,15 +520,37 @@ export class ContainerClient extends StorageClient {
484
520
  */
485
521
  async listBlobHierarchySegment(delimiter, marker, options = {}) {
486
522
  return tracingClient.withSpan("ContainerClient-listBlobHierarchySegment", options, async (updatedOptions) => {
487
- var _a;
488
- const response = assertResponse(await this.containerContext.listBlobHierarchySegment(delimiter, Object.assign(Object.assign({ marker }, options), { tracingOptions: updatedOptions.tracingOptions })));
489
- const wrappedResponse = Object.assign(Object.assign({}, response), { _response: Object.assign(Object.assign({}, response._response), { parsedBody: ConvertInternalResponseOfListBlobHierarchy(response._response.parsedBody) }), segment: Object.assign(Object.assign({}, response.segment), { blobItems: response.segment.blobItems.map((blobItemInternal) => {
490
- const blobItem = Object.assign(Object.assign({}, blobItemInternal), { name: BlobNameToString(blobItemInternal.name), tags: toTags(blobItemInternal.blobTags), objectReplicationSourceProperties: parseObjectReplicationRecord(blobItemInternal.objectReplicationMetadata) });
523
+ const response = assertResponse(await this.containerContext.listBlobHierarchySegment(delimiter, {
524
+ marker,
525
+ ...options,
526
+ tracingOptions: updatedOptions.tracingOptions,
527
+ }));
528
+ const wrappedResponse = {
529
+ ...response,
530
+ _response: {
531
+ ...response._response,
532
+ parsedBody: ConvertInternalResponseOfListBlobHierarchy(response._response.parsedBody),
533
+ },
534
+ segment: {
535
+ ...response.segment,
536
+ blobItems: response.segment.blobItems.map((blobItemInternal) => {
537
+ const blobItem = {
538
+ ...blobItemInternal,
539
+ name: BlobNameToString(blobItemInternal.name),
540
+ tags: toTags(blobItemInternal.blobTags),
541
+ objectReplicationSourceProperties: parseObjectReplicationRecord(blobItemInternal.objectReplicationMetadata),
542
+ };
491
543
  return blobItem;
492
- }), blobPrefixes: (_a = response.segment.blobPrefixes) === null || _a === void 0 ? void 0 : _a.map((blobPrefixInternal) => {
493
- const blobPrefix = Object.assign(Object.assign({}, blobPrefixInternal), { name: BlobNameToString(blobPrefixInternal.name) });
544
+ }),
545
+ blobPrefixes: response.segment.blobPrefixes?.map((blobPrefixInternal) => {
546
+ const blobPrefix = {
547
+ ...blobPrefixInternal,
548
+ name: BlobNameToString(blobPrefixInternal.name),
549
+ };
494
550
  return blobPrefix;
495
- }) }) });
551
+ }),
552
+ },
553
+ };
496
554
  return wrappedResponse;
497
555
  });
498
556
  }
@@ -508,43 +566,26 @@ export class ContainerClient extends StorageClient {
508
566
  * items. The marker value is opaque to the client.
509
567
  * @param options - Options to list blobs operation.
510
568
  */
511
- listSegments(marker, options = {}) {
512
- return __asyncGenerator(this, arguments, function* listSegments_1() {
513
- let listBlobsFlatSegmentResponse;
514
- if (!!marker || marker === undefined) {
515
- do {
516
- listBlobsFlatSegmentResponse = yield __await(this.listBlobFlatSegment(marker, options));
517
- marker = listBlobsFlatSegmentResponse.continuationToken;
518
- yield yield __await(yield __await(listBlobsFlatSegmentResponse));
519
- } while (marker);
520
- }
521
- });
569
+ async *listSegments(marker, options = {}) {
570
+ let listBlobsFlatSegmentResponse;
571
+ if (!!marker || marker === undefined) {
572
+ do {
573
+ listBlobsFlatSegmentResponse = await this.listBlobFlatSegment(marker, options);
574
+ marker = listBlobsFlatSegmentResponse.continuationToken;
575
+ yield await listBlobsFlatSegmentResponse;
576
+ } while (marker);
577
+ }
522
578
  }
523
579
  /**
524
580
  * Returns an AsyncIterableIterator of {@link BlobItem} objects
525
581
  *
526
582
  * @param options - Options to list blobs operation.
527
583
  */
528
- listItems(options = {}) {
529
- return __asyncGenerator(this, arguments, function* listItems_1() {
530
- var _a, e_1, _b, _c;
531
- let marker;
532
- try {
533
- for (var _d = true, _e = __asyncValues(this.listSegments(marker, options)), _f; _f = yield __await(_e.next()), _a = _f.done, !_a; _d = true) {
534
- _c = _f.value;
535
- _d = false;
536
- const listBlobsFlatSegmentResponse = _c;
537
- yield __await(yield* __asyncDelegator(__asyncValues(listBlobsFlatSegmentResponse.segment.blobItems)));
538
- }
539
- }
540
- catch (e_1_1) { e_1 = { error: e_1_1 }; }
541
- finally {
542
- try {
543
- if (!_d && !_a && (_b = _e.return)) yield __await(_b.call(_e));
544
- }
545
- finally { if (e_1) throw e_1.error; }
546
- }
547
- });
584
+ async *listItems(options = {}) {
585
+ let marker;
586
+ for await (const listBlobsFlatSegmentResponse of this.listSegments(marker, options)) {
587
+ yield* listBlobsFlatSegmentResponse.segment.blobItems;
588
+ }
548
589
  }
549
590
  /**
550
591
  * Returns an async iterable iterator to list all the blobs
@@ -651,7 +692,10 @@ export class ContainerClient extends StorageClient {
651
692
  if (options.prefix === "") {
652
693
  options.prefix = undefined;
653
694
  }
654
- const updatedOptions = Object.assign(Object.assign({}, options), (include.length > 0 ? { include: include } : {}));
695
+ const updatedOptions = {
696
+ ...options,
697
+ ...(include.length > 0 ? { include: include } : {}),
698
+ };
655
699
  // AsyncIterableIterator to iterate over blobs
656
700
  const iter = this.listItems(updatedOptions);
657
701
  return {
@@ -671,7 +715,10 @@ export class ContainerClient extends StorageClient {
671
715
  * Return an AsyncIterableIterator that works a page at a time
672
716
  */
673
717
  byPage: (settings = {}) => {
674
- return this.listSegments(settings.continuationToken, Object.assign({ maxPageSize: settings.maxPageSize }, updatedOptions));
718
+ return this.listSegments(settings.continuationToken, {
719
+ maxPageSize: settings.maxPageSize,
720
+ ...updatedOptions,
721
+ });
675
722
  },
676
723
  };
677
724
  }
@@ -688,17 +735,15 @@ export class ContainerClient extends StorageClient {
688
735
  * items. The marker value is opaque to the client.
689
736
  * @param options - Options to list blobs operation.
690
737
  */
691
- listHierarchySegments(delimiter, marker, options = {}) {
692
- return __asyncGenerator(this, arguments, function* listHierarchySegments_1() {
693
- let listBlobsHierarchySegmentResponse;
694
- if (!!marker || marker === undefined) {
695
- do {
696
- listBlobsHierarchySegmentResponse = yield __await(this.listBlobHierarchySegment(delimiter, marker, options));
697
- marker = listBlobsHierarchySegmentResponse.continuationToken;
698
- yield yield __await(yield __await(listBlobsHierarchySegmentResponse));
699
- } while (marker);
700
- }
701
- });
738
+ async *listHierarchySegments(delimiter, marker, options = {}) {
739
+ let listBlobsHierarchySegmentResponse;
740
+ if (!!marker || marker === undefined) {
741
+ do {
742
+ listBlobsHierarchySegmentResponse = await this.listBlobHierarchySegment(delimiter, marker, options);
743
+ marker = listBlobsHierarchySegmentResponse.continuationToken;
744
+ yield await listBlobsHierarchySegmentResponse;
745
+ } while (marker);
746
+ }
702
747
  }
703
748
  /**
704
749
  * Returns an AsyncIterableIterator for {@link BlobPrefix} and {@link BlobItem} objects.
@@ -706,34 +751,22 @@ export class ContainerClient extends StorageClient {
706
751
  * @param delimiter - The character or string used to define the virtual hierarchy
707
752
  * @param options - Options to list blobs operation.
708
753
  */
709
- listItemsByHierarchy(delimiter, options = {}) {
710
- return __asyncGenerator(this, arguments, function* listItemsByHierarchy_1() {
711
- var _a, e_2, _b, _c;
712
- let marker;
713
- try {
714
- for (var _d = true, _e = __asyncValues(this.listHierarchySegments(delimiter, marker, options)), _f; _f = yield __await(_e.next()), _a = _f.done, !_a; _d = true) {
715
- _c = _f.value;
716
- _d = false;
717
- const listBlobsHierarchySegmentResponse = _c;
718
- const segment = listBlobsHierarchySegmentResponse.segment;
719
- if (segment.blobPrefixes) {
720
- for (const prefix of segment.blobPrefixes) {
721
- yield yield __await(Object.assign({ kind: "prefix" }, prefix));
722
- }
723
- }
724
- for (const blob of segment.blobItems) {
725
- yield yield __await(Object.assign({ kind: "blob" }, blob));
726
- }
754
+ async *listItemsByHierarchy(delimiter, options = {}) {
755
+ let marker;
756
+ for await (const listBlobsHierarchySegmentResponse of this.listHierarchySegments(delimiter, marker, options)) {
757
+ const segment = listBlobsHierarchySegmentResponse.segment;
758
+ if (segment.blobPrefixes) {
759
+ for (const prefix of segment.blobPrefixes) {
760
+ yield {
761
+ kind: "prefix",
762
+ ...prefix,
763
+ };
727
764
  }
728
765
  }
729
- catch (e_2_1) { e_2 = { error: e_2_1 }; }
730
- finally {
731
- try {
732
- if (!_d && !_a && (_b = _e.return)) yield __await(_b.call(_e));
733
- }
734
- finally { if (e_2) throw e_2.error; }
766
+ for (const blob of segment.blobItems) {
767
+ yield { kind: "blob", ...blob };
735
768
  }
736
- });
769
+ }
737
770
  }
738
771
  /**
739
772
  * Returns an async iterable iterator to list all the blobs by hierarchy.
@@ -851,7 +884,10 @@ export class ContainerClient extends StorageClient {
851
884
  if (options.prefix === "") {
852
885
  options.prefix = undefined;
853
886
  }
854
- const updatedOptions = Object.assign(Object.assign({}, options), (include.length > 0 ? { include: include } : {}));
887
+ const updatedOptions = {
888
+ ...options,
889
+ ...(include.length > 0 ? { include: include } : {}),
890
+ };
855
891
  // AsyncIterableIterator to iterate over blob prefixes and blobs
856
892
  const iter = this.listItemsByHierarchy(delimiter, updatedOptions);
857
893
  return {
@@ -871,7 +907,10 @@ export class ContainerClient extends StorageClient {
871
907
  * Return an AsyncIterableIterator that works a page at a time
872
908
  */
873
909
  byPage: (settings = {}) => {
874
- return this.listHierarchySegments(delimiter, settings.continuationToken, Object.assign({ maxPageSize: settings.maxPageSize }, updatedOptions));
910
+ return this.listHierarchySegments(delimiter, settings.continuationToken, {
911
+ maxPageSize: settings.maxPageSize,
912
+ ...updatedOptions,
913
+ });
875
914
  },
876
915
  };
877
916
  }
@@ -901,14 +940,17 @@ export class ContainerClient extends StorageClient {
901
940
  maxPageSize: options.maxPageSize,
902
941
  tracingOptions: updatedOptions.tracingOptions,
903
942
  }));
904
- const wrappedResponse = Object.assign(Object.assign({}, response), { _response: response._response, blobs: response.blobs.map((blob) => {
905
- var _a;
943
+ const wrappedResponse = {
944
+ ...response,
945
+ _response: response._response,
946
+ blobs: response.blobs.map((blob) => {
906
947
  let tagValue = "";
907
- if (((_a = blob.tags) === null || _a === void 0 ? void 0 : _a.blobTagSet.length) === 1) {
948
+ if (blob.tags?.blobTagSet.length === 1) {
908
949
  tagValue = blob.tags.blobTagSet[0].value;
909
950
  }
910
- return Object.assign(Object.assign({}, blob), { tags: toTags(blob.tags), tagValue });
911
- }) });
951
+ return { ...blob, tags: toTags(blob.tags), tagValue };
952
+ }),
953
+ };
912
954
  return wrappedResponse;
913
955
  });
914
956
  }
@@ -928,18 +970,16 @@ export class ContainerClient extends StorageClient {
928
970
  * items. The marker value is opaque to the client.
929
971
  * @param options - Options to find blobs by tags.
930
972
  */
931
- findBlobsByTagsSegments(tagFilterSqlExpression, marker, options = {}) {
932
- return __asyncGenerator(this, arguments, function* findBlobsByTagsSegments_1() {
933
- let response;
934
- if (!!marker || marker === undefined) {
935
- do {
936
- response = yield __await(this.findBlobsByTagsSegment(tagFilterSqlExpression, marker, options));
937
- response.blobs = response.blobs || [];
938
- marker = response.continuationToken;
939
- yield yield __await(response);
940
- } while (marker);
941
- }
942
- });
973
+ async *findBlobsByTagsSegments(tagFilterSqlExpression, marker, options = {}) {
974
+ let response;
975
+ if (!!marker || marker === undefined) {
976
+ do {
977
+ response = await this.findBlobsByTagsSegment(tagFilterSqlExpression, marker, options);
978
+ response.blobs = response.blobs || [];
979
+ marker = response.continuationToken;
980
+ yield response;
981
+ } while (marker);
982
+ }
943
983
  }
944
984
  /**
945
985
  * Returns an AsyncIterableIterator for blobs.
@@ -950,26 +990,11 @@ export class ContainerClient extends StorageClient {
950
990
  * however, only a subset of the OData filter syntax is supported in the Blob service.
951
991
  * @param options - Options to findBlobsByTagsItems.
952
992
  */
953
- findBlobsByTagsItems(tagFilterSqlExpression, options = {}) {
954
- return __asyncGenerator(this, arguments, function* findBlobsByTagsItems_1() {
955
- var _a, e_3, _b, _c;
956
- let marker;
957
- try {
958
- for (var _d = true, _e = __asyncValues(this.findBlobsByTagsSegments(tagFilterSqlExpression, marker, options)), _f; _f = yield __await(_e.next()), _a = _f.done, !_a; _d = true) {
959
- _c = _f.value;
960
- _d = false;
961
- const segment = _c;
962
- yield __await(yield* __asyncDelegator(__asyncValues(segment.blobs)));
963
- }
964
- }
965
- catch (e_3_1) { e_3 = { error: e_3_1 }; }
966
- finally {
967
- try {
968
- if (!_d && !_a && (_b = _e.return)) yield __await(_b.call(_e));
969
- }
970
- finally { if (e_3) throw e_3.error; }
971
- }
972
- });
993
+ async *findBlobsByTagsItems(tagFilterSqlExpression, options = {}) {
994
+ let marker;
995
+ for await (const segment of this.findBlobsByTagsSegments(tagFilterSqlExpression, marker, options)) {
996
+ yield* segment.blobs;
997
+ }
973
998
  }
974
999
  /**
975
1000
  * Returns an async iterable iterator to find all blobs with specified tag
@@ -1050,7 +1075,9 @@ export class ContainerClient extends StorageClient {
1050
1075
  */
1051
1076
  findBlobsByTags(tagFilterSqlExpression, options = {}) {
1052
1077
  // AsyncIterableIterator to iterate over blobs
1053
- const listSegmentOptions = Object.assign({}, options);
1078
+ const listSegmentOptions = {
1079
+ ...options,
1080
+ };
1054
1081
  const iter = this.findBlobsByTagsItems(tagFilterSqlExpression, listSegmentOptions);
1055
1082
  return {
1056
1083
  /**
@@ -1069,7 +1096,10 @@ export class ContainerClient extends StorageClient {
1069
1096
  * Return an AsyncIterableIterator that works a page at a time
1070
1097
  */
1071
1098
  byPage: (settings = {}) => {
1072
- return this.findBlobsByTagsSegments(tagFilterSqlExpression, settings.continuationToken, Object.assign({ maxPageSize: settings.maxPageSize }, listSegmentOptions));
1099
+ return this.findBlobsByTagsSegments(tagFilterSqlExpression, settings.continuationToken, {
1100
+ maxPageSize: settings.maxPageSize,
1101
+ ...listSegmentOptions,
1102
+ });
1073
1103
  },
1074
1104
  };
1075
1105
  }
@@ -1126,7 +1156,10 @@ export class ContainerClient extends StorageClient {
1126
1156
  if (!(this.credential instanceof StorageSharedKeyCredential)) {
1127
1157
  throw new RangeError("Can only generate the SAS when the client is initialized with a shared key credential");
1128
1158
  }
1129
- const sas = generateBlobSASQueryParameters(Object.assign({ containerName: this._containerName }, options), this.credential).toString();
1159
+ const sas = generateBlobSASQueryParameters({
1160
+ containerName: this._containerName,
1161
+ ...options,
1162
+ }, this.credential).toString();
1130
1163
  resolve(appendToURLQuery(this.url, sas));
1131
1164
  });
1132
1165
  }