@azure/storage-blob 12.31.0 → 12.32.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/dist/browser/BatchUtils.d.ts +1 -1
- package/dist/browser/BatchUtils.d.ts.map +1 -0
- package/dist/browser/BatchUtils.js +1 -1
- package/dist/browser/BatchUtils.js.map +1 -0
- package/dist/browser/BlobDownloadResponse.d.ts +5 -2
- package/dist/browser/BlobDownloadResponse.d.ts.map +1 -0
- package/dist/browser/BlobDownloadResponse.js +9 -5
- package/dist/browser/BlobDownloadResponse.js.map +1 -0
- package/dist/browser/BlobQueryResponse.d.ts +1 -1
- package/dist/browser/BlobQueryResponse.d.ts.map +1 -0
- package/dist/browser/BlobQueryResponse.js +1 -1
- package/dist/browser/BlobQueryResponse.js.map +1 -0
- package/dist/browser/BlobServiceClient.d.ts +36 -5
- package/dist/browser/BlobServiceClient.d.ts.map +1 -1
- package/dist/browser/BlobServiceClient.js +29 -17
- package/dist/browser/BlobServiceClient.js.map +1 -1
- package/dist/browser/Clients.d.ts +68 -14
- package/dist/browser/Clients.d.ts.map +1 -1
- package/dist/browser/Clients.js +97 -28
- package/dist/browser/Clients.js.map +1 -1
- package/dist/browser/ContainerClient.d.ts +6 -4
- package/dist/browser/ContainerClient.d.ts.map +1 -1
- package/dist/browser/ContainerClient.js +8 -6
- package/dist/browser/ContainerClient.js.map +1 -1
- package/dist/browser/Pipeline.d.ts +2 -3
- package/dist/browser/Pipeline.d.ts.map +1 -1
- package/dist/browser/Pipeline.js.map +1 -1
- package/dist/browser/generated/src/models/index.d.ts +59 -4
- package/dist/browser/generated/src/models/index.d.ts.map +1 -1
- package/dist/browser/generated/src/models/index.js +2 -2
- package/dist/browser/generated/src/models/index.js.map +1 -1
- package/dist/browser/generated/src/models/mappers.d.ts.map +1 -1
- package/dist/browser/generated/src/models/mappers.js +65 -0
- package/dist/browser/generated/src/models/mappers.js.map +1 -1
- package/dist/browser/generated/src/models/parameters.d.ts +7 -0
- package/dist/browser/generated/src/models/parameters.d.ts.map +1 -1
- package/dist/browser/generated/src/models/parameters.js +71 -1
- package/dist/browser/generated/src/models/parameters.js.map +1 -1
- package/dist/browser/generated/src/operations/appendBlob.js +5 -0
- package/dist/browser/generated/src/operations/appendBlob.js.map +1 -1
- package/dist/browser/generated/src/operations/blob.js +3 -0
- package/dist/browser/generated/src/operations/blob.js.map +1 -1
- package/dist/browser/generated/src/operations/blockBlob.js +10 -0
- package/dist/browser/generated/src/operations/blockBlob.js.map +1 -1
- package/dist/browser/generated/src/operations/pageBlob.js +5 -0
- package/dist/browser/generated/src/operations/pageBlob.js.map +1 -1
- package/dist/browser/generated/src/storageClient.js +2 -2
- package/dist/browser/generated/src/storageClient.js.map +1 -1
- package/dist/browser/generatedModels.d.ts +4 -4
- package/dist/browser/generatedModels.d.ts.map +1 -1
- package/dist/browser/generatedModels.js.map +1 -1
- package/dist/browser/index.d.ts +9 -9
- package/dist/browser/index.d.ts.map +1 -0
- package/dist/browser/index.js +1 -2
- package/dist/browser/index.js.map +1 -0
- package/dist/browser/internal-avro/index.d.ts +9 -2
- package/dist/browser/internal-avro/index.d.ts.map +1 -0
- package/dist/browser/internal-avro/index.js +14 -1
- package/dist/browser/internal-avro/index.js.map +1 -0
- package/dist/browser/models.d.ts +43 -0
- package/dist/browser/models.d.ts.map +1 -1
- package/dist/browser/models.js.map +1 -1
- package/dist/browser/sas/BlobSASSignatureValues.d.ts +11 -1
- package/dist/browser/sas/BlobSASSignatureValues.d.ts.map +1 -1
- package/dist/browser/sas/BlobSASSignatureValues.js +133 -2
- package/dist/browser/sas/BlobSASSignatureValues.js.map +1 -1
- package/dist/browser/sas/SASQueryParameters.d.ts +23 -2
- package/dist/browser/sas/SASQueryParameters.d.ts.map +1 -1
- package/dist/browser/sas/SASQueryParameters.js +34 -2
- package/dist/browser/sas/SASQueryParameters.js.map +1 -1
- package/dist/browser/utils/RetriableReadableStream.d.ts.map +1 -1
- package/dist/browser/utils/RetriableReadableStream.js +1 -0
- package/dist/browser/utils/RetriableReadableStream.js.map +1 -1
- package/dist/browser/utils/constants.d.ts.map +1 -1
- package/dist/browser/utils/constants.js +2 -2
- package/dist/browser/utils/constants.js.map +1 -1
- package/dist/browser/utils/utils.common.d.ts +16 -1
- package/dist/browser/utils/utils.common.d.ts.map +1 -1
- package/dist/browser/utils/utils.common.js +26 -0
- package/dist/browser/utils/utils.common.js.map +1 -1
- package/dist/browser/utils/utils.d.ts +12 -6
- package/dist/browser/utils/utils.d.ts.map +1 -0
- package/dist/browser/utils/utils.js +11 -11
- package/dist/browser/utils/utils.js.map +1 -0
- package/dist/commonjs/BatchResponse.js +15 -5
- package/dist/commonjs/BatchResponse.js.map +7 -1
- package/dist/commonjs/BatchResponseParser.js +127 -136
- package/dist/commonjs/BatchResponseParser.js.map +7 -1
- package/dist/commonjs/BatchUtils.js +38 -15
- package/dist/commonjs/BatchUtils.js.map +7 -1
- package/dist/commonjs/BlobBatch.js +280 -258
- package/dist/commonjs/BlobBatch.js.map +7 -1
- package/dist/commonjs/BlobBatchClient.js +188 -169
- package/dist/commonjs/BlobBatchClient.js.map +7 -1
- package/dist/commonjs/BlobDownloadResponse.d.ts +2 -1
- package/dist/commonjs/BlobDownloadResponse.d.ts.map +1 -1
- package/dist/commonjs/BlobDownloadResponse.js +487 -467
- package/dist/commonjs/BlobDownloadResponse.js.map +7 -1
- package/dist/commonjs/BlobLeaseClient.js +226 -196
- package/dist/commonjs/BlobLeaseClient.js.map +7 -1
- package/dist/commonjs/BlobQueryResponse.common.js +378 -365
- package/dist/commonjs/BlobQueryResponse.common.js.map +7 -1
- package/dist/commonjs/BlobQueryResponse.js +387 -371
- package/dist/commonjs/BlobQueryResponse.js.map +7 -1
- package/dist/commonjs/BlobServiceClient.d.ts +36 -5
- package/dist/commonjs/BlobServiceClient.d.ts.map +1 -1
- package/dist/commonjs/BlobServiceClient.js +784 -684
- package/dist/commonjs/BlobServiceClient.js.map +7 -1
- package/dist/commonjs/Clients.d.ts +68 -14
- package/dist/commonjs/Clients.d.ts.map +1 -1
- package/dist/commonjs/Clients.js +3120 -2804
- package/dist/commonjs/Clients.js.map +7 -1
- package/dist/commonjs/ContainerClient.d.ts +6 -4
- package/dist/commonjs/ContainerClient.d.ts.map +1 -1
- package/dist/commonjs/ContainerClient.js +1348 -1253
- package/dist/commonjs/ContainerClient.js.map +7 -1
- package/dist/commonjs/PageBlobRangeResponse.js +45 -31
- package/dist/commonjs/PageBlobRangeResponse.js.map +7 -1
- package/dist/commonjs/Pipeline.d.ts +2 -3
- package/dist/commonjs/Pipeline.d.ts.map +1 -1
- package/dist/commonjs/Pipeline.js +244 -244
- package/dist/commonjs/Pipeline.js.map +7 -1
- package/dist/commonjs/Range.js +35 -22
- package/dist/commonjs/Range.js.map +7 -1
- package/dist/commonjs/StorageClient.js +67 -54
- package/dist/commonjs/StorageClient.js.map +7 -1
- package/dist/commonjs/StorageContextClient.js +34 -19
- package/dist/commonjs/StorageContextClient.js.map +7 -1
- package/dist/commonjs/generated/src/index.js +32 -16
- package/dist/commonjs/generated/src/index.js.map +7 -1
- package/dist/commonjs/generated/src/models/index.d.ts +59 -4
- package/dist/commonjs/generated/src/models/index.d.ts.map +1 -1
- package/dist/commonjs/generated/src/models/index.js +164 -267
- package/dist/commonjs/generated/src/models/index.js.map +7 -1
- package/dist/commonjs/generated/src/models/mappers.d.ts.map +1 -1
- package/dist/commonjs/generated/src/models/mappers.js +8767 -8334
- package/dist/commonjs/generated/src/models/mappers.js.map +7 -1
- package/dist/commonjs/generated/src/models/parameters.d.ts +7 -0
- package/dist/commonjs/generated/src/models/parameters.d.ts.map +1 -1
- package/dist/commonjs/generated/src/models/parameters.js +2074 -1679
- package/dist/commonjs/generated/src/models/parameters.js.map +7 -1
- package/dist/commonjs/generated/src/operations/appendBlob.js +253 -214
- package/dist/commonjs/generated/src/operations/appendBlob.js.map +7 -1
- package/dist/commonjs/generated/src/operations/blob.js +1043 -961
- package/dist/commonjs/generated/src/operations/blob.js.map +7 -1
- package/dist/commonjs/generated/src/operations/blockBlob.js +406 -353
- package/dist/commonjs/generated/src/operations/blockBlob.js.map +7 -1
- package/dist/commonjs/generated/src/operations/container.js +735 -665
- package/dist/commonjs/generated/src/operations/container.js.map +7 -1
- package/dist/commonjs/generated/src/operations/index.js +31 -17
- package/dist/commonjs/generated/src/operations/index.js.map +7 -1
- package/dist/commonjs/generated/src/operations/pageBlob.js +491 -434
- package/dist/commonjs/generated/src/operations/pageBlob.js.map +7 -1
- package/dist/commonjs/generated/src/operations/service.js +352 -303
- package/dist/commonjs/generated/src/operations/service.js.map +7 -1
- package/dist/commonjs/generated/src/operationsInterfaces/appendBlob.js +15 -10
- package/dist/commonjs/generated/src/operationsInterfaces/appendBlob.js.map +7 -1
- package/dist/commonjs/generated/src/operationsInterfaces/blob.js +15 -10
- package/dist/commonjs/generated/src/operationsInterfaces/blob.js.map +7 -1
- package/dist/commonjs/generated/src/operationsInterfaces/blockBlob.js +15 -10
- package/dist/commonjs/generated/src/operationsInterfaces/blockBlob.js.map +7 -1
- package/dist/commonjs/generated/src/operationsInterfaces/container.js +15 -10
- package/dist/commonjs/generated/src/operationsInterfaces/container.js.map +7 -1
- package/dist/commonjs/generated/src/operationsInterfaces/index.js +31 -17
- package/dist/commonjs/generated/src/operationsInterfaces/index.js.map +7 -1
- package/dist/commonjs/generated/src/operationsInterfaces/pageBlob.js +15 -10
- package/dist/commonjs/generated/src/operationsInterfaces/pageBlob.js.map +7 -1
- package/dist/commonjs/generated/src/operationsInterfaces/service.js +15 -10
- package/dist/commonjs/generated/src/operationsInterfaces/service.js.map +7 -1
- package/dist/commonjs/generated/src/storageClient.js +81 -63
- package/dist/commonjs/generated/src/storageClient.js.map +7 -1
- package/dist/commonjs/generatedModels.d.ts +4 -4
- package/dist/commonjs/generatedModels.d.ts.map +1 -1
- package/dist/commonjs/generatedModels.js +30 -11
- package/dist/commonjs/generatedModels.js.map +7 -1
- package/dist/commonjs/index.d.ts +14 -14
- package/dist/commonjs/index.d.ts.map +1 -1
- package/dist/commonjs/index.js +106 -52
- package/dist/commonjs/index.js.map +7 -1
- package/dist/commonjs/internal-avro/AvroConstants.js +36 -10
- package/dist/commonjs/internal-avro/AvroConstants.js.map +7 -1
- package/dist/commonjs/internal-avro/AvroParser.js +307 -297
- package/dist/commonjs/internal-avro/AvroParser.js.map +7 -1
- package/dist/commonjs/internal-avro/AvroReadable.js +26 -7
- package/dist/commonjs/internal-avro/AvroReadable.js.map +7 -1
- package/dist/commonjs/internal-avro/AvroReadableFromBlob.js +69 -50
- package/dist/commonjs/internal-avro/AvroReadableFromBlob.js.map +7 -1
- package/dist/commonjs/internal-avro/AvroReadableFromStream.js +96 -84
- package/dist/commonjs/internal-avro/AvroReadableFromStream.js.map +7 -1
- package/dist/commonjs/internal-avro/AvroReader.js +118 -110
- package/dist/commonjs/internal-avro/AvroReader.js.map +7 -1
- package/dist/commonjs/internal-avro/index.d.ts +1 -1
- package/dist/commonjs/internal-avro/index.d.ts.map +1 -1
- package/dist/commonjs/internal-avro/index.js +33 -12
- package/dist/commonjs/internal-avro/index.js.map +7 -1
- package/dist/commonjs/internal-avro/utils/utils.common.js +33 -17
- package/dist/commonjs/internal-avro/utils/utils.common.js.map +7 -1
- package/dist/commonjs/log.js +28 -11
- package/dist/commonjs/log.js.map +7 -1
- package/dist/commonjs/models.d.ts +43 -0
- package/dist/commonjs/models.d.ts.map +1 -1
- package/dist/commonjs/models.js +74 -115
- package/dist/commonjs/models.js.map +7 -1
- package/dist/commonjs/pollers/BlobStartCopyFromUrlPoller.js +116 -126
- package/dist/commonjs/pollers/BlobStartCopyFromUrlPoller.js.map +7 -1
- package/dist/commonjs/sas/AccountSASPermissions.js +233 -226
- package/dist/commonjs/sas/AccountSASPermissions.js.map +7 -1
- package/dist/commonjs/sas/AccountSASResourceTypes.js +80 -70
- package/dist/commonjs/sas/AccountSASResourceTypes.js.map +7 -1
- package/dist/commonjs/sas/AccountSASServices.js +88 -78
- package/dist/commonjs/sas/AccountSASServices.js.map +7 -1
- package/dist/commonjs/sas/AccountSASSignatureValues.js +119 -100
- package/dist/commonjs/sas/AccountSASSignatureValues.js.map +7 -1
- package/dist/commonjs/sas/BlobSASPermissions.js +204 -194
- package/dist/commonjs/sas/BlobSASPermissions.js.map +7 -1
- package/dist/commonjs/sas/BlobSASSignatureValues.d.ts +11 -1
- package/dist/commonjs/sas/BlobSASSignatureValues.d.ts.map +1 -1
- package/dist/commonjs/sas/BlobSASSignatureValues.js +822 -641
- package/dist/commonjs/sas/BlobSASSignatureValues.js.map +7 -1
- package/dist/commonjs/sas/ContainerSASPermissions.js +232 -220
- package/dist/commonjs/sas/ContainerSASPermissions.js.map +7 -1
- package/dist/commonjs/sas/SASQueryParameters.d.ts +23 -2
- package/dist/commonjs/sas/SASQueryParameters.d.ts.map +1 -1
- package/dist/commonjs/sas/SASQueryParameters.js +423 -361
- package/dist/commonjs/sas/SASQueryParameters.js.map +7 -1
- package/dist/commonjs/sas/SasIPRange.js +27 -14
- package/dist/commonjs/sas/SasIPRange.js.map +7 -1
- package/dist/commonjs/tsdoc-metadata.json +1 -1
- package/dist/commonjs/utils/Batch.js +134 -127
- package/dist/commonjs/utils/Batch.js.map +7 -1
- package/dist/commonjs/utils/BlobQuickQueryStream.js +129 -115
- package/dist/commonjs/utils/BlobQuickQueryStream.js.map +7 -1
- package/dist/commonjs/utils/Mutex.js +78 -64
- package/dist/commonjs/utils/Mutex.js.map +7 -1
- package/dist/commonjs/utils/RetriableReadableStream.d.ts.map +1 -1
- package/dist/commonjs/utils/RetriableReadableStream.js +128 -125
- package/dist/commonjs/utils/RetriableReadableStream.js.map +7 -1
- package/dist/commonjs/utils/SharedKeyComparator.js +437 -65
- package/dist/commonjs/utils/SharedKeyComparator.js.map +7 -1
- package/dist/commonjs/utils/constants.d.ts.map +1 -1
- package/dist/commonjs/utils/constants.js +290 -223
- package/dist/commonjs/utils/constants.js.map +7 -1
- package/dist/commonjs/utils/tracing.js +32 -16
- package/dist/commonjs/utils/tracing.js.map +7 -1
- package/dist/commonjs/utils/utils.common.d.ts +16 -1
- package/dist/commonjs/utils/utils.common.d.ts.map +1 -1
- package/dist/commonjs/utils/utils.common.js +566 -740
- package/dist/commonjs/utils/utils.common.js.map +7 -1
- package/dist/commonjs/utils/utils.js +131 -128
- package/dist/commonjs/utils/utils.js.map +7 -1
- package/dist/esm/BlobDownloadResponse.d.ts +2 -1
- package/dist/esm/BlobDownloadResponse.d.ts.map +1 -1
- package/dist/esm/BlobDownloadResponse.js +8 -1
- package/dist/esm/BlobDownloadResponse.js.map +1 -1
- package/dist/esm/BlobServiceClient.d.ts +36 -5
- package/dist/esm/BlobServiceClient.d.ts.map +1 -1
- package/dist/esm/BlobServiceClient.js +29 -17
- package/dist/esm/BlobServiceClient.js.map +1 -1
- package/dist/esm/Clients.d.ts +68 -14
- package/dist/esm/Clients.d.ts.map +1 -1
- package/dist/esm/Clients.js +97 -28
- package/dist/esm/Clients.js.map +1 -1
- package/dist/esm/ContainerClient.d.ts +6 -4
- package/dist/esm/ContainerClient.d.ts.map +1 -1
- package/dist/esm/ContainerClient.js +8 -6
- package/dist/esm/ContainerClient.js.map +1 -1
- package/dist/esm/Pipeline.d.ts +2 -3
- package/dist/esm/Pipeline.d.ts.map +1 -1
- package/dist/esm/Pipeline.js.map +1 -1
- package/dist/esm/generated/src/models/index.d.ts +59 -4
- package/dist/esm/generated/src/models/index.d.ts.map +1 -1
- package/dist/esm/generated/src/models/index.js +2 -2
- package/dist/esm/generated/src/models/index.js.map +1 -1
- package/dist/esm/generated/src/models/mappers.d.ts.map +1 -1
- package/dist/esm/generated/src/models/mappers.js +65 -0
- package/dist/esm/generated/src/models/mappers.js.map +1 -1
- package/dist/esm/generated/src/models/parameters.d.ts +7 -0
- package/dist/esm/generated/src/models/parameters.d.ts.map +1 -1
- package/dist/esm/generated/src/models/parameters.js +71 -1
- package/dist/esm/generated/src/models/parameters.js.map +1 -1
- package/dist/esm/generated/src/operations/appendBlob.js +5 -0
- package/dist/esm/generated/src/operations/appendBlob.js.map +1 -1
- package/dist/esm/generated/src/operations/blob.js +3 -0
- package/dist/esm/generated/src/operations/blob.js.map +1 -1
- package/dist/esm/generated/src/operations/blockBlob.js +10 -0
- package/dist/esm/generated/src/operations/blockBlob.js.map +1 -1
- package/dist/esm/generated/src/operations/pageBlob.js +5 -0
- package/dist/esm/generated/src/operations/pageBlob.js.map +1 -1
- package/dist/esm/generated/src/storageClient.js +2 -2
- package/dist/esm/generated/src/storageClient.js.map +1 -1
- package/dist/esm/generatedModels.d.ts +4 -4
- package/dist/esm/generatedModels.d.ts.map +1 -1
- package/dist/esm/generatedModels.js.map +1 -1
- package/dist/esm/index.d.ts +14 -14
- package/dist/esm/index.d.ts.map +1 -1
- package/dist/esm/index.js +0 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/internal-avro/index.d.ts +1 -1
- package/dist/esm/internal-avro/index.d.ts.map +1 -1
- package/dist/esm/internal-avro/index.js.map +1 -1
- package/dist/esm/models.d.ts +43 -0
- package/dist/esm/models.d.ts.map +1 -1
- package/dist/esm/models.js.map +1 -1
- package/dist/esm/sas/BlobSASSignatureValues.d.ts +11 -1
- package/dist/esm/sas/BlobSASSignatureValues.d.ts.map +1 -1
- package/dist/esm/sas/BlobSASSignatureValues.js +133 -2
- package/dist/esm/sas/BlobSASSignatureValues.js.map +1 -1
- package/dist/esm/sas/SASQueryParameters.d.ts +23 -2
- package/dist/esm/sas/SASQueryParameters.d.ts.map +1 -1
- package/dist/esm/sas/SASQueryParameters.js +34 -2
- package/dist/esm/sas/SASQueryParameters.js.map +1 -1
- package/dist/esm/utils/RetriableReadableStream.d.ts.map +1 -1
- package/dist/esm/utils/RetriableReadableStream.js +1 -0
- package/dist/esm/utils/RetriableReadableStream.js.map +1 -1
- package/dist/esm/utils/constants.d.ts.map +1 -1
- package/dist/esm/utils/constants.js +2 -2
- package/dist/esm/utils/constants.js.map +1 -1
- package/dist/esm/utils/utils.common.d.ts +16 -1
- package/dist/esm/utils/utils.common.d.ts.map +1 -1
- package/dist/esm/utils/utils.common.js +26 -0
- package/dist/esm/utils/utils.common.js.map +1 -1
- package/dist/react-native/BlobDownloadResponse.d.ts +5 -2
- package/dist/react-native/BlobDownloadResponse.d.ts.map +1 -0
- package/dist/react-native/BlobDownloadResponse.js +9 -5
- package/dist/react-native/BlobDownloadResponse.js.map +1 -0
- package/dist/react-native/BlobQueryResponse.d.ts +1 -1
- package/dist/react-native/BlobQueryResponse.d.ts.map +1 -0
- package/dist/react-native/BlobQueryResponse.js +1 -1
- package/dist/react-native/BlobQueryResponse.js.map +1 -0
- package/dist/react-native/BlobServiceClient.d.ts +36 -5
- package/dist/react-native/BlobServiceClient.d.ts.map +1 -1
- package/dist/react-native/BlobServiceClient.js +29 -17
- package/dist/react-native/BlobServiceClient.js.map +1 -1
- package/dist/react-native/Clients.d.ts +68 -14
- package/dist/react-native/Clients.d.ts.map +1 -1
- package/dist/react-native/Clients.js +97 -28
- package/dist/react-native/Clients.js.map +1 -1
- package/dist/react-native/ContainerClient.d.ts +6 -4
- package/dist/react-native/ContainerClient.d.ts.map +1 -1
- package/dist/react-native/ContainerClient.js +8 -6
- package/dist/react-native/ContainerClient.js.map +1 -1
- package/dist/react-native/Pipeline.d.ts +2 -3
- package/dist/react-native/Pipeline.d.ts.map +1 -1
- package/dist/react-native/Pipeline.js.map +1 -1
- package/dist/react-native/generated/src/models/index.d.ts +59 -4
- package/dist/react-native/generated/src/models/index.d.ts.map +1 -1
- package/dist/react-native/generated/src/models/index.js +2 -2
- package/dist/react-native/generated/src/models/index.js.map +1 -1
- package/dist/react-native/generated/src/models/mappers.d.ts.map +1 -1
- package/dist/react-native/generated/src/models/mappers.js +65 -0
- package/dist/react-native/generated/src/models/mappers.js.map +1 -1
- package/dist/react-native/generated/src/models/parameters.d.ts +7 -0
- package/dist/react-native/generated/src/models/parameters.d.ts.map +1 -1
- package/dist/react-native/generated/src/models/parameters.js +71 -1
- package/dist/react-native/generated/src/models/parameters.js.map +1 -1
- package/dist/react-native/generated/src/operations/appendBlob.js +5 -0
- package/dist/react-native/generated/src/operations/appendBlob.js.map +1 -1
- package/dist/react-native/generated/src/operations/blob.js +3 -0
- package/dist/react-native/generated/src/operations/blob.js.map +1 -1
- package/dist/react-native/generated/src/operations/blockBlob.js +10 -0
- package/dist/react-native/generated/src/operations/blockBlob.js.map +1 -1
- package/dist/react-native/generated/src/operations/pageBlob.js +5 -0
- package/dist/react-native/generated/src/operations/pageBlob.js.map +1 -1
- package/dist/react-native/generated/src/storageClient.js +2 -2
- package/dist/react-native/generated/src/storageClient.js.map +1 -1
- package/dist/react-native/generatedModels.d.ts +4 -4
- package/dist/react-native/generatedModels.d.ts.map +1 -1
- package/dist/react-native/generatedModels.js.map +1 -1
- package/dist/react-native/index.d.ts +14 -14
- package/dist/react-native/index.d.ts.map +1 -1
- package/dist/react-native/index.js +0 -1
- package/dist/react-native/index.js.map +1 -1
- package/dist/react-native/internal-avro/index.d.ts +1 -1
- package/dist/react-native/internal-avro/index.d.ts.map +1 -1
- package/dist/react-native/internal-avro/index.js.map +1 -1
- package/dist/react-native/models.d.ts +43 -0
- package/dist/react-native/models.d.ts.map +1 -1
- package/dist/react-native/models.js.map +1 -1
- package/dist/react-native/sas/BlobSASSignatureValues.d.ts +11 -1
- package/dist/react-native/sas/BlobSASSignatureValues.d.ts.map +1 -1
- package/dist/react-native/sas/BlobSASSignatureValues.js +133 -2
- package/dist/react-native/sas/BlobSASSignatureValues.js.map +1 -1
- package/dist/react-native/sas/SASQueryParameters.d.ts +23 -2
- package/dist/react-native/sas/SASQueryParameters.d.ts.map +1 -1
- package/dist/react-native/sas/SASQueryParameters.js +34 -2
- package/dist/react-native/sas/SASQueryParameters.js.map +1 -1
- package/dist/react-native/utils/RetriableReadableStream.d.ts.map +1 -1
- package/dist/react-native/utils/RetriableReadableStream.js +1 -0
- package/dist/react-native/utils/RetriableReadableStream.js.map +1 -1
- package/dist/react-native/utils/constants.d.ts.map +1 -1
- package/dist/react-native/utils/constants.js +2 -2
- package/dist/react-native/utils/constants.js.map +1 -1
- package/dist/react-native/utils/utils.common.d.ts +16 -1
- package/dist/react-native/utils/utils.common.d.ts.map +1 -1
- package/dist/react-native/utils/utils.common.js +26 -0
- package/dist/react-native/utils/utils.common.js.map +1 -1
- package/dist/react-native/utils/utils.d.ts +12 -6
- package/dist/react-native/utils/utils.d.ts.map +1 -0
- package/dist/react-native/utils/utils.js +11 -11
- package/dist/react-native/utils/utils.js.map +1 -0
- package/package.json +3 -20
- package/dist/browser/BatchUtils-browser.d.mts.map +0 -1
- package/dist/browser/BatchUtils-browser.mjs.map +0 -1
- package/dist/browser/BlobDownloadResponse-browser.d.mts.map +0 -1
- package/dist/browser/BlobDownloadResponse-browser.mjs.map +0 -1
- package/dist/browser/BlobQueryResponse-browser.d.mts.map +0 -1
- package/dist/browser/BlobQueryResponse-browser.mjs.map +0 -1
- package/dist/browser/credentials/StorageSharedKeyCredential-react-native.d.mts +0 -3
- package/dist/browser/credentials/StorageSharedKeyCredential-react-native.d.mts.map +0 -1
- package/dist/browser/credentials/StorageSharedKeyCredential-react-native.mjs +0 -5
- package/dist/browser/credentials/StorageSharedKeyCredential-react-native.mjs.map +0 -1
- package/dist/browser/index-browser.d.mts.map +0 -1
- package/dist/browser/index-browser.mjs.map +0 -1
- package/dist/browser/internal-avro/index-browser.d.mts.map +0 -1
- package/dist/browser/internal-avro/index-browser.mjs.map +0 -1
- package/dist/browser/policies/StorageSharedKeyCredentialPolicyV2-react-native.d.mts +0 -17
- package/dist/browser/policies/StorageSharedKeyCredentialPolicyV2-react-native.d.mts.map +0 -1
- package/dist/browser/policies/StorageSharedKeyCredentialPolicyV2-react-native.mjs +0 -18
- package/dist/browser/policies/StorageSharedKeyCredentialPolicyV2-react-native.mjs.map +0 -1
- package/dist/browser/utils/utils-browser.d.mts.map +0 -1
- package/dist/browser/utils/utils-browser.mjs.map +0 -1
- package/dist/esm/credentials/StorageSharedKeyCredential-react-native.d.mts +0 -3
- package/dist/esm/credentials/StorageSharedKeyCredential-react-native.d.mts.map +0 -1
- package/dist/esm/credentials/StorageSharedKeyCredential-react-native.mjs +0 -5
- package/dist/esm/credentials/StorageSharedKeyCredential-react-native.mjs.map +0 -1
- package/dist/esm/policies/StorageSharedKeyCredentialPolicyV2-react-native.d.mts +0 -17
- package/dist/esm/policies/StorageSharedKeyCredentialPolicyV2-react-native.d.mts.map +0 -1
- package/dist/esm/policies/StorageSharedKeyCredentialPolicyV2-react-native.mjs +0 -18
- package/dist/esm/policies/StorageSharedKeyCredentialPolicyV2-react-native.mjs.map +0 -1
- package/dist/react-native/BlobDownloadResponse-react-native.d.mts.map +0 -1
- package/dist/react-native/BlobDownloadResponse-react-native.mjs.map +0 -1
- package/dist/react-native/BlobQueryResponse-react-native.d.mts.map +0 -1
- package/dist/react-native/BlobQueryResponse-react-native.mjs.map +0 -1
- package/dist/react-native/credentials/StorageSharedKeyCredential-react-native.d.mts +0 -3
- package/dist/react-native/credentials/StorageSharedKeyCredential-react-native.d.mts.map +0 -1
- package/dist/react-native/credentials/StorageSharedKeyCredential-react-native.mjs +0 -5
- package/dist/react-native/credentials/StorageSharedKeyCredential-react-native.mjs.map +0 -1
- package/dist/react-native/policies/StorageSharedKeyCredentialPolicyV2-react-native.d.mts +0 -17
- package/dist/react-native/policies/StorageSharedKeyCredentialPolicyV2-react-native.d.mts.map +0 -1
- package/dist/react-native/policies/StorageSharedKeyCredentialPolicyV2-react-native.mjs +0 -18
- package/dist/react-native/policies/StorageSharedKeyCredentialPolicyV2-react-native.mjs.map +0 -1
- package/dist/react-native/utils/utils-react-native.d.mts.map +0 -1
- package/dist/react-native/utils/utils-react-native.mjs.map +0 -1
|
@@ -1 +1,7 @@
|
|
|
1
|
-
{"version":3,"file":"Pipeline.js","sourceRoot":"","sources":["../../src/Pipeline.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;;AA+HlC,wCAYC;AAmFD,kCAUC;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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\";\nimport { logger } from \"./log.js\";\nimport type { StorageRetryOptions } from \"@azure/storage-common\";\nimport {\n StorageRetryPolicyFactory,\n AnonymousCredential,\n StorageSharedKeyCredential,\n getCachedDefaultHttpClient,\n storageRequestFailureDetailsParserPolicy,\n storageBrowserPolicy,\n storageRetryPolicy,\n storageSharedKeyCredentialPolicy,\n StorageBrowserPolicyFactory,\n storageCorrectContentLengthPolicy,\n} from \"@azure/storage-common\";\n\nimport {\n StorageOAuthScopes,\n StorageBlobLoggingAllowedHeaderNames,\n StorageBlobLoggingAllowedQueryParameters,\n SDK_VERSION,\n} from \"./utils/constants.js\";\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};\n\n/**\n * A subset of `@azure/core-http` ServiceClientOptions\n */\nexport interface ServiceClientOptions {\n /**\n * Optional. Configures the HTTP client to send requests and receive responses.\n */\n httpClient?: IHttpClient;\n /**\n * Optional. Overrides the default policy factories.\n */\n requestPolicyFactories?:\n | RequestPolicyFactory[]\n | ((defaultRequestPolicyFactories: RequestPolicyFactory[]) => void | RequestPolicyFactory[]);\n}\n\n/**\n * Option interface for Pipeline constructor.\n */\nexport interface PipelineOptions {\n /**\n * Optional. Configures the HTTP client to send requests and receive responses.\n */\n httpClient?: IHttpClient;\n}\n\n/**\n * An interface for the {@link Pipeline} class containing HTTP request policies.\n * You can create a default Pipeline by calling {@link newPipeline}.\n * Or you can create a Pipeline with your own policies by the constructor of Pipeline.\n *\n * Refer to {@link newPipeline} and provided policies before implementing your\n * customized Pipeline.\n */\nexport interface PipelineLike {\n /**\n * A list of chained request policy factories.\n */\n readonly factories: RequestPolicyFactory[];\n /**\n * Configures pipeline logger and HTTP client.\n */\n readonly options: PipelineOptions;\n /**\n * Transfer Pipeline object to ServiceClientOptions object which is required by\n * ServiceClient constructor.\n *\n * @returns The ServiceClientOptions object from this Pipeline.\n */\n toServiceClientOptions(): ServiceClientOptions;\n}\n\n/**\n * A helper to decide if a given argument satisfies the Pipeline contract\n * @param pipeline - An argument that may be a Pipeline\n * @returns true when the argument satisfies the Pipeline contract\n */\nexport function isPipelineLike(pipeline: unknown): pipeline is PipelineLike {\n if (!pipeline || typeof pipeline !== \"object\") {\n return false;\n }\n\n const castPipeline = pipeline as PipelineLike;\n\n return (\n Array.isArray(castPipeline.factories) &&\n typeof castPipeline.options === \"object\" &&\n typeof castPipeline.toServiceClientOptions === \"function\"\n );\n}\n\n/**\n * A Pipeline class containing HTTP request policies.\n * You can create a default Pipeline by calling {@link newPipeline}.\n * Or you can create a Pipeline with your own policies by the constructor of Pipeline.\n *\n * Refer to {@link newPipeline} and provided policies before implementing your\n * customized Pipeline.\n */\nexport class Pipeline implements PipelineLike {\n /**\n * A list of chained request policy factories.\n */\n public readonly factories: RequestPolicyFactory[];\n /**\n * Configures pipeline logger and HTTP client.\n */\n public readonly options: PipelineOptions;\n\n /**\n * Creates an instance of Pipeline. Customize HTTPClient by implementing IHttpClient interface.\n *\n * @param factories -\n * @param options -\n */\n constructor(factories: RequestPolicyFactory[], options: PipelineOptions = {}) {\n this.factories = factories;\n this.options = options;\n }\n\n /**\n * Transfer Pipeline object to ServiceClientOptions object which is required by\n * ServiceClient constructor.\n *\n * @returns The ServiceClientOptions object from this Pipeline.\n */\n public toServiceClientOptions(): ServiceClientOptions {\n return {\n httpClient: this.options.httpClient,\n requestPolicyFactories: this.factories,\n };\n }\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 | 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: StorageBlobLoggingAllowedHeaderNames,\n additionalAllowedQueryParameters: StorageBlobLoggingAllowedQueryParameters,\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(storageRequestFailureDetailsParserPolicy());\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
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["/mnt/vss/_work/1/s/sdk/storage/storage-blob/src/Pipeline.ts"],
|
|
4
|
+
"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 RequestBodyType as HttpRequestBody,\n} from \"@azure/core-rest-pipeline\";\nimport {\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\";\nimport { logger } from \"./log.js\";\nimport type { StorageRetryOptions } from \"@azure/storage-common\";\nimport {\n StorageRetryPolicyFactory,\n AnonymousCredential,\n StorageSharedKeyCredential,\n getCachedDefaultHttpClient,\n storageRequestFailureDetailsParserPolicy,\n storageBrowserPolicy,\n storageRetryPolicy,\n storageSharedKeyCredentialPolicy,\n StorageBrowserPolicyFactory,\n storageCorrectContentLengthPolicy,\n} from \"@azure/storage-common\";\n\nimport {\n StorageOAuthScopes,\n StorageBlobLoggingAllowedHeaderNames,\n StorageBlobLoggingAllowedQueryParameters,\n SDK_VERSION,\n} from \"./utils/constants.js\";\n\n// Export following interfaces and types for customers who want to implement their\n// own RequestPolicy or HTTPClient\nexport {\n StorageOAuthScopes,\n type IHttpClient,\n type HttpHeaders,\n type HttpRequestBody,\n type HttpOperationResponse,\n type WebResource,\n type RequestPolicyFactory,\n type RequestPolicy,\n type RequestPolicyOptions,\n};\n\n/**\n * A subset of `@azure/core-http` ServiceClientOptions\n */\nexport interface ServiceClientOptions {\n /**\n * Optional. Configures the HTTP client to send requests and receive responses.\n */\n httpClient?: IHttpClient;\n /**\n * Optional. Overrides the default policy factories.\n */\n requestPolicyFactories?:\n | RequestPolicyFactory[]\n | ((defaultRequestPolicyFactories: RequestPolicyFactory[]) => void | RequestPolicyFactory[]);\n}\n\n/**\n * Option interface for Pipeline constructor.\n */\nexport interface PipelineOptions {\n /**\n * Optional. Configures the HTTP client to send requests and receive responses.\n */\n httpClient?: IHttpClient;\n}\n\n/**\n * An interface for the {@link Pipeline} class containing HTTP request policies.\n * You can create a default Pipeline by calling {@link newPipeline}.\n * Or you can create a Pipeline with your own policies by the constructor of Pipeline.\n *\n * Refer to {@link newPipeline} and provided policies before implementing your\n * customized Pipeline.\n */\nexport interface PipelineLike {\n /**\n * A list of chained request policy factories.\n */\n readonly factories: RequestPolicyFactory[];\n /**\n * Configures pipeline logger and HTTP client.\n */\n readonly options: PipelineOptions;\n /**\n * Transfer Pipeline object to ServiceClientOptions object which is required by\n * ServiceClient constructor.\n *\n * @returns The ServiceClientOptions object from this Pipeline.\n */\n toServiceClientOptions(): ServiceClientOptions;\n}\n\n/**\n * A helper to decide if a given argument satisfies the Pipeline contract\n * @param pipeline - An argument that may be a Pipeline\n * @returns true when the argument satisfies the Pipeline contract\n */\nexport function isPipelineLike(pipeline: unknown): pipeline is PipelineLike {\n if (!pipeline || typeof pipeline !== \"object\") {\n return false;\n }\n\n const castPipeline = pipeline as PipelineLike;\n\n return (\n Array.isArray(castPipeline.factories) &&\n typeof castPipeline.options === \"object\" &&\n typeof castPipeline.toServiceClientOptions === \"function\"\n );\n}\n\n/**\n * A Pipeline class containing HTTP request policies.\n * You can create a default Pipeline by calling {@link newPipeline}.\n * Or you can create a Pipeline with your own policies by the constructor of Pipeline.\n *\n * Refer to {@link newPipeline} and provided policies before implementing your\n * customized Pipeline.\n */\nexport class Pipeline implements PipelineLike {\n /**\n * A list of chained request policy factories.\n */\n public readonly factories: RequestPolicyFactory[];\n /**\n * Configures pipeline logger and HTTP client.\n */\n public readonly options: PipelineOptions;\n\n /**\n * Creates an instance of Pipeline. Customize HTTPClient by implementing IHttpClient interface.\n *\n * @param factories -\n * @param options -\n */\n constructor(factories: RequestPolicyFactory[], options: PipelineOptions = {}) {\n this.factories = factories;\n this.options = options;\n }\n\n /**\n * Transfer Pipeline object to ServiceClientOptions object which is required by\n * ServiceClient constructor.\n *\n * @returns The ServiceClientOptions object from this Pipeline.\n */\n public toServiceClientOptions(): ServiceClientOptions {\n return {\n httpClient: this.options.httpClient,\n requestPolicyFactories: this.factories,\n };\n }\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 | 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: StorageBlobLoggingAllowedHeaderNames,\n additionalAllowedQueryParameters: StorageBlobLoggingAllowedQueryParameters,\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(storageRequestFailureDetailsParserPolicy());\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"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAQA,8BAUO;AASP,gCAGO;AACP,yBAAwE;AACxE,sBAAuC;AAEvC,uBAAkC;AAClC,iBAAuB;AAEvB,4BAWO;AAEP,uBAKO;AAyEA,SAAS,eAAe,UAA6C;AAC1E,MAAI,CAAC,YAAY,OAAO,aAAa,UAAU;AAC7C,WAAO;AAAA,EACT;AAEA,QAAM,eAAe;AAErB,SACE,MAAM,QAAQ,aAAa,SAAS,KACpC,OAAO,aAAa,YAAY,YAChC,OAAO,aAAa,2BAA2B;AAEnD;AAUO,MAAM,SAAiC;AAAA;AAAA;AAAA;AAAA,EAI5B;AAAA;AAAA;AAAA;AAAA,EAIA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQhB,YAAY,WAAmC,UAA2B,CAAC,GAAG;AAC5E,SAAK,YAAY;AACjB,SAAK,UAAU;AAAA,EACjB;AAAA;AAAA;AA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BAAgB;AAAA,IACpB;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF;AAEA,QAAM,iBAA8B;AAAA,IAClC,aAAa,OAAO,YAAyB;AAC3C,aAAO;AAAA,QACL;AAAA,QACA,SAAS,QAAQ,QAAQ,MAAM;AAAA,QAC/B,QAAQ;AAAA,MACV;AAAA,IACF;AAAA,EACF;AACA,QAAM,2BAAiD;AAAA,IACrD,IAAI,WAAiC,UAAwB;AAAA,IAE7D;AAAA,IACA,UAAU,WAA0C;AAClD,aAAO;AAAA,IACT;AAAA,EACF;AACA,QAAM,iBAAiB,QAAQ,OAAO,gBAAgB,wBAAwB;AAC9E,QAAM,aAAa,eAAe,YAAY;AAE9C,SAAO,cAAc,KAAK,CAAC,oBAAoB;AAC7C,WAAO,WAAW,WAAW,eAAe;AAAA,EAC9C,CAAC;AACH;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
package/dist/commonjs/Range.js
CHANGED
|
@@ -1,24 +1,37 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
+
};
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
var Range_exports = {};
|
|
19
|
+
__export(Range_exports, {
|
|
20
|
+
rangeToString: () => rangeToString
|
|
21
|
+
});
|
|
22
|
+
module.exports = __toCommonJS(Range_exports);
|
|
13
23
|
function rangeToString(iRange) {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
24
|
+
if (iRange.offset < 0) {
|
|
25
|
+
throw new RangeError(`Range.offset cannot be smaller than 0.`);
|
|
26
|
+
}
|
|
27
|
+
if (iRange.count && iRange.count <= 0) {
|
|
28
|
+
throw new RangeError(
|
|
29
|
+
`Range.count must be larger than 0. Leave it undefined if you want a range from offset to the end.`
|
|
30
|
+
);
|
|
31
|
+
}
|
|
32
|
+
return iRange.count ? `bytes=${iRange.offset}-${iRange.offset + iRange.count - 1}` : `bytes=${iRange.offset}-`;
|
|
23
33
|
}
|
|
24
|
-
|
|
34
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
35
|
+
0 && (module.exports = {
|
|
36
|
+
rangeToString
|
|
37
|
+
});
|
|
@@ -1 +1,7 @@
|
|
|
1
|
-
{
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["/mnt/vss/_work/1/s/sdk/storage/storage-blob/src/Range.ts"],
|
|
4
|
+
"sourcesContent": ["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n/**\n * Range for Blob Service Operations.\n * @see https://learn.microsoft.com/rest/api/storageservices/specifying-the-range-header-for-blob-service-operations\n */\nexport interface Range {\n /**\n * StartByte, larger than or equal 0.\n */\n offset: number;\n /**\n * Optional. Count of bytes, larger than 0.\n * If not provided, will return bytes from offset to the end.\n */\n count?: number;\n}\n\n/**\n * Generate a range string. For example:\n *\n * \"bytes=255-\" or \"bytes=0-511\"\n *\n * @param iRange -\n */\nexport function rangeToString(iRange: Range): string {\n if (iRange.offset < 0) {\n throw new RangeError(`Range.offset cannot be smaller than 0.`);\n }\n if (iRange.count && iRange.count <= 0) {\n throw new RangeError(\n `Range.count must be larger than 0. Leave it undefined if you want a range from offset to the end.`,\n );\n }\n return iRange.count\n ? `bytes=${iRange.offset}-${iRange.offset + iRange.count - 1}`\n : `bytes=${iRange.offset}-`;\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AA0BO,SAAS,cAAc,QAAuB;AACnD,MAAI,OAAO,SAAS,GAAG;AACrB,UAAM,IAAI,WAAW,wCAAwC;AAAA,EAC/D;AACA,MAAI,OAAO,SAAS,OAAO,SAAS,GAAG;AACrC,UAAM,IAAI;AAAA,MACR;AAAA,IACF;AAAA,EACF;AACA,SAAO,OAAO,QACV,SAAS,OAAO,MAAM,IAAI,OAAO,SAAS,OAAO,QAAQ,CAAC,KAC1D,SAAS,OAAO,MAAM;AAC5B;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -1,56 +1,69 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
+
};
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
var StorageClient_exports = {};
|
|
19
|
+
__export(StorageClient_exports, {
|
|
20
|
+
StorageClient: () => StorageClient
|
|
21
|
+
});
|
|
22
|
+
module.exports = __toCommonJS(StorageClient_exports);
|
|
23
|
+
var import_StorageContextClient = require("./StorageContextClient.js");
|
|
24
|
+
var import_Pipeline = require("./Pipeline.js");
|
|
25
|
+
var import_utils_common = require("./utils/utils.common.js");
|
|
13
26
|
class StorageClient {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
storageClientContext.requestContentType = undefined;
|
|
53
|
-
}
|
|
27
|
+
/**
|
|
28
|
+
* Encoded URL string value.
|
|
29
|
+
*/
|
|
30
|
+
url;
|
|
31
|
+
accountName;
|
|
32
|
+
/**
|
|
33
|
+
* Request policy pipeline.
|
|
34
|
+
*
|
|
35
|
+
* @internal
|
|
36
|
+
*/
|
|
37
|
+
pipeline;
|
|
38
|
+
/**
|
|
39
|
+
* 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.
|
|
40
|
+
*/
|
|
41
|
+
credential;
|
|
42
|
+
/**
|
|
43
|
+
* StorageClient is a reference to protocol layer operations entry, which is
|
|
44
|
+
* generated by AutoRest generator.
|
|
45
|
+
*/
|
|
46
|
+
storageClientContext;
|
|
47
|
+
/**
|
|
48
|
+
*/
|
|
49
|
+
isHttps;
|
|
50
|
+
/**
|
|
51
|
+
* Creates an instance of StorageClient.
|
|
52
|
+
* @param url - url to resource
|
|
53
|
+
* @param pipeline - request policy pipeline.
|
|
54
|
+
*/
|
|
55
|
+
constructor(url, pipeline) {
|
|
56
|
+
this.url = (0, import_utils_common.escapeURLPath)(url);
|
|
57
|
+
this.accountName = (0, import_utils_common.getAccountNameFromUrl)(url);
|
|
58
|
+
this.pipeline = pipeline;
|
|
59
|
+
this.storageClientContext = new import_StorageContextClient.StorageContextClient(this.url, (0, import_Pipeline.getCoreClientOptions)(pipeline));
|
|
60
|
+
this.isHttps = (0, import_utils_common.iEqual)((0, import_utils_common.getURLScheme)(this.url) || "", "https");
|
|
61
|
+
this.credential = (0, import_Pipeline.getCredentialFromPipeline)(pipeline);
|
|
62
|
+
const storageClientContext = this.storageClientContext;
|
|
63
|
+
storageClientContext.requestContentType = void 0;
|
|
64
|
+
}
|
|
54
65
|
}
|
|
55
|
-
|
|
56
|
-
|
|
66
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
67
|
+
0 && (module.exports = {
|
|
68
|
+
StorageClient
|
|
69
|
+
});
|
|
@@ -1 +1,7 @@
|
|
|
1
|
-
{
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["/mnt/vss/_work/1/s/sdk/storage/storage-blob/src/StorageClient.ts"],
|
|
4
|
+
"sourcesContent": ["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { StorageClient as StorageClientContext } from \"./generated/src/index.js\";\nimport { StorageContextClient } from \"./StorageContextClient.js\";\nimport type { PipelineLike } from \"./Pipeline.js\";\nimport { getCoreClientOptions, getCredentialFromPipeline } from \"./Pipeline.js\";\nimport {\n escapeURLPath,\n getURLScheme,\n iEqual,\n getAccountNameFromUrl,\n} from \"./utils/utils.common.js\";\nimport type { AnonymousCredential, StorageSharedKeyCredential } from \"@azure/storage-common\";\nimport type { TokenCredential } from \"@azure/core-auth\";\nimport type { OperationTracingOptions } from \"@azure/core-tracing\";\n\n/**\n * An interface for options common to every remote operation.\n */\nexport interface CommonOptions {\n /**\n * Options to configure spans created when tracing is enabled.\n */\n tracingOptions?: OperationTracingOptions;\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 public readonly accountName: string;\n /**\n * Request policy pipeline.\n *\n * @internal\n */\n protected readonly pipeline: PipelineLike;\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 * 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 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.accountName = getAccountNameFromUrl(url);\n this.pipeline = pipeline;\n this.storageClientContext = new StorageContextClient(this.url, getCoreClientOptions(pipeline));\n\n this.isHttps = iEqual(getURLScheme(this.url) || \"\", \"https\");\n\n this.credential = getCredentialFromPipeline(pipeline);\n\n // Override protocol layer's default content-type\n const storageClientContext = this.storageClientContext as any;\n storageClientContext.requestContentType = undefined;\n }\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAIA,kCAAqC;AAErC,sBAAgE;AAChE,0BAKO;AAmBA,MAAe,cAAc;AAAA;AAAA;AAAA;AAAA,EAIlB;AAAA,EACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAMG;AAAA;AAAA;AAAA;AAAA,EAIH;AAAA;AAAA;AAAA;AAAA;AAAA,EAKG;AAAA;AAAA;AAAA,EAGA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAOT,YAAY,KAAa,UAAwB;AAEzD,SAAK,UAAM,mCAAc,GAAG;AAC5B,SAAK,kBAAc,2CAAsB,GAAG;AAC5C,SAAK,WAAW;AAChB,SAAK,uBAAuB,IAAI,iDAAqB,KAAK,SAAK,sCAAqB,QAAQ,CAAC;AAE7F,SAAK,cAAU,gCAAO,kCAAa,KAAK,GAAG,KAAK,IAAI,OAAO;AAE3D,SAAK,iBAAa,2CAA0B,QAAQ;AAGpD,UAAM,uBAAuB,KAAK;AAClC,yBAAqB,qBAAqB;AAAA,EAC5C;AACF;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -1,21 +1,36 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
+
};
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
var StorageContextClient_exports = {};
|
|
19
|
+
__export(StorageContextClient_exports, {
|
|
20
|
+
StorageContextClient: () => StorageContextClient
|
|
21
|
+
});
|
|
22
|
+
module.exports = __toCommonJS(StorageContextClient_exports);
|
|
23
|
+
var import_src = require("./generated/src/index.js");
|
|
24
|
+
class StorageContextClient extends import_src.StorageClient {
|
|
25
|
+
async sendOperationRequest(operationArguments, operationSpec) {
|
|
26
|
+
const operationSpecToSend = { ...operationSpec };
|
|
27
|
+
if (operationSpecToSend.path === "/{containerName}" || operationSpecToSend.path === "/{containerName}/{blob}") {
|
|
28
|
+
operationSpecToSend.path = "";
|
|
18
29
|
}
|
|
30
|
+
return super.sendOperationRequest(operationArguments, operationSpecToSend);
|
|
31
|
+
}
|
|
19
32
|
}
|
|
20
|
-
|
|
21
|
-
|
|
33
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
34
|
+
0 && (module.exports = {
|
|
35
|
+
StorageContextClient
|
|
36
|
+
});
|
|
@@ -1 +1,7 @@
|
|
|
1
|
-
{
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["/mnt/vss/_work/1/s/sdk/storage/storage-blob/src/StorageContextClient.ts"],
|
|
4
|
+
"sourcesContent": ["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { OperationArguments, OperationSpec } from \"@azure/core-client\";\nimport { StorageClient } from \"./generated/src/index.js\";\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 operationSpecToSend.path === \"/{containerName}\" ||\n operationSpecToSend.path === \"/{containerName}/{blob}\"\n ) {\n operationSpecToSend.path = \"\";\n }\n return super.sendOperationRequest(operationArguments, operationSpecToSend);\n }\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAIA,iBAA8B;AAKvB,MAAM,6BAA6B,yBAAc;AAAA,EACtD,MAAM,qBACJ,oBACA,eACY;AACZ,UAAM,sBAAsB,EAAE,GAAG,cAAc;AAE/C,QACE,oBAAoB,SAAS,sBAC7B,oBAAoB,SAAS,2BAC7B;AACA,0BAAoB,OAAO;AAAA,IAC7B;AACA,WAAO,MAAM,qBAAqB,oBAAoB,mBAAmB;AAAA,EAC3E;AACF;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -1,16 +1,32 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
+
};
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var src_exports = {};
|
|
20
|
+
__export(src_exports, {
|
|
21
|
+
StorageClient: () => import_storageClient.StorageClient
|
|
22
|
+
});
|
|
23
|
+
module.exports = __toCommonJS(src_exports);
|
|
24
|
+
__reExport(src_exports, require("./models/index.js"), module.exports);
|
|
25
|
+
var import_storageClient = require("./storageClient.js");
|
|
26
|
+
__reExport(src_exports, require("./operationsInterfaces/index.js"), module.exports);
|
|
27
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
28
|
+
0 && (module.exports = {
|
|
29
|
+
StorageClient,
|
|
30
|
+
...require("./models/index.js"),
|
|
31
|
+
...require("./operationsInterfaces/index.js")
|
|
32
|
+
});
|
|
@@ -1 +1,7 @@
|
|
|
1
|
-
{
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["/mnt/vss/_work/1/s/sdk/storage/storage-blob/src/generated/src/index.ts"],
|
|
4
|
+
"sourcesContent": ["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nexport * from \"./models/index.js\";\nexport { StorageClient } from \"./storageClient.js\";\nexport * from \"./operationsInterfaces/index.js\";\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAQA,wBAAc,8BARd;AASA,2BAA8B;AAC9B,wBAAc,4CAVd;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|