@azure/storage-file-datalake
Advanced tools
Comparing version 12.23.1-alpha.20240807.2 to 12.24.0-alpha.20240808.2
// Copyright (c) Microsoft Corporation. | ||
// Licensed under the MIT license. | ||
export const SDK_VERSION = "12.24.1"; | ||
export const SERVICE_VERSION = "2024-08-04"; | ||
export const SDK_VERSION = "12.25.0-beta.1"; | ||
export const SERVICE_VERSION = "2024-11-04"; | ||
export const BLOCK_BLOB_MAX_UPLOAD_BLOB_BYTES = 256 * 1024 * 1024; // 256MB | ||
@@ -6,0 +6,0 @@ export const BLOCK_BLOB_MAX_STAGE_BLOCK_BYTES = 4000 * 1024 * 1024; // 4000MB |
@@ -12,3 +12,3 @@ // Copyright (c) Microsoft Corporation. | ||
import { PathOperationsImpl as Path } from "./generated/src/operations"; | ||
import { generateDataLakeSASQueryParameters } from "./sas/DataLakeSASSignatureValues"; | ||
import { generateDataLakeSASQueryParameters, generateDataLakeSASQueryParametersInternal, } from "./sas/DataLakeSASSignatureValues"; | ||
import { StorageClient } from "./StorageClient"; | ||
@@ -1057,3 +1057,21 @@ import { toAccessControlChangeFailureArray, toAcl, toAclString, toBlobCpkInfo, toPermissions, toPermissionsString, toProperties, } from "./transforms"; | ||
} | ||
/** | ||
* Only available for clients constructed with a shared key credential. | ||
* | ||
* Generates string to sign for a Service Shared Access Signature (SAS) URI based on the client properties | ||
* and parameters passed in. The SAS is signed by the shared key credential of the client. | ||
* | ||
* @see https://docs.microsoft.com/en-us/rest/api/storageservices/constructing-a-service-sas | ||
* | ||
* @param options - Optional parameters. | ||
* @returns The SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token. | ||
*/ | ||
/* eslint-disable-next-line @azure/azure-sdk/ts-naming-options*/ | ||
generateSasStringToSign(options) { | ||
if (!(this.credential instanceof StorageSharedKeyCredential)) { | ||
throw RangeError("Can only generate the SAS when the client is initialized with a shared key credential"); | ||
} | ||
return generateDataLakeSASQueryParametersInternal(Object.assign({ fileSystemName: this.fileSystemName, pathName: this.name }, options), this.credential).stringToSign; | ||
} | ||
} | ||
//# sourceMappingURL=clients.js.map |
@@ -13,3 +13,3 @@ import { __asyncDelegator, __asyncGenerator, __asyncValues, __await } from "tslib"; | ||
import { DataLakeFileClient, DataLakeDirectoryClient } from "./clients"; | ||
import { generateDataLakeSASQueryParameters } from "./sas/DataLakeSASSignatureValues"; | ||
import { generateDataLakeSASQueryParameters, generateDataLakeSASQueryParametersInternal, } from "./sas/DataLakeSASSignatureValues"; | ||
import { DeletionIdKey, PathResultTypeConstants } from "./utils/constants"; | ||
@@ -536,3 +536,21 @@ import { PathClientInternal } from "./utils/PathClientInternal"; | ||
} | ||
/** | ||
* Only available for DataLakeFileSystemClient constructed with a shared key credential. | ||
* | ||
* Generates string to sign for a Service Shared Access Signature (SAS) URI based on the client properties | ||
* and parameters passed in. The SAS is signed by the shared key credential of the client. | ||
* | ||
* @see https://docs.microsoft.com/en-us/rest/api/storageservices/constructing-a-service-sas | ||
* | ||
* @param options - Optional parameters. | ||
* @returns The SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token. | ||
*/ | ||
/* eslint-disable-next-line @azure/azure-sdk/ts-naming-options*/ | ||
generateSasStringToSign(options) { | ||
if (!(this.credential instanceof StorageSharedKeyCredential)) { | ||
throw RangeError("Can only generate the SAS when the client is initialized with a shared key credential"); | ||
} | ||
return generateDataLakeSASQueryParametersInternal(Object.assign({ fileSystemName: this.name }, options), this.credential).stringToSign; | ||
} | ||
} | ||
//# sourceMappingURL=DataLakeFileSystemClient.js.map |
@@ -15,3 +15,3 @@ // Copyright (c) Microsoft Corporation. | ||
import { AccountSASPermissions } from "./sas/AccountSASPermissions"; | ||
import { generateAccountSASQueryParameters } from "./sas/AccountSASSignatureValues"; | ||
import { generateAccountSASQueryParameters, generateAccountSASQueryParametersInternal, } from "./sas/AccountSASSignatureValues"; | ||
import { AccountSASServices } from "./sas/AccountSASServices"; | ||
@@ -242,2 +242,28 @@ /** | ||
/** | ||
* Only available for DataLakeServiceClient constructed with a shared key credential. | ||
* | ||
* Generates string to sign for an account Shared Access Signature (SAS) based on the client properties | ||
* and parameters passed in. The SAS is signed by the shared key credential of the client. | ||
* | ||
* @see https://docs.microsoft.com/en-us/rest/api/storageservices/create-account-sas | ||
* | ||
* @param expiresOn - Optional. The time at which the shared access signature becomes invalid. Default to an hour later if not specified. | ||
* @param permissions - Specifies the list of permissions to be associated with the SAS. | ||
* @param resourceTypes - Specifies the resource types associated with the shared access signature. | ||
* @param options - Optional parameters. | ||
* @returns An account SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token. | ||
*/ | ||
generateSasStringToSign(expiresOn, permissions = AccountSASPermissions.parse("r"), resourceTypes = "sco", options = {}) { | ||
if (!(this.credential instanceof StorageSharedKeyCredential)) { | ||
throw RangeError("Can only generate the account SAS when the client is initialized with a shared key credential"); | ||
} | ||
if (expiresOn === undefined) { | ||
const now = new Date(); | ||
expiresOn = new Date(now.getTime() + 3600 * 1000); | ||
} | ||
return generateAccountSASQueryParametersInternal(Object.assign({ permissions, | ||
expiresOn, | ||
resourceTypes, services: AccountSASServices.parse("b").toString() }, options), this.credential).stringToSign; | ||
} | ||
/** | ||
* Renames an existing File System. | ||
@@ -244,0 +270,0 @@ * |
@@ -101,3 +101,3 @@ /* | ||
mapper: { | ||
defaultValue: "2024-08-04", | ||
defaultValue: "2024-11-04", | ||
isConstant: true, | ||
@@ -104,0 +104,0 @@ serializedName: "x-ms-version", |
@@ -29,3 +29,3 @@ /* | ||
}; | ||
const packageDetails = `azsdk-js-azure-storage-datalake/12.23.0`; | ||
const packageDetails = `azsdk-js-azure-storage-datalake/12.24.0-beta.1`; | ||
const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix | ||
@@ -41,3 +41,3 @@ ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}` | ||
// Assigning values to Constant parameters | ||
this.version = options.version || "2024-08-04"; | ||
this.version = options.version || "2024-11-04"; | ||
this.resource = options.resource || "filesystem"; | ||
@@ -44,0 +44,0 @@ this.service = new ServiceImpl(this); |
@@ -10,5 +10,5 @@ // Copyright (c) Microsoft Corporation. | ||
export * from "./sas/AccountSASServices"; | ||
export * from "./sas/AccountSASSignatureValues"; | ||
export { generateAccountSASQueryParameters, } from "./sas/AccountSASSignatureValues"; | ||
export * from "./sas/DataLakeSASPermissions"; | ||
export * from "./sas/DataLakeSASSignatureValues"; | ||
export { generateDataLakeSASQueryParameters, } from "./sas/DataLakeSASSignatureValues"; | ||
export * from "./sas/FileSystemSASPermissions"; | ||
@@ -15,0 +15,0 @@ export * from "./sas/SASQueryParameters"; |
@@ -22,2 +22,6 @@ // Copyright (c) Microsoft Corporation. | ||
export function generateAccountSASQueryParameters(accountSASSignatureValues, sharedKeyCredential) { | ||
return generateAccountSASQueryParametersInternal(accountSASSignatureValues, sharedKeyCredential) | ||
.sasQueryParameters; | ||
} | ||
export function generateAccountSASQueryParametersInternal(accountSASSignatureValues, sharedKeyCredential) { | ||
const version = accountSASSignatureValues.version | ||
@@ -64,4 +68,7 @@ ? accountSASSignatureValues.version | ||
const signature = sharedKeyCredential.computeHMACSHA256(stringToSign); | ||
return new SASQueryParameters(version, signature, parsedPermissions.toString(), parsedServices, parsedResourceTypes, accountSASSignatureValues.protocol, accountSASSignatureValues.startsOn, accountSASSignatureValues.expiresOn, accountSASSignatureValues.ipRange, undefined, undefined, undefined, undefined, undefined, undefined, undefined, undefined, undefined, undefined, undefined, undefined, accountSASSignatureValues.encryptionScope); | ||
return { | ||
sasQueryParameters: new SASQueryParameters(version, signature, parsedPermissions.toString(), parsedServices, parsedResourceTypes, accountSASSignatureValues.protocol, accountSASSignatureValues.startsOn, accountSASSignatureValues.expiresOn, accountSASSignatureValues.ipRange, undefined, undefined, undefined, undefined, undefined, undefined, undefined, undefined, undefined, undefined, undefined, undefined, accountSASSignatureValues.encryptionScope), | ||
stringToSign: stringToSign, | ||
}; | ||
} | ||
//# sourceMappingURL=AccountSASSignatureValues.js.map |
@@ -13,2 +13,5 @@ // Copyright (c) Microsoft Corporation. | ||
export function generateDataLakeSASQueryParameters(dataLakeSASSignatureValues, sharedKeyCredentialOrUserDelegationKey, accountName) { | ||
return generateDataLakeSASQueryParametersInternal(dataLakeSASSignatureValues, sharedKeyCredentialOrUserDelegationKey, accountName).sasQueryParameter; | ||
} | ||
export function generateDataLakeSASQueryParametersInternal(dataLakeSASSignatureValues, sharedKeyCredentialOrUserDelegationKey, accountName) { | ||
const version = dataLakeSASSignatureValues.version | ||
@@ -124,3 +127,6 @@ ? dataLakeSASSignatureValues.version | ||
const signature = sharedKeyCredential.computeHMACSHA256(stringToSign); | ||
return new SASQueryParameters(version, signature, verifiedPermissions, undefined, undefined, dataLakeSASSignatureValues.protocol, dataLakeSASSignatureValues.startsOn, dataLakeSASSignatureValues.expiresOn, dataLakeSASSignatureValues.ipRange, dataLakeSASSignatureValues.identifier, resource, dataLakeSASSignatureValues.cacheControl, dataLakeSASSignatureValues.contentDisposition, dataLakeSASSignatureValues.contentEncoding, dataLakeSASSignatureValues.contentLanguage, dataLakeSASSignatureValues.contentType); | ||
return { | ||
sasQueryParameter: new SASQueryParameters(version, signature, verifiedPermissions, undefined, undefined, dataLakeSASSignatureValues.protocol, dataLakeSASSignatureValues.startsOn, dataLakeSASSignatureValues.expiresOn, dataLakeSASSignatureValues.ipRange, dataLakeSASSignatureValues.identifier, resource, dataLakeSASSignatureValues.cacheControl, dataLakeSASSignatureValues.contentDisposition, dataLakeSASSignatureValues.contentEncoding, dataLakeSASSignatureValues.contentLanguage, dataLakeSASSignatureValues.contentType), | ||
stringToSign: stringToSign, | ||
}; | ||
} | ||
@@ -204,3 +210,6 @@ /** | ||
const signature = sharedKeyCredential.computeHMACSHA256(stringToSign); | ||
return new SASQueryParameters(version, signature, verifiedPermissions, undefined, undefined, dataLakeSASSignatureValues.protocol, dataLakeSASSignatureValues.startsOn, dataLakeSASSignatureValues.expiresOn, dataLakeSASSignatureValues.ipRange, dataLakeSASSignatureValues.identifier, resource, dataLakeSASSignatureValues.cacheControl, dataLakeSASSignatureValues.contentDisposition, dataLakeSASSignatureValues.contentEncoding, dataLakeSASSignatureValues.contentLanguage, dataLakeSASSignatureValues.contentType, undefined, dataLakeSASSignatureValues.directoryDepth); | ||
return { | ||
sasQueryParameter: new SASQueryParameters(version, signature, verifiedPermissions, undefined, undefined, dataLakeSASSignatureValues.protocol, dataLakeSASSignatureValues.startsOn, dataLakeSASSignatureValues.expiresOn, dataLakeSASSignatureValues.ipRange, dataLakeSASSignatureValues.identifier, resource, dataLakeSASSignatureValues.cacheControl, dataLakeSASSignatureValues.contentDisposition, dataLakeSASSignatureValues.contentEncoding, dataLakeSASSignatureValues.contentLanguage, dataLakeSASSignatureValues.contentType, undefined, dataLakeSASSignatureValues.directoryDepth), | ||
stringToSign: stringToSign, | ||
}; | ||
} | ||
@@ -288,3 +297,6 @@ /** | ||
const signature = userDelegationKeyCredential.computeHMACSHA256(stringToSign); | ||
return new SASQueryParameters(version, signature, verifiedPermissions, undefined, undefined, dataLakeSASSignatureValues.protocol, dataLakeSASSignatureValues.startsOn, dataLakeSASSignatureValues.expiresOn, dataLakeSASSignatureValues.ipRange, dataLakeSASSignatureValues.identifier, resource, dataLakeSASSignatureValues.cacheControl, dataLakeSASSignatureValues.contentDisposition, dataLakeSASSignatureValues.contentEncoding, dataLakeSASSignatureValues.contentLanguage, dataLakeSASSignatureValues.contentType, userDelegationKeyCredential.userDelegationKey, dataLakeSASSignatureValues.directoryDepth, dataLakeSASSignatureValues.preauthorizedAgentObjectId, dataLakeSASSignatureValues.agentObjectId, dataLakeSASSignatureValues.correlationId); | ||
return { | ||
sasQueryParameter: new SASQueryParameters(version, signature, verifiedPermissions, undefined, undefined, dataLakeSASSignatureValues.protocol, dataLakeSASSignatureValues.startsOn, dataLakeSASSignatureValues.expiresOn, dataLakeSASSignatureValues.ipRange, dataLakeSASSignatureValues.identifier, resource, dataLakeSASSignatureValues.cacheControl, dataLakeSASSignatureValues.contentDisposition, dataLakeSASSignatureValues.contentEncoding, dataLakeSASSignatureValues.contentLanguage, dataLakeSASSignatureValues.contentType, userDelegationKeyCredential.userDelegationKey, dataLakeSASSignatureValues.directoryDepth, dataLakeSASSignatureValues.preauthorizedAgentObjectId, dataLakeSASSignatureValues.agentObjectId, dataLakeSASSignatureValues.correlationId), | ||
stringToSign: stringToSign, | ||
}; | ||
} | ||
@@ -375,3 +387,6 @@ /** | ||
const signature = userDelegationKeyCredential.computeHMACSHA256(stringToSign); | ||
return new SASQueryParameters(version, signature, verifiedPermissions, undefined, undefined, dataLakeSASSignatureValues.protocol, dataLakeSASSignatureValues.startsOn, dataLakeSASSignatureValues.expiresOn, dataLakeSASSignatureValues.ipRange, dataLakeSASSignatureValues.identifier, resource, dataLakeSASSignatureValues.cacheControl, dataLakeSASSignatureValues.contentDisposition, dataLakeSASSignatureValues.contentEncoding, dataLakeSASSignatureValues.contentLanguage, dataLakeSASSignatureValues.contentType, userDelegationKeyCredential.userDelegationKey, dataLakeSASSignatureValues.directoryDepth, dataLakeSASSignatureValues.preauthorizedAgentObjectId, dataLakeSASSignatureValues.agentObjectId, dataLakeSASSignatureValues.correlationId); | ||
return { | ||
sasQueryParameter: new SASQueryParameters(version, signature, verifiedPermissions, undefined, undefined, dataLakeSASSignatureValues.protocol, dataLakeSASSignatureValues.startsOn, dataLakeSASSignatureValues.expiresOn, dataLakeSASSignatureValues.ipRange, dataLakeSASSignatureValues.identifier, resource, dataLakeSASSignatureValues.cacheControl, dataLakeSASSignatureValues.contentDisposition, dataLakeSASSignatureValues.contentEncoding, dataLakeSASSignatureValues.contentLanguage, dataLakeSASSignatureValues.contentType, userDelegationKeyCredential.userDelegationKey, dataLakeSASSignatureValues.directoryDepth, dataLakeSASSignatureValues.preauthorizedAgentObjectId, dataLakeSASSignatureValues.agentObjectId, dataLakeSASSignatureValues.correlationId), | ||
stringToSign: stringToSign, | ||
}; | ||
} | ||
@@ -456,3 +471,6 @@ /** | ||
const signature = sharedKeyCredential.computeHMACSHA256(stringToSign); | ||
return new SASQueryParameters(version, signature, verifiedPermissions, undefined, undefined, dataLakeSASSignatureValues.protocol, dataLakeSASSignatureValues.startsOn, dataLakeSASSignatureValues.expiresOn, dataLakeSASSignatureValues.ipRange, dataLakeSASSignatureValues.identifier, resource, dataLakeSASSignatureValues.cacheControl, dataLakeSASSignatureValues.contentDisposition, dataLakeSASSignatureValues.contentEncoding, dataLakeSASSignatureValues.contentLanguage, dataLakeSASSignatureValues.contentType, undefined, dataLakeSASSignatureValues.directoryDepth, undefined, undefined, undefined, dataLakeSASSignatureValues.encryptionScope); | ||
return { | ||
sasQueryParameter: new SASQueryParameters(version, signature, verifiedPermissions, undefined, undefined, dataLakeSASSignatureValues.protocol, dataLakeSASSignatureValues.startsOn, dataLakeSASSignatureValues.expiresOn, dataLakeSASSignatureValues.ipRange, dataLakeSASSignatureValues.identifier, resource, dataLakeSASSignatureValues.cacheControl, dataLakeSASSignatureValues.contentDisposition, dataLakeSASSignatureValues.contentEncoding, dataLakeSASSignatureValues.contentLanguage, dataLakeSASSignatureValues.contentType, undefined, dataLakeSASSignatureValues.directoryDepth, undefined, undefined, undefined, dataLakeSASSignatureValues.encryptionScope), | ||
stringToSign: stringToSign, | ||
}; | ||
} | ||
@@ -544,3 +562,6 @@ /** | ||
const signature = userDelegationKeyCredential.computeHMACSHA256(stringToSign); | ||
return new SASQueryParameters(version, signature, verifiedPermissions, undefined, undefined, dataLakeSASSignatureValues.protocol, dataLakeSASSignatureValues.startsOn, dataLakeSASSignatureValues.expiresOn, dataLakeSASSignatureValues.ipRange, dataLakeSASSignatureValues.identifier, resource, dataLakeSASSignatureValues.cacheControl, dataLakeSASSignatureValues.contentDisposition, dataLakeSASSignatureValues.contentEncoding, dataLakeSASSignatureValues.contentLanguage, dataLakeSASSignatureValues.contentType, userDelegationKeyCredential.userDelegationKey, dataLakeSASSignatureValues.directoryDepth, dataLakeSASSignatureValues.preauthorizedAgentObjectId, dataLakeSASSignatureValues.agentObjectId, dataLakeSASSignatureValues.correlationId, dataLakeSASSignatureValues.encryptionScope); | ||
return { | ||
sasQueryParameter: new SASQueryParameters(version, signature, verifiedPermissions, undefined, undefined, dataLakeSASSignatureValues.protocol, dataLakeSASSignatureValues.startsOn, dataLakeSASSignatureValues.expiresOn, dataLakeSASSignatureValues.ipRange, dataLakeSASSignatureValues.identifier, resource, dataLakeSASSignatureValues.cacheControl, dataLakeSASSignatureValues.contentDisposition, dataLakeSASSignatureValues.contentEncoding, dataLakeSASSignatureValues.contentLanguage, dataLakeSASSignatureValues.contentType, userDelegationKeyCredential.userDelegationKey, dataLakeSASSignatureValues.directoryDepth, dataLakeSASSignatureValues.preauthorizedAgentObjectId, dataLakeSASSignatureValues.agentObjectId, dataLakeSASSignatureValues.correlationId, dataLakeSASSignatureValues.encryptionScope), | ||
stringToSign: stringToSign, | ||
}; | ||
} | ||
@@ -547,0 +568,0 @@ function getCanonicalName(accountName, containerName, blobName) { |
// Copyright (c) Microsoft Corporation. | ||
// Licensed under the MIT license. | ||
export const SDK_VERSION = "12.23.1"; | ||
export const SERVICE_VERSION = "2024-08-04"; | ||
export const SDK_VERSION = "12.24.0-beta.1"; | ||
export const SERVICE_VERSION = "2024-11-04"; | ||
export const KB = 1024; | ||
@@ -6,0 +6,0 @@ export const MB = KB * 1024; |
{ | ||
"name": "@azure/storage-file-datalake", | ||
"version": "12.23.1-alpha.20240807.2", | ||
"version": "12.24.0-alpha.20240808.2", | ||
"description": "Microsoft Azure Storage SDK for JavaScript - DataLake", | ||
@@ -128,3 +128,3 @@ "sdk-type": "client", | ||
"@azure/logger": "^1.0.0", | ||
"@azure/storage-blob": "^12.24.0", | ||
"@azure/storage-blob": ">=12.25.0-alpha <12.25.0-alphb", | ||
"events": "^3.0.0", | ||
@@ -131,0 +131,0 @@ "tslib": "^2.2.0" |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
2860031
27579
+ Added@azure/storage-blob@12.25.0-alpha.20240927.1(transitive)
- Removed@azure/storage-blob@12.26.0(transitive)