@azure/storage-blob 12.26.0-alpha.20241230.1 → 12.26.0-alpha.20250217.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 +17 -19
- package/dist/index.js +104 -116
- package/dist/index.js.map +1 -1
- package/dist-esm/storage-blob/src/BatchResponseParser.js +1 -1
- package/dist-esm/storage-blob/src/BatchResponseParser.js.map +1 -1
- package/dist-esm/storage-blob/src/BlobBatch.js +1 -1
- package/dist-esm/storage-blob/src/BlobBatch.js.map +1 -1
- package/dist-esm/storage-blob/src/BlobBatchClient.js +2 -2
- package/dist-esm/storage-blob/src/BlobBatchClient.js.map +1 -1
- package/dist-esm/storage-blob/src/BlobLeaseClient.js +10 -10
- package/dist-esm/storage-blob/src/BlobLeaseClient.js.map +1 -1
- package/dist-esm/storage-blob/src/BlobServiceClient.js +11 -11
- package/dist-esm/storage-blob/src/BlobServiceClient.js.map +1 -1
- package/dist-esm/storage-blob/src/Clients.js +43 -43
- package/dist-esm/storage-blob/src/Clients.js.map +1 -1
- package/dist-esm/storage-blob/src/ContainerClient.js +18 -18
- package/dist-esm/storage-blob/src/ContainerClient.js.map +1 -1
- package/dist-esm/storage-blob/src/Range.js.map +1 -1
- package/dist-esm/storage-blob/src/StorageRetryPolicyFactory.js.map +1 -1
- package/dist-esm/storage-blob/src/credentials/UserDelegationKeyCredential.js +1 -1
- package/dist-esm/storage-blob/src/credentials/UserDelegationKeyCredential.js.map +1 -1
- package/dist-esm/storage-blob/src/models.js +2 -2
- package/dist-esm/storage-blob/src/models.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.js +2 -2
- package/dist-esm/storage-blob/src/policies/StorageSharedKeyCredentialPolicyV2.js.map +1 -1
- package/dist-esm/storage-blob/src/sas/AccountSASPermissions.js +2 -2
- package/dist-esm/storage-blob/src/sas/AccountSASPermissions.js.map +1 -1
- package/dist-esm/storage-blob/src/sas/AccountSASResourceTypes.js +1 -1
- package/dist-esm/storage-blob/src/sas/AccountSASResourceTypes.js.map +1 -1
- package/dist-esm/storage-blob/src/sas/AccountSASSignatureValues.js +1 -1
- package/dist-esm/storage-blob/src/sas/AccountSASSignatureValues.js.map +1 -1
- package/dist-esm/storage-blob/src/sas/BlobSASSignatureValues.js +1 -1
- package/dist-esm/storage-blob/src/sas/BlobSASSignatureValues.js.map +1 -1
- package/dist-esm/storage-blob/src/sas/ContainerSASPermissions.js +1 -1
- package/dist-esm/storage-blob/src/sas/ContainerSASPermissions.js.map +1 -1
- package/dist-esm/storage-blob/src/sas/SASQueryParameters.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/package.json +4 -4
- package/types/latest/storage-blob.d.ts +131 -131
package/LICENSE
CHANGED
@@ -1,6 +1,6 @@
|
|
1
|
-
|
1
|
+
Copyright (c) Microsoft Corporation.
|
2
2
|
|
3
|
-
|
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
|
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
@@ -16,10 +16,10 @@ Key links
|
|
16
16
|
|
17
17
|
- [Source code](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/storage/storage-blob)
|
18
18
|
- [Package (npm)](https://www.npmjs.com/package/@azure/storage-blob/)
|
19
|
-
- [API Reference Documentation](https://
|
20
|
-
- [Product documentation](https://
|
19
|
+
- [API Reference Documentation](https://learn.microsoft.com/javascript/api/@azure/storage-blob)
|
20
|
+
- [Product documentation](https://learn.microsoft.com/azure/storage/blobs/storage-blobs-overview)
|
21
21
|
- [Samples](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/storage/storage-blob/samples)
|
22
|
-
- [Azure Storage Blob REST APIs](https://
|
22
|
+
- [Azure Storage Blob REST APIs](https://learn.microsoft.com/rest/api/storageservices/blob-service-rest-api)
|
23
23
|
|
24
24
|
## Getting started
|
25
25
|
|
@@ -33,7 +33,7 @@ See our [support policy](https://github.com/Azure/azure-sdk-for-js/blob/main/SUP
|
|
33
33
|
### Prerequisites
|
34
34
|
|
35
35
|
- An [Azure subscription](https://azure.microsoft.com/free/)
|
36
|
-
- A [Storage Account](https://
|
36
|
+
- A [Storage Account](https://learn.microsoft.com/azure/storage/blobs/storage-quickstart-blobs-portal)
|
37
37
|
|
38
38
|
### Install the package
|
39
39
|
|
@@ -102,7 +102,7 @@ To use this client library in the browser, first you need to use a bundler. For
|
|
102
102
|
|
103
103
|
### CORS
|
104
104
|
|
105
|
-
You need to set up [Cross-Origin Resource Sharing (CORS)](https://
|
105
|
+
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).
|
106
106
|
|
107
107
|
For example, you can create following CORS settings for debugging. But please customize the settings carefully according to your requirements in production environment.
|
108
108
|
|
@@ -162,17 +162,17 @@ The `BlobServiceClient` requires an URL to the blob service and an access creden
|
|
162
162
|
|
163
163
|
**Recommended way to instantiate a `BlobServiceClient`**
|
164
164
|
|
165
|
-
Setup : Reference - Authorize access to blobs and queues with Azure Active Directory from a client application - https://
|
165
|
+
Setup : Reference - Authorize access to blobs and queues with Azure Active Directory from a client application - https://learn.microsoft.com/azure/storage/common/storage-auth-aad-app
|
166
166
|
|
167
167
|
- Register a new AAD application and give permissions to access Azure Storage on behalf of the signed-in user
|
168
168
|
|
169
|
-
- Register a new application in the Azure Active Directory(in the azure-portal) - https://
|
169
|
+
- Register a new application in the Azure Active Directory(in the azure-portal) - https://learn.microsoft.com/azure/active-directory/develop/quickstart-register-app
|
170
170
|
- In the `API permissions` section, select `Add a permission` and choose `Microsoft APIs`.
|
171
171
|
- 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.
|
172
172
|
|
173
173
|
- Grant access to Azure Blob data with RBAC in the Azure Portal
|
174
174
|
|
175
|
-
- RBAC roles for blobs and queues - https://
|
175
|
+
- RBAC roles for blobs and queues - https://learn.microsoft.com/azure/storage/common/storage-auth-aad-rbac-portal.
|
176
176
|
- 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).
|
177
177
|
|
178
178
|
- Environment setup for the sample
|
@@ -189,7 +189,7 @@ const defaultAzureCredential = new DefaultAzureCredential();
|
|
189
189
|
|
190
190
|
const blobServiceClient = new BlobServiceClient(
|
191
191
|
`https://${account}.blob.core.windows.net`,
|
192
|
-
defaultAzureCredential
|
192
|
+
defaultAzureCredential,
|
193
193
|
);
|
194
194
|
```
|
195
195
|
|
@@ -226,7 +226,7 @@ const accountKey = "<accountkey>";
|
|
226
226
|
const sharedKeyCredential = new StorageSharedKeyCredential(account, accountKey);
|
227
227
|
const blobServiceClient = new BlobServiceClient(
|
228
228
|
`https://${account}.blob.core.windows.net`,
|
229
|
-
sharedKeyCredential
|
229
|
+
sharedKeyCredential,
|
230
230
|
);
|
231
231
|
```
|
232
232
|
|
@@ -256,7 +256,7 @@ const defaultAzureCredential = new DefaultAzureCredential();
|
|
256
256
|
|
257
257
|
const blobServiceClient = new BlobServiceClient(
|
258
258
|
`https://${account}.blob.core.windows.net`,
|
259
|
-
defaultAzureCredential
|
259
|
+
defaultAzureCredential,
|
260
260
|
);
|
261
261
|
|
262
262
|
async function main() {
|
@@ -284,7 +284,7 @@ const defaultAzureCredential = new DefaultAzureCredential();
|
|
284
284
|
|
285
285
|
const blobServiceClient = new BlobServiceClient(
|
286
286
|
`https://${account}.blob.core.windows.net`,
|
287
|
-
defaultAzureCredential
|
287
|
+
defaultAzureCredential,
|
288
288
|
);
|
289
289
|
|
290
290
|
async function main() {
|
@@ -309,7 +309,7 @@ const defaultAzureCredential = new DefaultAzureCredential();
|
|
309
309
|
|
310
310
|
const blobServiceClient = new BlobServiceClient(
|
311
311
|
`https://${account}.blob.core.windows.net`,
|
312
|
-
defaultAzureCredential
|
312
|
+
defaultAzureCredential,
|
313
313
|
);
|
314
314
|
|
315
315
|
async function main() {
|
@@ -336,7 +336,7 @@ const defaultAzureCredential = new DefaultAzureCredential();
|
|
336
336
|
|
337
337
|
const blobServiceClient = new BlobServiceClient(
|
338
338
|
`https://${account}.blob.core.windows.net`,
|
339
|
-
defaultAzureCredential
|
339
|
+
defaultAzureCredential,
|
340
340
|
);
|
341
341
|
|
342
342
|
async function main() {
|
@@ -366,7 +366,7 @@ const defaultAzureCredential = new DefaultAzureCredential();
|
|
366
366
|
|
367
367
|
const blobServiceClient = new BlobServiceClient(
|
368
368
|
`https://${account}.blob.core.windows.net`,
|
369
|
-
defaultAzureCredential
|
369
|
+
defaultAzureCredential,
|
370
370
|
);
|
371
371
|
|
372
372
|
const containerName = "<container name>";
|
@@ -397,7 +397,7 @@ const defaultAzureCredential = new DefaultAzureCredential();
|
|
397
397
|
|
398
398
|
const blobServiceClient = new BlobServiceClient(
|
399
399
|
`https://${account}.blob.core.windows.net`,
|
400
|
-
defaultAzureCredential
|
400
|
+
defaultAzureCredential,
|
401
401
|
);
|
402
402
|
|
403
403
|
const containerName = "<container name>";
|
@@ -428,7 +428,7 @@ const defaultAzureCredential = new DefaultAzureCredential();
|
|
428
428
|
|
429
429
|
const blobServiceClient = new BlobServiceClient(
|
430
430
|
`https://${account}.blob.core.windows.net`,
|
431
|
-
defaultAzureCredential
|
431
|
+
defaultAzureCredential,
|
432
432
|
);
|
433
433
|
|
434
434
|
const containerName = "<container name>";
|
@@ -529,5 +529,3 @@ More code samples:
|
|
529
529
|
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.
|
530
530
|
|
531
531
|
Also refer to [Storage specific guide](https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/storage/CONTRIBUTING.md) for additional information on setting up the test environment for storage libraries.
|
532
|
-
|
533
|
-

|