@azure/storage-file-datalake 12.11.0-beta.1 → 12.11.0

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/README.md CHANGED
@@ -22,7 +22,7 @@ key links:
22
22
 
23
23
  ### Currently supported environments
24
24
 
25
- - [LTS versions of Node.js](https://nodejs.org/about/releases/)
25
+ - [LTS versions of Node.js](https://github.com/nodejs/release#release-schedule)
26
26
  - Latest versions of Safari, Chrome, Edge, and Firefox.
27
27
 
28
28
  See our [support policy](https://github.com/Azure/azure-sdk-for-js/blob/main/SUPPORT.md) for more details.
package/dist/index.js CHANGED
@@ -123,7 +123,7 @@ class AnonymousCredential extends Credential {
123
123
 
124
124
  // Copyright (c) Microsoft Corporation.
125
125
  // Licensed under the MIT license.
126
- const SDK_VERSION = "12.11.0-beta.1";
126
+ const SDK_VERSION = "12.11.0";
127
127
  const SERVICE_VERSION = "2021-10-04";
128
128
  const KB = 1024;
129
129
  const MB = KB * 1024;
@@ -790,6 +790,16 @@ function ensureCpkIfSpecified(cpk, isHttps) {
790
790
  cpk.encryptionAlgorithm = EncryptionAlgorithmAES25;
791
791
  }
792
792
  }
793
+ /**
794
+ * Escape the file or directory name but keep path separator ('/').
795
+ */
796
+ function EscapePath(pathName) {
797
+ const split = pathName.split("/");
798
+ for (let i = 0; i < split.length; i++) {
799
+ split[i] = encodeURIComponent(split[i]);
800
+ }
801
+ return split.join("/");
802
+ }
793
803
 
794
804
  /**
795
805
  * StorageSharedKeyCredentialPolicy is a policy used to sign HTTP request with a shared key.
@@ -5797,7 +5807,7 @@ function attachCredential(thing, credential) {
5797
5807
  * Changes may cause incorrect behavior and will be lost if the code is regenerated.
5798
5808
  */
5799
5809
  const packageName = "azure-storage-datalake";
5800
- const packageVersion = "12.11.0-beta.1";
5810
+ const packageVersion = "12.11.0";
5801
5811
  class StorageClientContext extends coreHttp__namespace.ServiceClient {
5802
5812
  /**
5803
5813
  * Initializes a new instance of the StorageClientContext class.
@@ -9433,7 +9443,7 @@ class DataLakeFileSystemClient extends StorageClient {
9433
9443
  // Legacy, no way to fix the eslint error without breaking. Disable the rule for this line.
9434
9444
  /* eslint-disable-next-line @azure/azure-sdk/ts-naming-subclients */
9435
9445
  getDirectoryClient(directoryName) {
9436
- return new DataLakeDirectoryClient(appendToURLPath(this.url, encodeURIComponent(directoryName)), this.pipeline);
9446
+ return new DataLakeDirectoryClient(appendToURLPath(this.url, EscapePath(directoryName)), this.pipeline);
9437
9447
  }
9438
9448
  /**
9439
9449
  * Creates a {@link DataLakeFileClient} object under current file system.
@@ -9443,7 +9453,7 @@ class DataLakeFileSystemClient extends StorageClient {
9443
9453
  // Legacy, no way to fix the eslint error without breaking. Disable the rule for this line.
9444
9454
  /* eslint-disable-next-line @azure/azure-sdk/ts-naming-subclients */
9445
9455
  getFileClient(fileName) {
9446
- return new DataLakeFileClient(appendToURLPath(this.url, encodeURIComponent(fileName)), this.pipeline);
9456
+ return new DataLakeFileClient(appendToURLPath(this.url, EscapePath(fileName)), this.pipeline);
9447
9457
  }
9448
9458
  /**
9449
9459
  * Get a {@link DataLakeLeaseClient} that manages leases on the file system.
@@ -9997,7 +10007,7 @@ class DataLakeFileSystemClient extends StorageClient {
9997
10007
  async undeletePath(deletedPath, deletionId, options = {}) {
9998
10008
  const { span, updatedOptions } = createSpan("DataLakeFileSystemClient-undeletePath", options);
9999
10009
  try {
10000
- const pathClient = new PathClientInternal(appendToURLPath(this.blobEndpointUrl, encodeURIComponent(deletedPath)), this.pipeline);
10010
+ const pathClient = new PathClientInternal(appendToURLPath(this.blobEndpointUrl, EscapePath(deletedPath)), this.pipeline);
10001
10011
  const rawResponse = await pathClient.blobPathContext.undelete(Object.assign(Object.assign({ undeleteSource: "?" + DeletionIdKey + "=" + deletionId }, options), { tracingOptions: updatedOptions.tracingOptions }));
10002
10012
  if (rawResponse.resourceType === PathResultTypeConstants.DirectoryResourceType) {
10003
10013
  return Object.assign({ pathClient: this.getDirectoryClient(deletedPath) }, rawResponse);