@azure/storage-file-datalake 12.12.0-beta.1 → 12.12.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/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.12.0-beta.1";
126
+ const SDK_VERSION = "12.12.0";
127
127
  const SERVICE_VERSION = "2021-12-02";
128
128
  const KB = 1024;
129
129
  const MB = KB * 1024;
@@ -531,7 +531,8 @@ function appendToURLPath(url, name) {
531
531
  let path = urlParsed.getPath();
532
532
  path = path ? (path.endsWith("/") ? `${path}${name}` : `${path}/${name}`) : name;
533
533
  urlParsed.setPath(path);
534
- return urlParsed.toString();
534
+ const normalizedUrl = new URL(urlParsed.toString());
535
+ return normalizedUrl.toString();
535
536
  }
536
537
  /**
537
538
  * Append a string to URL query.
@@ -5838,7 +5839,7 @@ function attachCredential(thing, credential) {
5838
5839
  * Changes may cause incorrect behavior and will be lost if the code is regenerated.
5839
5840
  */
5840
5841
  const packageName = "azure-storage-datalake";
5841
- const packageVersion = "12.13.0-beta.1";
5842
+ const packageVersion = "12.12.0";
5842
5843
  class StorageClientContext extends coreHttp__namespace.ServiceClient {
5843
5844
  /**
5844
5845
  * Initializes a new instance of the StorageClientContext class.
@@ -8707,7 +8708,7 @@ class DataLakeDirectoryClient extends DataLakePathClient {
8707
8708
  * @param subdirectoryName - Subdirectory name.
8708
8709
  */
8709
8710
  getSubdirectoryClient(subdirectoryName) {
8710
- return new DataLakeDirectoryClient(appendToURLPath(this.url, encodeURIComponent(subdirectoryName)), this.pipeline);
8711
+ return new DataLakeDirectoryClient(appendToURLPath(this.url, EscapePath(subdirectoryName)), this.pipeline);
8711
8712
  }
8712
8713
  /**
8713
8714
  * Creates a {@link DataLakeFileClient} object under current directory.
@@ -8717,7 +8718,7 @@ class DataLakeDirectoryClient extends DataLakePathClient {
8717
8718
  // Legacy, no way to fix the eslint error without breaking. Disable the rule for this line.
8718
8719
  /* eslint-disable-next-line @azure/azure-sdk/ts-naming-subclients */
8719
8720
  getFileClient(fileName) {
8720
- return new DataLakeFileClient(appendToURLPath(this.url, encodeURIComponent(fileName)), this.pipeline);
8721
+ return new DataLakeFileClient(appendToURLPath(this.url, EscapePath(fileName)), this.pipeline);
8721
8722
  }
8722
8723
  /**
8723
8724
  * Only available for clients constructed with a shared key credential.
@@ -8912,7 +8913,7 @@ class DataLakeFileClient extends DataLakePathClient {
8912
8913
  contentMD5: options.transactionalContentMD5,
8913
8914
  }, abortSignal: options.abortSignal, position: offset, contentLength: length, leaseAccessConditions: options.conditions, requestOptions: {
8914
8915
  onUploadProgress: options.onProgress,
8915
- }, cpkInfo: options.customerProvidedKey, flush: options.flush, proposedLeaseId: options.proposedLeaseId, leaseDuration: options.leaseDuration, leaseAction: options.leaseAction }, convertTracingToRequestOptionsBase(updatedOptions)));
8916
+ }, cpkInfo: options.customerProvidedKey, flush: options.flush, proposedLeaseId: options.proposedLeaseId, leaseDuration: options.leaseDurationInSeconds, leaseAction: options.leaseAction }, convertTracingToRequestOptionsBase(updatedOptions)));
8916
8917
  }
8917
8918
  catch (e) {
8918
8919
  span.setStatus({
@@ -8942,7 +8943,7 @@ class DataLakeFileClient extends DataLakePathClient {
8942
8943
  const { span, updatedOptions } = createSpan("DataLakeFileClient-flush", options);
8943
8944
  try {
8944
8945
  ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps);
8945
- return await this.pathContextInternal.flushData(Object.assign(Object.assign(Object.assign({}, options), { position, contentLength: 0, leaseAccessConditions: options.conditions, modifiedAccessConditions: options.conditions, cpkInfo: options.customerProvidedKey, proposedLeaseId: options.proposedLeaseId, leaseDuration: options.leaseDuration, leaseAction: options.leaseAction }), convertTracingToRequestOptionsBase(updatedOptions)));
8946
+ return await this.pathContextInternal.flushData(Object.assign(Object.assign(Object.assign({}, options), { position, contentLength: 0, leaseAccessConditions: options.conditions, modifiedAccessConditions: options.conditions, cpkInfo: options.customerProvidedKey, proposedLeaseId: options.proposedLeaseId, leaseDuration: options.leaseDurationInSeconds, leaseAction: options.leaseAction }), convertTracingToRequestOptionsBase(updatedOptions)));
8946
8947
  }
8947
8948
  catch (e) {
8948
8949
  span.setStatus({