@azure/storage-blob 12.29.1-alpha.20251105.1 → 12.30.0-alpha.20251111.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/dist/browser/BlobBatch.d.ts +1 -2
- package/dist/browser/BlobBatch.d.ts.map +1 -1
- package/dist/browser/BlobBatch.js +1 -3
- package/dist/browser/BlobBatch.js.map +1 -1
- package/dist/browser/BlobBatchClient.d.ts +1 -2
- package/dist/browser/BlobBatchClient.d.ts.map +1 -1
- package/dist/browser/BlobBatchClient.js +1 -1
- package/dist/browser/BlobBatchClient.js.map +1 -1
- package/dist/browser/BlobServiceClient.d.ts +1 -2
- package/dist/browser/BlobServiceClient.d.ts.map +1 -1
- package/dist/browser/BlobServiceClient.js +1 -2
- package/dist/browser/BlobServiceClient.js.map +1 -1
- package/dist/browser/Clients.d.ts +1 -2
- package/dist/browser/Clients.d.ts.map +1 -1
- package/dist/browser/Clients.js +1 -2
- package/dist/browser/Clients.js.map +1 -1
- package/dist/browser/ContainerClient.d.ts +1 -2
- package/dist/browser/ContainerClient.d.ts.map +1 -1
- package/dist/browser/ContainerClient.js +1 -2
- package/dist/browser/ContainerClient.js.map +1 -1
- package/dist/browser/Pipeline.d.ts +2 -3
- package/dist/browser/Pipeline.d.ts.map +1 -1
- package/dist/browser/Pipeline.js +1 -9
- package/dist/browser/Pipeline.js.map +1 -1
- package/dist/browser/StorageClient.d.ts +1 -2
- package/dist/browser/StorageClient.d.ts.map +1 -1
- package/dist/browser/StorageClient.js.map +1 -1
- package/dist/browser/index-browser.d.mts.map +1 -1
- package/dist/browser/index-browser.mjs.map +1 -1
- package/dist/browser/index.d.ts +1 -7
- package/dist/browser/index.js +2 -7
- package/dist/browser/sas/AccountSASSignatureValues.d.ts +1 -1
- package/dist/browser/sas/AccountSASSignatureValues.d.ts.map +1 -1
- package/dist/browser/sas/AccountSASSignatureValues.js.map +1 -1
- package/dist/browser/sas/BlobSASSignatureValues.d.ts +1 -1
- package/dist/browser/sas/BlobSASSignatureValues.d.ts.map +1 -1
- package/dist/browser/sas/BlobSASSignatureValues.js +1 -1
- package/dist/browser/sas/BlobSASSignatureValues.js.map +1 -1
- package/dist/browser/utils/constants.js +1 -1
- package/dist/browser/utils/constants.js.map +1 -1
- package/dist/commonjs/BlobBatch.d.ts +1 -2
- package/dist/commonjs/BlobBatch.d.ts.map +1 -1
- package/dist/commonjs/BlobBatch.js +7 -9
- package/dist/commonjs/BlobBatch.js.map +1 -1
- package/dist/commonjs/BlobBatchClient.d.ts +1 -2
- package/dist/commonjs/BlobBatchClient.d.ts.map +1 -1
- package/dist/commonjs/BlobBatchClient.js +2 -2
- package/dist/commonjs/BlobBatchClient.js.map +1 -1
- package/dist/commonjs/BlobServiceClient.d.ts +1 -2
- package/dist/commonjs/BlobServiceClient.d.ts.map +1 -1
- package/dist/commonjs/BlobServiceClient.js +8 -9
- package/dist/commonjs/BlobServiceClient.js.map +1 -1
- package/dist/commonjs/Clients.d.ts +1 -2
- package/dist/commonjs/Clients.d.ts.map +1 -1
- package/dist/commonjs/Clients.js +25 -26
- package/dist/commonjs/Clients.js.map +1 -1
- package/dist/commonjs/ContainerClient.d.ts +1 -2
- package/dist/commonjs/ContainerClient.d.ts.map +1 -1
- package/dist/commonjs/ContainerClient.js +8 -9
- package/dist/commonjs/ContainerClient.js.map +1 -1
- package/dist/commonjs/Pipeline.d.ts +2 -3
- package/dist/commonjs/Pipeline.d.ts.map +1 -1
- package/dist/commonjs/Pipeline.js +12 -20
- package/dist/commonjs/Pipeline.js.map +1 -1
- package/dist/commonjs/StorageClient.d.ts +1 -2
- package/dist/commonjs/StorageClient.d.ts.map +1 -1
- package/dist/commonjs/StorageClient.js.map +1 -1
- package/dist/commonjs/index.d.ts +1 -10
- package/dist/commonjs/index.d.ts.map +1 -1
- package/dist/commonjs/index.js +14 -12
- package/dist/commonjs/index.js.map +1 -1
- package/dist/commonjs/sas/AccountSASSignatureValues.d.ts +1 -1
- package/dist/commonjs/sas/AccountSASSignatureValues.d.ts.map +1 -1
- package/dist/commonjs/sas/AccountSASSignatureValues.js.map +1 -1
- package/dist/commonjs/sas/BlobSASSignatureValues.d.ts +1 -1
- package/dist/commonjs/sas/BlobSASSignatureValues.d.ts.map +1 -1
- package/dist/commonjs/sas/BlobSASSignatureValues.js +2 -2
- package/dist/commonjs/sas/BlobSASSignatureValues.js.map +1 -1
- package/dist/commonjs/tsdoc-metadata.json +1 -1
- package/dist/commonjs/utils/constants.js +1 -1
- package/dist/commonjs/utils/constants.js.map +1 -1
- package/dist/esm/BlobBatch.d.ts +1 -2
- package/dist/esm/BlobBatch.d.ts.map +1 -1
- package/dist/esm/BlobBatch.js +1 -3
- package/dist/esm/BlobBatch.js.map +1 -1
- package/dist/esm/BlobBatchClient.d.ts +1 -2
- package/dist/esm/BlobBatchClient.d.ts.map +1 -1
- package/dist/esm/BlobBatchClient.js +1 -1
- package/dist/esm/BlobBatchClient.js.map +1 -1
- package/dist/esm/BlobServiceClient.d.ts +1 -2
- package/dist/esm/BlobServiceClient.d.ts.map +1 -1
- package/dist/esm/BlobServiceClient.js +1 -2
- package/dist/esm/BlobServiceClient.js.map +1 -1
- package/dist/esm/Clients.d.ts +1 -2
- package/dist/esm/Clients.d.ts.map +1 -1
- package/dist/esm/Clients.js +1 -2
- package/dist/esm/Clients.js.map +1 -1
- package/dist/esm/ContainerClient.d.ts +1 -2
- package/dist/esm/ContainerClient.d.ts.map +1 -1
- package/dist/esm/ContainerClient.js +1 -2
- package/dist/esm/ContainerClient.js.map +1 -1
- package/dist/esm/Pipeline.d.ts +2 -3
- package/dist/esm/Pipeline.d.ts.map +1 -1
- package/dist/esm/Pipeline.js +1 -9
- package/dist/esm/Pipeline.js.map +1 -1
- package/dist/esm/StorageClient.d.ts +1 -2
- package/dist/esm/StorageClient.d.ts.map +1 -1
- package/dist/esm/StorageClient.js.map +1 -1
- package/dist/esm/index.d.ts +1 -10
- package/dist/esm/index.d.ts.map +1 -1
- package/dist/esm/index.js +1 -10
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/sas/AccountSASSignatureValues.d.ts +1 -1
- package/dist/esm/sas/AccountSASSignatureValues.d.ts.map +1 -1
- package/dist/esm/sas/AccountSASSignatureValues.js.map +1 -1
- package/dist/esm/sas/BlobSASSignatureValues.d.ts +1 -1
- package/dist/esm/sas/BlobSASSignatureValues.d.ts.map +1 -1
- package/dist/esm/sas/BlobSASSignatureValues.js +1 -1
- package/dist/esm/sas/BlobSASSignatureValues.js.map +1 -1
- package/dist/esm/utils/constants.js +1 -1
- package/dist/esm/utils/constants.js.map +1 -1
- package/dist/react-native/BlobBatch.d.ts +1 -2
- package/dist/react-native/BlobBatch.d.ts.map +1 -1
- package/dist/react-native/BlobBatch.js +1 -3
- package/dist/react-native/BlobBatch.js.map +1 -1
- package/dist/react-native/BlobBatchClient.d.ts +1 -2
- package/dist/react-native/BlobBatchClient.d.ts.map +1 -1
- package/dist/react-native/BlobBatchClient.js +1 -1
- package/dist/react-native/BlobBatchClient.js.map +1 -1
- package/dist/react-native/BlobServiceClient.d.ts +1 -2
- package/dist/react-native/BlobServiceClient.d.ts.map +1 -1
- package/dist/react-native/BlobServiceClient.js +1 -2
- package/dist/react-native/BlobServiceClient.js.map +1 -1
- package/dist/react-native/Clients.d.ts +1 -2
- package/dist/react-native/Clients.d.ts.map +1 -1
- package/dist/react-native/Clients.js +1 -2
- package/dist/react-native/Clients.js.map +1 -1
- package/dist/react-native/ContainerClient.d.ts +1 -2
- package/dist/react-native/ContainerClient.d.ts.map +1 -1
- package/dist/react-native/ContainerClient.js +1 -2
- package/dist/react-native/ContainerClient.js.map +1 -1
- package/dist/react-native/Pipeline.d.ts +2 -3
- package/dist/react-native/Pipeline.d.ts.map +1 -1
- package/dist/react-native/Pipeline.js +1 -9
- package/dist/react-native/Pipeline.js.map +1 -1
- package/dist/react-native/StorageClient.d.ts +1 -2
- package/dist/react-native/StorageClient.d.ts.map +1 -1
- package/dist/react-native/StorageClient.js.map +1 -1
- package/dist/react-native/index.d.ts +1 -10
- package/dist/react-native/index.d.ts.map +1 -1
- package/dist/react-native/index.js +1 -10
- package/dist/react-native/index.js.map +1 -1
- package/dist/react-native/sas/AccountSASSignatureValues.d.ts +1 -1
- package/dist/react-native/sas/AccountSASSignatureValues.d.ts.map +1 -1
- package/dist/react-native/sas/AccountSASSignatureValues.js.map +1 -1
- package/dist/react-native/sas/BlobSASSignatureValues.d.ts +1 -1
- package/dist/react-native/sas/BlobSASSignatureValues.d.ts.map +1 -1
- package/dist/react-native/sas/BlobSASSignatureValues.js +1 -1
- package/dist/react-native/sas/BlobSASSignatureValues.js.map +1 -1
- package/dist/react-native/utils/constants.js +1 -1
- package/dist/react-native/utils/constants.js.map +1 -1
- package/package.json +8 -8
- package/dist/browser/StorageBrowserPolicyFactory.d.ts +0 -16
- package/dist/browser/StorageBrowserPolicyFactory.d.ts.map +0 -1
- package/dist/browser/StorageBrowserPolicyFactory.js +0 -19
- package/dist/browser/StorageBrowserPolicyFactory.js.map +0 -1
- package/dist/browser/StorageRetryPolicyFactory.d.ts +0 -66
- package/dist/browser/StorageRetryPolicyFactory.d.ts.map +0 -1
- package/dist/browser/StorageRetryPolicyFactory.js +0 -28
- package/dist/browser/StorageRetryPolicyFactory.js.map +0 -1
- package/dist/browser/credentials/AnonymousCredential.d.ts +0 -19
- package/dist/browser/credentials/AnonymousCredential.d.ts.map +0 -1
- package/dist/browser/credentials/AnonymousCredential.js +0 -22
- package/dist/browser/credentials/AnonymousCredential.js.map +0 -1
- package/dist/browser/credentials/Credential.d.ts +0 -20
- package/dist/browser/credentials/Credential.d.ts.map +0 -1
- package/dist/browser/credentials/Credential.js +0 -18
- package/dist/browser/credentials/Credential.js.map +0 -1
- package/dist/browser/credentials/StorageSharedKeyCredential-browser.d.mts.map +0 -1
- package/dist/browser/credentials/StorageSharedKeyCredential-browser.mjs.map +0 -1
- package/dist/browser/credentials/StorageSharedKeyCredential.d.ts +0 -3
- package/dist/browser/credentials/StorageSharedKeyCredential.js +0 -5
- package/dist/browser/policies/AnonymousCredentialPolicy.d.ts +0 -15
- package/dist/browser/policies/AnonymousCredentialPolicy.d.ts.map +0 -1
- package/dist/browser/policies/AnonymousCredentialPolicy.js +0 -20
- package/dist/browser/policies/AnonymousCredentialPolicy.js.map +0 -1
- package/dist/browser/policies/CredentialPolicy.d.ts +0 -22
- package/dist/browser/policies/CredentialPolicy.d.ts.map +0 -1
- package/dist/browser/policies/CredentialPolicy.js +0 -29
- package/dist/browser/policies/CredentialPolicy.js.map +0 -1
- package/dist/browser/policies/RequestPolicy.d.ts +0 -45
- package/dist/browser/policies/RequestPolicy.d.ts.map +0 -1
- package/dist/browser/policies/RequestPolicy.js +0 -42
- package/dist/browser/policies/RequestPolicy.js.map +0 -1
- package/dist/browser/policies/StorageBrowserPolicy.d.ts +0 -28
- package/dist/browser/policies/StorageBrowserPolicy.d.ts.map +0 -1
- package/dist/browser/policies/StorageBrowserPolicy.js +0 -47
- package/dist/browser/policies/StorageBrowserPolicy.js.map +0 -1
- package/dist/browser/policies/StorageBrowserPolicyV2.d.ts +0 -11
- package/dist/browser/policies/StorageBrowserPolicyV2.d.ts.map +0 -1
- package/dist/browser/policies/StorageBrowserPolicyV2.js +0 -31
- package/dist/browser/policies/StorageBrowserPolicyV2.js.map +0 -1
- package/dist/browser/policies/StorageCorrectContentLengthPolicy-browser.d.mts.map +0 -1
- package/dist/browser/policies/StorageCorrectContentLengthPolicy-browser.mjs.map +0 -1
- package/dist/browser/policies/StorageCorrectContentLengthPolicy.d.ts +0 -10
- package/dist/browser/policies/StorageCorrectContentLengthPolicy.js +0 -18
- package/dist/browser/policies/StorageRetryPolicy.d.ts +0 -62
- package/dist/browser/policies/StorageRetryPolicy.d.ts.map +0 -1
- package/dist/browser/policies/StorageRetryPolicy.js +0 -219
- package/dist/browser/policies/StorageRetryPolicy.js.map +0 -1
- package/dist/browser/policies/StorageRetryPolicyType.d.ts +0 -14
- package/dist/browser/policies/StorageRetryPolicyType.d.ts.map +0 -1
- package/dist/browser/policies/StorageRetryPolicyType.js +0 -17
- package/dist/browser/policies/StorageRetryPolicyType.js.map +0 -1
- package/dist/browser/policies/StorageRetryPolicyV2.d.ts +0 -11
- package/dist/browser/policies/StorageRetryPolicyV2.d.ts.map +0 -1
- package/dist/browser/policies/StorageRetryPolicyV2.js +0 -164
- package/dist/browser/policies/StorageRetryPolicyV2.js.map +0 -1
- package/dist/browser/policies/StorageSharedKeyCredentialPolicy.d.ts +0 -54
- package/dist/browser/policies/StorageSharedKeyCredentialPolicy.d.ts.map +0 -1
- package/dist/browser/policies/StorageSharedKeyCredentialPolicy.js +0 -145
- package/dist/browser/policies/StorageSharedKeyCredentialPolicy.js.map +0 -1
- package/dist/browser/policies/StorageSharedKeyCredentialPolicyV2-browser.d.mts.map +0 -1
- package/dist/browser/policies/StorageSharedKeyCredentialPolicyV2-browser.mjs.map +0 -1
- package/dist/browser/policies/StorageSharedKeyCredentialPolicyV2.d.ts +0 -17
- package/dist/browser/policies/StorageSharedKeyCredentialPolicyV2.js +0 -18
- package/dist/commonjs/StorageBrowserPolicyFactory.d.ts +0 -16
- package/dist/commonjs/StorageBrowserPolicyFactory.d.ts.map +0 -1
- package/dist/commonjs/StorageBrowserPolicyFactory.js +0 -23
- package/dist/commonjs/StorageBrowserPolicyFactory.js.map +0 -1
- package/dist/commonjs/StorageRetryPolicyFactory.d.ts +0 -66
- package/dist/commonjs/StorageRetryPolicyFactory.d.ts.map +0 -1
- package/dist/commonjs/StorageRetryPolicyFactory.js +0 -33
- package/dist/commonjs/StorageRetryPolicyFactory.js.map +0 -1
- package/dist/commonjs/credentials/AnonymousCredential.d.ts +0 -19
- package/dist/commonjs/credentials/AnonymousCredential.d.ts.map +0 -1
- package/dist/commonjs/credentials/AnonymousCredential.js +0 -26
- package/dist/commonjs/credentials/AnonymousCredential.js.map +0 -1
- package/dist/commonjs/credentials/Credential.d.ts +0 -20
- package/dist/commonjs/credentials/Credential.d.ts.map +0 -1
- package/dist/commonjs/credentials/Credential.js +0 -22
- package/dist/commonjs/credentials/Credential.js.map +0 -1
- package/dist/commonjs/credentials/StorageSharedKeyCredential.d.ts +0 -38
- package/dist/commonjs/credentials/StorageSharedKeyCredential.d.ts.map +0 -1
- package/dist/commonjs/credentials/StorageSharedKeyCredential.js +0 -52
- package/dist/commonjs/credentials/StorageSharedKeyCredential.js.map +0 -1
- package/dist/commonjs/policies/AnonymousCredentialPolicy.d.ts +0 -15
- package/dist/commonjs/policies/AnonymousCredentialPolicy.d.ts.map +0 -1
- package/dist/commonjs/policies/AnonymousCredentialPolicy.js +0 -24
- package/dist/commonjs/policies/AnonymousCredentialPolicy.js.map +0 -1
- package/dist/commonjs/policies/CredentialPolicy.d.ts +0 -22
- package/dist/commonjs/policies/CredentialPolicy.d.ts.map +0 -1
- package/dist/commonjs/policies/CredentialPolicy.js +0 -33
- package/dist/commonjs/policies/CredentialPolicy.js.map +0 -1
- package/dist/commonjs/policies/RequestPolicy.d.ts +0 -45
- package/dist/commonjs/policies/RequestPolicy.d.ts.map +0 -1
- package/dist/commonjs/policies/RequestPolicy.js +0 -46
- package/dist/commonjs/policies/RequestPolicy.js.map +0 -1
- package/dist/commonjs/policies/StorageBrowserPolicy.d.ts +0 -28
- package/dist/commonjs/policies/StorageBrowserPolicy.d.ts.map +0 -1
- package/dist/commonjs/policies/StorageBrowserPolicy.js +0 -51
- package/dist/commonjs/policies/StorageBrowserPolicy.js.map +0 -1
- package/dist/commonjs/policies/StorageBrowserPolicyV2.d.ts +0 -11
- package/dist/commonjs/policies/StorageBrowserPolicyV2.d.ts.map +0 -1
- package/dist/commonjs/policies/StorageBrowserPolicyV2.js +0 -35
- package/dist/commonjs/policies/StorageBrowserPolicyV2.js.map +0 -1
- package/dist/commonjs/policies/StorageCorrectContentLengthPolicy.d.ts +0 -10
- package/dist/commonjs/policies/StorageCorrectContentLengthPolicy.d.ts.map +0 -1
- package/dist/commonjs/policies/StorageCorrectContentLengthPolicy.js +0 -31
- package/dist/commonjs/policies/StorageCorrectContentLengthPolicy.js.map +0 -1
- package/dist/commonjs/policies/StorageRetryPolicy.d.ts +0 -62
- package/dist/commonjs/policies/StorageRetryPolicy.d.ts.map +0 -1
- package/dist/commonjs/policies/StorageRetryPolicy.js +0 -224
- package/dist/commonjs/policies/StorageRetryPolicy.js.map +0 -1
- package/dist/commonjs/policies/StorageRetryPolicyType.d.ts +0 -14
- package/dist/commonjs/policies/StorageRetryPolicyType.d.ts.map +0 -1
- package/dist/commonjs/policies/StorageRetryPolicyType.js +0 -20
- package/dist/commonjs/policies/StorageRetryPolicyType.js.map +0 -1
- package/dist/commonjs/policies/StorageRetryPolicyV2.d.ts +0 -11
- package/dist/commonjs/policies/StorageRetryPolicyV2.d.ts.map +0 -1
- package/dist/commonjs/policies/StorageRetryPolicyV2.js +0 -168
- package/dist/commonjs/policies/StorageRetryPolicyV2.js.map +0 -1
- package/dist/commonjs/policies/StorageSharedKeyCredentialPolicy.d.ts +0 -54
- package/dist/commonjs/policies/StorageSharedKeyCredentialPolicy.d.ts.map +0 -1
- package/dist/commonjs/policies/StorageSharedKeyCredentialPolicy.js +0 -149
- package/dist/commonjs/policies/StorageSharedKeyCredentialPolicy.js.map +0 -1
- package/dist/commonjs/policies/StorageSharedKeyCredentialPolicyV2.d.ts +0 -17
- package/dist/commonjs/policies/StorageSharedKeyCredentialPolicyV2.d.ts.map +0 -1
- package/dist/commonjs/policies/StorageSharedKeyCredentialPolicyV2.js +0 -136
- package/dist/commonjs/policies/StorageSharedKeyCredentialPolicyV2.js.map +0 -1
- package/dist/esm/StorageBrowserPolicyFactory.d.ts +0 -16
- package/dist/esm/StorageBrowserPolicyFactory.d.ts.map +0 -1
- package/dist/esm/StorageBrowserPolicyFactory.js +0 -19
- package/dist/esm/StorageBrowserPolicyFactory.js.map +0 -1
- package/dist/esm/StorageRetryPolicyFactory.d.ts +0 -66
- package/dist/esm/StorageRetryPolicyFactory.d.ts.map +0 -1
- package/dist/esm/StorageRetryPolicyFactory.js +0 -28
- package/dist/esm/StorageRetryPolicyFactory.js.map +0 -1
- package/dist/esm/credentials/AnonymousCredential.d.ts +0 -19
- package/dist/esm/credentials/AnonymousCredential.d.ts.map +0 -1
- package/dist/esm/credentials/AnonymousCredential.js +0 -22
- package/dist/esm/credentials/AnonymousCredential.js.map +0 -1
- package/dist/esm/credentials/Credential.d.ts +0 -20
- package/dist/esm/credentials/Credential.d.ts.map +0 -1
- package/dist/esm/credentials/Credential.js +0 -18
- package/dist/esm/credentials/Credential.js.map +0 -1
- package/dist/esm/credentials/StorageSharedKeyCredential.d.ts +0 -38
- package/dist/esm/credentials/StorageSharedKeyCredential.d.ts.map +0 -1
- package/dist/esm/credentials/StorageSharedKeyCredential.js +0 -48
- package/dist/esm/credentials/StorageSharedKeyCredential.js.map +0 -1
- package/dist/esm/policies/AnonymousCredentialPolicy.d.ts +0 -15
- package/dist/esm/policies/AnonymousCredentialPolicy.d.ts.map +0 -1
- package/dist/esm/policies/AnonymousCredentialPolicy.js +0 -20
- package/dist/esm/policies/AnonymousCredentialPolicy.js.map +0 -1
- package/dist/esm/policies/CredentialPolicy.d.ts +0 -22
- package/dist/esm/policies/CredentialPolicy.d.ts.map +0 -1
- package/dist/esm/policies/CredentialPolicy.js +0 -29
- package/dist/esm/policies/CredentialPolicy.js.map +0 -1
- package/dist/esm/policies/RequestPolicy.d.ts +0 -45
- package/dist/esm/policies/RequestPolicy.d.ts.map +0 -1
- package/dist/esm/policies/RequestPolicy.js +0 -42
- package/dist/esm/policies/RequestPolicy.js.map +0 -1
- package/dist/esm/policies/StorageBrowserPolicy.d.ts +0 -28
- package/dist/esm/policies/StorageBrowserPolicy.d.ts.map +0 -1
- package/dist/esm/policies/StorageBrowserPolicy.js +0 -47
- package/dist/esm/policies/StorageBrowserPolicy.js.map +0 -1
- package/dist/esm/policies/StorageBrowserPolicyV2.d.ts +0 -11
- package/dist/esm/policies/StorageBrowserPolicyV2.d.ts.map +0 -1
- package/dist/esm/policies/StorageBrowserPolicyV2.js +0 -31
- package/dist/esm/policies/StorageBrowserPolicyV2.js.map +0 -1
- package/dist/esm/policies/StorageCorrectContentLengthPolicy.d.ts +0 -10
- package/dist/esm/policies/StorageCorrectContentLengthPolicy.d.ts.map +0 -1
- package/dist/esm/policies/StorageCorrectContentLengthPolicy.js +0 -27
- package/dist/esm/policies/StorageCorrectContentLengthPolicy.js.map +0 -1
- package/dist/esm/policies/StorageRetryPolicy.d.ts +0 -62
- package/dist/esm/policies/StorageRetryPolicy.d.ts.map +0 -1
- package/dist/esm/policies/StorageRetryPolicy.js +0 -219
- package/dist/esm/policies/StorageRetryPolicy.js.map +0 -1
- package/dist/esm/policies/StorageRetryPolicyType.d.ts +0 -14
- package/dist/esm/policies/StorageRetryPolicyType.d.ts.map +0 -1
- package/dist/esm/policies/StorageRetryPolicyType.js +0 -17
- package/dist/esm/policies/StorageRetryPolicyType.js.map +0 -1
- package/dist/esm/policies/StorageRetryPolicyV2.d.ts +0 -11
- package/dist/esm/policies/StorageRetryPolicyV2.d.ts.map +0 -1
- package/dist/esm/policies/StorageRetryPolicyV2.js +0 -164
- package/dist/esm/policies/StorageRetryPolicyV2.js.map +0 -1
- package/dist/esm/policies/StorageSharedKeyCredentialPolicy.d.ts +0 -54
- package/dist/esm/policies/StorageSharedKeyCredentialPolicy.d.ts.map +0 -1
- package/dist/esm/policies/StorageSharedKeyCredentialPolicy.js +0 -145
- package/dist/esm/policies/StorageSharedKeyCredentialPolicy.js.map +0 -1
- package/dist/esm/policies/StorageSharedKeyCredentialPolicyV2.d.ts +0 -17
- package/dist/esm/policies/StorageSharedKeyCredentialPolicyV2.d.ts.map +0 -1
- package/dist/esm/policies/StorageSharedKeyCredentialPolicyV2.js +0 -132
- package/dist/esm/policies/StorageSharedKeyCredentialPolicyV2.js.map +0 -1
- package/dist/react-native/StorageBrowserPolicyFactory.d.ts +0 -16
- package/dist/react-native/StorageBrowserPolicyFactory.d.ts.map +0 -1
- package/dist/react-native/StorageBrowserPolicyFactory.js +0 -19
- package/dist/react-native/StorageBrowserPolicyFactory.js.map +0 -1
- package/dist/react-native/StorageRetryPolicyFactory.d.ts +0 -66
- package/dist/react-native/StorageRetryPolicyFactory.d.ts.map +0 -1
- package/dist/react-native/StorageRetryPolicyFactory.js +0 -28
- package/dist/react-native/StorageRetryPolicyFactory.js.map +0 -1
- package/dist/react-native/credentials/AnonymousCredential.d.ts +0 -19
- package/dist/react-native/credentials/AnonymousCredential.d.ts.map +0 -1
- package/dist/react-native/credentials/AnonymousCredential.js +0 -22
- package/dist/react-native/credentials/AnonymousCredential.js.map +0 -1
- package/dist/react-native/credentials/Credential.d.ts +0 -20
- package/dist/react-native/credentials/Credential.d.ts.map +0 -1
- package/dist/react-native/credentials/Credential.js +0 -18
- package/dist/react-native/credentials/Credential.js.map +0 -1
- package/dist/react-native/credentials/StorageSharedKeyCredential.d.ts +0 -38
- package/dist/react-native/credentials/StorageSharedKeyCredential.d.ts.map +0 -1
- package/dist/react-native/credentials/StorageSharedKeyCredential.js +0 -48
- package/dist/react-native/credentials/StorageSharedKeyCredential.js.map +0 -1
- package/dist/react-native/policies/AnonymousCredentialPolicy.d.ts +0 -15
- package/dist/react-native/policies/AnonymousCredentialPolicy.d.ts.map +0 -1
- package/dist/react-native/policies/AnonymousCredentialPolicy.js +0 -20
- package/dist/react-native/policies/AnonymousCredentialPolicy.js.map +0 -1
- package/dist/react-native/policies/CredentialPolicy.d.ts +0 -22
- package/dist/react-native/policies/CredentialPolicy.d.ts.map +0 -1
- package/dist/react-native/policies/CredentialPolicy.js +0 -29
- package/dist/react-native/policies/CredentialPolicy.js.map +0 -1
- package/dist/react-native/policies/RequestPolicy.d.ts +0 -45
- package/dist/react-native/policies/RequestPolicy.d.ts.map +0 -1
- package/dist/react-native/policies/RequestPolicy.js +0 -42
- package/dist/react-native/policies/RequestPolicy.js.map +0 -1
- package/dist/react-native/policies/StorageBrowserPolicy.d.ts +0 -28
- package/dist/react-native/policies/StorageBrowserPolicy.d.ts.map +0 -1
- package/dist/react-native/policies/StorageBrowserPolicy.js +0 -47
- package/dist/react-native/policies/StorageBrowserPolicy.js.map +0 -1
- package/dist/react-native/policies/StorageBrowserPolicyV2.d.ts +0 -11
- package/dist/react-native/policies/StorageBrowserPolicyV2.d.ts.map +0 -1
- package/dist/react-native/policies/StorageBrowserPolicyV2.js +0 -31
- package/dist/react-native/policies/StorageBrowserPolicyV2.js.map +0 -1
- package/dist/react-native/policies/StorageCorrectContentLengthPolicy.d.ts +0 -10
- package/dist/react-native/policies/StorageCorrectContentLengthPolicy.d.ts.map +0 -1
- package/dist/react-native/policies/StorageCorrectContentLengthPolicy.js +0 -27
- package/dist/react-native/policies/StorageCorrectContentLengthPolicy.js.map +0 -1
- package/dist/react-native/policies/StorageRetryPolicy.d.ts +0 -62
- package/dist/react-native/policies/StorageRetryPolicy.d.ts.map +0 -1
- package/dist/react-native/policies/StorageRetryPolicy.js +0 -219
- package/dist/react-native/policies/StorageRetryPolicy.js.map +0 -1
- package/dist/react-native/policies/StorageRetryPolicyType.d.ts +0 -14
- package/dist/react-native/policies/StorageRetryPolicyType.d.ts.map +0 -1
- package/dist/react-native/policies/StorageRetryPolicyType.js +0 -17
- package/dist/react-native/policies/StorageRetryPolicyType.js.map +0 -1
- package/dist/react-native/policies/StorageRetryPolicyV2.d.ts +0 -11
- package/dist/react-native/policies/StorageRetryPolicyV2.d.ts.map +0 -1
- package/dist/react-native/policies/StorageRetryPolicyV2.js +0 -164
- package/dist/react-native/policies/StorageRetryPolicyV2.js.map +0 -1
- package/dist/react-native/policies/StorageSharedKeyCredentialPolicy.d.ts +0 -54
- package/dist/react-native/policies/StorageSharedKeyCredentialPolicy.d.ts.map +0 -1
- package/dist/react-native/policies/StorageSharedKeyCredentialPolicy.js +0 -145
- package/dist/react-native/policies/StorageSharedKeyCredentialPolicy.js.map +0 -1
- package/dist/react-native/policies/StorageSharedKeyCredentialPolicyV2.d.ts +0 -17
- package/dist/react-native/policies/StorageSharedKeyCredentialPolicyV2.d.ts.map +0 -1
- package/dist/react-native/policies/StorageSharedKeyCredentialPolicyV2.js +0 -132
- package/dist/react-native/policies/StorageSharedKeyCredentialPolicyV2.js.map +0 -1
|
@@ -1,145 +0,0 @@
|
|
|
1
|
-
// Copyright (c) Microsoft Corporation.
|
|
2
|
-
// Licensed under the MIT License.
|
|
3
|
-
import { HeaderConstants } from "../utils/constants.js";
|
|
4
|
-
import { getURLPath, getURLQueries } from "../utils/utils.common.js";
|
|
5
|
-
import { CredentialPolicy } from "./CredentialPolicy.js";
|
|
6
|
-
import { compareHeader } from "../utils/SharedKeyComparator.js";
|
|
7
|
-
/**
|
|
8
|
-
* StorageSharedKeyCredentialPolicy is a policy used to sign HTTP request with a shared key.
|
|
9
|
-
*/
|
|
10
|
-
export class StorageSharedKeyCredentialPolicy extends CredentialPolicy {
|
|
11
|
-
/**
|
|
12
|
-
* Reference to StorageSharedKeyCredential which generates StorageSharedKeyCredentialPolicy
|
|
13
|
-
*/
|
|
14
|
-
factory;
|
|
15
|
-
/**
|
|
16
|
-
* Creates an instance of StorageSharedKeyCredentialPolicy.
|
|
17
|
-
* @param nextPolicy -
|
|
18
|
-
* @param options -
|
|
19
|
-
* @param factory -
|
|
20
|
-
*/
|
|
21
|
-
constructor(nextPolicy, options, factory) {
|
|
22
|
-
super(nextPolicy, options);
|
|
23
|
-
this.factory = factory;
|
|
24
|
-
}
|
|
25
|
-
/**
|
|
26
|
-
* Signs request.
|
|
27
|
-
*
|
|
28
|
-
* @param request -
|
|
29
|
-
*/
|
|
30
|
-
signRequest(request) {
|
|
31
|
-
request.headers.set(HeaderConstants.X_MS_DATE, new Date().toUTCString());
|
|
32
|
-
if (request.body &&
|
|
33
|
-
(typeof request.body === "string" || request.body !== undefined) &&
|
|
34
|
-
request.body.length > 0) {
|
|
35
|
-
request.headers.set(HeaderConstants.CONTENT_LENGTH, Buffer.byteLength(request.body));
|
|
36
|
-
}
|
|
37
|
-
const stringToSign = [
|
|
38
|
-
request.method.toUpperCase(),
|
|
39
|
-
this.getHeaderValueToSign(request, HeaderConstants.CONTENT_LANGUAGE),
|
|
40
|
-
this.getHeaderValueToSign(request, HeaderConstants.CONTENT_ENCODING),
|
|
41
|
-
this.getHeaderValueToSign(request, HeaderConstants.CONTENT_LENGTH),
|
|
42
|
-
this.getHeaderValueToSign(request, HeaderConstants.CONTENT_MD5),
|
|
43
|
-
this.getHeaderValueToSign(request, HeaderConstants.CONTENT_TYPE),
|
|
44
|
-
this.getHeaderValueToSign(request, HeaderConstants.DATE),
|
|
45
|
-
this.getHeaderValueToSign(request, HeaderConstants.IF_MODIFIED_SINCE),
|
|
46
|
-
this.getHeaderValueToSign(request, HeaderConstants.IF_MATCH),
|
|
47
|
-
this.getHeaderValueToSign(request, HeaderConstants.IF_NONE_MATCH),
|
|
48
|
-
this.getHeaderValueToSign(request, HeaderConstants.IF_UNMODIFIED_SINCE),
|
|
49
|
-
this.getHeaderValueToSign(request, HeaderConstants.RANGE),
|
|
50
|
-
].join("\n") +
|
|
51
|
-
"\n" +
|
|
52
|
-
this.getCanonicalizedHeadersString(request) +
|
|
53
|
-
this.getCanonicalizedResourceString(request);
|
|
54
|
-
const signature = this.factory.computeHMACSHA256(stringToSign);
|
|
55
|
-
request.headers.set(HeaderConstants.AUTHORIZATION, `SharedKey ${this.factory.accountName}:${signature}`);
|
|
56
|
-
// console.log(`[URL]:${request.url}`);
|
|
57
|
-
// console.log(`[HEADERS]:${request.headers.toString()}`);
|
|
58
|
-
// console.log(`[STRING TO SIGN]:${JSON.stringify(stringToSign)}`);
|
|
59
|
-
// console.log(`[KEY]: ${request.headers.get(HeaderConstants.AUTHORIZATION)}`);
|
|
60
|
-
return request;
|
|
61
|
-
}
|
|
62
|
-
/**
|
|
63
|
-
* Retrieve header value according to shared key sign rules.
|
|
64
|
-
* @see https://learn.microsoft.com/rest/api/storageservices/authenticate-with-shared-key
|
|
65
|
-
*
|
|
66
|
-
* @param request -
|
|
67
|
-
* @param headerName -
|
|
68
|
-
*/
|
|
69
|
-
getHeaderValueToSign(request, headerName) {
|
|
70
|
-
const value = request.headers.get(headerName);
|
|
71
|
-
if (!value) {
|
|
72
|
-
return "";
|
|
73
|
-
}
|
|
74
|
-
// When using version 2015-02-21 or later, if Content-Length is zero, then
|
|
75
|
-
// set the Content-Length part of the StringToSign to an empty string.
|
|
76
|
-
// https://learn.microsoft.com/rest/api/storageservices/authenticate-with-shared-key
|
|
77
|
-
if (headerName === HeaderConstants.CONTENT_LENGTH && value === "0") {
|
|
78
|
-
return "";
|
|
79
|
-
}
|
|
80
|
-
return value;
|
|
81
|
-
}
|
|
82
|
-
/**
|
|
83
|
-
* To construct the CanonicalizedHeaders portion of the signature string, follow these steps:
|
|
84
|
-
* 1. Retrieve all headers for the resource that begin with x-ms-, including the x-ms-date header.
|
|
85
|
-
* 2. Convert each HTTP header name to lowercase.
|
|
86
|
-
* 3. Sort the headers lexicographically by header name, in ascending order.
|
|
87
|
-
* Each header may appear only once in the string.
|
|
88
|
-
* 4. Replace any linear whitespace in the header value with a single space.
|
|
89
|
-
* 5. Trim any whitespace around the colon in the header.
|
|
90
|
-
* 6. Finally, append a new-line character to each canonicalized header in the resulting list.
|
|
91
|
-
* Construct the CanonicalizedHeaders string by concatenating all headers in this list into a single string.
|
|
92
|
-
*
|
|
93
|
-
* @param request -
|
|
94
|
-
*/
|
|
95
|
-
getCanonicalizedHeadersString(request) {
|
|
96
|
-
let headersArray = request.headers.headersArray().filter((value) => {
|
|
97
|
-
return value.name.toLowerCase().startsWith(HeaderConstants.PREFIX_FOR_STORAGE);
|
|
98
|
-
});
|
|
99
|
-
headersArray.sort((a, b) => {
|
|
100
|
-
return compareHeader(a.name.toLowerCase(), b.name.toLowerCase());
|
|
101
|
-
});
|
|
102
|
-
// Remove duplicate headers
|
|
103
|
-
headersArray = headersArray.filter((value, index, array) => {
|
|
104
|
-
if (index > 0 && value.name.toLowerCase() === array[index - 1].name.toLowerCase()) {
|
|
105
|
-
return false;
|
|
106
|
-
}
|
|
107
|
-
return true;
|
|
108
|
-
});
|
|
109
|
-
let canonicalizedHeadersStringToSign = "";
|
|
110
|
-
headersArray.forEach((header) => {
|
|
111
|
-
canonicalizedHeadersStringToSign += `${header.name
|
|
112
|
-
.toLowerCase()
|
|
113
|
-
.trimRight()}:${header.value.trimLeft()}\n`;
|
|
114
|
-
});
|
|
115
|
-
return canonicalizedHeadersStringToSign;
|
|
116
|
-
}
|
|
117
|
-
/**
|
|
118
|
-
* Retrieves the webResource canonicalized resource string.
|
|
119
|
-
*
|
|
120
|
-
* @param request -
|
|
121
|
-
*/
|
|
122
|
-
getCanonicalizedResourceString(request) {
|
|
123
|
-
const path = getURLPath(request.url) || "/";
|
|
124
|
-
let canonicalizedResourceString = "";
|
|
125
|
-
canonicalizedResourceString += `/${this.factory.accountName}${path}`;
|
|
126
|
-
const queries = getURLQueries(request.url);
|
|
127
|
-
const lowercaseQueries = {};
|
|
128
|
-
if (queries) {
|
|
129
|
-
const queryKeys = [];
|
|
130
|
-
for (const key in queries) {
|
|
131
|
-
if (Object.prototype.hasOwnProperty.call(queries, key)) {
|
|
132
|
-
const lowercaseKey = key.toLowerCase();
|
|
133
|
-
lowercaseQueries[lowercaseKey] = queries[key];
|
|
134
|
-
queryKeys.push(lowercaseKey);
|
|
135
|
-
}
|
|
136
|
-
}
|
|
137
|
-
queryKeys.sort();
|
|
138
|
-
for (const key of queryKeys) {
|
|
139
|
-
canonicalizedResourceString += `\n${key}:${decodeURIComponent(lowercaseQueries[key])}`;
|
|
140
|
-
}
|
|
141
|
-
}
|
|
142
|
-
return canonicalizedResourceString;
|
|
143
|
-
}
|
|
144
|
-
}
|
|
145
|
-
//# sourceMappingURL=StorageSharedKeyCredentialPolicy.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"StorageSharedKeyCredentialPolicy.js","sourceRoot":"","sources":["../../../src/policies/StorageSharedKeyCredentialPolicy.ts"],"names":[],"mappings":"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","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type {\n RequestPolicy,\n RequestPolicyOptionsLike as RequestPolicyOptions,\n WebResourceLike as WebResource,\n} from \"@azure/core-http-compat\";\nimport type { StorageSharedKeyCredential } from \"../credentials/StorageSharedKeyCredential.js\";\nimport { HeaderConstants } from \"../utils/constants.js\";\nimport { getURLPath, getURLQueries } from \"../utils/utils.common.js\";\nimport { CredentialPolicy } from \"./CredentialPolicy.js\";\nimport { compareHeader } from \"../utils/SharedKeyComparator.js\";\n\n/**\n * StorageSharedKeyCredentialPolicy is a policy used to sign HTTP request with a shared key.\n */\nexport class StorageSharedKeyCredentialPolicy extends CredentialPolicy {\n /**\n * Reference to StorageSharedKeyCredential which generates StorageSharedKeyCredentialPolicy\n */\n private readonly factory: StorageSharedKeyCredential;\n\n /**\n * Creates an instance of StorageSharedKeyCredentialPolicy.\n * @param nextPolicy -\n * @param options -\n * @param factory -\n */\n constructor(\n nextPolicy: RequestPolicy,\n options: RequestPolicyOptions,\n factory: StorageSharedKeyCredential,\n ) {\n super(nextPolicy, options);\n this.factory = factory;\n }\n\n /**\n * Signs request.\n *\n * @param request -\n */\n protected signRequest(request: WebResource): WebResource {\n request.headers.set(HeaderConstants.X_MS_DATE, new Date().toUTCString());\n\n if (\n request.body &&\n (typeof request.body === \"string\" || (request.body as Buffer) !== undefined) &&\n request.body.length > 0\n ) {\n request.headers.set(HeaderConstants.CONTENT_LENGTH, Buffer.byteLength(request.body));\n }\n\n const stringToSign: string =\n [\n request.method.toUpperCase(),\n this.getHeaderValueToSign(request, HeaderConstants.CONTENT_LANGUAGE),\n this.getHeaderValueToSign(request, HeaderConstants.CONTENT_ENCODING),\n this.getHeaderValueToSign(request, HeaderConstants.CONTENT_LENGTH),\n this.getHeaderValueToSign(request, HeaderConstants.CONTENT_MD5),\n this.getHeaderValueToSign(request, HeaderConstants.CONTENT_TYPE),\n this.getHeaderValueToSign(request, HeaderConstants.DATE),\n this.getHeaderValueToSign(request, HeaderConstants.IF_MODIFIED_SINCE),\n this.getHeaderValueToSign(request, HeaderConstants.IF_MATCH),\n this.getHeaderValueToSign(request, HeaderConstants.IF_NONE_MATCH),\n this.getHeaderValueToSign(request, HeaderConstants.IF_UNMODIFIED_SINCE),\n this.getHeaderValueToSign(request, HeaderConstants.RANGE),\n ].join(\"\\n\") +\n \"\\n\" +\n this.getCanonicalizedHeadersString(request) +\n this.getCanonicalizedResourceString(request);\n\n const signature: string = this.factory.computeHMACSHA256(stringToSign);\n request.headers.set(\n HeaderConstants.AUTHORIZATION,\n `SharedKey ${this.factory.accountName}:${signature}`,\n );\n\n // console.log(`[URL]:${request.url}`);\n // console.log(`[HEADERS]:${request.headers.toString()}`);\n // console.log(`[STRING TO SIGN]:${JSON.stringify(stringToSign)}`);\n // console.log(`[KEY]: ${request.headers.get(HeaderConstants.AUTHORIZATION)}`);\n return request;\n }\n\n /**\n * Retrieve header value according to shared key sign rules.\n * @see https://learn.microsoft.com/rest/api/storageservices/authenticate-with-shared-key\n *\n * @param request -\n * @param headerName -\n */\n private getHeaderValueToSign(request: WebResource, headerName: string): string {\n const value = request.headers.get(headerName);\n\n if (!value) {\n return \"\";\n }\n\n // When using version 2015-02-21 or later, if Content-Length is zero, then\n // set the Content-Length part of the StringToSign to an empty string.\n // https://learn.microsoft.com/rest/api/storageservices/authenticate-with-shared-key\n if (headerName === HeaderConstants.CONTENT_LENGTH && value === \"0\") {\n return \"\";\n }\n\n return value;\n }\n\n /**\n * To construct the CanonicalizedHeaders portion of the signature string, follow these steps:\n * 1. Retrieve all headers for the resource that begin with x-ms-, including the x-ms-date header.\n * 2. Convert each HTTP header name to lowercase.\n * 3. Sort the headers lexicographically by header name, in ascending order.\n * Each header may appear only once in the string.\n * 4. Replace any linear whitespace in the header value with a single space.\n * 5. Trim any whitespace around the colon in the header.\n * 6. Finally, append a new-line character to each canonicalized header in the resulting list.\n * Construct the CanonicalizedHeaders string by concatenating all headers in this list into a single string.\n *\n * @param request -\n */\n private getCanonicalizedHeadersString(request: WebResource): string {\n let headersArray = request.headers.headersArray().filter((value) => {\n return value.name.toLowerCase().startsWith(HeaderConstants.PREFIX_FOR_STORAGE);\n });\n\n headersArray.sort((a, b): number => {\n return compareHeader(a.name.toLowerCase(), b.name.toLowerCase());\n });\n\n // Remove duplicate headers\n headersArray = headersArray.filter((value, index, array) => {\n if (index > 0 && value.name.toLowerCase() === array[index - 1].name.toLowerCase()) {\n return false;\n }\n return true;\n });\n\n let canonicalizedHeadersStringToSign: string = \"\";\n headersArray.forEach((header) => {\n canonicalizedHeadersStringToSign += `${header.name\n .toLowerCase()\n .trimRight()}:${header.value.trimLeft()}\\n`;\n });\n\n return canonicalizedHeadersStringToSign;\n }\n\n /**\n * Retrieves the webResource canonicalized resource string.\n *\n * @param request -\n */\n private getCanonicalizedResourceString(request: WebResource): string {\n const path = getURLPath(request.url) || \"/\";\n\n let canonicalizedResourceString: string = \"\";\n canonicalizedResourceString += `/${this.factory.accountName}${path}`;\n\n const queries = getURLQueries(request.url);\n const lowercaseQueries: { [key: string]: string } = {};\n if (queries) {\n const queryKeys: string[] = [];\n for (const key in queries) {\n if (Object.prototype.hasOwnProperty.call(queries, key)) {\n const lowercaseKey = key.toLowerCase();\n lowercaseQueries[lowercaseKey] = queries[key];\n queryKeys.push(lowercaseKey);\n }\n }\n\n queryKeys.sort();\n for (const key of queryKeys) {\n canonicalizedResourceString += `\\n${key}:${decodeURIComponent(lowercaseQueries[key])}`;\n }\n }\n\n return canonicalizedResourceString;\n }\n}\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"StorageSharedKeyCredentialPolicyV2-browser.d.mts","sourceRoot":"","sources":["../../../src/policies/StorageSharedKeyCredentialPolicyV2-browser.mts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAIV,cAAc,EACf,MAAM,2BAA2B,CAAC;AACnC;;GAEG;AACH,eAAO,MAAM,oCAAoC,qCAAqC,CAAC;AAEvF;;GAEG;AACH,MAAM,WAAW,uCAAuC;IACtD,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,MAAM,CAAC;CACpB;AAED;;GAEG;AACH,wBAAgB,gCAAgC,CAC9C,QAAQ,EAAE,uCAAuC,GAChD,cAAc,CAOhB"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"StorageSharedKeyCredentialPolicyV2-browser.mjs","sourceRoot":"","sources":["../../../src/policies/StorageSharedKeyCredentialPolicyV2-browser.mts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAQlC;;GAEG;AACH,MAAM,CAAC,MAAM,oCAAoC,GAAG,kCAAkC,CAAC;AAUvF;;GAEG;AACH,MAAM,UAAU,gCAAgC,CAC9C,QAAiD;IAEjD,OAAO;QACL,IAAI,EAAE,oCAAoC;QAC1C,KAAK,CAAC,WAAW,CAAC,OAAwB,EAAE,IAAiB;YAC3D,OAAO,IAAI,CAAC,OAAO,CAAC,CAAC;QACvB,CAAC;KACF,CAAC;AACJ,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type {\n PipelineRequest,\n PipelineResponse,\n SendRequest,\n PipelinePolicy,\n} from \"@azure/core-rest-pipeline\";\n/**\n * The programmatic identifier of the storageSharedKeyCredentialPolicy.\n */\nexport const storageSharedKeyCredentialPolicyName = \"storageSharedKeyCredentialPolicy\";\n\n/**\n * Options used to configure StorageSharedKeyCredentialPolicy.\n */\nexport interface StorageSharedKeyCredentialPolicyOptions {\n accountName: string;\n accountKey: Buffer;\n}\n\n/**\n * storageSharedKeyCredentialPolicy handles signing requests using storage account keys.\n */\nexport function storageSharedKeyCredentialPolicy(\n _options: StorageSharedKeyCredentialPolicyOptions,\n): PipelinePolicy {\n return {\n name: storageSharedKeyCredentialPolicyName,\n async sendRequest(request: PipelineRequest, next: SendRequest): Promise<PipelineResponse> {\n return next(request);\n },\n };\n}\n"]}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import type { PipelinePolicy } from "@azure/core-rest-pipeline";
|
|
2
|
-
/**
|
|
3
|
-
* The programmatic identifier of the storageSharedKeyCredentialPolicy.
|
|
4
|
-
*/
|
|
5
|
-
export declare const storageSharedKeyCredentialPolicyName = "storageSharedKeyCredentialPolicy";
|
|
6
|
-
/**
|
|
7
|
-
* Options used to configure StorageSharedKeyCredentialPolicy.
|
|
8
|
-
*/
|
|
9
|
-
export interface StorageSharedKeyCredentialPolicyOptions {
|
|
10
|
-
accountName: string;
|
|
11
|
-
accountKey: Buffer;
|
|
12
|
-
}
|
|
13
|
-
/**
|
|
14
|
-
* storageSharedKeyCredentialPolicy handles signing requests using storage account keys.
|
|
15
|
-
*/
|
|
16
|
-
export declare function storageSharedKeyCredentialPolicy(_options: StorageSharedKeyCredentialPolicyOptions): PipelinePolicy;
|
|
17
|
-
//# sourceMappingURL=StorageSharedKeyCredentialPolicyV2-browser.d.mts.map
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
// Copyright (c) Microsoft Corporation.
|
|
2
|
-
// Licensed under the MIT License.
|
|
3
|
-
/**
|
|
4
|
-
* The programmatic identifier of the storageSharedKeyCredentialPolicy.
|
|
5
|
-
*/
|
|
6
|
-
export const storageSharedKeyCredentialPolicyName = "storageSharedKeyCredentialPolicy";
|
|
7
|
-
/**
|
|
8
|
-
* storageSharedKeyCredentialPolicy handles signing requests using storage account keys.
|
|
9
|
-
*/
|
|
10
|
-
export function storageSharedKeyCredentialPolicy(_options) {
|
|
11
|
-
return {
|
|
12
|
-
name: storageSharedKeyCredentialPolicyName,
|
|
13
|
-
async sendRequest(request, next) {
|
|
14
|
-
return next(request);
|
|
15
|
-
},
|
|
16
|
-
};
|
|
17
|
-
}
|
|
18
|
-
//# sourceMappingURL=StorageSharedKeyCredentialPolicyV2-browser.mjs.map
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import type { RequestPolicy, RequestPolicyOptionsLike as RequestPolicyOptions, RequestPolicyFactory } from "@azure/core-http-compat";
|
|
2
|
-
import { StorageBrowserPolicy } from "./policies/StorageBrowserPolicy.js";
|
|
3
|
-
export { StorageBrowserPolicy };
|
|
4
|
-
/**
|
|
5
|
-
* StorageBrowserPolicyFactory is a factory class helping generating StorageBrowserPolicy objects.
|
|
6
|
-
*/
|
|
7
|
-
export declare class StorageBrowserPolicyFactory implements RequestPolicyFactory {
|
|
8
|
-
/**
|
|
9
|
-
* Creates a StorageBrowserPolicyFactory object.
|
|
10
|
-
*
|
|
11
|
-
* @param nextPolicy -
|
|
12
|
-
* @param options -
|
|
13
|
-
*/
|
|
14
|
-
create(nextPolicy: RequestPolicy, options: RequestPolicyOptions): StorageBrowserPolicy;
|
|
15
|
-
}
|
|
16
|
-
//# sourceMappingURL=StorageBrowserPolicyFactory.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"StorageBrowserPolicyFactory.d.ts","sourceRoot":"","sources":["../../src/StorageBrowserPolicyFactory.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EACV,aAAa,EACb,wBAAwB,IAAI,oBAAoB,EAChD,oBAAoB,EACrB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,oBAAoB,EAAE,MAAM,oCAAoC,CAAC;AAC1E,OAAO,EAAE,oBAAoB,EAAE,CAAC;AAEhC;;GAEG;AACH,qBAAa,2BAA4B,YAAW,oBAAoB;IACtE;;;;;OAKG;IACI,MAAM,CAAC,UAAU,EAAE,aAAa,EAAE,OAAO,EAAE,oBAAoB,GAAG,oBAAoB;CAG9F"}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
// Copyright (c) Microsoft Corporation.
|
|
3
|
-
// Licensed under the MIT License.
|
|
4
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
-
exports.StorageBrowserPolicyFactory = exports.StorageBrowserPolicy = void 0;
|
|
6
|
-
const StorageBrowserPolicy_js_1 = require("./policies/StorageBrowserPolicy.js");
|
|
7
|
-
Object.defineProperty(exports, "StorageBrowserPolicy", { enumerable: true, get: function () { return StorageBrowserPolicy_js_1.StorageBrowserPolicy; } });
|
|
8
|
-
/**
|
|
9
|
-
* StorageBrowserPolicyFactory is a factory class helping generating StorageBrowserPolicy objects.
|
|
10
|
-
*/
|
|
11
|
-
class StorageBrowserPolicyFactory {
|
|
12
|
-
/**
|
|
13
|
-
* Creates a StorageBrowserPolicyFactory object.
|
|
14
|
-
*
|
|
15
|
-
* @param nextPolicy -
|
|
16
|
-
* @param options -
|
|
17
|
-
*/
|
|
18
|
-
create(nextPolicy, options) {
|
|
19
|
-
return new StorageBrowserPolicy_js_1.StorageBrowserPolicy(nextPolicy, options);
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
exports.StorageBrowserPolicyFactory = StorageBrowserPolicyFactory;
|
|
23
|
-
//# sourceMappingURL=StorageBrowserPolicyFactory.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"StorageBrowserPolicyFactory.js","sourceRoot":"","sources":["../../src/StorageBrowserPolicyFactory.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;;AAOlC,gFAA0E;AACjE,qGADA,8CAAoB,OACA;AAE7B;;GAEG;AACH,MAAa,2BAA2B;IACtC;;;;;OAKG;IACI,MAAM,CAAC,UAAyB,EAAE,OAA6B;QACpE,OAAO,IAAI,8CAAoB,CAAC,UAAU,EAAE,OAAO,CAAC,CAAC;IACvD,CAAC;CACF;AAVD,kEAUC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type {\n RequestPolicy,\n RequestPolicyOptionsLike as RequestPolicyOptions,\n RequestPolicyFactory,\n} from \"@azure/core-http-compat\";\nimport { StorageBrowserPolicy } from \"./policies/StorageBrowserPolicy.js\";\nexport { StorageBrowserPolicy };\n\n/**\n * StorageBrowserPolicyFactory is a factory class helping generating StorageBrowserPolicy objects.\n */\nexport class StorageBrowserPolicyFactory implements RequestPolicyFactory {\n /**\n * Creates a StorageBrowserPolicyFactory object.\n *\n * @param nextPolicy -\n * @param options -\n */\n public create(nextPolicy: RequestPolicy, options: RequestPolicyOptions): StorageBrowserPolicy {\n return new StorageBrowserPolicy(nextPolicy, options);\n }\n}\n"]}
|
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
import type { RequestPolicy, RequestPolicyOptionsLike as RequestPolicyOptions, RequestPolicyFactory } from "@azure/core-http-compat";
|
|
2
|
-
import { StorageRetryPolicy } from "./policies/StorageRetryPolicy.js";
|
|
3
|
-
import { StorageRetryPolicyType } from "./policies/StorageRetryPolicyType.js";
|
|
4
|
-
export { StorageRetryPolicyType, StorageRetryPolicy };
|
|
5
|
-
/**
|
|
6
|
-
* Storage Blob retry options interface.
|
|
7
|
-
*/
|
|
8
|
-
export interface StorageRetryOptions {
|
|
9
|
-
/**
|
|
10
|
-
* Optional. StorageRetryPolicyType, default is exponential retry policy.
|
|
11
|
-
*/
|
|
12
|
-
readonly retryPolicyType?: StorageRetryPolicyType;
|
|
13
|
-
/**
|
|
14
|
-
* Optional. Max try number of attempts, default is 4.
|
|
15
|
-
* A value of 1 means 1 try and no retries.
|
|
16
|
-
* A value smaller than 1 means default retry number of attempts.
|
|
17
|
-
*/
|
|
18
|
-
readonly maxTries?: number;
|
|
19
|
-
/**
|
|
20
|
-
* Optional. Indicates the maximum time in ms allowed for any single try of an HTTP request.
|
|
21
|
-
* A value of zero or undefined means no default timeout on SDK client, Azure
|
|
22
|
-
* Storage server's default timeout policy will be used.
|
|
23
|
-
*
|
|
24
|
-
* @see https://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-blob-service-operations
|
|
25
|
-
*/
|
|
26
|
-
readonly tryTimeoutInMs?: number;
|
|
27
|
-
/**
|
|
28
|
-
* Optional. Specifies the amount of delay to use before retrying an operation (default is 4s or 4 * 1000ms).
|
|
29
|
-
* The delay increases (exponentially or linearly) with each retry up to a maximum specified by
|
|
30
|
-
* maxRetryDelayInMs. If you specify 0, then you must also specify 0 for maxRetryDelayInMs.
|
|
31
|
-
*/
|
|
32
|
-
readonly retryDelayInMs?: number;
|
|
33
|
-
/**
|
|
34
|
-
* Optional. Specifies the maximum delay allowed before retrying an operation (default is 120s or 120 * 1000ms).
|
|
35
|
-
* If you specify 0, then you must also specify 0 for retryDelayInMs.
|
|
36
|
-
*/
|
|
37
|
-
readonly maxRetryDelayInMs?: number;
|
|
38
|
-
/**
|
|
39
|
-
* If a secondaryHost is specified, retries will be tried against this host. If secondaryHost is undefined
|
|
40
|
-
* (the default) then operations are not retried against another host.
|
|
41
|
-
*
|
|
42
|
-
* NOTE: Before setting this field, make sure you understand the issues around
|
|
43
|
-
* reading stale and potentially-inconsistent data at
|
|
44
|
-
* {@link https://learn.microsoft.com/azure/storage/common/storage-designing-ha-apps-with-ragrs}
|
|
45
|
-
*/
|
|
46
|
-
readonly secondaryHost?: string;
|
|
47
|
-
}
|
|
48
|
-
/**
|
|
49
|
-
* StorageRetryPolicyFactory is a factory class helping generating {@link StorageRetryPolicy} objects.
|
|
50
|
-
*/
|
|
51
|
-
export declare class StorageRetryPolicyFactory implements RequestPolicyFactory {
|
|
52
|
-
private retryOptions?;
|
|
53
|
-
/**
|
|
54
|
-
* Creates an instance of StorageRetryPolicyFactory.
|
|
55
|
-
* @param retryOptions -
|
|
56
|
-
*/
|
|
57
|
-
constructor(retryOptions?: StorageRetryOptions);
|
|
58
|
-
/**
|
|
59
|
-
* Creates a StorageRetryPolicy object.
|
|
60
|
-
*
|
|
61
|
-
* @param nextPolicy -
|
|
62
|
-
* @param options -
|
|
63
|
-
*/
|
|
64
|
-
create(nextPolicy: RequestPolicy, options: RequestPolicyOptions): StorageRetryPolicy;
|
|
65
|
-
}
|
|
66
|
-
//# sourceMappingURL=StorageRetryPolicyFactory.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"StorageRetryPolicyFactory.d.ts","sourceRoot":"","sources":["../../src/StorageRetryPolicyFactory.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EACV,aAAa,EACb,wBAAwB,IAAI,oBAAoB,EAChD,oBAAoB,EACrB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,kBAAkB,EAAE,MAAM,kCAAkC,CAAC;AACtE,OAAO,EAAE,sBAAsB,EAAE,MAAM,sCAAsC,CAAC;AAE9E,OAAO,EAAE,sBAAsB,EAAE,kBAAkB,EAAE,CAAC;AAEtD;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAClC;;OAEG;IACH,QAAQ,CAAC,eAAe,CAAC,EAAE,sBAAsB,CAAC;IAElD;;;;OAIG;IACH,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAE3B;;;;;;OAMG;IACH,QAAQ,CAAC,cAAc,CAAC,EAAE,MAAM,CAAC;IAEjC;;;;OAIG;IACH,QAAQ,CAAC,cAAc,CAAC,EAAE,MAAM,CAAC;IAEjC;;;OAGG;IACH,QAAQ,CAAC,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAEpC;;;;;;;OAOG;IACH,QAAQ,CAAC,aAAa,CAAC,EAAE,MAAM,CAAC;CACjC;AAED;;GAEG;AACH,qBAAa,yBAA0B,YAAW,oBAAoB;IACpE,OAAO,CAAC,YAAY,CAAC,CAAsB;IAE3C;;;OAGG;gBACS,YAAY,CAAC,EAAE,mBAAmB;IAI9C;;;;;OAKG;IACI,MAAM,CAAC,UAAU,EAAE,aAAa,EAAE,OAAO,EAAE,oBAAoB,GAAG,kBAAkB;CAG5F"}
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
// Copyright (c) Microsoft Corporation.
|
|
3
|
-
// Licensed under the MIT License.
|
|
4
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
-
exports.StorageRetryPolicyFactory = exports.StorageRetryPolicy = exports.StorageRetryPolicyType = void 0;
|
|
6
|
-
const StorageRetryPolicy_js_1 = require("./policies/StorageRetryPolicy.js");
|
|
7
|
-
Object.defineProperty(exports, "StorageRetryPolicy", { enumerable: true, get: function () { return StorageRetryPolicy_js_1.StorageRetryPolicy; } });
|
|
8
|
-
const StorageRetryPolicyType_js_1 = require("./policies/StorageRetryPolicyType.js");
|
|
9
|
-
Object.defineProperty(exports, "StorageRetryPolicyType", { enumerable: true, get: function () { return StorageRetryPolicyType_js_1.StorageRetryPolicyType; } });
|
|
10
|
-
/**
|
|
11
|
-
* StorageRetryPolicyFactory is a factory class helping generating {@link StorageRetryPolicy} objects.
|
|
12
|
-
*/
|
|
13
|
-
class StorageRetryPolicyFactory {
|
|
14
|
-
retryOptions;
|
|
15
|
-
/**
|
|
16
|
-
* Creates an instance of StorageRetryPolicyFactory.
|
|
17
|
-
* @param retryOptions -
|
|
18
|
-
*/
|
|
19
|
-
constructor(retryOptions) {
|
|
20
|
-
this.retryOptions = retryOptions;
|
|
21
|
-
}
|
|
22
|
-
/**
|
|
23
|
-
* Creates a StorageRetryPolicy object.
|
|
24
|
-
*
|
|
25
|
-
* @param nextPolicy -
|
|
26
|
-
* @param options -
|
|
27
|
-
*/
|
|
28
|
-
create(nextPolicy, options) {
|
|
29
|
-
return new StorageRetryPolicy_js_1.StorageRetryPolicy(nextPolicy, options, this.retryOptions);
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
exports.StorageRetryPolicyFactory = StorageRetryPolicyFactory;
|
|
33
|
-
//# sourceMappingURL=StorageRetryPolicyFactory.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"StorageRetryPolicyFactory.js","sourceRoot":"","sources":["../../src/StorageRetryPolicyFactory.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;;AAOlC,4EAAsE;AAGrC,mGAHxB,0CAAkB,OAGwB;AAFnD,oFAA8E;AAErE,uGAFA,kDAAsB,OAEA;AAmD/B;;GAEG;AACH,MAAa,yBAAyB;IAC5B,YAAY,CAAuB;IAE3C;;;OAGG;IACH,YAAY,YAAkC;QAC5C,IAAI,CAAC,YAAY,GAAG,YAAY,CAAC;IACnC,CAAC;IAED;;;;;OAKG;IACI,MAAM,CAAC,UAAyB,EAAE,OAA6B;QACpE,OAAO,IAAI,0CAAkB,CAAC,UAAU,EAAE,OAAO,EAAE,IAAI,CAAC,YAAY,CAAC,CAAC;IACxE,CAAC;CACF;AApBD,8DAoBC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type {\n RequestPolicy,\n RequestPolicyOptionsLike as RequestPolicyOptions,\n RequestPolicyFactory,\n} from \"@azure/core-http-compat\";\nimport { StorageRetryPolicy } from \"./policies/StorageRetryPolicy.js\";\nimport { StorageRetryPolicyType } from \"./policies/StorageRetryPolicyType.js\";\n\nexport { StorageRetryPolicyType, StorageRetryPolicy };\n\n/**\n * Storage Blob retry options interface.\n */\nexport interface StorageRetryOptions {\n /**\n * Optional. StorageRetryPolicyType, default is exponential retry policy.\n */\n readonly retryPolicyType?: StorageRetryPolicyType;\n\n /**\n * Optional. Max try number of attempts, default is 4.\n * A value of 1 means 1 try and no retries.\n * A value smaller than 1 means default retry number of attempts.\n */\n readonly maxTries?: number;\n\n /**\n * Optional. Indicates the maximum time in ms allowed for any single try of an HTTP request.\n * A value of zero or undefined means no default timeout on SDK client, Azure\n * Storage server's default timeout policy will be used.\n *\n * @see https://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-blob-service-operations\n */\n readonly tryTimeoutInMs?: number;\n\n /**\n * Optional. Specifies the amount of delay to use before retrying an operation (default is 4s or 4 * 1000ms).\n * The delay increases (exponentially or linearly) with each retry up to a maximum specified by\n * maxRetryDelayInMs. If you specify 0, then you must also specify 0 for maxRetryDelayInMs.\n */\n readonly retryDelayInMs?: number;\n\n /**\n * Optional. Specifies the maximum delay allowed before retrying an operation (default is 120s or 120 * 1000ms).\n * If you specify 0, then you must also specify 0 for retryDelayInMs.\n */\n readonly maxRetryDelayInMs?: number;\n\n /**\n * If a secondaryHost is specified, retries will be tried against this host. If secondaryHost is undefined\n * (the default) then operations are not retried against another host.\n *\n * NOTE: Before setting this field, make sure you understand the issues around\n * reading stale and potentially-inconsistent data at\n * {@link https://learn.microsoft.com/azure/storage/common/storage-designing-ha-apps-with-ragrs}\n */\n readonly secondaryHost?: string;\n}\n\n/**\n * StorageRetryPolicyFactory is a factory class helping generating {@link StorageRetryPolicy} objects.\n */\nexport class StorageRetryPolicyFactory implements RequestPolicyFactory {\n private retryOptions?: StorageRetryOptions;\n\n /**\n * Creates an instance of StorageRetryPolicyFactory.\n * @param retryOptions -\n */\n constructor(retryOptions?: StorageRetryOptions) {\n this.retryOptions = retryOptions;\n }\n\n /**\n * Creates a StorageRetryPolicy object.\n *\n * @param nextPolicy -\n * @param options -\n */\n public create(nextPolicy: RequestPolicy, options: RequestPolicyOptions): StorageRetryPolicy {\n return new StorageRetryPolicy(nextPolicy, options, this.retryOptions);\n }\n}\n"]}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import type { RequestPolicy, RequestPolicyOptionsLike as RequestPolicyOptions } from "@azure/core-http-compat";
|
|
2
|
-
import { AnonymousCredentialPolicy } from "../policies/AnonymousCredentialPolicy.js";
|
|
3
|
-
import { Credential } from "./Credential.js";
|
|
4
|
-
/**
|
|
5
|
-
* AnonymousCredential provides a credentialPolicyCreator member used to create
|
|
6
|
-
* AnonymousCredentialPolicy objects. AnonymousCredentialPolicy is used with
|
|
7
|
-
* HTTP(S) requests that read public resources or for use with Shared Access
|
|
8
|
-
* Signatures (SAS).
|
|
9
|
-
*/
|
|
10
|
-
export declare class AnonymousCredential extends Credential {
|
|
11
|
-
/**
|
|
12
|
-
* Creates an {@link AnonymousCredentialPolicy} object.
|
|
13
|
-
*
|
|
14
|
-
* @param nextPolicy -
|
|
15
|
-
* @param options -
|
|
16
|
-
*/
|
|
17
|
-
create(nextPolicy: RequestPolicy, options: RequestPolicyOptions): AnonymousCredentialPolicy;
|
|
18
|
-
}
|
|
19
|
-
//# sourceMappingURL=AnonymousCredential.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"AnonymousCredential.d.ts","sourceRoot":"","sources":["../../../src/credentials/AnonymousCredential.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EACV,aAAa,EACb,wBAAwB,IAAI,oBAAoB,EACjD,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,yBAAyB,EAAE,MAAM,0CAA0C,CAAC;AACrF,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAE7C;;;;;GAKG;AACH,qBAAa,mBAAoB,SAAQ,UAAU;IACjD;;;;;OAKG;IACI,MAAM,CACX,UAAU,EAAE,aAAa,EACzB,OAAO,EAAE,oBAAoB,GAC5B,yBAAyB;CAG7B"}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
// Copyright (c) Microsoft Corporation.
|
|
3
|
-
// Licensed under the MIT License.
|
|
4
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
-
exports.AnonymousCredential = void 0;
|
|
6
|
-
const AnonymousCredentialPolicy_js_1 = require("../policies/AnonymousCredentialPolicy.js");
|
|
7
|
-
const Credential_js_1 = require("./Credential.js");
|
|
8
|
-
/**
|
|
9
|
-
* AnonymousCredential provides a credentialPolicyCreator member used to create
|
|
10
|
-
* AnonymousCredentialPolicy objects. AnonymousCredentialPolicy is used with
|
|
11
|
-
* HTTP(S) requests that read public resources or for use with Shared Access
|
|
12
|
-
* Signatures (SAS).
|
|
13
|
-
*/
|
|
14
|
-
class AnonymousCredential extends Credential_js_1.Credential {
|
|
15
|
-
/**
|
|
16
|
-
* Creates an {@link AnonymousCredentialPolicy} object.
|
|
17
|
-
*
|
|
18
|
-
* @param nextPolicy -
|
|
19
|
-
* @param options -
|
|
20
|
-
*/
|
|
21
|
-
create(nextPolicy, options) {
|
|
22
|
-
return new AnonymousCredentialPolicy_js_1.AnonymousCredentialPolicy(nextPolicy, options);
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
exports.AnonymousCredential = AnonymousCredential;
|
|
26
|
-
//# sourceMappingURL=AnonymousCredential.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"AnonymousCredential.js","sourceRoot":"","sources":["../../../src/credentials/AnonymousCredential.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;;AAMlC,2FAAqF;AACrF,mDAA6C;AAE7C;;;;;GAKG;AACH,MAAa,mBAAoB,SAAQ,0BAAU;IACjD;;;;;OAKG;IACI,MAAM,CACX,UAAyB,EACzB,OAA6B;QAE7B,OAAO,IAAI,wDAAyB,CAAC,UAAU,EAAE,OAAO,CAAC,CAAC;IAC5D,CAAC;CACF;AAbD,kDAaC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type {\n RequestPolicy,\n RequestPolicyOptionsLike as RequestPolicyOptions,\n} from \"@azure/core-http-compat\";\nimport { AnonymousCredentialPolicy } from \"../policies/AnonymousCredentialPolicy.js\";\nimport { Credential } from \"./Credential.js\";\n\n/**\n * AnonymousCredential provides a credentialPolicyCreator member used to create\n * AnonymousCredentialPolicy objects. AnonymousCredentialPolicy is used with\n * HTTP(S) requests that read public resources or for use with Shared Access\n * Signatures (SAS).\n */\nexport class AnonymousCredential extends Credential {\n /**\n * Creates an {@link AnonymousCredentialPolicy} object.\n *\n * @param nextPolicy -\n * @param options -\n */\n public create(\n nextPolicy: RequestPolicy,\n options: RequestPolicyOptions,\n ): AnonymousCredentialPolicy {\n return new AnonymousCredentialPolicy(nextPolicy, options);\n }\n}\n"]}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import type { RequestPolicy, RequestPolicyFactory, RequestPolicyOptionsLike as RequestPolicyOptions } from "@azure/core-http-compat";
|
|
2
|
-
import type { CredentialPolicy } from "../policies/CredentialPolicy.js";
|
|
3
|
-
/**
|
|
4
|
-
* Credential is an abstract class for Azure Storage HTTP requests signing. This
|
|
5
|
-
* class will host an credentialPolicyCreator factory which generates CredentialPolicy.
|
|
6
|
-
*/
|
|
7
|
-
export declare abstract class Credential implements RequestPolicyFactory {
|
|
8
|
-
/**
|
|
9
|
-
* Creates a RequestPolicy object.
|
|
10
|
-
*
|
|
11
|
-
* @param _nextPolicy -
|
|
12
|
-
* @param _options -
|
|
13
|
-
*/
|
|
14
|
-
create(_nextPolicy: RequestPolicy, _options: RequestPolicyOptions): RequestPolicy;
|
|
15
|
-
}
|
|
16
|
-
/**
|
|
17
|
-
* A factory function that creates a new CredentialPolicy that uses the provided nextPolicy.
|
|
18
|
-
*/
|
|
19
|
-
export type CredentialPolicyCreator = (nextPolicy: RequestPolicy, options: RequestPolicyOptions) => CredentialPolicy;
|
|
20
|
-
//# sourceMappingURL=Credential.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Credential.d.ts","sourceRoot":"","sources":["../../../src/credentials/Credential.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EACV,aAAa,EACb,oBAAoB,EACpB,wBAAwB,IAAI,oBAAoB,EACjD,MAAM,yBAAyB,CAAC;AACjC,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AAExE;;;GAGG;AACH,8BAAsB,UAAW,YAAW,oBAAoB;IAC9D;;;;;OAKG;IACI,MAAM,CAAC,WAAW,EAAE,aAAa,EAAE,QAAQ,EAAE,oBAAoB,GAAG,aAAa;CAGzF;AAED;;GAEG;AACH,MAAM,MAAM,uBAAuB,GAAG,CACpC,UAAU,EAAE,aAAa,EACzB,OAAO,EAAE,oBAAoB,KAC1B,gBAAgB,CAAC"}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
// Copyright (c) Microsoft Corporation.
|
|
3
|
-
// Licensed under the MIT License.
|
|
4
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
-
exports.Credential = void 0;
|
|
6
|
-
/**
|
|
7
|
-
* Credential is an abstract class for Azure Storage HTTP requests signing. This
|
|
8
|
-
* class will host an credentialPolicyCreator factory which generates CredentialPolicy.
|
|
9
|
-
*/
|
|
10
|
-
class Credential {
|
|
11
|
-
/**
|
|
12
|
-
* Creates a RequestPolicy object.
|
|
13
|
-
*
|
|
14
|
-
* @param _nextPolicy -
|
|
15
|
-
* @param _options -
|
|
16
|
-
*/
|
|
17
|
-
create(_nextPolicy, _options) {
|
|
18
|
-
throw new Error("Method should be implemented in children classes.");
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
exports.Credential = Credential;
|
|
22
|
-
//# sourceMappingURL=Credential.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Credential.js","sourceRoot":"","sources":["../../../src/credentials/Credential.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;;AASlC;;;GAGG;AACH,MAAsB,UAAU;IAC9B;;;;;OAKG;IACI,MAAM,CAAC,WAA0B,EAAE,QAA8B;QACtE,MAAM,IAAI,KAAK,CAAC,mDAAmD,CAAC,CAAC;IACvE,CAAC;CACF;AAVD,gCAUC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type {\n RequestPolicy,\n RequestPolicyFactory,\n RequestPolicyOptionsLike as RequestPolicyOptions,\n} from \"@azure/core-http-compat\";\nimport type { CredentialPolicy } from \"../policies/CredentialPolicy.js\";\n\n/**\n * Credential is an abstract class for Azure Storage HTTP requests signing. This\n * class will host an credentialPolicyCreator factory which generates CredentialPolicy.\n */\nexport abstract class Credential implements RequestPolicyFactory {\n /**\n * Creates a RequestPolicy object.\n *\n * @param _nextPolicy -\n * @param _options -\n */\n public create(_nextPolicy: RequestPolicy, _options: RequestPolicyOptions): RequestPolicy {\n throw new Error(\"Method should be implemented in children classes.\");\n }\n}\n\n/**\n * A factory function that creates a new CredentialPolicy that uses the provided nextPolicy.\n */\nexport type CredentialPolicyCreator = (\n nextPolicy: RequestPolicy,\n options: RequestPolicyOptions,\n) => CredentialPolicy;\n"]}
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import type { RequestPolicy, RequestPolicyOptionsLike as RequestPolicyOptions } from "@azure/core-http-compat";
|
|
2
|
-
import { StorageSharedKeyCredentialPolicy } from "../policies/StorageSharedKeyCredentialPolicy.js";
|
|
3
|
-
import { Credential } from "./Credential.js";
|
|
4
|
-
/**
|
|
5
|
-
* ONLY AVAILABLE IN NODE.JS RUNTIME.
|
|
6
|
-
*
|
|
7
|
-
* StorageSharedKeyCredential for account key authorization of Azure Storage service.
|
|
8
|
-
*/
|
|
9
|
-
export declare class StorageSharedKeyCredential extends Credential {
|
|
10
|
-
/**
|
|
11
|
-
* Azure Storage account name; readonly.
|
|
12
|
-
*/
|
|
13
|
-
readonly accountName: string;
|
|
14
|
-
/**
|
|
15
|
-
* Azure Storage account key; readonly.
|
|
16
|
-
*/
|
|
17
|
-
private readonly accountKey;
|
|
18
|
-
/**
|
|
19
|
-
* Creates an instance of StorageSharedKeyCredential.
|
|
20
|
-
* @param accountName -
|
|
21
|
-
* @param accountKey -
|
|
22
|
-
*/
|
|
23
|
-
constructor(accountName: string, accountKey: string);
|
|
24
|
-
/**
|
|
25
|
-
* Creates a StorageSharedKeyCredentialPolicy object.
|
|
26
|
-
*
|
|
27
|
-
* @param nextPolicy -
|
|
28
|
-
* @param options -
|
|
29
|
-
*/
|
|
30
|
-
create(nextPolicy: RequestPolicy, options: RequestPolicyOptions): StorageSharedKeyCredentialPolicy;
|
|
31
|
-
/**
|
|
32
|
-
* Generates a hash signature for an HTTP request or for a SAS.
|
|
33
|
-
*
|
|
34
|
-
* @param stringToSign -
|
|
35
|
-
*/
|
|
36
|
-
computeHMACSHA256(stringToSign: string): string;
|
|
37
|
-
}
|
|
38
|
-
//# sourceMappingURL=StorageSharedKeyCredential.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"StorageSharedKeyCredential.d.ts","sourceRoot":"","sources":["../../../src/credentials/StorageSharedKeyCredential.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EACV,aAAa,EACb,wBAAwB,IAAI,oBAAoB,EACjD,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,gCAAgC,EAAE,MAAM,iDAAiD,CAAC;AACnG,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAE7C;;;;GAIG;AACH,qBAAa,0BAA2B,SAAQ,UAAU;IACxD;;OAEG;IACH,SAAgB,WAAW,EAAE,MAAM,CAAC;IAEpC;;OAEG;IACH,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAS;IAEpC;;;;OAIG;gBACS,WAAW,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM;IAMnD;;;;;OAKG;IACI,MAAM,CACX,UAAU,EAAE,aAAa,EACzB,OAAO,EAAE,oBAAoB,GAC5B,gCAAgC;IAInC;;;;OAIG;IACI,iBAAiB,CAAC,YAAY,EAAE,MAAM,GAAG,MAAM;CAGvD"}
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
// Copyright (c) Microsoft Corporation.
|
|
3
|
-
// Licensed under the MIT License.
|
|
4
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
-
exports.StorageSharedKeyCredential = void 0;
|
|
6
|
-
const node_crypto_1 = require("node:crypto");
|
|
7
|
-
const StorageSharedKeyCredentialPolicy_js_1 = require("../policies/StorageSharedKeyCredentialPolicy.js");
|
|
8
|
-
const Credential_js_1 = require("./Credential.js");
|
|
9
|
-
/**
|
|
10
|
-
* ONLY AVAILABLE IN NODE.JS RUNTIME.
|
|
11
|
-
*
|
|
12
|
-
* StorageSharedKeyCredential for account key authorization of Azure Storage service.
|
|
13
|
-
*/
|
|
14
|
-
class StorageSharedKeyCredential extends Credential_js_1.Credential {
|
|
15
|
-
/**
|
|
16
|
-
* Azure Storage account name; readonly.
|
|
17
|
-
*/
|
|
18
|
-
accountName;
|
|
19
|
-
/**
|
|
20
|
-
* Azure Storage account key; readonly.
|
|
21
|
-
*/
|
|
22
|
-
accountKey;
|
|
23
|
-
/**
|
|
24
|
-
* Creates an instance of StorageSharedKeyCredential.
|
|
25
|
-
* @param accountName -
|
|
26
|
-
* @param accountKey -
|
|
27
|
-
*/
|
|
28
|
-
constructor(accountName, accountKey) {
|
|
29
|
-
super();
|
|
30
|
-
this.accountName = accountName;
|
|
31
|
-
this.accountKey = Buffer.from(accountKey, "base64");
|
|
32
|
-
}
|
|
33
|
-
/**
|
|
34
|
-
* Creates a StorageSharedKeyCredentialPolicy object.
|
|
35
|
-
*
|
|
36
|
-
* @param nextPolicy -
|
|
37
|
-
* @param options -
|
|
38
|
-
*/
|
|
39
|
-
create(nextPolicy, options) {
|
|
40
|
-
return new StorageSharedKeyCredentialPolicy_js_1.StorageSharedKeyCredentialPolicy(nextPolicy, options, this);
|
|
41
|
-
}
|
|
42
|
-
/**
|
|
43
|
-
* Generates a hash signature for an HTTP request or for a SAS.
|
|
44
|
-
*
|
|
45
|
-
* @param stringToSign -
|
|
46
|
-
*/
|
|
47
|
-
computeHMACSHA256(stringToSign) {
|
|
48
|
-
return (0, node_crypto_1.createHmac)("sha256", this.accountKey).update(stringToSign, "utf8").digest("base64");
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
exports.StorageSharedKeyCredential = StorageSharedKeyCredential;
|
|
52
|
-
//# sourceMappingURL=StorageSharedKeyCredential.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"StorageSharedKeyCredential.js","sourceRoot":"","sources":["../../../src/credentials/StorageSharedKeyCredential.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;;AAElC,6CAAyC;AAKzC,yGAAmG;AACnG,mDAA6C;AAE7C;;;;GAIG;AACH,MAAa,0BAA2B,SAAQ,0BAAU;IACxD;;OAEG;IACa,WAAW,CAAS;IAEpC;;OAEG;IACc,UAAU,CAAS;IAEpC;;;;OAIG;IACH,YAAY,WAAmB,EAAE,UAAkB;QACjD,KAAK,EAAE,CAAC;QACR,IAAI,CAAC,WAAW,GAAG,WAAW,CAAC;QAC/B,IAAI,CAAC,UAAU,GAAG,MAAM,CAAC,IAAI,CAAC,UAAU,EAAE,QAAQ,CAAC,CAAC;IACtD,CAAC;IAED;;;;;OAKG;IACI,MAAM,CACX,UAAyB,EACzB,OAA6B;QAE7B,OAAO,IAAI,sEAAgC,CAAC,UAAU,EAAE,OAAO,EAAE,IAAI,CAAC,CAAC;IACzE,CAAC;IAED;;;;OAIG;IACI,iBAAiB,CAAC,YAAoB;QAC3C,OAAO,IAAA,wBAAU,EAAC,QAAQ,EAAE,IAAI,CAAC,UAAU,CAAC,CAAC,MAAM,CAAC,YAAY,EAAE,MAAM,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;IAC7F,CAAC;CACF;AA3CD,gEA2CC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { createHmac } from \"node:crypto\";\nimport type {\n RequestPolicy,\n RequestPolicyOptionsLike as RequestPolicyOptions,\n} from \"@azure/core-http-compat\";\nimport { StorageSharedKeyCredentialPolicy } from \"../policies/StorageSharedKeyCredentialPolicy.js\";\nimport { Credential } from \"./Credential.js\";\n\n/**\n * ONLY AVAILABLE IN NODE.JS RUNTIME.\n *\n * StorageSharedKeyCredential for account key authorization of Azure Storage service.\n */\nexport class StorageSharedKeyCredential extends Credential {\n /**\n * Azure Storage account name; readonly.\n */\n public readonly accountName: string;\n\n /**\n * Azure Storage account key; readonly.\n */\n private readonly accountKey: Buffer;\n\n /**\n * Creates an instance of StorageSharedKeyCredential.\n * @param accountName -\n * @param accountKey -\n */\n constructor(accountName: string, accountKey: string) {\n super();\n this.accountName = accountName;\n this.accountKey = Buffer.from(accountKey, \"base64\");\n }\n\n /**\n * Creates a StorageSharedKeyCredentialPolicy object.\n *\n * @param nextPolicy -\n * @param options -\n */\n public create(\n nextPolicy: RequestPolicy,\n options: RequestPolicyOptions,\n ): StorageSharedKeyCredentialPolicy {\n return new StorageSharedKeyCredentialPolicy(nextPolicy, options, this);\n }\n\n /**\n * Generates a hash signature for an HTTP request or for a SAS.\n *\n * @param stringToSign -\n */\n public computeHMACSHA256(stringToSign: string): string {\n return createHmac(\"sha256\", this.accountKey).update(stringToSign, \"utf8\").digest(\"base64\");\n }\n}\n"]}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import type { RequestPolicy, RequestPolicyOptionsLike as RequestPolicyOptions } from "@azure/core-http-compat";
|
|
2
|
-
import { CredentialPolicy } from "./CredentialPolicy.js";
|
|
3
|
-
/**
|
|
4
|
-
* AnonymousCredentialPolicy is used with HTTP(S) requests that read public resources
|
|
5
|
-
* or for use with Shared Access Signatures (SAS).
|
|
6
|
-
*/
|
|
7
|
-
export declare class AnonymousCredentialPolicy extends CredentialPolicy {
|
|
8
|
-
/**
|
|
9
|
-
* Creates an instance of AnonymousCredentialPolicy.
|
|
10
|
-
* @param nextPolicy -
|
|
11
|
-
* @param options -
|
|
12
|
-
*/
|
|
13
|
-
constructor(nextPolicy: RequestPolicy, options: RequestPolicyOptions);
|
|
14
|
-
}
|
|
15
|
-
//# sourceMappingURL=AnonymousCredentialPolicy.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"AnonymousCredentialPolicy.d.ts","sourceRoot":"","sources":["../../../src/policies/AnonymousCredentialPolicy.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EACV,aAAa,EACb,wBAAwB,IAAI,oBAAoB,EACjD,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAEzD;;;GAGG;AACH,qBAAa,yBAA0B,SAAQ,gBAAgB;IAC7D;;;;OAIG;gBAGS,UAAU,EAAE,aAAa,EAAE,OAAO,EAAE,oBAAoB;CAGrE"}
|