@azure/storage-queue 12.12.0-alpha.20230328.3 → 12.12.0-alpha.20230518.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 +53 -46
- package/dist/index.js.map +1 -1
- package/dist-esm/src/QueueClient.js +6 -6
- package/dist-esm/src/QueueClient.js.map +1 -1
- package/dist-esm/src/QueueServiceClient.js +33 -26
- package/dist-esm/src/QueueServiceClient.js.map +1 -1
- package/dist-esm/src/SASQueryParameters.js +14 -14
- package/dist-esm/src/SASQueryParameters.js.map +1 -1
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -794,6 +794,20 @@ exports.SASProtocol = void 0;
|
|
|
794
794
|
* NOTE: Instances of this class are immutable.
|
|
795
795
|
*/
|
|
796
796
|
class SASQueryParameters {
|
|
797
|
+
/**
|
|
798
|
+
* Optional. IP range allowed for this SAS.
|
|
799
|
+
*
|
|
800
|
+
* @readonly
|
|
801
|
+
*/
|
|
802
|
+
get ipRange() {
|
|
803
|
+
if (this.ipRangeInner) {
|
|
804
|
+
return {
|
|
805
|
+
end: this.ipRangeInner.end,
|
|
806
|
+
start: this.ipRangeInner.start,
|
|
807
|
+
};
|
|
808
|
+
}
|
|
809
|
+
return undefined;
|
|
810
|
+
}
|
|
797
811
|
/**
|
|
798
812
|
* Creates an instance of SASQueryParameters.
|
|
799
813
|
*
|
|
@@ -822,20 +836,6 @@ class SASQueryParameters {
|
|
|
822
836
|
this.resource = resource;
|
|
823
837
|
this.signature = signature;
|
|
824
838
|
}
|
|
825
|
-
/**
|
|
826
|
-
* Optional. IP range allowed for this SAS.
|
|
827
|
-
*
|
|
828
|
-
* @readonly
|
|
829
|
-
*/
|
|
830
|
-
get ipRange() {
|
|
831
|
-
if (this.ipRangeInner) {
|
|
832
|
-
return {
|
|
833
|
-
end: this.ipRangeInner.end,
|
|
834
|
-
start: this.ipRangeInner.start,
|
|
835
|
-
};
|
|
836
|
-
}
|
|
837
|
-
return undefined;
|
|
838
|
-
}
|
|
839
839
|
/**
|
|
840
840
|
* Encodes all SAS query parameters into a string that can be appended to a URL.
|
|
841
841
|
*
|
|
@@ -4651,6 +4651,12 @@ function getCanonicalName(accountName, queueName) {
|
|
|
4651
4651
|
* A QueueClient represents a URL to an Azure Storage Queue's messages allowing you to manipulate its messages.
|
|
4652
4652
|
*/
|
|
4653
4653
|
class QueueClient extends StorageClient {
|
|
4654
|
+
/**
|
|
4655
|
+
* The name of the queue.
|
|
4656
|
+
*/
|
|
4657
|
+
get name() {
|
|
4658
|
+
return this._name;
|
|
4659
|
+
}
|
|
4654
4660
|
constructor(urlOrConnectionString, credentialOrPipelineOrQueueName,
|
|
4655
4661
|
// Legacy, no way to fix the eslint error without breaking. Disable the rule for this line.
|
|
4656
4662
|
/* eslint-disable-next-line @azure/azure-sdk/ts-naming-options */
|
|
@@ -4718,12 +4724,6 @@ class QueueClient extends StorageClient {
|
|
|
4718
4724
|
: appendToURLPath(partsOfUrl[0], "messages");
|
|
4719
4725
|
this.messagesContext = new Messages(getStorageClientContext(this._messagesUrl, this.pipeline));
|
|
4720
4726
|
}
|
|
4721
|
-
/**
|
|
4722
|
-
* The name of the queue.
|
|
4723
|
-
*/
|
|
4724
|
-
get name() {
|
|
4725
|
-
return this._name;
|
|
4726
|
-
}
|
|
4727
4727
|
getMessageIdContext(messageId) {
|
|
4728
4728
|
// Build the url with messageId
|
|
4729
4729
|
const partsOfUrl = this._messagesUrl.split("?");
|
|
@@ -5371,26 +5371,6 @@ class QueueClient extends StorageClient {
|
|
|
5371
5371
|
* to manipulate queues.
|
|
5372
5372
|
*/
|
|
5373
5373
|
class QueueServiceClient extends StorageClient {
|
|
5374
|
-
constructor(url, credentialOrPipeline,
|
|
5375
|
-
// Legacy, no way to fix the eslint error without breaking. Disable the rule for this line.
|
|
5376
|
-
/* eslint-disable-next-line @azure/azure-sdk/ts-naming-options */
|
|
5377
|
-
options) {
|
|
5378
|
-
let pipeline;
|
|
5379
|
-
if (credentialOrPipeline instanceof Pipeline) {
|
|
5380
|
-
pipeline = credentialOrPipeline;
|
|
5381
|
-
}
|
|
5382
|
-
else if ((coreHttp.isNode && credentialOrPipeline instanceof StorageSharedKeyCredential) ||
|
|
5383
|
-
credentialOrPipeline instanceof AnonymousCredential ||
|
|
5384
|
-
coreHttp.isTokenCredential(credentialOrPipeline)) {
|
|
5385
|
-
pipeline = newPipeline(credentialOrPipeline, options);
|
|
5386
|
-
}
|
|
5387
|
-
else {
|
|
5388
|
-
// The second paramter is undefined. Use anonymous credential.
|
|
5389
|
-
pipeline = newPipeline(new AnonymousCredential(), options);
|
|
5390
|
-
}
|
|
5391
|
-
super(url, pipeline);
|
|
5392
|
-
this.serviceContext = new Service(this.storageClientContext);
|
|
5393
|
-
}
|
|
5394
5374
|
/**
|
|
5395
5375
|
* Creates an instance of QueueServiceClient.
|
|
5396
5376
|
*
|
|
@@ -5430,6 +5410,26 @@ class QueueServiceClient extends StorageClient {
|
|
|
5430
5410
|
throw new Error("Connection string must be either an Account connection string or a SAS connection string");
|
|
5431
5411
|
}
|
|
5432
5412
|
}
|
|
5413
|
+
constructor(url, credentialOrPipeline,
|
|
5414
|
+
// Legacy, no way to fix the eslint error without breaking. Disable the rule for this line.
|
|
5415
|
+
/* eslint-disable-next-line @azure/azure-sdk/ts-naming-options */
|
|
5416
|
+
options) {
|
|
5417
|
+
let pipeline;
|
|
5418
|
+
if (credentialOrPipeline instanceof Pipeline) {
|
|
5419
|
+
pipeline = credentialOrPipeline;
|
|
5420
|
+
}
|
|
5421
|
+
else if ((coreHttp.isNode && credentialOrPipeline instanceof StorageSharedKeyCredential) ||
|
|
5422
|
+
credentialOrPipeline instanceof AnonymousCredential ||
|
|
5423
|
+
coreHttp.isTokenCredential(credentialOrPipeline)) {
|
|
5424
|
+
pipeline = newPipeline(credentialOrPipeline, options);
|
|
5425
|
+
}
|
|
5426
|
+
else {
|
|
5427
|
+
// The second paramter is undefined. Use anonymous credential.
|
|
5428
|
+
pipeline = newPipeline(new AnonymousCredential(), options);
|
|
5429
|
+
}
|
|
5430
|
+
super(url, pipeline);
|
|
5431
|
+
this.serviceContext = new Service(this.storageClientContext);
|
|
5432
|
+
}
|
|
5433
5433
|
/**
|
|
5434
5434
|
* Creates a {@link QueueClient} object.
|
|
5435
5435
|
*
|
|
@@ -5518,23 +5518,30 @@ class QueueServiceClient extends StorageClient {
|
|
|
5518
5518
|
*/
|
|
5519
5519
|
listItems(options = {}) {
|
|
5520
5520
|
return tslib.__asyncGenerator(this, arguments, function* listItems_1() {
|
|
5521
|
-
var e_1,
|
|
5521
|
+
var _a, e_1, _b, _c;
|
|
5522
5522
|
if (options.prefix === "") {
|
|
5523
5523
|
options.prefix = undefined;
|
|
5524
5524
|
}
|
|
5525
5525
|
let marker;
|
|
5526
5526
|
try {
|
|
5527
|
-
for (var
|
|
5528
|
-
|
|
5529
|
-
|
|
5530
|
-
|
|
5527
|
+
for (var _d = true, _e = tslib.__asyncValues(this.listSegments(marker, options)), _f; _f = yield tslib.__await(_e.next()), _a = _f.done, !_a;) {
|
|
5528
|
+
_c = _f.value;
|
|
5529
|
+
_d = false;
|
|
5530
|
+
try {
|
|
5531
|
+
const segment = _c;
|
|
5532
|
+
if (segment.queueItems) {
|
|
5533
|
+
yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(segment.queueItems)));
|
|
5534
|
+
}
|
|
5535
|
+
}
|
|
5536
|
+
finally {
|
|
5537
|
+
_d = true;
|
|
5531
5538
|
}
|
|
5532
5539
|
}
|
|
5533
5540
|
}
|
|
5534
5541
|
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
5535
5542
|
finally {
|
|
5536
5543
|
try {
|
|
5537
|
-
if (
|
|
5544
|
+
if (!_d && !_a && (_b = _e.return)) yield tslib.__await(_b.call(_e));
|
|
5538
5545
|
}
|
|
5539
5546
|
finally { if (e_1) throw e_1.error; }
|
|
5540
5547
|
}
|