@azure/storage-file-share 12.26.0 → 12.27.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 +16 -18
- package/dist/index.js +1430 -431
- 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/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-share/src/AccountSASPermissions.js +2 -2
- package/dist-esm/storage-file-share/src/AccountSASPermissions.js.map +1 -1
- package/dist-esm/storage-file-share/src/AccountSASResourceTypes.js +1 -1
- package/dist-esm/storage-file-share/src/AccountSASResourceTypes.js.map +1 -1
- package/dist-esm/storage-file-share/src/AccountSASSignatureValues.js +1 -1
- package/dist-esm/storage-file-share/src/AccountSASSignatureValues.js.map +1 -1
- package/dist-esm/storage-file-share/src/Clients.js +103 -78
- package/dist-esm/storage-file-share/src/Clients.js.map +1 -1
- package/dist-esm/storage-file-share/src/FileDownloadResponse.js +24 -0
- package/dist-esm/storage-file-share/src/FileDownloadResponse.js.map +1 -1
- package/dist-esm/storage-file-share/src/FileSASSignatureValues.js.map +1 -1
- package/dist-esm/storage-file-share/src/FileSystemAttributes.js +1 -1
- package/dist-esm/storage-file-share/src/FileSystemAttributes.js.map +1 -1
- package/dist-esm/storage-file-share/src/Range.js.map +1 -1
- package/dist-esm/storage-file-share/src/SASQueryParameters.js.map +1 -1
- package/dist-esm/storage-file-share/src/ShareSASPermissions.js +1 -1
- package/dist-esm/storage-file-share/src/ShareSASPermissions.js.map +1 -1
- package/dist-esm/storage-file-share/src/ShareServiceClient.js +13 -7
- package/dist-esm/storage-file-share/src/ShareServiceClient.js.map +1 -1
- package/dist-esm/storage-file-share/src/StorageRetryPolicyFactory.js.map +1 -1
- package/dist-esm/storage-file-share/src/generated/src/models/index.js +10 -0
- package/dist-esm/storage-file-share/src/generated/src/models/index.js.map +1 -1
- package/dist-esm/storage-file-share/src/generated/src/models/mappers.js +544 -0
- package/dist-esm/storage-file-share/src/generated/src/models/mappers.js.map +1 -1
- package/dist-esm/storage-file-share/src/generated/src/models/parameters.js +108 -3
- package/dist-esm/storage-file-share/src/generated/src/models/parameters.js.map +1 -1
- package/dist-esm/storage-file-share/src/generated/src/operations/directory.js +12 -10
- package/dist-esm/storage-file-share/src/generated/src/operations/directory.js.map +1 -1
- package/dist-esm/storage-file-share/src/generated/src/operations/file.js +125 -10
- package/dist-esm/storage-file-share/src/generated/src/operations/file.js.map +1 -1
- package/dist-esm/storage-file-share/src/generated/src/operationsInterfaces/directory.js.map +1 -1
- package/dist-esm/storage-file-share/src/generated/src/operationsInterfaces/file.js.map +1 -1
- package/dist-esm/storage-file-share/src/generated/src/storageClient.js +2 -2
- package/dist-esm/storage-file-share/src/generated/src/storageClient.js.map +1 -1
- package/dist-esm/storage-file-share/src/generatedModels.js.map +1 -1
- package/dist-esm/storage-file-share/src/index.browser.js +1 -0
- package/dist-esm/storage-file-share/src/index.browser.js.map +1 -1
- package/dist-esm/storage-file-share/src/index.js +1 -0
- package/dist-esm/storage-file-share/src/index.js.map +1 -1
- package/dist-esm/storage-file-share/src/models.js +0 -21
- package/dist-esm/storage-file-share/src/models.js.map +1 -1
- package/dist-esm/storage-file-share/src/utils/constants.js +2 -2
- package/dist-esm/storage-file-share/src/utils/constants.js.map +1 -1
- package/dist-esm/storage-file-share/src/utils/utils.common.js +214 -2
- package/dist-esm/storage-file-share/src/utils/utils.common.js.map +1 -1
- package/package.json +9 -9
- package/types/latest/storage-file-share.d.ts +968 -134
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
@@ -19,10 +19,10 @@ Key links:
|
|
19
19
|
|
20
20
|
- [Source code](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/storage/storage-file-share)
|
21
21
|
- [Package (npm)](https://www.npmjs.com/package/@azure/storage-file-share/)
|
22
|
-
- [API Reference Documentation](https://
|
23
|
-
- [Product documentation](https://
|
22
|
+
- [API Reference Documentation](https://learn.microsoft.com/javascript/api/@azure/storage-file-share)
|
23
|
+
- [Product documentation](https://learn.microsoft.com/azure/storage/files/storage-files-introduction)
|
24
24
|
- [Samples](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/storage/storage-file-share/samples)
|
25
|
-
- [Azure Storage File REST APIs](https://
|
25
|
+
- [Azure Storage File REST APIs](https://learn.microsoft.com/rest/api/storageservices/file-service-rest-api)
|
26
26
|
|
27
27
|
## Getting started
|
28
28
|
|
@@ -36,7 +36,7 @@ See our [support policy](https://github.com/Azure/azure-sdk-for-js/blob/main/SUP
|
|
36
36
|
### Prerequisites
|
37
37
|
|
38
38
|
- An [Azure subscription](https://azure.microsoft.com/free/)
|
39
|
-
- A [Storage Account](https://
|
39
|
+
- A [Storage Account](https://learn.microsoft.com/azure/storage/common/storage-account-create)
|
40
40
|
|
41
41
|
### Install the package
|
42
42
|
|
@@ -99,7 +99,7 @@ To use this client library in the browser, first you need to use a bundler. For
|
|
99
99
|
|
100
100
|
### CORS
|
101
101
|
|
102
|
-
You need to set up [Cross-Origin Resource Sharing (CORS)](https://
|
102
|
+
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).
|
103
103
|
|
104
104
|
For example, you can create following CORS settings for debugging. But please customize the settings carefully according to your requirements in production environment.
|
105
105
|
|
@@ -176,7 +176,7 @@ const credential = new StorageSharedKeyCredential(account, accountKey);
|
|
176
176
|
const serviceClient = new ShareServiceClient(
|
177
177
|
// When using AnonymousCredential, following url should include a valid SAS
|
178
178
|
`https://${account}.file.core.windows.net`,
|
179
|
-
credential
|
179
|
+
credential,
|
180
180
|
);
|
181
181
|
```
|
182
182
|
|
@@ -191,7 +191,7 @@ const account = "<account name>";
|
|
191
191
|
const sas = "<service Shared Access Signature Token>";
|
192
192
|
|
193
193
|
const serviceClientWithSAS = new ShareServiceClient(
|
194
|
-
`https://${account}.file.core.windows.net${sas}
|
194
|
+
`https://${account}.file.core.windows.net${sas}`,
|
195
195
|
);
|
196
196
|
```
|
197
197
|
|
@@ -209,7 +209,7 @@ const accountKey = "<accountkey>";
|
|
209
209
|
const credential = new StorageSharedKeyCredential(account, accountKey);
|
210
210
|
const serviceClient = new ShareServiceClient(
|
211
211
|
`https://${account}.file.core.windows.net`,
|
212
|
-
credential
|
212
|
+
credential,
|
213
213
|
);
|
214
214
|
|
215
215
|
async function main() {
|
@@ -235,7 +235,7 @@ const accountKey = "<accountkey>";
|
|
235
235
|
const credential = new StorageSharedKeyCredential(account, accountKey);
|
236
236
|
const serviceClient = new ShareServiceClient(
|
237
237
|
`https://${account}.file.core.windows.net`,
|
238
|
-
credential
|
238
|
+
credential,
|
239
239
|
);
|
240
240
|
|
241
241
|
async function main() {
|
@@ -262,7 +262,7 @@ const accountKey = "<accountkey>";
|
|
262
262
|
const credential = new StorageSharedKeyCredential(account, accountKey);
|
263
263
|
const serviceClient = new ShareServiceClient(
|
264
264
|
`https://${account}.file.core.windows.net`,
|
265
|
-
credential
|
265
|
+
credential,
|
266
266
|
);
|
267
267
|
|
268
268
|
async function main() {
|
@@ -291,7 +291,7 @@ const accountKey = "<accountkey>";
|
|
291
291
|
const credential = new StorageSharedKeyCredential(account, accountKey);
|
292
292
|
const serviceClient = new ShareServiceClient(
|
293
293
|
`https://${account}.file.core.windows.net`,
|
294
|
-
credential
|
294
|
+
credential,
|
295
295
|
);
|
296
296
|
|
297
297
|
const shareName = "<share name>";
|
@@ -329,7 +329,7 @@ const accountKey = "<accountkey>";
|
|
329
329
|
const credential = new StorageSharedKeyCredential(account, accountKey);
|
330
330
|
const serviceClient = new ShareServiceClient(
|
331
331
|
`https://${account}.file.core.windows.net`,
|
332
|
-
credential
|
332
|
+
credential,
|
333
333
|
);
|
334
334
|
|
335
335
|
const shareName = "<share name>";
|
@@ -364,7 +364,7 @@ const accountKey = "<accountkey>";
|
|
364
364
|
const credential = new StorageSharedKeyCredential(account, accountKey);
|
365
365
|
const serviceClient = new ShareServiceClient(
|
366
366
|
`https://${account}.file.core.windows.net`,
|
367
|
-
credential
|
367
|
+
credential,
|
368
368
|
);
|
369
369
|
|
370
370
|
const shareName = "<share name>";
|
@@ -403,7 +403,7 @@ const accountKey = "<accountkey>";
|
|
403
403
|
const credential = new StorageSharedKeyCredential(account, accountKey);
|
404
404
|
const serviceClient = new ShareServiceClient(
|
405
405
|
`https://${account}.file.core.windows.net`,
|
406
|
-
credential
|
406
|
+
credential,
|
407
407
|
);
|
408
408
|
|
409
409
|
const shareName = "<share name>";
|
@@ -434,7 +434,7 @@ async function main() {
|
|
434
434
|
console.log(
|
435
435
|
`Downloaded file content: ${(
|
436
436
|
await streamToBuffer(downloadFileResponse.readableStreamBody)
|
437
|
-
).toString()}
|
437
|
+
).toString()}`,
|
438
438
|
);
|
439
439
|
}
|
440
440
|
|
@@ -464,7 +464,7 @@ async function main() {
|
|
464
464
|
// In browsers, get downloaded data by accessing downloadFileResponse.blobBody
|
465
465
|
const downloadFileResponse = await fileClient.download(0);
|
466
466
|
console.log(
|
467
|
-
`Downloaded file content: ${await blobToString(await downloadFileResponse.blobBody)}
|
467
|
+
`Downloaded file content: ${await blobToString(await downloadFileResponse.blobBody)}`,
|
468
468
|
);
|
469
469
|
}
|
470
470
|
|
@@ -508,5 +508,3 @@ More code samples
|
|
508
508
|
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.
|
509
509
|
|
510
510
|
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.
|
511
|
-
|
512
|
-

|