Skip to content

Commit e527f9f

Browse files
colawwjdw511214992deyaaeldeen
authored
arm-features-release (Azure#16331)
* arm-features-release * Update sdk/features/arm-features/README.md Co-authored-by: Deyaaeldeen Almahallawi <[email protected]> * update * update Co-authored-by: Wei Dong <[email protected]> Co-authored-by: Deyaaeldeen Almahallawi <[email protected]>
1 parent eb34da8 commit e527f9f

15 files changed

+1184
-56
lines changed

sdk/features/arm-features/LICENSE.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
The MIT License (MIT)
22

3-
Copyright (c) 2019 Microsoft
3+
Copyright (c) 2021 Microsoft
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

sdk/features/arm-features/README.md

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
## Azure FeatureClient SDK for JavaScript
22

3-
This package contains an isomorphic SDK (runs both in Node.js and in browsers) for FeatureClient.
3+
This package contains an isomorphic SDK (runs both in node.js and in browsers) for FeatureClient.
44

55
### Currently supported environments
66

77
- [LTS versions of Node.js](https://nodejs.org/about/releases/)
8-
- Latest versions of Safari, Chrome, Edge, and Firefox.
8+
- Latest versions of Safari, Chrome, Edge and Firefox.
99

1010
### Prerequisites
1111

@@ -21,7 +21,6 @@ Install both packages using the below command:
2121
```bash
2222
npm install --save @azure/arm-features @azure/identity
2323
```
24-
2524
> **Note**: You may have used either `@azure/ms-rest-nodeauth` or `@azure/ms-rest-browserauth` in the past. These packages are in maintenance mode receiving critical bug fixes, but no new features.
2625
If you are on a [Node.js that has LTS status](https://nodejs.org/about/releases/), or are writing a client side browser application, we strongly encourage you to upgrade to `@azure/identity` which uses the latest versions of Azure Active Directory and MSAL APIs and provides more authentication options.
2726

@@ -37,8 +36,7 @@ If you are on a [Node.js that has LTS status](https://nodejs.org/about/releases/
3736

3837
In the below samples, we pass the credential and the Azure subscription id to instantiate the client.
3938
Once the client is created, explore the operations on it either in your favorite editor or in our [API reference documentation](https://docs.microsoft.com/javascript/api) to get started.
40-
41-
#### nodejs - Authentication, client creation, and listOperations as an example written in JavaScript.
39+
#### nodejs - Authentication, client creation, and listOperations as an example written in JavaScript.
4240

4341
##### Sample code
4442

@@ -51,7 +49,6 @@ const subscriptionId = process.env["AZURE_SUBSCRIPTION_ID"];
5149
// Please note that you can also use credentials from the `@azure/ms-rest-nodeauth` package instead.
5250
const creds = new DefaultAzureCredential();
5351
const client = new FeatureClient(creds, subscriptionId);
54-
5552
client.listOperations().then((result) => {
5653
console.log("The result is:");
5754
console.log(result);
@@ -61,7 +58,7 @@ client.listOperations().then((result) => {
6158
});
6259
```
6360

64-
#### browser - Authentication, client creation, and listOperations as an example written in JavaScript.
61+
#### browser - Authentication, client creation, and listOperations as an example written in JavaScript.
6562

6663
In browser applications, we recommend using the `InteractiveBrowserCredential` that interactively authenticates using the default system browser.
6764
- See [Single-page application: App registration guide](https://docs.microsoft.com/azure/active-directory/develop/scenario-spa-app-registration) to configure your app registration for the browser.
@@ -86,7 +83,7 @@ In browser applications, we recommend using the `InteractiveBrowserCredential` t
8683
const credential = new InteractiveBrowserCredential(
8784
{
8885
clientId: "<client id for your Azure AD app>",
89-
tenantId: "<optional tenant for your organization>"
86+
tenant: "<optional tenant for your organization>"
9087
});
9188
const client = new Azure.ArmFeatures.FeatureClient(creds, subscriptionId);
9289
client.listOperations().then((result) => {

sdk/features/arm-features/package.json

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22
"name": "@azure/arm-features",
33
"author": "Microsoft Corporation",
44
"description": "FeatureClient Library with typescript type definitions for node.js and browser.",
5-
"version": "1.1.1",
5+
"version": "2.0.0",
66
"dependencies": {
7-
"@azure/ms-rest-azure-js": "^1.4.0",
8-
"@azure/ms-rest-js": "^1.11.0",
7+
"@azure/ms-rest-azure-js": "^2.1.0",
8+
"@azure/ms-rest-js": "^2.2.0",
99
"@azure/core-auth": "^1.1.4",
10-
"tslib": "^1.9.3"
10+
"tslib": "^1.10.0"
1111
},
1212
"keywords": [
1313
"node",
@@ -22,12 +22,12 @@
2222
"types": "./esm/featureClient.d.ts",
2323
"devDependencies": {
2424
"typescript": "^3.6.0",
25-
"rollup": "^0.66.2",
26-
"rollup-plugin-node-resolve": "^3.4.0",
25+
"rollup": "^1.18.0",
26+
"rollup-plugin-node-resolve": "^5.2.0",
2727
"rollup-plugin-sourcemaps": "^0.4.2",
28-
"uglify-js": "^3.4.9"
28+
"uglify-js": "^3.6.0"
2929
},
30-
"homepage": "https://github.com/Azure/azure-sdk-for-js/tree/feature/v4/sdk/features/arm-features",
30+
"homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/features/arm-features",
3131
"repository": {
3232
"type": "git",
3333
"url": "https://github.com/Azure/azure-sdk-for-js.git"

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,15 +21,15 @@ const config = {
2121
"@azure/ms-rest-azure-js": "msRestAzure"
2222
},
2323
banner: `/*
24-
* Copyright (c) Microsoft Corporation. All rights reserved.
25-
* Licensed under the MIT License. See License.txt in the project root for license information.
24+
* Copyright (c) Microsoft Corporation.
25+
* Licensed under the MIT License.
2626
*
2727
* Code generated by Microsoft (R) AutoRest Code Generator.
2828
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
2929
*/`
3030
},
3131
plugins: [
32-
nodeResolve({ module: true }),
32+
nodeResolve({ mainFields: ['module', 'main'] }),
3333
sourcemaps()
3434
]
3535
};

sdk/features/arm-features/src/featureClient.ts

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
/*
2-
* Copyright (c) Microsoft Corporation. All rights reserved.
3-
* Licensed under the MIT License. See License.txt in the project root for
4-
* license information.
2+
* Copyright (c) Microsoft Corporation.
3+
* Licensed under the MIT License.
54
*
65
* Code generated by Microsoft (R) AutoRest Code Generator.
76
* Changes may cause incorrect behavior and will be lost if the code is
@@ -20,6 +19,7 @@ import { FeatureClientContext } from "./featureClientContext";
2019
class FeatureClient extends FeatureClientContext {
2120
// Operation groups
2221
features: operations.Features;
22+
subscriptionFeatureRegistrations: operations.SubscriptionFeatureRegistrations;
2323

2424
/**
2525
* Initializes a new instance of the FeatureClient class.
@@ -29,12 +29,13 @@ class FeatureClient extends FeatureClientContext {
2929
* {@link https://www.npmjs.com/package/@azure/identity}. Credentials implementing the
3030
* ServiceClientCredentials interface from the older packages @azure/ms-rest-nodeauth and
3131
* @azure/ms-rest-browserauth are also supported.
32-
* @param subscriptionId The ID of the target subscription.
32+
* @param subscriptionId The Azure subscription ID.
3333
* @param [options] The parameter options
3434
*/
3535
constructor(credentials: msRest.ServiceClientCredentials | TokenCredential, subscriptionId: string, options?: Models.FeatureClientOptions) {
3636
super(credentials, subscriptionId, options);
3737
this.features = new operations.Features(this);
38+
this.subscriptionFeatureRegistrations = new operations.SubscriptionFeatureRegistrations(this);
3839
}
3940

4041
/**
@@ -106,7 +107,7 @@ const listOperationsOperationSpec: msRest.OperationSpec = {
106107
bodyMapper: Mappers.OperationListResult
107108
},
108109
default: {
109-
bodyMapper: Mappers.CloudError
110+
bodyMapper: Mappers.ErrorResponse
110111
}
111112
},
112113
serializer
@@ -119,6 +120,9 @@ const listOperationsNextOperationSpec: msRest.OperationSpec = {
119120
urlParameters: [
120121
Parameters.nextPageLink
121122
],
123+
queryParameters: [
124+
Parameters.apiVersion
125+
],
122126
headerParameters: [
123127
Parameters.acceptLanguage
124128
],
@@ -127,7 +131,7 @@ const listOperationsNextOperationSpec: msRest.OperationSpec = {
127131
bodyMapper: Mappers.OperationListResult
128132
},
129133
default: {
130-
bodyMapper: Mappers.CloudError
134+
bodyMapper: Mappers.ErrorResponse
131135
}
132136
},
133137
serializer

sdk/features/arm-features/src/featureClientContext.ts

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
/*
2-
* Copyright (c) Microsoft Corporation. All rights reserved.
3-
* Licensed under the MIT License. See License.txt in the project root for
4-
* license information.
2+
* Copyright (c) Microsoft Corporation.
3+
* Licensed under the MIT License.
54
*
65
* Code generated by Microsoft (R) AutoRest Code Generator.
76
* Changes may cause incorrect behavior and will be lost if the code is
@@ -10,11 +9,11 @@
109

1110
import * as Models from "./models";
1211
import * as msRest from "@azure/ms-rest-js";
13-
import { TokenCredential } from "@azure/core-auth";
1412
import * as msRestAzure from "@azure/ms-rest-azure-js";
13+
import { TokenCredential } from "@azure/core-auth";
1514

1615
const packageName = "@azure/arm-features";
17-
const packageVersion = "1.1.1";
16+
const packageVersion = "2.0.0";
1817

1918
export class FeatureClientContext extends msRestAzure.AzureServiceClient {
2019
credentials: msRest.ServiceClientCredentials | TokenCredential;
@@ -29,7 +28,7 @@ export class FeatureClientContext extends msRestAzure.AzureServiceClient {
2928
* {@link https://www.npmjs.com/package/@azure/identity}. Credentials implementing the
3029
* ServiceClientCredentials interface from the older packages @azure/ms-rest-nodeauth and
3130
* @azure/ms-rest-browserauth are also supported.
32-
* @param subscriptionId The ID of the target subscription.
31+
* @param subscriptionId The Azure subscription ID.
3332
* @param [options] The parameter options
3433
*/
3534
constructor(credentials: msRest.ServiceClientCredentials | TokenCredential, subscriptionId: string, options?: Models.FeatureClientOptions) {
@@ -50,7 +49,7 @@ export class FeatureClientContext extends msRestAzure.AzureServiceClient {
5049

5150
super(credentials, options);
5251

53-
this.apiVersion = '2015-12-01';
52+
this.apiVersion = '2021-07-01';
5453
this.acceptLanguage = 'en-US';
5554
this.longRunningOperationRetryTimeout = 30;
5655
this.baseUri = options.baseUri || this.baseUri || "https://management.azure.com";

sdk/features/arm-features/src/models/featuresMappers.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
/*
2-
* Copyright (c) Microsoft Corporation. All rights reserved.
3-
* Licensed under the MIT License. See License.txt in the project root for license information.
2+
* Copyright (c) Microsoft Corporation.
3+
* Licensed under the MIT License.
44
*
55
* Code generated by Microsoft (R) AutoRest Code Generator.
66
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
77
*/
88

99
export {
10-
CloudError,
10+
ErrorDefinition,
11+
ErrorResponse,
1112
FeatureOperationsListResult,
1213
FeatureProperties,
1314
FeatureResult

0 commit comments

Comments
 (0)