Skip to content

Commit

Permalink
Prepare for STG79 features preview release. (#18569)
Browse files Browse the repository at this point in the history
  • Loading branch information
EmmaZhu authored Nov 9, 2021
1 parent 50db5df commit 38585d2
Show file tree
Hide file tree
Showing 22 changed files with 186 additions and 78 deletions.
24 changes: 18 additions & 6 deletions common/config/rush/pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion sdk/storage/perf-tests/storage-blob/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"dependencies": {
"@azure/core-http": "^2.0.0",
"@azure/core-rest-pipeline": "^1.1.0",
"@azure/storage-blob": "^12.8.0",
"@azure/storage-blob": "^12.9.0-beta.1",
"@azure/test-utils-perf": "^1.0.0",
"dotenv": "^8.2.0",
"uuid": "^8.3.0"
Expand Down
2 changes: 1 addition & 1 deletion sdk/storage/perf-tests/storage-file-share/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"author": "",
"license": "ISC",
"dependencies": {
"@azure/storage-file-share": "^12.8.1",
"@azure/storage-file-share": "^12.9.0-beta.1",
"@azure/test-utils-perf": "^1.0.0",
"dotenv": "^8.2.0",
"uuid": "^8.3.0"
Expand Down
2 changes: 1 addition & 1 deletion sdk/storage/storage-blob/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Release History

## 12.9.0-beta.1 (Unreleased)
## 12.9.0-beta.1 (2021-11-09)

### Features Added

Expand Down
2 changes: 1 addition & 1 deletion sdk/storage/storage-file-datalake/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Release History

## 12.8.0-beta.1 (Unreleased)
## 12.8.0-beta.1 (2021-11-09)

### Features Added

Expand Down
8 changes: 2 additions & 6 deletions sdk/storage/storage-file-share/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,10 @@
# Release History

## 12.8.1 (Unreleased)
## 12.9.0-beta.1 (2021-11-09)

### Features Added

### Breaking Changes

### Bugs Fixed

### Other Changes
- Added support for service version 2020-12-06.

## 12.8.0 (2021-09-10)

Expand Down
4 changes: 2 additions & 2 deletions sdk/storage/storage-file-share/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@azure/storage-file-share",
"sdk-type": "client",
"version": "12.8.1",
"version": "12.9.0-beta.1",
"description": "Microsoft Azure Storage SDK for JavaScript - File",
"main": "./dist/index.js",
"module": "./dist-esm/src/index.js",
Expand Down Expand Up @@ -122,7 +122,7 @@
"tslib": "^2.2.0"
},
"devDependencies": {
"@azure/storage-blob": "^12.8.0",
"@azure/storage-blob": "^12.9.0-beta.1",
"@azure/dev-tool": "^1.0.0",
"@azure/eslint-plugin-azure-sdk": "^3.0.0",
"@azure/test-utils": "^1.0.0",
Expand Down
48 changes: 34 additions & 14 deletions sdk/storage/storage-file-share/src/AccountSASSignatureValues.ts
Original file line number Diff line number Diff line change
Expand Up @@ -96,20 +96,40 @@ export function generateAccountSASQueryParameters(
accountSASSignatureValues.resourceTypes
).toString();

const stringToSign = [
sharedKeyCredential.accountName,
parsedPermissions,
parsedServices,
parsedResourceTypes,
accountSASSignatureValues.startsOn
? truncatedISO8061Date(accountSASSignatureValues.startsOn, false)
: "",
truncatedISO8061Date(accountSASSignatureValues.expiresOn, false),
accountSASSignatureValues.ipRange ? ipRangeToString(accountSASSignatureValues.ipRange) : "",
accountSASSignatureValues.protocol ? accountSASSignatureValues.protocol : "",
version,
"" // Account SAS requires an additional newline character
].join("\n");
let stringToSign: string;

if (version >= "2020-12-06") {
stringToSign = [
sharedKeyCredential.accountName,
parsedPermissions,
parsedServices,
parsedResourceTypes,
accountSASSignatureValues.startsOn
? truncatedISO8061Date(accountSASSignatureValues.startsOn, false)
: "",
truncatedISO8061Date(accountSASSignatureValues.expiresOn, false),
accountSASSignatureValues.ipRange ? ipRangeToString(accountSASSignatureValues.ipRange) : "",
accountSASSignatureValues.protocol ? accountSASSignatureValues.protocol : "",
version,
"", // Reserved for encryption scope
"" // Account SAS requires an additional newline character
].join("\n");
} else {
stringToSign = [
sharedKeyCredential.accountName,
parsedPermissions,
parsedServices,
parsedResourceTypes,
accountSASSignatureValues.startsOn
? truncatedISO8061Date(accountSASSignatureValues.startsOn, false)
: "",
truncatedISO8061Date(accountSASSignatureValues.expiresOn, false),
accountSASSignatureValues.ipRange ? ipRangeToString(accountSASSignatureValues.ipRange) : "",
accountSASSignatureValues.protocol ? accountSASSignatureValues.protocol : "",
version,
"" // Account SAS requires an additional newline character
].join("\n");
}

const signature: string = sharedKeyCredential.computeHMACSHA256(stringToSign);

Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions sdk/storage/storage-file-share/src/utils/constants.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.

export const SDK_VERSION: string = "12.8.1";
export const SERVICE_VERSION: string = "2020-10-02";
export const SDK_VERSION: string = "12.9.0-beta.1";
export const SERVICE_VERSION: string = "2020-12-06";

export const FILE_MAX_SIZE_BYTES: number = 4 * 1024 * 1024 * 1024 * 1024; // 4TB
export const FILE_RANGE_MAX_SIZE_BYTES: number = 4 * 1024 * 1024; // 4MB
Expand Down
2 changes: 1 addition & 1 deletion sdk/storage/storage-file-share/swagger/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ disable-async-iterators: true
add-credentials: false
use-extension:
"@autorest/typescript": "6.0.0-dev.20210218.1"
package-version: 12.8.1
package-version: 12.9.0-beta.1
```
## Customizations for Track 2 Generator
Expand Down
8 changes: 2 additions & 6 deletions sdk/storage/storage-queue/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,10 @@
# Release History

## 12.7.1 (Unreleased)
## 12.8.0-beta.1 (2021-11-09)

### Features Added

### Breaking Changes

### Bugs Fixed

### Other Changes
- Added support for service version 2020-12-06.

## 12.7.0 (2021-09-10)

Expand Down
2 changes: 1 addition & 1 deletion sdk/storage/storage-queue/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@azure/storage-queue",
"sdk-type": "client",
"version": "12.7.1",
"version": "12.8.0-beta.1",
"description": "Microsoft Azure Storage SDK for JavaScript - Queue",
"main": "./dist/index.js",
"module": "./dist-esm/src/index.js",
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

48 changes: 34 additions & 14 deletions sdk/storage/storage-queue/src/AccountSASSignatureValues.ts
Original file line number Diff line number Diff line change
Expand Up @@ -97,20 +97,40 @@ export function generateAccountSASQueryParameters(
accountSASSignatureValues.resourceTypes
).toString();

const stringToSign = [
sharedKeyCredential.accountName,
parsedPermissions,
parsedServices,
parsedResourceTypes,
accountSASSignatureValues.startsOn
? truncatedISO8061Date(accountSASSignatureValues.startsOn, false)
: "",
truncatedISO8061Date(accountSASSignatureValues.expiresOn, false),
accountSASSignatureValues.ipRange ? ipRangeToString(accountSASSignatureValues.ipRange) : "",
accountSASSignatureValues.protocol ? accountSASSignatureValues.protocol : "",
version,
"" // Account SAS requires an additional newline character
].join("\n");
let stringToSign: string;

if (version >= "2020-12-06") {
stringToSign = [
sharedKeyCredential.accountName,
parsedPermissions,
parsedServices,
parsedResourceTypes,
accountSASSignatureValues.startsOn
? truncatedISO8061Date(accountSASSignatureValues.startsOn, false)
: "",
truncatedISO8061Date(accountSASSignatureValues.expiresOn, false),
accountSASSignatureValues.ipRange ? ipRangeToString(accountSASSignatureValues.ipRange) : "",
accountSASSignatureValues.protocol ? accountSASSignatureValues.protocol : "",
version,
"", // Reserved for encryption scope
"" // Account SAS requires an additional newline character
].join("\n");
} else {
stringToSign = [
sharedKeyCredential.accountName,
parsedPermissions,
parsedServices,
parsedResourceTypes,
accountSASSignatureValues.startsOn
? truncatedISO8061Date(accountSASSignatureValues.startsOn, false)
: "",
truncatedISO8061Date(accountSASSignatureValues.expiresOn, false),
accountSASSignatureValues.ipRange ? ipRangeToString(accountSASSignatureValues.ipRange) : "",
accountSASSignatureValues.protocol ? accountSASSignatureValues.protocol : "",
version,
"" // Account SAS requires an additional newline character
].join("\n");
}

const signature: string = sharedKeyCredential.computeHMACSHA256(stringToSign);

Expand Down
Loading

0 comments on commit 38585d2

Please sign in to comment.