@azure/storage-common 12.0.0-beta.2 → 12.0.0
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/BuffersStream.js +14 -0
- package/dist/browser/BuffersStream.js.map +1 -1
- package/dist/browser/PooledBuffer.js +13 -5
- package/dist/browser/PooledBuffer.js.map +1 -1
- package/dist/browser/StorageBrowserPolicyFactory.d.ts +16 -0
- package/dist/browser/StorageBrowserPolicyFactory.d.ts.map +1 -0
- package/dist/browser/StorageBrowserPolicyFactory.js +19 -0
- package/dist/browser/StorageBrowserPolicyFactory.js.map +1 -0
- package/dist/browser/StorageRetryPolicyFactory.d.ts +66 -0
- package/dist/browser/StorageRetryPolicyFactory.d.ts.map +1 -0
- package/dist/browser/StorageRetryPolicyFactory.js +28 -0
- package/dist/browser/StorageRetryPolicyFactory.js.map +1 -0
- package/dist/browser/credentials/AnonymousCredential.d.ts +19 -0
- package/dist/browser/credentials/AnonymousCredential.d.ts.map +1 -0
- package/dist/browser/credentials/AnonymousCredential.js +22 -0
- package/dist/browser/credentials/AnonymousCredential.js.map +1 -0
- package/dist/browser/credentials/Credential.d.ts +20 -0
- package/dist/browser/credentials/Credential.d.ts.map +1 -0
- package/dist/browser/credentials/Credential.js +18 -0
- package/dist/browser/credentials/Credential.js.map +1 -0
- package/dist/browser/credentials/StorageSharedKeyCredential-browser.d.mts.map +1 -0
- package/dist/browser/credentials/StorageSharedKeyCredential-browser.mjs.map +1 -0
- package/dist/browser/credentials/StorageSharedKeyCredential.d.ts +3 -0
- package/dist/browser/credentials/StorageSharedKeyCredential.js +5 -0
- package/dist/browser/index-browser.d.mts.map +1 -0
- package/dist/browser/index-browser.mjs.map +1 -0
- package/dist/browser/index.d.ts +17 -1
- package/dist/browser/index.js +17 -1
- package/dist/browser/log.d.ts +5 -0
- package/dist/browser/log.d.ts.map +1 -0
- package/dist/browser/log.js +8 -0
- package/dist/browser/log.js.map +1 -0
- package/dist/browser/policies/AnonymousCredentialPolicy.d.ts +15 -0
- package/dist/browser/policies/AnonymousCredentialPolicy.d.ts.map +1 -0
- package/dist/browser/policies/AnonymousCredentialPolicy.js +20 -0
- package/dist/browser/policies/AnonymousCredentialPolicy.js.map +1 -0
- package/dist/browser/policies/CredentialPolicy.d.ts +22 -0
- package/dist/browser/policies/CredentialPolicy.d.ts.map +1 -0
- package/dist/browser/policies/CredentialPolicy.js +29 -0
- package/dist/browser/policies/CredentialPolicy.js.map +1 -0
- package/dist/browser/policies/RequestPolicy.d.ts +45 -0
- package/dist/browser/policies/RequestPolicy.d.ts.map +1 -0
- package/dist/browser/policies/RequestPolicy.js +42 -0
- package/dist/browser/policies/RequestPolicy.js.map +1 -0
- package/dist/browser/policies/StorageBrowserPolicy.d.ts +28 -0
- package/dist/browser/policies/StorageBrowserPolicy.d.ts.map +1 -0
- package/dist/browser/policies/StorageBrowserPolicy.js +47 -0
- package/dist/browser/policies/StorageBrowserPolicy.js.map +1 -0
- package/dist/browser/policies/StorageBrowserPolicyV2.d.ts +11 -0
- package/dist/browser/policies/StorageBrowserPolicyV2.d.ts.map +1 -0
- package/dist/browser/policies/StorageBrowserPolicyV2.js +31 -0
- package/dist/browser/policies/StorageBrowserPolicyV2.js.map +1 -0
- package/dist/browser/policies/StorageCorrectContentLengthPolicy-browser.d.mts.map +1 -0
- package/dist/browser/policies/StorageCorrectContentLengthPolicy-browser.mjs.map +1 -0
- package/dist/browser/policies/StorageCorrectContentLengthPolicy.d.ts +10 -0
- package/dist/browser/policies/StorageCorrectContentLengthPolicy.js +18 -0
- package/dist/browser/policies/StorageRetryPolicy.d.ts +62 -0
- package/dist/browser/policies/StorageRetryPolicy.d.ts.map +1 -0
- package/dist/browser/policies/StorageRetryPolicy.js +220 -0
- package/dist/browser/policies/StorageRetryPolicy.js.map +1 -0
- package/dist/browser/policies/StorageRetryPolicyType.d.ts +14 -0
- package/dist/browser/policies/StorageRetryPolicyType.d.ts.map +1 -0
- package/dist/browser/policies/StorageRetryPolicyType.js +17 -0
- package/dist/browser/policies/StorageRetryPolicyType.js.map +1 -0
- package/dist/browser/policies/StorageRetryPolicyV2.d.ts +11 -0
- package/dist/browser/policies/StorageRetryPolicyV2.d.ts.map +1 -0
- package/dist/browser/policies/StorageRetryPolicyV2.js +165 -0
- package/dist/browser/policies/StorageRetryPolicyV2.js.map +1 -0
- package/dist/browser/policies/StorageSharedKeyCredentialPolicy.d.ts +54 -0
- package/dist/browser/policies/StorageSharedKeyCredentialPolicy.d.ts.map +1 -0
- package/dist/browser/policies/StorageSharedKeyCredentialPolicy.js +145 -0
- package/dist/browser/policies/StorageSharedKeyCredentialPolicy.js.map +1 -0
- package/dist/browser/policies/StorageSharedKeyCredentialPolicyV2-browser.d.mts.map +1 -0
- package/dist/browser/policies/StorageSharedKeyCredentialPolicyV2-browser.mjs.map +1 -0
- package/dist/browser/policies/StorageSharedKeyCredentialPolicyV2.d.ts +17 -0
- package/dist/browser/policies/StorageSharedKeyCredentialPolicyV2.js +18 -0
- package/dist/browser/utils/SharedKeyComparator.d.ts +2 -0
- package/dist/browser/utils/SharedKeyComparator.d.ts.map +1 -0
- package/dist/browser/utils/SharedKeyComparator.js +73 -0
- package/dist/browser/utils/SharedKeyComparator.js.map +1 -0
- package/dist/browser/utils/constants.d.ts +39 -0
- package/dist/browser/utils/constants.d.ts.map +1 -0
- package/dist/browser/utils/constants.js +64 -0
- package/dist/browser/utils/constants.js.map +1 -0
- package/dist/browser/utils/tracing.d.ts +6 -0
- package/dist/browser/utils/tracing.d.ts.map +1 -0
- package/dist/browser/utils/tracing.js +14 -0
- package/dist/browser/utils/tracing.js.map +1 -0
- package/dist/browser/utils/utils.common.d.ts +305 -0
- package/dist/browser/utils/utils.common.d.ts.map +1 -0
- package/dist/browser/utils/utils.common.js +544 -0
- package/dist/browser/utils/utils.common.js.map +1 -0
- package/dist/commonjs/BufferScheduler.js +70 -44
- package/dist/commonjs/BufferScheduler.js.map +1 -1
- package/dist/commonjs/BuffersStream.js +14 -0
- package/dist/commonjs/BuffersStream.js.map +1 -1
- package/dist/commonjs/PooledBuffer.js +13 -5
- package/dist/commonjs/PooledBuffer.js.map +1 -1
- package/dist/commonjs/StorageBrowserPolicyFactory.d.ts +16 -0
- package/dist/commonjs/StorageBrowserPolicyFactory.d.ts.map +1 -0
- package/dist/commonjs/StorageBrowserPolicyFactory.js +23 -0
- package/dist/commonjs/StorageBrowserPolicyFactory.js.map +1 -0
- package/dist/commonjs/StorageRetryPolicyFactory.d.ts +66 -0
- package/dist/commonjs/StorageRetryPolicyFactory.d.ts.map +1 -0
- package/dist/commonjs/StorageRetryPolicyFactory.js +33 -0
- package/dist/commonjs/StorageRetryPolicyFactory.js.map +1 -0
- package/dist/commonjs/credentials/AnonymousCredential.d.ts +19 -0
- package/dist/commonjs/credentials/AnonymousCredential.d.ts.map +1 -0
- package/dist/commonjs/credentials/AnonymousCredential.js +26 -0
- package/dist/commonjs/credentials/AnonymousCredential.js.map +1 -0
- package/dist/commonjs/credentials/Credential.d.ts +20 -0
- package/dist/commonjs/credentials/Credential.d.ts.map +1 -0
- package/dist/commonjs/credentials/Credential.js +22 -0
- package/dist/commonjs/credentials/Credential.js.map +1 -0
- package/dist/commonjs/credentials/StorageSharedKeyCredential.d.ts +38 -0
- package/dist/commonjs/credentials/StorageSharedKeyCredential.d.ts.map +1 -0
- package/dist/commonjs/credentials/StorageSharedKeyCredential.js +52 -0
- package/dist/commonjs/credentials/StorageSharedKeyCredential.js.map +1 -0
- package/dist/commonjs/index.d.ts +17 -0
- package/dist/commonjs/index.d.ts.map +1 -1
- package/dist/commonjs/index.js +19 -1
- package/dist/commonjs/index.js.map +1 -1
- package/dist/commonjs/log.d.ts +5 -0
- package/dist/commonjs/log.d.ts.map +1 -0
- package/dist/commonjs/log.js +11 -0
- package/dist/commonjs/log.js.map +1 -0
- package/dist/commonjs/policies/AnonymousCredentialPolicy.d.ts +15 -0
- package/dist/commonjs/policies/AnonymousCredentialPolicy.d.ts.map +1 -0
- package/dist/commonjs/policies/AnonymousCredentialPolicy.js +24 -0
- package/dist/commonjs/policies/AnonymousCredentialPolicy.js.map +1 -0
- package/dist/commonjs/policies/CredentialPolicy.d.ts +22 -0
- package/dist/commonjs/policies/CredentialPolicy.d.ts.map +1 -0
- package/dist/commonjs/policies/CredentialPolicy.js +33 -0
- package/dist/commonjs/policies/CredentialPolicy.js.map +1 -0
- package/dist/commonjs/policies/RequestPolicy.d.ts +45 -0
- package/dist/commonjs/policies/RequestPolicy.d.ts.map +1 -0
- package/dist/commonjs/policies/RequestPolicy.js +46 -0
- package/dist/commonjs/policies/RequestPolicy.js.map +1 -0
- package/dist/commonjs/policies/StorageBrowserPolicy.d.ts +28 -0
- package/dist/commonjs/policies/StorageBrowserPolicy.d.ts.map +1 -0
- package/dist/commonjs/policies/StorageBrowserPolicy.js +51 -0
- package/dist/commonjs/policies/StorageBrowserPolicy.js.map +1 -0
- package/dist/commonjs/policies/StorageBrowserPolicyV2.d.ts +11 -0
- package/dist/commonjs/policies/StorageBrowserPolicyV2.d.ts.map +1 -0
- package/dist/commonjs/policies/StorageBrowserPolicyV2.js +35 -0
- package/dist/commonjs/policies/StorageBrowserPolicyV2.js.map +1 -0
- package/dist/commonjs/policies/StorageCorrectContentLengthPolicy.d.ts +10 -0
- package/dist/commonjs/policies/StorageCorrectContentLengthPolicy.d.ts.map +1 -0
- package/dist/commonjs/policies/StorageCorrectContentLengthPolicy.js +31 -0
- package/dist/commonjs/policies/StorageCorrectContentLengthPolicy.js.map +1 -0
- package/dist/commonjs/policies/StorageRetryPolicy.d.ts +62 -0
- package/dist/commonjs/policies/StorageRetryPolicy.d.ts.map +1 -0
- package/dist/commonjs/policies/StorageRetryPolicy.js +225 -0
- package/dist/commonjs/policies/StorageRetryPolicy.js.map +1 -0
- package/dist/commonjs/policies/StorageRetryPolicyType.d.ts +14 -0
- package/dist/commonjs/policies/StorageRetryPolicyType.d.ts.map +1 -0
- package/dist/commonjs/policies/StorageRetryPolicyType.js +20 -0
- package/dist/commonjs/policies/StorageRetryPolicyType.js.map +1 -0
- package/dist/commonjs/policies/StorageRetryPolicyV2.d.ts +11 -0
- package/dist/commonjs/policies/StorageRetryPolicyV2.d.ts.map +1 -0
- package/dist/commonjs/policies/StorageRetryPolicyV2.js +169 -0
- package/dist/commonjs/policies/StorageRetryPolicyV2.js.map +1 -0
- package/dist/commonjs/policies/StorageSharedKeyCredentialPolicy.d.ts +54 -0
- package/dist/commonjs/policies/StorageSharedKeyCredentialPolicy.d.ts.map +1 -0
- package/dist/commonjs/policies/StorageSharedKeyCredentialPolicy.js +149 -0
- package/dist/commonjs/policies/StorageSharedKeyCredentialPolicy.js.map +1 -0
- package/dist/commonjs/policies/StorageSharedKeyCredentialPolicyV2.d.ts +17 -0
- package/dist/commonjs/policies/StorageSharedKeyCredentialPolicyV2.d.ts.map +1 -0
- package/dist/commonjs/policies/StorageSharedKeyCredentialPolicyV2.js +136 -0
- package/dist/commonjs/policies/StorageSharedKeyCredentialPolicyV2.js.map +1 -0
- package/dist/commonjs/tsdoc-metadata.json +11 -11
- package/dist/commonjs/utils/SharedKeyComparator.d.ts +2 -0
- package/dist/commonjs/utils/SharedKeyComparator.d.ts.map +1 -0
- package/dist/commonjs/utils/SharedKeyComparator.js +76 -0
- package/dist/commonjs/utils/SharedKeyComparator.js.map +1 -0
- package/dist/commonjs/utils/constants.d.ts +39 -0
- package/dist/commonjs/utils/constants.d.ts.map +1 -0
- package/dist/commonjs/utils/constants.js +67 -0
- package/dist/commonjs/utils/constants.js.map +1 -0
- package/dist/commonjs/utils/tracing.d.ts +6 -0
- package/dist/commonjs/utils/tracing.d.ts.map +1 -0
- package/dist/commonjs/utils/tracing.js +17 -0
- package/dist/commonjs/utils/tracing.js.map +1 -0
- package/dist/commonjs/utils/utils.common.d.ts +305 -0
- package/dist/commonjs/utils/utils.common.d.ts.map +1 -0
- package/dist/commonjs/utils/utils.common.js +573 -0
- package/dist/commonjs/utils/utils.common.js.map +1 -0
- package/dist/esm/BufferScheduler.js +70 -44
- package/dist/esm/BufferScheduler.js.map +1 -1
- package/dist/esm/BuffersStream.js +14 -0
- package/dist/esm/BuffersStream.js.map +1 -1
- package/dist/esm/PooledBuffer.js +13 -5
- package/dist/esm/PooledBuffer.js.map +1 -1
- package/dist/esm/StorageBrowserPolicyFactory.d.ts +16 -0
- package/dist/esm/StorageBrowserPolicyFactory.d.ts.map +1 -0
- package/dist/esm/StorageBrowserPolicyFactory.js +19 -0
- package/dist/esm/StorageBrowserPolicyFactory.js.map +1 -0
- package/dist/esm/StorageRetryPolicyFactory.d.ts +66 -0
- package/dist/esm/StorageRetryPolicyFactory.d.ts.map +1 -0
- package/dist/esm/StorageRetryPolicyFactory.js +28 -0
- package/dist/esm/StorageRetryPolicyFactory.js.map +1 -0
- package/dist/esm/credentials/AnonymousCredential.d.ts +19 -0
- package/dist/esm/credentials/AnonymousCredential.d.ts.map +1 -0
- package/dist/esm/credentials/AnonymousCredential.js +22 -0
- package/dist/esm/credentials/AnonymousCredential.js.map +1 -0
- package/dist/esm/credentials/Credential.d.ts +20 -0
- package/dist/esm/credentials/Credential.d.ts.map +1 -0
- package/dist/esm/credentials/Credential.js +18 -0
- package/dist/esm/credentials/Credential.js.map +1 -0
- package/dist/esm/credentials/StorageSharedKeyCredential.d.ts +38 -0
- package/dist/esm/credentials/StorageSharedKeyCredential.d.ts.map +1 -0
- package/dist/esm/credentials/StorageSharedKeyCredential.js +48 -0
- package/dist/esm/credentials/StorageSharedKeyCredential.js.map +1 -0
- package/dist/esm/index.d.ts +17 -0
- package/dist/esm/index.d.ts.map +1 -1
- package/dist/esm/index.js +17 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/log.d.ts +5 -0
- package/dist/esm/log.d.ts.map +1 -0
- package/dist/esm/log.js +8 -0
- package/dist/esm/log.js.map +1 -0
- package/dist/esm/policies/AnonymousCredentialPolicy.d.ts +15 -0
- package/dist/esm/policies/AnonymousCredentialPolicy.d.ts.map +1 -0
- package/dist/esm/policies/AnonymousCredentialPolicy.js +20 -0
- package/dist/esm/policies/AnonymousCredentialPolicy.js.map +1 -0
- package/dist/esm/policies/CredentialPolicy.d.ts +22 -0
- package/dist/esm/policies/CredentialPolicy.d.ts.map +1 -0
- package/dist/esm/policies/CredentialPolicy.js +29 -0
- package/dist/esm/policies/CredentialPolicy.js.map +1 -0
- package/dist/esm/policies/RequestPolicy.d.ts +45 -0
- package/dist/esm/policies/RequestPolicy.d.ts.map +1 -0
- package/dist/esm/policies/RequestPolicy.js +42 -0
- package/dist/esm/policies/RequestPolicy.js.map +1 -0
- package/dist/esm/policies/StorageBrowserPolicy.d.ts +28 -0
- package/dist/esm/policies/StorageBrowserPolicy.d.ts.map +1 -0
- package/dist/esm/policies/StorageBrowserPolicy.js +47 -0
- package/dist/esm/policies/StorageBrowserPolicy.js.map +1 -0
- package/dist/esm/policies/StorageBrowserPolicyV2.d.ts +11 -0
- package/dist/esm/policies/StorageBrowserPolicyV2.d.ts.map +1 -0
- package/dist/esm/policies/StorageBrowserPolicyV2.js +31 -0
- package/dist/esm/policies/StorageBrowserPolicyV2.js.map +1 -0
- package/dist/esm/policies/StorageCorrectContentLengthPolicy.d.ts +10 -0
- package/dist/esm/policies/StorageCorrectContentLengthPolicy.d.ts.map +1 -0
- package/dist/esm/policies/StorageCorrectContentLengthPolicy.js +27 -0
- package/dist/esm/policies/StorageCorrectContentLengthPolicy.js.map +1 -0
- package/dist/esm/policies/StorageRetryPolicy.d.ts +62 -0
- package/dist/esm/policies/StorageRetryPolicy.d.ts.map +1 -0
- package/dist/esm/policies/StorageRetryPolicy.js +220 -0
- package/dist/esm/policies/StorageRetryPolicy.js.map +1 -0
- package/dist/esm/policies/StorageRetryPolicyType.d.ts +14 -0
- package/dist/esm/policies/StorageRetryPolicyType.d.ts.map +1 -0
- package/dist/esm/policies/StorageRetryPolicyType.js +17 -0
- package/dist/esm/policies/StorageRetryPolicyType.js.map +1 -0
- package/dist/esm/policies/StorageRetryPolicyV2.d.ts +11 -0
- package/dist/esm/policies/StorageRetryPolicyV2.d.ts.map +1 -0
- package/dist/esm/policies/StorageRetryPolicyV2.js +165 -0
- package/dist/esm/policies/StorageRetryPolicyV2.js.map +1 -0
- package/dist/esm/policies/StorageSharedKeyCredentialPolicy.d.ts +54 -0
- package/dist/esm/policies/StorageSharedKeyCredentialPolicy.d.ts.map +1 -0
- package/dist/esm/policies/StorageSharedKeyCredentialPolicy.js +145 -0
- package/dist/esm/policies/StorageSharedKeyCredentialPolicy.js.map +1 -0
- package/dist/esm/policies/StorageSharedKeyCredentialPolicyV2.d.ts +17 -0
- package/dist/esm/policies/StorageSharedKeyCredentialPolicyV2.d.ts.map +1 -0
- package/dist/esm/policies/StorageSharedKeyCredentialPolicyV2.js +132 -0
- package/dist/esm/policies/StorageSharedKeyCredentialPolicyV2.js.map +1 -0
- package/dist/esm/utils/SharedKeyComparator.d.ts +2 -0
- package/dist/esm/utils/SharedKeyComparator.d.ts.map +1 -0
- package/dist/esm/utils/SharedKeyComparator.js +73 -0
- package/dist/esm/utils/SharedKeyComparator.js.map +1 -0
- package/dist/esm/utils/constants.d.ts +39 -0
- package/dist/esm/utils/constants.d.ts.map +1 -0
- package/dist/esm/utils/constants.js +64 -0
- package/dist/esm/utils/constants.js.map +1 -0
- package/dist/esm/utils/tracing.d.ts +6 -0
- package/dist/esm/utils/tracing.d.ts.map +1 -0
- package/dist/esm/utils/tracing.js +14 -0
- package/dist/esm/utils/tracing.js.map +1 -0
- package/dist/esm/utils/utils.common.d.ts +305 -0
- package/dist/esm/utils/utils.common.d.ts.map +1 -0
- package/dist/esm/utils/utils.common.js +544 -0
- package/dist/esm/utils/utils.common.js.map +1 -0
- package/dist/react-native/BufferScheduler.js +70 -44
- package/dist/react-native/BufferScheduler.js.map +1 -1
- package/dist/react-native/BuffersStream.js +14 -0
- package/dist/react-native/BuffersStream.js.map +1 -1
- package/dist/react-native/PooledBuffer.js +13 -5
- package/dist/react-native/PooledBuffer.js.map +1 -1
- package/dist/react-native/StorageBrowserPolicyFactory.d.ts +16 -0
- package/dist/react-native/StorageBrowserPolicyFactory.d.ts.map +1 -0
- package/dist/react-native/StorageBrowserPolicyFactory.js +19 -0
- package/dist/react-native/StorageBrowserPolicyFactory.js.map +1 -0
- package/dist/react-native/StorageRetryPolicyFactory.d.ts +66 -0
- package/dist/react-native/StorageRetryPolicyFactory.d.ts.map +1 -0
- package/dist/react-native/StorageRetryPolicyFactory.js +28 -0
- package/dist/react-native/StorageRetryPolicyFactory.js.map +1 -0
- package/dist/react-native/credentials/AnonymousCredential.d.ts +19 -0
- package/dist/react-native/credentials/AnonymousCredential.d.ts.map +1 -0
- package/dist/react-native/credentials/AnonymousCredential.js +22 -0
- package/dist/react-native/credentials/AnonymousCredential.js.map +1 -0
- package/dist/react-native/credentials/Credential.d.ts +20 -0
- package/dist/react-native/credentials/Credential.d.ts.map +1 -0
- package/dist/react-native/credentials/Credential.js +18 -0
- package/dist/react-native/credentials/Credential.js.map +1 -0
- package/dist/react-native/credentials/StorageSharedKeyCredential.d.ts +38 -0
- package/dist/react-native/credentials/StorageSharedKeyCredential.d.ts.map +1 -0
- package/dist/react-native/credentials/StorageSharedKeyCredential.js +48 -0
- package/dist/react-native/credentials/StorageSharedKeyCredential.js.map +1 -0
- package/dist/react-native/index.d.ts +17 -0
- package/dist/react-native/index.d.ts.map +1 -1
- package/dist/react-native/index.js +17 -0
- package/dist/react-native/index.js.map +1 -1
- package/dist/react-native/log.d.ts +5 -0
- package/dist/react-native/log.d.ts.map +1 -0
- package/dist/react-native/log.js +8 -0
- package/dist/react-native/log.js.map +1 -0
- package/dist/react-native/policies/AnonymousCredentialPolicy.d.ts +15 -0
- package/dist/react-native/policies/AnonymousCredentialPolicy.d.ts.map +1 -0
- package/dist/react-native/policies/AnonymousCredentialPolicy.js +20 -0
- package/dist/react-native/policies/AnonymousCredentialPolicy.js.map +1 -0
- package/dist/react-native/policies/CredentialPolicy.d.ts +22 -0
- package/dist/react-native/policies/CredentialPolicy.d.ts.map +1 -0
- package/dist/react-native/policies/CredentialPolicy.js +29 -0
- package/dist/react-native/policies/CredentialPolicy.js.map +1 -0
- package/dist/react-native/policies/RequestPolicy.d.ts +45 -0
- package/dist/react-native/policies/RequestPolicy.d.ts.map +1 -0
- package/dist/react-native/policies/RequestPolicy.js +42 -0
- package/dist/react-native/policies/RequestPolicy.js.map +1 -0
- package/dist/react-native/policies/StorageBrowserPolicy.d.ts +28 -0
- package/dist/react-native/policies/StorageBrowserPolicy.d.ts.map +1 -0
- package/dist/react-native/policies/StorageBrowserPolicy.js +47 -0
- package/dist/react-native/policies/StorageBrowserPolicy.js.map +1 -0
- package/dist/react-native/policies/StorageBrowserPolicyV2.d.ts +11 -0
- package/dist/react-native/policies/StorageBrowserPolicyV2.d.ts.map +1 -0
- package/dist/react-native/policies/StorageBrowserPolicyV2.js +31 -0
- package/dist/react-native/policies/StorageBrowserPolicyV2.js.map +1 -0
- package/dist/react-native/policies/StorageCorrectContentLengthPolicy.d.ts +10 -0
- package/dist/react-native/policies/StorageCorrectContentLengthPolicy.d.ts.map +1 -0
- package/dist/react-native/policies/StorageCorrectContentLengthPolicy.js +27 -0
- package/dist/react-native/policies/StorageCorrectContentLengthPolicy.js.map +1 -0
- package/dist/react-native/policies/StorageRetryPolicy.d.ts +62 -0
- package/dist/react-native/policies/StorageRetryPolicy.d.ts.map +1 -0
- package/dist/react-native/policies/StorageRetryPolicy.js +220 -0
- package/dist/react-native/policies/StorageRetryPolicy.js.map +1 -0
- package/dist/react-native/policies/StorageRetryPolicyType.d.ts +14 -0
- package/dist/react-native/policies/StorageRetryPolicyType.d.ts.map +1 -0
- package/dist/react-native/policies/StorageRetryPolicyType.js +17 -0
- package/dist/react-native/policies/StorageRetryPolicyType.js.map +1 -0
- package/dist/react-native/policies/StorageRetryPolicyV2.d.ts +11 -0
- package/dist/react-native/policies/StorageRetryPolicyV2.d.ts.map +1 -0
- package/dist/react-native/policies/StorageRetryPolicyV2.js +165 -0
- package/dist/react-native/policies/StorageRetryPolicyV2.js.map +1 -0
- package/dist/react-native/policies/StorageSharedKeyCredentialPolicy.d.ts +54 -0
- package/dist/react-native/policies/StorageSharedKeyCredentialPolicy.d.ts.map +1 -0
- package/dist/react-native/policies/StorageSharedKeyCredentialPolicy.js +145 -0
- package/dist/react-native/policies/StorageSharedKeyCredentialPolicy.js.map +1 -0
- package/dist/react-native/policies/StorageSharedKeyCredentialPolicyV2.d.ts +17 -0
- package/dist/react-native/policies/StorageSharedKeyCredentialPolicyV2.d.ts.map +1 -0
- package/dist/react-native/policies/StorageSharedKeyCredentialPolicyV2.js +132 -0
- package/dist/react-native/policies/StorageSharedKeyCredentialPolicyV2.js.map +1 -0
- package/dist/react-native/utils/SharedKeyComparator.d.ts +2 -0
- package/dist/react-native/utils/SharedKeyComparator.d.ts.map +1 -0
- package/dist/react-native/utils/SharedKeyComparator.js +73 -0
- package/dist/react-native/utils/SharedKeyComparator.js.map +1 -0
- package/dist/react-native/utils/constants.d.ts +39 -0
- package/dist/react-native/utils/constants.d.ts.map +1 -0
- package/dist/react-native/utils/constants.js +64 -0
- package/dist/react-native/utils/constants.js.map +1 -0
- package/dist/react-native/utils/tracing.d.ts +6 -0
- package/dist/react-native/utils/tracing.d.ts.map +1 -0
- package/dist/react-native/utils/tracing.js +14 -0
- package/dist/react-native/utils/tracing.js.map +1 -0
- package/dist/react-native/utils/utils.common.d.ts +305 -0
- package/dist/react-native/utils/utils.common.d.ts.map +1 -0
- package/dist/react-native/utils/utils.common.js +544 -0
- package/dist/react-native/utils/utils.common.js.map +1 -0
- package/package.json +12 -6
- package/dist/browser/index.d.ts.map +0 -1
- package/dist/browser/index.js.map +0 -1
|
@@ -5,6 +5,20 @@ import { Readable } from "node:stream";
|
|
|
5
5
|
* This class generates a readable stream from the data in an array of buffers.
|
|
6
6
|
*/
|
|
7
7
|
export class BuffersStream extends Readable {
|
|
8
|
+
buffers;
|
|
9
|
+
byteLength;
|
|
10
|
+
/**
|
|
11
|
+
* The offset of data to be read in the current buffer.
|
|
12
|
+
*/
|
|
13
|
+
byteOffsetInCurrentBuffer;
|
|
14
|
+
/**
|
|
15
|
+
* The index of buffer to be read in the array of buffers.
|
|
16
|
+
*/
|
|
17
|
+
bufferIndex;
|
|
18
|
+
/**
|
|
19
|
+
* The total length of data already read.
|
|
20
|
+
*/
|
|
21
|
+
pushedBytesLength;
|
|
8
22
|
/**
|
|
9
23
|
* Creates an instance of BuffersStream that will emit the data
|
|
10
24
|
* contained in the array of buffers.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BuffersStream.js","sourceRoot":"","sources":["../../src/BuffersStream.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAGlC,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAOvC;;GAEG;AACH,MAAM,OAAO,aAAc,SAAQ,QAAQ;
|
|
1
|
+
{"version":3,"file":"BuffersStream.js","sourceRoot":"","sources":["../../src/BuffersStream.ts"],"names":[],"mappings":"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","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { ReadableOptions } from \"node:stream\";\nimport { Readable } from \"node:stream\";\n\n/**\n * Options to configure the BuffersStream.\n */\nexport interface BuffersStreamOptions extends ReadableOptions {}\n\n/**\n * This class generates a readable stream from the data in an array of buffers.\n */\nexport class BuffersStream extends Readable {\n /**\n * The offset of data to be read in the current buffer.\n */\n private byteOffsetInCurrentBuffer: number;\n\n /**\n * The index of buffer to be read in the array of buffers.\n */\n private bufferIndex: number;\n\n /**\n * The total length of data already read.\n */\n private pushedBytesLength: number;\n\n /**\n * Creates an instance of BuffersStream that will emit the data\n * contained in the array of buffers.\n *\n * @param buffers - Array of buffers containing the data\n * @param byteLength - The total length of data contained in the buffers\n */\n constructor(\n private buffers: Buffer[],\n private byteLength: number,\n options?: BuffersStreamOptions,\n ) {\n super(options);\n this.byteOffsetInCurrentBuffer = 0;\n this.bufferIndex = 0;\n this.pushedBytesLength = 0;\n\n // check byteLength is no larger than buffers[] total length\n let buffersLength = 0;\n for (const buf of this.buffers) {\n buffersLength += buf.byteLength;\n }\n if (buffersLength < this.byteLength) {\n throw new Error(\"Data size shouldn't be larger than the total length of buffers.\");\n }\n }\n\n /**\n * Internal _read() that will be called when the stream wants to pull more data in.\n *\n * @param size - Optional. The size of data to be read\n */\n public _read(size?: number): void {\n if (this.pushedBytesLength >= this.byteLength) {\n this.push(null);\n }\n\n if (!size) {\n size = this.readableHighWaterMark;\n }\n\n const outBuffers: Buffer[] = [];\n let i = 0;\n while (i < size && this.pushedBytesLength < this.byteLength) {\n // The last buffer may be longer than the data it contains.\n const remainingDataInAllBuffers = this.byteLength - this.pushedBytesLength;\n const remainingCapacityInThisBuffer =\n this.buffers[this.bufferIndex].byteLength - this.byteOffsetInCurrentBuffer;\n const remaining = Math.min(remainingCapacityInThisBuffer, remainingDataInAllBuffers);\n if (remaining > size - i) {\n // chunkSize = size - i\n const end = this.byteOffsetInCurrentBuffer + size - i;\n outBuffers.push(this.buffers[this.bufferIndex].slice(this.byteOffsetInCurrentBuffer, end));\n this.pushedBytesLength += size - i;\n this.byteOffsetInCurrentBuffer = end;\n i = size;\n break;\n } else {\n // chunkSize = remaining\n const end = this.byteOffsetInCurrentBuffer + remaining;\n outBuffers.push(this.buffers[this.bufferIndex].slice(this.byteOffsetInCurrentBuffer, end));\n if (remaining === remainingCapacityInThisBuffer) {\n // this.buffers[this.bufferIndex] used up, shift to next one\n this.byteOffsetInCurrentBuffer = 0;\n this.bufferIndex++;\n } else {\n this.byteOffsetInCurrentBuffer = end;\n }\n this.pushedBytesLength += remaining;\n i += remaining;\n }\n }\n\n if (outBuffers.length > 1) {\n this.push(Buffer.concat(outBuffers));\n } else if (outBuffers.length === 1) {\n this.push(outBuffers[0]);\n }\n }\n}\n"]}
|
|
@@ -15,6 +15,19 @@ const maxBufferLength = buffer.constants.MAX_LENGTH;
|
|
|
15
15
|
* assembled from all the data in the internal "buffer".
|
|
16
16
|
*/
|
|
17
17
|
export class PooledBuffer {
|
|
18
|
+
/**
|
|
19
|
+
* Internal buffers used to keep the data.
|
|
20
|
+
* Each buffer has a length of the maxBufferLength except last one.
|
|
21
|
+
*/
|
|
22
|
+
buffers = [];
|
|
23
|
+
/**
|
|
24
|
+
* The total size of internal buffers.
|
|
25
|
+
*/
|
|
26
|
+
capacity;
|
|
27
|
+
/**
|
|
28
|
+
* The total size of data contained in internal buffers.
|
|
29
|
+
*/
|
|
30
|
+
_size;
|
|
18
31
|
/**
|
|
19
32
|
* The size of the data contained in the pooled buffers.
|
|
20
33
|
*/
|
|
@@ -22,11 +35,6 @@ export class PooledBuffer {
|
|
|
22
35
|
return this._size;
|
|
23
36
|
}
|
|
24
37
|
constructor(capacity, buffers, totalLength) {
|
|
25
|
-
/**
|
|
26
|
-
* Internal buffers used to keep the data.
|
|
27
|
-
* Each buffer has a length of the maxBufferLength except last one.
|
|
28
|
-
*/
|
|
29
|
-
this.buffers = [];
|
|
30
38
|
this.capacity = capacity;
|
|
31
39
|
this._size = 0;
|
|
32
40
|
// allocate
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PooledBuffer.js","sourceRoot":"","sources":["../../src/PooledBuffer.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAEnD,OAAO,MAAM,MAAM,aAAa,CAAC;AAEjC;;GAEG;AAEH,MAAM,eAAe,GAAG,MAAM,CAAC,SAAS,CAAC,UAAU,CAAC;AAEpD;;;;;;;GAOG;AACH,MAAM,OAAO,YAAY;
|
|
1
|
+
{"version":3,"file":"PooledBuffer.js","sourceRoot":"","sources":["../../src/PooledBuffer.ts"],"names":[],"mappings":"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","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { BuffersStream } from \"./BuffersStream.js\";\nimport type { Readable } from \"node:stream\";\nimport buffer from \"node:buffer\";\n\n/**\n * maxBufferLength is max size of each buffer in the pooled buffers.\n */\n\nconst maxBufferLength = buffer.constants.MAX_LENGTH;\n\n/**\n * This class provides a buffer container which conceptually has no hard size limit.\n * It accepts a capacity, an array of input buffers and the total length of input data.\n * It will allocate an internal \"buffer\" of the capacity and fill the data in the input buffers\n * into the internal \"buffer\" serially with respect to the total length.\n * Then by calling PooledBuffer.getReadableStream(), you can get a readable stream\n * assembled from all the data in the internal \"buffer\".\n */\nexport class PooledBuffer {\n /**\n * Internal buffers used to keep the data.\n * Each buffer has a length of the maxBufferLength except last one.\n */\n private buffers: Buffer[] = [];\n\n /**\n * The total size of internal buffers.\n */\n private readonly capacity: number;\n\n /**\n * The total size of data contained in internal buffers.\n */\n private _size: number;\n\n /**\n * The size of the data contained in the pooled buffers.\n */\n public get size(): number {\n return this._size;\n }\n\n /**\n * Creates an instance of PooledBuffer with given capacity.\n * Internal buffers are allocated but contains no data.\n * Users may call the {@link PooledBuffer.fill} method to fill this\n * pooled buffer with data.\n *\n * @param capacity - Total capacity of the internal buffers\n */\n constructor(capacity: number);\n\n /**\n * Creates an instance of PooledBuffer with given capacity.\n * Internal buffers are allocated and filled with data in the input buffers serially\n * with respect to the total length.\n *\n * @param capacity - Total capacity of the internal buffers\n * @param buffers - Input buffers containing the data to be filled in the pooled buffer\n * @param totalLength - Total length of the data to be filled in.\n */\n constructor(capacity: number, buffers: Buffer[], totalLength: number);\n constructor(capacity: number, buffers?: Buffer[], totalLength?: number) {\n this.capacity = capacity;\n this._size = 0;\n\n // allocate\n const bufferNum = Math.ceil(capacity / maxBufferLength);\n for (let i = 0; i < bufferNum; i++) {\n let len = i === bufferNum - 1 ? capacity % maxBufferLength : maxBufferLength;\n if (len === 0) {\n len = maxBufferLength;\n }\n this.buffers.push(Buffer.allocUnsafe(len));\n }\n\n if (buffers) {\n this.fill(buffers, totalLength!);\n }\n }\n\n /**\n * Fill the internal buffers with data in the input buffers serially\n * with respect to the total length and the total capacity of the internal buffers.\n * Data copied will be shift out of the input buffers.\n *\n * @param buffers - Input buffers containing the data to be filled in the pooled buffer\n * @param totalLength - Total length of the data to be filled in.\n *\n */\n public fill(buffers: Buffer[], totalLength: number): void {\n this._size = Math.min(this.capacity, totalLength);\n\n let i = 0,\n j = 0,\n targetOffset = 0,\n sourceOffset = 0,\n totalCopiedNum = 0;\n while (totalCopiedNum < this._size) {\n const source = buffers[i];\n const target = this.buffers[j];\n const copiedNum = source.copy(target, targetOffset, sourceOffset);\n\n totalCopiedNum += copiedNum;\n sourceOffset += copiedNum;\n targetOffset += copiedNum;\n if (sourceOffset === source.length) {\n i++;\n sourceOffset = 0;\n }\n if (targetOffset === target.length) {\n j++;\n targetOffset = 0;\n }\n }\n\n // clear copied from source buffers\n buffers.splice(0, i);\n if (buffers.length > 0) {\n buffers[0] = buffers[0].slice(sourceOffset);\n }\n }\n\n /**\n * Get the readable stream assembled from all the data in the internal buffers.\n *\n */\n public getReadableStream(): Readable {\n return new BuffersStream(this.buffers, this.size);\n }\n}\n"]}
|
|
@@ -0,0 +1,16 @@
|
|
|
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
|
|
@@ -0,0 +1 @@
|
|
|
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"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
// Copyright (c) Microsoft Corporation.
|
|
2
|
+
// Licensed under the MIT License.
|
|
3
|
+
import { StorageBrowserPolicy } from "./policies/StorageBrowserPolicy.js";
|
|
4
|
+
export { StorageBrowserPolicy };
|
|
5
|
+
/**
|
|
6
|
+
* StorageBrowserPolicyFactory is a factory class helping generating StorageBrowserPolicy objects.
|
|
7
|
+
*/
|
|
8
|
+
export class StorageBrowserPolicyFactory {
|
|
9
|
+
/**
|
|
10
|
+
* Creates a StorageBrowserPolicyFactory object.
|
|
11
|
+
*
|
|
12
|
+
* @param nextPolicy -
|
|
13
|
+
* @param options -
|
|
14
|
+
*/
|
|
15
|
+
create(nextPolicy, options) {
|
|
16
|
+
return new StorageBrowserPolicy(nextPolicy, options);
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
//# sourceMappingURL=StorageBrowserPolicyFactory.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"StorageBrowserPolicyFactory.js","sourceRoot":"","sources":["../../src/StorageBrowserPolicyFactory.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAOlC,OAAO,EAAE,oBAAoB,EAAE,MAAM,oCAAoC,CAAC;AAC1E,OAAO,EAAE,oBAAoB,EAAE,CAAC;AAEhC;;GAEG;AACH,MAAM,OAAO,2BAA2B;IACtC;;;;;OAKG;IACI,MAAM,CAAC,UAAyB,EAAE,OAA6B;QACpE,OAAO,IAAI,oBAAoB,CAAC,UAAU,EAAE,OAAO,CAAC,CAAC;IACvD,CAAC;CACF","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"]}
|
|
@@ -0,0 +1,66 @@
|
|
|
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/en-us/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/en-us/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
|
|
@@ -0,0 +1 @@
|
|
|
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"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
// Copyright (c) Microsoft Corporation.
|
|
2
|
+
// Licensed under the MIT License.
|
|
3
|
+
import { StorageRetryPolicy } from "./policies/StorageRetryPolicy.js";
|
|
4
|
+
import { StorageRetryPolicyType } from "./policies/StorageRetryPolicyType.js";
|
|
5
|
+
export { StorageRetryPolicyType, StorageRetryPolicy };
|
|
6
|
+
/**
|
|
7
|
+
* StorageRetryPolicyFactory is a factory class helping generating {@link StorageRetryPolicy} objects.
|
|
8
|
+
*/
|
|
9
|
+
export class StorageRetryPolicyFactory {
|
|
10
|
+
retryOptions;
|
|
11
|
+
/**
|
|
12
|
+
* Creates an instance of StorageRetryPolicyFactory.
|
|
13
|
+
* @param retryOptions -
|
|
14
|
+
*/
|
|
15
|
+
constructor(retryOptions) {
|
|
16
|
+
this.retryOptions = retryOptions;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Creates a StorageRetryPolicy object.
|
|
20
|
+
*
|
|
21
|
+
* @param nextPolicy -
|
|
22
|
+
* @param options -
|
|
23
|
+
*/
|
|
24
|
+
create(nextPolicy, options) {
|
|
25
|
+
return new StorageRetryPolicy(nextPolicy, options, this.retryOptions);
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
//# sourceMappingURL=StorageRetryPolicyFactory.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"StorageRetryPolicyFactory.js","sourceRoot":"","sources":["../../src/StorageRetryPolicyFactory.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAOlC,OAAO,EAAE,kBAAkB,EAAE,MAAM,kCAAkC,CAAC;AACtE,OAAO,EAAE,sBAAsB,EAAE,MAAM,sCAAsC,CAAC;AAE9E,OAAO,EAAE,sBAAsB,EAAE,kBAAkB,EAAE,CAAC;AAmDtD;;GAEG;AACH,MAAM,OAAO,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,kBAAkB,CAAC,UAAU,EAAE,OAAO,EAAE,IAAI,CAAC,YAAY,CAAC,CAAC;IACxE,CAAC;CACF","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/en-us/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/en-us/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"]}
|
|
@@ -0,0 +1,19 @@
|
|
|
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
|
|
@@ -0,0 +1 @@
|
|
|
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"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
// Copyright (c) Microsoft Corporation.
|
|
2
|
+
// Licensed under the MIT License.
|
|
3
|
+
import { AnonymousCredentialPolicy } from "../policies/AnonymousCredentialPolicy.js";
|
|
4
|
+
import { Credential } from "./Credential.js";
|
|
5
|
+
/**
|
|
6
|
+
* AnonymousCredential provides a credentialPolicyCreator member used to create
|
|
7
|
+
* AnonymousCredentialPolicy objects. AnonymousCredentialPolicy is used with
|
|
8
|
+
* HTTP(S) requests that read public resources or for use with Shared Access
|
|
9
|
+
* Signatures (SAS).
|
|
10
|
+
*/
|
|
11
|
+
export class AnonymousCredential extends Credential {
|
|
12
|
+
/**
|
|
13
|
+
* Creates an {@link AnonymousCredentialPolicy} object.
|
|
14
|
+
*
|
|
15
|
+
* @param nextPolicy -
|
|
16
|
+
* @param options -
|
|
17
|
+
*/
|
|
18
|
+
create(nextPolicy, options) {
|
|
19
|
+
return new AnonymousCredentialPolicy(nextPolicy, options);
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
//# sourceMappingURL=AnonymousCredential.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AnonymousCredential.js","sourceRoot":"","sources":["../../../src/credentials/AnonymousCredential.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAMlC,OAAO,EAAE,yBAAyB,EAAE,MAAM,0CAA0C,CAAC;AACrF,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAE7C;;;;;GAKG;AACH,MAAM,OAAO,mBAAoB,SAAQ,UAAU;IACjD;;;;;OAKG;IACI,MAAM,CACX,UAAyB,EACzB,OAA6B;QAE7B,OAAO,IAAI,yBAAyB,CAAC,UAAU,EAAE,OAAO,CAAC,CAAC;IAC5D,CAAC;CACF","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"]}
|
|
@@ -0,0 +1,20 @@
|
|
|
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
|
|
@@ -0,0 +1 @@
|
|
|
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"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
// Copyright (c) Microsoft Corporation.
|
|
2
|
+
// Licensed under the MIT License.
|
|
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 class Credential {
|
|
8
|
+
/**
|
|
9
|
+
* Creates a RequestPolicy object.
|
|
10
|
+
*
|
|
11
|
+
* @param _nextPolicy -
|
|
12
|
+
* @param _options -
|
|
13
|
+
*/
|
|
14
|
+
create(_nextPolicy, _options) {
|
|
15
|
+
throw new Error("Method should be implemented in children classes.");
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
//# sourceMappingURL=Credential.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Credential.js","sourceRoot":"","sources":["../../../src/credentials/Credential.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AASlC;;;GAGG;AACH,MAAM,OAAgB,UAAU;IAC9B;;;;;OAKG;IACI,MAAM,CAAC,WAA0B,EAAE,QAA8B;QACtE,MAAM,IAAI,KAAK,CAAC,mDAAmD,CAAC,CAAC;IACvE,CAAC;CACF","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"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"StorageSharedKeyCredential-browser.d.mts","sourceRoot":"","sources":["../../../src/credentials/StorageSharedKeyCredential-browser.mts"],"names":[],"mappings":"AAGA,qBAAa,0BAA0B;CAAG"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"StorageSharedKeyCredential-browser.mjs","sourceRoot":"","sources":["../../../src/credentials/StorageSharedKeyCredential-browser.mts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,MAAM,OAAO,0BAA0B;CAAG","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nexport class StorageSharedKeyCredential {}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index-browser.d.mts","sourceRoot":"","sources":["../../src/index-browser.mts"],"names":[],"mappings":"AAGA,cAAc,sBAAsB,CAAC;AACrC,OAAO,EAAE,0BAA0B,EAAE,MAAM,YAAY,CAAC;AAExD,cAAc,kCAAkC,CAAC;AACjD,cAAc,sCAAsC,CAAC;AACrD,cAAc,6BAA6B,CAAC;AAC5C,cAAc,6CAA6C,CAAC;AAE5D,cAAc,gCAAgC,CAAC;AAC/C,OAAO,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AAChE,cAAc,yCAAyC,CAAC;AACxD,cAAc,gCAAgC,CAAC;AAC/C,cAAc,oCAAoC,CAAC;AACnD,cAAc,sCAAsC,CAAC;AACrD,cAAc,iDAAiD,CAAC;AAChE,cAAc,sCAAsC,CAAC;AACrD,cAAc,kCAAkC,CAAC;AACjD,cAAc,oCAAoC,CAAC;AACnD,cAAc,kDAAkD,CAAC;AACjE,cAAc,gCAAgC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index-browser.mjs","sourceRoot":"","sources":["../../src/index-browser.mts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,cAAc,sBAAsB,CAAC;AACrC,OAAO,EAAE,0BAA0B,EAAE,MAAM,YAAY,CAAC;AAExD,cAAc,kCAAkC,CAAC;AACjD,cAAc,sCAAsC,CAAC;AACrD,cAAc,6BAA6B,CAAC;AAC5C,cAAc,6CAA6C,CAAC;AAE5D,cAAc,gCAAgC,CAAC;AAC/C,OAAO,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AAChE,cAAc,yCAAyC,CAAC;AACxD,cAAc,gCAAgC,CAAC;AAC/C,cAAc,oCAAoC,CAAC;AACnD,cAAc,sCAAsC,CAAC;AACrD,cAAc,iDAAiD,CAAC;AAChE,cAAc,sCAAsC,CAAC;AACrD,cAAc,kCAAkC,CAAC;AACjD,cAAc,oCAAoC,CAAC;AACnD,cAAc,kDAAkD,CAAC;AACjE,cAAc,gCAAgC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nexport * from \"./BufferScheduler.js\";\nexport { getCachedDefaultHttpClient } from \"./cache.js\";\n\nexport * from \"./StorageBrowserPolicyFactory.js\";\nexport * from \"./credentials/AnonymousCredential.js\";\nexport * from \"./credentials/Credential.js\";\nexport * from \"./credentials/StorageSharedKeyCredential.js\";\n\nexport * from \"./StorageRetryPolicyFactory.js\";\nexport { BaseRequestPolicy } from \"./policies/RequestPolicy.js\";\nexport * from \"./policies/AnonymousCredentialPolicy.js\";\nexport * from \"./policies/CredentialPolicy.js\";\nexport * from \"./policies/StorageBrowserPolicy.js\";\nexport * from \"./policies/StorageBrowserPolicyV2.js\";\nexport * from \"./policies/StorageCorrectContentLengthPolicy.js\";\nexport * from \"./policies/StorageRetryPolicyType.js\";\nexport * from \"./policies/StorageRetryPolicy.js\";\nexport * from \"./policies/StorageRetryPolicyV2.js\";\nexport * from \"./policies/StorageSharedKeyCredentialPolicyV2.js\";\nexport * from \"./StorageRetryPolicyFactory.js\";\n"]}
|
package/dist/browser/index.d.ts
CHANGED
|
@@ -1,3 +1,19 @@
|
|
|
1
1
|
export * from "./BufferScheduler.js";
|
|
2
2
|
export { getCachedDefaultHttpClient } from "./cache.js";
|
|
3
|
-
|
|
3
|
+
export * from "./StorageBrowserPolicyFactory.js";
|
|
4
|
+
export * from "./credentials/AnonymousCredential.js";
|
|
5
|
+
export * from "./credentials/Credential.js";
|
|
6
|
+
export * from "./credentials/StorageSharedKeyCredential.js";
|
|
7
|
+
export * from "./StorageRetryPolicyFactory.js";
|
|
8
|
+
export { BaseRequestPolicy } from "./policies/RequestPolicy.js";
|
|
9
|
+
export * from "./policies/AnonymousCredentialPolicy.js";
|
|
10
|
+
export * from "./policies/CredentialPolicy.js";
|
|
11
|
+
export * from "./policies/StorageBrowserPolicy.js";
|
|
12
|
+
export * from "./policies/StorageBrowserPolicyV2.js";
|
|
13
|
+
export * from "./policies/StorageCorrectContentLengthPolicy.js";
|
|
14
|
+
export * from "./policies/StorageRetryPolicyType.js";
|
|
15
|
+
export * from "./policies/StorageRetryPolicy.js";
|
|
16
|
+
export * from "./policies/StorageRetryPolicyV2.js";
|
|
17
|
+
export * from "./policies/StorageSharedKeyCredentialPolicyV2.js";
|
|
18
|
+
export * from "./StorageRetryPolicyFactory.js";
|
|
19
|
+
//# sourceMappingURL=index-browser.d.mts.map
|
package/dist/browser/index.js
CHANGED
|
@@ -2,4 +2,20 @@
|
|
|
2
2
|
// Licensed under the MIT License.
|
|
3
3
|
export * from "./BufferScheduler.js";
|
|
4
4
|
export { getCachedDefaultHttpClient } from "./cache.js";
|
|
5
|
-
|
|
5
|
+
export * from "./StorageBrowserPolicyFactory.js";
|
|
6
|
+
export * from "./credentials/AnonymousCredential.js";
|
|
7
|
+
export * from "./credentials/Credential.js";
|
|
8
|
+
export * from "./credentials/StorageSharedKeyCredential.js";
|
|
9
|
+
export * from "./StorageRetryPolicyFactory.js";
|
|
10
|
+
export { BaseRequestPolicy } from "./policies/RequestPolicy.js";
|
|
11
|
+
export * from "./policies/AnonymousCredentialPolicy.js";
|
|
12
|
+
export * from "./policies/CredentialPolicy.js";
|
|
13
|
+
export * from "./policies/StorageBrowserPolicy.js";
|
|
14
|
+
export * from "./policies/StorageBrowserPolicyV2.js";
|
|
15
|
+
export * from "./policies/StorageCorrectContentLengthPolicy.js";
|
|
16
|
+
export * from "./policies/StorageRetryPolicyType.js";
|
|
17
|
+
export * from "./policies/StorageRetryPolicy.js";
|
|
18
|
+
export * from "./policies/StorageRetryPolicyV2.js";
|
|
19
|
+
export * from "./policies/StorageSharedKeyCredentialPolicyV2.js";
|
|
20
|
+
export * from "./StorageRetryPolicyFactory.js";
|
|
21
|
+
//# sourceMappingURL=index-browser.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"log.d.ts","sourceRoot":"","sources":["../../src/log.ts"],"names":[],"mappings":"AAKA;;GAEG;AACH,eAAO,MAAM,MAAM,qCAAuC,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
// Copyright (c) Microsoft Corporation.
|
|
2
|
+
// Licensed under the MIT License.
|
|
3
|
+
import { createClientLogger } from "@azure/logger";
|
|
4
|
+
/**
|
|
5
|
+
* The `@azure/logger` configuration for this package.
|
|
6
|
+
*/
|
|
7
|
+
export const logger = createClientLogger("storage-common");
|
|
8
|
+
//# sourceMappingURL=log.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"log.js","sourceRoot":"","sources":["../../src/log.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AAEnD;;GAEG;AACH,MAAM,CAAC,MAAM,MAAM,GAAG,kBAAkB,CAAC,gBAAgB,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { createClientLogger } from \"@azure/logger\";\n\n/**\n * The `@azure/logger` configuration for this package.\n */\nexport const logger = createClientLogger(\"storage-common\");\n"]}
|
|
@@ -0,0 +1,15 @@
|
|
|
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
|
|
@@ -0,0 +1 @@
|
|
|
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"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
// Copyright (c) Microsoft Corporation.
|
|
2
|
+
// Licensed under the MIT License.
|
|
3
|
+
import { CredentialPolicy } from "./CredentialPolicy.js";
|
|
4
|
+
/**
|
|
5
|
+
* AnonymousCredentialPolicy is used with HTTP(S) requests that read public resources
|
|
6
|
+
* or for use with Shared Access Signatures (SAS).
|
|
7
|
+
*/
|
|
8
|
+
export class AnonymousCredentialPolicy extends CredentialPolicy {
|
|
9
|
+
/**
|
|
10
|
+
* Creates an instance of AnonymousCredentialPolicy.
|
|
11
|
+
* @param nextPolicy -
|
|
12
|
+
* @param options -
|
|
13
|
+
*/
|
|
14
|
+
// The base class has a protected constructor. Adding a public one to enable constructing of this class.
|
|
15
|
+
/* eslint-disable-next-line @typescript-eslint/no-useless-constructor*/
|
|
16
|
+
constructor(nextPolicy, options) {
|
|
17
|
+
super(nextPolicy, options);
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
//# sourceMappingURL=AnonymousCredentialPolicy.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AnonymousCredentialPolicy.js","sourceRoot":"","sources":["../../../src/policies/AnonymousCredentialPolicy.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAMlC,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAEzD;;;GAGG;AACH,MAAM,OAAO,yBAA0B,SAAQ,gBAAgB;IAC7D;;;;OAIG;IACH,wGAAwG;IACxG,uEAAuE;IACvE,YAAY,UAAyB,EAAE,OAA6B;QAClE,KAAK,CAAC,UAAU,EAAE,OAAO,CAAC,CAAC;IAC7B,CAAC;CACF","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 { CredentialPolicy } from \"./CredentialPolicy.js\";\n\n/**\n * AnonymousCredentialPolicy is used with HTTP(S) requests that read public resources\n * or for use with Shared Access Signatures (SAS).\n */\nexport class AnonymousCredentialPolicy extends CredentialPolicy {\n /**\n * Creates an instance of AnonymousCredentialPolicy.\n * @param nextPolicy -\n * @param options -\n */\n // The base class has a protected constructor. Adding a public one to enable constructing of this class.\n /* eslint-disable-next-line @typescript-eslint/no-useless-constructor*/\n constructor(nextPolicy: RequestPolicy, options: RequestPolicyOptions) {\n super(nextPolicy, options);\n }\n}\n"]}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { BaseRequestPolicy } from "./RequestPolicy.js";
|
|
2
|
+
import type { WebResourceLike as WebResource, CompatResponse as HttpOperationResponse } from "@azure/core-http-compat";
|
|
3
|
+
/**
|
|
4
|
+
* Credential policy used to sign HTTP(S) requests before sending. This is an
|
|
5
|
+
* abstract class.
|
|
6
|
+
*/
|
|
7
|
+
export declare abstract class CredentialPolicy extends BaseRequestPolicy {
|
|
8
|
+
/**
|
|
9
|
+
* Sends out request.
|
|
10
|
+
*
|
|
11
|
+
* @param request -
|
|
12
|
+
*/
|
|
13
|
+
sendRequest(request: WebResource): Promise<HttpOperationResponse>;
|
|
14
|
+
/**
|
|
15
|
+
* Child classes must implement this method with request signing. This method
|
|
16
|
+
* will be executed in {@link sendRequest}.
|
|
17
|
+
*
|
|
18
|
+
* @param request -
|
|
19
|
+
*/
|
|
20
|
+
protected signRequest(request: WebResource): WebResource;
|
|
21
|
+
}
|
|
22
|
+
//# sourceMappingURL=CredentialPolicy.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CredentialPolicy.d.ts","sourceRoot":"","sources":["../../../src/policies/CredentialPolicy.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AACvD,OAAO,KAAK,EACV,eAAe,IAAI,WAAW,EAC9B,cAAc,IAAI,qBAAqB,EACxC,MAAM,yBAAyB,CAAC;AAEjC;;;GAGG;AACH,8BAAsB,gBAAiB,SAAQ,iBAAiB;IAC9D;;;;OAIG;IACI,WAAW,CAAC,OAAO,EAAE,WAAW,GAAG,OAAO,CAAC,qBAAqB,CAAC;IAIxE;;;;;OAKG;IACH,SAAS,CAAC,WAAW,CAAC,OAAO,EAAE,WAAW,GAAG,WAAW;CAKzD"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
// Copyright (c) Microsoft Corporation.
|
|
2
|
+
// Licensed under the MIT License.
|
|
3
|
+
import { BaseRequestPolicy } from "./RequestPolicy.js";
|
|
4
|
+
/**
|
|
5
|
+
* Credential policy used to sign HTTP(S) requests before sending. This is an
|
|
6
|
+
* abstract class.
|
|
7
|
+
*/
|
|
8
|
+
export class CredentialPolicy extends BaseRequestPolicy {
|
|
9
|
+
/**
|
|
10
|
+
* Sends out request.
|
|
11
|
+
*
|
|
12
|
+
* @param request -
|
|
13
|
+
*/
|
|
14
|
+
sendRequest(request) {
|
|
15
|
+
return this._nextPolicy.sendRequest(this.signRequest(request));
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Child classes must implement this method with request signing. This method
|
|
19
|
+
* will be executed in {@link sendRequest}.
|
|
20
|
+
*
|
|
21
|
+
* @param request -
|
|
22
|
+
*/
|
|
23
|
+
signRequest(request) {
|
|
24
|
+
// Child classes must override this method with request signing. This method
|
|
25
|
+
// will be executed in sendRequest().
|
|
26
|
+
return request;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
//# sourceMappingURL=CredentialPolicy.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CredentialPolicy.js","sourceRoot":"","sources":["../../../src/policies/CredentialPolicy.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAMvD;;;GAGG;AACH,MAAM,OAAgB,gBAAiB,SAAQ,iBAAiB;IAC9D;;;;OAIG;IACI,WAAW,CAAC,OAAoB;QACrC,OAAO,IAAI,CAAC,WAAW,CAAC,WAAW,CAAC,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC,CAAC;IACjE,CAAC;IAED;;;;;OAKG;IACO,WAAW,CAAC,OAAoB;QACxC,4EAA4E;QAC5E,qCAAqC;QACrC,OAAO,OAAO,CAAC;IACjB,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { BaseRequestPolicy } from \"./RequestPolicy.js\";\nimport type {\n WebResourceLike as WebResource,\n CompatResponse as HttpOperationResponse,\n} from \"@azure/core-http-compat\";\n\n/**\n * Credential policy used to sign HTTP(S) requests before sending. This is an\n * abstract class.\n */\nexport abstract class CredentialPolicy extends BaseRequestPolicy {\n /**\n * Sends out request.\n *\n * @param request -\n */\n public sendRequest(request: WebResource): Promise<HttpOperationResponse> {\n return this._nextPolicy.sendRequest(this.signRequest(request));\n }\n\n /**\n * Child classes must implement this method with request signing. This method\n * will be executed in {@link sendRequest}.\n *\n * @param request -\n */\n protected signRequest(request: WebResource): WebResource {\n // Child classes must override this method with request signing. This method\n // will be executed in sendRequest().\n return request;\n }\n}\n"]}
|