@azure/storage-blob 12.20.0-alpha.20230720.6 → 12.20.0-alpha.20230823.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 CHANGED
@@ -93,7 +93,7 @@ class BaseRequestPolicy {
93
93
  // Copyright (c) Microsoft Corporation.
94
94
  // Licensed under the MIT license.
95
95
  const SDK_VERSION = "12.20.0";
96
- const SERVICE_VERSION = "2023-01-03";
96
+ const SERVICE_VERSION = "2023-08-03";
97
97
  const BLOCK_BLOB_MAX_UPLOAD_BLOB_BYTES = 256 * 1024 * 1024; // 256MB
98
98
  const BLOCK_BLOB_MAX_STAGE_BLOCK_BYTES = 4000 * 1024 * 1024; // 4000MB
99
99
  const BLOCK_BLOB_MAX_BLOCKS = 50000;
@@ -457,7 +457,11 @@ function extractConnectionStringParts(connectionString) {
457
457
  else {
458
458
  // SAS connection string
459
459
  let accountSas = getValueInConnString(connectionString, "SharedAccessSignature");
460
- const accountName = getAccountNameFromUrl(blobEndpoint);
460
+ let accountName = getValueInConnString(connectionString, "AccountName");
461
+ // if accountName is empty, try to read it from BlobEndpoint
462
+ if (!accountName) {
463
+ accountName = getAccountNameFromUrl(blobEndpoint);
464
+ }
461
465
  if (!blobEndpoint) {
462
466
  throw new Error("Invalid BlobEndpoint in the provided SAS Connection String");
463
467
  }
@@ -778,10 +782,10 @@ function getAccountNameFromUrl(url) {
778
782
  function isIpEndpointStyle(parsedUrl) {
779
783
  const host = parsedUrl.host;
780
784
  // Case 1: Ipv6, use a broad regex to find out candidates whose host contains two ':'.
781
- // Case 2: localhost(:port), use broad regex to match port part.
785
+ // Case 2: localhost(:port) or host.docker.internal, use broad regex to match port part.
782
786
  // Case 3: Ipv4, use broad regex which just check if host contains Ipv4.
783
787
  // For valid host please refer to https://man7.org/linux/man-pages/man7/hostname.7.html.
784
- 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) ||
788
+ return (/^.*:.*:.*$|^(localhost|host.docker.internal)(:[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) ||
785
789
  (Boolean(parsedUrl.port) && PathStylePorts.includes(parsedUrl.port)));
786
790
  }
787
791
  /**
@@ -3409,7 +3413,8 @@ const BlobPropertiesInternal = {
3409
3413
  name: "Enum",
3410
3414
  allowedValues: [
3411
3415
  "rehydrate-pending-to-hot",
3412
- "rehydrate-pending-to-cool"
3416
+ "rehydrate-pending-to-cool",
3417
+ "rehydrate-pending-to-cold"
3413
3418
  ]
3414
3419
  }
3415
3420
  },
@@ -10581,7 +10586,7 @@ const timeoutInSeconds = {
10581
10586
  const version = {
10582
10587
  parameterPath: "version",
10583
10588
  mapper: {
10584
- defaultValue: "2023-01-03",
10589
+ defaultValue: "2023-08-03",
10585
10590
  isConstant: true,
10586
10591
  serializedName: "x-ms-version",
10587
10592
  type: {
@@ -15185,7 +15190,7 @@ class StorageClient$1 extends coreHttpCompat__namespace.ExtendedServiceClient {
15185
15190
  // Parameter assignments
15186
15191
  this.url = url;
15187
15192
  // Assigning values to Constant parameters
15188
- this.version = options.version || "2023-01-03";
15193
+ this.version = options.version || "2023-08-03";
15189
15194
  this.service = new ServiceImpl(this);
15190
15195
  this.container = new ContainerImpl(this);
15191
15196
  this.blob = new BlobImpl(this);