@azure/storage-file-datalake 12.30.0-beta.1 → 12.30.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/browser/DataLakeFileSystemClient.d.ts +3 -3
- package/dist/browser/DataLakeFileSystemClient.d.ts.map +1 -1
- package/dist/browser/DataLakeFileSystemClient.js +1 -1
- package/dist/browser/DataLakeFileSystemClient.js.map +1 -1
- package/dist/browser/DataLakeServiceClient.d.ts +4 -4
- package/dist/browser/DataLakeServiceClient.d.ts.map +1 -1
- package/dist/browser/DataLakeServiceClient.js +1 -1
- package/dist/browser/DataLakeServiceClient.js.map +1 -1
- package/dist/browser/Pipeline.d.ts +1 -2
- package/dist/browser/Pipeline.d.ts.map +1 -1
- package/dist/browser/Pipeline.js +1 -2
- package/dist/browser/Pipeline.js.map +1 -1
- package/dist/browser/StorageClient.d.ts +1 -2
- package/dist/browser/StorageClient.d.ts.map +1 -1
- package/dist/browser/StorageClient.js.map +1 -1
- package/dist/browser/clients.d.ts +4 -4
- package/dist/browser/clients.d.ts.map +1 -1
- package/dist/browser/clients.js +1 -1
- package/dist/browser/clients.js.map +1 -1
- package/dist/browser/generated/src/storageClient.js +1 -1
- package/dist/browser/generated/src/storageClient.js.map +1 -1
- package/dist/browser/index.d.ts +2 -2
- package/dist/browser/index.d.ts.map +1 -1
- package/dist/browser/index.js +1 -1
- package/dist/browser/index.js.map +1 -1
- package/dist/browser/models.d.ts +14 -2
- package/dist/browser/models.d.ts.map +1 -1
- package/dist/browser/models.js.map +1 -1
- package/dist/browser/utils/constants.d.ts.map +1 -1
- package/dist/browser/utils/constants.js +1 -1
- package/dist/browser/utils/constants.js.map +1 -1
- package/dist/commonjs/DataLakeFileSystemClient.d.ts +3 -3
- package/dist/commonjs/DataLakeFileSystemClient.d.ts.map +1 -1
- package/dist/commonjs/DataLakeFileSystemClient.js +3 -2
- package/dist/commonjs/DataLakeFileSystemClient.js.map +4 -4
- package/dist/commonjs/DataLakeLeaseClient.js +2 -0
- package/dist/commonjs/DataLakeLeaseClient.js.map +2 -2
- package/dist/commonjs/DataLakeServiceClient.d.ts +4 -4
- package/dist/commonjs/DataLakeServiceClient.d.ts.map +1 -1
- package/dist/commonjs/DataLakeServiceClient.js +4 -3
- package/dist/commonjs/DataLakeServiceClient.js.map +4 -4
- package/dist/commonjs/Pipeline.d.ts +1 -2
- package/dist/commonjs/Pipeline.d.ts.map +1 -1
- package/dist/commonjs/Pipeline.js +18 -18
- package/dist/commonjs/Pipeline.js.map +4 -4
- package/dist/commonjs/StorageClient.d.ts +1 -2
- package/dist/commonjs/StorageClient.d.ts.map +1 -1
- package/dist/commonjs/StorageClient.js +1 -0
- package/dist/commonjs/StorageClient.js.map +3 -3
- package/dist/commonjs/StorageContextClient.js +1 -0
- package/dist/commonjs/StorageContextClient.js.map +1 -1
- package/dist/commonjs/clients.d.ts +4 -4
- package/dist/commonjs/clients.d.ts.map +1 -1
- package/dist/commonjs/clients.js +6 -5
- package/dist/commonjs/clients.js.map +4 -4
- package/dist/commonjs/credentials/StorageSharedKeyCredential.d.ts +1 -1
- package/dist/commonjs/credentials/StorageSharedKeyCredential.d.ts.map +1 -1
- package/dist/commonjs/credentials/StorageSharedKeyCredential.js +3 -2
- package/dist/commonjs/credentials/StorageSharedKeyCredential.js.map +3 -3
- package/dist/commonjs/generated/src/index.js +1 -0
- package/dist/commonjs/generated/src/index.js.map +1 -1
- package/dist/commonjs/generated/src/models/index.js +1 -0
- package/dist/commonjs/generated/src/models/index.js.map +1 -1
- package/dist/commonjs/generated/src/models/mappers.js +1 -0
- package/dist/commonjs/generated/src/models/mappers.js.map +1 -1
- package/dist/commonjs/generated/src/models/parameters.js +1 -0
- package/dist/commonjs/generated/src/models/parameters.js.map +1 -1
- package/dist/commonjs/generated/src/operations/fileSystemOperations.js +1 -0
- package/dist/commonjs/generated/src/operations/fileSystemOperations.js.map +1 -1
- package/dist/commonjs/generated/src/operations/index.js +1 -0
- package/dist/commonjs/generated/src/operations/index.js.map +1 -1
- package/dist/commonjs/generated/src/operations/pathOperations.js +1 -0
- package/dist/commonjs/generated/src/operations/pathOperations.js.map +1 -1
- package/dist/commonjs/generated/src/operations/service.js +1 -0
- package/dist/commonjs/generated/src/operations/service.js.map +1 -1
- package/dist/commonjs/generated/src/operationsInterfaces/fileSystemOperations.js +1 -0
- package/dist/commonjs/generated/src/operationsInterfaces/fileSystemOperations.js.map +1 -1
- package/dist/commonjs/generated/src/operationsInterfaces/index.js +1 -0
- package/dist/commonjs/generated/src/operationsInterfaces/index.js.map +1 -1
- package/dist/commonjs/generated/src/operationsInterfaces/pathOperations.js +1 -0
- package/dist/commonjs/generated/src/operationsInterfaces/pathOperations.js.map +1 -1
- package/dist/commonjs/generated/src/operationsInterfaces/service.js +1 -0
- package/dist/commonjs/generated/src/operationsInterfaces/service.js.map +1 -1
- package/dist/commonjs/generated/src/storageClient.js +2 -1
- package/dist/commonjs/generated/src/storageClient.js.map +2 -2
- package/dist/commonjs/index.d.ts +2 -2
- package/dist/commonjs/index.d.ts.map +1 -1
- package/dist/commonjs/index.js +14 -13
- package/dist/commonjs/index.js.map +3 -3
- package/dist/commonjs/log.js +1 -0
- package/dist/commonjs/log.js.map +1 -1
- package/dist/commonjs/models.d.ts +14 -2
- package/dist/commonjs/models.d.ts.map +1 -1
- package/dist/commonjs/models.internal.js +1 -0
- package/dist/commonjs/models.internal.js.map +1 -1
- package/dist/commonjs/models.js +1 -0
- package/dist/commonjs/models.js.map +2 -2
- package/dist/commonjs/sas/AccountSASPermissions.js +1 -0
- package/dist/commonjs/sas/AccountSASPermissions.js.map +1 -1
- package/dist/commonjs/sas/AccountSASResourceTypes.js +1 -0
- package/dist/commonjs/sas/AccountSASResourceTypes.js.map +1 -1
- package/dist/commonjs/sas/AccountSASServices.js +1 -0
- package/dist/commonjs/sas/AccountSASServices.js.map +1 -1
- package/dist/commonjs/sas/AccountSASSignatureValues.js +1 -0
- package/dist/commonjs/sas/AccountSASSignatureValues.js.map +1 -1
- package/dist/commonjs/sas/DataLakeSASPermissions.js +1 -0
- package/dist/commonjs/sas/DataLakeSASPermissions.js.map +1 -1
- package/dist/commonjs/sas/DataLakeSASSignatureValues.js +1 -0
- package/dist/commonjs/sas/DataLakeSASSignatureValues.js.map +1 -1
- package/dist/commonjs/sas/DirectorySASPermissions.js +1 -0
- package/dist/commonjs/sas/DirectorySASPermissions.js.map +1 -1
- package/dist/commonjs/sas/FileSystemSASPermissions.js +1 -0
- package/dist/commonjs/sas/FileSystemSASPermissions.js.map +1 -1
- package/dist/commonjs/sas/SASQueryParameters.js +1 -0
- package/dist/commonjs/sas/SASQueryParameters.js.map +1 -1
- package/dist/commonjs/sas/SasIPRange.js +1 -0
- package/dist/commonjs/sas/SasIPRange.js.map +1 -1
- package/dist/commonjs/transforms.js +1 -0
- package/dist/commonjs/transforms.js.map +1 -1
- package/dist/commonjs/tsdoc-metadata.json +1 -1
- package/dist/commonjs/utils/Batch.js +1 -0
- package/dist/commonjs/utils/Batch.js.map +1 -1
- package/dist/commonjs/utils/BufferScheduler.js +1 -0
- package/dist/commonjs/utils/BufferScheduler.js.map +1 -1
- package/dist/commonjs/utils/DataLakeAclChangeFailedError.js +1 -0
- package/dist/commonjs/utils/DataLakeAclChangeFailedError.js.map +1 -1
- package/dist/commonjs/utils/PathClientInternal.js +1 -0
- package/dist/commonjs/utils/PathClientInternal.js.map +1 -1
- package/dist/commonjs/utils/constants.d.ts.map +1 -1
- package/dist/commonjs/utils/constants.js +2 -1
- package/dist/commonjs/utils/constants.js.map +2 -2
- package/dist/commonjs/utils/tracing.js +1 -0
- package/dist/commonjs/utils/tracing.js.map +1 -1
- package/dist/commonjs/utils/utils.common.js +1 -0
- package/dist/commonjs/utils/utils.common.js.map +1 -1
- package/dist/commonjs/utils/utils.d.ts.map +1 -1
- package/dist/commonjs/utils/utils.js +24 -21
- package/dist/commonjs/utils/utils.js.map +3 -3
- package/dist/esm/DataLakeFileSystemClient.d.ts +3 -3
- package/dist/esm/DataLakeFileSystemClient.d.ts.map +1 -1
- package/dist/esm/DataLakeFileSystemClient.js +1 -1
- package/dist/esm/DataLakeFileSystemClient.js.map +1 -1
- package/dist/esm/DataLakeServiceClient.d.ts +4 -4
- package/dist/esm/DataLakeServiceClient.d.ts.map +1 -1
- package/dist/esm/DataLakeServiceClient.js +1 -1
- package/dist/esm/DataLakeServiceClient.js.map +1 -1
- package/dist/esm/Pipeline.d.ts +1 -2
- package/dist/esm/Pipeline.d.ts.map +1 -1
- package/dist/esm/Pipeline.js +1 -2
- package/dist/esm/Pipeline.js.map +1 -1
- package/dist/esm/StorageClient.d.ts +1 -2
- package/dist/esm/StorageClient.d.ts.map +1 -1
- package/dist/esm/StorageClient.js.map +1 -1
- package/dist/esm/clients.d.ts +4 -4
- package/dist/esm/clients.d.ts.map +1 -1
- package/dist/esm/clients.js +1 -1
- package/dist/esm/clients.js.map +1 -1
- package/dist/esm/credentials/StorageSharedKeyCredential.d.ts +1 -1
- package/dist/esm/credentials/StorageSharedKeyCredential.d.ts.map +1 -1
- package/dist/esm/credentials/StorageSharedKeyCredential.js +1 -1
- package/dist/esm/credentials/StorageSharedKeyCredential.js.map +1 -1
- package/dist/esm/generated/src/storageClient.js +1 -1
- package/dist/esm/generated/src/storageClient.js.map +1 -1
- package/dist/esm/index.d.ts +2 -2
- package/dist/esm/index.d.ts.map +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/models.d.ts +14 -2
- package/dist/esm/models.d.ts.map +1 -1
- package/dist/esm/models.js.map +1 -1
- package/dist/esm/utils/constants.d.ts.map +1 -1
- package/dist/esm/utils/constants.js +1 -1
- package/dist/esm/utils/constants.js.map +1 -1
- package/dist/esm/utils/utils.d.ts.map +1 -1
- package/dist/esm/utils/utils.js +31 -22
- package/dist/esm/utils/utils.js.map +1 -1
- package/dist/react-native/DataLakeFileSystemClient.d.ts +3 -3
- package/dist/react-native/DataLakeFileSystemClient.d.ts.map +1 -1
- package/dist/react-native/DataLakeFileSystemClient.js +1 -1
- package/dist/react-native/DataLakeFileSystemClient.js.map +1 -1
- package/dist/react-native/DataLakeServiceClient.d.ts +4 -4
- package/dist/react-native/DataLakeServiceClient.d.ts.map +1 -1
- package/dist/react-native/DataLakeServiceClient.js +1 -1
- package/dist/react-native/DataLakeServiceClient.js.map +1 -1
- package/dist/react-native/Pipeline.d.ts +1 -2
- package/dist/react-native/Pipeline.d.ts.map +1 -1
- package/dist/react-native/Pipeline.js +1 -2
- package/dist/react-native/Pipeline.js.map +1 -1
- package/dist/react-native/StorageClient.d.ts +1 -2
- package/dist/react-native/StorageClient.d.ts.map +1 -1
- package/dist/react-native/StorageClient.js.map +1 -1
- package/dist/react-native/clients.d.ts +4 -4
- package/dist/react-native/clients.d.ts.map +1 -1
- package/dist/react-native/clients.js +1 -1
- package/dist/react-native/clients.js.map +1 -1
- package/dist/react-native/generated/src/storageClient.js +1 -1
- package/dist/react-native/generated/src/storageClient.js.map +1 -1
- package/dist/react-native/index.d.ts +2 -2
- package/dist/react-native/index.d.ts.map +1 -1
- package/dist/react-native/index.js +1 -1
- package/dist/react-native/index.js.map +1 -1
- package/dist/react-native/models.d.ts +14 -2
- package/dist/react-native/models.d.ts.map +1 -1
- package/dist/react-native/models.js.map +1 -1
- package/dist/react-native/utils/constants.d.ts.map +1 -1
- package/dist/react-native/utils/constants.js +1 -1
- package/dist/react-native/utils/constants.js.map +1 -1
- package/package.json +21 -11
|
@@ -17,11 +17,11 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
17
17
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
18
|
var Pipeline_exports = {};
|
|
19
19
|
__export(Pipeline_exports, {
|
|
20
|
-
Pipeline: () =>
|
|
20
|
+
Pipeline: () => import_storage_blob.Pipeline,
|
|
21
21
|
StorageOAuthScopes: () => import_constants.StorageOAuthScopes,
|
|
22
22
|
getCoreClientOptions: () => getCoreClientOptions,
|
|
23
23
|
getCredentialFromPipeline: () => getCredentialFromPipeline,
|
|
24
|
-
isPipelineLike: () =>
|
|
24
|
+
isPipelineLike: () => import_storage_blob.isPipelineLike,
|
|
25
25
|
newPipeline: () => newPipeline
|
|
26
26
|
});
|
|
27
27
|
module.exports = __toCommonJS(Pipeline_exports);
|
|
@@ -31,22 +31,21 @@ var import_core_client = require("@azure/core-client");
|
|
|
31
31
|
var import_core_xml = require("@azure/core-xml");
|
|
32
32
|
var import_core_auth = require("@azure/core-auth");
|
|
33
33
|
var import_log = require("./log.js");
|
|
34
|
-
var import_storage_blob = require("@azure/storage-blob");
|
|
35
34
|
var import_StorageSharedKeyCredential = require("./credentials/StorageSharedKeyCredential.js");
|
|
36
|
-
var import_storage_blob2 = require("@azure/storage-blob");
|
|
37
|
-
var import_constants = require("./utils/constants.js");
|
|
38
35
|
var import_storage_common = require("@azure/storage-common");
|
|
36
|
+
var import_constants = require("./utils/constants.js");
|
|
39
37
|
var import_storage_common2 = require("@azure/storage-common");
|
|
40
38
|
var import_storage_common3 = require("@azure/storage-common");
|
|
41
39
|
var import_storage_common4 = require("@azure/storage-common");
|
|
42
40
|
var import_storage_common5 = require("@azure/storage-common");
|
|
43
41
|
var import_storage_common6 = require("@azure/storage-common");
|
|
44
|
-
var
|
|
42
|
+
var import_storage_common7 = require("@azure/storage-common");
|
|
43
|
+
var import_storage_blob = require("@azure/storage-blob");
|
|
45
44
|
function newPipeline(credential, pipelineOptions = {}) {
|
|
46
45
|
if (!credential) {
|
|
47
|
-
credential = new
|
|
46
|
+
credential = new import_storage_common.AnonymousCredential();
|
|
48
47
|
}
|
|
49
|
-
const pipeline = new
|
|
48
|
+
const pipeline = new import_storage_blob.Pipeline([], pipelineOptions);
|
|
50
49
|
pipeline._credential = credential;
|
|
51
50
|
return pipeline;
|
|
52
51
|
}
|
|
@@ -78,7 +77,7 @@ function getCoreClientOptions(pipeline) {
|
|
|
78
77
|
const { httpClient: v1Client, ...restOptions } = pipeline.options;
|
|
79
78
|
let httpClient = pipeline._coreHttpClient;
|
|
80
79
|
if (!httpClient) {
|
|
81
|
-
httpClient = v1Client ? (0, import_core_http_compat.convertHttpClient)(v1Client) : (0,
|
|
80
|
+
httpClient = v1Client ? (0, import_core_http_compat.convertHttpClient)(v1Client) : (0, import_storage_common2.getCachedDefaultHttpClient)();
|
|
82
81
|
pipeline._coreHttpClient = httpClient;
|
|
83
82
|
}
|
|
84
83
|
let corePipeline = pipeline._corePipeline;
|
|
@@ -118,10 +117,10 @@ function getCoreClientOptions(pipeline) {
|
|
|
118
117
|
});
|
|
119
118
|
corePipeline.removePolicy({ phase: "Retry" });
|
|
120
119
|
corePipeline.removePolicy({ name: import_core_rest_pipeline.decompressResponsePolicyName });
|
|
121
|
-
corePipeline.addPolicy((0,
|
|
122
|
-
corePipeline.addPolicy((0,
|
|
123
|
-
corePipeline.addPolicy((0,
|
|
124
|
-
corePipeline.addPolicy((0,
|
|
120
|
+
corePipeline.addPolicy((0, import_storage_common5.storageCorrectContentLengthPolicy)());
|
|
121
|
+
corePipeline.addPolicy((0, import_storage_common6.storageRetryPolicy)(restOptions.retryOptions), { phase: "Retry" });
|
|
122
|
+
corePipeline.addPolicy((0, import_storage_common2.storageRequestFailureDetailsParserPolicy)());
|
|
123
|
+
corePipeline.addPolicy((0, import_storage_common3.storageBrowserPolicy)());
|
|
125
124
|
const downlevelResults = processDownlevelPipeline(pipeline);
|
|
126
125
|
if (downlevelResults) {
|
|
127
126
|
corePipeline.addPolicy(
|
|
@@ -141,7 +140,7 @@ function getCoreClientOptions(pipeline) {
|
|
|
141
140
|
);
|
|
142
141
|
} else if (credential instanceof import_StorageSharedKeyCredential.StorageSharedKeyCredential) {
|
|
143
142
|
corePipeline.addPolicy(
|
|
144
|
-
(0,
|
|
143
|
+
(0, import_storage_common7.storageSharedKeyCredentialPolicy)({
|
|
145
144
|
accountName: credential.accountName,
|
|
146
145
|
accountKey: credential.accountKey
|
|
147
146
|
}),
|
|
@@ -161,7 +160,7 @@ function getCredentialFromPipeline(pipeline) {
|
|
|
161
160
|
if (pipeline._credential) {
|
|
162
161
|
return pipeline._credential;
|
|
163
162
|
}
|
|
164
|
-
let credential = new
|
|
163
|
+
let credential = new import_storage_common.AnonymousCredential();
|
|
165
164
|
for (const factory of pipeline.factories) {
|
|
166
165
|
if ((0, import_core_auth.isTokenCredential)(factory.credential)) {
|
|
167
166
|
credential = factory.credential;
|
|
@@ -178,7 +177,7 @@ function isStorageSharedKeyCredential(factory) {
|
|
|
178
177
|
return factory.constructor.name === "StorageSharedKeyCredential";
|
|
179
178
|
}
|
|
180
179
|
function isAnonymousCredential(factory) {
|
|
181
|
-
if (factory instanceof
|
|
180
|
+
if (factory instanceof import_storage_common.AnonymousCredential) {
|
|
182
181
|
return true;
|
|
183
182
|
}
|
|
184
183
|
return factory.constructor.name === "AnonymousCredential";
|
|
@@ -187,13 +186,13 @@ function isCoreHttpBearerTokenFactory(factory) {
|
|
|
187
186
|
return (0, import_core_auth.isTokenCredential)(factory.credential);
|
|
188
187
|
}
|
|
189
188
|
function isStorageBrowserPolicyFactory(factory) {
|
|
190
|
-
if (factory instanceof
|
|
189
|
+
if (factory instanceof import_storage_common4.StorageBrowserPolicyFactory) {
|
|
191
190
|
return true;
|
|
192
191
|
}
|
|
193
192
|
return factory.constructor.name === "StorageBrowserPolicyFactory";
|
|
194
193
|
}
|
|
195
194
|
function isStorageRetryPolicyFactory(factory) {
|
|
196
|
-
if (factory instanceof
|
|
195
|
+
if (factory instanceof import_storage_common.StorageRetryPolicyFactory) {
|
|
197
196
|
return true;
|
|
198
197
|
}
|
|
199
198
|
return factory.constructor.name === "StorageRetryPolicyFactory";
|
|
@@ -245,3 +244,4 @@ function isCoreHttpPolicyFactory(factory) {
|
|
|
245
244
|
isPipelineLike,
|
|
246
245
|
newPipeline
|
|
247
246
|
});
|
|
247
|
+
//# sourceMappingURL=Pipeline.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["
|
|
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\";\n\nimport { logger } from \"./log.js\";\nimport type { StorageRetryOptions } from \"@azure/storage-blob\";\nimport { StorageRetryPolicyFactory } from \"@azure/storage-blob\";\nimport { StorageSharedKeyCredential } from \"./credentials/StorageSharedKeyCredential.js\";\nimport { AnonymousCredential } from \"@azure/storage-blob\";\nimport {\n StorageOAuthScopes,\n StorageDataLakeLoggingAllowedHeaderNames,\n StorageDataLakeLoggingAllowedQueryParameters,\n SDK_VERSION,\n} from \"./utils/constants.js\";\nimport {\n getCachedDefaultHttpClient,\n storageRequestFailureDetailsParserPolicy,\n} from \"@azure/storage-common\";\nimport { storageBrowserPolicy } from \"@azure/storage-common\";\nimport { StorageBrowserPolicyFactory } from \"@azure/storage-common\";\nimport { storageCorrectContentLengthPolicy } from \"@azure/storage-common\";\nimport { storageRetryPolicy } from \"@azure/storage-common\";\nimport { storageSharedKeyCredentialPolicy } from \"@azure/storage-common\";\nimport {\n ServiceClientOptions,\n PipelineOptions,\n PipelineLike,\n isPipelineLike,\n Pipeline,\n} from \"@azure/storage-blob\";\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 type ServiceClientOptions,\n type PipelineOptions,\n type 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(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;AAElC,iBAAuB;
|
|
6
|
-
"names": ["
|
|
3
|
+
"sources": ["../../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\";\n\nimport { logger } from \"./log.js\";\nimport { StorageSharedKeyCredential } from \"./credentials/StorageSharedKeyCredential.js\";\nimport {\n AnonymousCredential,\n StorageRetryOptions,\n StorageRetryPolicyFactory,\n} from \"@azure/storage-common\";\nimport {\n StorageOAuthScopes,\n StorageDataLakeLoggingAllowedHeaderNames,\n StorageDataLakeLoggingAllowedQueryParameters,\n SDK_VERSION,\n} from \"./utils/constants.js\";\nimport {\n getCachedDefaultHttpClient,\n storageRequestFailureDetailsParserPolicy,\n} from \"@azure/storage-common\";\nimport { storageBrowserPolicy } from \"@azure/storage-common\";\nimport { StorageBrowserPolicyFactory } from \"@azure/storage-common\";\nimport { storageCorrectContentLengthPolicy } from \"@azure/storage-common\";\nimport { storageRetryPolicy } from \"@azure/storage-common\";\nimport { storageSharedKeyCredentialPolicy } from \"@azure/storage-common\";\nimport {\n ServiceClientOptions,\n PipelineOptions,\n PipelineLike,\n isPipelineLike,\n Pipeline,\n} from \"@azure/storage-blob\";\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 type ServiceClientOptions,\n type PipelineOptions,\n type 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(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;AAElC,iBAAuB;AACvB,wCAA2C;AAC3C,4BAIO;AACP,uBAKO;AACP,IAAAA,yBAGO;AACP,IAAAA,yBAAqC;AACrC,IAAAA,yBAA4C;AAC5C,IAAAA,yBAAkD;AAClD,IAAAA,yBAAmC;AACnC,IAAAA,yBAAiD;AACjD,0BAMO;AA2DA,SAAS,YACd,YACA,kBAA0C,CAAC,GACjC;AACV,MAAI,CAAC,YAAY;AACf,iBAAa,IAAI,0CAAoB;AAAA,EACvC;AACA,QAAM,WAAW,IAAI,6BAAS,CAAC,GAAG,eAAe;AACjD,EAAC,SAAiB,cAAc;AAChC,SAAO;AACT;AAEA,SAAS,yBACP,UACsE;AACtE,QAAM,wBAAwB;AAAA,IAC5B;AAAA,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AAiB,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": ["import_storage_common"]
|
|
7
7
|
}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import type { TokenCredential } from "@azure/core-auth";
|
|
2
2
|
import type { StorageClient as StorageClientContext } from "./generated/src/index.js";
|
|
3
3
|
import type { Pipeline, PipelineLike } from "./Pipeline.js";
|
|
4
|
-
import type { AnonymousCredential } from "@azure/storage-
|
|
5
|
-
import type { StorageSharedKeyCredential } from "@azure/storage-blob";
|
|
4
|
+
import type { AnonymousCredential, StorageSharedKeyCredential } from "@azure/storage-common";
|
|
6
5
|
import type { OperationTracingOptions } from "@azure/core-tracing";
|
|
7
6
|
import { DataLakeClientConfig } from "./models.js";
|
|
8
7
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StorageClient.d.ts","sourceRoot":"","sources":["../../src/StorageClient.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAExD,OAAO,KAAK,EAAE,aAAa,IAAI,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AACtF,OAAO,KAAK,EAAE,QAAQ,EAAE,YAAY,EAA0B,MAAM,eAAe,CAAC;AACpF,OAAO,KAAK,EAAE,mBAAmB,EAAE,
|
|
1
|
+
{"version":3,"file":"StorageClient.d.ts","sourceRoot":"","sources":["../../src/StorageClient.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAExD,OAAO,KAAK,EAAE,aAAa,IAAI,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AACtF,OAAO,KAAK,EAAE,QAAQ,EAAE,YAAY,EAA0B,MAAM,eAAe,CAAC;AACpF,O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.\n\nimport type { TokenCredential } from \"@azure/core-auth\";\nimport { StorageContextClient } from \"./StorageContextClient.js\";\nimport type { StorageClient as StorageClientContext } from \"./generated/src/index.js\";\nimport type { Pipeline, PipelineLike, StoragePipelineOptions } from \"./Pipeline.js\";\nimport type { AnonymousCredential } from \"@azure/storage-
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAIA,kCAAqC;AAIrC,0BAAkC;
|
|
3
|
+
"sources": ["../../src/StorageClient.ts"],
|
|
4
|
+
"sourcesContent": ["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { TokenCredential } from \"@azure/core-auth\";\nimport { StorageContextClient } from \"./StorageContextClient.js\";\nimport type { StorageClient as StorageClientContext } from \"./generated/src/index.js\";\nimport type { Pipeline, PipelineLike, StoragePipelineOptions } from \"./Pipeline.js\";\nimport type { AnonymousCredential, StorageSharedKeyCredential } from \"@azure/storage-common\";\nimport { BlobServiceClient } from \"@azure/storage-blob\";\nimport { toBlobEndpointUrl, toDfsEndpointUrl } from \"./transforms.js\";\nimport {\n escapeURLPath,\n getAccountNameFromUrl,\n getURLScheme,\n iEqual,\n} from \"./utils/utils.common.js\";\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\";\nimport { DataLakeClientConfig } from \"./models.js\";\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 *\n */\n protected readonly dataLakeClientConfig?: DataLakeClientConfig;\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, options?: DataLakeClientConfig) {\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 this.dataLakeClientConfig = options;\n }\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAIA,kCAAqC;AAIrC,0BAAkC;AAClC,wBAAoD;AACpD,0BAKO;AAcP,SAAS,qBAAqB,UAAkD;AAC9E,QAAM,EAAE,YAAY,UAAU,GAAG,YAAY,IAAI,SAAS;AAC1D,QAAM,aAA0B,SAAiB;AACjD,MAAI,CAAC,YAAY;AACf,UAAM,IAAI,MAAM,2DAA2D;AAAA,EAC7E;AAEA,QAAM,eAA8B,SAAiB;AACrD,MAAI,CAAC,cAAc;AACjB,UAAM,IAAI,MAAM,yDAAyD;AAAA,EAC3E;AACA,SAAO;AAAA,IACL,GAAG;AAAA,IACH,yBAAyB;AAAA,IACzB;AAAA,IACA,UAAU;AAAA,EACZ;AACF;AAMO,MAAe,cAAc;AAAA;AAAA;AAAA;AAAA,EAIlB;AAAA,EAEA;AAAA;AAAA;AAAA;AAAA,EAKG;AAAA;AAAA;AAAA;AAAA,EAKA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAOA;AAAA;AAAA;AAAA;AAAA,EAKH;AAAA;AAAA;AAAA;AAAA;AAAA,EAMG;AAAA;AAAA;AAAA;AAAA;AAAA,EAMA;AAAA;AAAA;AAAA,EAIA;AAAA;AAAA;AAAA;AAAA,EAKA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAOT,YAAY,KAAa,UAAwB,SAAgC;AAEzF,SAAK,UAAM,mCAAc,GAAG;AAC5B,SAAK,sBAAkB,qCAAkB,KAAK,GAAG;AACjD,SAAK,qBAAiB,oCAAiB,KAAK,GAAG;AAC/C,SAAK,kBAAc,2CAAsB,KAAK,eAAe;AAC7D,SAAK,WAAW;AAEhB,UAAM,aAAa,IAAI,sCAAkB,KAAK,QAAQ;AACtD,SAAK,uBAAuB,IAAI;AAAA,MAC9B,KAAK;AAAA,MACL,qBAAqB,QAAQ;AAAA,IAC/B;AAEA,SAAK,qCAAqC,IAAI;AAAA,MAC5C,KAAK;AAAA,MACL,qBAAqB,QAAQ;AAAA,IAC/B;AAEA,SAAK,cAAU,gCAAO,kCAAa,KAAK,GAAG,KAAK,IAAI,OAAO;AAE3D,SAAK,aAAc,WAAmB;AAGtC,UAAM,uBAAuB,KAAK;AAClC,yBAAqB,qBAAqB;AAC1C,UAAM,uCAAuC,KAAK;AAClD,yCAAqC,qBAAqB;AAC1D,SAAK,uBAAuB;AAAA,EAC9B;AACF;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["
|
|
3
|
+
"sources": ["../../src/StorageContextClient.ts"],
|
|
4
4
|
"sourcesContent": ["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { OperationArguments, OperationSpec } from \"@azure/core-client\";\nimport { isNodeLike } from \"@azure/core-util\";\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 !isNodeLike &&\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"],
|
|
5
5
|
"mappings": ";;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAIA,uBAA2B;AAC3B,iBAA8B;AAKvB,MAAM,6BAA6B,yBAAc;AAAA,EACtD,MAAM,qBACJ,oBACA,eACY;AACZ,UAAM,sBAAsB,EAAE,GAAG,cAAc;AAE/C,QACE,CAAC,+BACD,CAAC,cAAc,eACf,cAAc,kBAAkB;AAAA,MAC9B,CAAC,UAAU,MAAM,OAAO,mBAAmB;AAAA,IAC7C,GACA;AACA,0BAAoB,YAAY;AAChC,0BAAoB,cAAc;AAAA,QAChC,eAAe;AAAA,QACf,QAAQ;AAAA,UACN,gBAAgB;AAAA,UAChB,YAAY;AAAA,UACZ,cAAc;AAAA,UACd,MAAM;AAAA,YACJ,MAAM;AAAA,UACR;AAAA,QACF;AAAA,MACF;AAAA,IACF;AAEA,QACE,oBAAoB,SAAS,mBAC7B,oBAAoB,SAAS,wBAC7B;AACA,0BAAoB,OAAO;AAAA,IAC7B;AACA,WAAO,MAAM,qBAAqB,oBAAoB,mBAAmB;AAAA,EAC3E;AACF;",
|
|
6
6
|
"names": []
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import type { TokenCredential } from "@azure/core-auth";
|
|
2
2
|
import type { RequestBodyType as HttpRequestBody } from "@azure/core-rest-pipeline";
|
|
3
3
|
import type { Pipeline } from "./Pipeline.js";
|
|
4
|
-
import { AnonymousCredential } from "@azure/storage-
|
|
4
|
+
import { AnonymousCredential } from "@azure/storage-common";
|
|
5
5
|
import { StorageSharedKeyCredential } from "./credentials/StorageSharedKeyCredential.js";
|
|
6
6
|
import type { Readable } from "node:stream";
|
|
7
7
|
import type { UserDelegationKey } from "@azure/storage-common";
|
|
8
8
|
import { DataLakeLeaseClient } from "./DataLakeLeaseClient.js";
|
|
9
|
-
import type { DataLakeClientConfig,
|
|
9
|
+
import type { DataLakeClientConfig, DataLakeFileClientOptions, DataLakePathClientOptions, DirectoryCreateIfNotExistsOptions, DirectoryCreateIfNotExistsResponse, DirectoryCreateOptions, DirectoryCreateResponse, DirectoryGenerateSasUrlOptions, FileAppendOptions, FileAppendResponse, FileCreateIfNotExistsOptions, FileCreateIfNotExistsResponse, FileCreateOptions, FileCreateResponse, FileExpiryMode, FileFlushOptions, FileFlushResponse, FileGenerateSasUrlOptions, FileParallelUploadOptions, FileQueryOptions, FileReadOptions, FileReadResponse, FileReadToBufferOptions, FileSetExpiryOptions, FileSetExpiryResponse, FileUploadResponse, Metadata, PathAccessControlItem, PathChangeAccessControlRecursiveOptions, PathChangeAccessControlRecursiveResponse, PathCreateIfNotExistsOptions, PathCreateIfNotExistsResponse, PathCreateOptions, PathCreateResponse, PathDeleteIfExistsResponse, PathDeleteOptions, PathDeleteResponse, PathExistsOptions, PathGetAccessControlOptions, PathGetAccessControlResponse, PathGetPropertiesOptions, PathGetPropertiesResponse, PathHttpHeaders, PathMoveOptions, PathMoveResponse, PathPermissions, PathResourceTypeModel, PathSetAccessControlOptions, PathSetAccessControlResponse, PathSetHttpHeadersOptions, PathSetHttpHeadersResponse, PathSetMetadataOptions, PathSetMetadataResponse, PathSetPermissionsOptions, PathSetPermissionsResponse, RemovePathAccessControlItem } from "./models.js";
|
|
10
10
|
import { StorageClient } from "./StorageClient.js";
|
|
11
11
|
/**
|
|
12
12
|
* A DataLakePathClient represents a URL to the Azure Storage path (directory or file).
|
|
@@ -40,7 +40,7 @@ export declare class DataLakePathClient extends StorageClient {
|
|
|
40
40
|
* @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.
|
|
41
41
|
* @param options - Optional. Options to configure the HTTP pipeline.
|
|
42
42
|
*/
|
|
43
|
-
constructor(url: string, credential?: StorageSharedKeyCredential | AnonymousCredential | TokenCredential, options?:
|
|
43
|
+
constructor(url: string, credential?: StorageSharedKeyCredential | AnonymousCredential | TokenCredential, options?: DataLakePathClientOptions);
|
|
44
44
|
/**
|
|
45
45
|
* Creates an instance of DataLakePathClient from url and pipeline.
|
|
46
46
|
*
|
|
@@ -358,7 +358,7 @@ export declare class DataLakeFileClient extends DataLakePathClient {
|
|
|
358
358
|
* @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.
|
|
359
359
|
* @param options - Optional. Options to configure the HTTP pipeline.
|
|
360
360
|
*/
|
|
361
|
-
constructor(url: string, credential?: StorageSharedKeyCredential | AnonymousCredential | TokenCredential, options?:
|
|
361
|
+
constructor(url: string, credential?: StorageSharedKeyCredential | AnonymousCredential | TokenCredential, options?: DataLakeFileClientOptions);
|
|
362
362
|
/**
|
|
363
363
|
* Creates an instance of DataLakeFileClient from url and pipeline.
|
|
364
364
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"clients.d.ts","sourceRoot":"","sources":["../../src/clients.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAExD,OAAO,KAAK,EAAE,eAAe,IAAI,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAEpF,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAG9C,OAAO,EAAE,mBAAmB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"clients.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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA2CG;IACU,KAAK,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,GAAE,gBAAqB,GAAG,OAAO,CAAC,gBAAgB,CAAC;IAmB5F;;;;;OAKG;IACU,SAAS,CACpB,IAAI,EAAE,cAAc,EACpB,OAAO,GAAE,oBAAyB,GACjC,OAAO,CAAC,qBAAqB,CAAC;IAsCjC;;;;;;;;;;OAUG;IACI,cAAc,CAAC,OAAO,EAAE,yBAAyB,GAAG,OAAO,CAAC,MAAM,CAAC;IAqB1E;;;;;;;;;;OAUG;IAEI,uBAAuB,CAAC,OAAO,EAAE,yBAAyB,GAAG,MAAM;IAiB1E;;;;;;;;;OASG;IACI,4BAA4B,CACjC,OAAO,EAAE,yBAAyB,EAClC,iBAAiB,EAAE,iBAAiB,GACnC,OAAO,CAAC,MAAM,CAAC;IAgBlB;;;;;;;;;OASG;IAEI,qCAAqC,CAC1C,OAAO,EAAE,yBAAyB,EAClC,iBAAiB,EAAE,iBAAiB,GACnC,MAAM;CAWV"}
|
package/dist/commonjs/clients.js
CHANGED
|
@@ -26,9 +26,9 @@ var import_core_auth = require("@azure/core-auth");
|
|
|
26
26
|
var import_core_util = require("@azure/core-util");
|
|
27
27
|
var import_Pipeline = require("./Pipeline.js");
|
|
28
28
|
var import_storage_blob = require("@azure/storage-blob");
|
|
29
|
-
var import_storage_blob2 = require("@azure/storage-blob");
|
|
30
|
-
var import_StorageSharedKeyCredential = require("./credentials/StorageSharedKeyCredential.js");
|
|
31
29
|
var import_storage_common = require("@azure/storage-common");
|
|
30
|
+
var import_StorageSharedKeyCredential = require("./credentials/StorageSharedKeyCredential.js");
|
|
31
|
+
var import_storage_common2 = require("@azure/storage-common");
|
|
32
32
|
var import_DataLakeLeaseClient = require("./DataLakeLeaseClient.js");
|
|
33
33
|
var import_operations = require("./generated/src/operations/index.js");
|
|
34
34
|
var import_DataLakeSASSignatureValues = require("./sas/DataLakeSASSignatureValues.js");
|
|
@@ -125,7 +125,7 @@ class DataLakePathClient extends import_StorageClient.StorageClient {
|
|
|
125
125
|
} else {
|
|
126
126
|
let credential;
|
|
127
127
|
if (credentialOrPipeline === void 0) {
|
|
128
|
-
credential = new
|
|
128
|
+
credential = new import_storage_common.AnonymousCredential();
|
|
129
129
|
} else {
|
|
130
130
|
credential = credentialOrPipeline;
|
|
131
131
|
}
|
|
@@ -800,7 +800,7 @@ class DataLakeFileClient extends DataLakePathClient {
|
|
|
800
800
|
} else {
|
|
801
801
|
let credential;
|
|
802
802
|
if (credentialOrPipeline === void 0) {
|
|
803
|
-
credential = new
|
|
803
|
+
credential = new import_storage_common.AnonymousCredential();
|
|
804
804
|
} else {
|
|
805
805
|
credential = credentialOrPipeline;
|
|
806
806
|
}
|
|
@@ -1237,7 +1237,7 @@ class DataLakeFileClient extends DataLakePathClient {
|
|
|
1237
1237
|
throw new RangeError(`maxConcurrency must be > 0.`);
|
|
1238
1238
|
}
|
|
1239
1239
|
let transferProgress = 0;
|
|
1240
|
-
const scheduler = new
|
|
1240
|
+
const scheduler = new import_storage_common2.BufferScheduler(
|
|
1241
1241
|
stream,
|
|
1242
1242
|
options.chunkSize,
|
|
1243
1243
|
options.maxConcurrency,
|
|
@@ -1558,3 +1558,4 @@ class DataLakeFileClient extends DataLakePathClient {
|
|
|
1558
1558
|
DataLakeFileClient,
|
|
1559
1559
|
DataLakePathClient
|
|
1560
1560
|
});
|
|
1561
|
+
//# sourceMappingURL=clients.js.map
|