@azure/storage-file-datalake 12.26.0 → 12.27.0-beta.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/README.md +117 -190
- package/dist/browser/DataLakeFileSystemClient.d.ts +473 -0
- package/dist/browser/DataLakeFileSystemClient.d.ts.map +1 -0
- package/{dist-esm/storage-file-datalake/src → dist/browser}/DataLakeFileSystemClient.js +170 -75
- package/dist/browser/DataLakeFileSystemClient.js.map +1 -0
- package/dist/browser/DataLakeLeaseClient.d.ts +14 -0
- package/dist/browser/DataLakeLeaseClient.d.ts.map +1 -0
- package/{dist-esm/storage-file-datalake/src → dist/browser}/DataLakeLeaseClient.js +3 -1
- package/dist/browser/DataLakeLeaseClient.js.map +1 -0
- package/dist/browser/DataLakeServiceClient.d.ts +281 -0
- package/dist/browser/DataLakeServiceClient.d.ts.map +1 -0
- package/{dist-esm/storage-file-datalake/src → dist/browser}/DataLakeServiceClient.js +94 -62
- package/dist/browser/DataLakeServiceClient.js.map +1 -0
- package/dist/browser/Pipeline.d.ts +52 -0
- package/dist/browser/Pipeline.d.ts.map +1 -0
- package/{dist-esm/storage-file-datalake/src → dist/browser}/Pipeline.js +8 -8
- package/dist/browser/Pipeline.js.map +1 -0
- package/dist/browser/StorageClient.d.ts +61 -0
- package/dist/browser/StorageClient.d.ts.map +1 -0
- package/{dist-esm/storage-file-datalake/src → dist/browser}/StorageClient.js +5 -3
- package/dist/browser/StorageClient.js.map +1 -0
- package/dist/browser/StorageContextClient.d.ts +9 -0
- package/dist/browser/StorageContextClient.d.ts.map +1 -0
- package/{dist-esm/storage-file-datalake/src → dist/browser}/StorageContextClient.js +3 -3
- package/dist/browser/StorageContextClient.js.map +1 -0
- package/dist/browser/clients.d.ts +689 -0
- package/dist/browser/clients.d.ts.map +1 -0
- package/{dist-esm/storage-file-datalake/src → dist/browser}/clients.js +87 -45
- package/dist/browser/clients.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-esm/storage-file-datalake/src/credentials/StorageSharedKeyCredential.browser.js → dist/browser/credentials/StorageSharedKeyCredential.js} +1 -1
- package/dist/browser/credentials/UserDelegationKeyCredential-browser.d.mts.map +1 -0
- package/dist/browser/credentials/UserDelegationKeyCredential-browser.mjs.map +1 -0
- package/dist/browser/credentials/UserDelegationKeyCredential.d.ts +3 -0
- package/{dist-esm/storage-file-datalake/src/credentials/UserDelegationKeyCredential.browser.js → dist/browser/credentials/UserDelegationKeyCredential.js} +1 -1
- package/dist/browser/generated/src/index.d.ts +4 -0
- package/dist/browser/generated/src/index.d.ts.map +1 -0
- package/{dist-esm/storage-file-datalake/src → dist/browser}/generated/src/index.js +3 -3
- package/dist/browser/generated/src/index.js.map +1 -0
- package/dist/browser/generated/src/models/index.d.ts +1091 -0
- package/dist/browser/generated/src/models/index.d.ts.map +1 -0
- package/dist/browser/generated/src/models/index.js.map +1 -0
- package/dist/browser/generated/src/models/mappers.d.ts +53 -0
- package/dist/browser/generated/src/models/mappers.d.ts.map +1 -0
- package/dist/browser/generated/src/models/mappers.js.map +1 -0
- package/dist/browser/generated/src/models/parameters.d.ts +87 -0
- package/dist/browser/generated/src/models/parameters.d.ts.map +1 -0
- package/{dist-esm/storage-file-datalake/src → dist/browser}/generated/src/models/parameters.js +1 -1
- package/dist/browser/generated/src/models/parameters.js.map +1 -0
- package/dist/browser/generated/src/operations/fileSystemOperations.d.ts +55 -0
- package/dist/browser/generated/src/operations/fileSystemOperations.d.ts.map +1 -0
- package/{dist-esm/storage-file-datalake/src → dist/browser}/generated/src/operations/fileSystemOperations.js +2 -2
- package/dist/browser/generated/src/operations/fileSystemOperations.js.map +1 -0
- package/dist/browser/generated/src/operations/index.d.ts +4 -0
- package/dist/browser/generated/src/operations/index.d.ts.map +1 -0
- package/{dist-esm/storage-file-datalake/src/generated/src/operationsInterfaces → dist/browser/generated/src/operations}/index.js +3 -3
- package/dist/browser/generated/src/operations/index.js.map +1 -0
- package/dist/browser/generated/src/operations/pathOperations.d.ts +120 -0
- package/dist/browser/generated/src/operations/pathOperations.d.ts.map +1 -0
- package/{dist-esm/storage-file-datalake/src → dist/browser}/generated/src/operations/pathOperations.js +2 -2
- package/dist/browser/generated/src/operations/pathOperations.js.map +1 -0
- package/dist/browser/generated/src/operations/service.d.ts +18 -0
- package/dist/browser/generated/src/operations/service.d.ts.map +1 -0
- package/{dist-esm/storage-file-datalake/src → dist/browser}/generated/src/operations/service.js +2 -2
- package/dist/browser/generated/src/operations/service.js.map +1 -0
- package/dist/browser/generated/src/operationsInterfaces/fileSystemOperations.d.ts +47 -0
- package/dist/browser/generated/src/operationsInterfaces/fileSystemOperations.d.ts.map +1 -0
- package/dist/browser/generated/src/operationsInterfaces/fileSystemOperations.js.map +1 -0
- package/dist/browser/generated/src/operationsInterfaces/index.d.ts +4 -0
- package/dist/browser/generated/src/operationsInterfaces/index.d.ts.map +1 -0
- package/dist/browser/generated/src/operationsInterfaces/index.js +11 -0
- package/dist/browser/generated/src/operationsInterfaces/index.js.map +1 -0
- package/dist/browser/generated/src/operationsInterfaces/pathOperations.d.ts +112 -0
- package/dist/browser/generated/src/operationsInterfaces/pathOperations.d.ts.map +1 -0
- package/dist/browser/generated/src/operationsInterfaces/pathOperations.js.map +1 -0
- package/dist/browser/generated/src/operationsInterfaces/service.d.ts +10 -0
- package/dist/browser/generated/src/operationsInterfaces/service.d.ts.map +1 -0
- package/dist/browser/generated/src/operationsInterfaces/service.js.map +1 -0
- package/dist/browser/generated/src/storageClient.d.ts +20 -0
- package/dist/browser/generated/src/storageClient.d.ts.map +1 -0
- package/{dist-esm/storage-file-datalake/src → dist/browser}/generated/src/storageClient.js +3 -3
- package/dist/browser/generated/src/storageClient.js.map +1 -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 +13 -0
- package/{dist-esm/storage-file-datalake/src/index.browser.js → dist/browser/index.js} +10 -10
- package/dist/browser/log.d.ts +5 -0
- package/dist/browser/log.d.ts.map +1 -0
- package/dist/browser/log.js.map +1 -0
- package/dist/browser/models.d.ts +1318 -0
- package/dist/browser/models.d.ts.map +1 -0
- package/dist/browser/models.internal.d.ts +2 -0
- package/dist/browser/models.internal.d.ts.map +1 -0
- package/dist/browser/models.internal.js.map +1 -0
- package/{dist-esm/storage-file-datalake/src → dist/browser}/models.js +2 -0
- package/dist/browser/models.js.map +1 -0
- package/dist/browser/package.json +3 -0
- package/dist/browser/sas/AccountSASPermissions.d.ts +61 -0
- package/dist/browser/sas/AccountSASPermissions.d.ts.map +1 -0
- package/dist/browser/sas/AccountSASPermissions.js.map +1 -0
- package/dist/browser/sas/AccountSASResourceTypes.d.ts +38 -0
- package/dist/browser/sas/AccountSASResourceTypes.d.ts.map +1 -0
- package/dist/browser/sas/AccountSASResourceTypes.js.map +1 -0
- package/dist/browser/sas/AccountSASServices.d.ts +40 -0
- package/dist/browser/sas/AccountSASServices.d.ts.map +1 -0
- package/dist/browser/sas/AccountSASServices.js.map +1 -0
- package/dist/browser/sas/AccountSASSignatureValues.d.ts +78 -0
- package/dist/browser/sas/AccountSASSignatureValues.d.ts.map +1 -0
- package/{dist-esm/storage-file-datalake/src → dist/browser}/sas/AccountSASSignatureValues.js +7 -7
- package/dist/browser/sas/AccountSASSignatureValues.js.map +1 -0
- package/dist/browser/sas/DataLakeSASPermissions.d.ts +65 -0
- package/dist/browser/sas/DataLakeSASPermissions.d.ts.map +1 -0
- package/dist/browser/sas/DataLakeSASPermissions.js.map +1 -0
- package/dist/browser/sas/DataLakeSASSignatureValues.d.ts +205 -0
- package/dist/browser/sas/DataLakeSASSignatureValues.d.ts.map +1 -0
- package/{dist-esm/storage-file-datalake/src → dist/browser}/sas/DataLakeSASSignatureValues.js +107 -10
- package/dist/browser/sas/DataLakeSASSignatureValues.js.map +1 -0
- package/dist/browser/sas/DirectorySASPermissions.d.ts +69 -0
- package/dist/browser/sas/DirectorySASPermissions.d.ts.map +1 -0
- package/dist/browser/sas/DirectorySASPermissions.js.map +1 -0
- package/dist/browser/sas/FileSystemSASPermissions.d.ts +69 -0
- package/dist/browser/sas/FileSystemSASPermissions.d.ts.map +1 -0
- package/dist/browser/sas/FileSystemSASPermissions.js.map +1 -0
- package/dist/browser/sas/SASQueryParameters.d.ts +309 -0
- package/dist/browser/sas/SASQueryParameters.d.ts.map +1 -0
- package/{dist-esm/storage-file-datalake/src → dist/browser}/sas/SASQueryParameters.js +4 -2
- package/dist/browser/sas/SASQueryParameters.js.map +1 -0
- package/dist/browser/sas/SasIPRange.d.ts +24 -0
- package/dist/browser/sas/SasIPRange.d.ts.map +1 -0
- package/dist/browser/sas/SasIPRange.js.map +1 -0
- package/dist/browser/transforms.d.ts +51 -0
- package/dist/browser/transforms.d.ts.map +1 -0
- package/{dist-esm/storage-file-datalake/src → dist/browser}/transforms.js +2 -2
- package/dist/browser/transforms.js.map +1 -0
- package/dist/browser/utils/Batch.d.ts +68 -0
- package/dist/browser/utils/Batch.d.ts.map +1 -0
- package/dist/browser/utils/Batch.js.map +1 -0
- package/dist/browser/utils/BufferScheduler.d.ts +158 -0
- package/dist/browser/utils/BufferScheduler.d.ts.map +1 -0
- package/{dist-esm/storage-file-datalake/src → dist/browser}/utils/BufferScheduler.js +1 -1
- package/dist/browser/utils/BufferScheduler.js.map +1 -0
- package/dist/browser/utils/DataLakeAclChangeFailedError.d.ts +16 -0
- package/dist/browser/utils/DataLakeAclChangeFailedError.d.ts.map +1 -0
- package/dist/browser/utils/DataLakeAclChangeFailedError.js.map +1 -0
- package/dist/browser/utils/PathClientInternal.d.ts +24 -0
- package/dist/browser/utils/PathClientInternal.d.ts.map +1 -0
- package/{dist-esm/storage-file-datalake/src → dist/browser}/utils/PathClientInternal.js +2 -2
- package/dist/browser/utils/PathClientInternal.js.map +1 -0
- package/dist/browser/utils/constants.d.ts +70 -0
- package/dist/browser/utils/constants.d.ts.map +1 -0
- package/{dist-esm/storage-file-datalake/src → dist/browser}/utils/constants.js +2 -2
- 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-esm/storage-file-datalake/src → dist/browser}/utils/tracing.js +1 -1
- package/dist/browser/utils/tracing.js.map +1 -0
- package/dist/browser/utils/utils-browser.d.mts.map +1 -0
- package/dist/browser/utils/utils-browser.mjs.map +1 -0
- package/dist/browser/utils/utils.common.d.ts +236 -0
- package/dist/browser/utils/utils.common.d.ts.map +1 -0
- package/{dist-esm/storage-file-datalake/src → dist/browser}/utils/utils.common.js +5 -5
- package/dist/browser/utils/utils.common.js.map +1 -0
- package/dist/browser/utils/utils.d.ts +3 -0
- package/dist/browser/utils/utils.js +9 -0
- package/dist/commonjs/DataLakeFileSystemClient.d.ts +473 -0
- package/dist/commonjs/DataLakeFileSystemClient.d.ts.map +1 -0
- package/dist/commonjs/DataLakeFileSystemClient.js +683 -0
- package/dist/commonjs/DataLakeFileSystemClient.js.map +1 -0
- package/dist/commonjs/DataLakeLeaseClient.d.ts +14 -0
- package/dist/commonjs/DataLakeLeaseClient.d.ts.map +1 -0
- package/dist/commonjs/DataLakeLeaseClient.js +49 -0
- package/dist/commonjs/DataLakeLeaseClient.js.map +1 -0
- package/dist/commonjs/DataLakeServiceClient.d.ts +281 -0
- package/dist/commonjs/DataLakeServiceClient.d.ts.map +1 -0
- package/dist/commonjs/DataLakeServiceClient.js +372 -0
- package/dist/commonjs/DataLakeServiceClient.js.map +1 -0
- package/dist/commonjs/Pipeline.d.ts +52 -0
- package/dist/commonjs/Pipeline.d.ts.map +1 -0
- package/dist/commonjs/Pipeline.js +222 -0
- package/dist/commonjs/Pipeline.js.map +1 -0
- package/dist/commonjs/StorageClient.d.ts +61 -0
- package/dist/commonjs/StorageClient.d.ts.map +1 -0
- package/dist/commonjs/StorageClient.js +55 -0
- package/dist/commonjs/StorageClient.js.map +1 -0
- package/dist/commonjs/StorageContextClient.d.ts +9 -0
- package/dist/commonjs/StorageContextClient.d.ts.map +1 -0
- package/dist/commonjs/StorageContextClient.js +39 -0
- package/dist/commonjs/StorageContextClient.js.map +1 -0
- package/dist/commonjs/clients.d.ts +689 -0
- package/dist/commonjs/clients.d.ts.map +1 -0
- package/dist/commonjs/clients.js +1195 -0
- package/dist/commonjs/clients.js.map +1 -0
- package/dist/commonjs/credentials/StorageSharedKeyCredential.d.ts +2 -0
- package/dist/commonjs/credentials/StorageSharedKeyCredential.d.ts.map +1 -0
- package/dist/commonjs/credentials/StorageSharedKeyCredential.js +8 -0
- package/dist/commonjs/credentials/StorageSharedKeyCredential.js.map +1 -0
- package/dist/commonjs/credentials/UserDelegationKeyCredential.d.ts +34 -0
- package/dist/commonjs/credentials/UserDelegationKeyCredential.d.ts.map +1 -0
- package/dist/commonjs/credentials/UserDelegationKeyCredential.js +35 -0
- package/dist/commonjs/credentials/UserDelegationKeyCredential.js.map +1 -0
- package/dist/commonjs/generated/src/index.d.ts +4 -0
- package/dist/commonjs/generated/src/index.d.ts.map +1 -0
- package/dist/commonjs/generated/src/index.js +16 -0
- package/dist/commonjs/generated/src/index.js.map +1 -0
- package/dist/commonjs/generated/src/models/index.d.ts +1091 -0
- package/dist/commonjs/generated/src/models/index.d.ts.map +1 -0
- package/dist/commonjs/generated/src/models/index.js +19 -0
- package/dist/commonjs/generated/src/models/index.js.map +1 -0
- package/dist/commonjs/generated/src/models/mappers.d.ts +53 -0
- package/dist/commonjs/generated/src/models/mappers.d.ts.map +1 -0
- package/dist/commonjs/generated/src/models/mappers.js +2450 -0
- package/dist/commonjs/generated/src/models/mappers.js.map +1 -0
- package/dist/commonjs/generated/src/models/parameters.d.ts +87 -0
- package/dist/commonjs/generated/src/models/parameters.d.ts.map +1 -0
- package/dist/commonjs/generated/src/models/parameters.js +952 -0
- package/dist/commonjs/generated/src/models/parameters.js.map +1 -0
- package/dist/commonjs/generated/src/operations/fileSystemOperations.d.ts +55 -0
- package/dist/commonjs/generated/src/operations/fileSystemOperations.d.ts.map +1 -0
- package/dist/commonjs/generated/src/operations/fileSystemOperations.js +236 -0
- package/dist/commonjs/generated/src/operations/fileSystemOperations.js.map +1 -0
- package/dist/commonjs/generated/src/operations/index.d.ts +4 -0
- package/dist/commonjs/generated/src/operations/index.d.ts.map +1 -0
- package/dist/commonjs/generated/src/operations/index.js +14 -0
- package/dist/commonjs/generated/src/operations/index.js.map +1 -0
- package/dist/commonjs/generated/src/operations/pathOperations.d.ts +120 -0
- package/dist/commonjs/generated/src/operations/pathOperations.d.ts.map +1 -0
- package/dist/commonjs/generated/src/operations/pathOperations.js +596 -0
- package/dist/commonjs/generated/src/operations/pathOperations.js.map +1 -0
- package/dist/commonjs/generated/src/operations/service.d.ts +18 -0
- package/dist/commonjs/generated/src/operations/service.d.ts.map +1 -0
- package/dist/commonjs/generated/src/operations/service.js +63 -0
- package/dist/commonjs/generated/src/operations/service.js.map +1 -0
- package/dist/commonjs/generated/src/operationsInterfaces/fileSystemOperations.d.ts +47 -0
- package/dist/commonjs/generated/src/operationsInterfaces/fileSystemOperations.d.ts.map +1 -0
- package/{dist-esm/storage-file-datalake/src/generated/src/operations/index.js → dist/commonjs/generated/src/operationsInterfaces/fileSystemOperations.js} +3 -4
- package/dist/commonjs/generated/src/operationsInterfaces/fileSystemOperations.js.map +1 -0
- package/dist/commonjs/generated/src/operationsInterfaces/index.d.ts +4 -0
- package/dist/commonjs/generated/src/operationsInterfaces/index.d.ts.map +1 -0
- package/dist/commonjs/generated/src/operationsInterfaces/index.js +14 -0
- package/dist/commonjs/generated/src/operationsInterfaces/index.js.map +1 -0
- package/dist/commonjs/generated/src/operationsInterfaces/pathOperations.d.ts +112 -0
- package/dist/commonjs/generated/src/operationsInterfaces/pathOperations.d.ts.map +1 -0
- package/dist/commonjs/generated/src/operationsInterfaces/pathOperations.js +10 -0
- package/dist/commonjs/generated/src/operationsInterfaces/pathOperations.js.map +1 -0
- package/dist/commonjs/generated/src/operationsInterfaces/service.d.ts +10 -0
- package/dist/commonjs/generated/src/operationsInterfaces/service.d.ts.map +1 -0
- package/dist/commonjs/generated/src/operationsInterfaces/service.js +10 -0
- package/dist/commonjs/generated/src/operationsInterfaces/service.js.map +1 -0
- package/dist/commonjs/generated/src/storageClient.d.ts +20 -0
- package/dist/commonjs/generated/src/storageClient.d.ts.map +1 -0
- package/dist/commonjs/generated/src/storageClient.js +52 -0
- package/dist/commonjs/generated/src/storageClient.js.map +1 -0
- package/dist/commonjs/index.d.ts +23 -0
- package/dist/commonjs/index.d.ts.map +1 -0
- package/dist/commonjs/index.js +49 -0
- package/dist/commonjs/index.js.map +1 -0
- 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/models.d.ts +1318 -0
- package/dist/commonjs/models.d.ts.map +1 -0
- package/dist/commonjs/models.internal.d.ts +2 -0
- package/dist/commonjs/models.internal.d.ts.map +1 -0
- package/dist/commonjs/models.internal.js +5 -0
- package/dist/commonjs/models.internal.js.map +1 -0
- package/dist/commonjs/models.js +57 -0
- package/dist/commonjs/models.js.map +1 -0
- package/dist/commonjs/package.json +3 -0
- package/dist/commonjs/sas/AccountSASPermissions.d.ts +61 -0
- package/dist/commonjs/sas/AccountSASPermissions.d.ts.map +1 -0
- package/dist/commonjs/sas/AccountSASPermissions.js +132 -0
- package/dist/commonjs/sas/AccountSASPermissions.js.map +1 -0
- package/dist/commonjs/sas/AccountSASResourceTypes.d.ts +38 -0
- package/dist/commonjs/sas/AccountSASResourceTypes.d.ts.map +1 -0
- package/dist/commonjs/sas/AccountSASResourceTypes.js +76 -0
- package/dist/commonjs/sas/AccountSASResourceTypes.js.map +1 -0
- package/dist/commonjs/sas/AccountSASServices.d.ts +40 -0
- package/dist/commonjs/sas/AccountSASServices.d.ts.map +1 -0
- package/dist/commonjs/sas/AccountSASServices.js +84 -0
- package/dist/commonjs/sas/AccountSASServices.js.map +1 -0
- package/dist/commonjs/sas/AccountSASSignatureValues.d.ts +78 -0
- package/dist/commonjs/sas/AccountSASSignatureValues.d.ts.map +1 -0
- package/dist/commonjs/sas/AccountSASSignatureValues.js +76 -0
- package/dist/commonjs/sas/AccountSASSignatureValues.js.map +1 -0
- package/dist/commonjs/sas/DataLakeSASPermissions.d.ts +65 -0
- package/dist/commonjs/sas/DataLakeSASPermissions.d.ts.map +1 -0
- package/dist/commonjs/sas/DataLakeSASPermissions.js +139 -0
- package/dist/commonjs/sas/DataLakeSASPermissions.js.map +1 -0
- package/dist/commonjs/sas/DataLakeSASSignatureValues.d.ts +205 -0
- package/dist/commonjs/sas/DataLakeSASSignatureValues.d.ts.map +1 -0
- package/dist/commonjs/sas/DataLakeSASSignatureValues.js +722 -0
- package/dist/commonjs/sas/DataLakeSASSignatureValues.js.map +1 -0
- package/dist/commonjs/sas/DirectorySASPermissions.d.ts +69 -0
- package/dist/commonjs/sas/DirectorySASPermissions.d.ts.map +1 -0
- package/dist/commonjs/sas/DirectorySASPermissions.js +149 -0
- package/dist/commonjs/sas/DirectorySASPermissions.js.map +1 -0
- package/dist/commonjs/sas/FileSystemSASPermissions.d.ts +69 -0
- package/dist/commonjs/sas/FileSystemSASPermissions.d.ts.map +1 -0
- package/dist/commonjs/sas/FileSystemSASPermissions.js +149 -0
- package/dist/commonjs/sas/FileSystemSASPermissions.js.map +1 -0
- package/dist/commonjs/sas/SASQueryParameters.d.ts +309 -0
- package/dist/commonjs/sas/SASQueryParameters.d.ts.map +1 -0
- package/dist/commonjs/sas/SASQueryParameters.js +252 -0
- package/dist/commonjs/sas/SASQueryParameters.js.map +1 -0
- package/dist/commonjs/sas/SasIPRange.d.ts +24 -0
- package/dist/commonjs/sas/SasIPRange.d.ts.map +1 -0
- package/dist/commonjs/sas/SasIPRange.js +16 -0
- package/dist/commonjs/sas/SasIPRange.js.map +1 -0
- package/dist/commonjs/transforms.d.ts +51 -0
- package/dist/commonjs/transforms.d.ts.map +1 -0
- package/dist/commonjs/transforms.js +357 -0
- package/dist/commonjs/transforms.js.map +1 -0
- package/dist/commonjs/tsdoc-metadata.json +11 -0
- package/dist/commonjs/utils/Batch.d.ts +68 -0
- package/dist/commonjs/utils/Batch.d.ts.map +1 -0
- package/dist/commonjs/utils/Batch.js +126 -0
- package/dist/commonjs/utils/Batch.js.map +1 -0
- package/dist/commonjs/utils/BufferScheduler.d.ts +158 -0
- package/dist/commonjs/utils/BufferScheduler.d.ts.map +1 -0
- package/dist/commonjs/utils/BufferScheduler.js +268 -0
- package/dist/commonjs/utils/BufferScheduler.js.map +1 -0
- package/dist/commonjs/utils/DataLakeAclChangeFailedError.d.ts +16 -0
- package/dist/commonjs/utils/DataLakeAclChangeFailedError.d.ts.map +1 -0
- package/dist/commonjs/utils/DataLakeAclChangeFailedError.js +17 -0
- package/dist/commonjs/utils/DataLakeAclChangeFailedError.js.map +1 -0
- package/dist/commonjs/utils/PathClientInternal.d.ts +24 -0
- package/dist/commonjs/utils/PathClientInternal.d.ts.map +1 -0
- package/dist/commonjs/utils/PathClientInternal.js +28 -0
- package/dist/commonjs/utils/PathClientInternal.js.map +1 -0
- package/dist/commonjs/utils/constants.d.ts +70 -0
- package/dist/commonjs/utils/constants.d.ts.map +1 -0
- package/dist/commonjs/utils/constants.js +247 -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 +236 -0
- package/dist/commonjs/utils/utils.common.d.ts.map +1 -0
- package/dist/commonjs/utils/utils.common.js +595 -0
- package/dist/commonjs/utils/utils.common.js.map +1 -0
- package/dist/commonjs/utils/utils.d.ts +29 -0
- package/dist/commonjs/utils/utils.d.ts.map +1 -0
- package/dist/commonjs/utils/utils.js +91 -0
- package/dist/commonjs/utils/utils.js.map +1 -0
- package/dist/esm/DataLakeFileSystemClient.d.ts +473 -0
- package/dist/esm/DataLakeFileSystemClient.d.ts.map +1 -0
- package/dist/esm/DataLakeFileSystemClient.js +679 -0
- package/dist/esm/DataLakeFileSystemClient.js.map +1 -0
- package/dist/esm/DataLakeLeaseClient.d.ts +14 -0
- package/dist/esm/DataLakeLeaseClient.d.ts.map +1 -0
- package/dist/esm/DataLakeLeaseClient.js +45 -0
- package/dist/esm/DataLakeLeaseClient.js.map +1 -0
- package/dist/esm/DataLakeServiceClient.d.ts +281 -0
- package/dist/esm/DataLakeServiceClient.d.ts.map +1 -0
- package/dist/esm/DataLakeServiceClient.js +368 -0
- package/dist/esm/DataLakeServiceClient.js.map +1 -0
- package/dist/esm/Pipeline.d.ts +52 -0
- package/dist/esm/Pipeline.d.ts.map +1 -0
- package/dist/esm/Pipeline.js +216 -0
- package/dist/esm/Pipeline.js.map +1 -0
- package/dist/esm/StorageClient.d.ts +61 -0
- package/dist/esm/StorageClient.d.ts.map +1 -0
- package/dist/esm/StorageClient.js +51 -0
- package/dist/esm/StorageClient.js.map +1 -0
- package/dist/esm/StorageContextClient.d.ts +9 -0
- package/dist/esm/StorageContextClient.d.ts.map +1 -0
- package/dist/esm/StorageContextClient.js +35 -0
- package/dist/esm/StorageContextClient.js.map +1 -0
- package/dist/esm/clients.d.ts +689 -0
- package/dist/esm/clients.d.ts.map +1 -0
- package/dist/esm/clients.js +1189 -0
- package/dist/esm/clients.js.map +1 -0
- package/dist/esm/credentials/StorageSharedKeyCredential.d.ts +2 -0
- package/dist/esm/credentials/StorageSharedKeyCredential.d.ts.map +1 -0
- package/dist/esm/credentials/StorageSharedKeyCredential.js.map +1 -0
- package/dist/esm/credentials/UserDelegationKeyCredential.d.ts +34 -0
- package/dist/esm/credentials/UserDelegationKeyCredential.d.ts.map +1 -0
- package/{dist-esm/storage-file-datalake/src → dist/esm}/credentials/UserDelegationKeyCredential.js +1 -1
- package/dist/esm/credentials/UserDelegationKeyCredential.js.map +1 -0
- package/dist/esm/generated/src/index.d.ts +4 -0
- package/dist/esm/generated/src/index.d.ts.map +1 -0
- package/dist/esm/generated/src/index.js +11 -0
- package/dist/esm/generated/src/index.js.map +1 -0
- package/dist/esm/generated/src/models/index.d.ts +1091 -0
- package/dist/esm/generated/src/models/index.d.ts.map +1 -0
- package/dist/esm/generated/src/models/index.js +16 -0
- package/dist/esm/generated/src/models/index.js.map +1 -0
- package/dist/esm/generated/src/models/mappers.d.ts +53 -0
- package/dist/esm/generated/src/models/mappers.d.ts.map +1 -0
- package/dist/esm/generated/src/models/mappers.js +2446 -0
- package/dist/esm/generated/src/models/mappers.js.map +1 -0
- package/dist/esm/generated/src/models/parameters.d.ts +87 -0
- package/dist/esm/generated/src/models/parameters.d.ts.map +1 -0
- package/dist/esm/generated/src/models/parameters.js +948 -0
- package/dist/esm/generated/src/models/parameters.js.map +1 -0
- package/dist/esm/generated/src/operations/fileSystemOperations.d.ts +55 -0
- package/dist/esm/generated/src/operations/fileSystemOperations.d.ts.map +1 -0
- package/dist/esm/generated/src/operations/fileSystemOperations.js +231 -0
- package/dist/esm/generated/src/operations/fileSystemOperations.js.map +1 -0
- package/dist/esm/generated/src/operations/index.d.ts +4 -0
- package/dist/esm/generated/src/operations/index.d.ts.map +1 -0
- package/dist/esm/generated/src/operations/index.js +11 -0
- package/dist/esm/generated/src/operations/index.js.map +1 -0
- package/dist/esm/generated/src/operations/pathOperations.d.ts +120 -0
- package/dist/esm/generated/src/operations/pathOperations.d.ts.map +1 -0
- package/dist/esm/generated/src/operations/pathOperations.js +591 -0
- package/dist/esm/generated/src/operations/pathOperations.js.map +1 -0
- package/dist/esm/generated/src/operations/service.d.ts +18 -0
- package/dist/esm/generated/src/operations/service.d.ts.map +1 -0
- package/dist/esm/generated/src/operations/service.js +58 -0
- package/dist/esm/generated/src/operations/service.js.map +1 -0
- package/dist/esm/generated/src/operationsInterfaces/fileSystemOperations.d.ts +47 -0
- package/dist/esm/generated/src/operationsInterfaces/fileSystemOperations.d.ts.map +1 -0
- package/dist/esm/generated/src/operationsInterfaces/fileSystemOperations.js +9 -0
- package/dist/esm/generated/src/operationsInterfaces/fileSystemOperations.js.map +1 -0
- package/dist/esm/generated/src/operationsInterfaces/index.d.ts +4 -0
- package/dist/esm/generated/src/operationsInterfaces/index.d.ts.map +1 -0
- package/dist/esm/generated/src/operationsInterfaces/index.js +11 -0
- package/dist/esm/generated/src/operationsInterfaces/index.js.map +1 -0
- package/dist/esm/generated/src/operationsInterfaces/pathOperations.d.ts +112 -0
- package/dist/esm/generated/src/operationsInterfaces/pathOperations.d.ts.map +1 -0
- package/dist/esm/generated/src/operationsInterfaces/pathOperations.js +9 -0
- package/dist/esm/generated/src/operationsInterfaces/pathOperations.js.map +1 -0
- package/dist/esm/generated/src/operationsInterfaces/service.d.ts +10 -0
- package/dist/esm/generated/src/operationsInterfaces/service.d.ts.map +1 -0
- package/dist/esm/generated/src/operationsInterfaces/service.js +9 -0
- package/dist/esm/generated/src/operationsInterfaces/service.js.map +1 -0
- package/dist/esm/generated/src/storageClient.d.ts +20 -0
- package/dist/esm/generated/src/storageClient.d.ts.map +1 -0
- package/dist/esm/generated/src/storageClient.js +47 -0
- package/dist/esm/generated/src/storageClient.js.map +1 -0
- package/dist/esm/index.d.ts +23 -0
- package/dist/esm/index.d.ts.map +1 -0
- package/dist/esm/index.js +23 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/log.d.ts +5 -0
- package/dist/esm/log.d.ts.map +1 -0
- package/{dist-esm/storage-blob/src → dist/esm}/log.js +1 -1
- package/dist/esm/log.js.map +1 -0
- package/dist/esm/models.d.ts +1318 -0
- package/dist/esm/models.d.ts.map +1 -0
- package/dist/esm/models.internal.d.ts +2 -0
- package/dist/esm/models.internal.d.ts.map +1 -0
- package/dist/esm/models.internal.js +4 -0
- package/dist/esm/models.internal.js.map +1 -0
- package/dist/esm/models.js +53 -0
- package/dist/esm/models.js.map +1 -0
- package/dist/esm/package.json +3 -0
- package/dist/esm/sas/AccountSASPermissions.d.ts +61 -0
- package/dist/esm/sas/AccountSASPermissions.d.ts.map +1 -0
- package/dist/esm/sas/AccountSASPermissions.js +128 -0
- package/dist/esm/sas/AccountSASPermissions.js.map +1 -0
- package/dist/esm/sas/AccountSASResourceTypes.d.ts +38 -0
- package/dist/esm/sas/AccountSASResourceTypes.d.ts.map +1 -0
- package/dist/esm/sas/AccountSASResourceTypes.js +72 -0
- package/dist/esm/sas/AccountSASResourceTypes.js.map +1 -0
- package/dist/esm/sas/AccountSASServices.d.ts +40 -0
- package/dist/esm/sas/AccountSASServices.d.ts.map +1 -0
- package/dist/esm/sas/AccountSASServices.js +80 -0
- package/dist/esm/sas/AccountSASServices.js.map +1 -0
- package/dist/esm/sas/AccountSASSignatureValues.d.ts +78 -0
- package/dist/esm/sas/AccountSASSignatureValues.d.ts.map +1 -0
- package/dist/esm/sas/AccountSASSignatureValues.js +72 -0
- package/dist/esm/sas/AccountSASSignatureValues.js.map +1 -0
- package/dist/esm/sas/DataLakeSASPermissions.d.ts +65 -0
- package/dist/esm/sas/DataLakeSASPermissions.d.ts.map +1 -0
- package/dist/esm/sas/DataLakeSASPermissions.js +135 -0
- package/dist/esm/sas/DataLakeSASPermissions.js.map +1 -0
- package/dist/esm/sas/DataLakeSASSignatureValues.d.ts +205 -0
- package/dist/esm/sas/DataLakeSASSignatureValues.d.ts.map +1 -0
- package/dist/esm/sas/DataLakeSASSignatureValues.js +718 -0
- package/dist/esm/sas/DataLakeSASSignatureValues.js.map +1 -0
- package/dist/esm/sas/DirectorySASPermissions.d.ts +69 -0
- package/dist/esm/sas/DirectorySASPermissions.d.ts.map +1 -0
- package/dist/esm/sas/DirectorySASPermissions.js +145 -0
- package/dist/esm/sas/DirectorySASPermissions.js.map +1 -0
- package/dist/esm/sas/FileSystemSASPermissions.d.ts +69 -0
- package/dist/esm/sas/FileSystemSASPermissions.d.ts.map +1 -0
- package/dist/esm/sas/FileSystemSASPermissions.js +145 -0
- package/dist/esm/sas/FileSystemSASPermissions.js.map +1 -0
- package/dist/esm/sas/SASQueryParameters.d.ts +309 -0
- package/dist/esm/sas/SASQueryParameters.d.ts.map +1 -0
- package/dist/esm/sas/SASQueryParameters.js +248 -0
- package/dist/esm/sas/SASQueryParameters.js.map +1 -0
- package/dist/esm/sas/SasIPRange.d.ts +24 -0
- package/dist/esm/sas/SasIPRange.d.ts.map +1 -0
- package/dist/esm/sas/SasIPRange.js +13 -0
- package/dist/esm/sas/SasIPRange.js.map +1 -0
- package/dist/esm/transforms.d.ts +51 -0
- package/dist/esm/transforms.d.ts.map +1 -0
- package/dist/esm/transforms.js +337 -0
- package/dist/esm/transforms.js.map +1 -0
- package/dist/esm/utils/Batch.d.ts +68 -0
- package/dist/esm/utils/Batch.d.ts.map +1 -0
- package/dist/esm/utils/Batch.js.map +1 -0
- package/dist/esm/utils/BufferScheduler.d.ts +158 -0
- package/dist/esm/utils/BufferScheduler.d.ts.map +1 -0
- package/{dist-esm/storage-common/src → dist/esm/utils}/BufferScheduler.js +27 -15
- package/dist/esm/utils/BufferScheduler.js.map +1 -0
- package/dist/esm/utils/DataLakeAclChangeFailedError.d.ts +16 -0
- package/dist/esm/utils/DataLakeAclChangeFailedError.d.ts.map +1 -0
- package/dist/esm/utils/DataLakeAclChangeFailedError.js +13 -0
- package/dist/esm/utils/DataLakeAclChangeFailedError.js.map +1 -0
- package/dist/esm/utils/PathClientInternal.d.ts +24 -0
- package/dist/esm/utils/PathClientInternal.d.ts.map +1 -0
- package/dist/esm/utils/PathClientInternal.js +24 -0
- package/dist/esm/utils/PathClientInternal.js.map +1 -0
- package/dist/esm/utils/constants.d.ts +70 -0
- package/dist/esm/utils/constants.d.ts.map +1 -0
- package/{dist-esm/storage-blob/src → dist/esm}/utils/constants.js +85 -67
- 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/storage-blob/src → dist/esm}/utils/tracing.js +2 -2
- package/dist/esm/utils/tracing.js.map +1 -0
- package/dist/esm/utils/utils.common.d.ts +236 -0
- package/dist/esm/utils/utils.common.d.ts.map +1 -0
- package/{dist-esm/storage-blob/src → dist/esm}/utils/utils.common.js +105 -297
- package/dist/esm/utils/utils.common.js.map +1 -0
- package/dist/esm/utils/utils.d.ts +29 -0
- package/dist/esm/utils/utils.d.ts.map +1 -0
- package/{dist-esm/storage-file-datalake/src/utils/utils.node.js → dist/esm/utils/utils.js} +3 -3
- package/dist/esm/utils/utils.js.map +1 -0
- package/dist/react-native/DataLakeFileSystemClient.d.ts +473 -0
- package/dist/react-native/DataLakeFileSystemClient.d.ts.map +1 -0
- package/dist/react-native/DataLakeFileSystemClient.js +679 -0
- package/dist/react-native/DataLakeFileSystemClient.js.map +1 -0
- package/dist/react-native/DataLakeLeaseClient.d.ts +14 -0
- package/dist/react-native/DataLakeLeaseClient.d.ts.map +1 -0
- package/dist/react-native/DataLakeLeaseClient.js +45 -0
- package/dist/react-native/DataLakeLeaseClient.js.map +1 -0
- package/dist/react-native/DataLakeServiceClient.d.ts +281 -0
- package/dist/react-native/DataLakeServiceClient.d.ts.map +1 -0
- package/dist/react-native/DataLakeServiceClient.js +368 -0
- package/dist/react-native/DataLakeServiceClient.js.map +1 -0
- package/dist/react-native/Pipeline.d.ts +52 -0
- package/dist/react-native/Pipeline.d.ts.map +1 -0
- package/dist/react-native/Pipeline.js +216 -0
- package/dist/react-native/Pipeline.js.map +1 -0
- package/dist/react-native/StorageClient.d.ts +61 -0
- package/dist/react-native/StorageClient.d.ts.map +1 -0
- package/dist/react-native/StorageClient.js +51 -0
- package/dist/react-native/StorageClient.js.map +1 -0
- package/dist/react-native/StorageContextClient.d.ts +9 -0
- package/dist/react-native/StorageContextClient.d.ts.map +1 -0
- package/dist/react-native/StorageContextClient.js +35 -0
- package/dist/react-native/StorageContextClient.js.map +1 -0
- package/dist/react-native/clients.d.ts +689 -0
- package/dist/react-native/clients.d.ts.map +1 -0
- package/dist/react-native/clients.js +1189 -0
- package/dist/react-native/clients.js.map +1 -0
- package/dist/react-native/credentials/StorageSharedKeyCredential.d.ts +2 -0
- package/dist/react-native/credentials/StorageSharedKeyCredential.d.ts.map +1 -0
- package/dist/react-native/credentials/StorageSharedKeyCredential.js +4 -0
- package/dist/react-native/credentials/StorageSharedKeyCredential.js.map +1 -0
- package/dist/react-native/credentials/UserDelegationKeyCredential.d.ts +34 -0
- package/dist/react-native/credentials/UserDelegationKeyCredential.d.ts.map +1 -0
- package/dist/react-native/credentials/UserDelegationKeyCredential.js +31 -0
- package/dist/react-native/credentials/UserDelegationKeyCredential.js.map +1 -0
- package/dist/react-native/generated/src/index.d.ts +4 -0
- package/dist/react-native/generated/src/index.d.ts.map +1 -0
- package/dist/react-native/generated/src/index.js +11 -0
- package/dist/react-native/generated/src/index.js.map +1 -0
- package/dist/react-native/generated/src/models/index.d.ts +1091 -0
- package/dist/react-native/generated/src/models/index.d.ts.map +1 -0
- package/dist/react-native/generated/src/models/index.js +16 -0
- package/dist/react-native/generated/src/models/index.js.map +1 -0
- package/dist/react-native/generated/src/models/mappers.d.ts +53 -0
- package/dist/react-native/generated/src/models/mappers.d.ts.map +1 -0
- package/dist/react-native/generated/src/models/mappers.js +2446 -0
- package/dist/react-native/generated/src/models/mappers.js.map +1 -0
- package/dist/react-native/generated/src/models/parameters.d.ts +87 -0
- package/dist/react-native/generated/src/models/parameters.d.ts.map +1 -0
- package/dist/react-native/generated/src/models/parameters.js +948 -0
- package/dist/react-native/generated/src/models/parameters.js.map +1 -0
- package/dist/react-native/generated/src/operations/fileSystemOperations.d.ts +55 -0
- package/dist/react-native/generated/src/operations/fileSystemOperations.d.ts.map +1 -0
- package/dist/react-native/generated/src/operations/fileSystemOperations.js +231 -0
- package/dist/react-native/generated/src/operations/fileSystemOperations.js.map +1 -0
- package/dist/react-native/generated/src/operations/index.d.ts +4 -0
- package/dist/react-native/generated/src/operations/index.d.ts.map +1 -0
- package/dist/react-native/generated/src/operations/index.js +11 -0
- package/dist/react-native/generated/src/operations/index.js.map +1 -0
- package/dist/react-native/generated/src/operations/pathOperations.d.ts +120 -0
- package/dist/react-native/generated/src/operations/pathOperations.d.ts.map +1 -0
- package/dist/react-native/generated/src/operations/pathOperations.js +591 -0
- package/dist/react-native/generated/src/operations/pathOperations.js.map +1 -0
- package/dist/react-native/generated/src/operations/service.d.ts +18 -0
- package/dist/react-native/generated/src/operations/service.d.ts.map +1 -0
- package/dist/react-native/generated/src/operations/service.js +58 -0
- package/dist/react-native/generated/src/operations/service.js.map +1 -0
- package/dist/react-native/generated/src/operationsInterfaces/fileSystemOperations.d.ts +47 -0
- package/dist/react-native/generated/src/operationsInterfaces/fileSystemOperations.d.ts.map +1 -0
- package/dist/react-native/generated/src/operationsInterfaces/fileSystemOperations.js +9 -0
- package/dist/react-native/generated/src/operationsInterfaces/fileSystemOperations.js.map +1 -0
- package/dist/react-native/generated/src/operationsInterfaces/index.d.ts +4 -0
- package/dist/react-native/generated/src/operationsInterfaces/index.d.ts.map +1 -0
- package/dist/react-native/generated/src/operationsInterfaces/index.js +11 -0
- package/dist/react-native/generated/src/operationsInterfaces/index.js.map +1 -0
- package/dist/react-native/generated/src/operationsInterfaces/pathOperations.d.ts +112 -0
- package/dist/react-native/generated/src/operationsInterfaces/pathOperations.d.ts.map +1 -0
- package/dist/react-native/generated/src/operationsInterfaces/pathOperations.js +9 -0
- package/dist/react-native/generated/src/operationsInterfaces/pathOperations.js.map +1 -0
- package/dist/react-native/generated/src/operationsInterfaces/service.d.ts +10 -0
- package/dist/react-native/generated/src/operationsInterfaces/service.d.ts.map +1 -0
- package/dist/react-native/generated/src/operationsInterfaces/service.js +9 -0
- package/dist/react-native/generated/src/operationsInterfaces/service.js.map +1 -0
- package/dist/react-native/generated/src/storageClient.d.ts +20 -0
- package/dist/react-native/generated/src/storageClient.d.ts.map +1 -0
- package/dist/react-native/generated/src/storageClient.js +47 -0
- package/dist/react-native/generated/src/storageClient.js.map +1 -0
- package/dist/react-native/index.d.ts +23 -0
- package/dist/react-native/index.d.ts.map +1 -0
- package/dist/react-native/index.js +23 -0
- package/dist/react-native/index.js.map +1 -0
- 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/models.d.ts +1318 -0
- package/dist/react-native/models.d.ts.map +1 -0
- package/dist/react-native/models.internal.d.ts +2 -0
- package/dist/react-native/models.internal.d.ts.map +1 -0
- package/dist/react-native/models.internal.js +4 -0
- package/dist/react-native/models.internal.js.map +1 -0
- package/dist/react-native/models.js +53 -0
- package/dist/react-native/models.js.map +1 -0
- package/dist/react-native/package.json +3 -0
- package/dist/react-native/sas/AccountSASPermissions.d.ts +61 -0
- package/dist/react-native/sas/AccountSASPermissions.d.ts.map +1 -0
- package/dist/react-native/sas/AccountSASPermissions.js +128 -0
- package/dist/react-native/sas/AccountSASPermissions.js.map +1 -0
- package/dist/react-native/sas/AccountSASResourceTypes.d.ts +38 -0
- package/dist/react-native/sas/AccountSASResourceTypes.d.ts.map +1 -0
- package/dist/react-native/sas/AccountSASResourceTypes.js +72 -0
- package/dist/react-native/sas/AccountSASResourceTypes.js.map +1 -0
- package/dist/react-native/sas/AccountSASServices.d.ts +40 -0
- package/dist/react-native/sas/AccountSASServices.d.ts.map +1 -0
- package/dist/react-native/sas/AccountSASServices.js +80 -0
- package/dist/react-native/sas/AccountSASServices.js.map +1 -0
- package/dist/react-native/sas/AccountSASSignatureValues.d.ts +78 -0
- package/dist/react-native/sas/AccountSASSignatureValues.d.ts.map +1 -0
- package/dist/react-native/sas/AccountSASSignatureValues.js +72 -0
- package/dist/react-native/sas/AccountSASSignatureValues.js.map +1 -0
- package/dist/react-native/sas/DataLakeSASPermissions.d.ts +65 -0
- package/dist/react-native/sas/DataLakeSASPermissions.d.ts.map +1 -0
- package/dist/react-native/sas/DataLakeSASPermissions.js +135 -0
- package/dist/react-native/sas/DataLakeSASPermissions.js.map +1 -0
- package/dist/react-native/sas/DataLakeSASSignatureValues.d.ts +205 -0
- package/dist/react-native/sas/DataLakeSASSignatureValues.d.ts.map +1 -0
- package/dist/react-native/sas/DataLakeSASSignatureValues.js +718 -0
- package/dist/react-native/sas/DataLakeSASSignatureValues.js.map +1 -0
- package/dist/react-native/sas/DirectorySASPermissions.d.ts +69 -0
- package/dist/react-native/sas/DirectorySASPermissions.d.ts.map +1 -0
- package/dist/react-native/sas/DirectorySASPermissions.js +145 -0
- package/dist/react-native/sas/DirectorySASPermissions.js.map +1 -0
- package/dist/react-native/sas/FileSystemSASPermissions.d.ts +69 -0
- package/dist/react-native/sas/FileSystemSASPermissions.d.ts.map +1 -0
- package/dist/react-native/sas/FileSystemSASPermissions.js +145 -0
- package/dist/react-native/sas/FileSystemSASPermissions.js.map +1 -0
- package/dist/react-native/sas/SASQueryParameters.d.ts +309 -0
- package/dist/react-native/sas/SASQueryParameters.d.ts.map +1 -0
- package/dist/react-native/sas/SASQueryParameters.js +248 -0
- package/dist/react-native/sas/SASQueryParameters.js.map +1 -0
- package/dist/react-native/sas/SasIPRange.d.ts +24 -0
- package/dist/react-native/sas/SasIPRange.d.ts.map +1 -0
- package/dist/react-native/sas/SasIPRange.js +13 -0
- package/dist/react-native/sas/SasIPRange.js.map +1 -0
- package/dist/react-native/transforms.d.ts +51 -0
- package/dist/react-native/transforms.d.ts.map +1 -0
- package/dist/react-native/transforms.js +337 -0
- package/dist/react-native/transforms.js.map +1 -0
- package/dist/react-native/utils/Batch.d.ts +68 -0
- package/dist/react-native/utils/Batch.d.ts.map +1 -0
- package/dist/react-native/utils/Batch.js +122 -0
- package/dist/react-native/utils/Batch.js.map +1 -0
- package/dist/react-native/utils/BufferScheduler.d.ts +158 -0
- package/dist/react-native/utils/BufferScheduler.d.ts.map +1 -0
- package/dist/react-native/utils/BufferScheduler.js +264 -0
- package/dist/react-native/utils/BufferScheduler.js.map +1 -0
- package/dist/react-native/utils/DataLakeAclChangeFailedError.d.ts +16 -0
- package/dist/react-native/utils/DataLakeAclChangeFailedError.d.ts.map +1 -0
- package/dist/react-native/utils/DataLakeAclChangeFailedError.js +13 -0
- package/dist/react-native/utils/DataLakeAclChangeFailedError.js.map +1 -0
- package/dist/react-native/utils/PathClientInternal.d.ts +24 -0
- package/dist/react-native/utils/PathClientInternal.d.ts.map +1 -0
- package/dist/react-native/utils/PathClientInternal.js +24 -0
- package/dist/react-native/utils/PathClientInternal.js.map +1 -0
- package/dist/react-native/utils/constants.d.ts +70 -0
- package/dist/react-native/utils/constants.d.ts.map +1 -0
- package/dist/react-native/utils/constants.js +244 -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 +236 -0
- package/dist/react-native/utils/utils.common.d.ts.map +1 -0
- package/dist/react-native/utils/utils.common.js +564 -0
- package/dist/react-native/utils/utils.common.js.map +1 -0
- package/dist/react-native/utils/utils.d.ts +29 -0
- package/dist/react-native/utils/utils.d.ts.map +1 -0
- package/{dist-esm/storage-blob/src/utils/utils.node.js → dist/react-native/utils/utils.js} +4 -51
- package/dist/react-native/utils/utils.js.map +1 -0
- package/package.json +70 -83
- package/dist/index.js +0 -9735
- package/dist/index.js.map +0 -1
- package/dist-esm/storage-blob/src/StorageBrowserPolicyFactory.js +0 -19
- package/dist-esm/storage-blob/src/StorageBrowserPolicyFactory.js.map +0 -1
- package/dist-esm/storage-blob/src/StorageRetryPolicyFactory.js +0 -26
- package/dist-esm/storage-blob/src/StorageRetryPolicyFactory.js.map +0 -1
- package/dist-esm/storage-blob/src/log.js.map +0 -1
- package/dist-esm/storage-blob/src/policies/AnonymousCredentialPolicy.js +0 -20
- package/dist-esm/storage-blob/src/policies/AnonymousCredentialPolicy.js.map +0 -1
- package/dist-esm/storage-blob/src/policies/CredentialPolicy.js +0 -29
- package/dist-esm/storage-blob/src/policies/CredentialPolicy.js.map +0 -1
- package/dist-esm/storage-blob/src/policies/RequestPolicy.js +0 -40
- package/dist-esm/storage-blob/src/policies/RequestPolicy.js.map +0 -1
- package/dist-esm/storage-blob/src/policies/StorageBrowserPolicy.js +0 -47
- package/dist-esm/storage-blob/src/policies/StorageBrowserPolicy.js.map +0 -1
- package/dist-esm/storage-blob/src/policies/StorageBrowserPolicyV2.js +0 -31
- package/dist-esm/storage-blob/src/policies/StorageBrowserPolicyV2.js.map +0 -1
- package/dist-esm/storage-blob/src/policies/StorageCorrectContentLengthPolicy.browser.js +0 -18
- package/dist-esm/storage-blob/src/policies/StorageCorrectContentLengthPolicy.browser.js.map +0 -1
- package/dist-esm/storage-blob/src/policies/StorageCorrectContentLengthPolicy.js +0 -27
- package/dist-esm/storage-blob/src/policies/StorageCorrectContentLengthPolicy.js.map +0 -1
- package/dist-esm/storage-blob/src/policies/StorageRetryPolicy.js +0 -229
- package/dist-esm/storage-blob/src/policies/StorageRetryPolicy.js.map +0 -1
- package/dist-esm/storage-blob/src/policies/StorageRetryPolicyV2.js +0 -180
- package/dist-esm/storage-blob/src/policies/StorageRetryPolicyV2.js.map +0 -1
- package/dist-esm/storage-blob/src/policies/StorageSharedKeyCredentialPolicy.js +0 -141
- package/dist-esm/storage-blob/src/policies/StorageSharedKeyCredentialPolicy.js.map +0 -1
- package/dist-esm/storage-blob/src/policies/StorageSharedKeyCredentialPolicyV2.browser.js +0 -18
- package/dist-esm/storage-blob/src/policies/StorageSharedKeyCredentialPolicyV2.browser.js.map +0 -1
- package/dist-esm/storage-blob/src/policies/StorageSharedKeyCredentialPolicyV2.js +0 -132
- package/dist-esm/storage-blob/src/policies/StorageSharedKeyCredentialPolicyV2.js.map +0 -1
- package/dist-esm/storage-blob/src/utils/Batch.js.map +0 -1
- package/dist-esm/storage-blob/src/utils/BlobQuickQueryStream.js +0 -111
- package/dist-esm/storage-blob/src/utils/BlobQuickQueryStream.js.map +0 -1
- package/dist-esm/storage-blob/src/utils/Mutex.js +0 -65
- package/dist-esm/storage-blob/src/utils/Mutex.js.map +0 -1
- package/dist-esm/storage-blob/src/utils/RetriableReadableStream.js +0 -119
- package/dist-esm/storage-blob/src/utils/RetriableReadableStream.js.map +0 -1
- package/dist-esm/storage-blob/src/utils/SharedKeyComparator.js +0 -73
- package/dist-esm/storage-blob/src/utils/SharedKeyComparator.js.map +0 -1
- package/dist-esm/storage-blob/src/utils/cache.js +0 -11
- package/dist-esm/storage-blob/src/utils/cache.js.map +0 -1
- package/dist-esm/storage-blob/src/utils/constants.js.map +0 -1
- package/dist-esm/storage-blob/src/utils/tracing.js.map +0 -1
- package/dist-esm/storage-blob/src/utils/utils.common.js.map +0 -1
- package/dist-esm/storage-blob/src/utils/utils.node.js.map +0 -1
- package/dist-esm/storage-common/src/BufferScheduler.browser.js +0 -8
- package/dist-esm/storage-common/src/BufferScheduler.browser.js.map +0 -1
- package/dist-esm/storage-common/src/BufferScheduler.js.map +0 -1
- package/dist-esm/storage-common/src/BuffersStream.js +0 -83
- package/dist-esm/storage-common/src/BuffersStream.js.map +0 -1
- package/dist-esm/storage-common/src/PooledBuffer.js +0 -87
- package/dist-esm/storage-common/src/PooledBuffer.js.map +0 -1
- package/dist-esm/storage-common/src/index.browser.js +0 -4
- package/dist-esm/storage-common/src/index.browser.js.map +0 -1
- package/dist-esm/storage-common/src/index.js +0 -4
- package/dist-esm/storage-common/src/index.js.map +0 -1
- package/dist-esm/storage-file-datalake/src/DataLakeFileSystemClient.js.map +0 -1
- package/dist-esm/storage-file-datalake/src/DataLakeLeaseClient.js.map +0 -1
- package/dist-esm/storage-file-datalake/src/DataLakeServiceClient.js.map +0 -1
- package/dist-esm/storage-file-datalake/src/Pipeline.js.map +0 -1
- package/dist-esm/storage-file-datalake/src/StorageClient.js.map +0 -1
- package/dist-esm/storage-file-datalake/src/StorageContextClient.js.map +0 -1
- package/dist-esm/storage-file-datalake/src/clients.js.map +0 -1
- package/dist-esm/storage-file-datalake/src/credentials/StorageSharedKeyCredential.browser.js.map +0 -1
- package/dist-esm/storage-file-datalake/src/credentials/StorageSharedKeyCredential.js.map +0 -1
- package/dist-esm/storage-file-datalake/src/credentials/UserDelegationKeyCredential.browser.js.map +0 -1
- package/dist-esm/storage-file-datalake/src/credentials/UserDelegationKeyCredential.js.map +0 -1
- package/dist-esm/storage-file-datalake/src/generated/src/index.js.map +0 -1
- package/dist-esm/storage-file-datalake/src/generated/src/models/index.js.map +0 -1
- package/dist-esm/storage-file-datalake/src/generated/src/models/mappers.js.map +0 -1
- package/dist-esm/storage-file-datalake/src/generated/src/models/parameters.js.map +0 -1
- package/dist-esm/storage-file-datalake/src/generated/src/operations/fileSystemOperations.js.map +0 -1
- package/dist-esm/storage-file-datalake/src/generated/src/operations/index.js.map +0 -1
- package/dist-esm/storage-file-datalake/src/generated/src/operations/pathOperations.js.map +0 -1
- package/dist-esm/storage-file-datalake/src/generated/src/operations/service.js.map +0 -1
- package/dist-esm/storage-file-datalake/src/generated/src/operationsInterfaces/fileSystemOperations.js.map +0 -1
- package/dist-esm/storage-file-datalake/src/generated/src/operationsInterfaces/index.js.map +0 -1
- package/dist-esm/storage-file-datalake/src/generated/src/operationsInterfaces/pathOperations.js.map +0 -1
- package/dist-esm/storage-file-datalake/src/generated/src/operationsInterfaces/service.js.map +0 -1
- package/dist-esm/storage-file-datalake/src/generated/src/storageClient.js.map +0 -1
- package/dist-esm/storage-file-datalake/src/index.browser.js.map +0 -1
- package/dist-esm/storage-file-datalake/src/index.js +0 -23
- package/dist-esm/storage-file-datalake/src/index.js.map +0 -1
- package/dist-esm/storage-file-datalake/src/log.js.map +0 -1
- package/dist-esm/storage-file-datalake/src/models.internal.js.map +0 -1
- package/dist-esm/storage-file-datalake/src/models.js.map +0 -1
- package/dist-esm/storage-file-datalake/src/sas/AccountSASPermissions.js.map +0 -1
- package/dist-esm/storage-file-datalake/src/sas/AccountSASResourceTypes.js.map +0 -1
- package/dist-esm/storage-file-datalake/src/sas/AccountSASServices.js.map +0 -1
- package/dist-esm/storage-file-datalake/src/sas/AccountSASSignatureValues.js.map +0 -1
- package/dist-esm/storage-file-datalake/src/sas/DataLakeSASPermissions.js.map +0 -1
- package/dist-esm/storage-file-datalake/src/sas/DataLakeSASSignatureValues.js.map +0 -1
- package/dist-esm/storage-file-datalake/src/sas/DirectorySASPermissions.js.map +0 -1
- package/dist-esm/storage-file-datalake/src/sas/FileSystemSASPermissions.js.map +0 -1
- package/dist-esm/storage-file-datalake/src/sas/SASQueryParameters.js.map +0 -1
- package/dist-esm/storage-file-datalake/src/sas/SasIPRange.js.map +0 -1
- package/dist-esm/storage-file-datalake/src/transforms.js.map +0 -1
- package/dist-esm/storage-file-datalake/src/utils/Batch.js.map +0 -1
- package/dist-esm/storage-file-datalake/src/utils/BufferScheduler.js.map +0 -1
- package/dist-esm/storage-file-datalake/src/utils/DataLakeAclChangeFailedError.js.map +0 -1
- package/dist-esm/storage-file-datalake/src/utils/PathClientInternal.js.map +0 -1
- package/dist-esm/storage-file-datalake/src/utils/constants.js.map +0 -1
- package/dist-esm/storage-file-datalake/src/utils/tracing.js.map +0 -1
- package/dist-esm/storage-file-datalake/src/utils/utils.browser.js +0 -39
- package/dist-esm/storage-file-datalake/src/utils/utils.browser.js.map +0 -1
- package/dist-esm/storage-file-datalake/src/utils/utils.common.js.map +0 -1
- package/dist-esm/storage-file-datalake/src/utils/utils.node.js.map +0 -1
- package/types/latest/storage-file-datalake.d.ts +0 -5102
- /package/{dist-esm/storage-file-datalake/src → dist/browser}/generated/src/models/index.js +0 -0
- /package/{dist-esm/storage-file-datalake/src → dist/browser}/generated/src/models/mappers.js +0 -0
- /package/{dist-esm/storage-file-datalake/src → dist/browser}/generated/src/operationsInterfaces/fileSystemOperations.js +0 -0
- /package/{dist-esm/storage-file-datalake/src → dist/browser}/generated/src/operationsInterfaces/pathOperations.js +0 -0
- /package/{dist-esm/storage-file-datalake/src → dist/browser}/generated/src/operationsInterfaces/service.js +0 -0
- /package/{dist-esm/storage-file-datalake/src → dist/browser}/log.js +0 -0
- /package/{dist-esm/storage-file-datalake/src → dist/browser}/models.internal.js +0 -0
- /package/{dist-esm/storage-file-datalake/src → dist/browser}/sas/AccountSASPermissions.js +0 -0
- /package/{dist-esm/storage-file-datalake/src → dist/browser}/sas/AccountSASResourceTypes.js +0 -0
- /package/{dist-esm/storage-file-datalake/src → dist/browser}/sas/AccountSASServices.js +0 -0
- /package/{dist-esm/storage-file-datalake/src → dist/browser}/sas/DataLakeSASPermissions.js +0 -0
- /package/{dist-esm/storage-file-datalake/src → dist/browser}/sas/DirectorySASPermissions.js +0 -0
- /package/{dist-esm/storage-file-datalake/src → dist/browser}/sas/FileSystemSASPermissions.js +0 -0
- /package/{dist-esm/storage-file-datalake/src → dist/browser}/sas/SasIPRange.js +0 -0
- /package/{dist-esm/storage-blob/src → dist/browser}/utils/Batch.js +0 -0
- /package/{dist-esm/storage-file-datalake/src → dist/browser}/utils/DataLakeAclChangeFailedError.js +0 -0
- /package/{dist-esm/storage-file-datalake/src → dist/esm}/credentials/StorageSharedKeyCredential.js +0 -0
- /package/{dist-esm/storage-file-datalake/src → dist/esm}/utils/Batch.js +0 -0
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"utils.node.js","sourceRoot":"","sources":["../../../../../storage-blob/src/utils/utils.node.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,KAAK,EAAE,MAAM,IAAI,CAAC;AACzB,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAC7B,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAE9C;;;;;;;;GAQG;AACH,MAAM,CAAC,KAAK,UAAU,cAAc,CAClC,MAA6B,EAC7B,MAAc,EACd,MAAc,EACd,GAAW,EACX,QAAyB;IAEz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;QAEH,EAAE,CAAC,EAAE,CAAC,OAAO,EAAE,CAAC,GAAU,EAAE,EAAE;YAC5B,MAAM,CAAC,GAAG,CAAC,CAAC;QACd,CAAC,CAAC,CAAC;QAEH,EAAE,CAAC,EAAE,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;QAExB,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IACd,CAAC,CAAC,CAAC;AACL,CAAC;AAED;;;;GAIG;AACH,MAAM,CAAC,MAAM,MAAM,GAAG,IAAI,CAAC,SAAS,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC;AAE9C,MAAM,CAAC,MAAM,kBAAkB,GAAG,EAAE,CAAC,gBAAgB,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport * as fs from \"fs\";\nimport * as util from \"util\";\nimport { REQUEST_TIMEOUT } from \"./constants\";\n\n/**\n * Reads a readable stream into buffer. Fill the buffer from offset to end.\n *\n * @param stream - A Node.js Readable stream\n * @param buffer - Buffer to be filled, length must greater than or equal to offset\n * @param offset - From which position in the buffer to be filled, inclusive\n * @param end - To which position in the buffer to be filled, exclusive\n * @param encoding - Encoding of the Readable stream\n */\nexport async function streamToBuffer(\n stream: NodeJS.ReadableStream,\n buffer: Buffer,\n offset: number,\n end: number,\n encoding?: BufferEncoding,\n): Promise<void> {\n let pos = 0; // Position in stream\n const count = end - offset; // Total amount of data needed in stream\n\n return new Promise<void>((resolve, reject) => {\n const timeout = setTimeout(\n () => reject(new Error(`The operation cannot be completed in timeout.`)),\n REQUEST_TIMEOUT,\n );\n\n stream.on(\"readable\", () => {\n if (pos >= count) {\n clearTimeout(timeout);\n resolve();\n return;\n }\n\n let chunk = stream.read();\n if (!chunk) {\n return;\n }\n if (typeof chunk === \"string\") {\n chunk = Buffer.from(chunk, encoding);\n }\n\n // How much data needed in this chunk\n const chunkLength = pos + chunk.length > count ? count - pos : chunk.length;\n\n buffer.fill(chunk.slice(0, chunkLength), offset + pos, offset + pos + chunkLength);\n pos += chunkLength;\n });\n\n stream.on(\"end\", () => {\n clearTimeout(timeout);\n if (pos < count) {\n reject(\n new Error(\n `Stream drains before getting enough data needed. Data read: ${pos}, data need: ${count}`,\n ),\n );\n }\n resolve();\n });\n\n stream.on(\"error\", (msg) => {\n clearTimeout(timeout);\n reject(msg);\n });\n });\n}\n\n/**\n * Reads a readable stream into buffer entirely.\n *\n * @param stream - A Node.js Readable stream\n * @param buffer - Buffer to be filled, length must greater than or equal to offset\n * @param encoding - Encoding of the Readable stream\n * @returns with the count of bytes read.\n * @throws `RangeError` If buffer size is not big enough.\n */\nexport async function streamToBuffer2(\n stream: NodeJS.ReadableStream,\n buffer: Buffer,\n encoding?: BufferEncoding,\n): Promise<number> {\n let pos = 0; // Position in stream\n const bufferSize = buffer.length;\n\n return new Promise<number>((resolve, reject) => {\n stream.on(\"readable\", () => {\n let chunk = stream.read();\n if (!chunk) {\n return;\n }\n if (typeof chunk === \"string\") {\n chunk = Buffer.from(chunk, encoding);\n }\n\n if (pos + chunk.length > bufferSize) {\n reject(new Error(`Stream exceeds buffer size. Buffer size: ${bufferSize}`));\n return;\n }\n\n buffer.fill(chunk, pos, pos + chunk.length);\n pos += chunk.length;\n });\n\n stream.on(\"end\", () => {\n resolve(pos);\n });\n\n stream.on(\"error\", reject);\n });\n}\n\n/**\n * Reads a readable stream into a buffer.\n *\n * @param stream - A Node.js Readable stream\n * @param encoding - Encoding of the Readable stream\n * @returns with the count of bytes read.\n */\nexport async function streamToBuffer3(\n readableStream: NodeJS.ReadableStream,\n encoding?: BufferEncoding,\n): Promise<Buffer> {\n return new Promise((resolve, reject) => {\n const chunks: Buffer[] = [];\n readableStream.on(\"data\", (data: Buffer | string) => {\n chunks.push(typeof data === \"string\" ? Buffer.from(data, encoding) : data);\n });\n readableStream.on(\"end\", () => {\n resolve(Buffer.concat(chunks));\n });\n readableStream.on(\"error\", reject);\n });\n}\n\n/**\n * ONLY AVAILABLE IN NODE.JS RUNTIME.\n *\n * Writes the content of a readstream to a local file. Returns a Promise which is completed after the file handle is closed.\n *\n * @param rs - The read stream.\n * @param file - Destination file path.\n */\nexport async function readStreamToLocalFile(\n rs: NodeJS.ReadableStream,\n file: string,\n): Promise<void> {\n return new Promise<void>((resolve, reject) => {\n const ws = fs.createWriteStream(file);\n\n rs.on(\"error\", (err: Error) => {\n reject(err);\n });\n\n ws.on(\"error\", (err: Error) => {\n reject(err);\n });\n\n ws.on(\"close\", resolve);\n\n rs.pipe(ws);\n });\n}\n\n/**\n * ONLY AVAILABLE IN NODE.JS RUNTIME.\n *\n * Promisified version of fs.stat().\n */\nexport const fsStat = util.promisify(fs.stat);\n\nexport const fsCreateReadStream = fs.createReadStream;\n"]}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
// Copyright (c) Microsoft Corporation.
|
|
2
|
-
// Licensed under the MIT License.
|
|
3
|
-
// This file is used as a shim of "BufferScheduler" for some browser bundlers
|
|
4
|
-
// when trying to bundle "BufferScheduler"
|
|
5
|
-
// "BufferScheduler" class is only available in Node.js runtime
|
|
6
|
-
export class BufferScheduler {
|
|
7
|
-
}
|
|
8
|
-
//# sourceMappingURL=BufferScheduler.browser.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"BufferScheduler.browser.js","sourceRoot":"","sources":["../../../../storage-common/src/BufferScheduler.browser.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,6EAA6E;AAC7E,0CAA0C;AAC1C,+DAA+D;AAC/D,MAAM,OAAO,eAAe;CAAG","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n// This file is used as a shim of \"BufferScheduler\" for some browser bundlers\n// when trying to bundle \"BufferScheduler\"\n// \"BufferScheduler\" class is only available in Node.js runtime\nexport class BufferScheduler {}\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"BufferScheduler.js","sourceRoot":"","sources":["../../../../storage-common/src/B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G,IAAI,CAAC,QAAQ,CAAC,KAAK,EAAE,CAAC;YAC/B,IAAI,MAAM,EAAE,CAAC;gBACX,IAAI,CAAC,sBAAsB,CAAC,MAAM,CAAC,CAAC;YACtC,CAAC;QACH,CAAC,QAAQ,MAAM,EAAE;IACnB,CAAC;IAED;;;;OAIG;IACK,KAAK,CAAC,sBAAsB,CAAC,MAAoB;QACvD,MAAM,YAAY,GAAG,MAAM,CAAC,IAAI,CAAC;QAEjC,IAAI,CAAC,yBAAyB,EAAE,CAAC;QACjC,IAAI,CAAC,MAAM,IAAI,YAAY,CAAC;QAE5B,IAAI,CAAC;YACH,MAAM,IAAI,CAAC,eAAe,CACxB,GAAG,EAAE,CAAC,MAAM,CAAC,iBAAiB,EAAE,EAChC,YAAY,EACZ,IAAI,CAAC,MAAM,GAAG,YAAY,CAC3B,CAAC;QACJ,CAAC;QAAC,OAAO,GAAQ,EAAE,CAAC;YAClB,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,EAAE,GAAG,CAAC,CAAC;YAChC,OAAO;QACT,CAAC;QAED,IAAI,CAAC,yBAAyB,EAAE,CAAC;QACjC,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC;QACzB,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;IAChC,CAAC;IAED;;;;OAIG;IACK,WAAW,CAAC,MAAoB;QACtC,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QAC3B,IAAI,CAAC,IAAI,CAAC,OAAO,IAAI,IAAI,CAAC,WAAW,EAAE,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE,CAAC;YAC7D,IAAI,CAAC,QAAQ,CAAC,MAAM,EAAE,CAAC;QACzB,CAAC;IACH,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { EventEmitter } from \"events\";\nimport { Readable } from \"stream\";\nimport { PooledBuffer } from \"./PooledBuffer\";\n\n/**\n * OutgoingHandler is an async function triggered by BufferScheduler.\n */\nexport declare type OutgoingHandler = (\n body: () => NodeJS.ReadableStream,\n length: number,\n offset?: number\n) => Promise<any>;\n\n/**\n * This class accepts a Node.js Readable stream as input, and keeps reading data\n * from the stream into the internal buffer structure, until it reaches maxBuffers.\n * Every available buffer will try to trigger outgoingHandler.\n *\n * The internal buffer structure includes an incoming buffer array, and a outgoing\n * buffer array. The incoming buffer array includes the \"empty\" buffers can be filled\n * with new incoming data. The outgoing array includes the filled buffers to be\n * handled by outgoingHandler. Every above buffer size is defined by parameter bufferSize.\n *\n * NUM_OF_ALL_BUFFERS = BUFFERS_IN_INCOMING + BUFFERS_IN_OUTGOING + BUFFERS_UNDER_HANDLING\n *\n * NUM_OF_ALL_BUFFERS lesser than or equal to maxBuffers\n *\n * PERFORMANCE IMPROVEMENT TIPS:\n * 1. Input stream highWaterMark is better to set a same value with bufferSize\n * parameter, which will avoid Buffer.concat() operations.\n * 2. concurrency should set a smaller value than maxBuffers, which is helpful to\n * reduce the possibility when a outgoing handler waits for the stream data.\n * in this situation, outgoing handlers are blocked.\n * Outgoing queue shouldn't be empty.\n */\nexport class BufferScheduler {\n /**\n * Size of buffers in incoming and outgoing queues. This class will try to align\n * data read from Readable stream into buffer chunks with bufferSize defined.\n */\n private readonly bufferSize: number;\n\n /**\n * How many buffers can be created or maintained.\n */\n private readonly maxBuffers: number;\n\n /**\n * A Node.js Readable stream.\n */\n private readonly readable: Readable;\n\n /**\n * OutgoingHandler is an async function triggered by BufferScheduler when there\n * are available buffers in outgoing array.\n */\n private readonly outgoingHandler: OutgoingHandler;\n\n /**\n * An internal event emitter.\n */\n private readonly emitter: EventEmitter = new EventEmitter();\n\n /**\n * Concurrency of executing outgoingHandlers. (0 lesser than concurrency lesser than or equal to maxBuffers)\n */\n private readonly concurrency: number;\n\n /**\n * An internal offset marker to track data offset in bytes of next outgoingHandler.\n */\n private offset: number = 0;\n\n /**\n * An internal marker to track whether stream is end.\n */\n private isStreamEnd: boolean = false;\n\n /**\n * An internal marker to track whether stream or outgoingHandler returns error.\n */\n private isError: boolean = false;\n\n /**\n * How many handlers are executing.\n */\n private executingOutgoingHandlers: number = 0;\n\n /**\n * Encoding of the input Readable stream which has string data type instead of Buffer.\n */\n private encoding?: BufferEncoding;\n\n /**\n * How many buffers have been allocated.\n */\n private numBuffers: number = 0;\n\n /**\n * Because this class doesn't know how much data every time stream pops, which\n * is defined by highWaterMarker of the stream. So BufferScheduler will cache\n * data received from the stream, when data in unresolvedDataArray exceeds the\n * blockSize defined, it will try to concat a blockSize of buffer, fill into available\n * buffers from incoming and push to outgoing array.\n */\n private unresolvedDataArray: Buffer[] = [];\n\n /**\n * How much data consisted in unresolvedDataArray.\n */\n private unresolvedLength: number = 0;\n\n /**\n * The array includes all the available buffers can be used to fill data from stream.\n */\n private incoming: PooledBuffer[] = [];\n\n /**\n * The array (queue) includes all the buffers filled from stream data.\n */\n private outgoing: PooledBuffer[] = [];\n\n /**\n * Creates an instance of BufferScheduler.\n *\n * @param readable - A Node.js Readable stream\n * @param bufferSize - Buffer size of every maintained buffer\n * @param maxBuffers - How many buffers can be allocated\n * @param outgoingHandler - An async function scheduled to be\n * triggered when a buffer fully filled\n * with stream data\n * @param concurrency - Concurrency of executing outgoingHandlers (>0)\n * @param encoding - [Optional] Encoding of Readable stream when it's a string stream\n */\n constructor(\n readable: Readable,\n bufferSize: number,\n maxBuffers: number,\n outgoingHandler: OutgoingHandler,\n concurrency: number,\n encoding?: BufferEncoding\n ) {\n if (bufferSize <= 0) {\n throw new RangeError(`bufferSize must be larger than 0, current is ${bufferSize}`);\n }\n\n if (maxBuffers <= 0) {\n throw new RangeError(`maxBuffers must be larger than 0, current is ${maxBuffers}`);\n }\n\n if (concurrency <= 0) {\n throw new RangeError(`concurrency must be larger than 0, current is ${concurrency}`);\n }\n\n this.bufferSize = bufferSize;\n this.maxBuffers = maxBuffers;\n this.readable = readable;\n this.outgoingHandler = outgoingHandler;\n this.concurrency = concurrency;\n this.encoding = encoding;\n }\n\n /**\n * Start the scheduler, will return error when stream of any of the outgoingHandlers\n * returns error.\n *\n */\n public async do(): Promise<void> {\n return new Promise<void>((resolve, reject) => {\n this.readable.on(\"data\", (data) => {\n data = typeof data === \"string\" ? Buffer.from(data, this.encoding) : data;\n this.appendUnresolvedData(data);\n\n if (!this.resolveData()) {\n this.readable.pause();\n }\n });\n\n this.readable.on(\"error\", (err) => {\n this.emitter.emit(\"error\", err);\n });\n\n this.readable.on(\"end\", () => {\n this.isStreamEnd = true;\n this.emitter.emit(\"checkEnd\");\n });\n\n this.emitter.on(\"error\", (err) => {\n this.isError = true;\n this.readable.pause();\n reject(err);\n });\n\n this.emitter.on(\"checkEnd\", () => {\n if (this.outgoing.length > 0) {\n this.triggerOutgoingHandlers();\n return;\n }\n\n if (this.isStreamEnd && this.executingOutgoingHandlers === 0) {\n if (this.unresolvedLength > 0 && this.unresolvedLength < this.bufferSize) {\n const buffer = this.shiftBufferFromUnresolvedDataArray();\n this.outgoingHandler(() => buffer.getReadableStream(), buffer.size, this.offset)\n .then(resolve)\n .catch(reject);\n } else if (this.unresolvedLength >= this.bufferSize) {\n return;\n } else {\n resolve();\n }\n }\n });\n });\n }\n\n /**\n * Insert a new data into unresolved array.\n *\n * @param data -\n */\n private appendUnresolvedData(data: Buffer) {\n this.unresolvedDataArray.push(data);\n this.unresolvedLength += data.length;\n }\n\n /**\n * Try to shift a buffer with size in blockSize. The buffer returned may be less\n * than blockSize when data in unresolvedDataArray is less than bufferSize.\n *\n */\n private shiftBufferFromUnresolvedDataArray(buffer?: PooledBuffer): PooledBuffer {\n if (!buffer) {\n buffer = new PooledBuffer(this.bufferSize, this.unresolvedDataArray, this.unresolvedLength);\n } else {\n buffer.fill(this.unresolvedDataArray, this.unresolvedLength);\n }\n\n this.unresolvedLength -= buffer.size;\n return buffer;\n }\n\n /**\n * Resolve data in unresolvedDataArray. For every buffer with size in blockSize\n * shifted, it will try to get (or allocate a buffer) from incoming, and fill it,\n * then push it into outgoing to be handled by outgoing handler.\n *\n * Return false when available buffers in incoming are not enough, else true.\n *\n * @returns Return false when buffers in incoming are not enough, else true.\n */\n private resolveData(): boolean {\n while (this.unresolvedLength >= this.bufferSize) {\n let buffer: PooledBuffer;\n\n if (this.incoming.length > 0) {\n buffer = this.incoming.shift()!;\n this.shiftBufferFromUnresolvedDataArray(buffer);\n } else {\n if (this.numBuffers < this.maxBuffers) {\n buffer = this.shiftBufferFromUnresolvedDataArray();\n this.numBuffers++;\n } else {\n // No available buffer, wait for buffer returned\n return false;\n }\n }\n\n this.outgoing.push(buffer);\n this.triggerOutgoingHandlers();\n }\n return true;\n }\n\n /**\n * Try to trigger a outgoing handler for every buffer in outgoing. Stop when\n * concurrency reaches.\n */\n private async triggerOutgoingHandlers() {\n let buffer: PooledBuffer | undefined;\n do {\n if (this.executingOutgoingHandlers >= this.concurrency) {\n return;\n }\n\n buffer = this.outgoing.shift();\n if (buffer) {\n this.triggerOutgoingHandler(buffer);\n }\n } while (buffer);\n }\n\n /**\n * Trigger a outgoing handler for a buffer shifted from outgoing.\n *\n * @param buffer -\n */\n private async triggerOutgoingHandler(buffer: PooledBuffer): Promise<any> {\n const bufferLength = buffer.size;\n\n this.executingOutgoingHandlers++;\n this.offset += bufferLength;\n\n try {\n await this.outgoingHandler(\n () => buffer.getReadableStream(),\n bufferLength,\n this.offset - bufferLength\n );\n } catch (err: any) {\n this.emitter.emit(\"error\", err);\n return;\n }\n\n this.executingOutgoingHandlers--;\n this.reuseBuffer(buffer);\n this.emitter.emit(\"checkEnd\");\n }\n\n /**\n * Return buffer used by outgoing handler into incoming.\n *\n * @param buffer -\n */\n private reuseBuffer(buffer: PooledBuffer) {\n this.incoming.push(buffer);\n if (!this.isError && this.resolveData() && !this.isStreamEnd) {\n this.readable.resume();\n }\n }\n}\n"]}
|
|
@@ -1,83 +0,0 @@
|
|
|
1
|
-
// Copyright (c) Microsoft Corporation.
|
|
2
|
-
// Licensed under the MIT License.
|
|
3
|
-
import { Readable } from "stream";
|
|
4
|
-
/**
|
|
5
|
-
* This class generates a readable stream from the data in an array of buffers.
|
|
6
|
-
*/
|
|
7
|
-
export class BuffersStream extends Readable {
|
|
8
|
-
/**
|
|
9
|
-
* Creates an instance of BuffersStream that will emit the data
|
|
10
|
-
* contained in the array of buffers.
|
|
11
|
-
*
|
|
12
|
-
* @param buffers - Array of buffers containing the data
|
|
13
|
-
* @param byteLength - The total length of data contained in the buffers
|
|
14
|
-
*/
|
|
15
|
-
constructor(buffers, byteLength, options) {
|
|
16
|
-
super(options);
|
|
17
|
-
this.buffers = buffers;
|
|
18
|
-
this.byteLength = byteLength;
|
|
19
|
-
this.byteOffsetInCurrentBuffer = 0;
|
|
20
|
-
this.bufferIndex = 0;
|
|
21
|
-
this.pushedBytesLength = 0;
|
|
22
|
-
// check byteLength is no larger than buffers[] total length
|
|
23
|
-
let buffersLength = 0;
|
|
24
|
-
for (const buf of this.buffers) {
|
|
25
|
-
buffersLength += buf.byteLength;
|
|
26
|
-
}
|
|
27
|
-
if (buffersLength < this.byteLength) {
|
|
28
|
-
throw new Error("Data size shouldn't be larger than the total length of buffers.");
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
/**
|
|
32
|
-
* Internal _read() that will be called when the stream wants to pull more data in.
|
|
33
|
-
*
|
|
34
|
-
* @param size - Optional. The size of data to be read
|
|
35
|
-
*/
|
|
36
|
-
_read(size) {
|
|
37
|
-
if (this.pushedBytesLength >= this.byteLength) {
|
|
38
|
-
this.push(null);
|
|
39
|
-
}
|
|
40
|
-
if (!size) {
|
|
41
|
-
size = this.readableHighWaterMark;
|
|
42
|
-
}
|
|
43
|
-
const outBuffers = [];
|
|
44
|
-
let i = 0;
|
|
45
|
-
while (i < size && this.pushedBytesLength < this.byteLength) {
|
|
46
|
-
// The last buffer may be longer than the data it contains.
|
|
47
|
-
const remainingDataInAllBuffers = this.byteLength - this.pushedBytesLength;
|
|
48
|
-
const remainingCapacityInThisBuffer = this.buffers[this.bufferIndex].byteLength - this.byteOffsetInCurrentBuffer;
|
|
49
|
-
const remaining = Math.min(remainingCapacityInThisBuffer, remainingDataInAllBuffers);
|
|
50
|
-
if (remaining > size - i) {
|
|
51
|
-
// chunkSize = size - i
|
|
52
|
-
const end = this.byteOffsetInCurrentBuffer + size - i;
|
|
53
|
-
outBuffers.push(this.buffers[this.bufferIndex].slice(this.byteOffsetInCurrentBuffer, end));
|
|
54
|
-
this.pushedBytesLength += size - i;
|
|
55
|
-
this.byteOffsetInCurrentBuffer = end;
|
|
56
|
-
i = size;
|
|
57
|
-
break;
|
|
58
|
-
}
|
|
59
|
-
else {
|
|
60
|
-
// chunkSize = remaining
|
|
61
|
-
const end = this.byteOffsetInCurrentBuffer + remaining;
|
|
62
|
-
outBuffers.push(this.buffers[this.bufferIndex].slice(this.byteOffsetInCurrentBuffer, end));
|
|
63
|
-
if (remaining === remainingCapacityInThisBuffer) {
|
|
64
|
-
// this.buffers[this.bufferIndex] used up, shift to next one
|
|
65
|
-
this.byteOffsetInCurrentBuffer = 0;
|
|
66
|
-
this.bufferIndex++;
|
|
67
|
-
}
|
|
68
|
-
else {
|
|
69
|
-
this.byteOffsetInCurrentBuffer = end;
|
|
70
|
-
}
|
|
71
|
-
this.pushedBytesLength += remaining;
|
|
72
|
-
i += remaining;
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
if (outBuffers.length > 1) {
|
|
76
|
-
this.push(Buffer.concat(outBuffers));
|
|
77
|
-
}
|
|
78
|
-
else if (outBuffers.length === 1) {
|
|
79
|
-
this.push(outBuffers[0]);
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
//# sourceMappingURL=BuffersStream.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"BuffersStream.js","sourceRoot":"","sources":["../../../../storage-common/src/BuffersStream.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,QAAQ,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C1B,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC,CAAC;QACvC,CAAC;aAAM,IAAI,UAAU,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YACnC,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC;QAC3B,CAAC;IACH,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { Readable, ReadableOptions } from \"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) {\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"]}
|
|
@@ -1,87 +0,0 @@
|
|
|
1
|
-
// Copyright (c) Microsoft Corporation.
|
|
2
|
-
// Licensed under the MIT License.
|
|
3
|
-
import { BuffersStream } from "./BuffersStream";
|
|
4
|
-
/**
|
|
5
|
-
* maxBufferLength is max size of each buffer in the pooled buffers.
|
|
6
|
-
*/
|
|
7
|
-
import buffer from "buffer";
|
|
8
|
-
const maxBufferLength = buffer.constants.MAX_LENGTH;
|
|
9
|
-
/**
|
|
10
|
-
* This class provides a buffer container which conceptually has no hard size limit.
|
|
11
|
-
* It accepts a capacity, an array of input buffers and the total length of input data.
|
|
12
|
-
* It will allocate an internal "buffer" of the capacity and fill the data in the input buffers
|
|
13
|
-
* into the internal "buffer" serially with respect to the total length.
|
|
14
|
-
* Then by calling PooledBuffer.getReadableStream(), you can get a readable stream
|
|
15
|
-
* assembled from all the data in the internal "buffer".
|
|
16
|
-
*/
|
|
17
|
-
export class PooledBuffer {
|
|
18
|
-
/**
|
|
19
|
-
* The size of the data contained in the pooled buffers.
|
|
20
|
-
*/
|
|
21
|
-
get size() {
|
|
22
|
-
return this._size;
|
|
23
|
-
}
|
|
24
|
-
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
|
-
this.capacity = capacity;
|
|
31
|
-
this._size = 0;
|
|
32
|
-
// allocate
|
|
33
|
-
const bufferNum = Math.ceil(capacity / maxBufferLength);
|
|
34
|
-
for (let i = 0; i < bufferNum; i++) {
|
|
35
|
-
let len = i === bufferNum - 1 ? capacity % maxBufferLength : maxBufferLength;
|
|
36
|
-
if (len === 0) {
|
|
37
|
-
len = maxBufferLength;
|
|
38
|
-
}
|
|
39
|
-
this.buffers.push(Buffer.allocUnsafe(len));
|
|
40
|
-
}
|
|
41
|
-
if (buffers) {
|
|
42
|
-
this.fill(buffers, totalLength);
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
/**
|
|
46
|
-
* Fill the internal buffers with data in the input buffers serially
|
|
47
|
-
* with respect to the total length and the total capacity of the internal buffers.
|
|
48
|
-
* Data copied will be shift out of the input buffers.
|
|
49
|
-
*
|
|
50
|
-
* @param buffers - Input buffers containing the data to be filled in the pooled buffer
|
|
51
|
-
* @param totalLength - Total length of the data to be filled in.
|
|
52
|
-
*
|
|
53
|
-
*/
|
|
54
|
-
fill(buffers, totalLength) {
|
|
55
|
-
this._size = Math.min(this.capacity, totalLength);
|
|
56
|
-
let i = 0, j = 0, targetOffset = 0, sourceOffset = 0, totalCopiedNum = 0;
|
|
57
|
-
while (totalCopiedNum < this._size) {
|
|
58
|
-
const source = buffers[i];
|
|
59
|
-
const target = this.buffers[j];
|
|
60
|
-
const copiedNum = source.copy(target, targetOffset, sourceOffset);
|
|
61
|
-
totalCopiedNum += copiedNum;
|
|
62
|
-
sourceOffset += copiedNum;
|
|
63
|
-
targetOffset += copiedNum;
|
|
64
|
-
if (sourceOffset === source.length) {
|
|
65
|
-
i++;
|
|
66
|
-
sourceOffset = 0;
|
|
67
|
-
}
|
|
68
|
-
if (targetOffset === target.length) {
|
|
69
|
-
j++;
|
|
70
|
-
targetOffset = 0;
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
// clear copied from source buffers
|
|
74
|
-
buffers.splice(0, i);
|
|
75
|
-
if (buffers.length > 0) {
|
|
76
|
-
buffers[0] = buffers[0].slice(sourceOffset);
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
/**
|
|
80
|
-
* Get the readable stream assembled from all the data in the internal buffers.
|
|
81
|
-
*
|
|
82
|
-
*/
|
|
83
|
-
getReadableStream() {
|
|
84
|
-
return new BuffersStream(this.buffers, this.size);
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
//# sourceMappingURL=PooledBuffer.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"PooledBuffer.js","sourceRoot":"","sources":["../../../../storage-common/src/PooledBuffer.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAGhD;;GAEG;AACH,OAAO,MAAM,MAAM,QAAQ,CAAC;AAC5B,MAAM,eAAe,GAAG,MAAM,CAAC,SAAS,CAAC,UAAU,CAAC;AAEpD;;;;;;;GAOG;AACH,MAAM,OAAO,YAAY;IAiBvB;;OAEG;IACH,IAAW,IAAI;QACb,OAAO,IAAI,CAAC,KAAK,CAAC;IACpB,CAAC;IAsBD,YAAY,QAAgB,EAAE,OAAkB,EAAE,WAAoB;QA3CtE;;;WAGG;QACK,YAAO,GAAa,EAAE,CAAC;QAwC7B,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;QACzB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,IAAI,SAAS,CAAC;YAC1B,YAAY,IAAI,SAAS,CAAC;YAC1B,IAAI,YAAY,KAAK,MAAM,CAAC,MAAM,EAAE,CAAC;gBACnC,CAAC,EAAE,CAAC;gBACJ,YAAY,GAAG,CAAC,CAAC;YACnB,CAAC;YACD,IAAI,YAAY,KAAK,MAAM,CAAC,MAAM,EAAE,CAAC;gBACnC,CAAC,EAAE,CAAC;gBACJ,YAAY,GAAG,CAAC,CAAC;YACnB,CAAC;QACH,CAAC;QAED,mCAAmC;QACnC,OAAO,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;QACrB,IAAI,OAAO,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YACvB,OAAO,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC;QAC9C,CAAC;IACH,CAAC;IAED;;;OAGG;IACI,iBAAiB;QACtB,OAAO,IAAI,aAAa,CAAC,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC;IACpD,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { BuffersStream } from \"./BuffersStream\";\nimport { Readable } from \"stream\";\n\n/**\n * maxBufferLength is max size of each buffer in the pooled buffers.\n */\nimport buffer from \"buffer\";\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) {\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"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.browser.js","sourceRoot":"","sources":["../../../../storage-common/src/index.browser.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,cAAc,2BAA2B,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nexport * from \"./BufferScheduler.browser\";\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../storage-common/src/index.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAmB,eAAe,EAAE,MAAM,mBAAmB,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nexport { OutgoingHandler, BufferScheduler } from \"./BufferScheduler\";\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"DataLakeFileSystemClient.js","sourceRoot":"","sources":["../../../src/DataLakeFileSystemClient.ts"],"names":[],"mappings":";AAIA,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAEtD,OAAO,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AACzD,OAAO,EAAE,0BAA0B,EAAE,MAAM,0CAA0C,CAAC;AACtF,OAAO,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAE1D,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,2DAA2D;AAC3D,OAAO,EAAE,wBAAwB,IAAI,UAAU,EAAE,MAAM,4BAA4B,CAAC;AAmCpF,OAAO,EAAE,aAAa,EAAE,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,iBAAiB,EACjB,IAAI,CAAC,WAAW,CACjB,CAAC,YAAY,CAAC;IACjB,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\nimport type { TokenCredential } from \"@azure/core-auth\";\nimport type { PagedAsyncIterableIterator, PageSettings } from \"@azure/core-paging\";\nimport { ContainerClient } from \"@azure/storage-blob\";\nimport type { Pipeline, StoragePipelineOptions } from \"./Pipeline\";\nimport { isPipelineLike, newPipeline } from \"./Pipeline\";\nimport { StorageSharedKeyCredential } from \"./credentials/StorageSharedKeyCredential\";\nimport { AnonymousCredential } from \"@azure/storage-blob\";\n\nimport { DataLakeLeaseClient } from \"./DataLakeLeaseClient\";\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nimport { FileSystemOperationsImpl as FileSystem } from \"./generated/src/operations\";\nimport type {\n AccessPolicy,\n FileSystemCreateOptions,\n FileSystemCreateResponse,\n FileSystemDeleteOptions,\n FileSystemDeleteResponse,\n FileSystemExistsOptions,\n FileSystemGetAccessPolicyOptions,\n FileSystemGetAccessPolicyResponse,\n FileSystemGetPropertiesOptions,\n FileSystemGetPropertiesResponse,\n FileSystemSetAccessPolicyOptions,\n FileSystemSetAccessPolicyResponse,\n FileSystemSetMetadataOptions,\n FileSystemSetMetadataResponse,\n ListPathsOptions,\n ListPathsSegmentOptions,\n Metadata,\n Path,\n PublicAccessType,\n SignedIdentifier,\n FileSystemListPathsResponse,\n FileSystemCreateIfNotExistsResponse,\n FileSystemDeleteIfExistsResponse,\n FileSystemGenerateSasUrlOptions,\n FileSystemListDeletedPathsResponse,\n ListDeletedPathsOptions,\n DeletedPath,\n FileSystemUndeletePathResponse,\n FileSystemUndeletePathOption,\n ListDeletedPathsSegmentOptions,\n PathUndeleteHeaders,\n UserDelegationKey,\n} from \"./models\";\nimport { StorageClient } from \"./StorageClient\";\nimport { toContainerPublicAccessType, toPublicAccessType, toPermissions } from \"./transforms\";\nimport { tracingClient } from \"./utils/tracing\";\nimport {\n appendToURLPath,\n appendToURLQuery,\n assertResponse,\n EscapePath,\n windowsFileTimeTicksToTime,\n} from \"./utils/utils.common\";\nimport { DataLakeFileClient, DataLakeDirectoryClient } from \"./clients\";\nimport {\n generateDataLakeSASQueryParameters,\n generateDataLakeSASQueryParametersInternal,\n} from \"./sas/DataLakeSASSignatureValues\";\nimport { DeletionIdKey, PathResultTypeConstants } from \"./utils/constants\";\nimport { PathClientInternal } from \"./utils/PathClientInternal\";\n\n/**\n * A DataLakeFileSystemClient represents a URL to the Azure Storage file system\n * allowing you to manipulate its directories and files.\n */\nexport class DataLakeFileSystemClient extends StorageClient {\n /**\n * fileSystemContext provided by protocol layer.\n */\n private fileSystemContext: FileSystem;\n\n /**\n * fileSystemContext provided by protocol layer.\n */\n private fileSystemContextToBlobEndpoint: FileSystem;\n\n /**\n * blobContainerClient provided by `@azure/storage-blob` package.\n */\n private blobContainerClient: ContainerClient;\n\n /**\n * Creates an instance of DataLakeFileSystemClient from url and credential.\n *\n * @param url - A Client string pointing to Azure Storage data lake file system, such as\n * \"https://myaccount.dfs.core.windows.net/filesystem\". You can append a SAS\n * if using AnonymousCredential, such as \"https://myaccount.dfs.core.windows.net/filesystem?sasString\".\n * @param credential - Such as AnonymousCredential, StorageSharedKeyCredential or any credential from the `@azure/identity` package to authenticate requests to the service. You can also provide an object that implements the TokenCredential interface. If not specified, AnonymousCredential is used.\n * @param options - Optional. Options to configure the HTTP pipeline.\n */\n constructor(\n url: string,\n credential?: StorageSharedKeyCredential | AnonymousCredential | TokenCredential,\n // Legacy, no way to fix the eslint error without breaking. Disable the rule for this line.\n /* eslint-disable-next-line @azure/azure-sdk/ts-naming-options */\n options?: StoragePipelineOptions,\n );\n\n /**\n * Creates an instance of DataLakeFileSystemClient from url and pipeline.\n *\n * @param url - A Client string pointing to Azure Storage data lake file system, such as\n * \"https://myaccount.dfs.core.windows.net/filesystem\". You can append a SAS\n * if using AnonymousCredential, such as \"https://myaccount.dfs.core.windows.net/filesystem?sasString\".\n * @param pipeline - Call newPipeline() to create a default\n * pipeline, or provide a customized pipeline.\n */\n constructor(url: string, pipeline: Pipeline);\n\n constructor(\n url: string,\n credentialOrPipeline?:\n | StorageSharedKeyCredential\n | AnonymousCredential\n | TokenCredential\n | Pipeline,\n // Legacy, no way to fix the eslint error without breaking. Disable the rule for this line.\n /* eslint-disable-next-line @azure/azure-sdk/ts-naming-options */\n options?: StoragePipelineOptions,\n ) {\n if (isPipelineLike(credentialOrPipeline)) {\n super(url, credentialOrPipeline);\n } else {\n let credential;\n if (credentialOrPipeline === undefined) {\n credential = new AnonymousCredential();\n } else {\n credential = credentialOrPipeline;\n }\n\n const pipeline = newPipeline(credential, options);\n super(url, pipeline);\n }\n\n this.fileSystemContext = new FileSystem(this.storageClientContext);\n this.fileSystemContextToBlobEndpoint = new FileSystem(this.storageClientContextToBlobEndpoint);\n this.blobContainerClient = new ContainerClient(this.blobEndpointUrl, this.pipeline);\n }\n\n /**\n * Name of current file system.\n *\n * @readonly\n */\n public get name(): string {\n return this.blobContainerClient.containerName;\n }\n\n /**\n * Creates a {@link DataLakeDirectoryClient} object under current file system.\n *\n * @param directoryName -\n */\n // Legacy, no way to fix the eslint error without breaking. Disable the rule for this line.\n /* eslint-disable-next-line @azure/azure-sdk/ts-naming-subclients */\n public getDirectoryClient(directoryName: string): DataLakeDirectoryClient {\n return new DataLakeDirectoryClient(\n appendToURLPath(this.url, EscapePath(directoryName)),\n this.pipeline,\n );\n }\n\n /**\n * Creates a {@link DataLakeFileClient} object under current file system.\n *\n * @param fileName -\n */\n // Legacy, no way to fix the eslint error without breaking. Disable the rule for this line.\n /* eslint-disable-next-line @azure/azure-sdk/ts-naming-subclients */\n public getFileClient(fileName: string): DataLakeFileClient {\n return new DataLakeFileClient(appendToURLPath(this.url, EscapePath(fileName)), this.pipeline);\n }\n\n /**\n * Get a {@link DataLakeLeaseClient} that manages leases on the file system.\n *\n * @param proposeLeaseId - Optional. Initial proposed lease Id.\n */\n public getDataLakeLeaseClient(proposeLeaseId?: string): DataLakeLeaseClient {\n return new DataLakeLeaseClient(this.blobContainerClient.getBlobLeaseClient(proposeLeaseId));\n }\n\n /**\n * Creates a new file system under the specified account. If the file system with\n * the same name already exists, the operation fails.\n *\n * @see https://learn.microsoft.com/en-us/rest/api/storageservices/create-container\n *\n * @param options - Optional. Options when creating file system.\n */\n public async create(options: FileSystemCreateOptions = {}): Promise<FileSystemCreateResponse> {\n return tracingClient.withSpan(\n \"DataLakeFileSystemClient-create\",\n options,\n async (updatedOptions) => {\n return this.blobContainerClient.create({\n ...options,\n access: toContainerPublicAccessType(options.access),\n tracingOptions: updatedOptions.tracingOptions,\n containerEncryptionScope: options.fileSystemEncryptionScope,\n });\n },\n );\n }\n\n /**\n * Creates a new file system under the specified account. If the file system with\n * the same name already exists, it is not changed.\n *\n * @see https://learn.microsoft.com/en-us/rest/api/storageservices/create-container\n *\n * @param options -\n */\n public async createIfNotExists(\n options: FileSystemCreateOptions = {},\n ): Promise<FileSystemCreateIfNotExistsResponse> {\n return tracingClient.withSpan(\n \"DataLakeFileSystemClient-createIfNotExists\",\n options,\n async (updatedOptions) => {\n return this.blobContainerClient.createIfNotExists({\n ...options,\n access: toContainerPublicAccessType(options.access),\n containerEncryptionScope: options.fileSystemEncryptionScope,\n tracingOptions: updatedOptions.tracingOptions,\n });\n },\n );\n }\n\n /**\n * Returns true if the File system represented by this client exists; false otherwise.\n *\n * NOTE: use this function with care since an existing file system might be deleted by other clients or\n * applications. Vice versa new file system with the same name might be added by other clients or\n * applications after this function completes.\n *\n * @param options -\n */\n public async exists(options: FileSystemExistsOptions = {}): Promise<boolean> {\n return tracingClient.withSpan(\n \"DataLakeFileSystemClient-exists\",\n options,\n async (updatedOptions) => {\n return this.blobContainerClient.exists(updatedOptions);\n },\n );\n }\n\n /**\n * Delete current file system.\n *\n * @see https://learn.microsoft.com/en-us/rest/api/storageservices/delete-container\n *\n * @param options - Optional. Options when deleting file system.\n */\n public async delete(options: FileSystemDeleteOptions = {}): Promise<FileSystemDeleteResponse> {\n return tracingClient.withSpan(\n \"DataLakeFileSystemClient-delete\",\n options,\n async (updatedOptions) => {\n return this.blobContainerClient.delete({\n ...options,\n tracingOptions: updatedOptions.tracingOptions,\n });\n },\n );\n }\n\n /**\n * Delete current file system if it exists.\n *\n * @see https://learn.microsoft.com/en-us/rest/api/storageservices/delete-container\n *\n * @param options -\n */\n public async deleteIfExists(\n options: FileSystemDeleteOptions = {},\n ): Promise<FileSystemDeleteIfExistsResponse> {\n return tracingClient.withSpan(\n \"DataLakeFileSystemClient-deleteIfExists\",\n options,\n async (updatedOptions) => {\n return this.blobContainerClient.deleteIfExists(updatedOptions);\n },\n );\n }\n\n /**\n * Returns all user-defined metadata and system properties for the specified\n * file system.\n *\n * WARNING: The `metadata` object returned in the response will have its keys in lowercase, even if\n * they originally contained uppercase characters. This differs from the metadata keys returned by\n * the `listFileSystems` method of {@link DataLakeServiceClient} using the `includeMetadata` option, which\n * will retain their original casing.\n *\n * @see https://learn.microsoft.com/en-us/rest/api/storageservices/get-container-properties\n *\n * @param options - Optional. Options when getting file system properties.\n */\n public async getProperties(\n options: FileSystemGetPropertiesOptions = {},\n ): Promise<FileSystemGetPropertiesResponse> {\n return tracingClient.withSpan(\n \"DataLakeFileSystemClient-getProperties\",\n options,\n async (updatedOptions) => {\n const rawResponse = await this.blobContainerClient.getProperties({\n ...options,\n tracingOptions: updatedOptions.tracingOptions,\n });\n\n // Transfer and rename blobPublicAccess to publicAccess\n const response = rawResponse as FileSystemGetPropertiesResponse;\n\n response.publicAccess = toPublicAccessType(rawResponse.blobPublicAccess);\n response._response.parsedHeaders.publicAccess = response.publicAccess;\n\n delete rawResponse.blobPublicAccess;\n delete rawResponse._response.parsedHeaders.blobPublicAccess;\n\n return response;\n },\n );\n }\n\n /**\n * Sets one or more user-defined name-value pairs for the specified file system.\n *\n * If no option provided, or no metadata defined in the parameter, the file system\n * metadata will be removed.\n *\n * @see https://learn.microsoft.com/en-us/rest/api/storageservices/set-container-metadata\n *\n * @param metadata - Replace existing metadata with this value.\n * If no value provided the existing metadata will be removed.\n * @param options - Optional. Options when setting file system metadata.\n */\n public async setMetadata(\n metadata?: Metadata,\n options: FileSystemSetMetadataOptions = {},\n ): Promise<FileSystemSetMetadataResponse> {\n return tracingClient.withSpan(\n \"DataLakeFileSystemClient-setMetadata\",\n options,\n async (updatedOptions) => {\n return this.blobContainerClient.setMetadata(metadata, {\n ...options,\n tracingOptions: updatedOptions.tracingOptions,\n });\n },\n );\n }\n\n /**\n * Gets the permissions for the specified file system. The permissions indicate\n * whether file system data may be accessed publicly.\n *\n * WARNING: JavaScript Date will potentially lose precision when parsing startsOn and expiresOn strings.\n * For example, new Date(\"2018-12-31T03:44:23.8827891Z\").toISOString() will get \"2018-12-31T03:44:23.882Z\".\n *\n * @see https://learn.microsoft.com/en-us/rest/api/storageservices/get-container-acl\n *\n * @param options - Optional. Options when getting file system access policy.\n */\n public async getAccessPolicy(\n options: FileSystemGetAccessPolicyOptions = {},\n ): Promise<FileSystemGetAccessPolicyResponse> {\n return tracingClient.withSpan(\n \"DataLakeFileSystemClient-getAccessPolicy\",\n options,\n async (updatedOptions) => {\n const rawResponse = await this.blobContainerClient.getAccessPolicy({\n ...options,\n tracingOptions: updatedOptions.tracingOptions,\n });\n\n // Transfer and rename blobPublicAccess to publicAccess\n const response = rawResponse as unknown as FileSystemGetAccessPolicyResponse;\n\n response.publicAccess = toPublicAccessType(rawResponse.blobPublicAccess);\n response._response.parsedHeaders.publicAccess = response.publicAccess;\n\n delete rawResponse.blobPublicAccess;\n delete rawResponse._response.parsedHeaders.blobPublicAccess;\n\n return response;\n },\n );\n }\n\n /**\n * Sets the permissions for the specified file system. The permissions indicate\n * whether directories or files in a file system may be accessed publicly.\n *\n * When you set permissions for a file system, the existing permissions are replaced.\n * If no access or containerAcl provided, the existing file system ACL will be\n * removed.\n *\n * @see https://learn.microsoft.com/en-us/rest/api/storageservices/set-container-acl\n *\n * @param access - Optional. The level of public access to data in the file system.\n * @param fileSystemAcl - Optional. Array of elements each having a unique Id and details of the access policy.\n * @param options - Optional. Options when setting file system access policy.\n */\n public async setAccessPolicy(\n access?: PublicAccessType,\n fileSystemAcl?: SignedIdentifier<AccessPolicy>[],\n options: FileSystemSetAccessPolicyOptions = {},\n ): Promise<FileSystemSetAccessPolicyResponse> {\n return tracingClient.withSpan(\n \"DataLakeFileSystemClient-setAccessPolicy\",\n options,\n async (updatedOptions) => {\n return this.blobContainerClient.setAccessPolicy(\n toContainerPublicAccessType(access),\n fileSystemAcl,\n {\n ...options,\n tracingOptions: updatedOptions.tracingOptions,\n },\n );\n },\n );\n }\n\n /**\n * Returns an async iterable iterator to list all the paths (directories and files)\n * under the specified file system.\n *\n * .byPage() returns an async iterable iterator to list the paths in pages.\n *\n * Example using `for await` syntax:\n *\n * ```js\n * // Get the fileSystemClient before you run these snippets,\n * // Can be obtained from `serviceClient.getFileSystemClient(\"<your-filesystem-name>\");`\n * let i = 1;\n * for await (const path of fileSystemClient.listPaths()) {\n * console.log(`Path ${i++}: ${path.name}, isDirectory?: ${path.isDirectory}`);\n * }\n * ```\n *\n * Example using `iter.next()`:\n *\n * ```js\n * let i = 1;\n * let iter = fileSystemClient.listPaths();\n * let pathItem = await iter.next();\n * while (!pathItem.done) {\n * console.log(`Path ${i++}: ${pathItem.value.name}, isDirectory?: ${pathItem.value.isDirectory}`);\n * pathItem = await iter.next();\n * }\n * ```\n *\n * Example using `byPage()`:\n *\n * ```js\n * // passing optional maxPageSize in the page settings\n * let i = 1;\n * for await (const response of fileSystemClient.listPaths().byPage({ maxPageSize: 20 })) {\n * for (const path of response.pathItems) {\n * console.log(`Path ${i++}: ${path.name}, isDirectory?: ${path.isDirectory}`);\n * }\n * }\n * ```\n *\n * Example using paging with a marker:\n *\n * ```js\n * let i = 1;\n * let iterator = fileSystemClient.listPaths().byPage({ maxPageSize: 2 });\n * let response = (await iterator.next()).value;\n *\n * // Prints 2 path names\n * for (const path of response.pathItems) {\n * console.log(`Path ${i++}: ${path.name}, isDirectory?: ${path.isDirectory}`);\n * }\n *\n * // Gets next marker\n * let marker = response.continuationToken;\n *\n * // Passing next marker as continuationToken\n *\n * iterator = fileSystemClient.listPaths().byPage({ continuationToken: marker, maxPageSize: 10 });\n * response = (await iterator.next()).value;\n *\n * // Prints 10 path names\n * for (const path of response.pathItems) {\n * console.log(`Path ${i++}: ${path.name}, isDirectory?: ${path.isDirectory}`);\n * }\n * ```\n *\n * @see https://learn.microsoft.com/rest/api/storageservices/list-blobs\n *\n * @param options - Optional. Options when listing paths.\n */\n public listPaths(\n options: ListPathsOptions = {},\n ): PagedAsyncIterableIterator<Path, FileSystemListPathsResponse> {\n options.path = options.path === \"\" ? undefined : options.path;\n\n const iter = this.listItems(options);\n return {\n next() {\n return iter.next();\n },\n [Symbol.asyncIterator]() {\n return this;\n },\n byPage: (settings: PageSettings = {}) => {\n return this.listSegments(settings.continuationToken, {\n maxResults: settings.maxPageSize,\n ...options,\n });\n },\n };\n }\n\n private async *listItems(options: ListPathsSegmentOptions = {}): AsyncIterableIterator<Path> {\n for await (const response of this.listSegments(undefined, options)) {\n yield* response.pathItems || [];\n }\n }\n\n private async *listSegments(\n continuation?: string,\n options: ListPathsSegmentOptions = {},\n ): AsyncIterableIterator<FileSystemListPathsResponse> {\n let response;\n if (!!continuation || continuation === undefined) {\n do {\n response = await this.listPathsSegment(continuation, options);\n continuation = response.continuation;\n yield response;\n } while (continuation);\n }\n }\n\n private async listPathsSegment(\n continuation?: string,\n options: ListPathsSegmentOptions = {},\n ): Promise<FileSystemListPathsResponse> {\n return tracingClient.withSpan(\n \"DataLakeFileSystemClient-listPathsSegment\",\n options,\n async (updatedOptions) => {\n const rawResponse = await this.fileSystemContext.listPaths(options.recursive || false, {\n continuation,\n ...updatedOptions,\n upn: options.userPrincipalName,\n });\n\n const response = rawResponse as FileSystemListPathsResponse;\n response.pathItems = [];\n for (const path of rawResponse.paths || []) {\n response.pathItems.push({\n ...path,\n permissions: toPermissions(path.permissions),\n createdOn: windowsFileTimeTicksToTime(path.creationTime),\n expiresOn: windowsFileTimeTicksToTime(path.expiryTime),\n });\n }\n delete rawResponse.paths;\n\n return response;\n },\n );\n }\n\n /**\n * Returns an async iterable iterator to list all the paths (directories and files)\n * under the specified file system.\n *\n * .byPage() returns an async iterable iterator to list the paths in pages.\n *\n * Example using `for await` syntax:\n *\n * ```js\n * // Get the fileSystemClient before you run these snippets,\n * // Can be obtained from `serviceClient.getFileSystemClient(\"<your-filesystem-name>\");`\n * let i = 1;\n * for await (const deletePath of fileSystemClient.listDeletedPaths()) {\n * console.log(`Path ${i++}: ${deletePath.name}`);\n * }\n * ```\n *\n * Example using `iter.next()`:\n *\n * ```js\n * let i = 1;\n * let iter = fileSystemClient.listDeletedPaths();\n * let deletedPathItem = await iter.next();\n * while (!deletedPathItem.done) {\n * console.log(`Path ${i++}: ${deletedPathItem.value.name}`);\n * pathItem = await iter.next();\n * }\n * ```\n *\n * Example using `byPage()`:\n *\n * ```js\n * // passing optional maxPageSize in the page settings\n * let i = 1;\n * for await (const response of fileSystemClient.listDeletedPaths().byPage({ maxPageSize: 20 })) {\n * for (const deletePath of response.pathItems) {\n * console.log(`Path ${i++}: ${deletePath.name}`);\n * }\n * }\n * ```\n *\n * Example using paging with a marker:\n *\n * ```js\n * let i = 1;\n * let iterator = fileSystemClient.listDeletedPaths().byPage({ maxPageSize: 2 });\n * let response = (await iterator.next()).value;\n *\n * // Prints 2 path names\n * for (const path of response.pathItems) {\n * console.log(`Path ${i++}: ${path.name}}`);\n * }\n *\n * // Gets next marker\n * let marker = response.continuationToken;\n *\n * // Passing next marker as continuationToken\n *\n * iterator = fileSystemClient.listDeletedPaths().byPage({ continuationToken: marker, maxPageSize: 10 });\n * response = (await iterator.next()).value;\n *\n * // Prints 10 path names\n * for (const deletePath of response.deletedPathItems) {\n * console.log(`Path ${i++}: ${deletePath.name}`);\n * }\n * ```\n *\n * @see https://learn.microsoft.com/rest/api/storageservices/list-blobs\n *\n * @param options - Optional. Options when listing deleted paths.\n */\n public listDeletedPaths(\n options: ListDeletedPathsOptions = {},\n ): PagedAsyncIterableIterator<DeletedPath, FileSystemListDeletedPathsResponse> {\n const iter = this.listDeletedItems(options);\n return {\n next() {\n return iter.next();\n },\n [Symbol.asyncIterator]() {\n return this;\n },\n byPage: (settings: PageSettings = {}) => {\n return this.listDeletedSegments(settings.continuationToken, {\n maxResults: settings.maxPageSize,\n ...options,\n });\n },\n };\n }\n private async *listDeletedItems(\n options: ListDeletedPathsOptions = {},\n ): AsyncIterableIterator<DeletedPath> {\n for await (const response of this.listDeletedSegments(undefined, options)) {\n yield* response.pathItems || [];\n }\n }\n\n private async *listDeletedSegments(\n continuation?: string,\n options: ListDeletedPathsSegmentOptions = {},\n ): AsyncIterableIterator<FileSystemListDeletedPathsResponse> {\n let response;\n if (!!continuation || continuation === undefined) {\n do {\n response = await this.listDeletedPathsSegment(continuation, options);\n continuation = response.continuation;\n yield response;\n } while (continuation);\n }\n }\n\n private async listDeletedPathsSegment(\n continuation?: string,\n options: ListDeletedPathsSegmentOptions = {},\n ): Promise<FileSystemListDeletedPathsResponse> {\n return tracingClient.withSpan(\n \"DataLakeFileSystemClient-listDeletedPathsSegment\",\n options,\n async (updatedOptions) => {\n const rawResponse = await this.fileSystemContextToBlobEndpoint.listBlobHierarchySegment({\n marker: continuation,\n ...updatedOptions,\n prefix: options.prefix === \"\" ? undefined : options.prefix,\n });\n\n const response = rawResponse as FileSystemListDeletedPathsResponse;\n response.pathItems = [];\n for (const path of rawResponse.segment.blobItems || []) {\n response.pathItems.push({\n name: path.name,\n deletionId: path.deletionId,\n deletedOn: path.properties.deletedTime,\n remainingRetentionDays: path.properties.remainingRetentionDays,\n });\n }\n\n if (response.nextMarker) {\n response.continuation = response.nextMarker;\n }\n\n return response;\n },\n );\n }\n\n /**\n * Restores a soft deleted path.\n *\n * @see https://learn.microsoft.com/en-us/rest/api/storageservices/undelete-blob\n *\n * @param deletedPath - Required. The path of the deleted path.\n *\n * @param deletionId - Required. The deletion ID associated with the soft deleted path.\n *\n */\n\n public async undeletePath(\n deletedPath: string,\n deletionId: string,\n options: FileSystemUndeletePathOption = {},\n ): Promise<FileSystemUndeletePathResponse> {\n return tracingClient.withSpan(\n \"DataLakeFileSystemClient-undeletePath\",\n options,\n async (updatedOptions) => {\n const pathClient = new PathClientInternal(\n appendToURLPath(this.blobEndpointUrl, EscapePath(deletedPath)),\n this.pipeline,\n );\n\n const rawResponse = assertResponse<PathUndeleteHeaders, PathUndeleteHeaders>(\n await pathClient.blobPathContext.undelete({\n undeleteSource: \"?\" + DeletionIdKey + \"=\" + deletionId,\n ...options,\n tracingOptions: updatedOptions.tracingOptions,\n }),\n );\n\n if (rawResponse.resourceType === PathResultTypeConstants.DirectoryResourceType) {\n return {\n pathClient: this.getDirectoryClient(deletedPath),\n ...rawResponse,\n };\n } else {\n return {\n pathClient: this.getFileClient(deletedPath),\n ...rawResponse,\n };\n }\n },\n );\n }\n\n /**\n * Only available for DataLakeFileSystemClient constructed with a shared key credential.\n *\n * Generates a Service Shared Access Signature (SAS) URI based on the client properties\n * and parameters passed in. The SAS is signed by the shared key credential of the client.\n *\n * @see https://learn.microsoft.com/en-us/rest/api/storageservices/constructing-a-service-sas\n *\n * @param options - Optional parameters.\n * @returns The SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token.\n */\n public generateSasUrl(options: FileSystemGenerateSasUrlOptions): Promise<string> {\n return new Promise((resolve) => {\n if (!(this.credential instanceof StorageSharedKeyCredential)) {\n throw RangeError(\n \"Can only generate the SAS when the client is initialized with a shared key credential\",\n );\n }\n\n const sas = generateDataLakeSASQueryParameters(\n {\n fileSystemName: this.name,\n ...options,\n },\n this.credential,\n ).toString();\n\n resolve(appendToURLQuery(this.url, sas));\n });\n }\n\n /**\n * Only available for DataLakeFileSystemClient constructed with a shared key credential.\n *\n * Generates string to sign for a Service Shared Access Signature (SAS) URI based on the client properties\n * and parameters passed in. The SAS is signed by the shared key credential of the client.\n *\n * @see https://learn.microsoft.com/en-us/rest/api/storageservices/constructing-a-service-sas\n *\n * @param options - Optional parameters.\n * @returns The SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token.\n */\n /* eslint-disable-next-line @azure/azure-sdk/ts-naming-options*/\n public generateSasStringToSign(options: FileSystemGenerateSasUrlOptions): string {\n if (!(this.credential instanceof StorageSharedKeyCredential)) {\n throw RangeError(\n \"Can only generate the SAS when the client is initialized with a shared key credential\",\n );\n }\n\n return generateDataLakeSASQueryParametersInternal(\n {\n fileSystemName: this.name,\n ...options,\n },\n this.credential,\n ).stringToSign;\n }\n\n /**\n * Generates a Service Shared Access Signature (SAS) URI based on the client properties\n * and parameters passed in. The SAS is signed by the input user delegation key.\n *\n * @see https://learn.microsoft.com/en-us/rest/api/storageservices/constructing-a-service-sas\n *\n * @param options - Optional parameters.\n * @param userDelegationKey - Return value of `blobServiceClient.getUserDelegationKey()`\n * @returns The SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token.\n */\n public generateUserDelegationSasUrl(\n options: FileSystemGenerateSasUrlOptions,\n userDelegationKey: UserDelegationKey,\n ): Promise<string> {\n return new Promise((resolve) => {\n const sas = generateDataLakeSASQueryParameters(\n {\n fileSystemName: this.name,\n ...options,\n },\n userDelegationKey,\n this.accountName,\n ).toString();\n\n resolve(appendToURLQuery(this.url, sas));\n });\n }\n\n /**\n * Generates string to sign for a Service Shared Access Signature (SAS) URI based on the client properties\n * and parameters passed in. The SAS is signed by the input user delegation key.\n *\n * @see https://learn.microsoft.com/en-us/rest/api/storageservices/constructing-a-service-sas\n *\n * @param options - Optional parameters.\n * @param userDelegationKey - Return value of `blobServiceClient.getUserDelegationKey()`\n * @returns The SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token.\n */\n\n public generateUserDelegationSasStringToSign(\n options: FileSystemGenerateSasUrlOptions,\n userDelegationKey: UserDelegationKey,\n ): string {\n return generateDataLakeSASQueryParametersInternal(\n {\n fileSystemName: this.name,\n ...options,\n },\n userDelegationKey,\n this.accountName,\n ).stringToSign;\n }\n}\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"DataLakeLeaseClient.js","sourceRoot":"","sources":["../../../src/DataLakeLeaseClient.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAEhD,MAAM,OAAO,mBAAmB;IAC9B,IAAW,OAAO;QAChB,OAAO,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC;IAC7B,CAAC;IAED,IAAW,GAAG;QACZ,OAAO,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC;IACzB,CAAC;IAED,YAA6B,MAAuB;QAAvB,WAAM,GAAN,MAAM,CAAiB;IAAG,CAAC;IAEjD,KAAK,CAAC,YAAY,CACvB,QAAgB,EAChB,UAAiC,EAAE;QAEnC,OAAO,CAAC,UAAU,GAAG,OAAO,CAAC,UAAU,IAAI,EAAE,CAAC;QAC9C,OAAO,aAAa,CAAC,QAAQ,CAC3B,kCAAkC,EAClC,OAAO,EACP,KAAK,EAAE,cAAc,EAAE,EAAE;YACvB,OAAO,IAAI,CAAC,MAAM,CAAC,YAAY,CAAC,QAAQ,EAAE,cAAc,CAAC,CAAC;QAC5D,CAAC,CACF,CAAC;IACJ,CAAC;IAEM,KAAK,CAAC,WAAW,CACtB,eAAuB,EACvB,UAAiC,EAAE;QAEnC,OAAO,CAAC,UAAU,GAAG,OAAO,CAAC,UAAU,IAAI,EAAE,CAAC;QAC9C,OAAO,aAAa,CAAC,QAAQ,CAC3B,iCAAiC,EACjC,OAAO,EACP,KAAK,EAAE,cAAc,EAAE,EAAE;YACvB,OAAO,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,eAAe,EAAE,cAAc,CAAC,CAAC;QAClE,CAAC,CACF,CAAC;IACJ,CAAC;IAEM,KAAK,CAAC,YAAY,CAAC,UAAiC,EAAE;QAC3D,OAAO,CAAC,UAAU,GAAG,OAAO,CAAC,UAAU,IAAI,EAAE,CAAC;QAC9C,OAAO,aAAa,CAAC,QAAQ,CAC3B,kCAAkC,EAClC,OAAO,EACP,KAAK,EAAE,cAAc,EAAE,EAAE;YACvB,OAAO,IAAI,CAAC,MAAM,CAAC,YAAY,CAAC,cAAc,CAAC,CAAC;QAClD,CAAC,CACF,CAAC;IACJ,CAAC;IAEM,KAAK,CAAC,UAAU,CAAC,UAAiC,EAAE;QACzD,OAAO,CAAC,UAAU,GAAG,OAAO,CAAC,UAAU,IAAI,EAAE,CAAC;QAC9C,OAAO,aAAa,CAAC,QAAQ,CAC3B,gCAAgC,EAChC,OAAO,EACP,KAAK,EAAE,cAAc,EAAE,EAAE;YACvB,OAAO,IAAI,CAAC,MAAM,CAAC,UAAU,CAAC,cAAc,CAAC,CAAC;QAChD,CAAC,CACF,CAAC;IACJ,CAAC;IAEM,KAAK,CAAC,UAAU,CACrB,WAAmB,EACnB,UAAiC,EAAE;QAEnC,OAAO,CAAC,UAAU,GAAG,OAAO,CAAC,UAAU,IAAI,EAAE,CAAC;QAC9C,OAAO,aAAa,CAAC,QAAQ,CAC3B,gCAAgC,EAChC,OAAO,EACP,KAAK,EAAE,cAAc,EAAE,EAAE;YACvB,OAAO,IAAI,CAAC,MAAM,CAAC,UAAU,CAAC,WAAW,EAAE,cAAc,CAAC,CAAC;QAC7D,CAAC,CACF,CAAC;IACJ,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\nimport type { BlobLeaseClient } from \"@azure/storage-blob\";\n\nimport type { Lease, LeaseOperationOptions, LeaseOperationResponse } from \"./models\";\nimport { tracingClient } from \"./utils/tracing\";\n\nexport class DataLakeLeaseClient {\n public get leaseId(): string {\n return this.client.leaseId;\n }\n\n public get url(): string {\n return this.client.url;\n }\n\n constructor(private readonly client: BlobLeaseClient) {}\n\n public async acquireLease(\n duration: number,\n options: LeaseOperationOptions = {},\n ): Promise<LeaseOperationResponse> {\n options.conditions = options.conditions || {};\n return tracingClient.withSpan(\n \"DataLakeLeaseClient-acquireLease\",\n options,\n async (updatedOptions) => {\n return this.client.acquireLease(duration, updatedOptions);\n },\n );\n }\n\n public async changeLease(\n proposedLeaseId: string,\n options: LeaseOperationOptions = {},\n ): Promise<LeaseOperationResponse> {\n options.conditions = options.conditions || {};\n return tracingClient.withSpan(\n \"DataLakeLeaseClient-changeLease\",\n options,\n async (updatedOptions) => {\n return this.client.changeLease(proposedLeaseId, updatedOptions);\n },\n );\n }\n\n public async releaseLease(options: LeaseOperationOptions = {}): Promise<LeaseOperationResponse> {\n options.conditions = options.conditions || {};\n return tracingClient.withSpan(\n \"DataLakeLeaseClient-releaseLease\",\n options,\n async (updatedOptions) => {\n return this.client.releaseLease(updatedOptions);\n },\n );\n }\n\n public async renewLease(options: LeaseOperationOptions = {}): Promise<Lease> {\n options.conditions = options.conditions || {};\n return tracingClient.withSpan(\n \"DataLakeLeaseClient-renewLease\",\n options,\n async (updatedOptions) => {\n return this.client.renewLease(updatedOptions);\n },\n );\n }\n\n public async breakLease(\n breakPeriod: number,\n options: LeaseOperationOptions = {},\n ): Promise<LeaseOperationResponse> {\n options.conditions = options.conditions || {};\n return tracingClient.withSpan(\n \"DataLakeLeaseClient-renewLease\",\n options,\n async (updatedOptions) => {\n return this.client.breakLease(breakPeriod, updatedOptions);\n },\n );\n }\n}\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"DataLakeServiceClient.js","sourceRoot":"","sources":["../../../src/DataLakeServiceClient.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAIlC,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AACpE,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAM1C,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAExD,OAAO,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AACzD,OAAO,EAAE,mBAAmB,EAAE,MAAM,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E,cAAc,CAAC,cAAc;aAC9C,CAAC,CAAC;QACL,CAAC,CACF,CAAC;IACJ,CAAC;IAED;;;;;;;;OAQG;IACI,KAAK,CAAC,aAAa,CACxB,UAAqC,EACrC,UAAuC,EAAE;QAEzC,OAAO,aAAa,CAAC,QAAQ,CAC3B,qCAAqC,EACrC,OAAO,EACP,KAAK,EAAE,cAAc,EAAE,EAAE;YACvB,OAAO,IAAI,CAAC,iBAAiB,CAAC,aAAa,CAAC,UAAU,EAAE;gBACtD,WAAW,EAAE,OAAO,CAAC,WAAW;gBAChC,cAAc,EAAE,cAAc,CAAC,cAAc;aAC9C,CAAC,CAAC;QACL,CAAC,CACF,CAAC;IACJ,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { TokenCredential } from \"@azure/core-auth\";\nimport type { PagedAsyncIterableIterator } from \"@azure/core-paging\";\nimport { getDefaultProxySettings } from \"@azure/core-rest-pipeline\";\nimport { isNode } from \"@azure/core-util\";\nimport type {\n ServiceGetPropertiesOptions,\n ServiceSetPropertiesOptions,\n ServiceSetPropertiesResponse,\n} from \"@azure/storage-blob\";\nimport { BlobServiceClient } from \"@azure/storage-blob\";\nimport type { Pipeline, StoragePipelineOptions } from \"./Pipeline\";\nimport { isPipelineLike, newPipeline } from \"./Pipeline\";\nimport { AnonymousCredential } from \"@azure/storage-blob\";\nimport { StorageSharedKeyCredential } from \"./credentials/StorageSharedKeyCredential\";\n\nimport { DataLakeFileSystemClient } from \"./DataLakeFileSystemClient\";\nimport type {\n FileSystemItem,\n FileSystemRenameResponse,\n ServiceGenerateAccountSasUrlOptions,\n ServiceListFileSystemsOptions,\n ServiceListFileSystemsSegmentResponse,\n ServiceRenameFileSystemOptions,\n ServiceUndeleteFileSystemOptions,\n FileSystemUndeleteResponse,\n} from \"./models\";\nimport { StorageClient } from \"./StorageClient\";\nimport {\n appendToURLPath,\n appendToURLQuery,\n extractConnectionStringParts,\n} from \"./utils/utils.common\";\nimport { toDfsEndpointUrl, toFileSystemPagedAsyncIterableIterator } from \"./transforms\";\nimport type {\n ServiceGetUserDelegationKeyOptions,\n ServiceGetUserDelegationKeyResponse,\n} from \"./models\";\nimport { tracingClient } from \"./utils/tracing\";\nimport { AccountSASPermissions } from \"./sas/AccountSASPermissions\";\nimport {\n generateAccountSASQueryParameters,\n generateAccountSASQueryParametersInternal,\n} from \"./sas/AccountSASSignatureValues\";\nimport { AccountSASServices } from \"./sas/AccountSASServices\";\nimport type { DataLakeServiceGetPropertiesResponse, DataLakeServiceProperties } from \"./index\";\n\n/**\n * DataLakeServiceClient allows you to manipulate Azure\n * Data Lake service resources and file systems. The storage account provides\n * the top-level namespace for the Data Lake service.\n */\nexport class DataLakeServiceClient extends StorageClient {\n // private serviceContext: Service;\n\n /**\n * blobServiceClient provided by `@azure/storage-blob` package.\n */\n private blobServiceClient: BlobServiceClient;\n\n /**\n *\n * Creates an instance of DataLakeServiceClient from connection string.\n *\n * @param connectionString - Account connection string or a SAS connection string of an Azure storage account.\n * [ Note - Account connection string can only be used in NODE.JS runtime. ]\n * Account connection string example -\n * `DefaultEndpointsProtocol=https;AccountName=myaccount;AccountKey=accountKey;EndpointSuffix=core.windows.net`\n * SAS connection string example -\n * `BlobEndpoint=https://myaccount.blob.core.windows.net/;QueueEndpoint=https://myaccount.queue.core.windows.net/;FileEndpoint=https://myaccount.file.core.windows.net/;TableEndpoint=https://myaccount.table.core.windows.net/;SharedAccessSignature=sasString`\n * @param options - Optional. Options to configure the HTTP pipeline.\n */\n // Legacy, no way to fix the eslint error without breaking. Disable the rule for this line.\n\n public static fromConnectionString(\n connectionString: string,\n // Legacy, no way to fix the eslint error without breaking. Disable the rule for this line.\n /* eslint-disable-next-line @azure/azure-sdk/ts-naming-options */\n options?: StoragePipelineOptions,\n ): DataLakeServiceClient {\n options = options || {};\n const extractedCreds = extractConnectionStringParts(connectionString);\n if (extractedCreds.kind === \"AccountConnString\") {\n if (isNode) {\n const sharedKeyCredential = new StorageSharedKeyCredential(\n extractedCreds.accountName!,\n extractedCreds.accountKey,\n );\n if (!options.proxyOptions) {\n options.proxyOptions = getDefaultProxySettings(extractedCreds.proxyUri);\n }\n const pipeline = newPipeline(sharedKeyCredential, options);\n return new DataLakeServiceClient(toDfsEndpointUrl(extractedCreds.url), pipeline);\n } else {\n throw new Error(\"Account connection string is only supported in Node.js environment\");\n }\n } else if (extractedCreds.kind === \"SASConnString\") {\n const pipeline = newPipeline(new AnonymousCredential(), options);\n return new DataLakeServiceClient(\n toDfsEndpointUrl(extractedCreds.url) + \"?\" + extractedCreds.accountSas,\n pipeline,\n );\n } else {\n throw new Error(\n \"Connection string must be either an Account connection string or a SAS connection string\",\n );\n }\n }\n\n /**\n * Creates an instance of DataLakeServiceClient from url.\n *\n * @param url - A Client string pointing to Azure Storage data lake service, such as\n * \"https://myaccount.dfs.core.windows.net\". You can append a SAS\n * if using AnonymousCredential, such as \"https://myaccount.dfs.core.windows.net?sasString\".\n * @param credential - Such as AnonymousCredential, StorageSharedKeyCredential or any credential from the `@azure/identity` package to authenticate requests to the service. You can also provide an object that implements the TokenCredential interface. If not specified, AnonymousCredential is used.\n * @param options - Optional. Options to configure the HTTP pipeline.\n */\n public constructor(\n url: string,\n credential?: StorageSharedKeyCredential | AnonymousCredential | TokenCredential,\n // Legacy, no way to fix the eslint error without breaking. Disable the rule for this line.\n /* eslint-disable-next-line @azure/azure-sdk/ts-naming-options */\n options?: StoragePipelineOptions,\n );\n\n /**\n * Creates an instance of DataLakeServiceClient from url and pipeline.\n *\n * @param url - A Client string pointing to Azure Storage data lake service, such as\n * \"https://myaccount.dfs.core.windows.net\". You can append a SAS\n * if using AnonymousCredential, such as \"https://myaccount.dfs.core.windows.net?sasString\".\n * @param pipeline - Call newPipeline() to create a default\n * pipeline, or provide a customized pipeline.\n */\n public constructor(url: string, pipeline: Pipeline);\n\n public constructor(\n url: string,\n credentialOrPipeline?:\n | StorageSharedKeyCredential\n | AnonymousCredential\n | TokenCredential\n | Pipeline,\n // Legacy, no way to fix the eslint error without breaking. Disable the rule for this line.\n /* eslint-disable-next-line @azure/azure-sdk/ts-naming-options */\n options?: StoragePipelineOptions,\n ) {\n if (isPipelineLike(credentialOrPipeline)) {\n super(url, credentialOrPipeline);\n } else {\n let credential;\n if (credentialOrPipeline === undefined) {\n credential = new AnonymousCredential();\n } else {\n credential = credentialOrPipeline;\n }\n\n const pipeline = newPipeline(credential, options);\n super(url, pipeline);\n }\n\n // this.serviceContext = new Service(this.storageClientContext);\n this.blobServiceClient = new BlobServiceClient(this.blobEndpointUrl, this.pipeline);\n }\n\n /**\n * Creates a {@link DataLakeFileSystemClient} object.\n *\n * @param fileSystemName - File system name.\n */\n // Legacy, no way to fix the eslint error without breaking. Disable the rule for this line.\n /* eslint-disable-next-line @azure/azure-sdk/ts-naming-subclients */\n public getFileSystemClient(fileSystemName: string): DataLakeFileSystemClient {\n return new DataLakeFileSystemClient(\n appendToURLPath(this.url, encodeURIComponent(fileSystemName)),\n this.pipeline,\n );\n }\n\n /**\n * ONLY AVAILABLE WHEN USING BEARER TOKEN AUTHENTICATION (TokenCredential).\n *\n * Retrieves a user delegation key for the Data Lake service. This is only a valid operation when using\n * bearer token authentication.\n *\n * @example\n * ```js\n * // Generate user delegation SAS for a file system\n * const userDelegationKey = await dataLakeServiceClient.getUserDelegationKey(startsOn, expiresOn);\n * const fileSystemSAS = generateDataLakeSASQueryParameters({\n * fileSystemName, // Required\n * permissions: FileSystemSASPermissions.parse(\"racwdl\"), // Required\n * startsOn, // Required. Date type\n * expiresOn, // Optional. Date type\n * ipRange: { start: \"0.0.0.0\", end: \"255.255.255.255\" }, // Optional\n * protocol: SASProtocol.HttpsAndHttp, // Optional\n * version: \"2018-11-09\" // Must greater than or equal to 2018-11-09 to generate user delegation SAS\n * },\n * userDelegationKey, // UserDelegationKey\n * accountName\n * ).toString();\n * ```\n * @see https://learn.microsoft.com/en-us/rest/api/storageservices/get-user-delegation-key\n *\n * @param startsOn - The start time for the user delegation SAS. Must be within 7 days of the current time.\n * @param expiresOn - The end time for the user delegation SAS. Must be within 7 days of the current time.\n * @param options -\n */\n public async getUserDelegationKey(\n startsOn: Date,\n expiresOn: Date,\n options: ServiceGetUserDelegationKeyOptions = {},\n ): Promise<ServiceGetUserDelegationKeyResponse> {\n return tracingClient.withSpan(\n \"DataLakeServiceClient-getUserDelegationKey\",\n options,\n async (updatedOptions) => {\n return this.blobServiceClient.getUserDelegationKey(startsOn, expiresOn, updatedOptions);\n },\n );\n }\n\n /**\n * Returns an async iterable iterator to list all the file systems\n * under the specified account.\n *\n * .byPage() returns an async iterable iterator to list the file systems in pages.\n *\n * Example using `for await` syntax:\n *\n * ```js\n * let i = 1;\n * for await (const fileSystem of serviceClient.listFileSystems()) {\n * console.log(`FileSystem ${i++}: ${fileSystem.name}`);\n * }\n * ```\n *\n * Example using `iter.next()`:\n *\n * ```js\n * let i = 1;\n * const iter = serviceClient.listFileSystems();\n * let fileSystemItem = await iter.next();\n * while (!fileSystemItem.done) {\n * console.log(`FileSystem ${i++}: ${fileSystemItem.value.name}`);\n * fileSystemItem = await iter.next();\n * }\n * ```\n *\n * Example using `byPage()`:\n *\n * ```js\n * // passing optional maxPageSize in the page settings\n * let i = 1;\n * for await (const response of serviceClient.listFileSystems().byPage({ maxPageSize: 20 })) {\n * if (response.fileSystemItems) {\n * for (const fileSystem of response.fileSystemItems) {\n * console.log(`FileSystem ${i++}: ${fileSystem.name}`);\n * }\n * }\n * }\n * ```\n *\n * Example using paging with a marker:\n *\n * ```js\n * let i = 1;\n * let iterator = serviceClient.listFileSystems().byPage({ maxPageSize: 2 });\n * let response = (await iterator.next()).value;\n *\n * // Prints 2 file system names\n * if (response.fileSystemItems) {\n * for (const fileSystem of response.fileSystemItems) {\n * console.log(`FileSystem ${i++}: ${fileSystem.name}`);\n * }\n * }\n *\n * // Gets next marker\n * let marker = response.continuationToken;\n * // Passing next marker as continuationToken\n * iterator = serviceClient\n * .listContainers()\n * .byPage({ continuationToken: marker, maxPageSize: 10 });\n * response = (await iterator.next()).value;\n *\n * // Prints 10 file system names\n * if (response.fileSystemItems) {\n * for (const fileSystem of response.fileSystemItems) {\n * console.log(`FileSystem ${i++}: ${fileSystem.name}`);\n * }\n * }\n * ```\n *\n * @see https://learn.microsoft.com/en-us/rest/api/storageservices/list-containers2\n *\n * @param options -\n */\n public listFileSystems(\n options: ServiceListFileSystemsOptions = {},\n ): PagedAsyncIterableIterator<FileSystemItem, ServiceListFileSystemsSegmentResponse> {\n return toFileSystemPagedAsyncIterableIterator(this.blobServiceClient.listContainers(options));\n }\n\n // public async createFileSystem(): Promise<DataLakeFileSystemClient> {\n // throw Error(\"NotImplemented\");\n // }\n\n // public async deleteFileSystem(fileSystem: string): Promise<ServiceDeleteFileSystemResponse> {\n // throw Error(\"NotImplemented\");\n // }\n\n /**\n * Only available for DataLakeServiceClient constructed with a shared key credential.\n *\n * Generates an account Shared Access Signature (SAS) URI based on the client properties\n * and parameters passed in. The SAS is signed by the shared key credential of the client.\n *\n * @see https://learn.microsoft.com/en-us/rest/api/storageservices/create-account-sas\n *\n * @param expiresOn - Optional. The time at which the shared access signature becomes invalid. Default to an hour later if not specified.\n * @param permissions - Specifies the list of permissions to be associated with the SAS.\n * @param resourceTypes - Specifies the resource types associated with the shared access signature.\n * @param options - Optional parameters.\n * @returns An account SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token.\n */\n public generateAccountSasUrl(\n expiresOn?: Date,\n permissions: AccountSASPermissions = AccountSASPermissions.parse(\"r\"),\n resourceTypes: string = \"sco\",\n options: ServiceGenerateAccountSasUrlOptions = {},\n ): string {\n if (!(this.credential instanceof StorageSharedKeyCredential)) {\n throw RangeError(\n \"Can only generate the account SAS when the client is initialized with a shared key credential\",\n );\n }\n\n if (expiresOn === undefined) {\n const now = new Date();\n expiresOn = new Date(now.getTime() + 3600 * 1000);\n }\n\n const sas = generateAccountSASQueryParameters(\n {\n permissions,\n expiresOn,\n resourceTypes,\n services: AccountSASServices.parse(\"b\").toString(),\n ...options,\n },\n this.credential,\n ).toString();\n\n return appendToURLQuery(this.url, sas);\n }\n\n /**\n * Only available for DataLakeServiceClient constructed with a shared key credential.\n *\n * Generates string to sign for an account Shared Access Signature (SAS) based on the client properties\n * and parameters passed in. The SAS is signed by the shared key credential of the client.\n *\n * @see https://learn.microsoft.com/en-us/rest/api/storageservices/create-account-sas\n *\n * @param expiresOn - Optional. The time at which the shared access signature becomes invalid. Default to an hour later if not specified.\n * @param permissions - Specifies the list of permissions to be associated with the SAS.\n * @param resourceTypes - Specifies the resource types associated with the shared access signature.\n * @param options - Optional parameters.\n * @returns An account SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token.\n */\n public generateSasStringToSign(\n expiresOn?: Date,\n permissions: AccountSASPermissions = AccountSASPermissions.parse(\"r\"),\n resourceTypes: string = \"sco\",\n options: ServiceGenerateAccountSasUrlOptions = {},\n ): string {\n if (!(this.credential instanceof StorageSharedKeyCredential)) {\n throw RangeError(\n \"Can only generate the account SAS when the client is initialized with a shared key credential\",\n );\n }\n\n if (expiresOn === undefined) {\n const now = new Date();\n expiresOn = new Date(now.getTime() + 3600 * 1000);\n }\n\n return generateAccountSASQueryParametersInternal(\n {\n permissions,\n expiresOn,\n resourceTypes,\n services: AccountSASServices.parse(\"b\").toString(),\n ...options,\n },\n this.credential,\n ).stringToSign;\n }\n\n /**\n * Renames an existing File System.\n *\n * @param sourceFileSystemName - The name of the source File System.\n * @param destinationContainerName - The new name of the File System.\n * @param options - Options to configure File System Rename operation.\n */\n /* eslint-disable-next-line @typescript-eslint/ban-ts-comment */\n // @ts-ignore Need to hide this interface for now. Make it public and turn on the live tests for it when the service is ready.\n private async renameFileSystem(\n sourceFileSystemName: string,\n destinationFileSystemName: string,\n options: ServiceRenameFileSystemOptions = {},\n ): Promise<{\n fileSystemClient: DataLakeFileSystemClient;\n fileSystemRenameResponse: FileSystemRenameResponse;\n }> {\n return tracingClient.withSpan(\n \"DataLakeServiceClient-renameFileSystem\",\n options,\n async (updatedOptions) => {\n const res = await this.blobServiceClient[\"renameContainer\"](\n sourceFileSystemName,\n destinationFileSystemName,\n updatedOptions,\n );\n\n const fileSystemClient = this.getFileSystemClient(destinationFileSystemName);\n return {\n fileSystemClient,\n fileSystemRenameResponse: res.containerRenameResponse,\n };\n },\n );\n }\n\n /**\n * Restore a previously deleted File System.\n * This API is only functional if Container Soft Delete is enabled for the storage account.\n *\n * @param deletedFileSystemName - The name of the source File System.\n * @param deleteFileSystemVersion - The new name of the File System.\n * @param options - Options to configure File System Restore operation.\n */\n public async undeleteFileSystem(\n deletedFileSystemName: string,\n deleteFileSystemVersion: string,\n options: ServiceUndeleteFileSystemOptions = {},\n ): Promise<{\n fileSystemClient: DataLakeFileSystemClient;\n fileSystemUndeleteResponse: FileSystemUndeleteResponse;\n }> {\n return tracingClient.withSpan(\n \"DataLakeServiceClient-undeleteFileSystem\",\n options,\n async (updatedOptions) => {\n const res = await this.blobServiceClient.undeleteContainer(\n deletedFileSystemName,\n deleteFileSystemVersion,\n {\n ...options,\n destinationContainerName: options.destinationFileSystemName,\n tracingOptions: updatedOptions.tracingOptions,\n },\n );\n\n const fileSystemClient = this.getFileSystemClient(\n options.destinationFileSystemName || deletedFileSystemName,\n );\n return {\n fileSystemClient,\n fileSystemUndeleteResponse: res.containerUndeleteResponse,\n };\n },\n );\n }\n\n /**\n * Gets the properties of a storage account’s Blob service endpoint, including properties\n * for Storage Analytics and CORS (Cross-Origin Resource Sharing) rules.\n * @see https://learn.microsoft.com/en-us/rest/api/storageservices/get-blob-service-properties\n *\n * @param options - Options to the Service Get Properties operation.\n * @returns Response data for the Service Get Properties operation.\n */\n public async getProperties(\n options: ServiceGetPropertiesOptions = {},\n ): Promise<DataLakeServiceGetPropertiesResponse> {\n return tracingClient.withSpan(\n \"DataLakeServiceClient-getProperties\",\n options,\n async (updatedOptions) => {\n return this.blobServiceClient.getProperties({\n abortSignal: options.abortSignal,\n tracingOptions: updatedOptions.tracingOptions,\n });\n },\n );\n }\n\n /**\n * Sets properties for a storage account’s Blob service endpoint, including properties\n * for Storage Analytics, CORS (Cross-Origin Resource Sharing) rules and soft delete settings.\n * @see https://learn.microsoft.com/en-us/rest/api/storageservices/set-blob-service-properties\n *\n * @param properties -\n * @param options - Options to the Service Set Properties operation.\n * @returns Response data for the Service Set Properties operation.\n */\n public async setProperties(\n properties: DataLakeServiceProperties,\n options: ServiceSetPropertiesOptions = {},\n ): Promise<ServiceSetPropertiesResponse> {\n return tracingClient.withSpan(\n \"DataLakeServiceClient-setProperties\",\n options,\n async (updatedOptions) => {\n return this.blobServiceClient.setProperties(properties, {\n abortSignal: options.abortSignal,\n tracingOptions: updatedOptions.tracingOptions,\n });\n },\n );\n }\n}\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Pipeline.js","sourceRoot":"","sources":["../../../src/Pipeline.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;;AAOlC,OAAO,EAQL,iBAAiB,EACjB,gCAAgC,GACjC,MAAM,yBAAyB,CAAC;AAQjC,OAAO,EAEL,+BAA+B,EAC/B,4BAA4B,GAC7B,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAE,iCAAiC,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAC7F,OAAO,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAEzD,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAErD,OAAO,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,yBAAyB,EAAE,MAAM,qBAAqB,CAAC;AAChE,OAAO,EAAE,0BAA0B,EAAE,MAAM,0CAA0C,CAAC;AACtF,OAAO,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAC1D,OAAO,EACL,kBAAkB,EAClB,wCAAwC,EACxC,4CAA4C,EAC5C,WAAW,GACZ,MAAM,mBAAmB,CAAC;AAC3B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,MAAM,EAAE,GAAG;aACZ,CAAC;QACJ,CAAC;KACF,CAAC;IACF,MAAM,wBAAwB,GAAyB;QACrD,GAAG,CAAC,SAA+B,EAAE,QAAgB;YACnD,gBAAgB;QAClB,CAAC;QACD,SAAS,CAAC,SAA+B;YACvC,OAAO,KAAK,CAAC;QACf,CAAC;KACF,CAAC;IACF,MAAM,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,cAAc,EAAE,wBAAwB,CAAC,CAAC;IAChF,MAAM,UAAU,GAAG,cAAc,CAAC,WAAW,CAAC,IAAI,CAAC;IACnD,6EAA6E;IAC7E,OAAO,aAAa,CAAC,IAAI,CAAC,CAAC,eAAe,EAAE,EAAE;QAC5C,OAAO,UAAU,CAAC,UAAU,CAAC,eAAe,CAAC,CAAC;IAChD,CAAC,CAAC,CAAC;AACL,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type {\n KeepAliveOptions,\n ExtendedServiceClientOptions,\n HttpPipelineLogLevel,\n} from \"@azure/core-http-compat\";\nimport {\n CompatResponse as HttpOperationResponse,\n RequestPolicy as IHttpClient,\n HttpHeadersLike as HttpHeaders,\n RequestPolicy,\n RequestPolicyFactory,\n RequestPolicyOptionsLike as RequestPolicyOptions,\n WebResourceLike as WebResource,\n convertHttpClient,\n createRequestPolicyFactoryPolicy,\n} from \"@azure/core-http-compat\";\nimport type {\n ProxySettings as ProxyOptions,\n UserAgentPolicyOptions as UserAgentOptions,\n Pipeline as CorePipeline,\n PipelinePolicy,\n HttpClient,\n} from \"@azure/core-rest-pipeline\";\nimport {\n RequestBodyType as HttpRequestBody,\n bearerTokenAuthenticationPolicy,\n decompressResponsePolicyName,\n} from \"@azure/core-rest-pipeline\";\nimport { authorizeRequestOnTenantChallenge, createClientPipeline } from \"@azure/core-client\";\nimport { parseXML, stringifyXML } from \"@azure/core-xml\";\nimport type { TokenCredential } from \"@azure/core-auth\";\nimport { isTokenCredential } from \"@azure/core-auth\";\n\nimport { logger } from \"./log\";\nimport type { StorageRetryOptions } from \"@azure/storage-blob\";\nimport { StorageRetryPolicyFactory } from \"@azure/storage-blob\";\nimport { StorageSharedKeyCredential } from \"./credentials/StorageSharedKeyCredential\";\nimport { AnonymousCredential } from \"@azure/storage-blob\";\nimport {\n StorageOAuthScopes,\n StorageDataLakeLoggingAllowedHeaderNames,\n StorageDataLakeLoggingAllowedQueryParameters,\n SDK_VERSION,\n} from \"./utils/constants\";\nimport { getCachedDefaultHttpClient } from \"../../storage-blob/src/utils/cache\";\nimport { storageBrowserPolicy } from \"../../storage-blob/src/policies/StorageBrowserPolicyV2\";\nimport { storageRetryPolicy } from \"../../storage-blob/src/policies/StorageRetryPolicyV2\";\nimport { storageSharedKeyCredentialPolicy } from \"../../storage-blob/src/policies/StorageSharedKeyCredentialPolicyV2\";\nimport { StorageBrowserPolicyFactory } from \"@azure/storage-blob\";\n\nimport {\n ServiceClientOptions,\n PipelineOptions,\n PipelineLike,\n isPipelineLike,\n Pipeline,\n} from \"@azure/storage-blob\";\nimport { storageCorrectContentLengthPolicy } from \"../../storage-blob/src/policies/StorageCorrectContentLengthPolicy\";\n\n// Export following interfaces and types for customers who want to implement their\n// own RequestPolicy or HTTPClient\nexport {\n StorageOAuthScopes,\n IHttpClient,\n HttpHeaders,\n HttpRequestBody,\n HttpOperationResponse,\n WebResource,\n RequestPolicyFactory,\n RequestPolicy,\n RequestPolicyOptions,\n ServiceClientOptions,\n PipelineOptions,\n PipelineLike,\n Pipeline,\n isPipelineLike,\n};\n\n/**\n * Options interface for the {@link newPipeline} function.\n */\nexport interface StoragePipelineOptions {\n /**\n * Options to configure a proxy for outgoing requests.\n */\n proxyOptions?: ProxyOptions;\n /**\n * Options for adding user agent details to outgoing requests.\n */\n userAgentOptions?: UserAgentOptions;\n /**\n * Configures the built-in retry policy behavior.\n */\n retryOptions?: StorageRetryOptions;\n /**\n * Keep alive configurations. Default keep-alive is enabled.\n */\n keepAliveOptions?: KeepAliveOptions;\n /**\n * Configures the HTTP client to send requests and receive responses.\n */\n httpClient?: IHttpClient;\n /**\n * The audience used to retrieve an AAD token.\n * By default, audience 'https://storage.azure.com/.default' will be used.\n */\n audience?: string;\n}\n\n/**\n * Creates a new Pipeline object with Credential provided.\n *\n * @param credential - Such as AnonymousCredential, StorageSharedKeyCredential or any credential from the `@azure/identity` package to authenticate requests to the service. You can also provide an object that implements the TokenCredential interface. If not specified, AnonymousCredential is used.\n * @param pipelineOptions - Optional. Options.\n * @returns A new Pipeline object.\n */\nexport function newPipeline(\n credential?: StorageSharedKeyCredential | AnonymousCredential | TokenCredential,\n pipelineOptions: StoragePipelineOptions = {},\n): Pipeline {\n if (!credential) {\n credential = new AnonymousCredential();\n }\n const pipeline = new Pipeline([], pipelineOptions);\n (pipeline as any)._credential = credential;\n return pipeline;\n}\n\nfunction processDownlevelPipeline(\n pipeline: PipelineLike,\n): { wrappedPolicies: PipelinePolicy; afterRetry: boolean } | undefined {\n const knownFactoryFunctions = [\n isAnonymousCredential,\n isStorageSharedKeyCredential,\n isCoreHttpBearerTokenFactory,\n isStorageBrowserPolicyFactory,\n isStorageRetryPolicyFactory,\n isStorageTelemetryPolicyFactory,\n isCoreHttpPolicyFactory,\n ];\n if (pipeline.factories.length) {\n const novelFactories = pipeline.factories.filter((factory) => {\n return !knownFactoryFunctions.some((knownFactory) => knownFactory(factory));\n });\n if (novelFactories.length) {\n const hasInjector = novelFactories.some((factory) => isInjectorPolicyFactory(factory));\n // if there are any left over, wrap in a requestPolicyFactoryPolicy\n return {\n wrappedPolicies: createRequestPolicyFactoryPolicy(novelFactories),\n afterRetry: hasInjector,\n };\n }\n }\n return undefined;\n}\n\nexport function getCoreClientOptions(pipeline: PipelineLike): ExtendedServiceClientOptions {\n const { httpClient: v1Client, ...restOptions } = pipeline.options as StoragePipelineOptions;\n\n let httpClient: HttpClient = (pipeline as any)._coreHttpClient;\n if (!httpClient) {\n httpClient = v1Client ? convertHttpClient(v1Client) : getCachedDefaultHttpClient();\n (pipeline as any)._coreHttpClient = httpClient;\n }\n\n let corePipeline: CorePipeline = (pipeline as any)._corePipeline;\n if (!corePipeline) {\n const packageDetails = `azsdk-js-azure-storage-blob/${SDK_VERSION}`;\n const userAgentPrefix =\n restOptions.userAgentOptions && restOptions.userAgentOptions.userAgentPrefix\n ? `${restOptions.userAgentOptions.userAgentPrefix} ${packageDetails}`\n : `${packageDetails}`;\n corePipeline = createClientPipeline({\n ...restOptions,\n loggingOptions: {\n additionalAllowedHeaderNames: StorageDataLakeLoggingAllowedHeaderNames,\n additionalAllowedQueryParameters: StorageDataLakeLoggingAllowedQueryParameters,\n logger: logger.info,\n },\n userAgentOptions: {\n userAgentPrefix,\n },\n serializationOptions: {\n stringifyXML,\n serializerOptions: {\n xml: {\n // Use customized XML char key of \"#\" so we can deserialize metadata\n // with \"_\" key\n xmlCharKey: \"#\",\n },\n },\n },\n deserializationOptions: {\n parseXML,\n serializerOptions: {\n xml: {\n // Use customized XML char key of \"#\" so we can deserialize metadata\n // with \"_\" key\n xmlCharKey: \"#\",\n },\n },\n },\n });\n corePipeline.removePolicy({ phase: \"Retry\" });\n corePipeline.removePolicy({ name: decompressResponsePolicyName });\n corePipeline.addPolicy(storageCorrectContentLengthPolicy());\n corePipeline.addPolicy(storageRetryPolicy(restOptions.retryOptions), { phase: \"Retry\" });\n corePipeline.addPolicy(storageBrowserPolicy());\n const downlevelResults = processDownlevelPipeline(pipeline);\n if (downlevelResults) {\n corePipeline.addPolicy(\n downlevelResults.wrappedPolicies,\n downlevelResults.afterRetry ? { afterPhase: \"Retry\" } : undefined,\n );\n }\n const credential = getCredentialFromPipeline(pipeline);\n if (isTokenCredential(credential)) {\n corePipeline.addPolicy(\n bearerTokenAuthenticationPolicy({\n credential,\n scopes: restOptions.audience ?? StorageOAuthScopes,\n challengeCallbacks: { authorizeRequestOnChallenge: authorizeRequestOnTenantChallenge },\n }),\n { phase: \"Sign\" },\n );\n } else if (credential instanceof StorageSharedKeyCredential) {\n corePipeline.addPolicy(\n storageSharedKeyCredentialPolicy({\n accountName: credential.accountName,\n accountKey: (credential as any).accountKey,\n }),\n { phase: \"Sign\" },\n );\n }\n (pipeline as any)._corePipeline = corePipeline;\n }\n return {\n ...restOptions,\n allowInsecureConnection: true,\n httpClient,\n pipeline: corePipeline,\n };\n}\n\nexport function getCredentialFromPipeline(\n pipeline: PipelineLike,\n): StorageSharedKeyCredential | AnonymousCredential | TokenCredential {\n // see if we squirreled one away on the type itself\n if ((pipeline as any)._credential) {\n return (pipeline as any)._credential;\n }\n // if it came from another package, loop over the factories and look for one like before\n let credential = new AnonymousCredential();\n for (const factory of pipeline.factories) {\n if (isTokenCredential((factory as any).credential)) {\n // Only works if the factory has been attached a \"credential\" property.\n // We do that in newPipeline() when using TokenCredential.\n credential = (factory as any).credential;\n } else if (isStorageSharedKeyCredential(factory)) {\n return factory;\n }\n }\n return credential;\n}\n\nfunction isStorageSharedKeyCredential(\n factory: RequestPolicyFactory,\n): factory is StorageSharedKeyCredential {\n if (factory instanceof StorageSharedKeyCredential) {\n return true;\n }\n return factory.constructor.name === \"StorageSharedKeyCredential\";\n}\n\nfunction isAnonymousCredential(factory: RequestPolicyFactory): factory is AnonymousCredential {\n if (factory instanceof AnonymousCredential) {\n return true;\n }\n return factory.constructor.name === \"AnonymousCredential\";\n}\n\nfunction isCoreHttpBearerTokenFactory(factory: RequestPolicyFactory): boolean {\n return isTokenCredential((factory as any).credential);\n}\n\nfunction isStorageBrowserPolicyFactory(\n factory: RequestPolicyFactory,\n): factory is StorageBrowserPolicyFactory {\n if (factory instanceof StorageBrowserPolicyFactory) {\n return true;\n }\n return factory.constructor.name === \"StorageBrowserPolicyFactory\";\n}\n\nfunction isStorageRetryPolicyFactory(\n factory: RequestPolicyFactory,\n): factory is StorageRetryPolicyFactory {\n if (factory instanceof StorageRetryPolicyFactory) {\n return true;\n }\n return factory.constructor.name === \"StorageRetryPolicyFactory\";\n}\n\nfunction isStorageTelemetryPolicyFactory(factory: RequestPolicyFactory): boolean {\n return factory.constructor.name === \"TelemetryPolicyFactory\";\n}\n\nfunction isInjectorPolicyFactory(factory: RequestPolicyFactory): boolean {\n return factory.constructor.name === \"InjectorPolicyFactory\";\n}\n\nfunction isCoreHttpPolicyFactory(factory: RequestPolicyFactory): boolean {\n const knownPolicies = [\n \"GenerateClientRequestIdPolicy\",\n \"TracingPolicy\",\n \"LogPolicy\",\n \"ProxyPolicy\",\n \"DisableResponseDecompressionPolicy\",\n \"KeepAlivePolicy\",\n \"DeserializationPolicy\",\n ];\n\n const mockHttpClient: IHttpClient = {\n sendRequest: async (request: WebResource) => {\n return {\n request,\n headers: request.headers.clone(),\n status: 500,\n };\n },\n };\n const mockRequestPolicyOptions: RequestPolicyOptions = {\n log(_logLevel: HttpPipelineLogLevel, _message: string): void {\n /* do nothing */\n },\n shouldLog(_logLevel: HttpPipelineLogLevel): boolean {\n return false;\n },\n };\n const policyInstance = factory.create(mockHttpClient, mockRequestPolicyOptions);\n const policyName = policyInstance.constructor.name;\n // bundlers sometimes add a custom suffix to the class name to make it unique\n return knownPolicies.some((knownPolicyName) => {\n return policyName.startsWith(knownPolicyName);\n });\n}\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"StorageClient.js","sourceRoot":"","sources":["../../../src/StorageClient.ts"],"names":[],"mappings":";AAGA,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAI9D,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAExD,OAAO,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AACnE,OAAO,EAAE,aAAa,EAAE,qBAAqB,EAAE,YAAY,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAYlG,0FAA0F;AAC1F,SAAS,oBAAoB,CAAC,QAAkB;IAC9C,MAAM,KAA2C,QAAQ,CAAC,OAAiC,EAArF,EAAE,UAAU,EAAE,QAAQ,OAA+D,EAA1D,WAAW,cAAtC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IAAI,CAAC,GAAG,CAAC,IAAI,EAAE,EAAE,OAAO,CAAC,CAAC;QAE7D,IAAI,CAAC,UAAU,GAAI,UAAkB,CAAC,UAAU,CAAC;QAEjD,iDAAiD;QACjD,MAAM,oBAAoB,GAAG,IAAI,CAAC,oBAA2B,CAAC;QAC9D,oBAAoB,CAAC,kBAAkB,GAAG,SAAS,CAAC;QACpD,MAAM,oCAAoC,GAAG,IAAI,CAAC,kCAAyC,CAAC;QAC5F,oCAAoC,CAAC,kBAAkB,GAAG,SAAS,CAAC;IACtE,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\nimport type { TokenCredential } from \"@azure/core-auth\";\nimport { StorageContextClient } from \"./StorageContextClient\";\nimport type { StorageClient as StorageClientContext } from \"./generated/src\";\nimport type { Pipeline, PipelineLike, StoragePipelineOptions } from \"./Pipeline\";\nimport type { AnonymousCredential } from \"@azure/storage-blob\";\nimport { BlobServiceClient } from \"@azure/storage-blob\";\nimport type { StorageSharedKeyCredential } from \"@azure/storage-blob\";\nimport { toBlobEndpointUrl, toDfsEndpointUrl } from \"./transforms\";\nimport { escapeURLPath, getAccountNameFromUrl, getURLScheme, iEqual } from \"./utils/utils.common\";\nimport type { ExtendedServiceClientOptions } from \"@azure/core-http-compat\";\nimport type { HttpClient, Pipeline as CorePipeline } from \"@azure/core-rest-pipeline\";\nimport type { OperationTracingOptions } from \"@azure/core-tracing\";\n\n/**\n * An interface for options common to every remote operation.\n */\nexport interface CommonOptions {\n tracingOptions?: OperationTracingOptions;\n}\n\n// This function relies on the Pipeline already being initialized by a storage-blob client\nfunction getCoreClientOptions(pipeline: Pipeline): ExtendedServiceClientOptions {\n const { httpClient: v1Client, ...restOptions } = pipeline.options as StoragePipelineOptions;\n const httpClient: HttpClient = (pipeline as any)._coreHttpClient;\n if (!httpClient) {\n throw new Error(\"Pipeline not correctly initialized; missing V2 HttpClient\");\n }\n\n const corePipeline: CorePipeline = (pipeline as any)._corePipeline;\n if (!corePipeline) {\n throw new Error(\"Pipeline not correctly initialized; missing V2 Pipeline\");\n }\n return {\n ...restOptions,\n allowInsecureConnection: true,\n httpClient,\n pipeline: corePipeline,\n };\n}\n\n/**\n * A StorageClient represents a based URL class for {@link BlobServiceClient}, {@link ContainerClient}\n * and etc.\n */\nexport abstract class StorageClient {\n /**\n * Encoded URL string value.\n */\n public readonly url: string;\n\n public readonly accountName: string;\n\n /**\n * Encoded URL string value for corresponding blob endpoint.\n */\n protected readonly blobEndpointUrl: string;\n\n /**\n * Encoded URL string value for corresponding dfs endpoint.\n */\n protected readonly dfsEndpointUrl: string;\n\n /**\n * Request policy pipeline.\n *\n * @internal\n */\n protected readonly pipeline: Pipeline;\n\n /**\n * Such as AnonymousCredential, StorageSharedKeyCredential or any credential from the `@azure/identity` package to authenticate requests to the service. You can also provide an object that implements the TokenCredential interface. If not specified, AnonymousCredential is used.\n */\n public readonly credential: StorageSharedKeyCredential | AnonymousCredential | TokenCredential;\n\n /**\n * StorageClient is a reference to protocol layer operations entry, which is\n * generated by AutoRest generator.\n */\n protected readonly storageClientContext: StorageClientContext;\n\n /**\n * storageClientContextWithBlobEndpoint is a reference to protocol layer operations entry, which is\n * generated by AutoRest generator, with its url pointing to the Blob endpoint.\n */\n protected readonly storageClientContextToBlobEndpoint: StorageClientContext;\n\n /**\n */\n protected readonly isHttps: boolean;\n\n /**\n * Creates an instance of StorageClient.\n * @param url - url to resource\n * @param pipeline - request policy pipeline.\n */\n protected constructor(url: string, pipeline: PipelineLike) {\n // URL should be encoded and only once, protocol layer shouldn't encode URL again\n this.url = escapeURLPath(url);\n this.blobEndpointUrl = toBlobEndpointUrl(this.url);\n this.dfsEndpointUrl = toDfsEndpointUrl(this.url);\n this.accountName = getAccountNameFromUrl(this.blobEndpointUrl);\n this.pipeline = pipeline;\n // creating this BlobServiceClient allows us to use the converted V2 Pipeline attached to `pipeline`.\n const blobClient = new BlobServiceClient(url, pipeline);\n this.storageClientContext = new StorageContextClient(\n this.dfsEndpointUrl,\n getCoreClientOptions(pipeline),\n );\n\n this.storageClientContextToBlobEndpoint = new StorageContextClient(\n this.blobEndpointUrl,\n getCoreClientOptions(pipeline),\n );\n\n this.isHttps = iEqual(getURLScheme(this.url) || \"\", \"https\");\n\n this.credential = (blobClient as any).credential;\n\n // Override protocol layer's default content-type\n const storageClientContext = this.storageClientContext as any;\n storageClientContext.requestContentType = undefined;\n const storageClientContextWithBlobEndpoint = this.storageClientContextToBlobEndpoint as any;\n storageClientContextWithBlobEndpoint.requestContentType = undefined;\n }\n}\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"StorageContextClient.js","sourceRoot":"","sources":["../../../src/StorageContextClient.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAGlC,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAC1C,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAEhD;;GAEG;AACH,MAAM,OAAO,oBAAqB,SAAQ,aAAa;IACrD,KAAK,CAAC,oBAAoB,CACxB,kBAAsC,EACtC,aAA4B;;QAE5B,MAAM,mBAAmB,qBAAQ,aAAa,CAAE,CAAC;QAEjD,IACE,CAAC,MAAM;YACP,CAAC,aAAa,CAAC,WAAW;aAC1B,MAAA,aAAa,CAAC,gBAAgB,0CAAE,IAAI,CAClC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,MAAM,CAAC,cAAc,KAAK,gBAAgB,CAC5D,CAAA,EACD,CAAC;YACD,mBAAmB,CAAC,SAAS,GAAG,MAAM,CAAC;YACvC,mBAAmB,CAAC,WAAW,GAAG;gBAChC,aAAa,EAAE,MAAM;gBACrB,MAAM,EAAE;oBACN,cAAc,EAAE,MAAM;oBACtB,UAAU,EAAE,IAAI;oBAChB,YAAY,EAAE,EAAE;oBAChB,IAAI,EAAE;wBACJ,IAAI,EAAE,QAAQ;qBACf;iBACF;aACF,CAAC;QACJ,CAAC;QAED,IACE,mBAAmB,CAAC,IAAI,KAAK,eAAe;YAC5C,mBAAmB,CAAC,IAAI,KAAK,sBAAsB,EACnD,CAAC;YACD,mBAAmB,CAAC,IAAI,GAAG,EAAE,CAAC;QAChC,CAAC;QACD,OAAO,KAAK,CAAC,oBAAoB,CAAC,kBAAkB,EAAE,mBAAmB,CAAC,CAAC;IAC7E,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { OperationArguments, OperationSpec } from \"@azure/core-client\";\nimport { isNode } from \"@azure/core-util\";\nimport { StorageClient } from \"./generated/src\";\n\n/**\n * @internal\n */\nexport class StorageContextClient extends StorageClient {\n async sendOperationRequest<T>(\n operationArguments: OperationArguments,\n operationSpec: OperationSpec,\n ): Promise<T> {\n const operationSpecToSend = { ...operationSpec };\n\n if (\n !isNode &&\n !operationSpec.requestBody &&\n operationSpec.headerParameters?.some(\n (param) => param.mapper.serializedName === \"Content-Length\",\n )\n ) {\n operationSpecToSend.mediaType = \"text\";\n operationSpecToSend.requestBody = {\n parameterPath: \"body\",\n mapper: {\n serializedName: \"body\",\n isConstant: true,\n defaultValue: \"\",\n type: {\n name: \"String\",\n },\n },\n };\n }\n\n if (\n operationSpecToSend.path === \"/{filesystem}\" ||\n operationSpecToSend.path === \"/{filesystem}/{path}\"\n ) {\n operationSpecToSend.path = \"\";\n }\n return super.sendOperationRequest(operationArguments, operationSpecToSend);\n }\n}\n"]}
|