@azure/storage-file-datalake 12.25.0-beta.1 → 12.26.0-alpha.20250319.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/LICENSE +3 -3
- package/README.md +25 -30
- package/dist/index.js +63 -72
- package/dist/index.js.map +1 -1
- package/dist-esm/storage-blob/src/StorageBrowserPolicyFactory.js.map +1 -1
- package/dist-esm/storage-blob/src/StorageRetryPolicyFactory.js.map +1 -1
- package/dist-esm/storage-blob/src/policies/AnonymousCredentialPolicy.js.map +1 -1
- package/dist-esm/storage-blob/src/policies/CredentialPolicy.js.map +1 -1
- package/dist-esm/storage-blob/src/policies/RequestPolicy.js.map +1 -1
- package/dist-esm/storage-blob/src/policies/StorageBrowserPolicy.js.map +1 -1
- package/dist-esm/storage-blob/src/policies/StorageBrowserPolicyV2.js.map +1 -1
- package/dist-esm/storage-blob/src/policies/StorageCorrectContentLengthPolicy.browser.js.map +1 -1
- package/dist-esm/storage-blob/src/policies/StorageCorrectContentLengthPolicy.js.map +1 -1
- package/dist-esm/storage-blob/src/policies/StorageRetryPolicy.js.map +1 -1
- package/dist-esm/storage-blob/src/policies/StorageRetryPolicyV2.js +1 -1
- package/dist-esm/storage-blob/src/policies/StorageRetryPolicyV2.js.map +1 -1
- package/dist-esm/storage-blob/src/policies/StorageSharedKeyCredentialPolicy.js +2 -2
- package/dist-esm/storage-blob/src/policies/StorageSharedKeyCredentialPolicy.js.map +1 -1
- package/dist-esm/storage-blob/src/policies/StorageSharedKeyCredentialPolicyV2.browser.js.map +1 -1
- package/dist-esm/storage-blob/src/policies/StorageSharedKeyCredentialPolicyV2.js +2 -2
- package/dist-esm/storage-blob/src/policies/StorageSharedKeyCredentialPolicyV2.js.map +1 -1
- package/dist-esm/storage-blob/src/utils/BlobQuickQueryStream.js.map +1 -1
- package/dist-esm/storage-blob/src/utils/RetriableReadableStream.js.map +1 -1
- package/dist-esm/storage-blob/src/utils/cache.js.map +1 -1
- package/dist-esm/storage-blob/src/utils/constants.js +2 -2
- package/dist-esm/storage-blob/src/utils/constants.js.map +1 -1
- package/dist-esm/storage-blob/src/utils/utils.common.js +3 -3
- package/dist-esm/storage-blob/src/utils/utils.common.js.map +1 -1
- package/dist-esm/storage-blob/src/utils/utils.node.js +1 -1
- package/dist-esm/storage-blob/src/utils/utils.node.js.map +1 -1
- package/dist-esm/storage-file-datalake/src/DataLakeFileSystemClient.js +15 -16
- package/dist-esm/storage-file-datalake/src/DataLakeFileSystemClient.js.map +1 -1
- package/dist-esm/storage-file-datalake/src/DataLakeLeaseClient.js.map +1 -1
- package/dist-esm/storage-file-datalake/src/DataLakeServiceClient.js +7 -8
- package/dist-esm/storage-file-datalake/src/DataLakeServiceClient.js.map +1 -1
- package/dist-esm/storage-file-datalake/src/Pipeline.js.map +1 -1
- package/dist-esm/storage-file-datalake/src/StorageClient.js.map +1 -1
- package/dist-esm/storage-file-datalake/src/StorageContextClient.js.map +1 -1
- package/dist-esm/storage-file-datalake/src/clients.js +25 -29
- package/dist-esm/storage-file-datalake/src/clients.js.map +1 -1
- package/dist-esm/storage-file-datalake/src/credentials/UserDelegationKeyCredential.js +1 -1
- package/dist-esm/storage-file-datalake/src/credentials/UserDelegationKeyCredential.js.map +1 -1
- package/dist-esm/storage-file-datalake/src/generated/src/models/parameters.js +1 -1
- package/dist-esm/storage-file-datalake/src/generated/src/models/parameters.js.map +1 -1
- package/dist-esm/storage-file-datalake/src/generated/src/storageClient.js +2 -2
- package/dist-esm/storage-file-datalake/src/generated/src/storageClient.js.map +1 -1
- package/dist-esm/storage-file-datalake/src/models.js.map +1 -1
- package/dist-esm/storage-file-datalake/src/sas/AccountSASPermissions.js +2 -2
- package/dist-esm/storage-file-datalake/src/sas/AccountSASPermissions.js.map +1 -1
- package/dist-esm/storage-file-datalake/src/sas/AccountSASResourceTypes.js +1 -1
- package/dist-esm/storage-file-datalake/src/sas/AccountSASResourceTypes.js.map +1 -1
- package/dist-esm/storage-file-datalake/src/sas/AccountSASSignatureValues.js +1 -1
- package/dist-esm/storage-file-datalake/src/sas/AccountSASSignatureValues.js.map +1 -1
- package/dist-esm/storage-file-datalake/src/sas/DataLakeSASSignatureValues.js +1 -1
- package/dist-esm/storage-file-datalake/src/sas/DataLakeSASSignatureValues.js.map +1 -1
- package/dist-esm/storage-file-datalake/src/sas/DirectorySASPermissions.js +1 -1
- package/dist-esm/storage-file-datalake/src/sas/DirectorySASPermissions.js.map +1 -1
- package/dist-esm/storage-file-datalake/src/sas/FileSystemSASPermissions.js +1 -1
- package/dist-esm/storage-file-datalake/src/sas/FileSystemSASPermissions.js.map +1 -1
- package/dist-esm/storage-file-datalake/src/sas/SASQueryParameters.js.map +1 -1
- package/dist-esm/storage-file-datalake/src/transforms.js.map +1 -1
- package/dist-esm/storage-file-datalake/src/utils/BufferScheduler.js.map +1 -1
- package/dist-esm/storage-file-datalake/src/utils/DataLakeAclChangeFailedError.js.map +1 -1
- package/dist-esm/storage-file-datalake/src/utils/PathClientInternal.js.map +1 -1
- package/dist-esm/storage-file-datalake/src/utils/constants.js +2 -2
- package/dist-esm/storage-file-datalake/src/utils/constants.js.map +1 -1
- package/dist-esm/storage-file-datalake/src/utils/utils.common.js +3 -5
- package/dist-esm/storage-file-datalake/src/utils/utils.common.js.map +1 -1
- package/package.json +13 -17
- package/types/latest/storage-file-datalake.d.ts +88 -88
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
// Copyright (c) Microsoft Corporation.
|
|
2
|
-
// Licensed under the MIT License.
|
|
3
1
|
import { isTokenCredential } from "@azure/core-auth";
|
|
4
2
|
import { isNode } from "@azure/core-util";
|
|
5
3
|
import { isPipelineLike, newPipeline } from "./Pipeline";
|
|
@@ -152,7 +150,7 @@ export class DataLakePathClient extends StorageClient {
|
|
|
152
150
|
/**
|
|
153
151
|
* Create a directory or path.
|
|
154
152
|
*
|
|
155
|
-
* @see https://
|
|
153
|
+
* @see https://learn.microsoft.com/en-us/rest/api/storageservices/datalakestoragegen2/path/create
|
|
156
154
|
*
|
|
157
155
|
* @param resourceType - Resource type, "directory" or "file".
|
|
158
156
|
* @param options - Optional. Options when creating path.
|
|
@@ -181,7 +179,7 @@ export class DataLakePathClient extends StorageClient {
|
|
|
181
179
|
/**
|
|
182
180
|
* Create a directory or file. If the resource already exists, it is not changed.
|
|
183
181
|
*
|
|
184
|
-
* @see https://
|
|
182
|
+
* @see https://learn.microsoft.com/en-us/rest/api/storageservices/datalakestoragegen2/path/create
|
|
185
183
|
*
|
|
186
184
|
* @param resourceType - Resource type, "directory" or "file".
|
|
187
185
|
* @param options -
|
|
@@ -219,7 +217,7 @@ export class DataLakePathClient extends StorageClient {
|
|
|
219
217
|
/**
|
|
220
218
|
* Delete current path (directory or file).
|
|
221
219
|
*
|
|
222
|
-
* @see https://
|
|
220
|
+
* @see https://learn.microsoft.com/en-us/rest/api/storageservices/datalakestoragegen2/path/delete
|
|
223
221
|
*
|
|
224
222
|
* @param recursive - Required and valid only when the resource is a directory. If "true", all paths beneath the directory will be deleted.
|
|
225
223
|
* @param options - Optional. Options when deleting path.
|
|
@@ -253,7 +251,7 @@ export class DataLakePathClient extends StorageClient {
|
|
|
253
251
|
/**
|
|
254
252
|
* Delete current path (directory or file) if it exists.
|
|
255
253
|
*
|
|
256
|
-
* @see https://
|
|
254
|
+
* @see https://learn.microsoft.com/en-us/rest/api/storageservices/datalakestoragegen2/path/delete
|
|
257
255
|
*
|
|
258
256
|
* @param recursive - Required and valid only when the resource is a directory. If "true", all paths beneath the directory will be deleted.
|
|
259
257
|
* @param options -
|
|
@@ -277,7 +275,7 @@ export class DataLakePathClient extends StorageClient {
|
|
|
277
275
|
/**
|
|
278
276
|
* Returns the access control data for a path (directory of file).
|
|
279
277
|
*
|
|
280
|
-
* @see https://
|
|
278
|
+
* @see https://learn.microsoft.com/en-us/rest/api/storageservices/datalakestoragegen2/path/getproperties
|
|
281
279
|
*
|
|
282
280
|
* @param options - Optional. Options when getting file access control.
|
|
283
281
|
*/
|
|
@@ -291,7 +289,7 @@ export class DataLakePathClient extends StorageClient {
|
|
|
291
289
|
/**
|
|
292
290
|
* Set the access control data for a path (directory of file).
|
|
293
291
|
*
|
|
294
|
-
* @see https://
|
|
292
|
+
* @see https://learn.microsoft.com/en-us/rest/api/storageservices/datalakestoragegen2/path/update
|
|
295
293
|
*
|
|
296
294
|
* @param acl - The POSIX access control list for the file or directory.
|
|
297
295
|
* @param options - Optional. Options when setting path access control.
|
|
@@ -305,7 +303,7 @@ export class DataLakePathClient extends StorageClient {
|
|
|
305
303
|
/**
|
|
306
304
|
* Sets the Access Control on a path and sub paths.
|
|
307
305
|
*
|
|
308
|
-
* @see https://
|
|
306
|
+
* @see https://learn.microsoft.com/en-us/rest/api/storageservices/datalakestoragegen2/path/update
|
|
309
307
|
*
|
|
310
308
|
* @param acl - The POSIX access control list for the file or directory.
|
|
311
309
|
* @param options - Optional. Options
|
|
@@ -318,7 +316,7 @@ export class DataLakePathClient extends StorageClient {
|
|
|
318
316
|
/**
|
|
319
317
|
* Modifies the Access Control on a path and sub paths.
|
|
320
318
|
*
|
|
321
|
-
* @see https://
|
|
319
|
+
* @see https://learn.microsoft.com/en-us/rest/api/storageservices/datalakestoragegen2/path/update
|
|
322
320
|
*
|
|
323
321
|
* @param acl - The POSIX access control list for the file or directory.
|
|
324
322
|
* @param options - Optional. Options
|
|
@@ -331,7 +329,7 @@ export class DataLakePathClient extends StorageClient {
|
|
|
331
329
|
/**
|
|
332
330
|
* Removes the Access Control on a path and sub paths.
|
|
333
331
|
*
|
|
334
|
-
* @see https://
|
|
332
|
+
* @see https://learn.microsoft.com/en-us/rest/api/storageservices/datalakestoragegen2/path/update
|
|
335
333
|
*
|
|
336
334
|
* @param acl - The POSIX access control list for the file or directory.
|
|
337
335
|
* @param options - Optional. Options
|
|
@@ -344,7 +342,7 @@ export class DataLakePathClient extends StorageClient {
|
|
|
344
342
|
/**
|
|
345
343
|
* Sets the file permissions on a path.
|
|
346
344
|
*
|
|
347
|
-
* @see https://
|
|
345
|
+
* @see https://learn.microsoft.com/en-us/rest/api/storageservices/datalakestoragegen2/path/update
|
|
348
346
|
*
|
|
349
347
|
* @param permissions - The POSIX access permissions for the file owner, the file owning group, and others.
|
|
350
348
|
* @param options - Optional. Options when setting path permissions.
|
|
@@ -364,7 +362,7 @@ export class DataLakePathClient extends StorageClient {
|
|
|
364
362
|
* the methods of {@link DataLakeFileSystemClient} that list paths using the `includeMetadata` option, which
|
|
365
363
|
* will retain their original casing.
|
|
366
364
|
*
|
|
367
|
-
* @see https://
|
|
365
|
+
* @see https://learn.microsoft.com/en-us/rest/api/storageservices/get-blob-properties
|
|
368
366
|
*
|
|
369
367
|
* @param options - Optional. Options when getting path properties.
|
|
370
368
|
*/
|
|
@@ -379,7 +377,7 @@ export class DataLakePathClient extends StorageClient {
|
|
|
379
377
|
*
|
|
380
378
|
* If no value provided, or no value provided for the specified blob HTTP headers,
|
|
381
379
|
* these blob HTTP headers without a value will be cleared.
|
|
382
|
-
* @see https://
|
|
380
|
+
* @see https://learn.microsoft.com/en-us/rest/api/storageservices/set-blob-properties
|
|
383
381
|
*
|
|
384
382
|
* @param httpHeaders -
|
|
385
383
|
* @param options -
|
|
@@ -402,7 +400,7 @@ export class DataLakePathClient extends StorageClient {
|
|
|
402
400
|
* If no option provided, or no metadata defined in the parameter, the path
|
|
403
401
|
* metadata will be removed.
|
|
404
402
|
*
|
|
405
|
-
* @see https://
|
|
403
|
+
* @see https://learn.microsoft.com/en-us/rest/api/storageservices/set-blob-metadata
|
|
406
404
|
*
|
|
407
405
|
* @param metadata - Optional. Replace existing metadata with this value.
|
|
408
406
|
* If no value provided the existing metadata will be removed.
|
|
@@ -507,7 +505,7 @@ export class DataLakeDirectoryClient extends DataLakePathClient {
|
|
|
507
505
|
* Generates a Service Shared Access Signature (SAS) URI based on the client properties
|
|
508
506
|
* and parameters passed in. The SAS is signed by the shared key credential of the client.
|
|
509
507
|
*
|
|
510
|
-
* @see https://
|
|
508
|
+
* @see https://learn.microsoft.com/en-us/rest/api/storageservices/constructing-a-service-sas
|
|
511
509
|
*
|
|
512
510
|
* @param options - Optional parameters.
|
|
513
511
|
* @returns The SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token.
|
|
@@ -525,7 +523,7 @@ export class DataLakeDirectoryClient extends DataLakePathClient {
|
|
|
525
523
|
* Generates string to sign for a Service Shared Access Signature (SAS) URI based on the client properties
|
|
526
524
|
* and parameters passed in.
|
|
527
525
|
*
|
|
528
|
-
* @see https://
|
|
526
|
+
* @see https://learn.microsoft.com/en-us/rest/api/storageservices/constructing-a-service-sas
|
|
529
527
|
*
|
|
530
528
|
* @param options - Optional parameters.
|
|
531
529
|
* @returns The SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token.
|
|
@@ -541,7 +539,7 @@ export class DataLakeDirectoryClient extends DataLakePathClient {
|
|
|
541
539
|
* Generates a Service Shared Access Signature (SAS) URI based on the client properties
|
|
542
540
|
* and parameters passed in. The SAS is signed by the input user delegation key.
|
|
543
541
|
*
|
|
544
|
-
* @see https://
|
|
542
|
+
* @see https://learn.microsoft.com/en-us/rest/api/storageservices/constructing-a-service-sas
|
|
545
543
|
*
|
|
546
544
|
* @param options - Optional parameters.
|
|
547
545
|
* @param userDelegationKey - Return value of `blobServiceClient.getUserDelegationKey()`
|
|
@@ -557,13 +555,12 @@ export class DataLakeDirectoryClient extends DataLakePathClient {
|
|
|
557
555
|
* Generates string to sign for a Service Shared Access Signature (SAS) URI based on the client properties
|
|
558
556
|
* and parameters passed in The SAS is signed by the input user delegation key.
|
|
559
557
|
*
|
|
560
|
-
* @see https://
|
|
558
|
+
* @see https://learn.microsoft.com/en-us/rest/api/storageservices/constructing-a-service-sas
|
|
561
559
|
*
|
|
562
560
|
* @param options - Optional parameters.
|
|
563
561
|
* @param userDelegationKey - Return value of `blobServiceClient.getUserDelegationKey()`
|
|
564
562
|
* @returns The SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token.
|
|
565
563
|
*/
|
|
566
|
-
/* eslint-disable-next-line @azure/azure-sdk/ts-naming-options*/
|
|
567
564
|
generateUserDelegationSasStringToSign(options, userDelegationKey) {
|
|
568
565
|
return generateDataLakeSASQueryParametersInternal(Object.assign({ fileSystemName: this.fileSystemName, pathName: this.name, isDirectory: true }, options), userDelegationKey, this.accountName).stringToSign;
|
|
569
566
|
}
|
|
@@ -626,7 +623,7 @@ export class DataLakeFileClient extends DataLakePathClient {
|
|
|
626
623
|
* * In Node.js, data returns in a Readable stream readableStreamBody
|
|
627
624
|
* * In browsers, data returns in a promise contentAsBlob
|
|
628
625
|
*
|
|
629
|
-
* @see https://
|
|
626
|
+
* @see https://learn.microsoft.com/en-us/rest/api/storageservices/get-blob
|
|
630
627
|
*
|
|
631
628
|
* * Example usage (Node.js):
|
|
632
629
|
*
|
|
@@ -640,7 +637,7 @@ export class DataLakeFileClient extends DataLakePathClient {
|
|
|
640
637
|
* return new Promise((resolve, reject) => {
|
|
641
638
|
* const chunks = [];
|
|
642
639
|
* readableStream.on("data", (data) => {
|
|
643
|
-
* chunks.push(data
|
|
640
|
+
* chunks.push(typeof data === "string" ? Buffer.from(data) : data);
|
|
644
641
|
* });
|
|
645
642
|
* readableStream.on("end", () => {
|
|
646
643
|
* resolve(Buffer.concat(chunks));
|
|
@@ -693,7 +690,7 @@ export class DataLakeFileClient extends DataLakePathClient {
|
|
|
693
690
|
* Uploads data to be appended to a file. Data can only be appended to a file.
|
|
694
691
|
* To apply perviously uploaded data to a file, call flush.
|
|
695
692
|
*
|
|
696
|
-
* @see https://
|
|
693
|
+
* @see https://learn.microsoft.com/en-us/rest/api/storageservices/datalakestoragegen2/path/update
|
|
697
694
|
*
|
|
698
695
|
* @param body - Content to be uploaded.
|
|
699
696
|
* @param offset - Append offset in bytes.
|
|
@@ -1020,7 +1017,7 @@ export class DataLakeFileClient extends DataLakePathClient {
|
|
|
1020
1017
|
* return new Promise((resolve, reject) => {
|
|
1021
1018
|
* const chunks = [];
|
|
1022
1019
|
* readableStream.on("data", (data) => {
|
|
1023
|
-
* chunks.push(data
|
|
1020
|
+
* chunks.push(typeof data === "string" ? Buffer.from(data) : data);
|
|
1024
1021
|
* });
|
|
1025
1022
|
* readableStream.on("end", () => {
|
|
1026
1023
|
* resolve(Buffer.concat(chunks));
|
|
@@ -1085,7 +1082,7 @@ export class DataLakeFileClient extends DataLakePathClient {
|
|
|
1085
1082
|
* Generates a Service Shared Access Signature (SAS) URI based on the client properties
|
|
1086
1083
|
* and parameters passed in. The SAS is signed by the shared key credential of the client.
|
|
1087
1084
|
*
|
|
1088
|
-
* @see https://
|
|
1085
|
+
* @see https://learn.microsoft.com/en-us/rest/api/storageservices/constructing-a-service-sas
|
|
1089
1086
|
*
|
|
1090
1087
|
* @param options - Optional parameters.
|
|
1091
1088
|
* @returns The SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token.
|
|
@@ -1105,7 +1102,7 @@ export class DataLakeFileClient extends DataLakePathClient {
|
|
|
1105
1102
|
* Generates string to sign for a Service Shared Access Signature (SAS) URI based on the client properties
|
|
1106
1103
|
* and parameters passed in. The SAS is signed by the shared key credential of the client.
|
|
1107
1104
|
*
|
|
1108
|
-
* @see https://
|
|
1105
|
+
* @see https://learn.microsoft.com/en-us/rest/api/storageservices/constructing-a-service-sas
|
|
1109
1106
|
*
|
|
1110
1107
|
* @param options - Optional parameters.
|
|
1111
1108
|
* @returns The SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token.
|
|
@@ -1121,7 +1118,7 @@ export class DataLakeFileClient extends DataLakePathClient {
|
|
|
1121
1118
|
* Generates a Service Shared Access Signature (SAS) URI based on the client properties
|
|
1122
1119
|
* and parameters passed in. The SAS is signed by the input user delegation key.
|
|
1123
1120
|
*
|
|
1124
|
-
* @see https://
|
|
1121
|
+
* @see https://learn.microsoft.com/en-us/rest/api/storageservices/constructing-a-service-sas
|
|
1125
1122
|
*
|
|
1126
1123
|
* @param options - Optional parameters.
|
|
1127
1124
|
* @param userDelegationKey - Return value of `blobServiceClient.getUserDelegationKey()`
|
|
@@ -1137,13 +1134,12 @@ export class DataLakeFileClient extends DataLakePathClient {
|
|
|
1137
1134
|
* Generates string to sign for a Service Shared Access Signature (SAS) URI based on the client properties
|
|
1138
1135
|
* and parameters passed in. The SAS is signed by the input user delegation key.
|
|
1139
1136
|
*
|
|
1140
|
-
* @see https://
|
|
1137
|
+
* @see https://learn.microsoft.com/en-us/rest/api/storageservices/constructing-a-service-sas
|
|
1141
1138
|
*
|
|
1142
1139
|
* @param options - Optional parameters.
|
|
1143
1140
|
* @param userDelegationKey - Return value of `blobServiceClient.getUserDelegationKey()`
|
|
1144
1141
|
* @returns The SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token.
|
|
1145
1142
|
*/
|
|
1146
|
-
/* eslint-disable-next-line @azure/azure-sdk/ts-naming-options*/
|
|
1147
1143
|
generateUserDelegationSasStringToSign(options, userDelegationKey) {
|
|
1148
1144
|
return generateDataLakeSASQueryParametersInternal(Object.assign({ fileSystemName: this.fileSystemName, pathName: this.name }, options), userDelegationKey, this.accountName).stringToSign;
|
|
1149
1145
|
}
|