Skip to content

Commit

Permalink
[refresh]service-map refresh (#24270)
Browse files Browse the repository at this point in the history
* [refresh]service-map refresh

* update files

* update files

* update file
  • Loading branch information
kazrael2119 authored Dec 23, 2022
1 parent fd24d29 commit 061d3d6
Show file tree
Hide file tree
Showing 101 changed files with 4,943 additions and 718 deletions.
70 changes: 12 additions & 58 deletions common/config/rush/pnpm-lock.yaml

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

4 changes: 2 additions & 2 deletions sdk/service-map/arm-servicemap/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Release History

## 3.0.0-beta.1 (2022-01-21)
## 3.0.0-beta.2 (2022-12-21)

The package of @azure/arm-servicemap is using our next generation design principles since version 3.0.0-beta.1, which contains breaking changes.
The package of @azure/arm-servicemap is using our next generation design principles since version 3.0.0-beta.2, which contains breaking changes.

To understand the detail of the change, please refer to [Changelog](https://aka.ms/js-track2-changelog).

Expand Down
25 changes: 18 additions & 7 deletions sdk/service-map/arm-servicemap/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Azure Service client library for JavaScript
# Azure ServiceMap client library for JavaScript

This package contains an isomorphic SDK (runs both in Node.js and in browsers) for Azure Service client.
This package contains an isomorphic SDK (runs both in Node.js and in browsers) for Azure ServiceMap client.

Service Map API Reference

Expand All @@ -16,22 +16,24 @@ Service Map API Reference
- [LTS versions of Node.js](https://github.com/nodejs/release#release-schedule)
- Latest versions of Safari, Chrome, Edge and Firefox.

See our [support policy](https://github.com/Azure/azure-sdk-for-js/blob/main/SUPPORT.md) for more details.

### Prerequisites

- An [Azure subscription][azure_sub].

### Install the `@azure/arm-servicemap` package

Install the Azure Service client library for JavaScript with `npm`:
Install the Azure ServiceMap client library for JavaScript with `npm`:

```bash
npm install @azure/arm-servicemap
```

### Create and authenticate a `ServiceMap`

To create a client object to access the Azure Service API, you will need the `endpoint` of your Azure Service resource and a `credential`. The Azure Service client can use Azure Active Directory credentials to authenticate.
You can find the endpoint for your Azure Service resource in the [Azure Portal][azure_portal].
To create a client object to access the Azure ServiceMap API, you will need the `endpoint` of your Azure ServiceMap resource and a `credential`. The Azure ServiceMap client can use Azure Active Directory credentials to authenticate.
You can find the endpoint for your Azure ServiceMap resource in the [Azure Portal][azure_portal].

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).

Expand All @@ -41,16 +43,25 @@ To use the [DefaultAzureCredential][defaultazurecredential] provider shown below
npm install @azure/identity
```

You will also need to **register a new AAD application and grant access to Azure Service** by assigning the suitable role to your service principal (note: roles such as `"Owner"` will not grant the necessary permissions).
You will also need to **register a new AAD application and grant access to Azure ServiceMap** by assigning the suitable role to your service principal (note: roles such as `"Owner"` will not grant the necessary permissions).
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`.

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).

```javascript
const { ServiceMap } = require("@azure/arm-servicemap");
const { DefaultAzureCredential } = require("@azure/identity");
// For client-side applications running in the browser, use InteractiveBrowserCredential instead of DefaultAzureCredential. See https://aka.ms/azsdk/js/identity/examples for more details.

const subscriptionId = "00000000-0000-0000-0000-000000000000";
const client = new ServiceMap(new DefaultAzureCredential(), subscriptionId);

// For client-side applications running in the browser, use this code instead:
// const credential = new InteractiveBrowserCredential({
// tenantId: "<YOUR_TENANT_ID>",
// clientId: "<YOUR_CLIENT_ID>"
// });
// const client = new ServiceMap(credential, subscriptionId);
```


Expand All @@ -61,7 +72,7 @@ To use this client library in the browser, first you need to use a bundler. For

### ServiceMap

`ServiceMap` is the primary interface for developers using the Azure Service client library. Explore the methods on this client object to understand the different features of the Azure Service service that you can access.
`ServiceMap` is the primary interface for developers using the Azure ServiceMap client library. Explore the methods on this client object to understand the different features of the Azure ServiceMap service that you can access.

## Troubleshooting

Expand Down
7 changes: 4 additions & 3 deletions sdk/service-map/arm-servicemap/_meta.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
{
"commit": "f9a6cb686bcc0f1b23761db19f2491c5c4df95cb",
"commit": "d6b9d9d7ea3fa4e6c0c2122f7641b9b009ce482e",
"readme": "specification/service-map/resource-manager/readme.md",
"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/service-map/resource-manager/readme.md --use=@autorest/[email protected]alpha.16.20220114.1 --generate-sample=true",
"autorest_command": "autorest --version=3.9.3 --typescript --modelerfour.lenient-model-deduplication --azure-arm --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=F:\\azure-sdk-for-js ..\\azure-rest-api-specs\\specification\\service-map\\resource-manager\\readme.md --use=@autorest/[email protected]rc.5.20221215.1 --generate-sample=true",
"repository_url": "https://github.com/Azure/azure-rest-api-specs.git",
"use": "@autorest/[email protected]"
"release_tool": "@azure-tools/[email protected]",
"use": "@autorest/[email protected]"
}
25 changes: 19 additions & 6 deletions sdk/service-map/arm-servicemap/api-extractor.json
Original file line number Diff line number Diff line change
@@ -1,18 +1,31 @@
{
"$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json",
"mainEntryPointFilePath": "./dist-esm/src/index.d.ts",
"docModel": { "enabled": true },
"apiReport": { "enabled": true, "reportFolder": "./review" },
"docModel": {
"enabled": true
},
"apiReport": {
"enabled": true,
"reportFolder": "./review"
},
"dtsRollup": {
"enabled": true,
"untrimmedFilePath": "",
"publicTrimmedFilePath": "./types/arm-servicemap.d.ts"
},
"messages": {
"tsdocMessageReporting": { "default": { "logLevel": "none" } },
"tsdocMessageReporting": {
"default": {
"logLevel": "none"
}
},
"extractorMessageReporting": {
"ae-missing-release-tag": { "logLevel": "none" },
"ae-unresolved-link": { "logLevel": "none" }
"ae-missing-release-tag": {
"logLevel": "none"
},
"ae-unresolved-link": {
"logLevel": "none"
}
}
}
}
}
39 changes: 22 additions & 17 deletions sdk/service-map/arm-servicemap/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@
"sdk-type": "mgmt",
"author": "Microsoft Corporation",
"description": "A generated SDK for ServiceMap.",
"version": "3.0.0-beta.1",
"version": "3.0.0-beta.2",
"engines": {
"node": ">=14.0.0"
},
"dependencies": {
"@azure/core-paging": "^1.2.0",
"@azure/core-client": "^1.0.0",
"@azure/core-client": "^1.6.1",
"@azure/core-auth": "^1.3.0",
"@azure/core-rest-pipeline": "^1.1.0",
"@azure/core-rest-pipeline": "^1.8.0",
"tslib": "^2.2.0"
},
"keywords": [
Expand All @@ -27,22 +27,27 @@
"types": "./types/arm-servicemap.d.ts",
"devDependencies": {
"@microsoft/api-extractor": "^7.31.1",
"@rollup/plugin-commonjs": "^11.0.2",
"@rollup/plugin-json": "^4.0.0",
"@rollup/plugin-multi-entry": "^3.0.0",
"@rollup/plugin-node-resolve": "^8.0.0",
"@rollup/plugin-commonjs": "^21.0.1",
"@rollup/plugin-json": "^4.1.0",
"@rollup/plugin-multi-entry": "^4.1.0",
"@rollup/plugin-node-resolve": "^13.1.3",
"mkdirp": "^1.0.4",
"rollup": "^1.16.3",
"rollup": "^2.66.1",
"rollup-plugin-sourcemaps": "^0.6.3",
"typescript": "~4.2.0",
"typescript": "~4.8.0",
"uglify-js": "^3.4.9",
"rimraf": "^3.0.0",
"dotenv": "^8.2.0",
"@azure/identity": "^2.0.1",
"@azure-tools/test-recorder": "^1.0.0",
"@azure-tools/test-recorder": "^2.0.0",
"@azure-tools/test-credential": "^1.0.0",
"mocha": "^7.1.1",
"cross-env": "^7.0.2"
"@types/chai": "^4.2.8",
"chai": "^4.2.0",
"cross-env": "^7.0.2",
"@types/node": "^14.0.0",
"@azure/dev-tool": "^1.0.0"
},
"homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/service-map/arm-servicemap",
"repository": {
"type": "git",
"url": "https://github.com/Azure/azure-sdk-for-js.git"
Expand Down Expand Up @@ -91,20 +96,20 @@
"unit-test:node": "cross-env TEST_MODE=playback npm run integration-test:node",
"unit-test:browser": "echo skipped",
"integration-test": "npm run integration-test:node && npm run integration-test:browser",
"integration-test:node": "mocha -r esm --require ts-node/register --timeout 1200000 --full-trace test/*.ts --reporter ../../../common/tools/mocha-multi-reporter.js",
"integration-test:browser": "echo skipped",
"docs": "echo skipped"
"integration-test:node": "dev-tool run test:node-ts-input -- --timeout 1200000 'test/*.ts'",
"integration-test:browser": "echo skipped"
},
"sideEffects": false,
"//metadata": {
"constantPaths": [
{
"path": "src/ServiceMap.ts",
"path": "src/serviceMap.ts",
"prefix": "packageDetails"
}
]
},
"autoPublish": true,
"homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/service-map/arm-servicemap",
"//sampleConfiguration": {
"productName": "",
"productSlugs": [
Expand All @@ -113,4 +118,4 @@
"disableDocsMs": true,
"apiRefLink": "https://docs.microsoft.com/javascript/api/@azure/arm-servicemap?view=azure-node-preview"
}
}
}

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

Loading

0 comments on commit 061d3d6

Please sign in to comment.