@azure/storage-blob 12.12.0-alpha.20220922.1 → 12.12.0-alpha.20221013.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
@@ -14505,6 +14505,16 @@ function* ExtractPageRangeInfoItems(getPageRangesSegment) {
14505
14505
  };
14506
14506
  }
14507
14507
  }
14508
+ /**
14509
+ * Escape the blobName but keep path separator ('/').
14510
+ */
14511
+ function EscapePath(blobName) {
14512
+ const split = blobName.split("/");
14513
+ for (let i = 0; i < split.length; i++) {
14514
+ split[i] = encodeURIComponent(split[i]);
14515
+ }
14516
+ return split.join("/");
14517
+ }
14508
14518
 
14509
14519
  // Copyright (c) Microsoft Corporation.
14510
14520
  /**
@@ -23003,7 +23013,7 @@ class ContainerClient extends StorageClient {
23003
23013
  * @returns A new BlobClient object for the given blob name.
23004
23014
  */
23005
23015
  getBlobClient(blobName) {
23006
- return new BlobClient(appendToURLPath(this.url, this.escapePath(blobName)), this.pipeline);
23016
+ return new BlobClient(appendToURLPath(this.url, EscapePath(blobName)), this.pipeline);
23007
23017
  }
23008
23018
  /**
23009
23019
  * Creates an {@link AppendBlobClient}
@@ -23011,7 +23021,7 @@ class ContainerClient extends StorageClient {
23011
23021
  * @param blobName - An append blob name
23012
23022
  */
23013
23023
  getAppendBlobClient(blobName) {
23014
- return new AppendBlobClient(appendToURLPath(this.url, this.escapePath(blobName)), this.pipeline);
23024
+ return new AppendBlobClient(appendToURLPath(this.url, EscapePath(blobName)), this.pipeline);
23015
23025
  }
23016
23026
  /**
23017
23027
  * Creates a {@link BlockBlobClient}
@@ -23029,7 +23039,7 @@ class ContainerClient extends StorageClient {
23029
23039
  * ```
23030
23040
  */
23031
23041
  getBlockBlobClient(blobName) {
23032
- return new BlockBlobClient(appendToURLPath(this.url, this.escapePath(blobName)), this.pipeline);
23042
+ return new BlockBlobClient(appendToURLPath(this.url, EscapePath(blobName)), this.pipeline);
23033
23043
  }
23034
23044
  /**
23035
23045
  * Creates a {@link PageBlobClient}
@@ -23037,17 +23047,7 @@ class ContainerClient extends StorageClient {
23037
23047
  * @param blobName - A page blob name
23038
23048
  */
23039
23049
  getPageBlobClient(blobName) {
23040
- return new PageBlobClient(appendToURLPath(this.url, this.escapePath(blobName)), this.pipeline);
23041
- }
23042
- /**
23043
- * Escape the blobName but keep path separator ('/'). Exactly like in the dotnet SDK client.
23044
- */
23045
- escapePath(blobName) {
23046
- const split = blobName.split("/");
23047
- for (let i = 0; i < split.length; i++) {
23048
- split[i] = encodeURIComponent(split[i]);
23049
- }
23050
- return split.join("/");
23050
+ return new PageBlobClient(appendToURLPath(this.url, EscapePath(blobName)), this.pipeline);
23051
23051
  }
23052
23052
  /**
23053
23053
  * Returns all user-defined metadata and system properties for the specified