@azure/storage-blob 12.15.0-beta.1 → 12.16.0-beta.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
@@ -1336,7 +1336,8 @@ const BlobPropertiesInternal = {
1336
1336
  name: "Enum",
1337
1337
  allowedValues: [
1338
1338
  "rehydrate-pending-to-hot",
1339
- "rehydrate-pending-to-cool"
1339
+ "rehydrate-pending-to-cool",
1340
+ "rehydrate-pending-to-cold"
1340
1341
  ]
1341
1342
  }
1342
1343
  },
@@ -8506,7 +8507,7 @@ const timeoutInSeconds = {
8506
8507
  const version = {
8507
8508
  parameterPath: "version",
8508
8509
  mapper: {
8509
- defaultValue: "2023-01-03",
8510
+ defaultValue: "2023-08-03",
8510
8511
  isConstant: true,
8511
8512
  serializedName: "x-ms-version",
8512
8513
  type: {
@@ -13337,8 +13338,8 @@ const logger = logger$1.createClientLogger("storage-blob");
13337
13338
 
13338
13339
  // Copyright (c) Microsoft Corporation.
13339
13340
  // Licensed under the MIT license.
13340
- const SDK_VERSION = "12.15.0-beta.1";
13341
- const SERVICE_VERSION = "2023-01-03";
13341
+ const SDK_VERSION = "12.16.0-beta.1";
13342
+ const SERVICE_VERSION = "2023-08-03";
13342
13343
  const BLOCK_BLOB_MAX_UPLOAD_BLOB_BYTES = 256 * 1024 * 1024; // 256MB
13343
13344
  const BLOCK_BLOB_MAX_STAGE_BLOCK_BYTES = 4000 * 1024 * 1024; // 4000MB
13344
13345
  const BLOCK_BLOB_MAX_BLOCKS = 50000;
@@ -13702,7 +13703,11 @@ function extractConnectionStringParts(connectionString) {
13702
13703
  else {
13703
13704
  // SAS connection string
13704
13705
  const accountSas = getValueInConnString(connectionString, "SharedAccessSignature");
13705
- const accountName = getAccountNameFromUrl(blobEndpoint);
13706
+ let accountName = getValueInConnString(connectionString, "AccountName");
13707
+ // if accountName is empty, try to read it from BlobEndpoint
13708
+ if (!accountName) {
13709
+ accountName = getAccountNameFromUrl(blobEndpoint);
13710
+ }
13706
13711
  if (!blobEndpoint) {
13707
13712
  throw new Error("Invalid BlobEndpoint in the provided SAS Connection String");
13708
13713
  }
@@ -13996,10 +14001,10 @@ function isIpEndpointStyle(parsedUrl) {
13996
14001
  }
13997
14002
  const host = parsedUrl.getHost() + (parsedUrl.getPort() === undefined ? "" : ":" + parsedUrl.getPort());
13998
14003
  // Case 1: Ipv6, use a broad regex to find out candidates whose host contains two ':'.
13999
- // Case 2: localhost(:port), use broad regex to match port part.
14004
+ // Case 2: localhost(:port) or host.docker.internal, use broad regex to match port part.
14000
14005
  // Case 3: Ipv4, use broad regex which just check if host contains Ipv4.
14001
14006
  // For valid host please refer to https://man7.org/linux/man-pages/man7/hostname.7.html.
14002
- 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) ||
14007
+ 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) ||
14003
14008
  (parsedUrl.getPort() !== undefined && PathStylePorts.includes(parsedUrl.getPort())));
14004
14009
  }
14005
14010
  /**
@@ -14175,9 +14180,7 @@ function ConvertInternalResponseOfListBlobHierarchy(internalResponse) {
14175
14180
  var _a;
14176
14181
  return Object.assign(Object.assign({}, internalResponse), { segment: {
14177
14182
  blobPrefixes: (_a = internalResponse.segment.blobPrefixes) === null || _a === void 0 ? void 0 : _a.map((blobPrefixInternal) => {
14178
- const blobPrefix = {
14179
- name: BlobNameToString(blobPrefixInternal.name),
14180
- };
14183
+ const blobPrefix = Object.assign(Object.assign({}, blobPrefixInternal), { name: BlobNameToString(blobPrefixInternal.name) });
14181
14184
  return blobPrefix;
14182
14185
  }),
14183
14186
  blobItems: internalResponse.segment.blobItems.map((blobItemInteral) => {
@@ -15196,7 +15199,7 @@ class StorageSharedKeyCredential extends Credential {
15196
15199
  * Changes may cause incorrect behavior and will be lost if the code is regenerated.
15197
15200
  */
15198
15201
  const packageName = "azure-storage-blob";
15199
- const packageVersion = "12.15.0-beta.1";
15202
+ const packageVersion = "12.16.0-beta.1";
15200
15203
  class StorageClientContext extends coreHttp__namespace.ServiceClient {
15201
15204
  /**
15202
15205
  * Initializes a new instance of the StorageClientContext class.
@@ -15222,7 +15225,7 @@ class StorageClientContext extends coreHttp__namespace.ServiceClient {
15222
15225
  // Parameter assignments
15223
15226
  this.url = url;
15224
15227
  // Assigning values to Constant parameters
15225
- this.version = options.version || "2023-01-03";
15228
+ this.version = options.version || "2023-08-03";
15226
15229
  }
15227
15230
  }
15228
15231
 
@@ -23160,9 +23163,7 @@ class ContainerClient extends StorageClient {
23160
23163
  const blobItem = Object.assign(Object.assign({}, blobItemInteral), { name: BlobNameToString(blobItemInteral.name), tags: toTags(blobItemInteral.blobTags), objectReplicationSourceProperties: parseObjectReplicationRecord(blobItemInteral.objectReplicationMetadata) });
23161
23164
  return blobItem;
23162
23165
  }), blobPrefixes: (_a = response.segment.blobPrefixes) === null || _a === void 0 ? void 0 : _a.map((blobPrefixInternal) => {
23163
- const blobPrefix = {
23164
- name: BlobNameToString(blobPrefixInternal.name),
23165
- };
23166
+ const blobPrefix = Object.assign(Object.assign({}, blobPrefixInternal), { name: BlobNameToString(blobPrefixInternal.name) });
23166
23167
  return blobPrefix;
23167
23168
  }) }) });
23168
23169
  return wrappedResponse;