@azure/storage-file-datalake 12.25.0 → 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.
Files changed (47) hide show
  1. package/LICENSE +3 -3
  2. package/README.md +25 -30
  3. package/dist/index.js +63 -64
  4. package/dist/index.js.map +1 -1
  5. package/dist-esm/storage-blob/src/StorageRetryPolicyFactory.js.map +1 -1
  6. package/dist-esm/storage-blob/src/policies/StorageSharedKeyCredentialPolicy.js +2 -2
  7. package/dist-esm/storage-blob/src/policies/StorageSharedKeyCredentialPolicy.js.map +1 -1
  8. package/dist-esm/storage-blob/src/policies/StorageSharedKeyCredentialPolicyV2.js +2 -2
  9. package/dist-esm/storage-blob/src/policies/StorageSharedKeyCredentialPolicyV2.js.map +1 -1
  10. package/dist-esm/storage-blob/src/utils/constants.js +2 -2
  11. package/dist-esm/storage-blob/src/utils/constants.js.map +1 -1
  12. package/dist-esm/storage-blob/src/utils/utils.common.js +3 -3
  13. package/dist-esm/storage-blob/src/utils/utils.common.js.map +1 -1
  14. package/dist-esm/storage-blob/src/utils/utils.node.js +1 -1
  15. package/dist-esm/storage-blob/src/utils/utils.node.js.map +1 -1
  16. package/dist-esm/storage-file-datalake/src/DataLakeFileSystemClient.js +15 -15
  17. package/dist-esm/storage-file-datalake/src/DataLakeFileSystemClient.js.map +1 -1
  18. package/dist-esm/storage-file-datalake/src/DataLakeServiceClient.js +6 -6
  19. package/dist-esm/storage-file-datalake/src/DataLakeServiceClient.js.map +1 -1
  20. package/dist-esm/storage-file-datalake/src/clients.js +25 -25
  21. package/dist-esm/storage-file-datalake/src/clients.js.map +1 -1
  22. package/dist-esm/storage-file-datalake/src/credentials/UserDelegationKeyCredential.js +1 -1
  23. package/dist-esm/storage-file-datalake/src/credentials/UserDelegationKeyCredential.js.map +1 -1
  24. package/dist-esm/storage-file-datalake/src/generated/src/models/parameters.js +1 -1
  25. package/dist-esm/storage-file-datalake/src/generated/src/models/parameters.js.map +1 -1
  26. package/dist-esm/storage-file-datalake/src/generated/src/storageClient.js +2 -2
  27. package/dist-esm/storage-file-datalake/src/generated/src/storageClient.js.map +1 -1
  28. package/dist-esm/storage-file-datalake/src/models.js.map +1 -1
  29. package/dist-esm/storage-file-datalake/src/sas/AccountSASPermissions.js +2 -2
  30. package/dist-esm/storage-file-datalake/src/sas/AccountSASPermissions.js.map +1 -1
  31. package/dist-esm/storage-file-datalake/src/sas/AccountSASResourceTypes.js +1 -1
  32. package/dist-esm/storage-file-datalake/src/sas/AccountSASResourceTypes.js.map +1 -1
  33. package/dist-esm/storage-file-datalake/src/sas/AccountSASSignatureValues.js +1 -1
  34. package/dist-esm/storage-file-datalake/src/sas/AccountSASSignatureValues.js.map +1 -1
  35. package/dist-esm/storage-file-datalake/src/sas/DataLakeSASSignatureValues.js +1 -1
  36. package/dist-esm/storage-file-datalake/src/sas/DataLakeSASSignatureValues.js.map +1 -1
  37. package/dist-esm/storage-file-datalake/src/sas/DirectorySASPermissions.js +1 -1
  38. package/dist-esm/storage-file-datalake/src/sas/DirectorySASPermissions.js.map +1 -1
  39. package/dist-esm/storage-file-datalake/src/sas/FileSystemSASPermissions.js +1 -1
  40. package/dist-esm/storage-file-datalake/src/sas/FileSystemSASPermissions.js.map +1 -1
  41. package/dist-esm/storage-file-datalake/src/sas/SASQueryParameters.js.map +1 -1
  42. package/dist-esm/storage-file-datalake/src/utils/constants.js +2 -2
  43. package/dist-esm/storage-file-datalake/src/utils/constants.js.map +1 -1
  44. package/dist-esm/storage-file-datalake/src/utils/utils.common.js +3 -3
  45. package/dist-esm/storage-file-datalake/src/utils/utils.common.js.map +1 -1
  46. package/package.json +11 -11
  47. package/types/latest/storage-file-datalake.d.ts +69 -69
package/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
- The MIT License (MIT)
1
+ Copyright (c) Microsoft Corporation.
2
2
 
3
- Copyright (c) 2020 Microsoft
3
+ MIT License
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
@@ -12,7 +12,7 @@ furnished to do so, subject to the following conditions:
12
12
  The above copyright notice and this permission notice shall be included in all
13
13
  copies or substantial portions of the Software.
14
14
 
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15
+ THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
16
  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
17
  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
18
  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
package/README.md CHANGED
@@ -13,10 +13,10 @@ key links:
13
13
 
14
14
  - [Source code](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/storage/storage-file-datalake)
15
15
  - [Package (npm)](https://www.npmjs.com/package/@azure/storage-file-datalake)
16
- - [API Reference Documentation](https://docs.microsoft.com/javascript/api/@azure/storage-file-datalake)
17
- - [Product documentation](https://docs.microsoft.com/azure/storage/blobs/data-lake-storage-introduction?toc=%2fazure%2fstorage%2fblobs%2ftoc.json)
16
+ - [API Reference Documentation](https://learn.microsoft.com/javascript/api/@azure/storage-file-datalake)
17
+ - [Product documentation](https://learn.microsoft.com/azure/storage/blobs/data-lake-storage-introduction?toc=%2fazure%2fstorage%2fblobs%2ftoc.json)
18
18
  - [Samples](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/storage/storage-file-datalake/samples)
19
- - [Azure Storage Data Lake REST APIs](https://docs.microsoft.com/rest/api/storageservices/data-lake-storage-gen2)
19
+ - [Azure Storage Data Lake REST APIs](https://learn.microsoft.com/rest/api/storageservices/data-lake-storage-gen2)
20
20
 
21
21
  ## Getting started
22
22
 
@@ -30,7 +30,7 @@ See our [support policy](https://github.com/Azure/azure-sdk-for-js/blob/main/SUP
30
30
  ### Prerequisites
31
31
 
32
32
  - An [Azure subscription](https://azure.microsoft.com/free/)
33
- - A [Storage Account](https://docs.microsoft.com/azure/storage/common/storage-account-create)
33
+ - A [Storage Account](https://learn.microsoft.com/azure/storage/common/storage-account-create)
34
34
 
35
35
  ### Install the package
36
36
 
@@ -98,7 +98,7 @@ To use this client library in the browser, first you need to use a bundler. For
98
98
 
99
99
  ### CORS
100
100
 
101
- You need to set up [Cross-Origin Resource Sharing (CORS)](https://docs.microsoft.com/rest/api/storageservices/cross-origin-resource-sharing--cors--support-for-the-azure-storage-services) rules for your storage account if you need to develop for browsers. Go to Azure portal and Azure Storage Explorer, find your storage account, create new CORS rules for blob/queue/file/table service(s).
101
+ You need to set up [Cross-Origin Resource Sharing (CORS)](https://learn.microsoft.com/rest/api/storageservices/cross-origin-resource-sharing--cors--support-for-the-azure-storage-services) rules for your storage account if you need to develop for browsers. Go to Azure portal and Azure Storage Explorer, find your storage account, create new CORS rules for blob/queue/file/table service(s).
102
102
 
103
103
  For example, you can create following CORS settings for debugging. But please customize the settings carefully according to your requirements in production environment.
104
104
 
@@ -171,7 +171,7 @@ Alternatively, selectively import only the types you need:
171
171
  ```javascript
172
172
  const {
173
173
  DataLakeServiceClient,
174
- StorageSharedKeyCredential
174
+ StorageSharedKeyCredential,
175
175
  } = require("@azure/storage-file-datalake");
176
176
  ```
177
177
 
@@ -185,17 +185,17 @@ The `DataLakeServiceClient` requires an URL to the data lake service and an acce
185
185
 
186
186
  > Notice. Azure Data Lake currently reuses blob related roles like "Storage Blob Data Owner" during following AAD OAuth authentication.
187
187
 
188
- Setup : Reference - Authorize access to blobs (data lake) and queues with Azure Active Directory from a client application - https://docs.microsoft.com/azure/storage/common/storage-auth-aad-app
188
+ Setup : Reference - Authorize access to blobs (data lake) and queues with Azure Active Directory from a client application - https://learn.microsoft.com/azure/storage/common/storage-auth-aad-app
189
189
 
190
190
  - Register a new AAD application and give permissions to access Azure Storage on behalf of the signed-in user.
191
191
 
192
- - Register a new application in the Azure Active Directory(in the azure-portal) - https://docs.microsoft.com/azure/active-directory/develop/quickstart-register-app
192
+ - Register a new application in the Azure Active Directory(in the azure-portal) - https://learn.microsoft.com/azure/active-directory/develop/quickstart-register-app
193
193
  - In the `API permissions` section, select `Add a permission` and choose `Microsoft APIs`.
194
194
  - Pick `Azure Storage` and select the checkbox next to `user_impersonation` and then click `Add permissions`. This would allow the application to access Azure Storage on behalf of the signed-in user.
195
195
 
196
196
  - Grant access to Azure Data Lake data with RBAC in the Azure Portal
197
197
 
198
- - RBAC roles for blobs (data lake) and queues - https://docs.microsoft.com/azure/storage/common/storage-auth-aad-rbac-portal.
198
+ - RBAC roles for blobs (data lake) and queues - https://learn.microsoft.com/azure/storage/common/storage-auth-aad-rbac-portal.
199
199
  - In the azure portal, go to your storage-account and assign **Storage Blob Data Contributor** role to the registered AAD application from `Access control (IAM)` tab (in the left-side-navbar of your storage account in the azure-portal).
200
200
 
201
201
  - Environment setup for the sample
@@ -212,7 +212,7 @@ const defaultAzureCredential = new DefaultAzureCredential();
212
212
 
213
213
  const datalakeServiceClient = new DataLakeServiceClient(
214
214
  `https://${account}.dfs.core.windows.net`,
215
- defaultAzureCredential
215
+ defaultAzureCredential,
216
216
  );
217
217
  ```
218
218
 
@@ -241,7 +241,7 @@ Alternatively, you instantiate a `DataLakeServiceClient` with a `StorageSharedKe
241
241
  ```javascript
242
242
  const {
243
243
  DataLakeServiceClient,
244
- StorageSharedKeyCredential
244
+ StorageSharedKeyCredential,
245
245
  } = require("@azure/storage-file-datalake");
246
246
 
247
247
  // Enter your storage account name and shared key
@@ -253,7 +253,7 @@ const accountKey = "<accountkey>";
253
253
  const sharedKeyCredential = new StorageSharedKeyCredential(account, accountKey);
254
254
  const datalakeServiceClient = new DataLakeServiceClient(
255
255
  `https://${account}.dfs.core.windows.net`,
256
- sharedKeyCredential
256
+ sharedKeyCredential,
257
257
  );
258
258
  ```
259
259
 
@@ -267,7 +267,7 @@ const { DataLakeServiceClient } = require("@azure/storage-file-datalake");
267
267
  const account = "<account name>";
268
268
  const sas = "<service Shared Access Signature Token>";
269
269
  const serviceClientWithSAS = new DataLakeServiceClient(
270
- `https://${account}.dfs.core.windows.net${sas}`
270
+ `https://${account}.dfs.core.windows.net${sas}`,
271
271
  );
272
272
  ```
273
273
 
@@ -284,7 +284,7 @@ const defaultAzureCredential = new DefaultAzureCredential();
284
284
 
285
285
  const datalakeServiceClient = new DataLakeServiceClient(
286
286
  `https://${account}.dfs.core.windows.net`,
287
- defaultAzureCredential
287
+ defaultAzureCredential,
288
288
  );
289
289
 
290
290
  async function main() {
@@ -312,7 +312,7 @@ const defaultAzureCredential = new DefaultAzureCredential();
312
312
 
313
313
  const datalakeServiceClient = new DataLakeServiceClient(
314
314
  `https://${account}.dfs.core.windows.net`,
315
- defaultAzureCredential
315
+ defaultAzureCredential,
316
316
  );
317
317
 
318
318
  async function main() {
@@ -337,7 +337,7 @@ const defaultAzureCredential = new DefaultAzureCredential();
337
337
 
338
338
  const datalakeServiceClient = new DataLakeServiceClient(
339
339
  `https://${account}.dfs.core.windows.net`,
340
- defaultAzureCredential
340
+ defaultAzureCredential,
341
341
  );
342
342
 
343
343
  async function main() {
@@ -364,7 +364,7 @@ const defaultAzureCredential = new DefaultAzureCredential();
364
364
 
365
365
  const datalakeServiceClient = new DataLakeServiceClient(
366
366
  `https://${account}.dfs.core.windows.net`,
367
- defaultAzureCredential
367
+ defaultAzureCredential,
368
368
  );
369
369
 
370
370
  async function main() {
@@ -394,7 +394,7 @@ const defaultAzureCredential = new DefaultAzureCredential();
394
394
 
395
395
  const datalakeServiceClient = new DataLakeServiceClient(
396
396
  `https://${account}.dfs.core.windows.net`,
397
- defaultAzureCredential
397
+ defaultAzureCredential,
398
398
  );
399
399
 
400
400
  const fileSystemName = "<file system name>";
@@ -420,7 +420,7 @@ const defaultAzureCredential = new DefaultAzureCredential();
420
420
 
421
421
  const datalakeServiceClient = new DataLakeServiceClient(
422
422
  `https://${account}.dfs.core.windows.net`,
423
- defaultAzureCredential
423
+ defaultAzureCredential,
424
424
  );
425
425
 
426
426
  const fileSystemName = "<file system name>";
@@ -453,7 +453,7 @@ const defaultAzureCredential = new DefaultAzureCredential();
453
453
 
454
454
  const datalakeServiceClient = new DataLakeServiceClient(
455
455
  `https://${account}.dfs.core.windows.net`,
456
- defaultAzureCredential
456
+ defaultAzureCredential,
457
457
  );
458
458
 
459
459
  const fileSystemName = "<file system name>";
@@ -482,7 +482,7 @@ const defaultAzureCredential = new DefaultAzureCredential();
482
482
 
483
483
  const datalakeServiceClient = new DataLakeServiceClient(
484
484
  `https://${account}.dfs.core.windows.net`,
485
- defaultAzureCredential
485
+ defaultAzureCredential,
486
486
  );
487
487
 
488
488
  const fileSystemName = "<file system name>";
@@ -503,7 +503,7 @@ async function main() {
503
503
  return new Promise((resolve, reject) => {
504
504
  const chunks = [];
505
505
  readableStream.on("data", (data) => {
506
- chunks.push(data instanceof Buffer ? data : Buffer.from(data));
506
+ chunks.push(typeof data === "string" ? Buffer.from(data) : data);
507
507
  });
508
508
  readableStream.on("end", () => {
509
509
  resolve(Buffer.concat(chunks));
@@ -525,11 +525,11 @@ const account = "<account>";
525
525
  const sas = "<sas token>";
526
526
 
527
527
  const datalakeServiceClient = new DataLakeServiceClient(
528
- `https://${account}.dfs.core.windows.net${sas}`
528
+ `https://${account}.dfs.core.windows.net${sas}`,
529
529
  );
530
530
 
531
531
  const fileSystemName = "<file system name>";
532
- const fileName = "<file name>"
532
+ const fileName = "<file name>";
533
533
 
534
534
  async function main() {
535
535
  const fileSystemClient = datalakeServiceClient.getFileSystemClient(fileSystemName);
@@ -539,10 +539,7 @@ async function main() {
539
539
  // In browsers, get downloaded data by accessing downloadResponse.contentAsBlob
540
540
  const downloadResponse = await fileClient.read();
541
541
  const downloaded = await blobToString(await downloadResponse.contentAsBlob);
542
- console.log(
543
- "Downloaded file content",
544
- downloaded
545
- );
542
+ console.log("Downloaded file content", downloaded);
546
543
 
547
544
  // [Browsers only] A helper method used to convert a browser Blob into string.
548
545
  async function blobToString(blob) {
@@ -581,5 +578,3 @@ More code samples:
581
578
  ## Contributing
582
579
 
583
580
  If you'd like to contribute to this library, please read the [contributing guide](https://github.com/Azure/azure-sdk-for-js/blob/main/CONTRIBUTING.md) to learn more about how to build and test the code.
584
-
585
- ![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js%2Fsdk%2Fstorage%2Fstorage-blob%2FREADME.png)