Skip to content

Commit 2c37068

Browse files
authored
storagecache-release (Azure#20841)
* storagecache-release * update ci.mgmt.yml
1 parent f09df4c commit 2c37068

File tree

97 files changed

+6253
-2266
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

97 files changed

+6253
-2266
lines changed

common/config/rush/pnpm-lock.yaml

Lines changed: 1872 additions & 2157 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

sdk/storagecache/arm-storagecache/CHANGELOG.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,24 @@
11
# Release History
22

3+
## 5.1.0 (2022-03-15)
4+
5+
**Features**
6+
7+
- Added operation group AscUsages
8+
- Added operation StorageTargetOperations.beginInvalidate
9+
- Added operation StorageTargetOperations.beginInvalidateAndWait
10+
- Added Interface AscUsagesListNextOptionalParams
11+
- Added Interface AscUsagesListOptionalParams
12+
- Added Interface ResourceUsage
13+
- Added Interface ResourceUsageName
14+
- Added Interface ResourceUsagesListResult
15+
- Added Interface StorageTargetInvalidateOptionalParams
16+
- Added Type Alias AscUsagesListNextResponse
17+
- Added Type Alias AscUsagesListResponse
18+
- Interface Cache_2 has a new optional parameter zones
19+
- Class StorageCacheManagementClient has a new parameter ascUsages
20+
21+
322
## 5.0.0 (2022-01-21)
423

524
The package of @azure/arm-storagecache is using our next generation design principles since version 5.0.0, which contains breaking changes.

sdk/storagecache/arm-storagecache/README.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ A Storage Cache provides scalable caching service for NAS clients, serving data
1616
- [LTS versions of Node.js](https://nodejs.org/about/releases/)
1717
- Latest versions of Safari, Chrome, Edge and Firefox.
1818

19+
See our [support policy](https://github.com/Azure/azure-sdk-for-js/blob/main/SUPPORT.md) for more details.
20+
1921
### Prerequisites
2022

2123
- An [Azure subscription][azure_sub].
@@ -49,8 +51,17 @@ For more information about how to create an Azure AD Application check out [this
4951
```javascript
5052
const { StorageCacheManagementClient } = require("@azure/arm-storagecache");
5153
const { DefaultAzureCredential } = require("@azure/identity");
54+
// For client-side applications running in the browser, use InteractiveBrowserCredential instead of DefaultAzureCredential. See https://aka.ms/azsdk/js/identity/examples for more details.
55+
5256
const subscriptionId = "00000000-0000-0000-0000-000000000000";
5357
const client = new StorageCacheManagementClient(new DefaultAzureCredential(), subscriptionId);
58+
59+
// For client-side applications running in the browser, use this code instead:
60+
// const credential = new InteractiveBrowserCredential({
61+
// tenantId: "<YOUR_TENANT_ID>",
62+
// clientId: "<YOUR_CLIENT_ID>"
63+
// });
64+
// const client = new StorageCacheManagementClient(credential, subscriptionId);
5465
```
5566

5667

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
{
2-
"commit": "f9a6cb686bcc0f1b23761db19f2491c5c4df95cb",
2+
"commit": "e432d9cc87bfed320d8feead4b448be9481c9181",
33
"readme": "specification/storagecache/resource-manager/readme.md",
4-
"autorest_command": "autorest --version=3.7.3 --typescript --modelerfour.lenient-model-deduplication --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=D:\\mydev\\azure-sdk-for-js ../azure-rest-api-specs/specification/storagecache/resource-manager/readme.md --use=@autorest/typescript@6.0.0-alpha.16.20220114.1 --generate-sample=true",
4+
"autorest_command": "autorest --version=3.7.3 --typescript --modelerfour.lenient-model-deduplication --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=D:\\mydev\\azure-sdk-for-js ..\\azure-rest-api-specs\\specification\\storagecache\\resource-manager\\readme.md --use=@autorest/typescript@6.0.0-beta.16 --generate-sample=true",
55
"repository_url": "https://github.com/Azure/azure-rest-api-specs.git",
6-
"use": "@autorest/typescript@6.0.0-alpha.16.20220114.1"
6+
"release_tool": "@azure-tools/js-sdk-release-tools@2.1.1",
7+
"use": "@autorest/typescript@6.0.0-beta.16"
78
}
Lines changed: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,31 @@
11
{
22
"$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json",
33
"mainEntryPointFilePath": "./dist-esm/src/index.d.ts",
4-
"docModel": { "enabled": true },
5-
"apiReport": { "enabled": true, "reportFolder": "./review" },
4+
"docModel": {
5+
"enabled": true
6+
},
7+
"apiReport": {
8+
"enabled": true,
9+
"reportFolder": "./review"
10+
},
611
"dtsRollup": {
712
"enabled": true,
813
"untrimmedFilePath": "",
914
"publicTrimmedFilePath": "./types/arm-storagecache.d.ts"
1015
},
1116
"messages": {
12-
"tsdocMessageReporting": { "default": { "logLevel": "none" } },
17+
"tsdocMessageReporting": {
18+
"default": {
19+
"logLevel": "none"
20+
}
21+
},
1322
"extractorMessageReporting": {
14-
"ae-missing-release-tag": { "logLevel": "none" },
15-
"ae-unresolved-link": { "logLevel": "none" }
23+
"ae-missing-release-tag": {
24+
"logLevel": "none"
25+
},
26+
"ae-unresolved-link": {
27+
"logLevel": "none"
28+
}
1629
}
1730
}
18-
}
31+
}

sdk/storagecache/arm-storagecache/package.json

Lines changed: 25 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,10 @@
33
"sdk-type": "mgmt",
44
"author": "Microsoft Corporation",
55
"description": "A generated SDK for StorageCacheManagementClient.",
6-
"version": "5.0.0",
7-
"engines": { "node": ">=12.0.0" },
6+
"version": "5.1.0",
7+
"engines": {
8+
"node": ">=12.0.0"
9+
},
810
"dependencies": {
911
"@azure/core-lro": "^2.2.0",
1012
"@azure/abort-controller": "^1.0.0",
@@ -14,20 +16,26 @@
1416
"@azure/core-rest-pipeline": "^1.1.0",
1517
"tslib": "^2.2.0"
1618
},
17-
"keywords": ["node", "azure", "typescript", "browser", "isomorphic"],
19+
"keywords": [
20+
"node",
21+
"azure",
22+
"typescript",
23+
"browser",
24+
"isomorphic"
25+
],
1826
"license": "MIT",
1927
"main": "./dist/index.js",
2028
"module": "./dist-esm/src/index.js",
2129
"types": "./types/arm-storagecache.d.ts",
2230
"devDependencies": {
2331
"@microsoft/api-extractor": "^7.18.11",
24-
"@rollup/plugin-commonjs": "11.0.2",
25-
"@rollup/plugin-json": "^4.0.0",
26-
"@rollup/plugin-multi-entry": "^3.0.0",
27-
"@rollup/plugin-node-resolve": "^8.0.0",
32+
"@rollup/plugin-commonjs": "^21.0.1",
33+
"@rollup/plugin-json": "^4.1.0",
34+
"@rollup/plugin-multi-entry": "^4.1.0",
35+
"@rollup/plugin-node-resolve": "^13.1.3",
2836
"mkdirp": "^1.0.4",
29-
"rollup": "^1.16.3",
30-
"rollup-plugin-sourcemaps": "^0.4.2",
37+
"rollup": "^2.66.1",
38+
"rollup-plugin-sourcemaps": "^0.6.3",
3139
"typescript": "~4.2.0",
3240
"uglify-js": "^3.4.9",
3341
"rimraf": "^3.0.0",
@@ -41,7 +49,9 @@
4149
"type": "git",
4250
"url": "https://github.com/Azure/azure-sdk-for-js.git"
4351
},
44-
"bugs": { "url": "https://github.com/Azure/azure-sdk-for-js/issues" },
52+
"bugs": {
53+
"url": "https://github.com/Azure/azure-sdk-for-js/issues"
54+
},
4555
"files": [
4656
"dist/**/*.js",
4757
"dist/**/*.js.map",
@@ -91,16 +101,18 @@
91101
"//metadata": {
92102
"constantPaths": [
93103
{
94-
"path": "src/StorageCacheManagementClient.ts",
104+
"path": "src/storageCacheManagementClient.ts",
95105
"prefix": "packageDetails"
96106
}
97107
]
98108
},
99109
"autoPublish": true,
100110
"//sampleConfiguration": {
101111
"productName": "",
102-
"productSlugs": ["azure"],
112+
"productSlugs": [
113+
"azure"
114+
],
103115
"disableDocsMs": true,
104116
"apiRefLink": "https://docs.microsoft.com/javascript/api/@azure/arm-storagecache?view=azure-node-preview"
105117
}
106-
}
118+
}

sdk/storagecache/arm-storagecache/review/arm-storagecache.api.md

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,25 @@ export interface AscOperationsGetOptionalParams extends coreClient.OperationOpti
6363
// @public
6464
export type AscOperationsGetResponse = AscOperation;
6565

66+
// @public
67+
export interface AscUsages {
68+
list(location: string, options?: AscUsagesListOptionalParams): PagedAsyncIterableIterator<ResourceUsage>;
69+
}
70+
71+
// @public
72+
export interface AscUsagesListNextOptionalParams extends coreClient.OperationOptions {
73+
}
74+
75+
// @public
76+
export type AscUsagesListNextResponse = ResourceUsagesListResult;
77+
78+
// @public
79+
export interface AscUsagesListOptionalParams extends coreClient.OperationOptions {
80+
}
81+
82+
// @public
83+
export type AscUsagesListResponse = ResourceUsagesListResult;
84+
6685
// @public
6786
export interface BlobNfsTarget {
6887
target?: string;
@@ -91,6 +110,7 @@ interface Cache_2 {
91110
};
92111
readonly type?: string;
93112
readonly upgradeStatus?: CacheUpgradeStatus;
113+
zones?: string[];
94114
}
95115
export { Cache_2 as Cache }
96116

@@ -640,6 +660,26 @@ export interface ResourceSkusResult {
640660
readonly value?: ResourceSku[];
641661
}
642662

663+
// @public
664+
export interface ResourceUsage {
665+
readonly currentValue?: number;
666+
readonly limit?: number;
667+
readonly name?: ResourceUsageName;
668+
readonly unit?: string;
669+
}
670+
671+
// @public
672+
export interface ResourceUsageName {
673+
localizedValue?: string;
674+
value?: string;
675+
}
676+
677+
// @public
678+
export interface ResourceUsagesListResult {
679+
readonly nextLink?: string;
680+
readonly value?: ResourceUsage[];
681+
}
682+
643683
// @public
644684
export interface Restriction {
645685
reasonCode?: ReasonCode;
@@ -676,6 +716,8 @@ export class StorageCacheManagementClient extends coreClient.ServiceClient {
676716
// (undocumented)
677717
ascOperations: AscOperations;
678718
// (undocumented)
719+
ascUsages: AscUsages;
720+
// (undocumented)
679721
caches: Caches;
680722
// (undocumented)
681723
operations: Operations;
@@ -716,10 +758,18 @@ export interface StorageTargetFlushOptionalParams extends coreClient.OperationOp
716758
updateIntervalInMs?: number;
717759
}
718760

761+
// @public
762+
export interface StorageTargetInvalidateOptionalParams extends coreClient.OperationOptions {
763+
resumeFrom?: string;
764+
updateIntervalInMs?: number;
765+
}
766+
719767
// @public
720768
export interface StorageTargetOperations {
721769
beginFlush(resourceGroupName: string, cacheName: string, storageTargetName: string, options?: StorageTargetFlushOptionalParams): Promise<PollerLike<PollOperationState<void>, void>>;
722770
beginFlushAndWait(resourceGroupName: string, cacheName: string, storageTargetName: string, options?: StorageTargetFlushOptionalParams): Promise<void>;
771+
beginInvalidate(resourceGroupName: string, cacheName: string, storageTargetName: string, options?: StorageTargetInvalidateOptionalParams): Promise<PollerLike<PollOperationState<void>, void>>;
772+
beginInvalidateAndWait(resourceGroupName: string, cacheName: string, storageTargetName: string, options?: StorageTargetInvalidateOptionalParams): Promise<void>;
723773
beginResume(resourceGroupName: string, cacheName: string, storageTargetName: string, options?: StorageTargetResumeOptionalParams): Promise<PollerLike<PollOperationState<void>, void>>;
724774
beginResumeAndWait(resourceGroupName: string, cacheName: string, storageTargetName: string, options?: StorageTargetResumeOptionalParams): Promise<void>;
725775
beginSuspend(resourceGroupName: string, cacheName: string, storageTargetName: string, options?: StorageTargetSuspendOptionalParams): Promise<PollerLike<PollOperationState<void>, void>>;

sdk/storagecache/arm-storagecache/rollup.config.js

Lines changed: 6 additions & 72 deletions
Original file line numberDiff line numberDiff line change
@@ -14,62 +14,14 @@ import json from "@rollup/plugin-json";
1414

1515
import nodeBuiltins from "builtin-modules";
1616

17-
/**
18-
* Gets the proper configuration needed for rollup's commonJS plugin for @opentelemetry/api.
19-
*
20-
* NOTE: this manual configuration is only needed because OpenTelemetry uses an
21-
* __exportStar downleveled helper function to declare its exports which confuses
22-
* rollup's automatic discovery mechanism.
23-
*
24-
* @returns an object reference that can be `...`'d into your cjs() configuration.
25-
*/
26-
export function openTelemetryCommonJs() {
27-
const namedExports = {};
28-
29-
for (const key of [
30-
"@opentelemetry/api",
31-
"@azure/core-tracing/node_modules/@opentelemetry/api"
32-
]) {
33-
namedExports[key] = [
34-
"SpanKind",
35-
"TraceFlags",
36-
"getSpan",
37-
"setSpan",
38-
"SpanStatusCode",
39-
"getSpanContext",
40-
"setSpanContext"
41-
];
42-
}
43-
44-
const releasedOpenTelemetryVersions = ["0.10.2", "1.0.0-rc.0"];
45-
46-
for (const version of releasedOpenTelemetryVersions) {
47-
namedExports[
48-
// working around a limitation in the rollup common.js plugin - it's not able to resolve these modules so the named exports listed above will not get applied. We have to drill down to the actual path.
49-
`../../../common/temp/node_modules/.pnpm/@opentelemetry/api@${version}/node_modules/@opentelemetry/api/build/src/index.js`
50-
] = [
51-
"SpanKind",
52-
"TraceFlags",
53-
"getSpan",
54-
"setSpan",
55-
"StatusCode",
56-
"CanonicalCode",
57-
"getSpanContext",
58-
"setSpanContext"
59-
];
60-
}
61-
62-
return namedExports;
63-
}
64-
6517
// #region Warning Handler
6618

6719
/**
68-
* A function that can determine whether a rollupwarning should be ignored. If
20+
* A function that can determine whether a rollup warning should be ignored. If
6921
* the function returns `true`, then the warning will not be displayed.
7022
*/
7123

72-
function ignoreNiseSinonEvalWarnings(warning) {
24+
function ignoreNiseSinonEval(warning) {
7325
return (
7426
warning.code === "EVAL" &&
7527
warning.id &&
@@ -78,17 +30,14 @@ function ignoreNiseSinonEvalWarnings(warning) {
7830
);
7931
}
8032

81-
function ignoreChaiCircularDependencyWarnings(warning) {
33+
function ignoreChaiCircularDependency(warning) {
8234
return (
8335
warning.code === "CIRCULAR_DEPENDENCY" &&
8436
warning.importer && warning.importer.includes("node_modules/chai") === true
8537
);
8638
}
8739

88-
const warningInhibitors = [
89-
ignoreChaiCircularDependencyWarnings,
90-
ignoreNiseSinonEvalWarnings
91-
];
40+
const warningInhibitors = [ignoreChaiCircularDependency, ignoreNiseSinonEval];
9241

9342
/**
9443
* Construct a warning handler for the shared rollup configuration
@@ -122,22 +71,7 @@ function makeBrowserTestConfig() {
12271
nodeResolve({
12372
mainFields: ["module", "browser"]
12473
}),
125-
cjs({
126-
namedExports: {
127-
// Chai's strange internal architecture makes it impossible to statically
128-
// analyze its exports.
129-
chai: [
130-
"version",
131-
"use",
132-
"util",
133-
"config",
134-
"expect",
135-
"should",
136-
"assert"
137-
],
138-
...openTelemetryCommonJs()
139-
}
140-
}),
74+
cjs(),
14175
json(),
14276
sourcemaps()
14377
//viz({ filename: "dist-test/browser-stats.html", sourcemap: true })
@@ -173,7 +107,7 @@ export function makeConfig(pkg, options) {
173107
],
174108
output: { file: "dist/index.js", format: "cjs", sourcemap: true },
175109
preserveSymlinks: false,
176-
plugins: [sourcemaps(), nodeResolve(), cjs()]
110+
plugins: [sourcemaps(), nodeResolve()]
177111
};
178112

179113
const config = [baseConfig];

0 commit comments

Comments
 (0)