Skip to content

Commit 44e75c1

Browse files
authored
purview-track2-ga (Azure#19262)
1 parent 9f29300 commit 44e75c1

24 files changed

+556
-545
lines changed

common/config/rush/pnpm-lock.yaml

Lines changed: 4 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 3 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,5 @@
11
# Release History
2+
3+
## 1.0.0 (2021-12-13)
24

3-
## 1.0.0-beta.2 (Unreleased)
4-
5-
### Features Added
6-
7-
### Breaking Changes
8-
9-
### Bugs Fixed
10-
11-
### Other Changes
12-
13-
## 1.0.0-beta.1 (2021-09-09)
14-
15-
This is the first preview for the new version of the `@azure/arm-purview` 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.
5+
- Initial Release

sdk/purview/arm-purview/README.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,9 @@ npm install @azure/arm-purview
3333
To create a client object to access the Azure PurviewManagement API, you will need the `endpoint` of your Azure PurviewManagement resource and a `credential`. The Azure PurviewManagement client can use Azure Active Directory credentials to authenticate.
3434
You can find the endpoint for your Azure PurviewManagement 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 { PurviewManagementClient } = require("@azure/arm-purview");
5051
const { DefaultAzureCredential } = require("@azure/identity");
5152
const subscriptionId = "00000000-0000-0000-0000-000000000000";
5253
const client = new PurviewManagementClient(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
### PurviewManagementClient

sdk/purview/arm-purview/_meta.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
2-
"commit": "92b58eb71fd5eb2ce5600e9233541074ecabf851",
2+
"commit": "b8cae07c799a07f2e779a9e301f639e9b85124b1",
33
"readme": "specification/purview/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/purview/resource-manager/readme.md --use=@autorest/typescript@6.0.0-beta.12",
4+
"autorest_command": "autorest --version=3.1.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/purview/resource-manager/readme.md --use=@autorest/typescript@6.0.0-alpha.16.20211207.1",
55
"repository_url": "https://github.com/Azure/azure-rest-api-specs.git",
6-
"use": "@autorest/typescript@6.0.0-beta.12"
6+
"use": "@autorest/typescript@6.0.0-alpha.16.20211207.1"
77
}

sdk/purview/arm-purview/api-extractor.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json",
3-
"mainEntryPointFilePath": "./dist-esm/index.d.ts",
3+
"mainEntryPointFilePath": "./dist-esm/src/index.d.ts",
44
"docModel": { "enabled": true },
55
"apiReport": { "enabled": true, "reportFolder": "./review" },
66
"dtsRollup": {

sdk/purview/arm-purview/package.json

Lines changed: 19 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -3,29 +3,21 @@
33
"sdk-type": "mgmt",
44
"author": "Microsoft Corporation",
55
"description": "A generated SDK for PurviewManagementClient.",
6-
"version": "1.0.0-beta.2",
7-
"engines": {
8-
"node": ">=12.0.0"
9-
},
6+
"version": "1.0.0",
7+
"engines": { "node": ">=12.0.0" },
108
"dependencies": {
119
"@azure/core-lro": "^2.2.0",
1210
"@azure/abort-controller": "^1.0.0",
13-
"@azure/core-paging": "^1.1.1",
11+
"@azure/core-paging": "^1.2.0",
1412
"@azure/core-client": "^1.0.0",
1513
"@azure/core-auth": "^1.3.0",
1614
"@azure/core-rest-pipeline": "^1.1.0",
1715
"tslib": "^2.2.0"
1816
},
19-
"keywords": [
20-
"node",
21-
"azure",
22-
"typescript",
23-
"browser",
24-
"isomorphic"
25-
],
17+
"keywords": ["node", "azure", "typescript", "browser", "isomorphic"],
2618
"license": "MIT",
2719
"main": "./dist/index.js",
28-
"module": "./dist-esm/index.js",
20+
"module": "./dist-esm/src/index.js",
2921
"types": "./types/arm-purview.d.ts",
3022
"devDependencies": {
3123
"@microsoft/api-extractor": "^7.18.11",
@@ -37,16 +29,19 @@
3729
"rollup": "^1.16.3",
3830
"rollup-plugin-sourcemaps": "^0.4.2",
3931
"typescript": "~4.2.0",
40-
"uglify-js": "^3.4.9"
32+
"uglify-js": "^3.4.9",
33+
"rimraf": "^3.0.0",
34+
"@azure/identity": "^2.0.1",
35+
"@azure-tools/test-recorder": "^1.0.0",
36+
"mocha": "^7.1.1",
37+
"cross-env": "^7.0.2"
4138
},
4239
"homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/purview/arm-purview",
4340
"repository": {
4441
"type": "git",
4542
"url": "https://github.com/Azure/azure-sdk-for-js.git"
4643
},
47-
"bugs": {
48-
"url": "https://github.com/Azure/azure-sdk-for-js/issues"
49-
},
44+
"bugs": { "url": "https://github.com/Azure/azure-sdk-for-js/issues" },
5045
"files": [
5146
"dist/**/*.js",
5247
"dist/**/*.js.map",
@@ -66,31 +61,30 @@
6661
"types/*"
6762
],
6863
"scripts": {
69-
"build": "tsc && rollup -c 2>&1 && npm run minify && mkdirp ./review && npm run extract-api",
64+
"build": "npm run clean && tsc && rollup -c 2>&1 && npm run minify && mkdirp ./review && npm run extract-api",
7065
"minify": "uglifyjs -c -m --comments --source-map \"content='./dist/index.js.map'\" -o ./dist/index.min.js ./dist/index.js",
7166
"prepack": "npm run build",
7267
"pack": "npm pack 2>&1",
7368
"extract-api": "api-extractor run --local",
7469
"lint": "echo skipped",
7570
"audit": "echo skipped",
76-
"clean": "echo skipped",
71+
"clean": "rimraf dist dist-browser dist-esm test-dist temp types *.tgz *.log",
7772
"build:node": "echo skipped",
7873
"build:browser": "echo skipped",
7974
"build:test": "echo skipped",
8075
"build:samples": "echo skipped.",
8176
"check-format": "echo skipped",
8277
"execute:samples": "echo skipped",
8378
"format": "echo skipped",
84-
"test": "echo skipped",
85-
"prebuild": "echo skipped",
79+
"test": "npm run integration-test",
8680
"test:node": "echo skipped",
8781
"test:browser": "echo skipped",
88-
"unit-test": "echo skipped",
89-
"unit-test:node": "echo skipped",
82+
"unit-test": "npm run unit-test:node && npm run unit-test:browser",
83+
"unit-test:node": "cross-env TEST_MODE=playback npm run integration-test:node",
9084
"unit-test:browser": "echo skipped",
85+
"integration-test": "npm run integration-test:node && npm run integration-test:browser",
86+
"integration-test:node": "mocha -r esm --require ts-node/register --timeout 1200000 --full-trace test/*.ts --reporter ../../../common/tools/mocha-multi-reporter.js",
9187
"integration-test:browser": "echo skipped",
92-
"integration-test:node": "echo skipped",
93-
"integration-test": "echo skipped",
9488
"docs": "echo skipped"
9589
},
9690
"sideEffects": false,

sdk/purview/arm-purview/recordings/node/my_test/recording_sample_test.js

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

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

Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ export interface AccessKeys {
1818

1919
// @public
2020
export type Account = TrackedResource & {
21-
sku?: AccountSku;
21+
readonly sku?: AccountSku;
2222
cloudConnectors?: CloudConnectors;
2323
readonly createdAt?: Date;
2424
readonly createdBy?: string;
@@ -117,7 +117,10 @@ export interface AccountsGetOptionalParams extends coreClient.OperationOptions {
117117
export type AccountsGetResponse = Account;
118118

119119
// @public
120-
export interface AccountSku {
120+
export type AccountSku = AccountSkuAutoGenerated & {};
121+
122+
// @public
123+
export interface AccountSkuAutoGenerated {
121124
capacity?: number;
122125
name?: Name;
123126
}
@@ -591,27 +594,22 @@ export interface ProxyResource {
591594
export type PublicNetworkAccess = string;
592595

593596
// @public (undocumented)
594-
export class PurviewManagementClient extends PurviewManagementClientContext {
597+
export class PurviewManagementClient extends coreClient.ServiceClient {
598+
// (undocumented)
599+
$host: string;
595600
constructor(credentials: coreAuth.TokenCredential, subscriptionId: string, options?: PurviewManagementClientOptionalParams);
596601
// (undocumented)
597602
accounts: Accounts;
598603
// (undocumented)
604+
apiVersion: string;
605+
// (undocumented)
599606
defaultAccounts: DefaultAccounts;
600607
// (undocumented)
601608
operations: Operations;
602609
// (undocumented)
603610
privateEndpointConnections: PrivateEndpointConnections;
604611
// (undocumented)
605612
privateLinkResources: PrivateLinkResources;
606-
}
607-
608-
// @public (undocumented)
609-
export class PurviewManagementClientContext extends coreClient.ServiceClient {
610-
// (undocumented)
611-
$host: string;
612-
constructor(credentials: coreAuth.TokenCredential, subscriptionId: string, options?: PurviewManagementClientOptionalParams);
613-
// (undocumented)
614-
apiVersion: string;
615613
// (undocumented)
616614
subscriptionId: string;
617615
}
@@ -661,7 +659,6 @@ export type TrackedResourceSystemData = SystemData & {};
661659
// @public
662660
export type Type = string;
663661

664-
665662
// (No @packageDocumentation comment for this package)
666663

667664
```

sdk/purview/arm-purview/src/index.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,4 @@
99
/// <reference lib="esnext.asynciterable" />
1010
export * from "./models";
1111
export { PurviewManagementClient } from "./purviewManagementClient";
12-
export { PurviewManagementClientContext } from "./purviewManagementClientContext";
1312
export * from "./operationsInterfaces";

0 commit comments

Comments
 (0)