Skip to content

Commit 70d9214

Browse files
author
SDKAuto
committed
CodeGen from PR 18459 in Azure/azure-rest-api-specs
Merge 01575f1a9430751c5318295e9f00d5fe4c655dad into b6a78456cab458910378135995f1d019765ccec3
1 parent 63b935b commit 70d9214

File tree

69 files changed

+6310
-7616
lines changed

Some content is hidden

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

69 files changed

+6310
-7616
lines changed

common/config/rush/pnpm-lock.yaml

Lines changed: 16 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 6 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,11 @@
11
# Release History
2+
3+
## 9.0.0-beta.2 (2022-03-31)
24

3-
## 9.0.0-beta.2 (Unreleased)
5+
The package of @azure/arm-authorization is using our next generation design principles since version 9.0.0-beta.2, which contains breaking changes.
46

5-
### Features Added
7+
To understand the detail of the change, please refer to [Changelog](https://aka.ms/js-track2-changelog).
68

7-
### Breaking Changes
9+
To migrate the existing applications to the latest version, please refer to [Migration Guide](https://aka.ms/js-track2-migration-guide).
810

9-
### Bugs Fixed
10-
11-
### Other Changes
12-
13-
## 9.0.0-beta.1 (2021-10-09)
14-
15-
This is the first preview for the new version of the `@azure/arm-authorization` package that follows the new [guidelines for TypeScript SDKs](https://azure.github.io/azure-sdk/typescript_introduction.html) for Azure services.
16-
17-
While this package remains auto generated, the SDK generator itself has undergone changes to comply with the above guidelines in order to generate packages that are idiomatic to the JavaScript/TypeScript ecosystem and consistent with other packages for Azure services. For more on this, please see [State of the Azure SDK 2021](https://devblogs.microsoft.com/azure-sdk/state-of-the-azure-sdk-2021/).
18-
19-
Please note that this version has breaking changes, all of which were made after careful consideration during the authoring of the guidelines and user studies.
20-
21-
**Noteworthy changes and features**
22-
- Authentication: The packages `@azure/ms-rest-nodeauth` or `@azure/ms-rest-browserauth` are no longer supported. Use package [@azure/identity](https://www.npmjs.com/package/@azure/identity) instead. Select a credential from Azure Identity examples based on the authentication method of your choice.
23-
- Callbacks: Method overloads that used callbacks have been removed and the use of promises is encouraged instead.
24-
- List operations now return an iterable result that follows the `PagedAsyncIterableIterator` interface as opposed to the previous model where you had to make a new request using the link to the next page.
25-
- Long running operations i.e. the Lro related object returned by methods whose names started with `begin`, now uses `pollUntilDone` to check whether the request is finished, instead of `pollUntilFinished`. To get the final result, use the corresponding method that will have the suffix `AndWait`.
26-
- The SDK only supports ECMAScript 2015 (ES6) and beyond, all projects that referenced this SDK should be upgraded to use ES6.
11+
To learn more, please refer to our documentation [Quick Start](https://aka.ms/js-track2-quickstart).

sdk/authorization/arm-authorization/LICENSE

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) 2021 Microsoft
3+
Copyright (c) 2022 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/authorization/arm-authorization/README.md

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22

33
This package contains an isomorphic SDK (runs both in Node.js and in browsers) for Azure AuthorizationManagement client.
44

5-
Role based access control provides you a way to apply granular level policy administration down to individual resources or resource groups. These operations enable you to manage role assignments. A role assignment grants access to Azure Active Directory users.
5+
Access reviews service provides the workflow for running access reviews on different kind of resources.
66

77
[Source code](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/authorization/arm-authorization) |
88
[Package (NPM)](https://www.npmjs.com/package/@azure/arm-authorization) |
9-
[API reference documentation](https://docs.microsoft.com/javascript/api/@azure/arm-authorization) |
9+
[API reference documentation](https://docs.microsoft.com/javascript/api/@azure/arm-authorization?view=azure-node-preview) |
1010
[Samples](https://github.com/Azure-Samples/azure-samples-js-management)
1111

1212
## Getting started
@@ -33,9 +33,9 @@ npm install @azure/arm-authorization
3333
To create a client object to access the Azure AuthorizationManagement API, you will need the `endpoint` of your Azure AuthorizationManagement resource and a `credential`. The Azure AuthorizationManagement client can use Azure Active Directory credentials to authenticate.
3434
You can find the endpoint for your Azure AuthorizationManagement resource in the [Azure Portal][azure_portal].
3535

36-
#### Using an Azure Active Directory Credential
36+
You can authenticate with Azure Active Directory using a credential from the [@azure/identity][azure_identity] library or [an existing AAD Token](https://github.com/Azure/azure-sdk-for-js/blob/master/sdk/identity/identity/samples/AzureIdentityExamples.md#authenticating-with-a-pre-fetched-access-token).
3737

38-
You can authenticate with Azure Active Directory using the [Azure Identity library][azure_identity]. To use the [DefaultAzureCredential][defaultazurecredential] provider shown below, or other credential providers provided with the Azure SDK, please install the `@azure/identity` package:
38+
To use the [DefaultAzureCredential][defaultazurecredential] provider shown below, or other credential providers provided with the Azure SDK, please install the `@azure/identity` package:
3939

4040
```bash
4141
npm install @azure/identity
@@ -45,13 +45,18 @@ You will also need to **register a new AAD application and grant access to Azure
4545
Set the values of the client ID, tenant ID, and client secret of the AAD application as environment variables: `AZURE_CLIENT_ID`, `AZURE_TENANT_ID`, `AZURE_CLIENT_SECRET`.
4646

4747
For more information about how to create an Azure AD Application check out [this guide](https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal).
48+
4849
```javascript
4950
const { AuthorizationManagementClient } = require("@azure/arm-authorization");
5051
const { DefaultAzureCredential } = require("@azure/identity");
5152
const subscriptionId = "00000000-0000-0000-0000-000000000000";
5253
const client = new AuthorizationManagementClient(new DefaultAzureCredential(), subscriptionId);
5354
```
5455

56+
57+
### JavaScript Bundle
58+
To use this client library in the browser, first you need to use a bundler. For details on how to do this, please refer to our [bundling documentation](https://aka.ms/AzureSDKBundling).
59+
5560
## Key concepts
5661

5762
### AuthorizationManagementClient
Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
{
2-
"commit": "f9e4843e2ed3494e8bd66a92c3e7f65655f58f46",
2+
"commit": "fc0d3c9fea51016d05952fa655eaf6ed90c0324e",
33
"readme": "specification/authorization/resource-manager/readme.md",
4-
"autorest_command": "autorest --version=3.1.3 --typescript --modelerfour.lenient-model-deduplication --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --typescript-sdks-folder=D:\\mydev\\azure-sdk-for-js ../azure-rest-api-specs/specification/authorization/resource-manager/readme.md --use=@autorest/[email protected]beta.12",
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=/mnt/vss/_work/1/s/azure-sdk-for-js ../azure-rest-api-specs/specification/authorization/resource-manager/readme.md --use=@autorest/[email protected]alpha.16.20220105.1",
55
"repository_url": "https://github.com/Azure/azure-rest-api-specs.git",
6-
"use": "@autorest/[email protected]"
6+
"release_tool": "@azure-tools/[email protected]",
7+
"use": "@autorest/[email protected]"
78
}
Lines changed: 20 additions & 7 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",
3-
"mainEntryPointFilePath": "./dist-esm/index.d.ts",
4-
"docModel": { "enabled": true },
5-
"apiReport": { "enabled": true, "reportFolder": "./review" },
3+
"mainEntryPointFilePath": "./dist-esm/src/index.d.ts",
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-authorization.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/authorization/arm-authorization/package.json

Lines changed: 18 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"node": ">=12.0.0"
99
},
1010
"dependencies": {
11-
"@azure/core-paging": "^1.1.1",
11+
"@azure/core-paging": "^1.2.0",
1212
"@azure/core-client": "^1.0.0",
1313
"@azure/core-auth": "^1.3.0",
1414
"@azure/core-rest-pipeline": "^1.1.0",
@@ -23,19 +23,24 @@
2323
],
2424
"license": "MIT",
2525
"main": "./dist/index.js",
26-
"module": "./dist-esm/index.js",
26+
"module": "./dist-esm/src/index.js",
2727
"types": "./types/arm-authorization.d.ts",
2828
"devDependencies": {
2929
"@microsoft/api-extractor": "^7.18.11",
30-
"@rollup/plugin-commonjs": "^21.0.1",
30+
"@rollup/plugin-commonjs": "11.0.2",
3131
"@rollup/plugin-json": "^4.0.0",
3232
"@rollup/plugin-multi-entry": "^3.0.0",
3333
"@rollup/plugin-node-resolve": "^8.0.0",
3434
"mkdirp": "^1.0.4",
35-
"rollup": "^2.0.0",
35+
"rollup": "^1.16.3",
3636
"rollup-plugin-sourcemaps": "^0.4.2",
3737
"typescript": "~4.2.0",
38-
"uglify-js": "^3.4.9"
38+
"uglify-js": "^3.4.9",
39+
"rimraf": "^3.0.0",
40+
"@azure/identity": "^2.0.1",
41+
"@azure-tools/test-recorder": "^1.0.0",
42+
"mocha": "^7.1.1",
43+
"cross-env": "^7.0.2"
3944
},
4045
"homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/authorization/arm-authorization",
4146
"repository": {
@@ -64,33 +69,32 @@
6469
"types/*"
6570
],
6671
"scripts": {
67-
"build": "tsc && rollup -c 2>&1 && npm run minify && mkdirp ./review && npm run extract-api",
72+
"build": "npm run clean && tsc && rollup -c 2>&1 && npm run minify && mkdirp ./review && npm run extract-api",
6873
"minify": "uglifyjs -c -m --comments --source-map \"content='./dist/index.js.map'\" -o ./dist/index.min.js ./dist/index.js",
6974
"prepack": "npm run build",
7075
"pack": "npm pack 2>&1",
7176
"extract-api": "api-extractor run --local",
7277
"lint": "echo skipped",
7378
"audit": "echo skipped",
74-
"clean": "echo skipped",
79+
"clean": "rimraf dist dist-browser dist-esm test-dist temp types *.tgz *.log",
7580
"build:node": "echo skipped",
7681
"build:browser": "echo skipped",
7782
"build:test": "echo skipped",
7883
"build:samples": "echo skipped.",
7984
"check-format": "echo skipped",
8085
"execute:samples": "echo skipped",
8186
"format": "echo skipped",
82-
"test": "echo skipped",
83-
"prebuild": "echo skipped",
87+
"test": "npm run integration-test",
8488
"test:node": "echo skipped",
8589
"test:browser": "echo skipped",
86-
"unit-test": "echo skipped",
87-
"unit-test:node": "echo skipped",
90+
"unit-test": "npm run unit-test:node && npm run unit-test:browser",
91+
"unit-test:node": "cross-env TEST_MODE=playback npm run integration-test:node",
8892
"unit-test:browser": "echo skipped",
93+
"integration-test": "npm run integration-test:node && npm run integration-test:browser",
94+
"integration-test:node": "mocha -r esm --require ts-node/register --timeout 1200000 --full-trace test/*.ts --reporter ../../../common/tools/mocha-multi-reporter.js",
8995
"integration-test:browser": "echo skipped",
90-
"integration-test:node": "echo skipped",
91-
"integration-test": "echo skipped",
9296
"docs": "echo skipped"
9397
},
9498
"sideEffects": false,
9599
"autoPublish": true
96-
}
100+
}

0 commit comments

Comments
 (0)