@azure/storage-file-share 12.23.0-alpha.20240112.1 → 12.23.0-alpha.20240116.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 +270 -471
- package/dist/index.js.map +1 -1
- package/dist-esm/storage-blob/src/BlobBatchClient.js +1 -3
- package/dist-esm/storage-blob/src/BlobBatchClient.js.map +1 -1
- package/dist-esm/storage-blob/src/BlobLeaseClient.js +30 -35
- package/dist-esm/storage-blob/src/BlobLeaseClient.js.map +1 -1
- package/dist-esm/storage-blob/src/BlobServiceClient.js +81 -80
- package/dist-esm/storage-blob/src/BlobServiceClient.js.map +1 -1
- package/dist-esm/storage-blob/src/Clients.js +193 -302
- package/dist-esm/storage-blob/src/Clients.js.map +1 -1
- package/dist-esm/storage-blob/src/ContainerClient.js +132 -165
- package/dist-esm/storage-blob/src/ContainerClient.js.map +1 -1
- package/dist-esm/storage-blob/src/PageBlobRangeResponse.js +3 -10
- package/dist-esm/storage-blob/src/PageBlobRangeResponse.js.map +1 -1
- package/dist-esm/storage-blob/src/Pipeline.js +10 -19
- package/dist-esm/storage-blob/src/Pipeline.js.map +1 -1
- package/dist-esm/storage-blob/src/StorageContextClient.js +1 -1
- package/dist-esm/storage-blob/src/StorageContextClient.js.map +1 -1
- package/dist-esm/storage-blob/src/generated/src/storageClient.js +3 -7
- package/dist-esm/storage-blob/src/generated/src/storageClient.js.map +1 -1
- package/dist-esm/storage-blob/src/policies/StorageRetryPolicy.js +1 -1
- package/dist-esm/storage-blob/src/policies/StorageRetryPolicy.js.map +1 -1
- package/dist-esm/storage-blob/src/policies/StorageRetryPolicyV2.js +12 -10
- package/dist-esm/storage-blob/src/policies/StorageRetryPolicyV2.js.map +1 -1
- package/dist-esm/storage-blob/src/pollers/BlobStartCopyFromUrlPoller.js +3 -6
- package/dist-esm/storage-blob/src/pollers/BlobStartCopyFromUrlPoller.js.map +1 -1
- package/dist-esm/storage-blob/src/utils/utils.common.js +11 -24
- package/dist-esm/storage-blob/src/utils/utils.common.js.map +1 -1
- package/dist-esm/storage-file-share/src/Clients.js +194 -366
- package/dist-esm/storage-file-share/src/Clients.js.map +1 -1
- package/dist-esm/storage-file-share/src/ShareServiceClient.js +43 -42
- package/dist-esm/storage-file-share/src/ShareServiceClient.js.map +1 -1
- package/dist-esm/storage-file-share/src/StorageContextClient.js +1 -1
- package/dist-esm/storage-file-share/src/StorageContextClient.js.map +1 -1
- package/dist-esm/storage-file-share/src/generated/src/storageClient.js +3 -7
- package/dist-esm/storage-file-share/src/generated/src/storageClient.js.map +1 -1
- package/dist-esm/storage-file-share/src/utils/utils.common.js +10 -26
- package/dist-esm/storage-file-share/src/utils/utils.common.js.map +1 -1
- package/package.json +1 -1
| @@ -1,3 +1,4 @@ | |
| 1 | 
            +
            import { __asyncDelegator, __asyncGenerator, __asyncValues, __await } from "tslib";
         | 
| 1 2 | 
             
            import { getDefaultProxySettings, } from "@azure/core-rest-pipeline";
         | 
| 2 3 | 
             
            import { isNode } from "@azure/core-util";
         | 
| 3 4 | 
             
            import { isTokenCredential } from "@azure/core-auth";
         | 
| @@ -115,21 +116,14 @@ export class ContainerClient extends StorageClient { | |
| 115 116 | 
             
                 */
         | 
| 116 117 | 
             
                async createIfNotExists(options = {}) {
         | 
| 117 118 | 
             
                    return tracingClient.withSpan("ContainerClient-createIfNotExists", options, async (updatedOptions) => {
         | 
| 119 | 
            +
                        var _a, _b;
         | 
| 118 120 | 
             
                        try {
         | 
| 119 121 | 
             
                            const res = await this.create(updatedOptions);
         | 
| 120 | 
            -
                            return {
         | 
| 121 | 
            -
                                succeeded: true,
         | 
| 122 | 
            -
                                ...res,
         | 
| 123 | 
            -
                                _response: res._response, // _response is made non-enumerable
         | 
| 124 | 
            -
                            };
         | 
| 122 | 
            +
                            return Object.assign(Object.assign({ succeeded: true }, res), { _response: res._response });
         | 
| 125 123 | 
             
                        }
         | 
| 126 124 | 
             
                        catch (e) {
         | 
| 127 | 
            -
                            if (e.details | 
| 128 | 
            -
                                return {
         | 
| 129 | 
            -
                                    succeeded: false,
         | 
| 130 | 
            -
                                    ...e.response?.parsedHeaders,
         | 
| 131 | 
            -
                                    _response: e.response,
         | 
| 132 | 
            -
                                };
         | 
| 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 });
         | 
| 133 127 | 
             
                            }
         | 
| 134 128 | 
             
                            else {
         | 
| 135 129 | 
             
                                throw e;
         | 
| @@ -223,11 +217,7 @@ export class ContainerClient extends StorageClient { | |
| 223 217 | 
             
                        options.conditions = {};
         | 
| 224 218 | 
             
                    }
         | 
| 225 219 | 
             
                    return tracingClient.withSpan("ContainerClient-getProperties", options, async (updatedOptions) => {
         | 
| 226 | 
            -
                        return assertResponse(await this.containerContext.getProperties({
         | 
| 227 | 
            -
                            abortSignal: options.abortSignal,
         | 
| 228 | 
            -
                            ...options.conditions,
         | 
| 229 | 
            -
                            tracingOptions: updatedOptions.tracingOptions,
         | 
| 230 | 
            -
                        }));
         | 
| 220 | 
            +
                        return assertResponse(await this.containerContext.getProperties(Object.assign(Object.assign({ abortSignal: options.abortSignal }, options.conditions), { tracingOptions: updatedOptions.tracingOptions })));
         | 
| 231 221 | 
             
                    });
         | 
| 232 222 | 
             
                }
         | 
| 233 223 | 
             
                /**
         | 
| @@ -259,21 +249,14 @@ export class ContainerClient extends StorageClient { | |
| 259 249 | 
             
                 */
         | 
| 260 250 | 
             
                async deleteIfExists(options = {}) {
         | 
| 261 251 | 
             
                    return tracingClient.withSpan("ContainerClient-deleteIfExists", options, async (updatedOptions) => {
         | 
| 252 | 
            +
                        var _a, _b;
         | 
| 262 253 | 
             
                        try {
         | 
| 263 254 | 
             
                            const res = await this.delete(updatedOptions);
         | 
| 264 | 
            -
                            return {
         | 
| 265 | 
            -
                                succeeded: true,
         | 
| 266 | 
            -
                                ...res,
         | 
| 267 | 
            -
                                _response: res._response,
         | 
| 268 | 
            -
                            };
         | 
| 255 | 
            +
                            return Object.assign(Object.assign({ succeeded: true }, res), { _response: res._response });
         | 
| 269 256 | 
             
                        }
         | 
| 270 257 | 
             
                        catch (e) {
         | 
| 271 | 
            -
                            if (e.details | 
| 272 | 
            -
                                return {
         | 
| 273 | 
            -
                                    succeeded: false,
         | 
| 274 | 
            -
                                    ...e.response?.parsedHeaders,
         | 
| 275 | 
            -
                                    _response: e.response,
         | 
| 276 | 
            -
                                };
         | 
| 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 });
         | 
| 277 260 | 
             
                            }
         | 
| 278 261 | 
             
                            throw e;
         | 
| 279 262 | 
             
                        }
         | 
| @@ -480,30 +463,11 @@ export class ContainerClient extends StorageClient { | |
| 480 463 | 
             
                 */
         | 
| 481 464 | 
             
                async listBlobFlatSegment(marker, options = {}) {
         | 
| 482 465 | 
             
                    return tracingClient.withSpan("ContainerClient-listBlobFlatSegment", options, async (updatedOptions) => {
         | 
| 483 | 
            -
                        const response = assertResponse(await this.containerContext.listBlobFlatSegment({
         | 
| 484 | 
            -
             | 
| 485 | 
            -
             | 
| 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 | 
            -
                                    };
         | 
| 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) });
         | 
| 503 469 | 
             
                                    return blobItem;
         | 
| 504 | 
            -
                                }) | 
| 505 | 
            -
                            },
         | 
| 506 | 
            -
                        };
         | 
| 470 | 
            +
                                }) }) });
         | 
| 507 471 | 
             
                        return wrappedResponse;
         | 
| 508 472 | 
             
                    });
         | 
| 509 473 | 
             
                }
         | 
| @@ -520,37 +484,15 @@ export class ContainerClient extends StorageClient { | |
| 520 484 | 
             
                 */
         | 
| 521 485 | 
             
                async listBlobHierarchySegment(delimiter, marker, options = {}) {
         | 
| 522 486 | 
             
                    return tracingClient.withSpan("ContainerClient-listBlobHierarchySegment", options, async (updatedOptions) => {
         | 
| 523 | 
            -
                         | 
| 524 | 
            -
             | 
| 525 | 
            -
             | 
| 526 | 
            -
             | 
| 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 | 
            -
                                    };
         | 
| 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) });
         | 
| 543 491 | 
             
                                    return blobItem;
         | 
| 544 | 
            -
                                }),
         | 
| 545 | 
            -
             | 
| 546 | 
            -
                                    const blobPrefix = {
         | 
| 547 | 
            -
                                        ...blobPrefixInternal,
         | 
| 548 | 
            -
                                        name: BlobNameToString(blobPrefixInternal.name),
         | 
| 549 | 
            -
                                    };
         | 
| 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) });
         | 
| 550 494 | 
             
                                    return blobPrefix;
         | 
| 551 | 
            -
                                }) | 
| 552 | 
            -
                            },
         | 
| 553 | 
            -
                        };
         | 
| 495 | 
            +
                                }) }) });
         | 
| 554 496 | 
             
                        return wrappedResponse;
         | 
| 555 497 | 
             
                    });
         | 
| 556 498 | 
             
                }
         | 
| @@ -566,26 +508,43 @@ export class ContainerClient extends StorageClient { | |
| 566 508 | 
             
                 *                          items. The marker value is opaque to the client.
         | 
| 567 509 | 
             
                 * @param options - Options to list blobs operation.
         | 
| 568 510 | 
             
                 */
         | 
| 569 | 
            -
                 | 
| 570 | 
            -
                     | 
| 571 | 
            -
             | 
| 572 | 
            -
                         | 
| 573 | 
            -
                             | 
| 574 | 
            -
             | 
| 575 | 
            -
             | 
| 576 | 
            -
             | 
| 577 | 
            -
             | 
| 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 | 
            +
                    });
         | 
| 578 522 | 
             
                }
         | 
| 579 523 | 
             
                /**
         | 
| 580 524 | 
             
                 * Returns an AsyncIterableIterator of {@link BlobItem} objects
         | 
| 581 525 | 
             
                 *
         | 
| 582 526 | 
             
                 * @param options - Options to list blobs operation.
         | 
| 583 527 | 
             
                 */
         | 
| 584 | 
            -
                 | 
| 585 | 
            -
                     | 
| 586 | 
            -
             | 
| 587 | 
            -
                         | 
| 588 | 
            -
             | 
| 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 | 
            +
                    });
         | 
| 589 548 | 
             
                }
         | 
| 590 549 | 
             
                /**
         | 
| 591 550 | 
             
                 * Returns an async iterable iterator to list all the blobs
         | 
| @@ -692,10 +651,7 @@ export class ContainerClient extends StorageClient { | |
| 692 651 | 
             
                    if (options.prefix === "") {
         | 
| 693 652 | 
             
                        options.prefix = undefined;
         | 
| 694 653 | 
             
                    }
         | 
| 695 | 
            -
                    const updatedOptions = {
         | 
| 696 | 
            -
                        ...options,
         | 
| 697 | 
            -
                        ...(include.length > 0 ? { include: include } : {}),
         | 
| 698 | 
            -
                    };
         | 
| 654 | 
            +
                    const updatedOptions = Object.assign(Object.assign({}, options), (include.length > 0 ? { include: include } : {}));
         | 
| 699 655 | 
             
                    // AsyncIterableIterator to iterate over blobs
         | 
| 700 656 | 
             
                    const iter = this.listItems(updatedOptions);
         | 
| 701 657 | 
             
                    return {
         | 
| @@ -715,10 +671,7 @@ export class ContainerClient extends StorageClient { | |
| 715 671 | 
             
                         * Return an AsyncIterableIterator that works a page at a time
         | 
| 716 672 | 
             
                         */
         | 
| 717 673 | 
             
                        byPage: (settings = {}) => {
         | 
| 718 | 
            -
                            return this.listSegments(settings.continuationToken, {
         | 
| 719 | 
            -
                                maxPageSize: settings.maxPageSize,
         | 
| 720 | 
            -
                                ...updatedOptions,
         | 
| 721 | 
            -
                            });
         | 
| 674 | 
            +
                            return this.listSegments(settings.continuationToken, Object.assign({ maxPageSize: settings.maxPageSize }, updatedOptions));
         | 
| 722 675 | 
             
                        },
         | 
| 723 676 | 
             
                    };
         | 
| 724 677 | 
             
                }
         | 
| @@ -735,15 +688,17 @@ export class ContainerClient extends StorageClient { | |
| 735 688 | 
             
                 *                          items. The marker value is opaque to the client.
         | 
| 736 689 | 
             
                 * @param options - Options to list blobs operation.
         | 
| 737 690 | 
             
                 */
         | 
| 738 | 
            -
                 | 
| 739 | 
            -
                     | 
| 740 | 
            -
             | 
| 741 | 
            -
                         | 
| 742 | 
            -
                             | 
| 743 | 
            -
             | 
| 744 | 
            -
             | 
| 745 | 
            -
             | 
| 746 | 
            -
             | 
| 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 | 
            +
                    });
         | 
| 747 702 | 
             
                }
         | 
| 748 703 | 
             
                /**
         | 
| 749 704 | 
             
                 * Returns an AsyncIterableIterator for {@link BlobPrefix} and {@link BlobItem} objects.
         | 
| @@ -751,22 +706,34 @@ export class ContainerClient extends StorageClient { | |
| 751 706 | 
             
                 * @param delimiter - The character or string used to define the virtual hierarchy
         | 
| 752 707 | 
             
                 * @param options - Options to list blobs operation.
         | 
| 753 708 | 
             
                 */
         | 
| 754 | 
            -
                 | 
| 755 | 
            -
                     | 
| 756 | 
            -
             | 
| 757 | 
            -
                         | 
| 758 | 
            -
                         | 
| 759 | 
            -
                            for ( | 
| 760 | 
            -
                                 | 
| 761 | 
            -
             | 
| 762 | 
            -
             | 
| 763 | 
            -
                                 | 
| 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 | 
            +
                                }
         | 
| 764 727 | 
             
                            }
         | 
| 765 728 | 
             
                        }
         | 
| 766 | 
            -
                         | 
| 767 | 
            -
             | 
| 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; }
         | 
| 768 735 | 
             
                        }
         | 
| 769 | 
            -
                    }
         | 
| 736 | 
            +
                    });
         | 
| 770 737 | 
             
                }
         | 
| 771 738 | 
             
                /**
         | 
| 772 739 | 
             
                 * Returns an async iterable iterator to list all the blobs by hierarchy.
         | 
| @@ -884,10 +851,7 @@ export class ContainerClient extends StorageClient { | |
| 884 851 | 
             
                    if (options.prefix === "") {
         | 
| 885 852 | 
             
                        options.prefix = undefined;
         | 
| 886 853 | 
             
                    }
         | 
| 887 | 
            -
                    const updatedOptions = {
         | 
| 888 | 
            -
                        ...options,
         | 
| 889 | 
            -
                        ...(include.length > 0 ? { include: include } : {}),
         | 
| 890 | 
            -
                    };
         | 
| 854 | 
            +
                    const updatedOptions = Object.assign(Object.assign({}, options), (include.length > 0 ? { include: include } : {}));
         | 
| 891 855 | 
             
                    // AsyncIterableIterator to iterate over blob prefixes and blobs
         | 
| 892 856 | 
             
                    const iter = this.listItemsByHierarchy(delimiter, updatedOptions);
         | 
| 893 857 | 
             
                    return {
         | 
| @@ -907,10 +871,7 @@ export class ContainerClient extends StorageClient { | |
| 907 871 | 
             
                         * Return an AsyncIterableIterator that works a page at a time
         | 
| 908 872 | 
             
                         */
         | 
| 909 873 | 
             
                        byPage: (settings = {}) => {
         | 
| 910 | 
            -
                            return this.listHierarchySegments(delimiter, settings.continuationToken, {
         | 
| 911 | 
            -
                                maxPageSize: settings.maxPageSize,
         | 
| 912 | 
            -
                                ...updatedOptions,
         | 
| 913 | 
            -
                            });
         | 
| 874 | 
            +
                            return this.listHierarchySegments(delimiter, settings.continuationToken, Object.assign({ maxPageSize: settings.maxPageSize }, updatedOptions));
         | 
| 914 875 | 
             
                        },
         | 
| 915 876 | 
             
                    };
         | 
| 916 877 | 
             
                }
         | 
| @@ -940,17 +901,14 @@ export class ContainerClient extends StorageClient { | |
| 940 901 | 
             
                            maxPageSize: options.maxPageSize,
         | 
| 941 902 | 
             
                            tracingOptions: updatedOptions.tracingOptions,
         | 
| 942 903 | 
             
                        }));
         | 
| 943 | 
            -
                        const wrappedResponse = {
         | 
| 944 | 
            -
             | 
| 945 | 
            -
                            _response: response._response,
         | 
| 946 | 
            -
                            blobs: response.blobs.map((blob) => {
         | 
| 904 | 
            +
                        const wrappedResponse = Object.assign(Object.assign({}, response), { _response: response._response, blobs: response.blobs.map((blob) => {
         | 
| 905 | 
            +
                                var _a;
         | 
| 947 906 | 
             
                                let tagValue = "";
         | 
| 948 | 
            -
                                if (blob.tags | 
| 907 | 
            +
                                if (((_a = blob.tags) === null || _a === void 0 ? void 0 : _a.blobTagSet.length) === 1) {
         | 
| 949 908 | 
             
                                    tagValue = blob.tags.blobTagSet[0].value;
         | 
| 950 909 | 
             
                                }
         | 
| 951 | 
            -
                                return {  | 
| 952 | 
            -
                            }) | 
| 953 | 
            -
                        };
         | 
| 910 | 
            +
                                return Object.assign(Object.assign({}, blob), { tags: toTags(blob.tags), tagValue });
         | 
| 911 | 
            +
                            }) });
         | 
| 954 912 | 
             
                        return wrappedResponse;
         | 
| 955 913 | 
             
                    });
         | 
| 956 914 | 
             
                }
         | 
| @@ -970,16 +928,18 @@ export class ContainerClient extends StorageClient { | |
| 970 928 | 
             
                 *                          items. The marker value is opaque to the client.
         | 
| 971 929 | 
             
                 * @param options - Options to find blobs by tags.
         | 
| 972 930 | 
             
                 */
         | 
| 973 | 
            -
                 | 
| 974 | 
            -
                     | 
| 975 | 
            -
             | 
| 976 | 
            -
                         | 
| 977 | 
            -
                             | 
| 978 | 
            -
             | 
| 979 | 
            -
             | 
| 980 | 
            -
             | 
| 981 | 
            -
             | 
| 982 | 
            -
             | 
| 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 | 
            +
                    });
         | 
| 983 943 | 
             
                }
         | 
| 984 944 | 
             
                /**
         | 
| 985 945 | 
             
                 * Returns an AsyncIterableIterator for blobs.
         | 
| @@ -990,11 +950,26 @@ export class ContainerClient extends StorageClient { | |
| 990 950 | 
             
                 *                                         however, only a subset of the OData filter syntax is supported in the Blob service.
         | 
| 991 951 | 
             
                 * @param options - Options to findBlobsByTagsItems.
         | 
| 992 952 | 
             
                 */
         | 
| 993 | 
            -
                 | 
| 994 | 
            -
                     | 
| 995 | 
            -
             | 
| 996 | 
            -
                         | 
| 997 | 
            -
             | 
| 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 | 
            +
                    });
         | 
| 998 973 | 
             
                }
         | 
| 999 974 | 
             
                /**
         | 
| 1000 975 | 
             
                 * Returns an async iterable iterator to find all blobs with specified tag
         | 
| @@ -1075,9 +1050,7 @@ export class ContainerClient extends StorageClient { | |
| 1075 1050 | 
             
                 */
         | 
| 1076 1051 | 
             
                findBlobsByTags(tagFilterSqlExpression, options = {}) {
         | 
| 1077 1052 | 
             
                    // AsyncIterableIterator to iterate over blobs
         | 
| 1078 | 
            -
                    const listSegmentOptions = {
         | 
| 1079 | 
            -
                        ...options,
         | 
| 1080 | 
            -
                    };
         | 
| 1053 | 
            +
                    const listSegmentOptions = Object.assign({}, options);
         | 
| 1081 1054 | 
             
                    const iter = this.findBlobsByTagsItems(tagFilterSqlExpression, listSegmentOptions);
         | 
| 1082 1055 | 
             
                    return {
         | 
| 1083 1056 | 
             
                        /**
         | 
| @@ -1096,10 +1069,7 @@ export class ContainerClient extends StorageClient { | |
| 1096 1069 | 
             
                         * Return an AsyncIterableIterator that works a page at a time
         | 
| 1097 1070 | 
             
                         */
         | 
| 1098 1071 | 
             
                        byPage: (settings = {}) => {
         | 
| 1099 | 
            -
                            return this.findBlobsByTagsSegments(tagFilterSqlExpression, settings.continuationToken, {
         | 
| 1100 | 
            -
                                maxPageSize: settings.maxPageSize,
         | 
| 1101 | 
            -
                                ...listSegmentOptions,
         | 
| 1102 | 
            -
                            });
         | 
| 1072 | 
            +
                            return this.findBlobsByTagsSegments(tagFilterSqlExpression, settings.continuationToken, Object.assign({ maxPageSize: settings.maxPageSize }, listSegmentOptions));
         | 
| 1103 1073 | 
             
                        },
         | 
| 1104 1074 | 
             
                    };
         | 
| 1105 1075 | 
             
                }
         | 
| @@ -1156,10 +1126,7 @@ export class ContainerClient extends StorageClient { | |
| 1156 1126 | 
             
                        if (!(this.credential instanceof StorageSharedKeyCredential)) {
         | 
| 1157 1127 | 
             
                            throw new RangeError("Can only generate the SAS when the client is initialized with a shared key credential");
         | 
| 1158 1128 | 
             
                        }
         | 
| 1159 | 
            -
                        const sas = generateBlobSASQueryParameters({
         | 
| 1160 | 
            -
                            containerName: this._containerName,
         | 
| 1161 | 
            -
                            ...options,
         | 
| 1162 | 
            -
                        }, this.credential).toString();
         | 
| 1129 | 
            +
                        const sas = generateBlobSASQueryParameters(Object.assign({ containerName: this._containerName }, options), this.credential).toString();
         | 
| 1163 1130 | 
             
                        resolve(appendToURLQuery(this.url, sas));
         | 
| 1164 1131 | 
             
                    });
         | 
| 1165 1132 | 
             
                }
         |