@azure/storage-queue 12.10.1-alpha.20220718.1 → 12.10.1-alpha.20220907.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 CHANGED
@@ -411,6 +411,30 @@ const StorageQueueLoggingAllowedQueryParameters = [
411
411
  "popreceipt",
412
412
  "visibilitytimeout",
413
413
  ];
414
+ /// List of ports used for path style addressing.
415
+ /// Path style addressing means that storage account is put in URI's Path segment in instead of in host.
416
+ const PathStylePorts = [
417
+ "10000",
418
+ "10001",
419
+ "10002",
420
+ "10003",
421
+ "10004",
422
+ "10100",
423
+ "10101",
424
+ "10102",
425
+ "10103",
426
+ "10104",
427
+ "11000",
428
+ "11001",
429
+ "11002",
430
+ "11003",
431
+ "11004",
432
+ "11100",
433
+ "11101",
434
+ "11102",
435
+ "11103",
436
+ "11104",
437
+ ];
414
438
 
415
439
  /*
416
440
  * Copyright (c) Microsoft Corporation.
@@ -710,7 +734,8 @@ function isIpEndpointStyle(parsedUrl) {
710
734
  // Case 2: localhost(:port), use broad regex to match port part.
711
735
  // Case 3: Ipv4, use broad regex which just check if host contains Ipv4.
712
736
  // For valid host please refer to https://man7.org/linux/man-pages/man7/hostname.7.html.
713
- return /^.*:.*:.*$|^localhost(:[0-9]+)?$|^(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])(\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])){3}(:[0-9]+)?$/.test(host);
737
+ return (/^.*:.*:.*$|^localhost(:[0-9]+)?$|^(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])(\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])){3}(:[0-9]+)?$/.test(host) ||
738
+ (parsedUrl.getPort() !== undefined && PathStylePorts.includes(parsedUrl.getPort())));
714
739
  }
715
740
  /**
716
741
  * Gets a new StorageClientContext