@azure/storage-blob 12.20.0-alpha.20230410.3 → 12.20.0-alpha.20230620.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +221 -149
- package/dist/index.js.map +1 -1
- package/dist-esm/storage-blob/src/BlobDownloadResponse.js +21 -13
- package/dist-esm/storage-blob/src/BlobDownloadResponse.js.map +1 -1
- package/dist-esm/storage-blob/src/BlobLeaseClient.js +16 -16
- package/dist-esm/storage-blob/src/BlobLeaseClient.js.map +1 -1
- package/dist-esm/storage-blob/src/BlobQueryResponse.browser.js +9 -9
- package/dist-esm/storage-blob/src/BlobQueryResponse.browser.js.map +1 -1
- package/dist-esm/storage-blob/src/BlobQueryResponse.js +10 -10
- package/dist-esm/storage-blob/src/BlobQueryResponse.js.map +1 -1
- package/dist-esm/storage-blob/src/BlobServiceClient.js +44 -30
- package/dist-esm/storage-blob/src/BlobServiceClient.js.map +1 -1
- package/dist-esm/storage-blob/src/Clients.js +36 -22
- package/dist-esm/storage-blob/src/Clients.js.map +1 -1
- package/dist-esm/storage-blob/src/ContainerClient.js +47 -26
- package/dist-esm/storage-blob/src/ContainerClient.js.map +1 -1
- package/dist-esm/storage-blob/src/generated/src/models/index.js.map +1 -1
- package/dist-esm/storage-blob/src/generated/src/models/mappers.js +7 -0
- package/dist-esm/storage-blob/src/generated/src/models/mappers.js.map +1 -1
- package/dist-esm/storage-blob/src/generated/src/storageClient.js +1 -1
- package/dist-esm/storage-blob/src/generated/src/storageClient.js.map +1 -1
- package/dist-esm/storage-blob/src/generatedModels.js +5 -1
- package/dist-esm/storage-blob/src/generatedModels.js.map +1 -1
- package/dist-esm/storage-blob/src/sas/SASQueryParameters.js +14 -14
- package/dist-esm/storage-blob/src/sas/SASQueryParameters.js.map +1 -1
- package/dist-esm/storage-blob/src/utils/Mutex.js +2 -1
- package/dist-esm/storage-blob/src/utils/Mutex.js.map +1 -1
- package/dist-esm/storage-common/src/PooledBuffer.js +6 -6
- package/dist-esm/storage-common/src/PooledBuffer.js.map +1 -1
- package/dist-esm/storage-internal-avro/src/AvroReadableFromStream.js +5 -5
- package/dist-esm/storage-internal-avro/src/AvroReadableFromStream.js.map +1 -1
- package/dist-esm/storage-internal-avro/src/AvroReader.js +6 -6
- package/dist-esm/storage-internal-avro/src/AvroReader.js.map +1 -1
- package/package.json +2 -2
- package/types/3.1/storage-blob.d.ts +6 -0
- package/types/latest/storage-blob.d.ts +7 -0
package/dist/index.js
CHANGED
@@ -5893,6 +5893,13 @@ const BlobDownloadHeaders = {
|
|
5893
5893
|
name: "DateTimeRfc1123"
|
5894
5894
|
}
|
5895
5895
|
},
|
5896
|
+
createdOn: {
|
5897
|
+
serializedName: "x-ms-creation-time",
|
5898
|
+
xmlName: "x-ms-creation-time",
|
5899
|
+
type: {
|
5900
|
+
name: "DateTimeRfc1123"
|
5901
|
+
}
|
5902
|
+
},
|
5896
5903
|
metadata: {
|
5897
5904
|
serializedName: "x-ms-meta",
|
5898
5905
|
headerCollectionPrefix: "x-ms-meta-",
|
@@ -15169,7 +15176,7 @@ class StorageClient$1 extends coreHttpCompat__namespace.ExtendedServiceClient {
|
|
15169
15176
|
const defaults = {
|
15170
15177
|
requestContentType: "application/json; charset=utf-8"
|
15171
15178
|
};
|
15172
|
-
const packageDetails = `azsdk-js-azure-storage-blob/12.
|
15179
|
+
const packageDetails = `azsdk-js-azure-storage-blob/12.13.0`;
|
15173
15180
|
const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix
|
15174
15181
|
? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
|
15175
15182
|
: `${packageDetails}`;
|
@@ -15724,6 +15731,20 @@ exports.SASProtocol = void 0;
|
|
15724
15731
|
* NOTE: Instances of this class are immutable.
|
15725
15732
|
*/
|
15726
15733
|
class SASQueryParameters {
|
15734
|
+
/**
|
15735
|
+
* Optional. IP range allowed for this SAS.
|
15736
|
+
*
|
15737
|
+
* @readonly
|
15738
|
+
*/
|
15739
|
+
get ipRange() {
|
15740
|
+
if (this.ipRangeInner) {
|
15741
|
+
return {
|
15742
|
+
end: this.ipRangeInner.end,
|
15743
|
+
start: this.ipRangeInner.start,
|
15744
|
+
};
|
15745
|
+
}
|
15746
|
+
return undefined;
|
15747
|
+
}
|
15727
15748
|
constructor(version, signature, permissionsOrOptions, services, resourceTypes, protocol, startsOn, expiresOn, ipRange, identifier, resource, cacheControl, contentDisposition, contentEncoding, contentLanguage, contentType, userDelegationKey, preauthorizedAgentObjectId, correlationId, encryptionScope) {
|
15728
15749
|
this.version = version;
|
15729
15750
|
this.signature = signature;
|
@@ -15783,20 +15804,6 @@ class SASQueryParameters {
|
|
15783
15804
|
}
|
15784
15805
|
}
|
15785
15806
|
}
|
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
15807
|
/**
|
15801
15808
|
* Encodes all SAS query parameters into a string that can be appended to a URL.
|
15802
15809
|
*
|
@@ -16481,6 +16488,22 @@ function SASSignatureValuesSanityCheckAndAutofill(blobSASSignatureValues) {
|
|
16481
16488
|
* A client that manages leases for a {@link ContainerClient} or a {@link BlobClient}.
|
16482
16489
|
*/
|
16483
16490
|
class BlobLeaseClient {
|
16491
|
+
/**
|
16492
|
+
* Gets the lease Id.
|
16493
|
+
*
|
16494
|
+
* @readonly
|
16495
|
+
*/
|
16496
|
+
get leaseId() {
|
16497
|
+
return this._leaseId;
|
16498
|
+
}
|
16499
|
+
/**
|
16500
|
+
* Gets the url.
|
16501
|
+
*
|
16502
|
+
* @readonly
|
16503
|
+
*/
|
16504
|
+
get url() {
|
16505
|
+
return this._url;
|
16506
|
+
}
|
16484
16507
|
/**
|
16485
16508
|
* Creates an instance of BlobLeaseClient.
|
16486
16509
|
* @param client - The client to make the lease operation requests.
|
@@ -16502,22 +16525,6 @@ class BlobLeaseClient {
|
|
16502
16525
|
}
|
16503
16526
|
this._leaseId = leaseId;
|
16504
16527
|
}
|
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
16528
|
/**
|
16522
16529
|
* Establishes and manages a lock on a container for delete operations, or on a blob
|
16523
16530
|
* for write and delete operations.
|
@@ -16791,19 +16798,6 @@ class RetriableReadableStream extends stream.Readable {
|
|
16791
16798
|
* Readable stream.
|
16792
16799
|
*/
|
16793
16800
|
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
16801
|
/**
|
16808
16802
|
* Indicates that the service supports
|
16809
16803
|
* requests for partial file content.
|
@@ -17085,6 +17079,14 @@ class BlobDownloadResponse {
|
|
17085
17079
|
get lastAccessed() {
|
17086
17080
|
return this.originalResponse.lastAccessed;
|
17087
17081
|
}
|
17082
|
+
/**
|
17083
|
+
* Returns the date and time the blob was created.
|
17084
|
+
*
|
17085
|
+
* @readonly
|
17086
|
+
*/
|
17087
|
+
get createdOn() {
|
17088
|
+
return this.originalResponse.createdOn;
|
17089
|
+
}
|
17088
17090
|
/**
|
17089
17091
|
* A name-value pair
|
17090
17092
|
* to associate with a file storage object.
|
@@ -17229,6 +17231,19 @@ class BlobDownloadResponse {
|
|
17229
17231
|
get _response() {
|
17230
17232
|
return this.originalResponse._response;
|
17231
17233
|
}
|
17234
|
+
/**
|
17235
|
+
* Creates an instance of BlobDownloadResponse.
|
17236
|
+
*
|
17237
|
+
* @param originalResponse -
|
17238
|
+
* @param getter -
|
17239
|
+
* @param offset -
|
17240
|
+
* @param count -
|
17241
|
+
* @param options -
|
17242
|
+
*/
|
17243
|
+
constructor(originalResponse, getter, offset, count, options = {}) {
|
17244
|
+
this.originalResponse = originalResponse;
|
17245
|
+
this.blobDownloadStream = new RetriableReadableStream(this.originalResponse.readableStreamBody, getter, offset, count, options);
|
17246
|
+
}
|
17232
17247
|
}
|
17233
17248
|
|
17234
17249
|
// Copyright (c) Microsoft Corporation.
|
@@ -17569,6 +17584,12 @@ function arraysEqual(a, b) {
|
|
17569
17584
|
|
17570
17585
|
// Copyright (c) Microsoft Corporation.
|
17571
17586
|
class AvroReader {
|
17587
|
+
get blockOffset() {
|
17588
|
+
return this._blockOffset;
|
17589
|
+
}
|
17590
|
+
get objectIndex() {
|
17591
|
+
return this._objectIndex;
|
17592
|
+
}
|
17572
17593
|
constructor(dataStream, headerStream, currentBlockOffset, indexWithinCurrentBlock) {
|
17573
17594
|
this._dataStream = dataStream;
|
17574
17595
|
this._headerStream = headerStream || dataStream;
|
@@ -17577,12 +17598,6 @@ class AvroReader {
|
|
17577
17598
|
this._objectIndex = indexWithinCurrentBlock || 0;
|
17578
17599
|
this._initialBlockOffset = currentBlockOffset || 0;
|
17579
17600
|
}
|
17580
|
-
get blockOffset() {
|
17581
|
-
return this._blockOffset;
|
17582
|
-
}
|
17583
|
-
get objectIndex() {
|
17584
|
-
return this._objectIndex;
|
17585
|
-
}
|
17586
17601
|
async initialize(options = {}) {
|
17587
17602
|
const header = await AvroParser.readFixedBytes(this._headerStream, AVRO_INIT_BYTES.length, {
|
17588
17603
|
abortSignal: options.abortSignal,
|
@@ -17674,17 +17689,17 @@ class AvroReadable {
|
|
17674
17689
|
// Copyright (c) Microsoft Corporation.
|
17675
17690
|
const ABORT_ERROR = new abortController.AbortError("Reading from the avro stream was aborted.");
|
17676
17691
|
class AvroReadableFromStream extends AvroReadable {
|
17677
|
-
constructor(readable) {
|
17678
|
-
super();
|
17679
|
-
this._readable = readable;
|
17680
|
-
this._position = 0;
|
17681
|
-
}
|
17682
17692
|
toUint8Array(data) {
|
17683
17693
|
if (typeof data === "string") {
|
17684
17694
|
return Buffer.from(data);
|
17685
17695
|
}
|
17686
17696
|
return data;
|
17687
17697
|
}
|
17698
|
+
constructor(readable) {
|
17699
|
+
super();
|
17700
|
+
this._readable = readable;
|
17701
|
+
this._position = 0;
|
17702
|
+
}
|
17688
17703
|
get position() {
|
17689
17704
|
return this._position;
|
17690
17705
|
}
|
@@ -17868,16 +17883,6 @@ class BlobQuickQueryStream extends stream.Readable {
|
|
17868
17883
|
* parse avor data returned by blob query.
|
17869
17884
|
*/
|
17870
17885
|
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
17886
|
/**
|
17882
17887
|
* Indicates that the service supports
|
17883
17888
|
* requests for partial file content.
|
@@ -18222,6 +18227,16 @@ class BlobQueryResponse {
|
|
18222
18227
|
get _response() {
|
18223
18228
|
return this.originalResponse._response;
|
18224
18229
|
}
|
18230
|
+
/**
|
18231
|
+
* Creates an instance of BlobQueryResponse.
|
18232
|
+
*
|
18233
|
+
* @param originalResponse -
|
18234
|
+
* @param options -
|
18235
|
+
*/
|
18236
|
+
constructor(originalResponse, options = {}) {
|
18237
|
+
this.originalResponse = originalResponse;
|
18238
|
+
this.blobDownloadStream = new BlobQuickQueryStream(this.originalResponse.readableStreamBody, options);
|
18239
|
+
}
|
18225
18240
|
}
|
18226
18241
|
|
18227
18242
|
// Copyright (c) Microsoft Corporation.
|
@@ -18716,6 +18731,12 @@ const maxBufferLength = require("buffer").constants.MAX_LENGTH;
|
|
18716
18731
|
* assembled from all the data in the internal "buffer".
|
18717
18732
|
*/
|
18718
18733
|
class PooledBuffer {
|
18734
|
+
/**
|
18735
|
+
* The size of the data contained in the pooled buffers.
|
18736
|
+
*/
|
18737
|
+
get size() {
|
18738
|
+
return this._size;
|
18739
|
+
}
|
18719
18740
|
constructor(capacity, buffers, totalLength) {
|
18720
18741
|
/**
|
18721
18742
|
* Internal buffers used to keep the data.
|
@@ -18737,12 +18758,6 @@ class PooledBuffer {
|
|
18737
18758
|
this.fill(buffers, totalLength);
|
18738
18759
|
}
|
18739
18760
|
}
|
18740
|
-
/**
|
18741
|
-
* The size of the data contained in the pooled buffers.
|
18742
|
-
*/
|
18743
|
-
get size() {
|
18744
|
-
return this._size;
|
18745
|
-
}
|
18746
18761
|
/**
|
18747
18762
|
* Fill the internal buffers with data in the input buffers serially
|
18748
18763
|
* with respect to the total length and the total capacity of the internal buffers.
|
@@ -19149,6 +19164,18 @@ const fsCreateReadStream = fs__namespace.createReadStream;
|
|
19149
19164
|
* append blob, or page blob.
|
19150
19165
|
*/
|
19151
19166
|
class BlobClient extends StorageClient {
|
19167
|
+
/**
|
19168
|
+
* The name of the blob.
|
19169
|
+
*/
|
19170
|
+
get name() {
|
19171
|
+
return this._name;
|
19172
|
+
}
|
19173
|
+
/**
|
19174
|
+
* The name of the storage container the blob is associated with.
|
19175
|
+
*/
|
19176
|
+
get containerName() {
|
19177
|
+
return this._containerName;
|
19178
|
+
}
|
19152
19179
|
constructor(urlOrConnectionString, credentialOrPipelineOrContainerName, blobNameOrOptions,
|
19153
19180
|
// Legacy, no fix for eslint error without breaking. Disable it for this interface.
|
19154
19181
|
/* eslint-disable-next-line @azure/azure-sdk/ts-naming-options*/
|
@@ -19218,18 +19245,6 @@ class BlobClient extends StorageClient {
|
|
19218
19245
|
this._snapshot = getURLParameter(this.url, URLConstants.Parameters.SNAPSHOT);
|
19219
19246
|
this._versionId = getURLParameter(this.url, URLConstants.Parameters.VERSIONID);
|
19220
19247
|
}
|
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
19248
|
/**
|
19234
19249
|
* Creates a new BlobClient object identical to the source but with the specified snapshot timestamp.
|
19235
19250
|
* Provide "" will remove the snapshot and return a Client to the base blob.
|
@@ -21219,18 +21234,25 @@ class PageBlobClient extends BlobClient {
|
|
21219
21234
|
*/
|
21220
21235
|
listPageRangeItems(offset = 0, count, options = {}) {
|
21221
21236
|
return tslib.__asyncGenerator(this, arguments, function* listPageRangeItems_1() {
|
21222
|
-
var e_1,
|
21237
|
+
var _a, e_1, _b, _c;
|
21223
21238
|
let marker;
|
21224
21239
|
try {
|
21225
|
-
for (var
|
21226
|
-
|
21227
|
-
|
21240
|
+
for (var _d = true, _e = tslib.__asyncValues(this.listPageRangeItemSegments(offset, count, marker, options)), _f; _f = yield tslib.__await(_e.next()), _a = _f.done, !_a;) {
|
21241
|
+
_c = _f.value;
|
21242
|
+
_d = false;
|
21243
|
+
try {
|
21244
|
+
const getPageRangesSegment = _c;
|
21245
|
+
yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(ExtractPageRangeInfoItems(getPageRangesSegment))));
|
21246
|
+
}
|
21247
|
+
finally {
|
21248
|
+
_d = true;
|
21249
|
+
}
|
21228
21250
|
}
|
21229
21251
|
}
|
21230
21252
|
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
21231
21253
|
finally {
|
21232
21254
|
try {
|
21233
|
-
if (
|
21255
|
+
if (!_d && !_a && (_b = _e.return)) yield tslib.__await(_b.call(_e));
|
21234
21256
|
}
|
21235
21257
|
finally { if (e_1) throw e_1.error; }
|
21236
21258
|
}
|
@@ -21427,18 +21449,25 @@ class PageBlobClient extends BlobClient {
|
|
21427
21449
|
*/
|
21428
21450
|
listPageRangeDiffItems(offset, count, prevSnapshotOrUrl, options) {
|
21429
21451
|
return tslib.__asyncGenerator(this, arguments, function* listPageRangeDiffItems_1() {
|
21430
|
-
var e_2,
|
21452
|
+
var _a, e_2, _b, _c;
|
21431
21453
|
let marker;
|
21432
21454
|
try {
|
21433
|
-
for (var
|
21434
|
-
|
21435
|
-
|
21455
|
+
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;) {
|
21456
|
+
_c = _f.value;
|
21457
|
+
_d = false;
|
21458
|
+
try {
|
21459
|
+
const getPageRangesSegment = _c;
|
21460
|
+
yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(ExtractPageRangeInfoItems(getPageRangesSegment))));
|
21461
|
+
}
|
21462
|
+
finally {
|
21463
|
+
_d = true;
|
21464
|
+
}
|
21436
21465
|
}
|
21437
21466
|
}
|
21438
21467
|
catch (e_2_1) { e_2 = { error: e_2_1 }; }
|
21439
21468
|
finally {
|
21440
21469
|
try {
|
21441
|
-
if (
|
21470
|
+
if (!_d && !_a && (_b = _e.return)) yield tslib.__await(_b.call(_e));
|
21442
21471
|
}
|
21443
21472
|
finally { if (e_2) throw e_2.error; }
|
21444
21473
|
}
|
@@ -22228,6 +22257,12 @@ class BlobBatchClient {
|
|
22228
22257
|
* A ContainerClient represents a URL to the Azure Storage container allowing you to manipulate its blobs.
|
22229
22258
|
*/
|
22230
22259
|
class ContainerClient extends StorageClient {
|
22260
|
+
/**
|
22261
|
+
* The name of the container.
|
22262
|
+
*/
|
22263
|
+
get containerName() {
|
22264
|
+
return this._containerName;
|
22265
|
+
}
|
22231
22266
|
constructor(urlOrConnectionString, credentialOrPipelineOrContainerName,
|
22232
22267
|
// Legacy, no fix for eslint error without breaking. Disable it for this interface.
|
22233
22268
|
/* eslint-disable-next-line @azure/azure-sdk/ts-naming-options*/
|
@@ -22290,12 +22325,6 @@ class ContainerClient extends StorageClient {
|
|
22290
22325
|
this._containerName = this.getContainerNameFromUrl();
|
22291
22326
|
this.containerContext = this.storageClientContext.container;
|
22292
22327
|
}
|
22293
|
-
/**
|
22294
|
-
* The name of the container.
|
22295
|
-
*/
|
22296
|
-
get containerName() {
|
22297
|
-
return this._containerName;
|
22298
|
-
}
|
22299
22328
|
/**
|
22300
22329
|
* Creates a new container under the specified account. If the container with
|
22301
22330
|
* the same name already exists, the operation fails.
|
@@ -22741,18 +22770,25 @@ class ContainerClient extends StorageClient {
|
|
22741
22770
|
*/
|
22742
22771
|
listItems(options = {}) {
|
22743
22772
|
return tslib.__asyncGenerator(this, arguments, function* listItems_1() {
|
22744
|
-
var e_1,
|
22773
|
+
var _a, e_1, _b, _c;
|
22745
22774
|
let marker;
|
22746
22775
|
try {
|
22747
|
-
for (var
|
22748
|
-
|
22749
|
-
|
22776
|
+
for (var _d = true, _e = tslib.__asyncValues(this.listSegments(marker, options)), _f; _f = yield tslib.__await(_e.next()), _a = _f.done, !_a;) {
|
22777
|
+
_c = _f.value;
|
22778
|
+
_d = false;
|
22779
|
+
try {
|
22780
|
+
const listBlobsFlatSegmentResponse = _c;
|
22781
|
+
yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(listBlobsFlatSegmentResponse.segment.blobItems)));
|
22782
|
+
}
|
22783
|
+
finally {
|
22784
|
+
_d = true;
|
22785
|
+
}
|
22750
22786
|
}
|
22751
22787
|
}
|
22752
22788
|
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
22753
22789
|
finally {
|
22754
22790
|
try {
|
22755
|
-
if (
|
22791
|
+
if (!_d && !_a && (_b = _e.return)) yield tslib.__await(_b.call(_e));
|
22756
22792
|
}
|
22757
22793
|
finally { if (e_1) throw e_1.error; }
|
22758
22794
|
}
|
@@ -22920,26 +22956,33 @@ class ContainerClient extends StorageClient {
|
|
22920
22956
|
*/
|
22921
22957
|
listItemsByHierarchy(delimiter, options = {}) {
|
22922
22958
|
return tslib.__asyncGenerator(this, arguments, function* listItemsByHierarchy_1() {
|
22923
|
-
var e_2,
|
22959
|
+
var _a, e_2, _b, _c;
|
22924
22960
|
let marker;
|
22925
22961
|
try {
|
22926
|
-
for (var
|
22927
|
-
|
22928
|
-
|
22929
|
-
|
22930
|
-
|
22931
|
-
|
22962
|
+
for (var _d = true, _e = tslib.__asyncValues(this.listHierarchySegments(delimiter, marker, options)), _f; _f = yield tslib.__await(_e.next()), _a = _f.done, !_a;) {
|
22963
|
+
_c = _f.value;
|
22964
|
+
_d = false;
|
22965
|
+
try {
|
22966
|
+
const listBlobsHierarchySegmentResponse = _c;
|
22967
|
+
const segment = listBlobsHierarchySegmentResponse.segment;
|
22968
|
+
if (segment.blobPrefixes) {
|
22969
|
+
for (const prefix of segment.blobPrefixes) {
|
22970
|
+
yield yield tslib.__await(Object.assign({ kind: "prefix" }, prefix));
|
22971
|
+
}
|
22972
|
+
}
|
22973
|
+
for (const blob of segment.blobItems) {
|
22974
|
+
yield yield tslib.__await(Object.assign({ kind: "blob" }, blob));
|
22932
22975
|
}
|
22933
22976
|
}
|
22934
|
-
|
22935
|
-
|
22977
|
+
finally {
|
22978
|
+
_d = true;
|
22936
22979
|
}
|
22937
22980
|
}
|
22938
22981
|
}
|
22939
22982
|
catch (e_2_1) { e_2 = { error: e_2_1 }; }
|
22940
22983
|
finally {
|
22941
22984
|
try {
|
22942
|
-
if (
|
22985
|
+
if (!_d && !_a && (_b = _e.return)) yield tslib.__await(_b.call(_e));
|
22943
22986
|
}
|
22944
22987
|
finally { if (e_2) throw e_2.error; }
|
22945
22988
|
}
|
@@ -23162,18 +23205,25 @@ class ContainerClient extends StorageClient {
|
|
23162
23205
|
*/
|
23163
23206
|
findBlobsByTagsItems(tagFilterSqlExpression, options = {}) {
|
23164
23207
|
return tslib.__asyncGenerator(this, arguments, function* findBlobsByTagsItems_1() {
|
23165
|
-
var e_3,
|
23208
|
+
var _a, e_3, _b, _c;
|
23166
23209
|
let marker;
|
23167
23210
|
try {
|
23168
|
-
for (var
|
23169
|
-
|
23170
|
-
|
23211
|
+
for (var _d = true, _e = tslib.__asyncValues(this.findBlobsByTagsSegments(tagFilterSqlExpression, marker, options)), _f; _f = yield tslib.__await(_e.next()), _a = _f.done, !_a;) {
|
23212
|
+
_c = _f.value;
|
23213
|
+
_d = false;
|
23214
|
+
try {
|
23215
|
+
const segment = _c;
|
23216
|
+
yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(segment.blobs)));
|
23217
|
+
}
|
23218
|
+
finally {
|
23219
|
+
_d = true;
|
23220
|
+
}
|
23171
23221
|
}
|
23172
23222
|
}
|
23173
23223
|
catch (e_3_1) { e_3 = { error: e_3_1 }; }
|
23174
23224
|
finally {
|
23175
23225
|
try {
|
23176
|
-
if (
|
23226
|
+
if (!_d && !_a && (_b = _e.return)) yield tslib.__await(_b.call(_e));
|
23177
23227
|
}
|
23178
23228
|
finally { if (e_3) throw e_3.error; }
|
23179
23229
|
}
|
@@ -23819,26 +23869,6 @@ function generateAccountSASQueryParameters(accountSASSignatureValues, sharedKeyC
|
|
23819
23869
|
* to manipulate blob containers.
|
23820
23870
|
*/
|
23821
23871
|
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
23872
|
/**
|
23843
23873
|
*
|
23844
23874
|
* Creates an instance of BlobServiceClient from connection string.
|
@@ -23878,6 +23908,26 @@ class BlobServiceClient extends StorageClient {
|
|
23878
23908
|
throw new Error("Connection string must be either an Account connection string or a SAS connection string");
|
23879
23909
|
}
|
23880
23910
|
}
|
23911
|
+
constructor(url, credentialOrPipeline,
|
23912
|
+
// Legacy, no fix for eslint error without breaking. Disable it for this interface.
|
23913
|
+
/* eslint-disable-next-line @azure/azure-sdk/ts-naming-options*/
|
23914
|
+
options) {
|
23915
|
+
let pipeline;
|
23916
|
+
if (isPipelineLike(credentialOrPipeline)) {
|
23917
|
+
pipeline = credentialOrPipeline;
|
23918
|
+
}
|
23919
|
+
else if ((coreUtil.isNode && credentialOrPipeline instanceof StorageSharedKeyCredential) ||
|
23920
|
+
credentialOrPipeline instanceof AnonymousCredential ||
|
23921
|
+
coreAuth.isTokenCredential(credentialOrPipeline)) {
|
23922
|
+
pipeline = newPipeline(credentialOrPipeline, options);
|
23923
|
+
}
|
23924
|
+
else {
|
23925
|
+
// The second parameter is undefined. Use anonymous credential
|
23926
|
+
pipeline = newPipeline(new AnonymousCredential(), options);
|
23927
|
+
}
|
23928
|
+
super(url, pipeline);
|
23929
|
+
this.serviceContext = this.storageClientContext.service;
|
23930
|
+
}
|
23881
23931
|
/**
|
23882
23932
|
* Creates a {@link ContainerClient} object
|
23883
23933
|
*
|
@@ -24129,18 +24179,25 @@ class BlobServiceClient extends StorageClient {
|
|
24129
24179
|
*/
|
24130
24180
|
findBlobsByTagsItems(tagFilterSqlExpression, options = {}) {
|
24131
24181
|
return tslib.__asyncGenerator(this, arguments, function* findBlobsByTagsItems_1() {
|
24132
|
-
var e_1,
|
24182
|
+
var _a, e_1, _b, _c;
|
24133
24183
|
let marker;
|
24134
24184
|
try {
|
24135
|
-
for (var
|
24136
|
-
|
24137
|
-
|
24185
|
+
for (var _d = true, _e = tslib.__asyncValues(this.findBlobsByTagsSegments(tagFilterSqlExpression, marker, options)), _f; _f = yield tslib.__await(_e.next()), _a = _f.done, !_a;) {
|
24186
|
+
_c = _f.value;
|
24187
|
+
_d = false;
|
24188
|
+
try {
|
24189
|
+
const segment = _c;
|
24190
|
+
yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(segment.blobs)));
|
24191
|
+
}
|
24192
|
+
finally {
|
24193
|
+
_d = true;
|
24194
|
+
}
|
24138
24195
|
}
|
24139
24196
|
}
|
24140
24197
|
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
24141
24198
|
finally {
|
24142
24199
|
try {
|
24143
|
-
if (
|
24200
|
+
if (!_d && !_a && (_b = _e.return)) yield tslib.__await(_b.call(_e));
|
24144
24201
|
}
|
24145
24202
|
finally { if (e_1) throw e_1.error; }
|
24146
24203
|
}
|
@@ -24283,18 +24340,25 @@ class BlobServiceClient extends StorageClient {
|
|
24283
24340
|
*/
|
24284
24341
|
listItems(options = {}) {
|
24285
24342
|
return tslib.__asyncGenerator(this, arguments, function* listItems_1() {
|
24286
|
-
var e_2,
|
24343
|
+
var _a, e_2, _b, _c;
|
24287
24344
|
let marker;
|
24288
24345
|
try {
|
24289
|
-
for (var
|
24290
|
-
|
24291
|
-
|
24346
|
+
for (var _d = true, _e = tslib.__asyncValues(this.listSegments(marker, options)), _f; _f = yield tslib.__await(_e.next()), _a = _f.done, !_a;) {
|
24347
|
+
_c = _f.value;
|
24348
|
+
_d = false;
|
24349
|
+
try {
|
24350
|
+
const segment = _c;
|
24351
|
+
yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(segment.containerItems)));
|
24352
|
+
}
|
24353
|
+
finally {
|
24354
|
+
_d = true;
|
24355
|
+
}
|
24292
24356
|
}
|
24293
24357
|
}
|
24294
24358
|
catch (e_2_1) { e_2 = { error: e_2_1 }; }
|
24295
24359
|
finally {
|
24296
24360
|
try {
|
24297
|
-
if (
|
24361
|
+
if (!_d && !_a && (_b = _e.return)) yield tslib.__await(_b.call(_e));
|
24298
24362
|
}
|
24299
24363
|
finally { if (e_2) throw e_2.error; }
|
24300
24364
|
}
|
@@ -24484,6 +24548,14 @@ class BlobServiceClient extends StorageClient {
|
|
24484
24548
|
}
|
24485
24549
|
}
|
24486
24550
|
|
24551
|
+
// Copyright (c) Microsoft Corporation.
|
24552
|
+
// Licensed under the MIT license.
|
24553
|
+
/** Known values of {@link EncryptionAlgorithmType} that the service accepts. */
|
24554
|
+
exports.KnownEncryptionAlgorithmType = void 0;
|
24555
|
+
(function (KnownEncryptionAlgorithmType) {
|
24556
|
+
KnownEncryptionAlgorithmType["AES256"] = "AES256";
|
24557
|
+
})(exports.KnownEncryptionAlgorithmType || (exports.KnownEncryptionAlgorithmType = {}));
|
24558
|
+
|
24487
24559
|
Object.defineProperty(exports, 'RestError', {
|
24488
24560
|
enumerable: true,
|
24489
24561
|
get: function () { return coreRestPipeline.RestError; }
|